コード例 #1
0
        public IWorkItem GetWorkItem(int workItemId)
        {
            IWorkItem result;
            if (!this.loadedWorkItems.TryGetValue(workItemId, out result))
            {
                result = new WorkItemWrapper(this.workItemStore.GetWorkItem(workItemId), this, this.logger);
                this.loadedWorkItems.Add(workItemId, result);
            }

            return result;
        }
コード例 #2
0
        public IWorkItem GetWorkItem(int workItemId)
        {
            IWorkItem result;

            if (!this.loadedWorkItems.TryGetValue(workItemId, out result))
            {
                result = new WorkItemWrapper(this.workItemStore.GetWorkItem(workItemId), this.context);
                this.loadedWorkItems.Add(workItemId, result);
            }

            return(result);
        }
コード例 #3
0
        public IWorkItem MakeNewWorkItem(string projectName, string workItemTypeName)
        {
            if (this.workItemStore == null)
            {
                this.ConnectToWorkItemStore();
            }

            var targetType = this.workItemStore.Projects[projectName].WorkItemTypes[workItemTypeName];
            var target     = new WorkItem(targetType);

            IWorkItem justCreated = new WorkItemWrapper(target, this, this.logger);

            this.createdWorkItems.Add(justCreated);
            return(justCreated);
        }
コード例 #4
0
        public IWorkItem GetWorkItem(int workItemId)
        {
            if (this.workItemStore == null)
            {
                this.ConnectToWorkItemStore();
            }

            IWorkItem result;

            if (!this.loadedWorkItems.TryGetValue(workItemId, out result))
            {
                result = new WorkItemWrapper(this.workItemStore.GetWorkItem(workItemId), this, this.logger);
                this.loadedWorkItems.Add(workItemId, result);
            }

            return(result);
        }
コード例 #5
0
        public IWorkItem MakeNewWorkItem(string projectName, string workItemTypeName)
        {
            if (string.IsNullOrWhiteSpace(projectName))
            {
                throw new ArgumentNullException(nameof(projectName));
            }

            if (string.IsNullOrWhiteSpace(workItemTypeName))
            {
                throw new ArgumentNullException(nameof(workItemTypeName));
            }

            var targetType = this.workItemStore.Projects[projectName].WorkItemTypes[workItemTypeName];
            var target     = new WorkItem(targetType);

            IWorkItem justCreated = new WorkItemWrapper(target, this.context);

            this.createdWorkItems.Add(justCreated);
            return(justCreated);
        }
コード例 #6
0
        public IWorkItem MakeNewWorkItem(string projectName, string workItemTypeName)
        {
            if (this.workItemStore == null)
            {
                this.ConnectToWorkItemStore();
            }

            var targetType = this.workItemStore.Projects[projectName].WorkItemTypes[workItemTypeName];
            var target = new WorkItem(targetType);

            IWorkItem justCreated = new WorkItemWrapper(target, this, this.logger);
            this.createdWorkItems.Add(justCreated);
            return justCreated;
        }