Example #1
0
        public void OSFeature_Feature_Get_ReturnsExpected()
        {
            OSFeature feature = OSFeature.Feature;

            Assert.NotNull(feature);
            Assert.Same(feature, OSFeature.Feature);
        }
Example #2
0
//<Snippet2>
        // Gets the caret width based upon the operating system or default value.
        private int GetCaretWidth()
        {
            // Check to see if the operating system supports the caret width metric.
            if (OSFeature.IsPresent(SystemParameter.CaretWidthMetric))
            {
                // If the operating system supports this metric,
                // return the value for the caret width metric.

                return(SystemInformation.CaretWidth);
            }
            else
            {
                // If the operating system does not support this metric,
                // return a custom default value for the caret width.

                return(1);
            }
        }
Example #3
0
 public void OSFeature_IsPresent_Invoke_ReturnsExpected(SystemParameter feature, bool expected)
 {
     Assert.Equal(expected, OSFeature.IsPresent(feature));
 }