Ejemplo n.º 1
0
        protected override void Setup(FeatureConfigurationContext context)
        {
            var dataBusSettings = context.Settings.GetOrDefault <DataBusSettings>() ?? new DataBusSettings();

            var cloudBlobClient = CloudStorageAccount.Parse(dataBusSettings.ConnectionString).CreateCloudBlobClient();

            var dataBus = new BlobStorageDataBus(cloudBlobClient.GetContainerReference(dataBusSettings.Container), dataBusSettings, new AsyncTimer());

            context.Container.ConfigureComponent(b => dataBus, DependencyLifecycle.SingleInstance);
        }
        protected override void Setup(FeatureConfigurationContext context)
        {
            var dataBusSettings = context.Settings.GetOrDefault <DataBusSettings>() ?? new DataBusSettings();

            ThrowIfConnectionStringAndTokenProviderSpecified(dataBusSettings);

            var container = CreateCloudBlobContainer(dataBusSettings);

            var dataBus = new BlobStorageDataBus(container, dataBusSettings, new AsyncTimer());

            context.Container.ConfigureComponent(b => dataBus, DependencyLifecycle.SingleInstance);
        }