예제 #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));
        }