public TopologyCreator(ITransportPartsContainer container, IManageNamespaceManagerLifeCycle namespaces) { this.container = container; this.namespaces = namespaces; hasManageRights = new AsyncLazy <bool>(async() => { var namespacesWithoutManageRights = await ManageRightsCheck.Run(namespaces, container.Resolve <ReadOnlySettings>()) .ConfigureAwait(false); namespacesWithoutManageRightsJoined = string.Join(", ", namespacesWithoutManageRights.Select(alias => $"`{alias}`")); return(namespacesWithoutManageRights.Count == 0); }); }
public TopologyCreator(ICreateAzureServiceBusSubscriptionsInternal subscriptionsCreator, AzureServiceBusQueueCreator queuesCreator, AzureServiceBusTopicCreator topicsCreator, IManageNamespaceManagerLifeCycleInternal namespaces, ReadOnlySettings settings) { this.topicsCreator = topicsCreator; this.queuesCreator = queuesCreator; this.subscriptionsCreator = subscriptionsCreator; this.namespaces = namespaces; var namespaceConfigurations = settings.Get <NamespaceConfigurations>(WellKnownConfigurationKeys.Topology.Addressing.Namespaces); hasManageRights = new AsyncLazy <bool>(async() => { var namespacesWithoutManageRights = await ManageRightsCheck.Run(namespaces, namespaceConfigurations) .ConfigureAwait(false); namespacesWithoutManageRightsJoined = string.Join(", ", namespacesWithoutManageRights.Select(alias => $"`{alias}`")); return(namespacesWithoutManageRights.Count == 0); }); }