public object Read(IReadContext context) { int classId = context.ReadInt(); long enumValue = context.ReadLong(); return ToEnum(context, classId, enumValue); }
public object Read(IReadContext context) { var classId = context.ReadInt(); var enumValue = context.ReadLong(); return(ToEnum(context, classId, enumValue)); }
// #end example // #example: Read the StringBuilder public object Read(IReadContext readContext) { int length = readContext.ReadInt(); byte[] data = new byte[length]; readContext.ReadBytes(data); return new StringBuilder(Encoding.UTF8.GetString(data)); }
// #end example // #example: Read the StringBuilder public object Read(IReadContext readContext) { int length = readContext.ReadInt(); byte[] data = new byte[length]; readContext.ReadBytes(data); return(new StringBuilder(Encoding.UTF8.GetString(data))); }
public override object Read(IReadContext context) { int i = context.ReadInt(); if (i == int.MaxValue) { return null; } return i; }
private static void ReadElements(IReadContext context, ICollectionInitializer initializer, ITypeHandler4 elementHandler) { int elementCount = context.ReadInt(); for (int i = 0; i < elementCount; i++) { initializer.Add(context.ReadObject(elementHandler)); } }
public override object Read(IReadContext context) { var i = context.ReadInt(); if (i == int.MaxValue) { return(null); } return(i); }
public virtual void Read(IReadContext context) { var id = context.ReadInt(); if (_bTree != null) { AssertCurrentBTreeId(id); return; } _transaction = context.Transaction(); _bTree = BTreeManager().ProduceBTree(id); }
private object ReadPlainObject(IReadContext context) { int id = context.ReadInt(); Transaction transaction = context.Transaction(); object obj = transaction.ObjectForIdFromCache(id); if (obj != null) { return obj; } obj = new object(); AddReference(context, obj, id); return obj; }
private object ReadPlainObject(IReadContext context) { var id = context.ReadInt(); var transaction = context.Transaction(); var obj = transaction.ObjectForIdFromCache(id); if (obj != null) { return(obj); } obj = new object(); AddReference(context, obj, id); return(obj); }
protected virtual object ReadKind(IReadContext context, DateTime dateTime) { var kind = (DateTimeKind)context.ReadInt(); return(DateTime.SpecifyKind(dateTime, kind)); }
public override object Read(IReadContext context) { return(context.ReadInt()); }
protected virtual object ReadKind(IReadContext context, DateTime dateTime) { DateTimeKind kind = (DateTimeKind) context.ReadInt(); return DateTime.SpecifyKind(dateTime, kind); }
public override object Read(IReadContext context) { return context.ReadInt(); }
public override object Read(IReadContext context) { return Sharpen.Runtime.IntBitsToFloat(context.ReadInt()); }
public override object Read(IReadContext context) { return(Sharpen.Runtime.IntBitsToFloat(context.ReadInt())); }