当前位置: 首页>>代码示例>>C#>>正文


C# IPEndPoint.ToHttps方法代码示例

本文整理汇总了C#中System.Net.IPEndPoint.ToHttps方法的典型用法代码示例。如果您正苦于以下问题:C# IPEndPoint.ToHttps方法的具体用法?C# IPEndPoint.ToHttps怎么用?C# IPEndPoint.ToHttps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Net.IPEndPoint的用法示例。


在下文中一共展示了IPEndPoint.ToHttps方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ServerInfo

 public ServerInfo(IProcessManagerSync pm, IPEndPoint http, IPEndPoint https) {
     IsHttpPortRegistered = (http != null) && QueryPortRegistered(pm, http.ToHttp());
     IsHttpsPortRegistered = (https != null) && QueryPortRegistered(pm, https.ToHttps());
     IsCertRegistered = QueryCertRegistered(pm, https);
     MainLog.Logger.Info(
         $"HttpRegistered: {IsHttpPortRegistered} ({http}), HttpsRegistered: {IsHttpsPortRegistered} ({https}), CertRegistered: {IsCertRegistered}");
 }
开发者ID:SIXNetworks,项目名称:withSIX.Desktop,代码行数:7,代码来源:WebInitializer.cs

示例2: BuildUrls

 private static List<string> BuildUrls(IPEndPoint http, IPEndPoint https) {
     var urls = new List<string>();
     if ((http == null) && (https == null))
         throw new CannotOpenApiPortException("No HTTP or HTTPS ports available");
     if (http != null)
         urls.Add(http.ToHttp());
     if (https != null)
         urls.Add(https.ToHttps());
     return urls;
 }
开发者ID:SIXNetworks,项目名称:withSIX.Desktop,代码行数:10,代码来源:WebServerStartup.cs

示例3: Run

        public virtual Task Run(IPEndPoint http, IPEndPoint https, CancellationToken cancelToken) {
            var hostBuilder = new WebHostBuilder();
            //        .UseContentRoot(Directory.GetCurrentDirectory())
            ConfigureBuilder(hostBuilder);

            var urls = new List<string>();
            if ((http == null) && (https == null))
                throw new CannotOpenApiPortException("No HTTP or HTTPS ports available");
            if (http != null)
                urls.Add(http.ToHttp());
            if (https != null)
                urls.Add(https.ToHttps());
            hostBuilder.UseUrls(urls.ToArray());
            var webHost = hostBuilder.Build();
            return TaskExt.StartLongRunningTask(() => webHost.Run(cancelToken), cancelToken);
        }
开发者ID:SIXNetworks,项目名称:withSIX.Desktop,代码行数:16,代码来源:Startup.cs


注:本文中的System.Net.IPEndPoint.ToHttps方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。