コード例 #1
0
        /// <exception cref="System.IO.IOException"></exception>
        public override Guid Read(IObjectDataInput input)
        {
            var order = default(JavaUuidOrder);

            order.X0 = input.ReadByte();
            order.X1 = input.ReadByte();
            order.X2 = input.ReadByte();
            order.X3 = input.ReadByte();

            order.X4 = input.ReadByte();
            order.X5 = input.ReadByte();
            order.X6 = input.ReadByte();
            order.X7 = input.ReadByte();

            order.X8 = input.ReadByte();
            order.X9 = input.ReadByte();
            order.XA = input.ReadByte();
            order.XB = input.ReadByte();

            order.XC = input.ReadByte();
            order.XD = input.ReadByte();
            order.XE = input.ReadByte();
            order.XF = input.ReadByte();

            return(order.Value);
        }
コード例 #2
0
 public void ReadData(IObjectDataInput input)
 {
     Bool         = input.ReadBool();
     BoolArray    = input.ReadBoolArray();
     Byte         = input.ReadByte();
     ByteArray    = input.ReadByteArray();
     Char         = input.ReadChar();
     CharArray    = input.ReadCharArray();
     Short        = input.ReadShort();
     ShortArray   = input.ReadShortArray();
     Int          = input.ReadInt();
     IntArray     = input.ReadIntArray();
     Long         = input.ReadLong();
     LongArray    = input.ReadLongArray();
     Float        = input.ReadFloat();
     FloatArray   = input.ReadFloatArray();
     Double       = input.ReadDouble();
     DoubleArray  = input.ReadDoubleArray();
     Serializable = input.ReadObject <IIdentifiedDataSerializable>();
     //input.ReadObject(SerializableArray);
     //Portable = input.ReadObject<IPortable>();
     //input.ReadObject(PortableArray);
     Chars       = new string(input.ReadCharArray());
     String      = input.ReadString();
     StringArray = input.ReadStringArray();
     DateTime    = input.ReadObject <DateTime>();
 }
コード例 #3
0
            public override BigInteger Read(IObjectDataInput input)
            {
                var bytes = input.ReadByteArray();

                Array.Reverse(bytes);
                return(new BigInteger(bytes));
            }
コード例 #4
0
 public T ReadObject <T>(IObjectDataInput input)
 {
     try
     {
         var typeId     = input.ReadInt();
         var serializer = SerializerFor(typeId);
         if (serializer == null)
         {
             if (_isActive)
             {
                 throw new HazelcastSerializationException("There is no suitable de-serializer for type "
                                                           + typeId);
             }
             throw new HazelcastClientNotActiveException();
         }
         var obj = serializer.Read(input);
         try
         {
             return((T)obj);
         }
         catch (NullReferenceException)
         {
             throw new HazelcastSerializationException("Trying to cast null value to value type " +
                                                       typeof(T));
         }
     }
     catch (Exception e)
     {
         throw HandleException(e);
     }
 }
コード例 #5
0
 public void ReadData(IObjectDataInput input)
 {
     if (input == null)
     {
         throw new ArgumentNullException(nameof(input));
     }
 }
コード例 #6
0
 public User Read(IObjectDataInput input)
 {
     return(new User
     {
         Name = input.ReadUTF()
     });
 }
コード例 #7
0
        public override Dictionary <object, object> Read(IObjectDataInput input)
        {
            var size = input.ReadInt();
            var dict = new Dictionary <object, object>(size);

            return(DeserializeEntries(input, size, dict));
        }
コード例 #8
0
        public override ConcurrentDictionary <object, object> Read(IObjectDataInput input)
        {
            var size = input.ReadInt();
            var dict = new ConcurrentDictionary <object, object>(DefaultConcurrencyLevel, size);

            return(DeserializeEntries(input, size, dict));
        }
