コード例 #1
0
        public async Task Subscribe(Type eventType, ContextBag context)
        {
            var section = topologySectionManager.DetermineResourcesToSubscribeTo(eventType);
            await topologyCreator.Create(section).ConfigureAwait(false);

            topologyOperator.Start(section.Entities);
        }
コード例 #2
0
        public async Task CreateQueueIfNecessary(QueueBindings queueBindings, string identity)
        {
            if (resourcesCreated)
            {
                return;
            }

            var internalTopology = topologyCreator as ICreateTopologyInternal;

            if (internalTopology != null)
            {
                await internalTopology.AssertManagedRights().ConfigureAwait(false);
            }

            var receiveResources = sections.DetermineResourcesToCreate(queueBindings);
            await topologyCreator.Create(receiveResources).ConfigureAwait(false);

            resourcesCreated = true;
        }