Пример #1
0
        public override void Unpack(string message)
        {
            PackClass packClass = this.GetPackClass();
            int       mask      = packClass.Unpack(message, this);

            this.Mask = mask;
        }
Пример #2
0
        /// <summary>
        /// This method updates this message with the visible properties or fields of <code>other</code>.
        /// </summary>
        /// <param name="other">Message.</param>
        public virtual void Update(T other)
        {
            PackClass packClass = this.GetPackClass();

            packClass.Update(this, other, other.Mask);
            this.Mask |= other.Mask;
        }
Пример #3
0
        public override string Pack()
        {
            PackClass packClass = this.GetPackClass();

            return(packClass.Pack(this, this.Mask));
        }
Пример #4
0
        /// <summary>
        /// This method gets the hidden properties or fields (the mask is set to 0).
        /// Only it return properties and fields affected by <code>PackAttribute</code>.
        /// </summary>
        /// <returns>Hidden properties or fields.</returns>
        public IEnumerable <string> GetHidden()
        {
            PackClass packClass = this.GetPackClass();

            return(packClass.GetHidden(this, this.Mask));
        }
Пример #5
0
        /// <summary>
        /// This method tests if the <code>name</code> property or field is visible (the mask is set to 1).
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public bool IsVisible(string name)
        {
            PackClass packClass = this.GetPackClass();

            return(packClass.IsVisible(this, this.Mask, name));
        }