protected int CompareTo(ChorusUrl other) { // Culture specific sorting desirable in file paths // ReSharper disable StringCompareToIsCultureSpecific int result = ServerUrl.CompareTo(other.ServerUrl); if (result != 0) { return(result); } if (FileId.HasValue) { result = FileId.Value.CompareTo(other.FileId); if (result != 0) { return(result); } } else if (other.FileId.HasValue) { return(-1); } return(Path.CompareTo(other.Path)); // ReSharper restore StringCompareToIsCultureSpecific }
public RemoteChromDataProvider(SrmDocument document, IRetentionTimePredictor retentionTimePredictor, ChromFileInfo chromFileInfo, IProgressStatus progressStatus, int startPercent, int endPercent, ILoadMonitor loader) : base(chromFileInfo, progressStatus, startPercent, endPercent, loader) { _document = document; ChorusUrl chorusUrl = (ChorusUrl)chromFileInfo.FilePath; _chorusAccount = chorusUrl.FindChorusAccount(Settings.Default.RemoteAccountList); var chromatogramRequestProviders = new List <ChromatogramRequestProvider>(); foreach (bool firstPass in new[] { true, false }) { if (null == retentionTimePredictor && !firstPass) { continue; } var chromatogramRequestProvider = new ChromatogramRequestProvider(document, chorusUrl, retentionTimePredictor, firstPass); if (0 == chromatogramRequestProvider.ChromKeys.Count) { continue; } chromatogramRequestProviders.Add(chromatogramRequestProvider); } _chromatogramRequestProviders = chromatogramRequestProviders.ToArray(); _chromTaskLists = new ChromTaskList[_chromatogramRequestProviders.Length]; }
protected bool Equals(ChorusUrl other) { return(string.Equals(ServerUrl, other.ServerUrl) && Equals(ExperimentId, other.ExperimentId) && Equals(ProjectId, other.ProjectId) && Equals(FileId, other.FileId) && Equals(RunStartTime, other.RunStartTime) && string.Equals(Path, other.Path)); }
protected ChorusUrl(ChorusUrl chorusUrl) { ServerUrl = chorusUrl.ServerUrl; Username = chorusUrl.Username; ProjectId = chorusUrl.ProjectId; ExperimentId = chorusUrl.ExperimentId; FileId = chorusUrl.FileId; Path = chorusUrl.Path; RunStartTime = chorusUrl.RunStartTime; FileWriteTime = chorusUrl.FileWriteTime; }
public ChromFileInfo(MsDataFileUri filePath) : base(new ChromFileInfoId()) { ChorusUrl chorusUrl = filePath as ChorusUrl; if (null != chorusUrl) { FileWriteTime = chorusUrl.FileWriteTime; RunStartTime = chorusUrl.RunStartTime; filePath = chorusUrl.SetFileWriteTime(null).SetRunStartTime(null); } FilePath = filePath; InstrumentInfoList = new MsInstrumentConfigInfo[0]; }
protected bool Equals(ChorusUrl other) { return string.Equals(ServerUrl, other.ServerUrl) && Equals(ExperimentId, other.ExperimentId) && Equals(ProjectId, other.ProjectId) && Equals(FileId, other.FileId) && Equals(RunStartTime, other.RunStartTime) && string.Equals(Path, other.Path); }
protected int CompareTo(ChorusUrl other) { // Culture specific sorting desirable in file paths // ReSharper disable StringCompareToIsCultureSpecific int result = ServerUrl.CompareTo(other.ServerUrl); if (result != 0) return result; if (FileId.HasValue) { result = FileId.Value.CompareTo(other.FileId); if (result != 0) { return result; } } else if (other.FileId.HasValue) { return -1; } return Path.CompareTo(other.Path); // ReSharper restore StringCompareToIsCultureSpecific }
private ChorusAccount GetChorusAccount(ChorusUrl chorusUrl) { return _chorusAccounts.FirstOrDefault( chorusAccount => Equals(chorusAccount.ServerUrl, chorusUrl.ServerUrl) && Equals(chorusAccount.Username, chorusUrl.Username)); }