public PropertyChangedCommand(IStatefulObject model, ValueChangedEventArgs e)
 {
     if (model.DataState == DataState.Initializing) return;
     snapshot = new Snapshot()
     {
         Model = model as StatefulObject,
         OldState = model.DataState,
         NewState = DataState.Modified,
         OldValue = e.OldValue,
         NewValue = e.NewValue,
         PropertyName = e.PropertyName
     };
 }
Exemple #2
0
 /// <summary>
 /// Indicates that this object is currently passing through the specific workflow
 /// </summary>
 /// <param name="self"></param>
 /// <param name="workflow"></param>
 /// <returns></returns>
 public static bool IsAliveInWorkflow <T>(this IStatefulObject self, IStatefulWorkflow <T> workflow)
     where T : class, IStatefulObject
 {
     return(self.GetStateId(workflow.WorkflowId) != null);
 }
Exemple #3
0
 /// <summary>
 /// Indicates that this object is currently passing through the specific workflow
 /// </summary>
 /// <param name="self"></param>
 /// <param name="workflowId"></param>
 /// <returns></returns>
 public static bool IsAliveInWorkflow(this IStatefulObject self, object workflowId)
 {
     return(self.GetStateId(workflowId) != null);
 }
 public ClassStateOne(IStatefulObject statefulObject)
 {
     _statefulObject = statefulObject;
 }
Exemple #5
0
 public ClassStateTwo(IStatefulObject stateful)
 {
     _statefulObject = stateful;
 }
Exemple #6
0
 public DefaultState(IStatefulObject statefulObject)
 {
     _statefulObject = statefulObject;
 }