コード例 #1
0
        /// <summary>
        /// Determines whether the specified <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance is equal to this instance.
        /// </summary>
        /// <param name="other">The <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance to compare with this instance.</param>
        /// <returns>
        ///     <c>true</c> if the specified <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(ProtocolMode other)
        {
            // If parameter is null return false (cast to object to prevent recursive loop!)
            if ((object)other == null)
            {
                return(false);
            }

            return
                (this.Value == other.Value);
        }
コード例 #2
0
        /// <summary>
        /// Creates the <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance from the uint value.
        /// </summary>
        /// <param name="value">The uint value which represents the <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance.</param>
        /// <returns>The <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance, represented by the uint value.</returns>
        public static ProtocolMode FromUInt32(uint value)
        {
            ProtocolMode ps = new ProtocolMode();

            uint mask0     = 0x0003;
            byte shift0    = 0;
            uint newValue0 = (value & mask0) >> shift0;

            ps.Value = (ProtocolMode.ProtocolModeValue)newValue0;

            return(ps);
        }
コード例 #3
0
ファイル: ProtocolMode.cs プロジェクト: mcgredonps/Unity_DIS
        /// <summary>
        /// Determines whether the specified <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance is equal to this instance.
        /// </summary>
        /// <param name="other">The <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if the specified <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(ProtocolMode other)
        {
            // If parameter is null return false (cast to object to prevent recursive loop!)
            if ((object)other == null)
            {
                return false;
            }

            return
                this.Value == other.Value;
        }
コード例 #4
0
ファイル: ProtocolMode.cs プロジェクト: mcgredonps/Unity_DIS
        /// <summary>
        /// Creates the <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance from the uint value.
        /// </summary>
        /// <param name="value">The uint value which represents the <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance.</param>
        /// <returns>The <see cref="OpenDis.Enumerations.Entity.Information.Minefield.ProtocolMode"/> instance, represented by the uint value.</returns>
        public static ProtocolMode FromUInt32(uint value)
        {
            ProtocolMode ps = new ProtocolMode();

            uint mask0 = 0x0003;
            byte shift0 = 0;
            uint newValue0 = value & mask0 >> shift0;
            ps.Value = (ProtocolMode.ProtocolModeValue)newValue0;

            return ps;
        }