public static IList <TrackBranch> DeserializeClean(string path, DXVcsWrapper vcsWrapper) { var branches = DeserializeCore(path); ProcessTrackItems(branches, vcsWrapper, false); return(branches); }
public RegisteredUsers(GitLabWrapper gitLabWrapper, DXVcsWrapper vcsWrapper) { this.gitLabWrapper = gitLabWrapper; ADUsers = ADWrapper.GetUsers().ToDictionary(x => x.UserName, new UserNameEqualityComparer()); Users = CreateGitLabUsers().ToDictionary(x => x.UserName, new UserNameEqualityComparer()); this.VcsUsers = vcsWrapper.GetUsers().ToList(); }
public SyncHistoryWrapper(SyncHistory history, DXVcsWrapper vcsWrapper, string vcsHistoryPath, string localHistoryPath) { this.history = history; this.vcsHistoryPath = vcsHistoryPath; this.localHistoryPath = localHistoryPath; this.vcsWrapper = vcsWrapper; }
public void RegisterUser() { GitLabWrapper gitLabWrapper = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken); DXVcsWrapper vcsWrapper = new DXVcsWrapper(TestCredentials.VcsServer); RegisteredUsers users = new RegisteredUsers(gitLabWrapper, vcsWrapper); var user = users.GetUser("Barakhov"); }
static void ProcessTrackItems(IList <TrackBranch> branches, DXVcsWrapper vcsWrapper) { foreach (var branch in branches) { foreach (var trackItem in branch.TrackItems) { trackItem.Branch = branch; } branch.TrackItems = CalcTrackItems(branch, branch.TrackItems, vcsWrapper); } }
public static IList <TrackBranch> Deserialize(string path, DXVcsWrapper vcsWrapper) { if (!File.Exists(path)) { Log.Error($"Track branch config with path {path} was not found."); return(new List <TrackBranch>()); } SharpSerializer serializer = new SharpSerializer(); var branches = (IList <TrackBranch>)serializer.Deserialize(path); ProcessTrackItems(branches, vcsWrapper); return(branches); }
public void SearchRegisteredUser() { GitLabWrapper gitLabWrapper = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken); DXVcsWrapper vcsWrapper = new DXVcsWrapper(TestCredentials.VcsServer); RegisteredUsers users = new RegisteredUsers(gitLabWrapper, vcsWrapper); var user = users.GetUser("litvinov"); Assert.IsNotNull(user); Assert.IsTrue(user.IsRegistered); var user2 = users.GetUser("Litvinov"); Assert.IsNotNull(user2); Assert.IsTrue(user2.IsRegistered); }
static IList <TrackItem> CalcTrackItems(TrackBranch branch, IEnumerable <TrackItem> trackItems, DXVcsWrapper vcsWrapper) { List <TrackItem> list = new List <TrackItem>(); foreach (var trackItem in trackItems) { list.AddRange(vcsWrapper.GenerateTrackItems(branch, trackItem)); } return(list); }