Ejemplo n.º 1
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     OperationType = reader.ReadObjectAs <DatabaseOperationType>();
     Collection    = reader.ReadObject() as string;
     Database      = reader.ReadObject() as string;
     Query         = reader.ReadObject() as Query;
 }
Ejemplo n.º 2
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     this.RequestId       = reader.ReadInt64();
     this.Source          = (Alachisoft.NosDB.Common.Net.Address)reader.ReadObject();
     this.ResponseMessage = reader.ReadObject();
     this.Error           = reader.ReadObject() as Exception;
 }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public static Dictionary <T, V> DeserializeDictionary <T, V>(Serialization.IO.CompactReader reader)
        {
            T    key;
            V    val;
            bool flag = reader.ReadBoolean();

            if (flag)
            {
                Dictionary <T, V> dictionary = null;
                if (typeof(string).Equals(typeof(T)))
                {
                    dictionary = new Dictionary <T, V>((IEqualityComparer <T>)StringComparer.InvariantCultureIgnoreCase);
                }
                else
                {
                    dictionary = new Dictionary <T, V>();
                }

                int Length = reader.ReadInt32();
                for (int i = 0; i < Length; i++)
                {
                    key = (T)reader.ReadObject();
                    val = (V)reader.ReadObject();

                    dictionary.Add(key, val);
                }
                return(dictionary);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 4
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     this.RoleName    = reader.ReadObject() as string;
     this.RoleType    = (RoleType)reader.ReadObject();
     this.RoleLevel   = (RoleLevel)reader.ReadObject();
     this.Permissions = reader.ReadObject() as List <Permission>;
 }
Ejemplo n.º 5
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     RequestId       = reader.ReadInt64();
     ResponseMessage = reader.ReadObject();
     Source          = reader.ReadObject() as Net.Address;
     Exception       = reader.ReadObject() as System.Exception;
     ReturnVal       = reader.ReadObject() as byte[];
 }
Ejemplo n.º 6
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     _jobIdentifier  = reader.ReadString();
     rootFolderName  = reader.ReadString();
     _creationTime   = reader.ReadDateTime();
     _activeConfig   = reader.ReadObject() as RecoveryConfiguration;
     _executionState = reader.ReadObject() as ClusteredRecoveryJobState;
 }
Ejemplo n.º 7
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     RequestId      = reader.ReadInt64();
     Message        = reader.ReadObject();
     NoResponse     = reader.ReadBoolean();
     MethodName     = reader.ReadObject() as string;
     Parameters     = reader.ReadObject() as TargetMethodParameter;
     Overload       = reader.ReadInt32();
     CommandVersion = reader.ReadInt32();
 }
Ejemplo n.º 8
0
 public virtual void Deserialize(Serialization.IO.CompactReader reader)
 {
     Identifier          = reader.ReadString();
     Message             = reader.ReadString();
     Status              = (RecoveryStatus)reader.ReadObject();
     PercentageExecution = reader.ReadSingle();
     _entityName         = reader.ReadString();
     StartTime           = reader.ReadDateTime();
     _submissionTime     = reader.ReadDateTime();
     StopTime            = reader.ReadDateTime();
     _lastOperationID    = (OperationId)reader.ReadObject();
     _lastFullBackupDate = reader.ReadDateTime();
 }
Ejemplo n.º 9
0
        /// <summary>
        /// Deserializa os dados.
        /// </summary>
        /// <param name="reader"></param>
        void Serialization.ICompactSerializable.Deserialize(Serialization.IO.CompactReader reader)
        {
            if (reader.ReadBoolean())
            {
                this.Type = new TypeName();
                this.Type.Deserialize(reader);
            }
            ContractName = reader.ReadString();
            if (reader.ReadBoolean())
            {
                ContractType = new TypeName();
                ContractType.Deserialize(reader);
            }
            ImportingConstructor = reader.ReadBoolean();
            this.CreationPolicy  = (CreationPolicy)reader.ReadInt32();
            UseDispatcher        = reader.ReadBoolean();
            UIContext            = reader.ReadString();
            var count = reader.ReadInt32();

            Metadata = new Dictionary <string, object>(count);
            for (var i = 0; i < count; i++)
            {
                var key   = reader.ReadString();
                var value = reader.ReadObject();
                Metadata.Add(key, value);
            }
        }