コード例 #9
0
 public T ReadObject <T>(IObjectDataInput input)
 {
     try
     {
         var isNull = input.ReadBoolean();
         if (isNull)
         {
             return(default(T));
         }
         var typeId     = input.ReadInt();
         var serializer = SerializerFor(typeId);
         if (serializer == null)
         {
             if (active)
             {
                 throw new HazelcastSerializationException("There is no suitable de-serializer for type "
                                                           + typeId);
             }
             throw new HazelcastInstanceNotActiveException();
         }
         var obj = serializer.Read(input);
         if (managedContext != null)
         {
             obj = managedContext.Initialize(obj);
         }
         return((T)obj);
     }
     catch (Exception e)
     {
         throw HandleException(e);
     }
 }
コード例 #10
0
        public void ReadData(IObjectDataInput input)
        {
            Bool         = input.ReadBoolean();
            BoolArray    = input.ReadBooleanArray();
            Byte         = input.ReadByte();
            ByteArray    = input.ReadByteArray();
            Char         = input.ReadChar();
            CharArray    = input.ReadCharArray();
            Short        = input.ReadShort();
            ShortArray   = input.ReadShortArray();
            Int          = input.ReadInt();
            IntArray     = input.ReadIntArray();
            Long         = input.ReadLong();
            LongArray    = input.ReadLongArray();
            Float        = input.ReadFloat();
            FloatArray   = input.ReadFloatArray();
            Double       = input.ReadDouble();
            DoubleArray  = input.ReadDoubleArray();
            Serializable = input.ReadObject <IIdentifiedDataSerializable>();
            //input.ReadObject(SerializableArray);
            //Portable = input.ReadObject<IPortable>();
            //input.ReadObject(PortableArray);
            var charLength = input.ReadInt();
            var chars      = new char[charLength];

            for (var i = 0; i < charLength; i++)
            {
                chars[i] = input.ReadChar();
            }
            Chars       = new string(chars);
            String      = input.ReadUTF();
            StringArray = input.ReadUTFArray();
            DateTime    = input.ReadObject <DateTime>();
        }
コード例 #11
0
 public void ReadData(IObjectDataInput input)
 {
     attributePath = input.ReadUTF();
     //member side field not used on client
     input.ReadDouble();
     input.ReadLong();
 }
コード例 #12
0
        public void ReadData(IObjectDataInput input)
        {
            var len = input.ReadInt();

            data = new byte[len];
            input.ReadFully(data);
        }
        public override HashSet <object> Read(IObjectDataInput input)
        {
            var size = input.ReadInt();
            var set  = new HashSet <object>();

            return(DeserializeEntries(input, size, set));
        }
コード例 #14
0
            /// <exception cref="System.IO.IOException"></exception>
            public override Guid Read(IObjectDataInput input)
            {
                var order = default(FixedSizeTypesCodec.JavaUUIDOrder);

                order.B00 = input.ReadByte();
                order.B01 = input.ReadByte();
                order.B02 = input.ReadByte();
                order.B03 = input.ReadByte();

                order.B04 = input.ReadByte();
                order.B05 = input.ReadByte();
                order.B06 = input.ReadByte();
                order.B07 = input.ReadByte();

                order.B08 = input.ReadByte();
                order.B09 = input.ReadByte();
                order.B10 = input.ReadByte();
                order.B11 = input.ReadByte();

                order.B12 = input.ReadByte();
                order.B13 = input.ReadByte();
                order.B14 = input.ReadByte();
                order.B15 = input.ReadByte();

                return(order.Value);
            }
コード例 #15
0
 public void ReadData(IObjectDataInput input)
 {
     _attributeName = input.ReadUTF();
     _value         = input.ReadObject <object>();
     _equal         = input.ReadBoolean();
     _less          = input.ReadBoolean();
 }
        public void ReadData(IObjectDataInput input)
        {
            var len = input.ReadInt();

            _data = new byte[len];
            input.ReadBytes(_data);
        }
コード例 #17
0
        public override object Read(IObjectDataInput input)
        {
            var formatter = new BinaryFormatter();

            using var stream = new MemoryStream(input.ReadByteArray());
            return(formatter.Deserialize(stream));
        }
コード例 #18
0
 /// <exception cref="System.IO.IOException" />
 public virtual void ReadData(IObjectDataInput @in)
 {
     name    = @in.ReadString();
     address = @in.ReadObject <Address>();
     age     = @in.ReadInt();
     height  = @in.ReadLong();
     weight  = @in.ReadDouble();
 }
