/// <summary> /// Validate the input provided by the user /// </summary> /// <returns>Boolean</returns> private bool ValidateInput() { if (_Connection != null && _WebServiceURL != null) { if (_Connection.isInitialized & _Connection.isConnected) { //only when we already have a connection (user is authenticated) if (WebServiceURL.ToLower().Contains("http://") || WebServiceURL.ToLower().Contains("https://")) { //Connector.hasError = False return(true); } else { Connector.ReturnMessages.Add("SessionObject is invalid : Web Service Url is not valid, http:// or https:// needs to be included (SessionObject.ValidateInput)"); // Connector.hasError = True 'throws exception return(false); } } else { Connector.ReturnMessages.Add("Connector Object not initialized or connected! (SessionObject.ValidateInput)"); return(false); // Connector.hasError = True 'throws exception } } else { Connector.ReturnMessages.Add("SessionObject is invalid : Connector or Web ServiceUrl is nothing! (SessionObject.ValidateInput)"); // Connector.hasError = True 'throws exception return(false); } }
public WebServiceURLNode(WebServiceURL webServiceURL) : base((webServiceURL == null) ? "" : webServiceURL.Name) { if (webServiceURL == null) { throw new ArgumentNullException("webServiceURL"); } this.url = webServiceURL.URL; }