コード例 #1
0
 protected override IGatewayServiceManagement CreateChannel()
 {
     if (base.get_ServiceBinding() == null)
     {
         base.set_ServiceBinding(ConfigurationConstants.WebHttpBinding());
     }
     if (!string.IsNullOrEmpty(base.get_CurrentSubscription().get_ServiceEndpoint()))
     {
         base.set_ServiceEndpoint(base.get_CurrentSubscription().get_ServiceEndpoint());
     }
     else
     {
         base.set_ServiceEndpoint("https://management.core.windows.net");
     }
     return(GatewayManagementHelper.CreateGatewayManagementChannel(base.get_ServiceBinding(), new Uri(base.get_ServiceEndpoint()), base.get_CurrentSubscription().get_Certificate()));
 }
コード例 #2
0
        protected override IGatewayServiceManagement CreateChannel()
        {
            if (ServiceBinding == null)
            {
                ServiceBinding = ConfigurationConstants.WebHttpBinding();
            }

            if (string.IsNullOrEmpty(CurrentSubscription.ServiceEndpoint))
            {
                ServiceEndpoint = ConfigurationConstants.ServiceManagementEndpoint;
            }
            else
            {
                ServiceEndpoint = CurrentSubscription.ServiceEndpoint;
            }

            return(GatewayManagementHelper.CreateGatewayManagementChannel(ServiceBinding, new Uri(ServiceEndpoint), CurrentSubscription.Certificate));
        }