예제 #1
0
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            Name = rw.ReadWriteString(nameof(Name), Name);

            DbSchemaName = rw.ReadWriteString(nameof(DbSchemaName), DbSchemaName);
            Text         = rw.ReadWriteString(nameof(Text), Text);
        }
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            base.DeSerialize(rw);

            DefaultValue = rw.ReadWriteStringN(nameof(DefaultValue), DefaultValue);
            Collation    = rw.ReadWriteString(nameof(Collation), Collation);
        }
예제 #3
0
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            Name = rw.ReadWriteString(nameof(Name), Name);

            DbObjectType = rw.ReadWrite(nameof(DbObjectType), DbObjectType);
            OrderId      = rw.ReadWriteInt32(nameof(OrderId), OrderId);
            FakeOrderId  = rw.ReadWriteInt32(nameof(FakeOrderId), FakeOrderId);
        }
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            Name = rw.ReadWriteString(nameof(Name), Name);

            DbSchemaName = rw.ReadWriteString(nameof(DbSchemaName), DbSchemaName);
            _columns     = rw.ReadWriteList(nameof(_columns), _columns);
            Triggers     = rw.ReadWriteList(nameof(Triggers), Triggers);
        }
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            Name = rw.ReadWriteString(nameof(Name), Name);

            DbObjectId   = rw.ReadWriteInt64(nameof(DbObjectId), DbObjectId);
            DbSchemaName = rw.ReadWriteString(nameof(DbSchemaName), DbSchemaName);
            ScriptText   = rw.ReadWriteString(nameof(ScriptText), ScriptText);
        }
예제 #6
0
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            SqlType = rw.ReadWriteEnum(nameof(SqlType), SqlType);

            Lenght    = rw.ReadWriteInt32(nameof(Lenght), Lenght);
            Precision = rw.ReadWriteInt32(nameof(Precision), Precision);
            Scale     = rw.ReadWriteInt32(nameof(Scale), Scale);
            AllowNull = rw.ReadWriteBool(nameof(AllowNull), AllowNull);
        }
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            Name = rw.ReadWriteString(nameof(Name), Name);

            Server               = rw.ReadWriteString(nameof(Server), Server);
            StoredProcedures     = rw.ReadWriteList(nameof(StoredProcedures), StoredProcedures);
            Functions            = rw.ReadWriteList(nameof(Functions), Functions);
            TableValuedFunctions = rw.ReadWriteList(nameof(TableValuedFunctions), TableValuedFunctions);
            Tables               = rw.ReadWriteList(nameof(Tables), Tables);
        }
        /// <summary>
        /// (De)Serialize this object
        /// </summary>
        /// <param name="rw">Reader/writer</param>
        public override void DeSerialize(IObjectReadWriter rw)
        {
            byte _ = rw.ReadWriteVersion(0);

            base.DeSerialize(rw);

            Parameters = rw.ReadWriteList(nameof(Parameters), Parameters, c =>
            {
                if (c.TypeName.EndsWith(typeof(DbObjectTableColumnSchema).Name, StringComparison.InvariantCulture))
                {
                    c.Instance = new DbObjectTableColumnSchema();
                }
                else if (c.TypeName.EndsWith(typeof(DbObjectParameterSchema).Name, StringComparison.InvariantCulture))
                {
                    c.Instance = new DbObjectParameterSchema();
                }
                else
                {
                    throw new NotImplementedException();
                }
            });
        }