public LocalBuilder AddLocal(IKType type) { if (il == null) il = builder.GetILGenerator(); return il.DeclareLocal(type); }
public SubItemSerializer(Type type, int key, ISerializerProxy proxy, bool recursionCheck) { if (type == null) throw new ArgumentNullException("type"); if (proxy == null) throw new ArgumentNullException("proxy"); this.type = type; this.proxy= proxy; this.key = key; this.recursionCheck = recursionCheck; }
void IProtoSerializer.Write(Type useType, object value, ProtoWriter dest) { if (recursionCheck) { ProtoWriter.WriteObject(value, key, dest); } else { ProtoWriter.WriteRecursionSafeObject(value, key, dest); } }
private Local(LocalBuilder value, Type type) { this.value = value; this.type = type; }
internal Local(Compiler.CompilerContext ctx, Type type) { this.ctx = ctx; if (ctx != null) { value = ctx.GetFromPool(type); } this.type = type; }
internal int GetTypeKey(ref Type type) { return model.GetKey(ref type); }
public static Instruction Create(OpCode opcode, IKType type) { Instruction i = new Instruction(); i.opCode = opcode; i.type = InstructionType.OpCode; i.operand = type; i.operandType = typeof(IKType); return i; }
public void Emit(OpCode opcode, IKType type) { Append(Instruction.Create(opcode, type)); }
internal int GetTypeKey(ref Type type) { return(model.GetKey(ref type)); }
public GuidSerializer(ProtoBuf.Meta.TypeModel model) { #if FEAT_IKVM expectedType = model.MapType(typeof(Guid)); #endif }
object IProtoSerializer.Read(Type useType, object value, ProtoReader source) { return ProtoReader.ReadObject(value, key, source); }
void IProtoTypeSerializer.Callback(Type useType, object value, TypeModel.CallbackType callbackType, SerializationContext context) { ((IProtoTypeSerializer)proxy.Serializer).Callback(useType, value, callbackType, context); }