/// <summary> /// Reset all instance field to their default states. /// <returns>this.</returns> /// </summary> protected virtual IRecordInterface ResetImpl() { this._previousState = null; this._newState = null; this._changeTypes = ((SchemaFieldChangeType)(TypeConstants.EnumNull)); this._dataTransformation = null; return(this); }
/// <summary> /// Deep copies content from src instance to this. /// <param name="source">Source for copy.</param> /// <returns>this.</returns> /// </summary> protected virtual IRecordInterface CopyFromImpl(IRecordInfo source) { if (typeof(ISchemaFieldChangeActionInfo).IsInstanceOfType(source)) { ISchemaFieldChangeActionInfo typedSource = ((ISchemaFieldChangeActionInfo)(source)); if ((typedSource.PreviousState != null)) { if (((this.PreviousState == null) || (this.PreviousState.GetType() == typedSource.PreviousState.GetType()))) { this.PreviousState = ((DataField)(typedSource.PreviousState.Clone())); } else { this.PreviousState.CopyFrom(typedSource.PreviousState); } } else { this.PreviousState = null; } if ((typedSource.NewState != null)) { if (((this.NewState == null) || (this.NewState.GetType() == typedSource.NewState.GetType()))) { this.NewState = ((DataField)(typedSource.NewState.Clone())); } else { this.NewState.CopyFrom(typedSource.NewState); } } else { this.NewState = null; } this.ChangeTypes = typedSource.ChangeTypes; if ((typedSource.DataTransformation != null)) { if (((this.DataTransformation == null) || (this.DataTransformation.GetType() == typedSource.DataTransformation.GetType()))) { this.DataTransformation = ((SchemaFieldDataTransformation)(typedSource.DataTransformation.Clone())); } else { this.DataTransformation.CopyFrom(typedSource.DataTransformation); } } else { this.DataTransformation = null; } } return(this); }
/// <summary> /// Sets null to DataTransformation property. /// </summary> public void NullifyDataTransformation() { this._dataTransformation = null; }