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


C# Runtime.Logger类代码示例

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


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

示例1: StreamProviderManagerAgent

 public StreamProviderManagerAgent(Silo silo, List<IProvider> allSiloProviders, IStreamProviderRuntime streamProviderRuntime)
     : base(Constants.StreamProviderManagerAgentSystemTargetId, silo.SiloAddress)
 {
     logger = LogManager.GetLogger("StreamProviderUpdateAgent", LoggerType.Runtime);
     this.streamProviderManager = (StreamProviderManager)silo.StreamProviderManager;
     providerConfigurations = silo.GlobalConfig.ProviderConfigurations;
     this.allSiloProviders = allSiloProviders;
     this.streamProviderRuntime = streamProviderRuntime;
     nonReentrancyGuarantor = new AsyncSerialExecutor();
 }
开发者ID:Carlm-MS,项目名称:orleans,代码行数:10,代码来源:StreamProviderManagerAgent.cs

示例2: DeleteAllUsedAzureQueues

        /// <summary>
        /// Helper method for testing.
        /// </summary>
        /// <param name="providerName"></param>
        /// <param name="deploymentId"></param>
        /// <param name="storageConnectionString"></param>
        /// <param name="logger"></param>
        /// <returns></returns>
        public static async Task DeleteAllUsedAzureQueues(string providerName, string deploymentId, string storageConnectionString, Logger logger)
        {
            if (deploymentId != null)
            {
                var queueMapper = new HashRingBasedStreamQueueMapper(AzureQueueAdapterFactory.DEFAULT_NUM_QUEUES, providerName);
                List<QueueId> allQueues = queueMapper.GetAllQueues().ToList();

                if (logger != null) logger.Info("About to delete all {0} Stream Queues\n", allQueues.Count);
                foreach (var queueId in allQueues)
                {
                    var manager = new AzureQueueDataManager(queueId.ToString(), deploymentId, storageConnectionString);
                    await manager.DeleteQueue();
                }
            }
        }
开发者ID:sbambach,项目名称:orleans,代码行数:23,代码来源:AzureQueueStreamProviderUtils.cs

示例3: OnActivateAsync

        public override async Task OnActivateAsync()
        {
            logger = base.GetLogger("GeneratedEvenCollectorGrain " + base.IdentityString);
            logger.Info("OnActivateAsync");

            var streamProvider = GetStreamProvider(GeneratedStreamTestConstants.StreamProviderName);
            stream = streamProvider.GetStream<GeneratedEvent>(this.GetPrimaryKey(), StreamNamespace);

            await stream.SubscribeAsync(
                (e, t) =>
                {
                    counter++;
                    logger.Info("Received a generated event {0}, of {1} events", e, counter);
                    if (e.EventType == GeneratedEvent.GeneratedEventType.Fill)
                    {
                        return TaskDone.Done;
                    }
                    var reporter = this.GrainFactory.GetGrain<IGeneratedEventReporterGrain>(GeneratedStreamTestConstants.ReporterId);
                    return reporter.ReportResult(this.GetPrimaryKey(), GeneratedStreamTestConstants.StreamProviderName, StreamNamespace, counter);
                });
        }
开发者ID:PaulNorth,项目名称:orleans,代码行数:21,代码来源:GeneratedEventCollectorGrain.cs

示例4: CreateGatewayListProvider

 protected override IGatewayListProvider CreateGatewayListProvider(Logger logger)
 {
     return AssemblyLoader.LoadAndCreateInstance<IGatewayListProvider>(Constants.ORLEANS_ZOOKEEPER_UTILS_DLL, logger);
 }
开发者ID:jdom,项目名称:orleans,代码行数:4,代码来源:ZookeeperMembershipTableTests.cs

示例5: CreateMembershipTable

 protected override IMembershipTable CreateMembershipTable(Logger logger)
 {
     return AssemblyLoader.LoadAndCreateInstance<IMembershipTable>(Constants.ORLEANS_ZOOKEEPER_UTILS_DLL, logger);
 }
开发者ID:jdom,项目名称:orleans,代码行数:4,代码来源:ZookeeperMembershipTableTests.cs

示例6: CreateGatewayListProvider

 protected override IGatewayListProvider CreateGatewayListProvider(Logger logger)
 {
     return new SqlMembershipTable();
 }
开发者ID:Rejendo,项目名称:orleans,代码行数:4,代码来源:SqlServerMembershipTableTests.cs

示例7: CreateMembershipTable

 protected override IMembershipTable CreateMembershipTable(Logger logger)
 {
     return new SqlMembershipTable();
 }
开发者ID:Rejendo,项目名称:orleans,代码行数:4,代码来源:SqlServerMembershipTableTests.cs

示例8: OnActivateAsync

 public override Task OnActivateAsync()
 {
     this.logger = GetLogger();
     return base.OnActivateAsync();
 }
开发者ID:Rejendo,项目名称:orleans,代码行数:5,代码来源:ActivateDeactivateWatcherGrain.cs

示例9: TrackMetric

 public void TrackMetric(Logger logger)
 {
 }
开发者ID:Carlm-MS,项目名称:orleans,代码行数:3,代码来源:DummyCounter.cs


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