/// <summary>
        /// Registers all known contracts and their concretes.
        /// </summary>
        /// <param name="manager">The Servicelocation manager.</param>
        /// <param name="locator">The service locator.</param>
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            manager.ArgumentNotNull("manager");

            manager.RegisterType <IAzureHDInsightClusterConfigurationAccessorFactory, AzureHDInsightClusterConfigurationAccessorFactory>();
            manager.RegisterType <IAzureHDInsightConfigurationRestClientFactory, AzureHDInsightConfigurationRestClientFactory>();
        }
        /// <summary>
        /// Registers all known contracts and their concretes.
        /// </summary>
        /// <param name="manager">The Servicelocation manager.</param>
        /// <param name="locator">The service locator.</param>
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            manager.ArgumentNotNull("manager");

            manager.RegisterType<IAzureHDInsightClusterConfigurationAccessorFactory, AzureHDInsightClusterConfigurationAccessorFactory>();
            manager.RegisterType<IAzureHDInsightConfigurationRestClientFactory, AzureHDInsightConfigurationRestClientFactory>();
        }
        /// <inheritdoc />
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (manager.IsNull())
            {
                throw new ArgumentNullException("manager");
            }

            manager.RegisterType<IHttpClientAbstractionFactory, HttpClientAbstractionFactory>();
            manager.RegisterType<ILogger, Logger>();
        }
