コード例 #1
0
 public AccDeployCommand(
     string commandSource,
     IUser user,
     IList <string> arguments,
     ILogger logger,
     IFlagService flagService,
     IConfigurationProvider configurationProvider,
     IIrcClient client,
     IResponder responder,
     BotConfiguration botConfiguration,
     IWebServiceClient webServiceClient,
     ModuleConfiguration deploymentConfiguration) : base(
         commandSource,
         user,
         arguments,
         logger,
         flagService,
         configurationProvider,
         client)
 {
     this.responder          = responder;
     this.botConfiguration   = botConfiguration;
     this.webServiceClient   = webServiceClient;
     this.deploymentPassword = deploymentConfiguration.DeploymentPassword;
 }
コード例 #2
0
        public BlockMonitoringService(
            ILogger logger,
            ILinkerService linkerService,
            IUrlShorteningService urlShorteningService,
            ISession globalSession,
            IMediaWikiApiHelper apiHelper,
            BotConfiguration botConfiguration,
            IWebServiceClient webServiceClient,
            IIrcClient client,
            ITrollMonitoringService trollMonitoringService)
        {
            this.logger                 = logger;
            this.linkerService          = linkerService;
            this.urlShorteningService   = urlShorteningService;
            this.globalSession          = globalSession;
            this.apiHelper              = apiHelper;
            this.botConfiguration       = botConfiguration;
            this.webServiceClient       = webServiceClient;
            this.client                 = client;
            this.trollMonitoringService = trollMonitoringService;

            this.trollMonitoringService.BlockMonitoringService = this;

            // initialise the store
            foreach (var blockMonitor in globalSession.CreateCriteria <BlockMonitor>().List <BlockMonitor>())
            {
                if (!this.monitors.ContainsKey(blockMonitor.MonitorChannel))
                {
                    this.monitors[blockMonitor.MonitorChannel] = new HashSet <string>();
                }

                this.monitors[blockMonitor.MonitorChannel].Add(blockMonitor.ReportChannel);
            }
        }
コード例 #3
0
        /// <summary>
        /// Consturctor
        /// </summary>
        /// <param name="webServiceTypeName"></param>
        /// <param name="serviceAddress"></param>
        public SearchManager(string webServiceTypeName = null, string serviceAddress = null)
            : base()
        {
            if (string.IsNullOrEmpty(webServiceTypeName))
            {
                //throw new ArgumentNullException("webServiceTypeName");
                webServiceTypeName = "Feng.Net.WebRestClient, Feng.Windows.Controller";
            }
            if (webServiceTypeName.ToUpper() == "REST")
                webServiceTypeName = "Feng.Net.WebRestClient, Feng.Windows.Controller";
            else if (webServiceTypeName.ToUpper() == "SOAP")
                webServiceTypeName = "Feng.Net.WebSoapClient, Feng.Windows.Controller";

            if (string.IsNullOrEmpty(serviceAddress))
            {
                //throw new ArgumentNullException("serviceAddress");
                serviceAddress = "Search";
            }
            if (!serviceAddress.StartsWith("http://"))
            {
                serviceAddress = string.Format("{0}/Generated/{1}.svc", SystemConfiguration.Server + "/" + SystemConfiguration.ApplicationName, serviceAddress);
            }

            m_client = ReflectionHelper.CreateInstanceFromType(ReflectionHelper.GetTypeFromName(webServiceTypeName), serviceAddress) as IWebServiceClient;
            if (m_client == null)
            {
                throw new ArgumentNullException(string.Format("webServiceTypeName of {0} with address {1} created failed!", webServiceTypeName, serviceAddress));
            }
            //m_webServiceTypeName = webServiceTypeName;
            //m_serviceAddress = serviceAddress;
        }
コード例 #4
0
 public void TestInitialize()
 {
     _httpClientMock = new Mock<IClient>();
     _responseContentMock = new Mock<IContent>();
     WebServiceClient = new WebServiceClient<ChildInfo>(_httpClientMock.Object, _responseContentMock.Object);
     WebServiceClient.Credentials = new Credentials { Username = "******", Password = "******", ClientId = "goalview", ClientSecret = "goalview" };
     WebServiceClient.BaseUri = "http://localhost";
     WebServiceClient.TokenEndpoint = "/token";
 }
コード例 #5
0
 public AccStatusCommand(
     string commandSource,
     IUser user,
     IList <string> arguments,
     ILogger logger,
     IFlagService flagService,
     IConfigurationProvider configurationProvider,
     IIrcClient client,
     IResponder responder,
     IWebServiceClient webServiceClient,
     BotConfiguration botConfiguration) : base(
         commandSource,
         user,
         arguments,
         logger,
         flagService,
         configurationProvider,
         client)
 {
     this.responder        = responder;
     this.webServiceClient = webServiceClient;
     this.botConfiguration = botConfiguration;
 }
コード例 #6
0
 public MusicBrainsClient(IWebServiceClient webServiceClient)
 {
     this.webServiceClient = webServiceClient;
 }
コード例 #7
0
 public ServiceCallInvoker(ILoggerFacade logger, IWebServiceClient webServiceClient)
 {
     _logger           = logger;
     _webServiceClient = webServiceClient;
 }
コード例 #8
0
 public HipChatNotificationService(IWebServiceClient webServiceClient)
 {
     _webServiceClient = webServiceClient;
 }
コード例 #9
0
 public CheckUpdatesService(IAppSettingsStore appSettings, IWebServiceClient service, ICipherManager cipherManager)
 {
     AppSettings   = appSettings;
     Service       = service;
     CipherManager = cipherManager;
 }
コード例 #10
0
 public PostCodeService(IWebServiceClient webService)
 {
     this.webService = webService ?? throw new System.ArgumentNullException(nameof(webService));
 }
コード例 #11
0
 public CheckUpdatesService(IAppSettingsStore appSettings, IWebServiceClient service, ICipherManager cipherManager)
 {
     AppSettings = appSettings;
     Service = service;
     CipherManager = cipherManager;
 }
コード例 #12
0
 public RethinkGoalService(IWebServiceClient<ChildInfo> apiClient, IServiceConfig serviceConfig = null)
 {
     _apiClient = apiClient;
     ServiceConfig = (serviceConfig == null || string.IsNullOrWhiteSpace(serviceConfig.ApiKey)) ? SetServiceConfig() : serviceConfig;
     _apiClient.BaseUri = ServiceConfig.BaseUrl;
 }
コード例 #13
0
ファイル: WhoisService.cs プロジェクト: helpmebot/helpmebot
 public WhoisService(IWebServiceClient wsc, BotConfiguration botConfig)
 {
     this.wsc       = wsc;
     this.botConfig = botConfig;
 }
コード例 #14
0
 public IpInfoDbGeolocationService(ILogger logger, BotConfiguration configuration, IWebServiceClient webServiceClient)
 {
     this.logger           = logger;
     this.configuration    = configuration;
     this.webServiceClient = webServiceClient;
 }