示例#1
0
    public ConflictResolver(Options options)
    {
      this.resolveWith = options.ResolveWith; 
      this.fwsMerge = Environment.GetEnvironmentVariable("FWSMERGE"); 
      this.tempDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), 
        @"fwsync\temp"); 
      this.confirmAll = options.ConfirmAll; 

      if (!Directory.Exists(tempDir))
      {
        Directory.CreateDirectory(tempDir); 
      }

      if (this.fwsMerge == null)
      {
        this.fwsMerge = ""; 
      }

      if (resolveWith == null)
      {
        this.resolveWith = ""; 
      }

      this.fwsMerge    = this.fwsMerge.Trim(); 
      this.resolveWith = this.resolveWith.Trim(); 

    }
示例#2
0
文件: App.cs 项目: nuxleus/flexwiki
    private static FwEditServiceProxy CreateEditServiceProxy(Options options)
    {
      FwEditServiceProxy proxy = new FwEditServiceProxy(); 

      if (options.EditServiceUri != null)
      {
        proxy.Uri = options.EditServiceUri; 
      }

      // This prevents the proxy from reauthenticating on every single
      // request. Since authentication adds two roundtrips for /defcred
      // authentication, this can nearly triple the speed of some operations
      proxy.UnsafeAuthenticatedConnectionSharing = true; 

      if (options.UseDefaultCredentials)
      {
        proxy.Credentials = CredentialCache.DefaultCredentials; 
      }
      else if (options.Credentials != null)
      {
        proxy.Credentials = options.Credentials; 
      }

      return proxy; 
    }