/// <summary> /// Determines whether the specified <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.TankDitchAndConcertinaWire"/> instance is equal to this instance. /// </summary> /// <param name="other">The <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.TankDitchAndConcertinaWire"/> instance to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.TankDitchAndConcertinaWire"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> public bool Equals(TankDitchAndConcertinaWire other) { // If parameter is null return false (cast to object to prevent recursive loop!) if ((object)other == null) { return(false); } return (this.Breach == other.Breach && this.BreachLength == other.BreachLength && this.BreachLocation == other.BreachLocation); }
/// <summary> /// Creates the <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.TankDitchAndConcertinaWire"/> instance from the uint value. /// </summary> /// <param name="value">The uint value which represents the <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.TankDitchAndConcertinaWire"/> instance.</param> /// <returns>The <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.TankDitchAndConcertinaWire"/> instance, represented by the uint value.</returns> public static TankDitchAndConcertinaWire FromUInt32(uint value) { TankDitchAndConcertinaWire ps = new TankDitchAndConcertinaWire(); uint mask0 = 0x30000; byte shift0 = 16; uint newValue0 = (value & mask0) >> shift0; ps.Breach = (TankDitchAndConcertinaWire.BreachValue)newValue0; uint mask2 = 0x00ff; byte shift2 = 32; uint newValue2 = (value & mask2) >> shift2; ps.BreachLength = (byte)newValue2; uint mask3 = 0xff00; byte shift3 = 40; uint newValue3 = (value & mask3) >> shift3; ps.BreachLocation = (TankDitchAndConcertinaWire.BreachLocationValue)newValue3; return(ps); }