Exemple #1
0
        public unsafe static TRet MakeTypedReference <TRet>(object target, TypedRefFunc <TRet> func, params FieldInfo[] fields)
        {
            TypedReference tr;

            MakeTypedReference(&tr, target, fields);
            return(func(tr));
        }
Exemple #2
0
 public static TRet GetTypedReference <T, TRet>(ref T reference, TypedRefFunc <TRet> func)
 {
     return(func(__makeref(reference)));
 }
Exemple #3
0
        public static unsafe TRet ArrayAddress <TArray, TRet>(TArray arr, int[] indices, TypedRefFunc <TRet> func) where TArray : TArrayBase
        {
            TypedReference tr;

            ArrayAddress <TArray>(arr, &tr, indices);
            return(func(tr));
        }