Ejemplo n.º 10
0
        public static Dictionary <T, Dictionary <V, List <K> > > DeserializeDDList <T, V, K>(Serialization.IO.CompactReader reader)
        {
            bool flag = reader.ReadBoolean();

            if (flag)
            {
                T key;

                int dictionarylength = reader.ReadInt32();
                Dictionary <T, Dictionary <V, List <K> > > dList = new Dictionary <T, Dictionary <V, List <K> > >();
                for (int i = 0; i < dictionarylength; i++)
                {
                    Dictionary <V, List <K> > valueList;
                    key       = (T)reader.ReadObject();
                    valueList = DeserializeDictionaryList <V, K>(reader);
                    dList.Add(key, valueList);
                }


                return(dList);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 11
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     this.ResourceId = reader.ReadObject() as ResourceId;
     this.Roles      = Common.Util.SerializationUtility.DeserializeDictionary <IRole, IRoleInstance>(reader);
     //this.Roles = reader.ReadObject() as Dictionary<IRole, IRoleInstance>;
     this.SubResources = Common.Util.SerializationUtility.DeserializeList <ResourceId>(reader);
     //this.SubResources = reader.ReadObject() as List<ResourceId>;
 }
Ejemplo n.º 12
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     QueryText  = reader.ReadString();
     Parameters = reader.ReadObject() as IList <IParameter>;
     if (Parameters == null)
     {
         Parameters = new List <IParameter>();
     }
 }
Ejemplo n.º 13
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     _isLastChunk = reader.ReadBoolean();
     _readerUID   = reader.ReadString();
     _documents   = (List <IJSONDocument>)reader.ReadObject();
     _chunkId     = reader.ReadInt32();
     _queryString = reader.ReadString();
     _doCaching   = reader.ReadBoolean();
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Desserializa o parametro.
 /// </summary>
 /// <param name="reader"></param>
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     Name        = reader.ReadString();
     Direction   = (Colosoft.Query.ParameterDirection)reader.ReadInt32();
     Size        = reader.ReadInt32();
     this.DbType = (System.Data.DbType)reader.ReadInt32();
     if (reader.ReadBoolean())
     {
         Value = reader.ReadObject();
     }
 }
Ejemplo n.º 15
0
        /// <summary>
        /// Desserializa o objeto.
        /// </summary>
        /// <param name="reader"></param>
        public void Deserialize(Serialization.IO.CompactReader reader)
        {
            ActionId       = reader.ReadInt32();
            Success        = reader.ReadBoolean();
            AffectedRows   = reader.ReadInt32();
            RowVersion     = reader.ReadInt64();
            FailureMessage = reader.ReadString();
            if (reader.ReadBoolean())
            {
                Result = reader.ReadObject();
            }
            var parameters = new List <PersistenceParameter>();

            while (reader.ReadBoolean())
            {
                PersistenceParameter parameter = new PersistenceParameter();
                ((ICompactSerializable)parameter).Deserialize(reader);
                parameters.Add(parameter);
            }
            Parameters = parameters.ToArray();
            var actions = new List <PersistenceActionResult>();

            while (reader.ReadBoolean())
            {
                PersistenceActionResult action = new PersistenceActionResult();
                ((ICompactSerializable)action).Deserialize(reader);
                actions.Add(action);
            }
            AlternativeActions = actions.ToArray();
            var beforeActions = new List <PersistenceActionResult>();

            while (reader.ReadBoolean())
            {
                PersistenceActionResult action = new PersistenceActionResult();
                ((ICompactSerializable)action).Deserialize(reader);
                beforeActions.Add(action);
            }
            BeforeActions = beforeActions.ToArray();
            var afterActions = new List <PersistenceActionResult>();

            while (reader.ReadBoolean())
            {
                PersistenceActionResult action = new PersistenceActionResult();
                ((ICompactSerializable)action).Deserialize(reader);
                afterActions.Add(action);
            }
            AfterActions = afterActions.ToArray();
        }
