Skip to content

Commit

Permalink
pulled enum out that had restricted access via generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
rscoopers committed Aug 6, 2021
1 parent 4ddc3d4 commit c626ad1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
26 changes: 26 additions & 0 deletions NodeNetworkToolkit/ValueNode/ValidationAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace NodeNetwork.Toolkit.ValueNode
{

/// <summary>
/// Action that should be taken based on the validation result
/// </summary>
public enum ValidationAction
{
/// <summary>
/// Don't run the validation. (LatestValidation is not updated)
/// </summary>
DontValidate,
/// <summary>
/// Run the validation, but ignore the result and assume the network is valid.
/// </summary>
IgnoreValidation,
/// <summary>
/// Run the validation and if the network is invalid then wait until it is valid.
/// </summary>
WaitForValid,
/// <summary>
/// Run the validation and if the network is invalid then make default(T) the current value.
/// </summary>
PushDefaultValue
}
}
23 changes: 0 additions & 23 deletions NodeNetworkToolkit/ValueNode/ValueNodeInputViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,6 @@ static ValueNodeInputViewModel()
public IObservable<T> ValueChanged { get; }
#endregion

/// <summary>
/// Action that should be taken based on the validation result
/// </summary>
public enum ValidationAction
{
/// <summary>
/// Don't run the validation. (LatestValidation is not updated)
/// </summary>
DontValidate,
/// <summary>
/// Run the validation, but ignore the result and assume the network is valid.
/// </summary>
IgnoreValidation,
/// <summary>
/// Run the validation and if the network is invalid then wait until it is valid.
/// </summary>
WaitForValid,
/// <summary>
/// Run the validation and if the network is invalid then make default(T) the current value.
/// </summary>
PushDefaultValue
}

/// <summary>
/// Constructs a new ValueNodeInputViewModel with the specified ValidationActions.
/// The default values are carefully chosen and should probably not be changed unless you know what you are doing.
Expand Down

0 comments on commit c626ad1

Please sign in to comment.