示例#1
0
 /// <summary>
 /// Deep copies content from src instance to this.
 /// <param name="source">Source for copy.</param>
 /// <returns>this.</returns>
 /// </summary>
 protected override IRecordInterface CopyFromImpl(IRecordInfo source)
 {
     base.CopyFromImpl(source);
     if (typeof(IEnumDataTypeInfo).IsInstanceOfType(source))
     {
         IEnumDataTypeInfo typedSource = ((IEnumDataTypeInfo)(source));
         if ((typedSource.TypeDescriptor != null))
         {
             if (((this.TypeDescriptor == null) ||
                  (this.TypeDescriptor.GetType() == typedSource.TypeDescriptor.GetType())))
             {
                 this.TypeDescriptor = ((ClassDescriptorRef)(typedSource.TypeDescriptor.Clone()));
             }
             else
             {
                 this.TypeDescriptor.CopyFrom(typedSource.TypeDescriptor);
             }
         }
         else
         {
             this.TypeDescriptor = null;
         }
     }
     return(this);
 }
示例#2
0
 /// <summary>
 /// Sets null to TypeDescriptor property.
 /// </summary>
 public void NullifyTypeDescriptor()
 {
     this._typeDescriptor = null;
 }
示例#3
0
 /// <summary>
 /// Reset all instance field to their default states.
 /// <returns>this.</returns>
 /// </summary>
 protected override IRecordInterface ResetImpl()
 {
     base.ResetImpl();
     this._typeDescriptor = null;
     return(this);
 }