ReadString() public method

public ReadString ( ) : string
return string
Beispiel #1
0
 internal static TableFieldInfo Load(AbstractBufferedReader reader, IFieldHandlerFactory fieldHandlerFactory, string tableName)
 {
     var name = reader.ReadString();
     var handlerName = reader.ReadString();
     var configuration = reader.ReadByteArray();
     var fieldHandler = fieldHandlerFactory.CreateFromName(handlerName, configuration, FieldHandlerOptions.None);
     if (fieldHandler == null) throw new BTDBException(string.Format("FieldHandlerFactory did not created handler {0} in {1}.{2}", handlerName, tableName, name));
     return new TableFieldInfo(name, fieldHandler);
 }
Beispiel #2
0
 public ObjectTypeDescriptor(ITypeDescriptorCallbacks typeSerializers, AbstractBufferedReader reader, Func<AbstractBufferedReader, ITypeDescriptor> nestedDescriptorReader)
 {
     _typeSerializers = typeSerializers;
     Sealed = false;
     _name = reader.ReadString();
     var fieldCount = reader.ReadVUInt32();
     while (fieldCount-- > 0)
     {
         _fields.Add(new KeyValuePair<string, ITypeDescriptor>(reader.ReadString(), nestedDescriptorReader(reader)));
     }
 }
Beispiel #3
0
 internal static TableFieldInfo Load(AbstractBufferedReader reader, IFieldHandlerFactory fieldHandlerFactory,
     string tableName, FieldHandlerOptions handlerOptions)
 {
     var name = reader.ReadString();
     var handlerName = reader.ReadString();
     var configuration = reader.ReadByteArray();
     var fieldHandler = fieldHandlerFactory.CreateFromName(handlerName, configuration, handlerOptions);
     if (fieldHandler == null) throw new BTDBException(
         $"FieldHandlerFactory did not created handler {handlerName} in {tableName}.{name}");
     return new TableFieldInfo(name, fieldHandler);
 }
Beispiel #4
0
 public EnumTypeDescriptor(ITypeDescriptorCallbacks typeSerializers, AbstractBufferedReader reader)
 {
     _typeSerializers = typeSerializers;
     _name = reader.ReadString();
     var header = reader.ReadVUInt32();
     _signed = (header & 1) != 0;
     _flags = (header & 2) != 0;
     var count = header >> 2;
     _pairs = new List<KeyValuePair<string, ulong>>((int)count);
     for (int i = 0; i < count; i++)
     {
         _pairs.Add(_signed
                        ? new KeyValuePair<string, ulong>(reader.ReadString(), (ulong)reader.ReadVInt64())
                        : new KeyValuePair<string, ulong>(reader.ReadString(), reader.ReadVUInt64()));
     }
 }
Beispiel #5
0
 public MethodInf(AbstractBufferedReader reader, IFieldHandlerFactory fieldHandlerFactory)
 {
     _name = reader.ReadString();
     _ifaceName = reader.ReadString();
     var resultFieldHandlerName = reader.ReadString();
     if (resultFieldHandlerName != null)
     {
         _resultFieldHandler = fieldHandlerFactory.CreateFromName(resultFieldHandlerName, reader.ReadByteArray(), FieldHandlerOptions.None);
     }
     var parameterCount = reader.ReadVUInt32();
     _parameters = new ParameterInf[parameterCount];
     for (int i = 0; i < _parameters.Length; i++)
     {
         _parameters[i] = new ParameterInf(reader, fieldHandlerFactory);
     }
 }
Beispiel #6
0
 public TypeInf(AbstractBufferedReader reader, IFieldHandlerFactory fieldHandlerFactory)
 {
     _type = null;
     _name = reader.ReadString();
     var methodCount = reader.ReadVUInt32();
     _methodInfs = new MethodInf[methodCount];
     for (int i = 0; i < methodCount; i++)
     {
         _methodInfs[i] = new MethodInf(reader, fieldHandlerFactory);
     }
     var properyCount = reader.ReadVUInt32();
     _propertyInfs = new PropertyInf[properyCount];
     for (int i = 0; i < properyCount; i++)
     {
         PropertyInfs[i] = new PropertyInf(reader, fieldHandlerFactory);
     }
 }
Beispiel #7
0
 public ParameterInf(AbstractBufferedReader reader, IFieldHandlerFactory fieldHandlerFactory)
 {
     _name = reader.ReadString();
     var handlerName = reader.ReadString();
     _fieldHandler = fieldHandlerFactory.CreateFromName(handlerName, reader.ReadByteArray(), FieldHandlerOptions.None);
 }