Rename variable default value to value
This commit is contained in:
parent
71b7271017
commit
8f581efd39
|
|
@ -26,7 +26,7 @@ public class ParallelForEach<T> : Activity
|
|||
// For each item, declare a new block of memory to store the item into.
|
||||
var localVariable = new Variable<T>()
|
||||
{
|
||||
DefaultValue = item
|
||||
Value = item
|
||||
};
|
||||
|
||||
if (CurrentValue != null)
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@ public class Variable : MemoryReference
|
|||
Name = name;
|
||||
}
|
||||
|
||||
public Variable(string name, object? defaultValue = default) : this(name)
|
||||
public Variable(string name, object? value = default) : this(name)
|
||||
{
|
||||
DefaultValue = defaultValue;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public string? Name { get; set; }
|
||||
public object? DefaultValue { get; set; }
|
||||
public override MemoryBlock Declare() => new(DefaultValue);
|
||||
public object? Value { get; set; }
|
||||
public override MemoryBlock Declare() => new(Value);
|
||||
}
|
||||
|
||||
public class Variable<T> : Variable
|
||||
|
|
@ -42,7 +42,7 @@ public class Variable<T> : Variable
|
|||
|
||||
public Variable(T value)
|
||||
{
|
||||
DefaultValue = value;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public T? Get(ActivityExecutionContext context) => Get(context.ExpressionExecutionContext).ConvertTo<T?>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue