コード例 #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.intProperty      = this.oldDataClass.intProperty;
         this.intPropertyWithoutAutoGenerateField = this.oldDataClass.intPropertyWithoutAutoGenerateField;
         this.nonGeneratedIntProperty             = this.oldDataClass.nonGeneratedIntProperty;
         this.stringProperty = this.oldDataClass.stringProperty;
         this.oldDataClass   = null;
     }
 }
コード例 #2
0
 /// <summary>
 /// Begins an edit.
 /// </summary>
 public void BeginEdit()
 {
     if (this.oldDataClass == null)
     {
         this.oldDataClass = new DataClassWithOrder();
         this.oldDataClass.boolProperty     = this.boolProperty;
         this.oldDataClass.dateTimeProperty = this.dateTimeProperty;
         this.oldDataClass.intProperty      = this.intProperty;
         this.oldDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.oldDataClass.nonGeneratedIntProperty             = this.nonGeneratedIntProperty;
         this.oldDataClass.stringProperty = this.stringProperty;
     }
 }
コード例 #3
0
 /// <summary>
 /// Initializes the unchanged data class used in IRevertableChangeTracking.
 /// </summary>
 private void EnsureUnchangedDataClass()
 {
     if (this.unchangedDataClass == null)
     {
         this.unchangedDataClass = new DataClassWithOrder();
         this.unchangedDataClass.boolProperty     = this.boolProperty;
         this.unchangedDataClass.dateTimeProperty = this.dateTimeProperty;
         this.unchangedDataClass.intProperty      = this.intProperty;
         this.unchangedDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.unchangedDataClass.nonGeneratedIntProperty             = this.nonGeneratedIntProperty;
         this.unchangedDataClass.stringProperty = this.stringProperty;
     }
 }
コード例 #4
0
 /// <summary>
 /// Ends an edit.
 /// </summary>
 public void EndEdit()
 {
     this.oldDataClass = null;
 }
コード例 #5
0
 /// <summary>
 /// Cancels an edit.
 /// </summary>
 public void CancelEdit()
 {
     if (this.oldDataClass != null)
     {
         this.boolProperty = this.oldDataClass.boolProperty;
         this.dateTimeProperty = this.oldDataClass.dateTimeProperty;
         this.intProperty = this.oldDataClass.intProperty;
         this.intPropertyWithoutAutoGenerateField = this.oldDataClass.intPropertyWithoutAutoGenerateField;
         this.nonGeneratedIntProperty = this.oldDataClass.nonGeneratedIntProperty;
         this.stringProperty = this.oldDataClass.stringProperty;
         this.oldDataClass = null;
     }
 }
コード例 #6
0
 /// <summary>
 /// Begins an edit.
 /// </summary>
 public void BeginEdit()
 {
     if (this.oldDataClass == null)
     {
         this.oldDataClass = new DataClassWithOrder();
         this.oldDataClass.boolProperty = this.boolProperty;
         this.oldDataClass.dateTimeProperty = this.dateTimeProperty;
         this.oldDataClass.intProperty = this.intProperty;
         this.oldDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.oldDataClass.nonGeneratedIntProperty = this.nonGeneratedIntProperty;
         this.oldDataClass.stringProperty = this.stringProperty;
     }
 }
コード例 #7
0
 /// <summary>
 /// Initializes the unchanged data class used in IRevertableChangeTracking.
 /// </summary>
 private void EnsureUnchangedDataClass()
 {
     if (this.unchangedDataClass == null)
     {
         this.unchangedDataClass = new DataClassWithOrder();
         this.unchangedDataClass.boolProperty = this.boolProperty;
         this.unchangedDataClass.dateTimeProperty = this.dateTimeProperty;
         this.unchangedDataClass.intProperty = this.intProperty;
         this.unchangedDataClass.intPropertyWithoutAutoGenerateField = this.intPropertyWithoutAutoGenerateField;
         this.unchangedDataClass.nonGeneratedIntProperty = this.nonGeneratedIntProperty;
         this.unchangedDataClass.stringProperty = this.stringProperty;
     }
 }
コード例 #8
0
 /// <summary>
 /// Ends an edit.
 /// </summary>
 public void EndEdit()
 {
     this.oldDataClass = null;
 }