Ejemplo n.º 16
0
 public override void Deserialize(Serialization.IO.CompactReader reader)
 {
     Identifier          = reader.ReadString();
     Message             = reader.ReadString();
     Status              = (RecoveryStatus)reader.ReadInt32();
     PercentageExecution = reader.ReadSingle();
     MessageTime         = reader.ReadDateTime();
     StopTime            = reader.ReadDateTime();
     _cluster            = reader.ReadString();
     _shard              = reader.ReadString();
     _node               = reader.ReadString();
     _jobType            = (RecoveryJobType)reader.ReadInt32();
     Detail              = Common.Util.SerializationUtility.DeserializeList <RecoveryJobStateBase>(reader);
     _lastOperationID    = (OperationId)reader.ReadObject();
     _lastFullBackupDate = reader.ReadDateTime();
 }
Ejemplo n.º 17
0
        public static List <T> DeserializeList <T>(Serialization.IO.CompactReader reader)
        {
            bool flag = reader.ReadBoolean();

            if (flag)
            {
                int      length = reader.ReadInt32();
                List <T> list   = new List <T>();

                for (int i = 0; i < length; i++)
                {
                    list.Add((T)reader.ReadObject());
                }

                return(list);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 18
0
        public static ArrayList DeserializeArrayList(Serialization.IO.CompactReader reader)
        {
            bool flag = reader.ReadBoolean();

            if (flag)
            {
                int       length = reader.ReadInt32();
                ArrayList list   = new ArrayList();

                for (int i = 0; i < length; i++)
                {
                    list.Add(reader.ReadObject());
                }

                return(list);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 19
0
        public static ClusteredArray <T> DeserializeClusteredArray <T>(Serialization.IO.CompactReader reader)
        {
            bool flag = reader.ReadBoolean();

            if (flag)
            {
                int length               = reader.ReadInt32();
                int threshold            = reader.ReadInt32();
                ClusteredArray <T> array = new ClusteredArray <T>(threshold, length);

                for (int i = 0; i < length; i++)
                {
                    array[i] = (T)reader.ReadObject();
                }

                return(array);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 20
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     Name  = reader.ReadString();
     Value = reader.ReadObject();
 }
Ejemplo n.º 21
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     PersistenceConfiguration = (RecoveryPersistenceConfiguration)reader.ReadObject();
 }
Ejemplo n.º 22
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     Token  = reader.ReadObject() as Byte[];
     Status = (SecurityStatus)reader.ReadObject();
 }
Ejemplo n.º 23
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     _count = reader.ReadInt32();
     _pairs = reader.ReadObject() as KeyValuePair[];
 }
Ejemplo n.º 24
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     SessionId       = reader.ReadObject() as string;
     Username        = reader.ReadObject() as string;
     RouterSessionId = reader.ReadObject() as ISessionId;
 }
Ejemplo n.º 25
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     IsAuthenticated = (bool)reader.ReadObject();
     Token           = (AuthToken)reader.ReadObject();
     SessionId       = reader.ReadObject() as ISessionId;
 }
Ejemplo n.º 26
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     this.Username    = reader.ReadObject() as string;
     this.AccountType = (AccountType)reader.ReadObject();
 }
Ejemplo n.º 27
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     _identifer = reader.ReadString();
     _opCode    = (RecoveryOpCodes)reader.ReadObject();
     _parameter = reader.ReadObject();
 }
Ejemplo n.º 28
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     _element = reader.ReadObject() as IComparable;
     _index   = reader.ReadInt32();
 }
Ejemplo n.º 29
0
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     this.Name         = reader.ReadObject() as string;
     this.ResourceType = (ResourceType)reader.ReadObject();
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Compact Deseralize key-value pair
 /// </summary>
 /// <param name="reader">Compact deseralization instance</param>
 public void Deserialize(Serialization.IO.CompactReader reader)
 {
     this._key   = reader.ReadObject();
     this._value = reader.ReadObject();
 }