Пример #1
0
        static void Main(string[] args)
        {
            try
            {
                // There are 2 arguments.
                if (args.Length == 2)
                {
                    // Get CollectionUrl and WorkItemID from the arguments.
                    Uri collectionUri = new Uri(args[0]);
                    int workitemID    = int.Parse(args[1]);

                    using (WorkItemLinkQuery query = new WorkItemLinkQuery(collectionUri))
                    {
                        // Get the WorkItemLinkInfoDetails list of a work item.
                        var detailsList = query.GetWorkItemLinkInfos(workitemID);

                        foreach (WorkItemLinkInfoDetails details in detailsList)
                        {
                            Console.WriteLine(details.ToString());
                        }
                    }
                }
                else
                {
                    Console.WriteLine("Use following command arguments to use this application:");
                    Console.WriteLine("CSTFSWorkItemLinkInfoDetails.exe <CollectionUrl> <WorkItemID>");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            try
            {
               // 这里有两个参数。
                if (args.Length == 2)
                {

                    // 从参数中获取CollectionUrl和WorkItemID。
                    Uri collectionUri = new Uri(args[0]);
                    int workitemID = int.Parse(args[1]);

                    using (WorkItemLinkQuery query = new WorkItemLinkQuery(collectionUri))
                    {

                        // 从一个work item中获取WorkItemLinkInfoDetails列表。
                        var detailsList = query.GetWorkItemLinkInfos(workitemID);

                        foreach (WorkItemLinkInfoDetails details in detailsList)
                        {
                            Console.WriteLine(details.ToString());
                        }
                    }
                }
                else
                {
                    Console.WriteLine("使用下面的命令参数使用本程序:");
                    Console.WriteLine("CSTFSWorkItemLinkInfoDetails.exe <CollectionUrl> <WorkItemID>");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            try
            {
                // 这里有两个参数。
                if (args.Length == 2)
                {
                    // 从参数中获取CollectionUrl和WorkItemID。
                    Uri collectionUri = new Uri(args[0]);
                    int workitemID    = int.Parse(args[1]);

                    using (WorkItemLinkQuery query = new WorkItemLinkQuery(collectionUri))
                    {
                        // 从一个work item中获取WorkItemLinkInfoDetails列表。
                        var detailsList = query.GetWorkItemLinkInfos(workitemID);

                        foreach (WorkItemLinkInfoDetails details in detailsList)
                        {
                            Console.WriteLine(details.ToString());
                        }
                    }
                }
                else
                {
                    Console.WriteLine("使用下面的命令参数使用本程序:");
                    Console.WriteLine("CSTFSWorkItemLinkInfoDetails.exe <CollectionUrl> <WorkItemID>");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }