/// <summary>Notifies that remote branch was created externally.</summary> /// <param name="branchData">Created remote branch data.</param> /// <returns>Created remote branch.</returns> internal RemoteBranch NotifyCreated(BranchData branchData) { var branch = ObjectFactories.CreateRemoteBranch(Repository, branchData); AddObject(branch); return(branch); }
/// <summary>Perform initial load of remote branches.</summary> /// <param name="branchDataList">List of remote branch data containers.</param> internal void Load(IEnumerable <BranchData> branchDataList) { ObjectStorage.Clear(); if (branchDataList != null) { foreach (var remoteBranchData in branchDataList) { AddObject(ObjectFactories.CreateRemoteBranch(Repository, remoteBranchData)); } } }
/// <summary>Updates remote branch cache.</summary> /// <param name="branches">Actual remote branch data.</param> private void RefreshInternal(IEnumerable <BranchData> branches) { lock (SyncRoot) { CacheUpdater.UpdateObjectDictionary <RemoteBranch, BranchData>( ObjectStorage, null, branchData => branchData.IsRemote, branches, remoteBranchData => ObjectFactories.CreateRemoteBranch(Repository, remoteBranchData), ObjectFactories.UpdateRemoteBranch, InvokeObjectAdded, InvokeObjectRemoved, true); } }