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


C# GuidId类代码示例

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


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

示例1: AddConsumer

 public StreamConsumerData AddConsumer(GuidId subscriptionId, StreamId streamId, IStreamConsumerExtension streamConsumer, IStreamFilterPredicateWrapper filter)
 {
     var consumerData = new StreamConsumerData(subscriptionId, streamId, streamConsumer, filter);
     queueData.Add(subscriptionId, consumerData);
     lastActivityTime = DateTime.UtcNow;
     return consumerData;
 }
开发者ID:JackWangCUMT,项目名称:orleans,代码行数:7,代码来源:StreamConsumerCollection.cs

示例2: DeliverBatch

        public async Task<StreamHandshakeToken> DeliverBatch(GuidId subscriptionId, Immutable<IBatchContainer> batch, StreamHandshakeToken handshakeToken)
        {
            foreach (var each in batch.Value.GetEvents<object>())
                await handler(each.Item1);

            return null;
        }
开发者ID:AntyaDev,项目名称:Orleankka,代码行数:7,代码来源:PushExtension.cs

示例3: StreamConsumerData

 public StreamConsumerData(GuidId subscriptionId, StreamId streamId, IStreamConsumerExtension streamConsumer, IStreamFilterPredicateWrapper filter)
 {
     SubscriptionId = subscriptionId;
     StreamId = streamId;
     StreamConsumer = streamConsumer;
     Filter = filter;
 }
开发者ID:hanin,项目名称:orleans,代码行数:7,代码来源:QueueStreamDataStructures.cs

示例4: RegisterConsumer

 public Task RegisterConsumer(GuidId subscriptionId, StreamId streamId, string streamProvider, IStreamConsumerExtension streamConsumer, IStreamFilterPredicateWrapper filter)
 {
     if (!IsImplicitSubscriber(streamConsumer, streamId))
     {
         throw new ArgumentOutOfRangeException(streamId.ToString(), "Only implicit subscriptions are supported.");
     }
     return TaskDone.Done;
 }
开发者ID:nehmebilal,项目名称:orleans,代码行数:8,代码来源:ImplicitStreamPubSub.cs

示例5: RemoveConsumer

        public bool RemoveConsumer(GuidId subscriptionId, Logger logger)
        {
            StreamConsumerData consumer;
            if (!queueData.TryGetValue(subscriptionId, out consumer)) return false;

            consumer.SafeDisposeCursor(logger);
            return queueData.Remove(subscriptionId);
        }
开发者ID:JackWangCUMT,项目名称:orleans,代码行数:8,代码来源:StreamConsumerCollection.cs

示例6: RemoveConsumer

        public bool RemoveConsumer(GuidId subscriptionId)
        {
            StreamConsumerData consumer;
            if (!queueData.TryGetValue(subscriptionId, out consumer)) return false;

            if (consumer.Cursor != null)
            {
                // kill cursor activity and ensure it does not start again on this consumer data.
                consumer.Cursor.Dispose();
                consumer.Cursor = null; 
            }
            return queueData.Remove(subscriptionId);
        }
开发者ID:uehara,项目名称:orleans,代码行数:13,代码来源:StreamConsumerCollection.cs

示例7: IsImplicitSubscriber

 internal bool IsImplicitSubscriber(GuidId subscriptionId, StreamId streamId)
 {
     return SubscriptionMarker.IsImplicitSubscription(subscriptionId.Guid);
 }
开发者ID:nehmebilal,项目名称:orleans,代码行数:4,代码来源:ImplicitStreamPubSub.cs

示例8: RemoveSubscriber_Impl

        public void RemoveSubscriber_Impl(GuidId subscriptionId, StreamId streamId)
        {
            if (IsShutdown) return;

            StreamConsumerCollection streamData;
            if (!pubSubCache.TryGetValue(streamId, out streamData)) return;

            // remove consumer
            bool removed = streamData.RemoveConsumer(subscriptionId, logger);
            if (removed && logger.IsVerbose) logger.Verbose((int)ErrorCode.PersistentStreamPullingAgent_10, "Removed Consumer: subscription={0}, for stream {1}.", subscriptionId, streamId);
            
            if (streamData.Count == 0)
                pubSubCache.Remove(streamId);
        }