Example #4
0
        /// <inheritdoc />
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (manager.IsNull())
            {
                throw new ArgumentNullException("manager");
            }

            manager.RegisterType <IHttpClientAbstractionFactory, HttpClientAbstractionFactory>();
            manager.RegisterType <ILogger, Logger>();
        }
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (manager.IsNull())
            {
                throw new ArgumentNullException("manager");
            }

            if (locator.IsNull())
            {
                throw new ArgumentNullException("locator");
            }

            var overrideManager = new HDInsightClusterOverrideManager();

            overrideManager.AddOverride <HDInsightCertificateCredential>(new VersionFinderClientFactory(),
                                                                         new HDInsightManagementRdfeUriBuilderFactory(),
                                                                         new PayloadConverter());

            overrideManager.AddOverride <HDInsightAccessTokenCredential>(new VersionFinderClientFactory(),
                                                                         new HDInsightManagementRdfeUriBuilderFactory(),
                                                                         new PayloadConverter());

            manager.RegisterInstance <IHDInsightClusterOverrideManager>(overrideManager);
            manager.RegisterType <ICloudServiceNameResolver, CloudServiceNameResolver>();
            manager.RegisterType <IHDInsightManagementRestClientFactory, HDInsightManagementRestClientFactory>();
            manager.RegisterType <IHDInsightManagementPocoClientFactory, HDInsightManagementPocoClientFactory>();
            manager.RegisterType <IHDInsightJobSubmissionRestClientFactory, HDInsightJobSubmissionRestClientFactory>();
            manager.RegisterType <IHDInsightClientFactory, HDInsightClientFactory>();
            manager.RegisterType <IAsvValidatorClientFactory, AsvValidatorValidatorClientFactory>();
            manager.RegisterType <IHDInsightSubscriptionCredentialsFactory, ProductionIHDInsightSubscriptionCertificateCredentialsFactory>();
            manager.RegisterType <ISubscriptionRegistrationClientFactory, SubscriptionRegistrationClientFactory>();
            manager.RegisterType <ILocationFinderClientFactory, LocationFinderClientFactory>();
            manager.RegisterType <IRdfeServiceRestClientFactory, RdfeServiceRestClientFactory>();
            manager.RegisterType <IHDInsightJobSubmissionPocoClientFactory, HDInsightJobSubmissionPocoClientFactory>();
            manager.RegisterType <IHDInsightHttpClientAbstractionFactory, HDInsightHttpClientAbstractionFactory>();
            manager.RegisterType <IJobSubmissionCache, JobSubmissionCache>();
            manager.RegisterType <IRdfeClustersResourceRestClientFactory, RdfeClustersResourceRestClientFactory>();
            manager.RegisterType <IRdfeResourceTypeFinderFactory, RdfeResourceTypeFinderClientFactory>();
            manager.RegisterType <IRdfeIaasClustersRestClientFactory, RdfeIaasClustersRestClientFactory>();

            var changeManager = new UserChangeRequestManager();

            changeManager.RegisterUserChangeRequestHandler(typeof(HDInsightCertificateCredential),
                                                           UserChangeRequestUserType.Http, HttpChangeRequestUriBuilder,
                                                           PayloadConverter.SerializeHttpConnectivityRequest);
            changeManager.RegisterUserChangeRequestHandler(typeof(HDInsightCertificateCredential),
                                                           UserChangeRequestUserType.Rdp, RdpChangeRequestUriBuilder,
                                                           PayloadConverter.SerializeRdpConnectivityRequest);
            manager.RegisterInstance <IUserChangeRequestManager>(changeManager);
            var hadoopManager = locator.Locate <IHadoopClientFactoryManager>();

            hadoopManager.RegisterFactory <JobSubmissionCertificateCredential, IHDInsightHadoopClientFactory, HDInsightHadoopClientFactory>();
            hadoopManager.RegisterFactory <JobSubmissionAccessTokenCredential, IHDInsightHadoopClientFactory, HDInsightHadoopClientFactory>();
        }
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (manager.IsNull())
            {
                throw new ArgumentNullException("manager");
            }

            if (locator.IsNull())
            {
                throw new ArgumentNullException("locator");
            }

            var overrideManager = new HDInsightClusterOverrideManager();
            overrideManager.AddOverride<HDInsightCertificateCredential>(new VersionFinderClientFactory(),
                                                                        new HDInsightManagementRdfeUriBuilderFactory(),
                                                                        new PayloadConverter());

            overrideManager.AddOverride<HDInsightAccessTokenCredential>(new VersionFinderClientFactory(),
                                                                        new HDInsightManagementRdfeUriBuilderFactory(),
                                                                        new PayloadConverter());

            manager.RegisterInstance<IHDInsightClusterOverrideManager>(overrideManager);
            manager.RegisterType<ICloudServiceNameResolver, CloudServiceNameResolver>();
            manager.RegisterType<IHDInsightManagementRestClientFactory, HDInsightManagementRestClientFactory>();
            manager.RegisterType<IHDInsightManagementPocoClientFactory, HDInsightManagementPocoClientFactory>();
            manager.RegisterType<IHDInsightJobSubmissionRestClientFactory, HDInsightJobSubmissionRestClientFactory>();
            manager.RegisterType<IHDInsightClientFactory, HDInsightClientFactory>();
            manager.RegisterType<IAsvValidatorClientFactory, AsvValidatorValidatorClientFactory>();
            manager.RegisterType<IHDInsightSubscriptionCredentialsFactory, ProductionIHDInsightSubscriptionCertificateCredentialsFactory>();
            manager.RegisterType<ISubscriptionRegistrationClientFactory, SubscriptionRegistrationClientFactory>();
            manager.RegisterType<ILocationFinderClientFactory, LocationFinderClientFactory>();
            manager.RegisterType<IRdfeServiceRestClientFactory, RdfeServiceRestClientFactory>();
            manager.RegisterType<IHDInsightJobSubmissionPocoClientFactory, HDInsightJobSubmissionPocoClientFactory>();
            manager.RegisterType<IHDInsightHttpClientAbstractionFactory, HDInsightHttpClientAbstractionFactory>();
            manager.RegisterType<IJobSubmissionCache, JobSubmissionCache>();
            manager.RegisterType<IRdfeClustersResourceRestClientFactory, RdfeClustersResourceRestClientFactory>();
            manager.RegisterType<IRdfeResourceTypeFinderFactory, RdfeResourceTypeFinderClientFactory>();
            manager.RegisterType<IRdfeIaasClustersRestClientFactory, RdfeIaasClustersRestClientFactory>();
            
            var changeManager = new UserChangeRequestManager();
            changeManager.RegisterUserChangeRequestHandler(typeof (HDInsightCertificateCredential),
                UserChangeRequestUserType.Http, HttpChangeRequestUriBuilder,
                PayloadConverter.SerializeHttpConnectivityRequest);
            changeManager.RegisterUserChangeRequestHandler(typeof (HDInsightCertificateCredential),
                UserChangeRequestUserType.Rdp, RdpChangeRequestUriBuilder,
                PayloadConverter.SerializeRdpConnectivityRequest);
            manager.RegisterInstance<IUserChangeRequestManager>(changeManager);
            var hadoopManager = locator.Locate<IHadoopClientFactoryManager>();
            hadoopManager.RegisterFactory<JobSubmissionCertificateCredential, IHDInsightHadoopClientFactory, HDInsightHadoopClientFactory>();
            hadoopManager.RegisterFactory<JobSubmissionAccessTokenCredential, IHDInsightHadoopClientFactory, HDInsightHadoopClientFactory>();
        }
        /// <inheritdoc />
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (manager.IsNull())
            {
                throw new ArgumentNullException("manager");
            }

            manager.RegisterType <IAzureHDInsightCommandFactory, AzureHDInsightCommandFactory>();
            manager.RegisterType <IAzureHDInsightConnectionSessionManagerFactory, AzureHDInsightConnectionSessionManagerFactory>();
            manager.RegisterType <IBufferingLogWriterFactory, PowershellLogWriterFactory>();
            manager.RegisterType <IAzureHDInsightSubscriptionResolverFactory, AzureHDInsightSubscriptionResolverFactory>();
            manager.RegisterType <IAzureHDInsightStorageHandlerFactory, AzureHDInsightStorageHandlerFactory>();
            manager.RegisterType <IAzureHDInsightClusterManagementClientFactory, AzureHDInsightClusterManagementClientFactory>();
            manager.RegisterType <IAzureHDInsightJobSubmissionClientFactory, AzureHDInsightJobSubmissionClientFactory>();
        }
        /// <inheritdoc />
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (manager.IsNull())
            {
                throw new ArgumentNullException("manager");
            }

            manager.RegisterType<IAzureHDInsightCommandFactory, AzureHDInsightCommandFactory>();
            manager.RegisterType<IAzureHDInsightConnectionSessionManagerFactory, AzureHDInsightConnectionSessionManagerFactory>();
            manager.RegisterType<IBufferingLogWriterFactory, PowershellLogWriterFactory>();
            manager.RegisterType<IAzureHDInsightSubscriptionResolverFactory, AzureHDInsightSubscriptionResolverFactory>();
            manager.RegisterType<IAzureHDInsightStorageHandlerFactory, AzureHDInsightStorageHandlerFactory>();
            manager.RegisterType<IAzureHDInsightClusterManagementClientFactory, AzureHDInsightClusterManagementClientFactory>();
            manager.RegisterType<IAzureHDInsightJobSubmissionClientFactory, AzureHDInsightJobSubmissionClientFactory>();
        }
        /// <inheritdoc />
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (ReferenceEquals(manager, null))
            {
                throw new ArgumentNullException("manager");
            }

            var clientManager = new HadoopClientFactoryManager(manager, locator);
            manager.RegisterInstance<IHadoopClientFactoryManager>(clientManager);
            clientManager.RegisterFactory<BasicAuthCredential, IRemoteHadoopClientFactory, RemoteHadoopClientFactory>();
            manager.RegisterType<IRemoteHadoopJobSubmissionPocoClientFactory, RemoteHadoopJobSubmissionPocoClientFactory>();
            // manager.RegisterType<IHadoopLocalJobSubmissionRestClientFactory, HadoopLocalJobSubmissionRestClientFactory>();
            manager.RegisterType<IHadoopRemoteJobSubmissionRestClientFactory, HadoopRemoteJobSubmissionRestClientFactory>();
            manager.RegisterType<IHadoopApplicationHistoryRestClientFactory, HadoopApplicationHistoryRestClientFactory>();
            manager.RegisterType<IWabStorageAbstractionFactory, WabStorageAbstractionFactory>();
        }
        /// <inheritdoc />
        public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
        {
            if (ReferenceEquals(manager, null))
            {
                throw new ArgumentNullException("manager");
            }

            var clientManager = new HadoopClientFactoryManager(manager, locator);

            manager.RegisterInstance <IHadoopClientFactoryManager>(clientManager);
            clientManager.RegisterFactory <BasicAuthCredential, IRemoteHadoopClientFactory, RemoteHadoopClientFactory>();
            manager.RegisterType <IRemoteHadoopJobSubmissionPocoClientFactory, RemoteHadoopJobSubmissionPocoClientFactory>();
            // manager.RegisterType<IHadoopLocalJobSubmissionRestClientFactory, HadoopLocalJobSubmissionRestClientFactory>();
            manager.RegisterType <IHadoopRemoteJobSubmissionRestClientFactory, HadoopRemoteJobSubmissionRestClientFactory>();
            manager.RegisterType <IHadoopApplicationHistoryRestClientFactory, HadoopApplicationHistoryRestClientFactory>();
            manager.RegisterType <IWabStorageAbstractionFactory, WabStorageAbstractionFactory>();
        }
Example #11
0
 public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     manager.RegisterType <IEchoServiceForTest, EchoServiceForTest>();
 }
 public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     manager.RegisterType<IEchoServiceForTest,EchoServiceForTest>();
 }
 public HadoopClientFactoryManager(IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     this.manager = manager;
     this.locator = locator;
 }
 public ServiceLocationRegistrarProxy(IServiceLocationRegistrar registrar, IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     this.registrar = registrar;
     this.manager   = manager;
     this.locator   = locator;
 }
 public InternalServiceLocationRegistrarProxyFactory(IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     this.manager = manager;
     this.locator = locator;
 }
 public ServiceLocationRegistrarProxy(IServiceLocationRegistrar registrar, IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     this.registrar = registrar;
     this.manager = manager;
     this.locator = locator;
 }
 public InternalServiceLocationRegistrarProxyFactory(IServiceLocationRuntimeManager manager, IServiceLocator locator)
 {
     this.manager = manager;
     this.locator = locator;
 }