Example #1
0
        public TextMessage(string source, string phone, string message, IGatewayResolver resolver, ISmtpProvider provider)
        {
            Message = message;
            Phone = phone;
            Source = source;
            this.provider = provider;
            this.resolver = resolver;

            CheckState();
        }
    /// <summary>
    /// Performs initializations / startup functionality specific to the Authentication step.
    /// </summary>
    /// <param name="application">the application context</param>
    private void InitInternalAuthenticationBase(HttpApplication application)
    {
      this.CasServerLoginUrl = this.config.CasServerLoginUrl;
      if (log.IsInfoEnabled) {
        log.Info(string.Format("{0}:Loaded CasServerLoginUrl property: {1}",
          CommonUtils.MethodName, this.CasServerLoginUrl));
      }
      
      this.Gateway = this.config.Gateway;
      if (log.IsInfoEnabled) {
        log.Info(string.Format("{0}:Loaded Gateway property: {1}",
          CommonUtils.MethodName, this.Gateway));
      }
      if (this.Gateway && this.Renew) {
        throw new CasConfigurationException(
          string.Format("Gateway and renew functionalities are mutually exclusive"));
      }
      if (this.Gateway) {
        this.gatewayResolver = new SessionAttrGatewayResolver();
      }

      CommonUtils.AssertTrue(CommonUtils.IsNotBlank(this.CasServerLoginUrl),
                  CasClientConfiguration.CAS_SERVER_LOGIN_URL + " cannot be null or empty.");
    }