/// <summary> /// Gets a value indicating whether this step can handle the current subject and/or expectation. /// </summary> public bool CanHandle(IEquivalencyValidationContext context, IEquivalencyAssertionOptions config) { Type type = config.GetSubjectType(context); return (type != null) && (type != typeof (object)) && config.IsValueType(type) && !type.IsArray; }
/// <summary> /// Gets a value indicating whether this step can handle the current subject and/or expectation. /// </summary> public bool CanHandle(IEquivalencyValidationContext context, IEquivalencyAssertionOptions config) { Type type = config.GetSubjectType(context); return ((type != null) && (type != typeof(object)) && config.IsValueType(type) && !type.IsArray); }
/// <summary> /// Gets a value indicating whether this step can handle the current subject and/or expectation. /// </summary> public bool CanHandle(IEquivalencyValidationContext context, IEquivalencyAssertionOptions config) { Type type = config.GetSubjectType(context); bool canHandle = (type != null) && (type != typeof(object)) && config.IsValueType(type) && !type.IsArray; if (canHandle) { context.TraceSingle(path => $"Treating {path} as a value type"); } return(canHandle); }
public bool IsValueType(Type type) { return(inner.IsValueType(type)); }