protected void OnDisconnected() { IsConnected = false; Messager = null; Disconnected(this, EventArgs.Empty); }
public LoginController(IRepositoryFacade apiFacade, IOptionsSnapshot <AppSettings> appSettings, IMessager messager, IHttpContextAccessor contextAccessor) : base(appSettings, messager, contextAccessor) { _apiFacade = apiFacade; }
IMessager CreateMessager(Type type) { IMessager messager = null; var methodInfos = GetMethodInfos(type); for (int i = 0; i < methodInfos.Length; i++) { var methodInfo = methodInfos[i]; if (methodInfo.Name == method) { var parameterTypes = GetParameterTypes(methodInfo); if (parameterTypes.Length > maxParameters) { continue; } messager = CreateMessager(methodInfo, parameterTypes); break; } } return(messager); }
//public Default1Controller(IMessager messager) //{ // this.Messager = messager; //} public Default1Controller(ILogger <Default1Controller> logger, IMessager messager ) { this._logger = logger; this.Messager = messager; }
public ClientManager(IDataBaseExecutable dbm, IMessager mes, ISubscriptionManager subman) { DataBaseManager = dbm; messager = mes; subscriptionManager = subman; dtFormatter = new DateTimeFormatter(); }
public AccountController( UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, SignInManager <ApplicationUser> signInManager, ILogger <AccountController> logger, IMessager messager, IGenerator generator, IMapper mapper, IBranchService branchService, IEmployeeService employeeService, ICustomerService customerService, IDepositService depositService, ILoanService loanService ) : base( userManager, roleManager, mapper, generator) { _signInManager = signInManager; _logger = logger; _messager = messager; _branchService = branchService; _employeeService = employeeService; _customerService = customerService; _depositService = depositService; _loanService = loanService; }
/// <summary> /// Gets an instance of a <see cref="Messager"/> to use to talk to the running instance of the client. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the game mode for which mods are being managed.</param> /// <returns>An instance of a <see cref="Messager"/> to use to talk to the running instance of the client, /// or <c>null</c> if no valid <see cref="Messager"/> could be created.</returns> public static IMessager GetMessager(EnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) { if (m_cchMessagerChannel == null) { System.Collections.IDictionary properties = new System.Collections.Hashtable(); properties["exclusiveAddressUse"] = false; m_cchMessagerChannel = new IpcClientChannel(); ChannelServices.RegisterChannel(m_cchMessagerChannel, true); } else { throw new InvalidOperationException("The IPC Channel has already been created as a CLIENT."); } string strMessagerUri = String.Format("ipc://{0}-{1}IpcServer/{1}Listener", CommonData.ModManagerName, p_gmdGameModeInfo.ModeId); IMessager msgMessager = null; try { Trace.TraceInformation(String.Format("Getting listener on: {0}", strMessagerUri)); msgMessager = (IMessager)Activator.GetObject(typeof(IMessager), strMessagerUri); //Just because a messager has been returned, dosn't mean it exists. //All you've really done at this point is create an object wrapper of type "Messager" which has the same methods, properties etc... //You wont know if you've got a real object, until you invoke something, hence the post (Power on self test) method. msgMessager.Post(); } catch (RemotingException e) { Trace.TraceError("Could not get Messager: {0}", strMessagerUri); TraceUtil.TraceException(e); return(null); } return(new MessagerClient(msgMessager)); }
public AttendanceManager(ISubscriptionManager sm) { subscriptionManager = sm; DataBaseManager = subscriptionManager.DataBaseManager; messager = subscriptionManager.messager; dtFormatter = new DateTimeFormatter(); }
public Presenter(WorkerClass worker, IMessager messager) { this._worker = worker; this._messager = messager; this._worker.OnWorkDoneHandler += this._messager.WorKDoneHandler; this._worker.WorkDone += this._messager.WorKDoneHandler; }
public DefaultController(ITransientMessager transient, IScopeMessager scope, ISingleMessager single) { this.Transient = transient; this.Scope = scope; this.Single = single; }
public SecureMessageWriter(IMessager writer) { if (writer == null) { throw new NotImplementedException(); } this.writer = writer; }
public MessageWaiter(IMessager messager, string header) { Contract.Requires(messager != null); this.waiter = new ManualResetEvent(false); this.Messager = messager; this.Header = header; messager.Received += (sender, e) => OnReceive(e.Message); }
public ChatController(int selfId) { //messager = new ReliableBroadcast<ChatMessage>(selfId, EndpointName); messager = new VectorClocks <ChatMessage>(selfId, EndpointName); messager.ReceivedMessage += ReceiveMessage; messager.Start(); SelfId = selfId; }
/// <summary> /// a safe version of OnAccepted which ignores exceptions thrown by handlers /// </summary> protected void OnSafeAccepted(IMessager messager) { try { OnAccepted(messager); } catch (Exception) { } }
public ViewModelBase() { Navigator = Dependency.Resolve <INavigationService>(); Notificator = Dependency.Resolve <INotificationService>(); Dispatcher = Dependency.Resolve <IDispatcher>(); Progress = Dependency.Resolve <IProgressIndicator>(); Configuration = Dependency.Resolve <IConfigurationManager>(); Messager = Dependency.Resolve <IMessager>(); }
protected virtual void OnAccepted(IMessager messager) { if (IdDisposed) return; LoggerFacade.LogDebug("Acceptor : Accepted a new messager"); Accepted(this, new MessagerEventArgs(messager)); }
protected void OnConnected() { Messager = Connector.Messager; Messager.Received += (sender, e) => OnReceive(e.Message); Messager.UnhandledException += (sender, e) => OnUnhandledException(e.Exception); IsConnected = true; Connected(this, EventArgs.Empty); }
public Basket(ICustomerDetailsRepository customerDetailsRepository, IBasketRepository basketRepository, IPaymentService paymentService, IMessager messager) { _customerDetailsRepository = customerDetailsRepository; _basketRepository = basketRepository; _paymentService = paymentService; _messager = messager; }
void HideMessage() { if (this.sFrm != null) { this.sFrm.Hide(); } this.sFrm = null; this.mFrm = null; }
public Client(ITcpClientAdapter tcpClient, CancellationToken cancellationToken, IMessager messager, IMimeParser mimeParser) { TcpClient = tcpClient; CancellationToken = cancellationToken; _clientState = new ConnectedState(this, messager, mimeParser); // Change to the 'awaiting EHLO' state _clientState = new AwaitingEhloCommandState(this, messager, mimeParser); }
public void Register(string key, IMessager messager) { lock (locker) { if (!_dictionary.ContainsKey(key)) { _dictionary.Add(key, messager); } } }
public MessageSession(int id, IMessager messager) { Contract.Requires(messager != null); this.Id = id; this.CreatedTime = DateTimeOffset.Now; this.Messager = messager; this.Messager.Received += (sender, e) => OnReceive(e.Message); this.Messager.UnhandledException += (sender, e) => OnUnhandledException(e.Exception); }
public SenderMessagePresenter(IGroupManager groupManager, IMessageSender messageSender, IMessager messager, ISenderMessageView view) { this.groupManager = groupManager; this.messageSenderEmail = messageSender; this.view = view; this.messager = messager; view.RequestToFillGroups += new EventHandler(view_RequestToFillGroups); view.SendMessageClicked += new EventHandler(view_SendMessageClicked); }
public Default1Controller(ILogger <DefaultController> logger, ITransientMessager transient, IScopeMessager scope, ISingleMessager single) { this._logger = logger; this.Transient = transient; this.Scope = scope; this.Single = single; }
public GroupPresenter(IGroupView view, IDataBaseExecutable DataBaseManager, IMessager messager, IGroupManager groupManager) { this.messager = messager; this.groupManager = groupManager; this.view = view; view.AddNewGroup += new EventHandler(view_AddNewGroup); view.ChangeGroup += new EventHandler(view_ChangeGroup); view.RemoveGroup += new EventHandler(view_RemoveGroup); view.RefreshGroupList += new EventHandler(view_RefreshGroupList); }
public ViewModelBase(INavigationService navigationService, INotificationService notificationService, IDispatcher dispatcher, IProgressIndicator progress, IConfigurationManager configuration, IMessager messager) { Navigator = navigationService; Notificator = notificationService; Dispatcher = dispatcher; Progress = progress; Configuration = configuration; Messager = messager; }
public IHttpActionResult Get() { if (this.Messager == null) { var dependencyScope = this.Request.GetDependencyScope(); this.Messager = dependencyScope.GetService(typeof(IMessager)) as IMessager; } var content = $"Messager:{this.Messager.OperationId}"; return(this.Ok(content)); }
public ClientManager(IMessager messager, IMimeParser mimeParser) { _messager = messager; _mimeParser = mimeParser; _clients = new Dictionary<int, Client>(); // Subscribe to messager events _messager.ClientConnected += OnClientConnected; _messager.ClientMessageReceived += OnClientMessageReceived; _messager.ClientDisconnected += OnClientDisconnected; }
public ClientManager(IMessager messager, IMimeParser mimeParser) { _messager = messager; _mimeParser = mimeParser; _clients = new Dictionary <int, Client>(); // Subscribe to messager events _messager.ClientConnected += OnClientConnected; _messager.ClientMessageReceived += OnClientMessageReceived; _messager.ClientDisconnected += OnClientDisconnected; }
void ShowMessage(bool silent, ref IMessager iLoadFrm) { if (!silent & iLoadFrm == null) { this.sFrm = new frmZStatus(); this.sFrm.Show(); this.sFrm.Refresh(); } else { this.mFrm = iLoadFrm; } }
public SubscriptionPresenter(ISubscriptionManager subscriptionManager, IGroupManager groupManager, IMessager messager, IClientManager clientManager, ISubscriptionView view) { this.view = view; this.groupManager = groupManager; this.subscriptionManager = subscriptionManager; this.messager = messager; this.clientManager = clientManager; view.AddNewSubscription += new EventHandler(view_AddNewSubscription); view.Refresh += new EventHandler(view_Refresh); view.AddNewSubscription += view_Refresh; view.CloseSubscription += View_CloseSubscription; view.ChangeSubscription += View_ChangeSubscription; view.RemoveSubscription += new EventHandler(view_RemoveSubscription); }
public ClientPresenter(IClientView view, IClientManager clientManager, IGroupManager groupManager, IClientCardCreator clientCardCreator, IMessager messager) { this.view = view; this.clientManager = clientManager; this.groupManager = groupManager; this.messager = messager; this.clientCardCreator = clientCardCreator; view.GroupsRequred += new EventHandler(view_GroupsRequred); view.AddClientClicked += new EventHandler(view_AddClientClicked); view.ClientInformationChanged += new EventHandler(view_ClientInformationChanged); view.ClientDeleted += new EventHandler(view_ClientDeleted); view.GroupChanged += new EventHandler(view_GroupChanged); view.CreateClientCard += new EventHandler(view_CreateClientCard); }
public void Execute(IMessager messager) { IEnumerable <Process> procs = processes.SelectMany(x => Process.GetProcessesByName(x)); var names = new HashSet <string>(); foreach (Process proc in procs) { names.Add(proc.ProcessName); proc.Kill(); } if (names.Count > 0) { messager.ShowMessage(3000, "Process killed", string.Join(Environment.NewLine, names), MessageIcon.Info); } }
public HomeController(ILogger <HomeController> logger, IRepositoryFacade apiFacade, IOptionsSnapshot <AppSettings> appSettings, IMessager messager, IHttpContextAccessor contextAccessor) : base(appSettings, messager, contextAccessor) { _logger = logger; var sid = HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.Sid); _apiFacade = apiFacade; if (sid != null) { _jwtToken = sid.Value; _apiFacade.SetJWTToken(_jwtToken); } }
public Controller(BookStore <T> bS, IMessager messager, IBookStoreWindow <T> storeWindow) { this.ControlerMessager = messager; this.ControllerXMLManager = new XmlManager <BookStore <T> >(); this.controllerBookStore = bS; this.ControllerMainStoreWindow = storeWindow; storeWindow.DGVStoreSource = controllerBookStore.StoreBooksBindingList; ControllerMainStoreWindow.OpenButtonClicked += ControllerMainStoreWindow_OpenButtonClicked; ControllerMainStoreWindow.SaveButtonClicked += ControllerMainStoreWindow_SaveButtonClicked; ControllerMainStoreWindow.HtmlReportButtonClicked += ControllerMainStoreWindow_HtmlReportButtonClicked; ControllerMainStoreWindow.AddButtonClicked += ControllerMainStoreWindow_AddButtonClicked; ControllerMainStoreWindow.DeleteButtonClicked += ControllerMainStoreWindow_DeleteButtonClicked; ControllerMainStoreWindow.EditButtonClicked += ControllerMainStoreWindow_EditButtonClicked; ControllerMainStoreWindow.ErrorOccurred += ControllerMainStoreWindow_ErrorOccurred; }
public UserCommandHandler(IHashProvider hashProvider, IRepository <UserInfo, UserInfo> userRepository, IMessager messager, IAuthorizationTokenProvider tokenProvider, ISearchableRepository <UserInfo, UserInfo> searchRepository) { Condition.Requires(tokenProvider).IsNotNull(); Condition.Requires(userRepository).IsNotNull(); Condition.Requires(hashProvider).IsNotNull(); Condition.Requires(messager).IsNotNull(); Condition.Requires(searchRepository).IsNotNull(); m_UserRepository = userRepository; m_HashProvider = hashProvider; m_Messager = messager; m_TokenProvider = tokenProvider; m_SearchRepository = searchRepository; }
public Presetner(IMainForm window, IMessager messager, Model model) { if (window == null) { throw new ArgumentNullException("window"); } if (messager == null) { throw new ArgumentNullException("messager"); } if (model == null) { throw new ArgumentNullException("model"); } this._window = window; this._messager = messager; this._model = model; this._window.GetAvailableDevicesEventHandler += WindowGetAvailableDevicesEventHandler; this._window.KillFfmpegProcessEventHandler += WindowKillFfmpegProcessEventHandler; this._window.AddNewConfig += WindowAddNewConfig; this._window.CloneConfig += WindowCloneConfig; this._window.UpdateConfig += WindowUpdateConfig; this._window.RenameConfig += WindowRenameConfig; this._window.RemoveConfig += WindowRemoveConfig; this._window.SelectedConfigChanged += WindowSelectedConfigChanged; this._window.StartEventHandler += WindowStartEventHandler; this._window.StopEventHandler += WindowStopEventHandler; this._window.MicrophoneVolumeChangeEventHandler += WindowMicrophoneVolumeChangeEventHandler; this._window.AudioInputChangeEventHandler += WindowAudioInputChangeEventHandler; this._window.CaptreWindowEventHander += CaptreWindowCaptreWindowEventHander; this._window.OnLoadEventHandler += WindowOnLoadEventHandler; this._model.WriteToWindowLogEvent += ModelWriteToWindowLogEvent; this._model.ShowErrorMessageEvent += ModelShowErrorMessageEvent; }
protected AbstractClientState(Client client, IMessager messager, IMimeParser mimeParser) { _client = client; _messager = messager; _mimeParser = mimeParser; }
protected override void DisposeManagedResources() { Connector.Dispose(); if (Messager != null) { Messager.Dispose(); Messager = null; } base.DisposeManagedResources(); }
public AwaitingAuthState(Client client, IMessager messager, IMimeParser mimeParser) : base(client, messager, mimeParser) { }
public DefaultController(IMessager messager) { this.Messager = messager; }
private static bool MessageMapper(ReceiverList<IMessager, Message> list, IMessager receiver, Message parameter) { return (parameter.Mask & receiver.Mask) == 0 || receiver.Receive(parameter); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_msgMessager">The proxy to use to send messages to the running instance of the mod manager.</param> private MessagerClient(IMessager p_msgMessager) { Messager = p_msgMessager; }
public MessagerEventArgs(IMessager messager) { this.Messager = messager; }
public MessageWaiter(IMessager messager) : this(messager, string.Empty) { }
public AwaitingRcptCommandState(Client client, IMessager messager, IMimeParser mimeParser) : base(client, messager, mimeParser) { }