コード例 #1
0
        public override void sendMessageToChannel(User user, Channel channel, Message message)
        {
            if (!isChannelExists(channel))
            {
                this.addChannel(channel);
            }

            /*  if (!isUserExists(user))
             * {
             *    this.addUser(user);
             * }*/
            FBManaging.addData(_firebase, globalChannelsPath + "/" + channel.NAME, message).Wait();
        }
コード例 #2
0
 private bool isUserExists(User user)
 {
     return(FBManaging.isDataInPathExist(_firebase, FBConfigurations.ROOT_USERS + "/" + user.NAME).GetAwaiter().GetResult());
 }
コード例 #3
0
 private bool isChannelExists(Channel channel)
 {
     return(FBManaging.isDataInPathExist(_firebase, globalChannelsPath + "/" + channel.NAME).GetAwaiter().GetResult());
 }
コード例 #4
0
 public override void removeChannel(Channel newChannel)
 {
     FBManaging.removeData(_firebase, userChannelsPath, newChannel.NAME).Wait();
     FBManaging.removeStructuredData(_firebase, globalChannelsPath, newChannel).Wait();
 }