Esempio n. 1
0
 /// <summary>
 /// Cancels an edit.
 /// </summary>
 public void CancelEdit()
 {
     if (this.oldDataClass != null)
     {
         this.BoolProperty     = this.oldDataClass.boolProperty;
         this.DateTimeProperty = this.oldDataClass.dateTimeProperty;
         this.EnumProperty     = this.oldDataClass.enumProperty;
         this.IntProperty      = this.oldDataClass.intProperty;
         this.IntPropertyWithoutAutoGenerateField = this.oldDataClass.intPropertyWithoutAutoGenerateField;
         this.NonGeneratedIntProperty             = this.oldDataClass.nonGeneratedIntProperty;
         this.StringProperty = this.oldDataClass.stringProperty;
         this.oldDataClass   = null;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Begins an edit.
 /// </summary>
 public void BeginEdit()
 {
     if (this.oldDataClass == null)
     {
         this.oldDataClass = new DataClassWithEnum();
         this.oldDataClass.boolProperty     = this.boolProperty;
         this.oldDataClass.dateTimeProperty = this.dateTimeProperty;
         this.oldDataClass.enumProperty     = this.enumProperty;
         this.oldDataClass.intProperty      = this.intProperty;
         this.oldDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.oldDataClass.nonGeneratedIntProperty             = this.nonGeneratedIntProperty;
         this.oldDataClass.stringProperty = this.stringProperty;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes the unchanged data class used in IRevertableChangeTracking.
 /// </summary>
 private void EnsureUnchangedDataClass()
 {
     if (this.unchangedDataClass == null)
     {
         this.unchangedDataClass = new DataClassWithEnum();
         this.unchangedDataClass.boolProperty     = this.boolProperty;
         this.unchangedDataClass.dateTimeProperty = this.dateTimeProperty;
         this.unchangedDataClass.enumProperty     = this.enumProperty;
         this.unchangedDataClass.intProperty      = this.intProperty;
         this.unchangedDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.unchangedDataClass.nonGeneratedIntProperty             = this.nonGeneratedIntProperty;
         this.unchangedDataClass.stringProperty = this.stringProperty;
     }
 }
 /// <summary>
 /// Ends an edit.
 /// </summary>
 public void EndEdit()
 {
     this.oldDataClass = null;
 }
 /// <summary>
 /// Cancels an edit.
 /// </summary>
 public void CancelEdit()
 {
     if (this.oldDataClass != null)
     {
         this.BoolProperty = this.oldDataClass.boolProperty;
         this.DateTimeProperty = this.oldDataClass.dateTimeProperty;
         this.EnumProperty = this.oldDataClass.enumProperty;
         this.IntProperty = this.oldDataClass.intProperty;
         this.IntPropertyWithoutAutoGenerateField = this.oldDataClass.intPropertyWithoutAutoGenerateField;
         this.NonGeneratedIntProperty = this.oldDataClass.nonGeneratedIntProperty;
         this.StringProperty = this.oldDataClass.stringProperty;
         this.oldDataClass = null;
     }
 }
 /// <summary>
 /// Begins an edit.
 /// </summary>
 public void BeginEdit()
 {
     if (this.oldDataClass == null)
     {
         this.oldDataClass = new DataClassWithEnum();
         this.oldDataClass.boolProperty = this.boolProperty;
         this.oldDataClass.dateTimeProperty = this.dateTimeProperty;
         this.oldDataClass.enumProperty = this.enumProperty;
         this.oldDataClass.intProperty = this.intProperty;
         this.oldDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.oldDataClass.nonGeneratedIntProperty = this.nonGeneratedIntProperty;
         this.oldDataClass.stringProperty = this.stringProperty;
     }
 }
 /// <summary>
 /// Initializes the unchanged data class used in IRevertableChangeTracking.
 /// </summary>
 private void EnsureUnchangedDataClass()
 {
     if (this.unchangedDataClass == null)
     {
         this.unchangedDataClass = new DataClassWithEnum();
         this.unchangedDataClass.boolProperty = this.boolProperty;
         this.unchangedDataClass.dateTimeProperty = this.dateTimeProperty;
         this.unchangedDataClass.enumProperty = this.enumProperty;
         this.unchangedDataClass.intProperty = this.intProperty;
         this.unchangedDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.unchangedDataClass.nonGeneratedIntProperty = this.nonGeneratedIntProperty;
         this.unchangedDataClass.stringProperty = this.stringProperty;
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Ends an edit.
 /// </summary>
 public void EndEdit()
 {
     this.oldDataClass = null;
 }