protected AbstractMessage(string type, string name, IMessageManager messageManager = null) { _type = type; _name = name; _messageManager = messageManager; TimestampInMicros = MilliSecondTimer.CurrentTimeMicros; }
public void Setup() { _commandBus = MockRepository.GenerateMock<ICommandBus>(); _messageManager = MockRepository.GenerateMock<IMessageManager>(); _commandExecutor = new CommandExecutor( _commandBus, _messageManager ); }
public DefaultTransaction(string type, string name, IMessageManager messageManager = null) : base(type, name, messageManager) { _messageManager = messageManager; _mDurationInMicro = -1; Standalone = true; }
public void Setup() { _commandExecutor = MockRepository.GenerateMock<ICommandExecutor>(); _messageManager = MockRepository.GenerateMock<IMessageManager>(); _referrerProvider = MockRepository.GenerateMock<IReferrerProvider>(); _controller = new DummyExecuteController( _commandExecutor, _messageManager, _referrerProvider ); }
public UsersService( IContentManager contentManager, IOrchardServices orchardServices, IRoleService roleService, IMessageManager messageManager, IScheduledTaskManager taskManager, IRepository<EmailPartRecord> emailRepository, ShellSettings shellSettings, IRepository<UserRolesPartRecord> userRolesRepository, ICacheManager cache, IClock clock, ISignals signals) { _signals = signals; _clock = clock; _cache = cache; _emailRepository = emailRepository; _orchardServices = orchardServices; _contentManager = contentManager; _roleService = roleService; _messageManager = messageManager; _taskManager = taskManager; _shellSettings = shellSettings; _userRolesRepository = userRolesRepository; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public IO(IFileManager filemanager, IMessageManager messagemanager, Lang language) { fileManager = filemanager; messageManager = messagemanager; ActiveLanguage = language; WorkPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "TOWare"); if (!Directory.Exists(WorkPath)) Directory.CreateDirectory(WorkPath); if (!Directory.Exists(LanguagePath)) Directory.CreateDirectory(LanguagePath); if (File.Exists(SettingsFile)) { LoadSettings(); if (File.Exists(Path.Combine(LanguagePath, ActiveSettings.ActiveLanguage + ".towlang"))) LoadLanguage(); else SaveLanguage(); } else { ActiveSettings = new Settings(); SaveSettings(ActiveSettings); SaveLanguage(); } }
public ContactController(IOrchardServices services, IContactService contactService, IMessageManager messenger, INotifier notifier) { Services = services; _contactService = contactService; _messenger = messenger; _notifier = notifier; }
public UserService(IContentManager contentManager, IMembershipService membershipService, IClock clock, IMessageManager messageManager, ShellSettings shellSettings, IEncryptionService encryptionService) { _contentManager = contentManager; _membershipService = membershipService; _clock = clock; _messageManager = messageManager; _encryptionService = encryptionService; Logger = NullLogger.Instance; }
public MailActions( IMessageManager messageManager, IOrchardServices orchardServices, IMembershipService membershipService) { _messageManager = messageManager; _orchardServices = orchardServices; _membershipService = membershipService; }
private void Arrange( IMessageManager messageManager = null ) { ServiceLocator.SetLocatorProvider( () => _serviceLocator ); if ( messageManager != null ) _serviceLocator .Stub( x => x.GetInstance<IMessageManager>() ) .Return( _messageManager ); }
public MembershipService(IOrchardServices orchardServices, IMessageManager messageManager, IEnumerable<IUserEventHandler> userEventHandlers, IClock clock, IEncryptionService encryptionService) { _orchardServices = orchardServices; _messageManager = messageManager; _userEventHandlers = userEventHandlers; _encryptionService = encryptionService; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public ClientController(ActionInvoker actionInvoker, DataContext dataContext, JsonMapperManager jsonMapperManager, DeviceHiveConfiguration deviceHiveConfiguration, MessageBus messageBus, IMessageManager messageManager) : base(actionInvoker, dataContext, jsonMapperManager, deviceHiveConfiguration) { _messageBus = messageBus; _messageManager = messageManager; }
public DeviceController(ActionInvoker actionInvoker, DataContext dataContext, JsonMapperManager jsonMapperManager, DeviceHiveConfiguration deviceHiveConfiguration, IMessageManager messageManager, DeviceService deviceService) : base(actionInvoker, dataContext, jsonMapperManager, deviceHiveConfiguration) { _messageManager = messageManager; _deviceService = deviceService; }
private long _mDurationInMicro; // must be less than 0 public DefaultTransaction(String type, String name, IMessageManager manager /*Action<ITransaction> endCallBack*/) : base(type, name) { _mDurationInMicro = -1; //_endCallBack = endCallBack; _mManager = manager; Standalone = true; }
public HomeController(IOrchardServices orchardServices, IContactUsService contactUsService, ICommentValidator commentValidator, IMessageManager messageManager, IMembershipService membershipService) { Services = orchardServices; _contactUsService = contactUsService; _commentValidator = commentValidator; _membershipService = membershipService; _messageManager = messageManager; }
public MailActions( IMessageManager messageManager, IOrchardServices orchardServices, IMembershipService membershipService) { _messageManager = messageManager; _orchardServices = orchardServices; _membershipService = membershipService; T = NullLocalizer.Instance; }
public MainView(IMessageManager manager) { InitializeComponent(); if (!DesignMode) { _presenter = new MainViewPresenter(this, manager); _presenter.Setup(); } }
public void Init() { var builder = new ContainerBuilder(); builder.RegisterInstance(new Mock<IMessageEventHandler>().Object); builder.RegisterType<DefaultMessageManager>().As<IMessageManager>(); builder.RegisterInstance(_channel = new MessagingChannelStub()).As<IMessagingChannel>(); var container = builder.Build(); _messageManager = container.Resolve<IMessageManager>(); }
public ContactOwnersController(IOrchardServices orchardServices, IMessageManager messageManager, IPackageService packageService, IUserkeyPackageService userkeyPackageService, IParameterFormatValidator parameterFormatValidator, IPackageVisitTracker packageVisitTracker) { _orchardServices = orchardServices; _packageVisitTracker = packageVisitTracker; _messageManager = messageManager; _packageService = packageService; _userkeyPackageService = userkeyPackageService; _parameterFormatValidator = parameterFormatValidator; T = NullLocalizer.Instance; }
public OFormService(IContentManager contentManager, IOrchardServices orchardServices, IMessageManager messageManager, IRepository<OFormResultRecord> resultRepo, IRepository<OFormFileRecord> fileRepo) { this._resultRepo = resultRepo; this._fileRepo = fileRepo; this._messageManager = messageManager; this._orchardServices = orchardServices; this._contentManager = contentManager; T = NullLocalizer.Instance; }
public DelightService() { IoCBootstrapper.Boot(); _accountManager = ObjectFactory.GetInstance<IAccountManager>(); _categoryManager = ObjectFactory.GetInstance<ICategoryManager>(); _productManager = ObjectFactory.GetInstance<IProductManager>(); _userGroupManager = ObjectFactory.GetInstance<IUserGroupManager>(); _voteManager = ObjectFactory.GetInstance<IVoteManager>(); _userManager = ObjectFactory.GetInstance<IUserManager>(); _sessionManager = ObjectFactory.GetInstance<ISessionManager>(); _messageManager = ObjectFactory.GetInstance<IMessageManager>(); }
public DefaultTaggedTransaction(string type, string name, string tag, IMessageManager manager) : base(type, name, manager) { _mTag = tag; Standalone = false; IMessageTree tree = manager.ThreadLocalMessageTree; if (tree != null) { _mRootMessageId = tree.RootMessageId; _mParentMessageId = tree.MessageId; } }
public CheckoutController(IOrchardServices services, IAuthenticationService authenticationService, ICustomerService customerService, IMembershipService membershipService, IShoppingCart shoppingCart, IWebshopSettingsService webshopSettings, IMessageManager messageManager) { _authenticationService = authenticationService; _services = services; _customerService = customerService; _membershipService = membershipService; _shoppingCart = shoppingCart; _webshopSettings = webshopSettings; _messageManager = messageManager; T = NullLocalizer.Instance; }
public DefaultTaggedTransaction(string type, string name, string tag, IMessageManager messageManager) : base(type, name, messageManager) { _tag = tag; _mDurationInMicro = -1; Standalone = false; IMessageTree tree = messageManager.ThreadLocalMessageTree; if (tree != null) { _rootMessageId = tree.RootMessageId; _parentMessageId = tree.ParentMessageId; } }
public OrderController(IShapeFactory shapeFactory, IOrderService orderService, IAuthenticationService authenticationService, IShoppingCart shoppingCart, ICustomerService customerService, IEnumerable<IPaymentServiceProvider> paymentServiceProviders, IMessageManager messageManager, IWebshopSettingsService webshopSettings) { _shapeFactory = shapeFactory; _orderService = orderService; _authenticationService = authenticationService; _shoppingCart = shoppingCart; _customerService = customerService; _t = NullLocalizer.Instance; _paymentServiceProviders = paymentServiceProviders; _messageManager = messageManager; _webshopSettings = webshopSettings; }
public ReportAbuseController(IOrchardServices orchardServices, IMembershipService membershipService, IMessageManager messageManager, IPackageService packageService, IParameterFormatValidator parameterFormatValidator, IPackageVisitTracker packageVisitTracker) { _orchardServices = orchardServices; _packageVisitTracker = packageVisitTracker; _messageManager = messageManager; _packageService = packageService; _parameterFormatValidator = parameterFormatValidator; _membershipService = membershipService; _reportAbuseUserName = new Lazy<string>(() => _orchardServices.WorkContext.CurrentSite.As<GallerySettingsPart>().ReportAbuseUserName); T = NullLocalizer.Instance; }
public DeviceController(ActionInvoker actionInvoker, WebSocketServerBase server, DataContext dataContext, JsonMapperManager jsonMapperManager, [Named("DeviceCommand")] DeviceSubscriptionManager subscriptionManager, MessageBus messageBus, IMessageManager messageManager, DeviceService deviceService) : base(actionInvoker, server, dataContext, jsonMapperManager) { _subscriptionManager = subscriptionManager; _messageBus = messageBus; _messageManager = messageManager; _deviceService = deviceService; _deviceMapper = jsonMapperManager.GetMapper<Device>(); }
public DefaultForkedTransaction(string type, string name, IMessageManager manager) : base(type, name, manager) { Standalone = false; IMessageTree tree = manager.ThreadLocalMessageTree; if (tree != null) { _mRootMessageId = tree.RootMessageId; _mParentMessageId = tree.MessageId; // Detach parent transaction and this forked transaction, by calling linkAsRunAway(), at this earliest moment, // so that thread synchronization is not needed at all between them in the future. _mForkedMessageId = Cat.CreateMessageId(); } }
public void Setup() { _mapper = MockRepository.GenerateMock<IViewModelToCommandMappingEngine>(); _mockedServiceLocator = MockRepository.GenerateMock<IServiceLocator>(); _mockedServiceLocator .Stub( x => x.GetInstance<IViewModelToCommandMappingEngine>() ) .Return( _mapper ); ServiceLocator.SetLocatorProvider( () => _mockedServiceLocator ); _commandExecutor = MockRepository.GenerateMock<ICommandExecutor>(); _messageManager = MockRepository.GenerateMock<IMessageManager>(); _referrerProvider = MockRepository.GenerateMock<IReferrerProvider>(); _controller = new DummyExecuteController( _commandExecutor, _messageManager, _referrerProvider ); var routeData = new RouteData(); routeData.Values.Add( "controller", "DummyDeleteFile" ); _controller.ControllerContext = new ControllerContext { RouteData = routeData }; }
public MessagesViewModel(IDatabaseManager databaseManager, IMessageManager messageManager) { _messageManager = messageManager; Messages = databaseManager.GetMessages().CreateDerivedCollection( msg => new MessageItemViewModel(msg), x => true, (x, y) => x.Message.CompareTo(y.Message), _messagesRead ); databaseManager.GetMessages().CountChanged .StartWith(0) .Select(_ => Messages.Count == 0) .ToProperty(this, x => x.IsEmpty, out _isEmpty); ClearAll.Subscribe(_ => { _messageManager.ClearAll(); }); }
private void Information(long chatId, IChatStateHandlerContext context) { IMessageManager messageManager = ModulesManager.GetModulesManager().GetMessageManager(); messageManager.SendTextMessage(chatId, TextResponse.Get(ResponseType.Information)); }
public EmailManagerController() { emailmanager = new EMailManager(); }
public CreateInvoiceHandler(IInvoiceRepository invoiceRepository, IMessageManager messageManager) { _invoiceRepository = invoiceRepository; _messageManager = messageManager; }
public FindPartnersViewModel(IChatManager chatManager, IApiManager apiManager, ICharacterManager characterManager, IMessageManager messageManager) { this.chatManager = chatManager; this.apiManager = apiManager; this.characterManager = characterManager; this.messageManager = messageManager; if (!searchFieldsInitialized) { GetSearchFields(); } SearchCommand = new MvxCommand(() => { Pending = true; chatManager.CommandReceived += OnCommandReceived; chatManager.Send(Helpers.CreateClientCommand(ClientCommandType.FKS, new { kinks = SelectedKinks.Select(x => x.Id), genders = SelectedGenders, orientations = SelectedOrientations, positions = SelectedPositions, roles = SelectedRoles, languages = SelectedLanguages })); }); ViewProfileCommand = new MvxCommand <CharacterViewModel>(c => Navigator.Navigate <CharacterViewModel, string>(c.Character.Name)); }
public void StartStateMessage(long chatId) { IMessageManager messageManager = ModulesManager.GetModulesManager().GetMessageManager(); messageManager.SendTextMessage(chatId, TextResponse.Get(ResponseType.RegistrationWarning)); }
public EmailClientProvider(IMessageManager messageManager) { _messageManager = messageManager; }
protected MessageEvaluator(string text, IMessageManager messages) : base(text) { Messages = messages; }
public HomeController(ILogger <HomeController> logger, UserManager <IdentityUser> userManager, IMessageManager msgManager) { _logger = logger; _userManager = userManager; _msgManager = msgManager; }
public EventManager(IChatManager chatManager, IMessageManager messageManager, ICharacterManager characterManager, IChannelManager channelManager) : base(chatManager, messageManager, characterManager, channelManager) { }
public void StartStateMessage(long chatId) { IMessageManager messageManager = ModulesManager.GetMessageManager(); messageManager.SendTextMessageAsync(chatId, TextResponse.Get(ResponseType.RegistrationReady), chatCommands.CreateReplyKeyboard()); }
public void StartStateMessage(long chatId) { IMessageManager messageManager = ModulesManager.GetModulesManager().GetMessageManager(); messageManager.SendTextMessage(chatId, TextResponse.Get(ResponseType.AuthorisationReady)); }
public RealTimeHub(IMessageManager messageManager, UserChatService userChatService) { _messageManager = messageManager; _userChatService = userChatService; }
public RequestProcessor(IMessageManager messageManager, IUserManager userManager) { _messageManager = messageManager; _userManager = userManager; }
public SMSManagerController() { smsmanager = new SMSManager(); }
public ClientController(ActionInvoker actionInvoker, DataContext dataContext, JsonMapperManager jsonMapperManager, DeviceHiveConfiguration deviceHiveConfiguration, IMessageManager messageManager) : base(actionInvoker, dataContext, jsonMapperManager, deviceHiveConfiguration) { _messageManager = messageManager; }
public StartResearchEvaluator(string text, IUIMap uiMap, IMessageManager messages) : base(text, uiMap) { Messages = messages; }
private void BtnOpenClose_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(TbComPort.Text) == true) { MessageBox.Show("Invalid port name."); return; } if (_currentParserType == ParserType.Unknown) { MessageBox.Show("Invalid parser type."); return; } MessageManagerSetting setting = new MessageManagerSetting() { ComSetting = new SerialPortSetting() { PortName = TbComPort.Text, BaudRate = 115200, DataBits = 8, Parity = Parity.None, StopBits = StopBits.One } }; try { if (_msgManager == null) { if (_currentParserType == ParserType.Binary) { _msgManager = new BinMessageManager(); _sequenceNumber = FlConstant.FL_BIN_MSG_MIN_SEQUENCE; } else if (_currentParserType == ParserType.Text) { _msgManager = new TxtMessageManager(); } } if (_msgManager.StartStatus == StartStatus.Stopped) { BtnOpenClose.Content = AppConstant.STR_OPENING; BtnOpenClose.IsEnabled = false; _eventTimer.Start(); _msgManager.OnEventReceived = OnEventMessageReceived; _msgManager.Start(setting); } else if (_msgManager.StartStatus == StartStatus.Started) { BtnOpenClose.Content = AppConstant.STR_CLOSING; BtnOpenClose.IsEnabled = false; _msgManager.Stop(); _eventTimer.Stop(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { if (_msgManager != null) { if (_msgManager.StartStatus == StartStatus.Stopped) { BtnOpenClose.Content = AppConstant.STR_OPEN; BtnSendMessage.IsEnabled = false; _msgManager = null; } else if (_msgManager.StartStatus == StartStatus.Started) { BtnOpenClose.Content = AppConstant.STR_CLOSE; BtnSendMessage.IsEnabled = true; } BtnOpenClose.IsEnabled = true; } else { BtnOpenClose.Content = AppConstant.STR_OPEN; BtnSendMessage.IsEnabled = true; } } }
public VpdbClient(ISettingsManager settingsManager, IVersionManager versionManager, IMessageManager messageManager, IScreen screen, ILogger logger, CrashManager crashManager) { _settingsManager = settingsManager; _versionManager = versionManager; _messageManager = messageManager; _logger = logger; _screen = screen; _crashManager = crashManager; }
public ContentNotificationService(IOrchardServices services, IMembershipService membershipService, IMessageManager messageManager) { _services = services; _messageManager = messageManager; _membershipService = membershipService; }
/// <summary> /// Class constructor from <paramref name="messageManager"/> parameter /// to output progress registration of tool windows. /// </summary> public ToolWindowRegistry(IMessageManager messageManager) : this() { this.Messaging = messageManager; }
public MessageController(ISiteUserManager siteUserManager, IMessageManager messageManager, IApplicationManager applicationManager) { _siteUserManager = siteUserManager; _messageManager = messageManager; _applicationManager = applicationManager; }
public MessageController(IMessageManager messageManager) { this.messageManager = messageManager; }
public Script(IApiManager apiManager, IChatManager chatManager, IChannelManager channelManager, ICharacterManager characterManager, IEventManager eventManager, IMessageManager messageManager) { this.apiManager = apiManager; this.chatManager = chatManager; this.channelManager = channelManager; this.characterManager = characterManager; this.eventManager = eventManager; this.messageManager = messageManager; }
public ChatHub(IMessageManager messageManager, UserManager <ApplicationUser> userManager) { MessageManager = messageManager; _userManager = userManager; }
public MessageController(IMessageManager _messageManager, IUserManager _usermanager, UiLoader.UiLoader _loader) { messageManager = _messageManager; usermanager = _usermanager; loader = _loader; }
public DeviceNotificationController(IMessageManager messageManager) { _messageManager = messageManager; }
public DefaultMessageProducer(IMessageManager manager) { _mManager = manager; }
public MessagesController(IMessageManager messageManager, IMapper mapper) { _messageManager = messageManager; _mapper = mapper; }
public RequestProcessor() { _messageManager = Bootstrapper.Resolve <IMessageManager>(); _userManager = Bootstrapper.Resolve <IUserManager>(); }