Exemple #1
0
        }                                // this information is cached because it's frequently used

        private OSPlatform(string osPlatform)
        {
            if (osPlatform == null)
            {
                throw new ArgumentNullException(nameof(osPlatform));
            }
            if (osPlatform.Length == 0)
            {
                throw new ArgumentException(SR.Argument_EmptyValue, nameof(osPlatform));
            }

            _osPlatform = osPlatform;
            IsCurrent   = RuntimeInformation.IsCurrentOSPlatform(osPlatform);
        }