コード例 #1
0
 public ConnectionSettingsViewModel(
     IConnectionSettingsService settingsService,
     IGlobalSessionBroker globalSessionBroker)
 {
     this.settingsService     = settingsService;
     this.globalSessionBroker = globalSessionBroker;
 }
コード例 #2
0
 public IapRdpConnectionService(IServiceProvider serviceProvider)
 {
     this.jobService           = serviceProvider.GetService <IJobService>();
     this.remoteDesktopService = serviceProvider.GetService <IRemoteDesktopSessionBroker>();
     this.tunnelBrokerService  = serviceProvider.GetService <ITunnelBrokerService>();
     this.credentialPrompt     = serviceProvider.GetService <ICredentialPrompt>();
     this.projectExplorer      = serviceProvider.GetService <IProjectExplorer>();
     this.settingsService      = serviceProvider.GetService <IConnectionSettingsService>();
     this.window = serviceProvider.GetService <IMainForm>().Window;
 }
コード例 #3
0
 public SshConnectionService(IServiceProvider serviceProvider)
 {
     this.jobService           = serviceProvider.GetService <IJobService>();
     this.sessionBroker        = serviceProvider.GetService <ISshTerminalSessionBroker>();
     this.tunnelBroker         = serviceProvider.GetService <ITunnelBrokerService>();
     this.settingsService      = serviceProvider.GetService <IConnectionSettingsService>();
     this.authorizedKeyService = serviceProvider.GetService <IAuthorizedKeyService>();
     this.keyStoreAdapter      = serviceProvider.GetService <IKeyStoreAdapter>();
     this.authorizationAdapter = serviceProvider.GetService <IAuthorizationAdapter>();
     this.window = serviceProvider.GetService <IMainForm>().Window;
 }
コード例 #4
0
ファイル: ProxyService.cs プロジェクト: idemery/WPFWCFChat
        public Proxy(InstanceContext instanceContext, Binding binding, EndpointAddress endpointAddress,
                     IConnectionSettingsService settings, IEventAggregator ea)
            : base(instanceContext, binding, endpointAddress)
        {
            this.settings    = settings;
            _eventAggregator = ea;

            InnerDuplexChannel.Opened  += InnerDuplexChannel_StateChanged;
            InnerDuplexChannel.Closed  += InnerDuplexChannel_StateChanged;
            InnerDuplexChannel.Faulted += InnerDuplexChannel_StateChanged;
        }
コード例 #5
0
ファイル: ProxyService.cs プロジェクト: idemery/WPFWCFChat
        public ProxyService(IClientService clientService, IConnectionSettingsService settings, IEventAggregator ea)
        {
            _eventAggregator   = ea;
            this.clientService = clientService;
            this.settings      = settings;

            _eventAggregator.GetEvent <AppExitEvent>().Subscribe((code) => { if (_proxy != null)
                                                                             {
                                                                                 Disconnect();
                                                                             }
                                                                 });
        }
コード例 #6
0
        public HtmlPageGenerator(IServiceProvider serviceProvider)
        {
#if DEBUG
            this.settingsService = serviceProvider.GetService <IConnectionSettingsService>();

            var projectExplorer = serviceProvider.GetService <IProjectExplorer>();
            projectExplorer.ContextMenuCommands.AddCommand(
                new Command <IProjectExplorerNode>(
                    "Generate HTML page",
                    context => context is IProjectExplorerProjectNode
                        ? CommandState.Enabled
                        : CommandState.Unavailable,
                    context => GenerateHtmlPage((IProjectExplorerProjectNode)context)));
#endif
        }
コード例 #7
0
        public ConnectionSettingsViewModel(IConnectionSettingsService connectionSettings, IProxyService proxy, IEventAggregator ea)
        {
            this.proxy = proxy;
            this.connectionSettings          = connectionSettings;
            this.connectionSettings.UserName = UserPrincipal.Current?.DisplayName ?? Environment.UserName;
            this.connectionSettings.IP       = "localhost";

            ea.GetEvent <ClientConnectionEvent>().Subscribe(ClientConnectionStateChanged, ThreadOption.UIThread);

            ConnectCommand = new DelegateCommand(Connect, () =>
                                                 State != CommunicationState.Opened);
            //&& !string.IsNullOrWhiteSpace(ConnectionSettings.EndPointAddress)
            //&& !string.IsNullOrWhiteSpace(ConnectionSettings.IP)
            //&& !string.IsNullOrWhiteSpace(ConnectionSettings.UserName));


            DisconnectCommand = new DelegateCommand(Disconnect, () => State == CommunicationState.Opened);
        }
コード例 #8
0
 public ConnectionSettingsViewModel(IConnectionSettingsService settingsService)
 {
     this.settingsService = settingsService;
 }