예제 #1
0
        //-----------------------------------------------------------------------------
        // overrides

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

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

            return(base.Equals(o));
        }
예제 #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                   = o._Locked                   ;
            _Locked = false;
            _ExtendedPropertiesAreSet = o._ExtendedPropertiesAreSet;
        }
예제 #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);
        }
예제 #4
0
 public virtual void Copy(OSVersionInfo o)
 {
     CopyThis(o);
 }
예제 #5
0
        //-----------------------------------------------------------------------------
        // Copying

        public OSVersionInfo(OSVersionInfo o)
        {
            CopyThis(o);
        }
예제 #6
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                   = o._Locked                   ;
			_Locked = false;
			_ExtendedPropertiesAreSet = o._ExtendedPropertiesAreSet;
		}
예제 #7
0
		public virtual void Copy(OSVersionInfo o)
		{
			CopyThis(o);
		}
예제 #8
0
		//-----------------------------------------------------------------------------
		// Copying

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