Adf.Business.ValueObject.FileName.FileName C# (CSharp) Méthode

FileName() public méthode

Initializes a new instance of the FileName.
If the filename could not be validated, a FormatException exception is thrown.
public FileName ( string newvalue ) : System
newvalue string The filename to use.
Résultat System
        public FileName(string newvalue)
        {
            value = null;

            if (string.IsNullOrEmpty(newvalue)) return;

            if (!IsValidFileName(newvalue))
            {
                throw new FormatException("value is not a valid filename");

            }
            value = newvalue;
        }