private object ReadField(BigEndianReader reader, D2OFieldDefinition field, D2OFieldType typeId, int vectorDimension = 0) { switch (typeId) { case D2OFieldType.Int: return(ReadFieldInt(reader)); case D2OFieldType.Bool: return(ReadFieldBool(reader)); case D2OFieldType.String: return(ReadFieldUTF(reader)); case D2OFieldType.Double: return(ReadFieldDouble(reader)); case D2OFieldType.I18N: return(ReadFieldI18n(reader)); case D2OFieldType.UInt: return(ReadFieldUInt(reader)); case D2OFieldType.List: return(ReadFieldVector(reader, field, vectorDimension)); default: return(ReadFieldObject(reader)); } }
public D2OSearchEntry(string fieldName, int fieldIndex, D2OFieldType fieldType, int fieldCount) { FieldName = fieldName; FieldIndex = fieldIndex; FieldType = fieldType; FieldCount = fieldCount; }
private object ReadField(IDataReader reader, D2OFieldType typeId) { switch (typeId) { case D2OFieldType.Int: return(ReadFieldInt(reader)); case D2OFieldType.Bool: return(ReadFieldBool(reader)); case D2OFieldType.String: return(ReadFieldUTF(reader)); case D2OFieldType.Double: return(ReadFieldDouble(reader)); case D2OFieldType.I18N: return(ReadFieldI18n(reader)); case D2OFieldType.UInt: return(ReadFieldUInt(reader)); default: return(ReadFieldObject(reader)); } }
public D2OFieldDefinition(string name, D2OFieldType typeId, FieldInfo fieldInfo, long offset, params Tuple<D2OFieldType, string>[] vectorsTypes) { Name = name; TypeId = typeId; FieldInfo = fieldInfo; Offset = offset; VectorTypes = vectorsTypes; }
public D2OFieldDefinition(string name, D2OFieldType typeId, PropertyInfo propertyInfo, long offset, params Tuple <D2OFieldType, Type>[] vectorsTypes) { Name = name; TypeId = typeId; PropertyInfo = propertyInfo; Offset = offset; VectorTypes = vectorsTypes; }
public D2OFieldDefinition(string name, D2OFieldType typeId, FieldInfo fieldInfo, long offset, params Tuple <D2OFieldType, string>[] vectorsTypes) { Name = name; TypeId = typeId; FieldInfo = fieldInfo; Offset = offset; VectorTypes = vectorsTypes; }
private void WriteField(IDataWriter writer, D2OFieldType fieldType, D2OFieldDefinition field, dynamic obj, int vectorDimension = 0) { switch (fieldType) { case D2OFieldType.Int: WriteFieldInt(writer, (int)obj); break; case D2OFieldType.Bool: WriteFieldBool(writer, obj); break; case D2OFieldType.String: WriteFieldUTF(writer, obj); break; case D2OFieldType.Double: WriteFieldDouble(writer, obj); break; case D2OFieldType.I18N: WriteFieldI18n(writer, (int)obj); break; case D2OFieldType.UInt: WriteFieldUInt(writer, (uint)obj); break; case D2OFieldType.List: WriteFieldVector(writer, field, obj, vectorDimension); break; default: WriteFieldObject(writer, obj); break; } }