/// <summary>
 /// Demonstrates a call to GetServiceDefinition that passes in a timestamp that is later
 /// than the last-updated date on the server. No results are returned. You can cache the
 /// GetServiceDefinition response and pass in the timestamp from the response in subsequent
 /// calls, allowing you to poll for updates and only download the full response when data
 /// changes.
 /// </summary>
 public IAsyncOperation <string> GetServiceDefinitionWithMaxDateAsync()
 {
     return(AsyncInfo.Run(async cancelToken =>
     {
         GetServiceDefinitionResponse response = await m_serviceMethods.GetServiceDefinition(System.DateTime.MaxValue, cancelToken);
         return response.ToXml();
     }));
 }
 /// <summary>
 /// Demonstrates a basic call to GetServiceDefinition.
 /// </summary>
 public IAsyncOperation <string> GetServiceDefinitionAsync()
 {
     return(AsyncInfo.Run(async cancelToken =>
     {
         GetServiceDefinitionResponse response = await m_serviceMethods.GetServiceDefinition(cancelToken);
         return response.ToXml();
     }));
 }
 /// <summary>
 /// Demonstrates a call to GetServiceDefinition that only downloads the specified sections
 /// of the response. Only downloading the data you need means a faster response time.
 /// </summary>
 public IAsyncOperation <string> GetServiceDefinitionShellPlatformTopologyAsync()
 {
     return(AsyncInfo.Run(async cancelToken =>
     {
         GetServiceDefinitionResponse response = await m_serviceMethods.GetServiceDefinition(
             new ServiceDefinitionResponseSections[] {
             ServiceDefinitionResponseSections.Shell,
             ServiceDefinitionResponseSections.Platform,
             ServiceDefinitionResponseSections.Topology
         },
             cancelToken);
         return response.ToXml();
     }));
 }