开发者ID:NingnaD,项目名称:orleans,代码行数:14,代码来源:PersistentStreamPullingAgent.cs

示例9: AddSubscriber_Impl

        // Called by rendezvous when new remote subscriber subscribes to this stream.
        private async Task AddSubscriber_Impl(
            GuidId subscriptionId,
            StreamId streamId,
            IStreamConsumerExtension streamConsumer,
            StreamSequenceToken cacheToken,
            IStreamFilterPredicateWrapper filter)
        {
            if (IsShutdown) return;

            StreamConsumerCollection streamDataCollection;
            if (!pubSubCache.TryGetValue(streamId, out streamDataCollection))
            {
                streamDataCollection = new StreamConsumerCollection(DateTime.UtcNow);
                pubSubCache.Add(streamId, streamDataCollection);
            }

            StreamConsumerData data;
            if (!streamDataCollection.TryGetConsumer(subscriptionId, out data))
                data = streamDataCollection.AddConsumer(subscriptionId, streamId, streamConsumer, filter ?? DefaultStreamFilter);

            if (await DoHandshakeWithConsumer(data, cacheToken))
            {
                if (data.State == StreamConsumerDataState.Inactive)
                    RunConsumerCursor(data, data.Filter).Ignore(); // Start delivering events if not actively doing so
            }
        }
开发者ID:NingnaD,项目名称:orleans,代码行数:27,代码来源:PersistentStreamPullingAgent.cs

示例10: TryGetConsumer

 public bool TryGetConsumer(GuidId subscriptionId, out StreamConsumerData data)
 {
     return queueData.TryGetValue(subscriptionId, out data);
 }
开发者ID:uehara,项目名称:orleans,代码行数:4,代码来源:StreamConsumerCollection.cs

示例11: OnSubscriptionFailure

 public Task OnSubscriptionFailure(GuidId subscriptionId, string streamProviderName, IStreamIdentity streamIdentity,
     StreamSequenceToken sequenceToken)
 {
     return TaskDone.Done;
 }
开发者ID:Rejendo,项目名称:orleans,代码行数:5,代码来源:NoOpStreamFailureHandler.cs

示例12:

 Task IStreamPubSub.UnregisterConsumer(GuidId subscriptionId, StreamId streamId, string streamProvider)
 {
     return registry.UnregisterConsumer(subscriptionId, streamId, streamProvider);
 }
开发者ID:NaseUkolyCZ,项目名称:Orleankka,代码行数:4,代码来源:StreamPubSubWrapper.cs

示例13: RemoveRemoteSubscriber

 internal void RemoveRemoteSubscriber(GuidId subscriptionId)
 {
     Tuple<IStreamConsumerExtension, IStreamFilterPredicateWrapper> ignore;
     consumers.TryRemove(subscriptionId, out ignore);
     if (consumers.Count == 0)
     {
         // Unsubscribe from PubSub?
     }
 }
开发者ID:sbambach,项目名称:orleans,代码行数:9,代码来源:SimpleMessageStreamProducerExtension.cs

示例14: AddRemoteSubscriber

 internal void AddRemoteSubscriber(GuidId subscriptionId, IStreamConsumerExtension streamConsumer, IStreamFilterPredicateWrapper filter)
 {
     consumers.TryAdd(subscriptionId, Tuple.Create(streamConsumer, filter));
 }
开发者ID:sbambach,项目名称:orleans,代码行数:4,代码来源:SimpleMessageStreamProducerExtension.cs

示例15: Contains

 public bool Contains(GuidId subscriptionId)
 {
     return queueData.ContainsKey(subscriptionId);
 }
开发者ID:uehara,项目名称:orleans,代码行数:4,代码来源:StreamConsumerCollection.cs


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