File System File System
File System File System
DocFX + Singulink = ♥

Search Results for

    Constructor ValidPathAttribute

    ValidPathAttribute(PathOptions)

    Specifies that a path property, field or parameter must be valid for the specified path options, as determined by IsValidFor(PathOptions, out string?).

    Declaration
    public ValidPathAttribute(PathOptions options)
    Parameters
    Type Name Description
    PathOptions options

    The path options the path must be valid for.

    Remarks

    The attribute checks IPath values. A null value is valid; RequiredAttribute is what requires a value. A value of any other type, including a string, is invalid and isn't parsed.

    The default error message is "The {0} field is not a valid path. {1}", where {0} is the display name of the member and {1} is the reason: the error message that parsing the path with the options gives (e.g. "Entry name ends with a space."), or for a value that isn't a path, its type (e.g. "Value of type String is not a path."). {1} is empty in FormatErrorMessage(string), which has no value to give a reason for. ErrorMessage, or ErrorMessageResourceType and ErrorMessageResourceName, replace the message and can use the same placeholders.

    © Singulink. All rights reserved.