示例#1
0
 public TfsCache(TfsTeamProjectCollection tfs, string rootFolder, IThreadingServices threadingServices)
 {
     this.Tfs = tfs;
     this.VersionControlServer = Tfs.GetService <VersionControlServer>();
     _folders = new TfsFolderCache(rootFolder, TimeSpan.FromSeconds(5), VersionControlServer, threadingServices);
     _files   = new TfsFilesCache(rootFolder, TimeSpan.FromSeconds(30), VersionControlServer, threadingServices);
 }
示例#2
0
 public Worker(ISupportBranching branchableComponent,
               Folders.ComponentsFolder targetComponentsFolder,
               IThreadingServices threadingServices,
               ILogger logger)
 {
     _branchableComponent    = branchableComponent;
     _targetComponentsFolder = targetComponentsFolder;
     _threadingServices      = threadingServices;
     _logger = logger;
 }
示例#3
0
        public WpfApplicationServices(string applicationUniqueName, ILoggerFactory loggerFactory, IThreadingServices threadingServices)
        {
            _applicationUniqueName = applicationUniqueName;
            _logger            = loggerFactory.CreateLogger(this.GetType());
            _threadingServices = threadingServices;

            _userInterfaceServices = new WpfUserInterfaceServices(this);

            Application.Current.Exit += Application_Exit;
            threadingServices.StartNewTask(RegisterToMainWindowClosing);
        }
示例#4
0
        public TfsCachedItems(string rootFolder,
                              TimeSpan refreshInterval,
                              VersionControlServer versionControlServer,
                              IThreadingServices threadingServices)
        {
            _rootFolder               = rootFolder;
            _refreshInterval          = refreshInterval;
            this.VersionControlServer = versionControlServer;

            RebuildCache();

            _autoResetEvent = threadingServices.CreateAutoResetEvent(false);
            threadingServices.StartNewTask(RebuildCacheLoop);
        }
示例#5
0
        public RequestQueue(ThrottlingOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            _threading = options.ThreadingServices;
            _activeThreadsBeforeLocalRequestsQueue     = options.ActiveThreadsBeforeLocalRequestsQueue;
            _activeThreadsBeforeRemoteRequestsQueue    = options.ActiveThreadsBeforeRemoteRequestsQueue;
            _queueLengthBeforeIncomingRequestsRejected = options.QueueLengthBeforeIncomingRequestsRejected;

            _maxThreads = _threading.GetMaxThreads();

            _executeIfNeeded = ExecuteIfNeeded;
        }
示例#6
0
        public RequestQueue(ThrottlingOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            _threading = options.ThreadingServices;
            _activeThreadsBeforeLocalRequestsQueue = options.ActiveThreadsBeforeLocalRequestsQueue;
            _activeThreadsBeforeRemoteRequestsQueue = options.ActiveThreadsBeforeRemoteRequestsQueue;
            _queueLengthBeforeIncomingRequestsRejected = options.QueueLengthBeforeIncomingRequestsRejected;

            _maxThreads = _threading.GetMaxThreads();

            _executeIfNeeded = ExecuteIfNeeded;
        }
示例#7
0
 public TfsFilesCache(string rootFolder, TimeSpan refreshInterval, VersionControlServer versionControlServer, IThreadingServices threadingServices) : base(rootFolder, refreshInterval, versionControlServer, threadingServices)
 {
 }
示例#8
0
 public TfsGateway(IFileSystemManager fileSystemManager, IWorkspaceSelector workspaceSelector, IThreadingServices threadingServices)
 {
     _fileSystemManager   = fileSystemManager;
     _workspaceSelector   = workspaceSelector;
     this.Tfs             = TfsCollectionFactory.Create();
     _tfsCache            = new TfsCache(Tfs, ROOT_FOLDER, threadingServices);
     _historyCacheManager = new HistoryCacheManager(this.VersionControlServer);
 }
示例#9
0
 public MergeSetsReader(IThreadingServices threadingServices, ILoggerFactory loggerFactory)
 {
     _threadingServices = threadingServices;
     this.Logger        = loggerFactory.CreateLogger(this.GetType());
 }