public static EArray CreateArrayFromRuntimeArray <T>(params T[] loadElements) { Type type = typeof(T); EArray instance = CreateArraySpecifiedLength <T>(loadElements.Length); for (int i = 0; i < loadElements.Length; i += 1) { instance.StoreArray(i, loadElements[i]); } return(instance); }
public static EArray CreateArraySpecifiedLength(Type aType, int length) { EArray model = new EArray(aType); model.Length = length; if (length != -1) { model.il.REmit(OpCodes.Ldc_I4, length); model.il.REmit(OpCodes.Newarr, model.ElementType); model.il.REmit(OpCodes.Stloc, model.Builder); } return(model); }
public static EArray CreateArrayFromAction(Action loadAction, Type type) { EArray instance = new EArray(loadAction, type); return(instance); }
public static EArray CreateArray(Type type) { EArray instance = new EArray(type); return(instance); }
public static EArray CreateArrayFromParameter(int parameterIndex, Type type) { EArray instance = new EArray(parameterIndex, type); return(instance); }
public static EArray CreateArrayFromBuilder(LocalBuilder builder, Type type) { EArray instance = new EArray(builder, type); return(instance); }