Exemplo n.º 1
0
        /// <summary>
        /// Creates <see cref="ChatViewBuilder"/> used to open the Chat View.
        /// </summary>
        /// <param name="userId">The id of the user to chat with</param>
        /// <param name="providerId">The id of the external provider</param>
        /// <returns><see cref="ChatViewBuilder"/> instance.</returns>
        public ChatViewBuilder CreateChatViewForUserIdOnProvider(string userId, string providerId)
        {
            Check.Argument.IsStrNotNullOrEmpty(userId, "userId", "User id can't be null or empty");
            Check.Argument.IsStrNotNullOrEmpty(providerId, "providerId", "Provider id can't be null or empty");

            return(ChatViewBuilder.ConstructWithUserIdAndProviderId(getSocialImpl, userId, providerId));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Must not be invoked directly. Call <see cref="GetSocialChat.CreateChatViewForConversationId"/> instead.
        /// </summary>
        public static ChatViewBuilder ConstructWithConversationId(IGetSocialNativeBridge getSocialImpl, string conversationId)
        {
            Check.Argument.IsNotNull(conversationId, "conversationId", "Can't create chat view with null conversationId");

            var chatViewBuilder = new ChatViewBuilder(getSocialImpl);

            chatViewBuilder.conversationId = conversationId;

            return(chatViewBuilder);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Must not be invoked directly. Call <see cref="GetSocialChat.CreateChatViewForRoomName"/> instead.
        /// </summary>
        public static ChatViewBuilder ConstructWithRoomName(IGetSocialNativeBridge getSocialImpl, string roomName)
        {
            Check.Argument.IsNotNull(roomName, "roomName", "Can't create chat view with null roomName");

            var chatViewBuilder = new ChatViewBuilder(getSocialImpl);

            chatViewBuilder.roomName = roomName;

            return(chatViewBuilder);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Must not be invoked directly. Call <see cref="GetSocialChat.CreateChatViewForUserId"/> instead.
        /// </summary>
        public static ChatViewBuilder ConstructWithUserId(IGetSocialNativeBridge getSocialImpl, string userId)
        {
            Check.Argument.IsNotNull(userId, "userId", "Can't create chat view with null userId");

            var chatViewBuilder = new ChatViewBuilder(getSocialImpl);

            chatViewBuilder.userId = userId;

            return(chatViewBuilder);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Creates <see cref="ChatViewBuilder"/> used to open the Chat View.
        /// </summary>
        /// <param name="roomName">The name of the chat room</param>
        /// <returns><see cref="ChatViewBuilder"/> instance.</returns>
        public ChatViewBuilder CreateChatViewForRoomName(string roomName)
        {
            Check.Argument.IsStrNotNullOrEmpty(roomName, "roomName", "Room name can't be null or empty");

            return(ChatViewBuilder.ConstructWithRoomName(getSocialImpl, roomName));
        }