コード例 #19
0
 /// <inheritdoc />
 public void ReadData(IObjectDataInput input)
 {
     if (input == null)
     {
         throw new ArgumentNullException(nameof(input));
     }
     AttributePath = input.ReadString();
 }
 protected static CollectionType DeserializeEntries(IObjectDataInput input, int size, CollectionType collection)
 {
     for (var i = 0; i < size; i++)
     {
         collection.Add(input.ReadObject <object>());
     }
     return(collection);
 }
 protected static DType DeserializeEntries(IObjectDataInput input, int size, DType result)
 {
     for (int i = 0; i < size; i++)
     {
         result.Add(input.ReadObject <object>(), input.ReadObject <object>());
     }
     return(result);
 }
コード例 #22
0
        public void ReadData(IObjectDataInput input)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            _predicate = input.ReadObject <IPredicate>();
        }
コード例 #23
0
 public void ReadData(IObjectDataInput input)
 {
     if (input == null)
     {
         throw new ArgumentNullException(nameof(input));
     }
     PartitionKey = input.ReadObject <object>();
     Target       = input.ReadObject <IPredicate>();
 }
コード例 #24
0
 /// <exception cref="System.IO.IOException"></exception>
 public virtual object Read(IObjectDataInput @in)
 {
     byte[] bytes = @in.ReadByteArray();
     if (bytes == null || bytes.Length == 0)
     {
         return(null);
     }
     return(_serializer.Read(bytes));
 }
コード例 #25
0
 public void ReadData(IObjectDataInput input)
 {
     var size = input.ReadInt();
     _predicates = new IPredicate[size];
     for (var i = 0; i < size; i++)
     {
         _predicates[i] = input.ReadObject<IPredicate>();
     }
 }
コード例 #26
0
        public void ReadData(IObjectDataInput input)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            throw new NotSupportedException("Client should not need to use ReadData method.");
        }
コード例 #27
0
        public void ReadData(IObjectDataInput input)
        {
            var size = input.ReadInt();

            _predicates = new IPredicate[size];
            for (var i = 0; i < size; i++)
            {
                _predicates[i] = input.ReadObject <IPredicate>();
            }
        }
コード例 #28
0
        public CustomSerializableType Read(IObjectDataInput input)
        {
            var len   = input.ReadInt();
            var array = new byte[len];

            input.ReadBytes(array);
            return(new CustomSerializableType {
                Value = Encoding.UTF8.GetString(array)
            });
        }
コード例 #29
0
        public void ReadData(IObjectDataInput input)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            Type       = (ProtocolType)input.ReadInt();
            Identifier = input.ReadString();
        }
コード例 #30
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="input"></param>
        public void ReadData(IObjectDataInput input)
        {
            int size = input.ReadInt();

            _predicates = new IPredicate <TKey, TValue> [size];
            for (int i = 0; i < size; ++i)
            {
                _predicates[i] = input.ReadObject <IPredicate <TKey, TValue> >();
            }
        }
            public object Read(IObjectDataInput input)
            {
                var json = input.ReadString();
                var deserializeObject =
                    JsonConvert.DeserializeObject(json, new JsonSerializerSettings {
                    TypeNameHandling = TypeNameHandling.All
                });

                return(deserializeObject);
            }
コード例 #32
0
 public void ReadData(IObjectDataInput input)
 {
 }
コード例 #33
0
 public void ReadData(IObjectDataInput input)
 {
     var len = input.ReadInt();
     data = new byte[len];
     input.ReadFully(data);
 }
コード例 #34
0
 public void ReadData(IObjectDataInput input)
 {
     _predicate = input.ReadObject<IPredicate>();
 }
 /// <exception cref="System.IO.IOException" />
 public virtual void ReadData(IObjectDataInput @in)
 {
     name = @in.ReadUTF();
     address = @in.ReadObject<Address>();
     age = @in.ReadInt();
     height = @in.ReadLong();
     weight = @in.ReadDouble();
 }
 public virtual void ReadData(IObjectDataInput @in)
 {
     street = @in.ReadUTF();
     no = @in.ReadInt();
 }
