示例#1
0
 public void ClearChangesMask <U>(UpdateFieldArray <U> updateField) where U : new()
 {
     if (typeof(U).GetInterfaces().Any(x => typeof(IHasChangesMask) == x))
     {
         for (int i = 0; i < updateField.GetSize(); ++i)
         {
             ((IHasChangesMask)updateField[i]).ClearChangesMask();
         }
     }
 }
示例#2
0
 public void ClearChangesMask <U>(UpdateFieldArray <U> updateField) where U : new()
 {
     if (typeof(U).BaseType == typeof(IHasChangesMask))
     {
         for (int i = 0; i < updateField.GetSize(); ++i)
         {
             ((IHasChangesMask)updateField[i]).ClearChangesMask();
         }
     }
 }
示例#3
0
 public void ClearChangesMask <U>(UpdateFieldArray <U> updateField) where U : new()
 {
     if (typeof(IHasChangesMask).IsAssignableFrom(typeof(U)))
     {
         for (int i = 0; i < updateField.GetSize(); ++i)
         {
             ((IHasChangesMask)updateField[i]).ClearChangesMask();
         }
     }
 }
示例#4
0
 public void MarkChanged <U>(UpdateFieldArray <U> updateField, int index) where U : new()
 {
     _changesMask.Set(updateField.Bit);
     _changesMask.Set(updateField.FirstElementBit + index);
 }
示例#5
0
 public ref U ModifyValue <U>(UpdateFieldArray <U> updateField, int index) where U : new()
 {
     MarkChanged(updateField, index);
     return(ref updateField._values[index]);
 }
示例#6
0
 public ref U ModifyValue <U>(UpdateFieldArray <U> updateField, int index) where U : new()
 {
     _changesMask.Set(updateField.Bit);
     _changesMask.Set(updateField.FirstElementBit + index);
     return(ref updateField._values[index]);
 }