Example #1
0
//-----------------------------------------------------------------------------
// overrides

        public override bool Equals(object o)
        {
            OSVersionInfo p = o as OSVersionInfo;

            if (p != null)
            {
                return(this == p);
            }

            return(base.Equals(o));
        }
Example #2
0
        private void CopyThis(OSVersionInfo o)
        {
            // normal fields
            _OSPlatformId = o._OSPlatformId;

            _MajorVersion = o._MajorVersion;
            _MinorVersion = o._MinorVersion;
            _BuildNumber  = o._BuildNumber;
            _CSDVersion   = o._CSDVersion;

            // extended fields
            _OSSuiteFlags  = o._OSSuiteFlags;
            _OSProductType = o._OSProductType;

            _ServicePackMajor = o._ServicePackMajor;
            _ServicePackMinor = o._ServicePackMinor;
            _Reserved         = o._Reserved;

            // state fields
            _Locked = false;
            _ExtendedPropertiesAreSet = o._ExtendedPropertiesAreSet;
        }
Example #3
0
        public virtual int CompareTo(object o)
        {
            if (o == null)
            {
                throw new InvalidOperationException("CompareTo( object o ): 'o' is null");
            }

            OSVersionInfo p = o as OSVersionInfo;

            if (p == null)
            {
                throw new InvalidOperationException("CompareTo( object o ): 'o' is not an OSVersionInfo");
            }

            if (this == p)
            {
                return(0);
            }
            if (this > p)
            {
                return(1);
            }
            return(-1);
        }
Example #4
0
 public virtual void Copy(OSVersionInfo o)
 {
     CopyThis(o);
 }
Example #5
0
//-----------------------------------------------------------------------------
// Copying

        public OSVersionInfo(OSVersionInfo o)
        {
            CopyThis(o);
        }