/// <summary> /// Loads the link types for processing /// </summary> private void LoadLinkTypes() { WorkItemLinkTypeCollection linkTypes = _wis.Projects[cboProjects.Text].Store.WorkItemLinkTypes; _selectedLinks = new List <TempLinkType>(); foreach (WorkItemLinkType t in linkTypes) { _selectedLinks.Add(new TempLinkType() { LinkType = t.ForwardEnd.Name, Selected = true, Enabled = true, IsForward = true }); //If the link type is related then the reverse is also related if (t.ForwardEnd.Name != "Related") { _selectedLinks.Add(new TempLinkType() { LinkType = t.ReverseEnd.Name, Selected = true, Enabled = true, IsForward = false }); } } _selectedLinks.Add(new TempLinkType() { LinkType = "Changesets", Selected = false, Enabled = true, IsForward = true }); _selectedLinks.Add(new TempLinkType() { LinkType = "Test Results", Selected = false, Enabled = true, IsForward = true }); //Feature not implemented yet //_selectedLinks.Add(new TempLinkType() { LinkType = "Show Hyperlinks", Selected = true, Enabled = true, IsForward = true }); lstLinkTypes.ItemsSource = _selectedLinks; }
public MockWorkItemStore([InstantHandle][NotNull] Func <ITeamProjectCollection> tpcFactory, [InstantHandle][NotNull] Func <MockWorkItemStore, IQueryFactory> queryFactory) { if (tpcFactory == null) { throw new ArgumentNullException(nameof(tpcFactory)); } if (queryFactory == null) { throw new ArgumentNullException(nameof(queryFactory)); } _tfs = new Lazy <ITeamProjectCollection>(tpcFactory); _queryFactory = new Lazy <IQueryFactory>(() => queryFactory(this)); _projects = new Lazy <IProjectCollection>(() => new MockProjectCollection(this)); WorkItemLinkTypes = new WorkItemLinkTypeCollection( CoreLinkTypeReferenceNames .All.Select(s => (IWorkItemLinkType) new MockWorkItemLinkType(s)) .ToList()); _lookup = new Dictionary <int, IWorkItem>(); LinkInfo = new List <IWorkItemLinkInfo>(); _storeDefinitions = new Lazy <IFieldDefinitionCollection>(() => new MockFieldDefinitionCollection(this)); Configuration = new MockWorkItemStoreConfiguration(); }
/// <summary> /// Loads the link types for processing /// </summary> private List <TempLinkType2> LoadLinkTypes(string project) { List <TempLinkType2> links = new List <TempLinkType2>(); WorkItemLinkTypeCollection linkTypes = _wis.Projects[project].Store.WorkItemLinkTypes; foreach (WorkItemLinkType t in linkTypes) { links.Add(new TempLinkType2() { Reverse = t.ForwardEnd.Name, Forward = t.ReverseEnd.Name }); } links.Add(new TempLinkType2() { Forward = "Has Work Items", Reverse = "Has Changesets" }); links.Add(new TempLinkType2() { Forward = "Test Results", Reverse = "Test Results" }); links.Add(new TempLinkType2() { Forward = "In Changeset", Reverse = "Has Files" }); //Used for dependency analysis only links.Add(new TempLinkType2() { Forward = "Associated Work Items", Reverse = "Has Files" }); return(links); }
internal static WorkItemLinkTypeCollectionWrapper GetInstance() { WorkItemLinkTypeCollection real = default(WorkItemLinkTypeCollection); RealInstanceFactory(ref real); var instance = (WorkItemLinkTypeCollectionWrapper)WorkItemLinkTypeCollectionWrapper.GetWrapper(real); InstanceFactory(ref instance); if (instance == null) { Assert.Inconclusive("Could not Create Test Instance"); } return(instance); }
static partial void RealInstanceFactory(ref WorkItemLinkTypeCollection real, string callerName) { real = (WorkItemLinkTypeCollection)FormatterServices.GetUninitializedObject(typeof(WorkItemLinkTypeCollection)); }
static partial void RealInstanceFactory(ref WorkItemLinkTypeCollection real, [CallerMemberName] string callerName = "");