Beispiel #1
0
 public PowershellNotificationChannelDefinitionViewModelFactory(IAppPathProvider appPathProvider, IFileSelectionViewModelFactory fileSelectionViewModelFactory, Func <IModelValidator <PowershellNotificationChannelDefinitionViewModel> > validator, ScriptTemplateProvider scriptTemplateProvider)
 {
     this.appPathProvider = appPathProvider;
     this.fileSelectionViewModelFactory = fileSelectionViewModelFactory;
     this.validator = validator;
     this.scriptTemplateProvider = scriptTemplateProvider;
 }
        public SecurityDescriptorTargetViewModel(SecurityDescriptorTarget model, SecurityDescriptorTargetViewModelDisplaySettings displaySettings, INotificationChannelSelectionViewModelFactory notificationChannelFactory, IFileSelectionViewModelFactory fileSelectionViewModelFactory, IAppPathProvider appPathProvider, ILogger <SecurityDescriptorTargetViewModel> logger, IDialogCoordinator dialogCoordinator, IModelValidator <SecurityDescriptorTargetViewModel> validator, IDirectory directory, IDomainTrustProvider domainTrustProvider, IDiscoveryServices discoveryServices, ILocalSam localSam, IObjectSelectionProvider objectSelectionProvider, ScriptTemplateProvider scriptTemplateProvider, IAmsLicenseManager licenseManager, IShellExecuteProvider shellExecuteProvider)
        {
            this.directory                  = directory;
            this.Model                      = model;
            this.logger                     = logger;
            this.dialogCoordinator          = dialogCoordinator;
            this.notificationChannelFactory = notificationChannelFactory;
            this.Validator                  = validator;
            this.domainTrustProvider        = domainTrustProvider;
            this.discoveryServices          = discoveryServices;
            this.localSam                   = localSam;
            this.displaySettings            = displaySettings ?? new SecurityDescriptorTargetViewModelDisplaySettings();
            this.objectSelectionProvider    = objectSelectionProvider;
            this.scriptTemplateProvider     = scriptTemplateProvider;
            this.licenseManager             = licenseManager;
            this.shellExecuteProvider       = shellExecuteProvider;

            this.Script = fileSelectionViewModelFactory.CreateViewModel(model, () => model.Script, appPathProvider.ScriptsPath);
            this.Script.DefaultFileExtension = "ps1";
            this.Script.Filter           = "PowerShell script|*.ps1";
            this.Script.NewFileContent   = this.scriptTemplateProvider.GetAuthorizationResponse;
            this.Script.ShouldValidate   = false;
            this.Script.PropertyChanged += Script_PropertyChanged;
            this.Initialization          = this.Initialize();
        }
Beispiel #3
0
 public SecurityDescriptorTargetViewModelFactory(IDialogCoordinator dialogCoordinator, IAppPathProvider appPathProvider, INotificationChannelSelectionViewModelFactory channelSelectionViewModelFactory, IFileSelectionViewModelFactory fileSelectionViewModelFactory, ILogger <SecurityDescriptorTargetViewModel> logger, IDiscoveryServices discoveryServices, IDomainTrustProvider domainTrustProvider, IDirectory directory, ILocalSam localsam, IObjectSelectionProvider objectSelectionProvider, Func <IModelValidator <SecurityDescriptorTargetViewModel> > validator, ScriptTemplateProvider scriptTemplateProvider, IAmsLicenseManager licenseManager, IShellExecuteProvider shellExecuteProvider)
 {
     this.dialogCoordinator = dialogCoordinator;
     this.appPathProvider   = appPathProvider;
     this.channelSelectionViewModelFactory = channelSelectionViewModelFactory;
     this.fileSelectionViewModelFactory    = fileSelectionViewModelFactory;
     this.logger                  = logger;
     this.directory               = directory;
     this.discoveryServices       = discoveryServices;
     this.domainTrustProvider     = domainTrustProvider;
     this.localSam                = localsam;
     this.objectSelectionProvider = objectSelectionProvider;
     this.validator               = validator;
     this.scriptTemplateProvider  = scriptTemplateProvider;
     this.licenseManager          = licenseManager;
     this.shellExecuteProvider    = shellExecuteProvider;
 }