public static void Main(string[] args) { BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider(); serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["port"] = 0; TcpChannel channel = new TcpChannel(props, clientProv, serverProv); ChannelServices.RegisterChannel(channel, false); IChatServices services = (IChatServices)Activator.GetObject(typeof(IChatServices), "tcp://localhost:55555/Chat"); Console.WriteLine("am obtinut referinta!!!"); Application.Init(); GTKClientCtrl ctrl = new GTKClientCtrl(services); Window w = new LoginWindow(ctrl); // Window w = new ChatWindow(); w.ShowAll(); Application.Run(); //Console.ReadKey(); }
public ChatController(PblogsContext context, IUserServices userServices, IChatServices chatServices, IMemoryCache cache, IHubContext <Signalr> hubContext) { _context = context; _chatServices = chatServices; _userServices = userServices; _Cache = cache; _hubContext = hubContext; }
public MainWindow() { InitializeComponent(); _channelFactory = new DuplexChannelFactory <IChatServices>(new ClientCallback(), "ChatServiceEndPoint"); Server = _channelFactory.CreateChannel(); webcam = new WebCam(); webcam.InitializeWebCam(ref imgVideo); }
public ChatViewModel() { _chatServices = DependencyService.Get <IChatServices> (); _chatMessage = new ChatMessageViewModel(); _messages = new ObservableCollection <ChatMessageViewModel> (); _chatServices.Connect(); _chatServices.OnMessageReceived += _chatServices_OnMessageReceived; }
public MainPageViewModel(INavigationService navigationService, IChatServices chatService) : base(navigationService) { _chatService = chatService; Title = "SignalR Chat"; Messages = new ObservableRangeCollection <Message>(); SendCommand = new DelegateCommand(SendExecute); _chatService.OnMessageReceived += OnMessageReceived; _chatService.ConnectAsync(); }
public ChatClientWorker(IChatServices server, TcpClient connection) { this.server = server; this.connection = connection; try { stream = connection.GetStream(); formatter = new BinaryFormatter(); connected = true; } catch (Exception e) { Console.WriteLine(e.StackTrace); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider(); serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["port"] = 0; TcpChannel channel = new TcpChannel(props, clientProv, serverProv); ChannelServices.RegisterChannel(channel, false); IChatServices services = (IChatServices)Activator.GetObject(typeof(IChatServices), "tcp://localhost:55555/Chat"); ChatClientCtrl ctrl = new ChatClientCtrl(services); LoginWindow win = new LoginWindow(ctrl); Application.Run(win); }
public ChatsController(IChatServices services) { this.services = services; }
public ChatController(IChatServices chatServices) { ChatServices = chatServices; }
public ChatController(IUsersServices userServices, IChatServices chatServices) { this._userServices = userServices; this._chatServices = chatServices; }
public GTKClientCtrl(IChatServices server) { this.server = server; currentUser = null; }
public ChatsController(UserManager <AppUser> userManager, IChatServices chatServices, IMapper mapper) { _chatServices = chatServices; _userManager = userManager; _mapper = mapper; }
public ChatClientCtrl(IChatServices services) { this.services = services; currentUser = null; }
public SerialChatServer(string host, int port, IChatServices server) : base(host, port) { this.server = server; Console.WriteLine("SerialChatServer..."); }
public UserController(IChatServices chatServices, IUserServices userServices, IMapper mapper) { _userServices = userServices; _mapper = mapper; _chatServices = chatServices; }
public ChatController(IChatServices chatService, IRoomServices roomServices) { _chatService = chatService; _roomServices = roomServices; GetUserId = () => User.Identity.GetUserId(); }
public ChatController(IChatServices services) { // major release _chatServices = services; }