コード例 #1
0
        public virtual void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<DataQueryDatumSpecification>");
            try
            {
                sb.AppendLine("<fixedDatumIDList type=\"uint\">" + this._fixedDatumIDList.Count.ToString(CultureInfo.InvariantCulture) + "</fixedDatumIDList>");
                sb.AppendLine("<variableDatumIDList type=\"uint\">" + this._variableDatumIDList.Count.ToString(CultureInfo.InvariantCulture) + "</variableDatumIDList>");
                for (int idx = 0; idx < this._fixedDatumIDList.Count; idx++)
                {
                    sb.AppendLine("<fixedDatumIDList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"UnsignedDISInteger\">");
                    UnsignedDISInteger aUnsignedDISInteger = (UnsignedDISInteger)this._fixedDatumIDList[idx];
                    aUnsignedDISInteger.Reflection(sb);
                    sb.AppendLine("</fixedDatumIDList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                for (int idx = 0; idx < this._variableDatumIDList.Count; idx++)
                {
                    sb.AppendLine("<variableDatumIDList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"UnsignedDISInteger\">");
                    UnsignedDISInteger aUnsignedDISInteger = (UnsignedDISInteger)this._variableDatumIDList[idx];
                    aUnsignedDISInteger.Reflection(sb);
                    sb.AppendLine("</variableDatumIDList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</DataQueryDatumSpecification>");
            }
            catch (Exception e)
            {
#if DEBUG
                Trace.WriteLine(e);
                Trace.Flush();
#endif
                this.OnException(e);
            }
        }
コード例 #2
0
        public virtual void Unmarshal(DataInputStream dis)
        {
            if (dis != null)
            {
                try
                {
                    this._numberOfFixedDatums    = dis.ReadUnsignedInt();
                    this._numberOfVariableDatums = dis.ReadUnsignedInt();
                    for (int idx = 0; idx < this.NumberOfFixedDatums; idx++)
                    {
                        UnsignedDISInteger anX = new UnsignedDISInteger();
                        anX.Unmarshal(dis);
                        this._fixedDatumIDList.Add(anX);
                    }
                    ;

                    for (int idx = 0; idx < this.NumberOfVariableDatums; idx++)
                    {
                        UnsignedDISInteger anX = new UnsignedDISInteger();
                        anX.Unmarshal(dis);
                        this._variableDatumIDList.Add(anX);
                    }
                    ;
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }
コード例 #3
0
        public virtual void Marshal(DataOutputStream dos)
        {
            if (dos != null)
            {
                try
                {
                    dos.WriteUnsignedInt((uint)this._fixedDatumIDList.Count);
                    dos.WriteUnsignedInt((uint)this._variableDatumIDList.Count);

                    for (int idx = 0; idx < this._fixedDatumIDList.Count; idx++)
                    {
                        UnsignedDISInteger aUnsignedDISInteger = (UnsignedDISInteger)this._fixedDatumIDList[idx];
                        aUnsignedDISInteger.Marshal(dos);
                    }

                    for (int idx = 0; idx < this._variableDatumIDList.Count; idx++)
                    {
                        UnsignedDISInteger aUnsignedDISInteger = (UnsignedDISInteger)this._variableDatumIDList[idx];
                        aUnsignedDISInteger.Marshal(dos);
                    }
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }
コード例 #4
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        ///     <c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(UnsignedDISInteger obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            if (this._val != obj._val)
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
コード例 #5
0
        public virtual int GetMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize += 4;  // this._numberOfFixedDatums
            marshalSize += 4;  // this._numberOfVariableDatums
            for (int idx = 0; idx < this._fixedDatumIDList.Count; idx++)
            {
                UnsignedDISInteger listElement = (UnsignedDISInteger)this._fixedDatumIDList[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            for (int idx = 0; idx < this._variableDatumIDList.Count; idx++)
            {
                UnsignedDISInteger listElement = (UnsignedDISInteger)this._variableDatumIDList[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            return(marshalSize);
        }
コード例 #6
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(UnsignedDISInteger obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return false;
            }

            if (this._val != obj._val)
            {
                ivarsEqual = false;
            }

            return ivarsEqual;
        }
コード例 #7
0
        public virtual void Unmarshal(DataInputStream dis)
        {
            if (dis != null)
            {
                try
                {
                    this._numberOfFixedDatums = dis.ReadUnsignedInt();
                    this._numberOfVariableDatums = dis.ReadUnsignedInt();
                    for (int idx = 0; idx < this.NumberOfFixedDatums; idx++)
                    {
                        UnsignedDISInteger anX = new UnsignedDISInteger();
                        anX.Unmarshal(dis);
                        this._fixedDatumIDList.Add(anX);
                    };

                    for (int idx = 0; idx < this.NumberOfVariableDatums; idx++)
                    {
                        UnsignedDISInteger anX = new UnsignedDISInteger();
                        anX.Unmarshal(dis);
                        this._variableDatumIDList.Add(anX);
                    };

                }
                catch (Exception e)
                {
            #if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
            #endif
                    this.OnException(e);
                }
            }
        }