GaDotNet.Common.Data.GooglePageView.Validate C# (CSharp) Method

Validate() public method

Validates this instance.
public Validate ( ) : void
return void
        public void Validate()
        {
            if (String.IsNullOrEmpty(PageTitle))
            {
                throw new ArgumentException("'PageTitle' is a required field","PageTitle");
            }
            if (String.IsNullOrEmpty(DomainName))
            {
                throw new ArgumentException("'DomainName' is a required field","DomainName");
            }
            if (String.IsNullOrEmpty(Url))
            {
                throw new ArgumentException("'Url' is a required field","Url");
            }
            if (Url.LastIndexOf("http://", StringComparison.Ordinal)>=0 || Url.LastIndexOf("www", StringComparison.Ordinal)>=0)
            {
                throw new ArgumentException("'Url' must be a relative to root URL with no www or http://","Url");
            }
        }