Exemplo n.º 1
0
 /// <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(IEnumValueInfo).IsInstanceOfType(source))
     {
         IEnumValueInfo typedSource = ((IEnumValueInfo)(source));
         this.Symbol = typedSource.Symbol;
         this.Value  = typedSource.Value;
     }
     return(this);
 }
Exemplo n.º 2
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(IEnumClassDescriptorInfo).IsInstanceOfType(source))
     {
         IEnumClassDescriptorInfo typedSource = ((IEnumClassDescriptorInfo)(source));
         if ((typedSource.Values != null))
         {
             this.Values = new List <IEnumValueInterface>(typedSource.Values.Count);
             int i;
             for (i = 0; (i < typedSource.Values.Count); i = (i + 1))
             {
                 IEnumValueInfo item = typedSource.Values[i];
                 if ((item == null))
                 {
                     this.Values.Add(null);
                 }
                 else
                 {
                     this.Values.Add(((IEnumValueInterface)(item.Clone())));
                 }
             }
         }
         else
         {
             this.Values = null;
         }
         if ((typedSource.HasIsBitmask() == true))
         {
             this.IsBitmask = typedSource.IsBitmask;
         }
         else
         {
             this.NullifyIsBitmask();
         }
     }
     return(this);
 }