Ejemplo n.º 1
0
 private Dictionary <string, dynamic> CreateParameters(IRemoteSettings remoteSettings)
 {
     return(new Dictionary <string, dynamic>
     {
         { "Activity", Settings.Initialize.ProgressActivityName },
         { "RemoteHost", remoteSettings.RemoteHost },
         { "Credentials", new PSCredential(remoteSettings.RemoteUsername, remoteSettings.RemotePassword.ToSecureString()) },
         { "RemoteDirectory", Settings.RemoteDirectory },
         { "ModuleFiles", Modules.ToBeCopiedToRemote },
     });
 }
Ejemplo n.º 2
0
        public IProfile CreateProfile(IRemoteSettings remoteSettings)
        {
            var profile = CreateProfile();

            profile.RemotingEnabled = remoteSettings.RemotingEnabled;
            profile.RemoteHost      = remoteSettings.RemoteHost;
            profile.RemoteUsername  = remoteSettings.RemoteUsername;
            profile.RemotePassword  = remoteSettings.RemotePassword;
            profile.RemoteFolder    = remoteSettings.RemoteFolder;

            return(profile);
        }
Ejemplo n.º 3
0
        // fake profile is initially passed: always runs local, also passes credentials
        internal InitRemotePresenter(InitRemoteView view, IRemoteSettings remoteSettings)
        {
            _view = view;

            _parameters = CreateParameters(remoteSettings);

            _view.FormLoaded += FormLoaded;

            var localProfile = Create.New <IProfilesProvider>().CreateLocal();

            _scriptWrapper = Create.WithParam(_view, d => d?.ToString(), localProfile);
            _scriptWrapper.ProgressReady += ProgressReady;
            _scriptWrapper.ErrorReady    += ErrorReady;
        }
Ejemplo n.º 4
0
 public RemoteService()
 {
     _client  = new HttpClient();
     Settings = DependencyService.Get <IRemoteSettings>();
 }
 public ChaosConfigurationChangedHookController(IRemoteSettings remoteSettings, HttpConfiguration configuration)
 {
     this.remoteSettings = remoteSettings;
     this.configuration = configuration;
 }
Ejemplo n.º 6
0
 public RemoteTarget(IRemoteSettings settings)
 {
     _settings = settings;
 }