Inheritance: IModelChanged
コード例 #1
0
 public SynchronisationInfo()
 {
     _resources = new List<string>();
     _source = new EndPointInfo();
     _target = new EndPointInfo();
     _logging = new EndPointInfo();
 }
コード例 #2
0
 public SynchronisationInfo()
 {
     _resources = new List <string>();
     _source    = new EndPointInfo();
     _target    = new EndPointInfo();
     _logging   = new EndPointInfo();
 }
コード例 #3
0
 public AuthenticationForm(EndPointInfo endpointInfo)
 {
     _endpointInfo = endpointInfo;
     InitializeComponent();
     if (_endpointInfo.Url != null)
         lblUrl.Text = _endpointInfo.Url.ToString();
     if (_endpointInfo.Credentials != null)
     {
         this.txtUser.Text = _endpointInfo.Credentials.User;
         this.txtPassword.Text = _endpointInfo.Credentials.Password;
     }
 }
コード例 #4
0
ファイル: Engine.cs プロジェクト: Sage/SData-Contracts
        private bool CheckSyncDigest(HttpClient httpClient, string resource, EndPointInfo endpoint)
        {
            string tmpUrl = endpoint.GetResourceUri(resource).ToString();
            tmpUrl = string.Format("{0}/{1}?runName={2}&runStamp={3}", tmpUrl, "$syncDigest", "testDigest", this.RunStamp.ToUniversalTime());
            HttpResponseMessage respMsg = httpClient.Get(tmpUrl);

            respMsg.Content.LoadIntoBuffer();

            if (respMsg.StatusCode == HttpStatusCode.OK)
            {
                return true;
            }

            this.Logger.Write(string.Format("The Resource {0} is not accessable", resource), Severity.Error);
            this.Logger.Write(string.Format("on following root url {0}", endpoint.UrlString), Severity.Error);
            return false;
        }
コード例 #5
0
ファイル: Engine.cs プロジェクト: Sage/SData-Contracts
 private HttpClient GetHttpClient(EndPointInfo endpoint, ProxyInfo proxy, string resource)
 {
     HttpClient result = new HttpClient();
     result.BaseAddress = endpoint.GetResourceUri(resource);
     if ((endpoint.Credentials != null) && (!String.IsNullOrEmpty(endpoint.Credentials.User)))
     {
         result.TransportSettings.Credentials = new NetworkCredential(endpoint.Credentials.User, endpoint.Credentials.Password);
     }
     if ((proxy != null) && (!String.IsNullOrEmpty(proxy.Host)))
     {
         WebProxy webProxy = new WebProxy(proxy.Host, proxy.Port);
         if ((proxy.Credentials != null) && (!String.IsNullOrEmpty(proxy.Credentials.User)))
         {
             webProxy.Credentials = new NetworkCredential(proxy.Credentials.User, proxy.Credentials.Password);
         }
         result.TransportSettings.Proxy = webProxy;
     }
     result.TransportSettings.ConnectionTimeout = new TimeSpan(0, 5, 0);
     return result;
 }