• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CloseReason类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CloseReason的典型用法代码示例。如果您正苦于以下问题:C# CloseReason类的具体用法?C# CloseReason怎么用?C# CloseReason使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CloseReason类属于命名空间,在下文中一共展示了CloseReason类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CloseAsync

 public async Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:tzkwizard,项目名称:Azure,代码行数:7,代码来源:EventHubHost.cs


示例2: socketServer_SessionClosed

        void socketServer_SessionClosed(WebSocketSession session, CloseReason reason)
        {
            if (reason == CloseReason.ServerShutdown)
                return;

            SendToAll("System: " + session.Cookies["name"] + " disconnected");
        }
开发者ID:2594636985,项目名称:SuperWebSocket,代码行数:7,代码来源:Global.asax.cs


示例3: secureSocketServer_SessionClosed

 void secureSocketServer_SessionClosed(WebSocketSession session, CloseReason reason)
 {
     lock (m_SecureSessionSyncRoot)
     {
         m_SecureSessions.Remove(session);
     }
 }
开发者ID:B3nCr,项目名称:SuperWebSocket,代码行数:7,代码来源:Global.asax.cs


示例4: RiseOnCloseRequired

 protected void RiseOnCloseRequired(CloseReason reason)
 {
     if (OnCloseRequired != null)
     {
         OnCloseRequired(this, new CloseEventArgs(reason));
     }
 }
开发者ID:rsrlab,项目名称:LocalDoc,代码行数:7,代码来源:BaseViewModel.cs


示例5:

 async Task IEventProcessor.CloseAsync(PartitionContext context, CloseReason reason)
 {
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:PaulStubbs,项目名称:AzureSmartCitySimulator,代码行数:7,代码来源:EventProcessor.cs


示例6: CloseAsync

		public async Task CloseAsync(PartitionContext context, CloseReason reason)
		{
			_log.InfoEvent("Close",
				new Facet("reason", reason),
				new Facet("partitionId", context.Lease.PartitionId),
				new Facet("offset", context.Lease.Offset));
		}
开发者ID:smartpcr,项目名称:bigdata2,代码行数:7,代码来源:DeepStorageEventProcessor.cs


示例7: Hide

 public void Hide(CloseReason reason)
 {
     Dispose();
     OnClosingEvent(this, reason);
     Window.Current.Activated -= OnWindowActivated;//stop listening to app activation
     Canvas.SetLeft(flyoutPopup, Window.Current.Bounds.Width);//move it out of the screen
 }
开发者ID:kailash2812,项目名称:inventarium.windows8.sdk,代码行数:7,代码来源:InventariumFlyout.xaml.cs


示例8: CloseAsync

        /// <summary>
        /// Closes the event processor partition.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="reason">The reason.</param>
        public Task CloseAsync(PartitionContext context, CloseReason reason)
        {
            Logger.Information("Stopping partition {Partition} processing. Reason: {Reason}", context.Lease.PartitionId, reason);
            _targetBlock.Complete();
            _statLogger.Dispose();

            return Task.FromResult(true);
        }
开发者ID:bradsjm,项目名称:AprsEventHubDemo,代码行数:13,代码来源:EventPartitionProcessor.cs


示例9: CloseAsync

 public async Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     Trace.TraceInformation(string.Format("EventProcessor Shuting Down.  Partition '{0}', Reason: '{1}'.", this.partitionContext.Lease.PartitionId, reason.ToString()));
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:mickeyhaynes,项目名称:iot-hub-c-mbed-temperature-anomaly,代码行数:8,代码来源:SensorEventProcessor.cs


示例10: CloseAsync

 public async Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     Console.WriteLine("Shutting Down Event Processor");
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:amykatenicho,项目名称:DataCultureIoT,代码行数:8,代码来源:EventProcessor.cs


示例11: CloseAsync

 public async Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     Console.WriteLine($"Processor Shutting Down. Partition '{context.Lease.PartitionId}', Reason: '{reason}'.");
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:msdevno,项目名称:PowerBIDotNet,代码行数:8,代码来源:EventProcessor.cs


示例12: appServer_SessionClosed

        static void appServer_SessionClosed(WebSocketSession session, CloseReason closeRs)
        {
            session.Close();
            Console.WriteLine("客户端" + session.RemoteEndPoint.Port + "断开了连接!");
            ClientNum -= 1;

            Console.WriteLine("客户端数目" + ClientNum.ToString());
        }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:8,代码来源:Program.cs


示例13: OnClose

 /// <summary>
 /// Called when [close].
 /// </summary>
 protected virtual void OnClose(CloseReason reason)
 {
     var closedHandler = Closed;
     if (closedHandler != null)
     {
         closedHandler(this, reason);
     }
 }
开发者ID:xxjeng,项目名称:nuxleus,代码行数:11,代码来源:SocketSession.cs


示例14: CloseAsync

 public async Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     if (reason == CloseReason.Shutdown)
     {
         Clients.All.showMessageOnClient("XClose");
         await context.CheckpointAsync();
     }
 }
