Ejemplo n.º 1
0
 public async Task Execute(JsonPatchDocument document, WorkItemUpdate update)
 {
     foreach (var processor in _processors)
     {
         await processor.Execute(document, update);
     }
 }
Ejemplo n.º 2
0
        public async Task Execute(WorkItemUpdate update)
        {
            if (update.Fields == null)
            {
                return;
            }
            await ReplaceTeamProject(update, "System.AreaPath");
            await ReplaceTeamProject(update, "System.IterationPath");

            update.Fields.Remove("System.TeamProject");
            update.Fields.Remove("System.AreaId");
            update.Fields.Remove("System.IterationId");
        }
Ejemplo n.º 3
0
        public void RemoveFields(string field)
        {
            var processor = new RemoveAutoFields();
            var update    = new WorkItemUpdate
            {
                Fields = new Dictionary <string, Value>
                {
                    [field] = new Value()
                }
            };

            processor.Execute(update);

            update.Fields.Should().BeEmpty();
        }