CreateRequest() public method

public CreateRequest ( string serviceUrl ) : HttpWebRequest
serviceUrl string
return System.Net.HttpWebRequest
 public void Connect()
 {
     var service = new ServiceChecker();
     var request = service.CreateRequest("/TeamFoundation/Administration/v3.0/LocationService.asmx");
     XElement message;
     var requestDoc = service.CreateEnvelope("Connect", ns, out message);
     requestDoc.Save(request.GetRequestStream());
     Console.WriteLine(requestDoc);
     using (var response = service.GetResponse(request))
     {
         var responseDoc = XDocument.Load(response.GetResponseStream());
         Console.WriteLine(responseDoc);
     }
 }
 public void GetProjectLocationServises()
 {
     var service = new ServiceChecker();
     var request = service.CreateRequest("/TFS19/Services/v3.0/LocationService.asmx");
     XElement message;
     var requestDoc = service.CreateEnvelope("QueryServices", ns, out message);
     requestDoc.Save(request.GetRequestStream());
     Console.WriteLine(requestDoc);
     using (var response = service.GetResponse(request))
     {
         var responseDoc = XDocument.Load(response.GetResponseStream());
         Console.WriteLine(responseDoc);
     }
 }
        public void GetDefaultCollectionId()
        {
            var      service = new ServiceChecker();
            var      request = service.CreateRequest("/TeamFoundation/Administration/v3.0/TeamProjectCollectionService.asmx");
            XElement message;
            var      requestDoc = service.CreateEnvelope("GetDefaultCollectionId", ns, out message);

            requestDoc.Save(request.GetRequestStream());
            Console.WriteLine(requestDoc);
            using (var response = service.GetResponse(request))
            {
                var responseDoc = XDocument.Load(response.GetResponseStream());
                Console.WriteLine(responseDoc);
            }
        }
        public void GetProjectLocationServises()
        {
            var      service = new ServiceChecker();
            var      request = service.CreateRequest("/TFS19/Services/v3.0/LocationService.asmx");
            XElement message;
            var      requestDoc = service.CreateEnvelope("QueryServices", ns, out message);

            requestDoc.Save(request.GetRequestStream());
            Console.WriteLine(requestDoc);
            using (var response = service.GetResponse(request))
            {
                var responseDoc = XDocument.Load(response.GetResponseStream());
                Console.WriteLine(responseDoc);
            }
        }
        public void QueryResourceTypes()
        {
            var      service = new ServiceChecker();
            var      request = service.CreateRequest("/TeamFoundation/Administration/v3.0/CatalogService.asmx");
            XElement message;
            var      requestDoc = service.CreateEnvelope("QueryResourceTypes", ns, out message);

            requestDoc.Save(request.GetRequestStream());
            Console.WriteLine(requestDoc);
            using (var response = service.GetResponse(request))
            {
                var responseDoc = XDocument.Load(response.GetResponseStream());
                Console.WriteLine(responseDoc);
            }
        }
 public void GetCollectionProperties()
 {
     var service = new ServiceChecker();
     var request = service.CreateRequest("/TeamFoundation/Administration/v3.0/TeamProjectCollectionService.asmx");
     XElement message;
     var requestDoc = service.CreateEnvelope("GetCollectionProperties", ns, out message);
     message.Add(new XElement(ns + "ids", new XElement(ns + "guid", Guid.Empty)));
     requestDoc.Save(request.GetRequestStream());
     Console.WriteLine(requestDoc);
     using (var response = service.GetResponse(request))
     {
         var responseDoc = XDocument.Load(response.GetResponseStream());
         Console.WriteLine(responseDoc);
     }
 }
        public void QueryHistory()
        {
            var      service = new ServiceChecker();
            var      request = service.CreateRequest("/TeamFoundation/Administration/v3.0/CatalogService.asmx");
            XElement message;
            var      requestDoc = service.CreateEnvelope("QueryResourcesByType", ns, out message);

            message.Add(new XElement(ns + "resourceTypes", new XElement(ns + "guid", "26338d9e-d437-44aa-91f2-55880a328b54")));
            requestDoc.Save(request.GetRequestStream());
            Console.WriteLine(requestDoc);
            using (var response = service.GetResponse(request))
            {
                var responseDoc = XDocument.Load(response.GetResponseStream());
                Console.WriteLine(responseDoc);
            }
        }
        public void GetCollectionProperties()
        {
            var      service = new ServiceChecker();
            var      request = service.CreateRequest("/TeamFoundation/Administration/v3.0/TeamProjectCollectionService.asmx");
            XElement message;
            var      requestDoc = service.CreateEnvelope("GetCollectionProperties", ns, out message);

            message.Add(new XElement(ns + "ids", new XElement(ns + "guid", Guid.Empty)));
            requestDoc.Save(request.GetRequestStream());
            Console.WriteLine(requestDoc);
            using (var response = service.GetResponse(request))
            {
                var responseDoc = XDocument.Load(response.GetResponseStream());
                Console.WriteLine(responseDoc);
            }
        }
 public void QueryResourcesByType()
 {
     var service = new ServiceChecker();
     var request = service.CreateRequest("/TeamFoundation/Administration/v3.0/CatalogService.asmx");
     XElement message;
     var requestDoc = service.CreateEnvelope("QueryResourcesByType", ns, out message);
     message.Add(new XElement(ns + "resourceTypes", new XElement(ns + "guid", "26338d9e-d437-44aa-91f2-55880a328b54")));
     requestDoc.Save(request.GetRequestStream());
     Console.WriteLine(requestDoc);
     using (var response = service.GetResponse(request))
     {
         var responseDoc = XDocument.Load(response.GetResponseStream());
         Console.WriteLine(responseDoc);
     }
 }