コード例 #37
0
 public void ReadData(IObjectDataInput input)
 {
     _attributeName = input.ReadUTF();
     _regex = input.ReadUTF();
 }
コード例 #38
0
 public void ReadData(IObjectDataInput input)
 {
     _runnerCount = input.ReadInt();
     _raceCount = input.ReadInt();
     _runnerInfos = new DataSerializableBasicType[_runnerCount, _raceCount];
     for (int i = 0; i < _runnerCount; i++)
     {
         for (int j = 0; j < _raceCount; j++)
         {
             _runnerInfos[i, j] = new DataSerializableBasicType();
             _runnerInfos[i, j].ReadData(input);
         }
     }
 }
コード例 #39
0
 public void ReadData(IObjectDataInput input)
 {
     AttributeName = input.ReadUTF();
     Expression = input.ReadUTF();
 }
コード例 #40
0
 public void ReadData(IObjectDataInput input)
 {
     AttributeName = input.ReadUTF();
     Value = input.ReadObject<object>();
 }
コード例 #41
0
 public void ReadData(IObjectDataInput input)
 {
     value = input.ReadUTF();
 }
コード例 #42
0
 public void ReadData(IObjectDataInput input)
 {
     Data = input.ReadData();
 }
 public void ReadData(IObjectDataInput input)
 {
     i = input.ReadInt();
     c = input.ReadChar();
 }
コード例 #44
0
 public void ReadData(IObjectDataInput input)
 {
     dblValue1 = input.ReadDouble();
     dblValue2 = input.ReadDouble();
 }
コード例 #45
0
 public void ReadData(IObjectDataInput input)
 {
     _attributeName = input.ReadUTF();
     var size = input.ReadInt();
     _values = new object[size];
     for (var i = 0; i < size; i++)
     {
         _values[i] = input.ReadObject<object>();
     }
 }
コード例 #46
0
 public void ReadData(IObjectDataInput input)
 {
     _className = input.ReadUTF();
 }
コード例 #47
0
 public void ReadData(IObjectDataInput input)
 {
     Id = input.ReadInt();
     Name = input.ReadUTF();
 }
コード例 #48
0
 public void ReadData(IObjectDataInput input)
 {
     _attributeName = input.ReadUTF();
     _value = input.ReadObject<object>();
     _equal = input.ReadBoolean();
     _less = input.ReadBoolean();
 }
コード例 #49
0
 public void ReadData(IObjectDataInput input)
 {
     _sql = input.ReadUTF();
 }
コード例 #50
0
 public void ReadData(IObjectDataInput input)
 {
     Bool = input.ReadBoolean();
     BoolArray = input.ReadBooleanArray();
     Byte = input.ReadByte();
     ByteArray = input.ReadByteArray();
     Char = input.ReadChar();
     CharArray = input.ReadCharArray();
     Short = input.ReadShort();
     ShortArray = input.ReadShortArray();
     Int = input.ReadInt();
     IntArray = input.ReadIntArray();
     Long = input.ReadLong();
     LongArray = input.ReadLongArray();
     Float = input.ReadFloat();
     FloatArray = input.ReadFloatArray();
     Double = input.ReadDouble();
     DoubleArray = input.ReadDoubleArray();
     Serializable = input.ReadObject<IIdentifiedDataSerializable>();
     //input.ReadObject(SerializableArray);
     //Portable = input.ReadObject<IPortable>();
     //input.ReadObject(PortableArray);
     var charLength = input.ReadInt();
     var chars = new char[charLength];
     for (var i = 0; i < charLength; i++)
     {
         chars[i] = input.ReadChar();
     }
     Chars = new string(chars);
     String = input.ReadUTF();
     StringArray = input.ReadUTFArray();
     DateTime = input.ReadObject<DateTime>();
 }
コード例 #51
0
 public void ReadData(IObjectDataInput input)
 {
     ds = input.ReadObject<IDataSerializable>();
     portable = input.ReadObject<IPortable>();
     ds2 = input.ReadObject<IDataSerializable>();
 }
コード例 #52
0
 public void ReadData(IObjectDataInput input)
 {
     _attributeName = input.ReadUTF();
     _to = input.ReadObject<object>();
     _from = input.ReadObject<object>();
 }