Affecto.Identifiers.Finnish.PostOfficeBoxPostalCode.Create C# (CSharp) Метод

Create() публичный статический Метод

public static Create ( string postalCode ) : PostOfficeBoxPostalCode
postalCode string
Результат PostOfficeBoxPostalCode
        public new static PostOfficeBoxPostalCode Create(string postalCode)
        {
            if (postalCode == null)
            {
                throw new ArgumentNullException("postalCode");
            }

            var specification = new PostOfficeBoxPostalCodeSpecification();
            if (specification.IsSatisfiedBy(postalCode))
            {
                return new PostOfficeBoxPostalCode(postalCode);                
            }
            throw new ArgumentException(string.Format("Post box postal code '{0}' does not satisfy specification.", postalCode), "postalCode");
        }