Пример #1
0
 public MessageClient getMessagesClient()
 {
     if (messagesClient == null)
     {
         messagesClient = new MessageClient(this);
     }
     return(messagesClient);
 }
Пример #2
0
        private void SendMessageTo(string name, Stream stream, Message message)
        {
            string        filePath      = Path.GetFullPath("config.json");
            SymBotClient  symBotClient  = new SymBotClient();
            SymConfig     symConfig     = symBotClient.initBot(filePath);
            MessageClient messageClient = new apiClientDotNet.MessageClient();

            messageClient.sendMessage(symConfig, message, stream);
        }
Пример #3
0
        public void onUserJoinedRoom(UserJoinedRoom userJoinedRoom)
        {
            Message message2 = new Message();

            message2.message = "<messageML> Hi " + userJoinedRoom.affectedUser.firstName + "!</messageML>";
            MessageClient messageClient = new apiClientDotNet.MessageClient();

            messageClient.sendMessage(Program.symConfig, message2, userJoinedRoom.stream);
        }
Пример #4
0
        public void onRoomUpdated(RoomUpdated roomUpdated)
        {
            Message message2 = new Message();

            message2.message = "<messageML> Hi " + roomUpdated.stream.roomName + "!</messageML>";
            MessageClient messageClient = new apiClientDotNet.MessageClient();

            messageClient.sendMessage(Program.symConfig, message2, roomUpdated.stream);
        }
Пример #5
0
        public void onRoomMessage(Message inboundMessage)
        {
            string       filePath     = Path.GetFullPath("config.json");
            SymBotClient symBotClient = new SymBotClient();
            SymConfig    symConfig    = symBotClient.initBot(filePath);
            Message      message2     = new Message();

            message2.message = "<messageML> Hi " + inboundMessage.user.firstName + "!</messageML>";
            MessageClient messageClient = new apiClientDotNet.MessageClient();

            messageClient.sendMessage(symConfig, message2, inboundMessage.stream);
        }