public static string AsConfigurationStringValue(this object @this)
 {
     return(@this.GetType().GetTypeInfo().IsEnum
         ? NonGenericEnums.GetName(@this.GetType(), @this)
         : // optimized path for enums
            Convert.ToString(@this));
 }
 public void NonGenericEnumsNullableTest()
 {
     Assert.AreEqual("Today", NonGenericEnums.GetName(typeof(DateFilterOperator?), (DateFilterOperator?)DateFilterOperator.Today));
     Assert.AreEqual("Today", NonGenericEnums.GetName(typeof(DateFilterOperator?), DateFilterOperator.Today));
     Assert.AreEqual(null, NonGenericEnums.GetName(typeof(DateFilterOperator?), null));
 }