當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。