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


C# CloseReason类代码示例

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


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


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