File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed
HydraScript.Domain.BackEnd/Impl
HydraScript.Domain.FrontEnd/Parser/Impl/Ast/Nodes/Expressions/ComplexLiterals Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ namespace HydraScript.Domain.BackEnd.Impl.Addresses;
55public class HashAddress ( int seed ) : IAddress
66{
77 private readonly int _seed = seed ;
8- private string ? _name ;
98
109 private readonly Guid _id = Guid . NewGuid ( ) ;
1110
@@ -15,14 +14,14 @@ public string Name
1514 {
1615 get
1716 {
18- if ( _name is null )
17+ if ( field is null )
1918 {
2019 var baseName = $ "{ unchecked ( ( uint ) GetHashCode ( ) ) } { _id : N} ";
2120 var nameArray = Random . Shared . GetItems ( baseName . AsSpan ( ) , 10 ) ;
22- _name = ZString . Concat ( "_t" , new string ( nameArray ) ) ;
21+ field = ZString . Concat ( "_t" , new string ( nameArray ) ) ;
2322 }
2423
25- return _name ;
24+ return field ;
2625 }
2726 }
2827
Original file line number Diff line number Diff line change @@ -2,18 +2,16 @@ namespace HydraScript.Domain.BackEnd.Impl.Instructions;
22
33public abstract class Instruction : IExecutableInstruction
44{
5- private IAddress _address = null ! ;
6-
75 public IAddress Address
86 {
9- get => _address ;
7+ get ;
108 set
119 {
1210 OnSetOfAddress ( value ) ;
13- _address = value ;
11+ field = value ;
1412 }
15- }
16-
13+ } = null ! ;
14+
1715 protected virtual void OnSetOfAddress ( IAddress address ) { }
1816
1917 public abstract IAddress ? Execute ( IExecuteParams executeParams ) ;
Original file line number Diff line number Diff line change @@ -2,14 +2,12 @@ namespace HydraScript.Domain.FrontEnd.Parser.Impl.Ast.Nodes.Expressions.ComplexL
22
33public abstract class ComplexLiteral : Expression
44{
5- private string ? _nullId ;
6-
75 protected string NullId
86 {
97 get
108 {
11- _nullId ??= $ "{ GetHashCode ( ) } ";
12- return _nullId ;
9+ field ??= $ "{ GetHashCode ( ) } ";
10+ return field ;
1311 }
1412 }
1513
You can’t perform that action at this time.
0 commit comments