private Repository(ITfsConnectionInfoProvider tfsConnectionInfoProvider, ITfsUIInteractionProvider tfsUIInteractionProvider, IVMergeUIProvider vMergeUIProvider) { try { InitBackgroundTaskManager(); _tfsConnectionInfo = tfsConnectionInfoProvider; _tfsUIInteractionProvider = tfsUIInteractionProvider; _vMergeUIProvider = vMergeUIProvider; SynchronizationContext context = SynchronizationContext.Current; } catch (Exception ex) { SimpleLogger.Log(ex); } }
public static void Initialize(ITfsConnectionInfoProvider tfsConnectionInfoProvider, ITfsUIInteractionProvider tfsUIInteractionProvider, IVMergeUIProvider vMergeUIProvider) { if (_instance != null) { throw new InvalidOperationException("Already initialized!"); } _instance = new Repository(tfsConnectionInfoProvider, tfsUIInteractionProvider, vMergeUIProvider); }