public WorkItemManager(ProjectCollection collection)
 {
     this.collection = collection;
     this.clientService = collection.GetService<ClientService>();
     Init();
 }
Пример #2
0
 public WorkItemStore(StoredQuery query)
 {
     this.clientService = query.Collection.GetService <ClientService>();
     this.query         = query;
 }
Пример #3
0
        public WorkItemStore(TeamFoundationServer teamFoundationServer)
        {
            this.teamFoundationServer = teamFoundationServer;
            clientService = new ClientService(teamFoundationServer.Uri, teamFoundationServer.Credentials);
            List<MetadataTableHaveEntry> metadataHave = new List<MetadataTableHaveEntry>();
            metadataHave.Add(new MetadataTableHaveEntry("Hierarchy", 0));
            metadataHave.Add(new MetadataTableHaveEntry("Fields", 0));
            metadataHave.Add(new MetadataTableHaveEntry("HierarchyProperties", 0));
            metadataHave.Add(new MetadataTableHaveEntry("Constants", 0));
            metadataHave.Add(new MetadataTableHaveEntry("Rules", 0));
            metadataHave.Add(new MetadataTableHaveEntry("ConstantSets", 0));
            metadataHave.Add(new MetadataTableHaveEntry("FieldUsages", 0));
            metadataHave.Add(new MetadataTableHaveEntry("WorkItemTypes", 0));
            metadataHave.Add(new MetadataTableHaveEntry("Actions", 0));
            metadataHave.Add(new MetadataTableHaveEntry("WorkItemTypeUsages", 0));

            int mode = 0; int comparisonStyle = 0; int locale = 0;
            string dbStamp = String.Empty;
            DataSet dataSet = clientService.GetMetadataEx2(metadataHave.ToArray(), true, out dbStamp, out locale, out comparisonStyle, out mode);

            foreach(DataTable table in dataSet.Tables)
                {
                    Console.WriteLine(table.TableName);
                    Console.WriteLine("========================================================");

                    foreach(DataRow row in table.Rows)
                        {
                            foreach (DataColumn column in table.Columns)
                                {
                                    Console.Write(column.ColumnName + "=" + row[column] + ", ");
                                }
                            Console.WriteLine();
                        }

                        Console.WriteLine();
                }
        }
 public WorkItemStore(StoredQuery query)
 {
     this.clientService = query.Collection.GetService<ClientService>();
     this.query = query;
 }