Affecto.Identifiers.WebAddress.Create C# (CSharp) Method

Create() public static method

public static Create ( string webAddress ) : WebAddress
webAddress string
return WebAddress
        public static WebAddress Create(string webAddress)
        {
            if (webAddress == null)
            {
                throw new ArgumentNullException("webAddress");
            }

            var specification = new WebAddressSpecification();
            if (specification.IsSatisfiedBy(webAddress))
            {
                return new WebAddress(webAddress);
            }
            throw new ArgumentException(string.Format("Web address '{0}' doesn't satisfy specification.", webAddress), "webAddress");
        }