Example #1
0
 protected override ILStatement GenerateReadInternal(ILValue prop, ILValue liaison, ILValue buffer)
 {
     return(new ILAssign(
                liaison.GetILField(target_field),
                ILSerialize.GenerateObjectRead(prop.GetValueType(), buffer)
                ));
 }
Example #2
0
 static public ILMethodInvokation GenerateInvokeRead(MethodInfo to_invoke, ILValue caller, ILValue buffer)
 {
     return(new ILMethodInvokation(
                caller,
                to_invoke,
                to_invoke.GetEffectiveParameterTypes().Convert(p => ILSerialize.GenerateObjectRead(p, buffer))
                ));
 }
Example #3
0
            protected object[] ReadArguments(Buffer buffer)
            {
                if (argument_reader == null)
                {
                    argument_reader = method.DeclaringType.CreateDynamicMethodDelegate <ArgumentReader>(delegate(ILValue il_buffer) {
                        return(new ILReturn(
                                   new ILNewPopulatedArray(
                                       typeof(object),
                                       method.GetEffectiveParameterTypes().Convert(t => ILSerialize.GenerateObjectRead(t, il_buffer))
                                       )
                                   ));
                    });
                }

                return(argument_reader(buffer));
            }