开发者ID:mchuma,项目名称:IntelEdison,代码行数:8,代码来源:SimpleEventProcessor.cs


示例15: CloseAsync

 public Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     if (reason == CloseReason.Shutdown)
     {
         return context.CheckpointAsync();
     }
     return Task.FromResult(false);
 }
开发者ID:evolutional,项目名称:StatsdNet,代码行数:8,代码来源:StatsdFrontendEventProcessor.cs


示例16: CloseAsync

 public async Task CloseAsync(PartitionContext context, CloseReason reason)
 {
     Console.WriteLine(string.Format("Processor Shuting Down.  Partition '{0}', Reason: '{1}'.", context.Lease.PartitionId, reason.ToString()));
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:Mecabot,项目名称:ble2azure,代码行数:8,代码来源:FEZSpiderEventHubProcessor.cs


示例17:

        //------------------------------------------------------------------------------------------------------------------------
        #endregion

        #region Functions
        //------------------------------------------------------------------------------------------------------------------------
        async Task IEventProcessor.CloseAsync(PartitionContext context, CloseReason reason)
        {
            DebugEx.TraceLog("Processor Shutting Down. Partition :" + context.Lease.PartitionId + ", Reason: " + reason);
            if (reason == CloseReason.Shutdown)
            {
                await context.CheckpointAsync();
            }
        }
开发者ID:yodiwo,项目名称:plegma,代码行数:13,代码来源:SimpleEventProcessor.cs


示例18:

 async Task IEventProcessor.CloseAsync(PartitionContext context, CloseReason reason)
 {
     Console.WriteLine("Processor Shutting Down. Partition '{0}', Reason: '{1}'.", context.Lease.PartitionId, reason);
     if (reason == CloseReason.Shutdown)
     {
         await context.CheckpointAsync();
     }
 }
开发者ID:davidebbo-test,项目名称:EventHubsSample,代码行数:8,代码来源:SimpleEventProcessor.cs


示例19: CloseAsync

        public Task CloseAsync(PartitionContext context, CloseReason reason)
        {
            Trace.TraceInformation("Processor Shuting Down.  Partition '{0}', Reason: '{1}'.", this.Context.Lease.PartitionId, reason.ToString());

            this.IsClosed = true;
            this.OnProcessorClosed();

            return context.CheckpointAsync();
        }
开发者ID:jmservera,项目名称:ConnectedChristmasTree,代码行数:9,代码来源:EventProcessor.cs


示例20: PluginCloseInfo

 public PluginCloseInfo(CloseReason reason)
     : this()
 {
     if (reason == CloseReason.None)
     {
         throw new ArgumentException("None is not a valid CloseReason");
     }
     FormReason = reason;
 }
开发者ID:gfritz,项目名称:XrmToolBox,代码行数:9,代码来源:PluginCloseInfo.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CloseStatusCode类代码示例发布时间:2022-05-24
下一篇:
C# Cloner类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap