コード例 #1
0
        public WurmAssistantService(string webServiceRootUrl, IStagingLocation stagingLocation)
        {
            if (webServiceRootUrl == null) throw new ArgumentNullException("webServiceRootUrl");
            if (stagingLocation == null) throw new ArgumentNullException("stagingLocation");
            if (webServiceRootUrl.EndsWith("/"))
            {
                webServiceRootUrl = webServiceRootUrl.Substring(0, webServiceRootUrl.Length - 1);
            }
            this.webServiceRootUrl = webServiceRootUrl;

            this.stagingLocation = stagingLocation;
        }
コード例 #2
0
        public UpdateService([NotNull] ControllerConfig controllerConfig, IStagingLocation stagingLocation)
        {
            if (controllerConfig == null)
            {
                throw new ArgumentNullException("controllerConfig");
            }
            if (stagingLocation == null)
            {
                throw new ArgumentNullException("stagingLocation");
            }

            this.webServiceRootUrl = controllerConfig.WebServiceRootUrl;
            if (webServiceRootUrl.EndsWith("/"))
            {
                webServiceRootUrl = webServiceRootUrl.Substring(0, webServiceRootUrl.Length - 1);
            }

            this.stagingLocation      = stagingLocation;
            this.wurmAssistantService = new WurmAssistantService(webServiceRootUrl);
        }