Example #1
0
 public static void UpdatePropertyProxyArray <T, TProxy>(this T[] collection, PropertyProxyArray <TProxy> proxyArray, uint elementCount)
     where T : ICodegenType
     where TProxy : ICodegenProxy, new()
 {
     for (int i = 0; i < (int)elementCount; i++)
     {
         collection[i].Update(proxyArray[i]);
     }
 }
Example #2
0
        public static bool VerifyVariableData <T>(this PropertyProxyArray <T> array, uint elementCount, ulong objectOffset, ulong totalDataSize, ref ulong expectedDataOffset)
            where T : ICodegenProxy, new()
        {
            ulong codegenTypeSize = default(T).CodegenTypeSize();

            for (uint i = 0; i < elementCount; i++)
            {
                if (!((ICodegenProxy)array[(int)i]).VerifyVariableData(objectOffset + (i * codegenTypeSize), totalDataSize, ref expectedDataOffset))
                {
                    return(false);
                }
            }

            return(true);
        }
Example #3
0
 /// <inheritdoc />
 public bool Equals(PropertyProxyArray <T> other) =>
 buffer == other.buffer &&
 typeSize == other.typeSize;