File tree Expand file tree Collapse file tree 13 files changed +37
-35
lines changed
ContextSystem/Contexts/Control/Loops
MethodSystem/Methods/NumberMethods Expand file tree Collapse file tree 13 files changed +37
-35
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ private static TryGet<bool> ParseAsLiteral(BaseToken token)
2121 return error ;
2222 }
2323
24- return value . ExactValue ;
24+ return value . Value ;
2525 }
2626
2727 [ UsedImplicitly ]
@@ -34,7 +34,7 @@ public DynamicTryGet<bool> GetConvertSolution(BaseToken token)
3434 }
3535
3636 return valueToken . IsConstant
37- ? new ( get ( ) . OnSuccess ( v => v . ExactValue ) )
38- : new ( ( ) => get ( ) . OnSuccess ( v => v . ExactValue ) ) ;
37+ ? new ( get ( ) . OnSuccess ( v => v . Value ) )
38+ : new ( ( ) => get ( ) . OnSuccess ( v => v . Value ) ) ;
3939 }
4040}
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ public DynamicTryGet<TimeSpan> GetConvertSolution(BaseToken token)
2222
2323 if ( valueToken . IsConstant )
2424 {
25- return get ( ) . OnSuccess ( v => v . ExactValue ) ;
25+ return get ( ) . OnSuccess ( v => v . Value ) ;
2626 }
2727
28- return new ( ( ) => get ( ) . OnSuccess ( v => v . ExactValue ) ) ;
28+ return new ( ( ) => get ( ) . OnSuccess ( v => v . Value ) ) ;
2929 }
3030}
Original file line number Diff line number Diff line change @@ -55,15 +55,15 @@ public DynamicTryGet<float> GetConvertSolution(BaseToken token)
5555 {
5656 if ( token is NumberToken number )
5757 {
58- return VerifyRange ( number . Value . ExactValue ) ;
58+ return VerifyRange ( number . Value . Value ) ;
5959 }
6060
6161 return new ( ( ) => token . TryGetLiteralValue < NumberValue > ( ) . OnSuccess ( VerifyRange ) ) ;
6262 }
6363
6464 private TryGet < float > VerifyRange ( NumberValue value )
6565 {
66- var result = ( float ) value . ExactValue ;
66+ var result = ( float ) value . Value ;
6767 if ( result < _minValue )
6868 return $ "Value { value } is lower than allowed minimum value { _minValue } .";
6969
Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ public DynamicTryGet<int> GetConvertSolution(BaseToken token)
5454 {
5555 if ( token is NumberToken number )
5656 {
57- return VerifyRange ( number . Value . ExactValue ) ;
57+ return VerifyRange ( number . Value . Value ) ;
5858 }
5959 return new ( ( ) => token . TryGetLiteralValue < NumberValue > ( ) . OnSuccess ( VerifyRange ) ) ;
6060 }
6161
6262 private TryGet < int > VerifyRange ( NumberValue value )
6363 {
64- var result = ( int ) value . ExactValue ;
64+ var result = ( int ) value . Value ;
6565 if ( result < _minValue )
6666 return $ "Value { value } is lower than allowed minimum value { _minValue } .";
6767
Original file line number Diff line number Diff line change @@ -49,12 +49,12 @@ public override TryAddTokenRes TryAddToken(BaseToken token)
4949 return error ;
5050 }
5151
52- if ( value . ExactValue < 0 )
52+ if ( value . Value < 0 )
5353 {
5454 return $ "Value '{ value } ' cannot be negative.";
5555 }
5656
57- return ( uint ) value . ExactValue ;
57+ return ( uint ) value . Value ;
5858 } ;
5959 return TryAddTokenRes . End ( ) ;
6060 }
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public static TryGet<object> ParseExpression(BaseToken[] tokens)
7878 return mainErr + err ;
7979
8080 var tmp = MakeTempName ( ) ;
81- variables [ tmp ] = resolved . BaseValue ;
81+ variables [ tmp ] = resolved . Value ;
8282 AppendRaw ( tmp ) ;
8383 continue ;
8484 }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public override void Execute()
2121 var valueToParse = Args . GetAnyValue ( "value to parse" ) ;
2222 if ( valueToParse is NumberValue numVal )
2323 {
24- ReturnValue = new ( numVal . ExactValue ) ;
24+ ReturnValue = new ( numVal . Value ) ;
2525 return ;
2626 }
2727
Original file line number Diff line number Diff line change @@ -64,6 +64,6 @@ protected override IParseResult InternalParse(Script scr)
6464 public DynamicTryGet < string > GetDynamicResolver ( )
6565 {
6666 if ( ContainsExpressions ) return new ( ( ) => TryGet < string > . Success ( ParsedValue ( ) ) ) ;
67- return DynamicTryGet . Success ( Value . ExactValue ) ;
67+ return DynamicTryGet . Success ( Value . Value ) ;
6868 }
6969}
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ public static implicit operator BoolValue(bool value)
99
1010 public static implicit operator bool ( BoolValue value )
1111 {
12- return value . ExactValue ;
12+ return value . Value ;
1313 }
1414
15- public override string StringRep => ExactValue . ToString ( ) . ToLower ( ) ;
15+ public override string StringRep => Value . ToString ( ) . ToLower ( ) ;
1616}
Original file line number Diff line number Diff line change @@ -11,32 +11,32 @@ public static implicit operator DurationValue(TimeSpan value)
1111
1212 public static implicit operator TimeSpan ( DurationValue value )
1313 {
14- return value . ExactValue ;
14+ return value . Value ;
1515 }
1616
1717 public override string StringRep
1818 {
1919 get
2020 {
2121 StringBuilder sb = new ( ) ;
22- if ( ExactValue . Hours > 0 )
22+ if ( Value . Hours > 0 )
2323 {
24- sb . Append ( $ "{ ExactValue . Hours } h ") ;
24+ sb . Append ( $ "{ Value . Hours } h ") ;
2525 }
2626
27- if ( ExactValue . Minutes > 0 )
27+ if ( Value . Minutes > 0 )
2828 {
29- sb . Append ( $ "{ ExactValue . Minutes } m ") ;
29+ sb . Append ( $ "{ Value . Minutes } m ") ;
3030 }
3131
32- if ( ExactValue . Seconds > 0 )
32+ if ( Value . Seconds > 0 )
3333 {
34- sb . Append ( $ "{ ExactValue . Seconds } s ") ;
34+ sb . Append ( $ "{ Value . Seconds } s ") ;
3535 }
3636
37- if ( ExactValue . Milliseconds > 0 )
37+ if ( Value . Milliseconds > 0 )
3838 {
39- sb . Append ( $ "{ ExactValue . Milliseconds : D3} ms ") ;
39+ sb . Append ( $ "{ Value . Milliseconds : D3} ms ") ;
4040 }
4141
4242 return sb . Remove ( sb . Length - 1 , 1 ) . ToString ( ) ;
You can’t perform that action at this time.
0 commit comments