protected override void BeginProcessing() { CompositionInitializer.Initialize(CloudProvider.COMPOSITION_DIRECTORY); CompositionInitializer.SatisfyImports(this); base.BeginProcessing(); }
protected override ProviderInfo Start(ProviderInfo providerInfo) { Environment.CurrentDirectory = SessionState.Path.CurrentFileSystemLocation.Path; CompositionInitializer.Preload(typeof(Interface.Composition.ICloudGateway)); CompositionInitializer.Initialize(COMPOSITION_DIRECTORY); return(base.Start(providerInfo)); }
protected override PSDriveInfo NewDrive(PSDriveInfo drive) { if (drive == null) { throw new ArgumentNullException(nameof(drive)); } var factory = new CloudDriveFactory(); CompositionInitializer.SatisfyImports(factory); var parameters = DynamicParameters as CloudDriveParameters; if (string.IsNullOrEmpty(parameters?.EncryptionKey)) { WriteWarning(string.Format(CultureInfo.CurrentCulture, Resources.UnencryptedDrive, drive.Name, drive.Credential.UserName, drive.Root)); } return(base.NewDrive(factory.CreateCloudDrive(drive, parameters))); }
public void OnImport() { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; CompositionInitializer.HostInitialized += (s, e) => CompositionInitializer.SatisfyImports(this); }