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))); }
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)); }