Index: Core/Common/src/Core.Common.Utils/NullableEnumTypeConverter.cs
===================================================================
diff -u -r780ed8dd33ce62d2e6e939811ca331ba1feed85f -r552af55fe255a135edd502d6e9bda9cc2d3e2c9f
--- Core/Common/src/Core.Common.Utils/NullableEnumTypeConverter.cs (.../NullableEnumTypeConverter.cs) (revision 780ed8dd33ce62d2e6e939811ca331ba1feed85f)
+++ Core/Common/src/Core.Common.Utils/NullableEnumTypeConverter.cs (.../NullableEnumTypeConverter.cs) (revision 552af55fe255a135edd502d6e9bda9cc2d3e2c9f)
@@ -34,9 +34,9 @@
public class NullableEnumTypeConverter : NullableConverter
{
///
- /// Initializes a new instance of the class for the given a nullable Enum .
+ /// Initializes a new instance of the class for the given nullable Enum .
///
- /// This class is designed such that it looks for on each Enum value.
+ /// This class looks for the decorator.
/// A that represents the type of enumeration to associate with this enumeration converter.
/// Thrown when is not a nullable type.
public NullableEnumTypeConverter(Type type) : base(type) {}
@@ -45,7 +45,7 @@
{
if (value == null)
{
- throw new NotSupportedException("NullableEnumTypeConverter cannot convert from (null).");
+ throw new NotSupportedException("Cannot convert from (null).");
}
var valueString = value as string;
if (valueString != null)
@@ -70,14 +70,14 @@
}
///
- /// Gets a collection of standard values for the data type this type converted is designed for.
+ /// Gets a collection of standard values for the data type this type converter is designed for.
///
/// An that provides a format
/// context that can be used to extract additional information about the environment
/// from which this converter is invoked. This parameter or properties of this parameter can be null.
/// A that holds a standard
/// set of valid values, or null if the data type does not support a standard set of values.
- /// Does not add a value for null to the .
+ /// Does not add a value for null to the .
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
if (UnderlyingTypeConverter == null)
@@ -97,7 +97,7 @@
private static string GetDisplayName(MemberInfo memberInfo)
{
var resourcesDisplayNameAttribute = (ResourcesDisplayNameAttribute) Attribute.GetCustomAttribute(memberInfo, typeof(ResourcesDisplayNameAttribute));
- return (resourcesDisplayNameAttribute != null) ? resourcesDisplayNameAttribute.DisplayName : null;
+ return resourcesDisplayNameAttribute != null ? resourcesDisplayNameAttribute.DisplayName : null;
}
}
}
\ No newline at end of file
Index: Core/Common/test/Core.Common.Utils.Test/NullableEnumTypeConverterTest.cs
===================================================================
diff -u -r780ed8dd33ce62d2e6e939811ca331ba1feed85f -r552af55fe255a135edd502d6e9bda9cc2d3e2c9f
--- Core/Common/test/Core.Common.Utils.Test/NullableEnumTypeConverterTest.cs (.../NullableEnumTypeConverterTest.cs) (revision 780ed8dd33ce62d2e6e939811ca331ba1feed85f)
+++ Core/Common/test/Core.Common.Utils.Test/NullableEnumTypeConverterTest.cs (.../NullableEnumTypeConverterTest.cs) (revision 552af55fe255a135edd502d6e9bda9cc2d3e2c9f)
@@ -42,7 +42,6 @@
Assert.IsInstanceOf(converter);
Assert.AreEqual(nullableType, converter.NullableType);
Assert.AreEqual(typeof(SimpleEnum), converter.UnderlyingType);
- Assert.AreEqual(typeof(EnumConverter), converter.UnderlyingTypeConverter.GetType());
}
[Test]
@@ -52,7 +51,7 @@
var converter = new NullableEnumTypeConverter(typeof(SimpleEnum?));
// Call
- var canConvert = converter.CanConvertTo(typeof(NotSupportedType));
+ bool canConvert = converter.CanConvertTo(typeof(NotSupportedType));
// Assert
Assert.IsFalse(canConvert);
@@ -65,7 +64,7 @@
var converter = new NullableEnumTypeConverter(typeof(SimpleEnum?));
// Call
- var canConvert = converter.CanConvertTo(typeof(string));
+ bool canConvert = converter.CanConvertTo(typeof(string));
// Assert
Assert.IsTrue(canConvert);
@@ -136,7 +135,7 @@
var converter = new NullableEnumTypeConverter(typeof(SimpleEnum?));
// Call
- var result = converter.ConvertTo(enumValue, typeof(string));
+ object result = converter.ConvertTo(enumValue, typeof(string));
// Assert
const string expectedText = "";
@@ -150,7 +149,7 @@
var converter = new NullableEnumTypeConverter(typeof(SimpleEnum?));
// Call
- var canConvert = converter.CanConvertFrom(typeof(NotSupportedType));
+ bool canConvert = converter.CanConvertFrom(typeof(NotSupportedType));
// Assert
Assert.IsFalse(canConvert);
@@ -163,7 +162,7 @@
var converter = new NullableEnumTypeConverter(typeof(SimpleEnum?));
// Call
- var canConvert = converter.CanConvertFrom(typeof(string));
+ bool canConvert = converter.CanConvertFrom(typeof(string));
// Assert
Assert.IsTrue(canConvert);
@@ -203,7 +202,7 @@
var converter = new NullableEnumTypeConverter(typeof(SimpleEnum?));
// Call
- var result = converter.ConvertFrom(second);
+ object result = converter.ConvertFrom(second);
// Assert
var expectedEnumValue = SimpleEnum.SecondValue;