private UserListViewBuilder(IGetSocialNativeBridge getSocialImpl, UserListType userListType, Action <User> onUserSelected, Action onCancel) : base(getSocialImpl) { this.onUserSelected = onUserSelected; this.onCancel = onCancel; this.userListType = userListType; }
private static IGetSocialNativeBridge FindNativeBridge() { IGetSocialNativeBridge nativeBridge = null; #if UNITY_ANDROID && !UNITY_EDITOR nativeBridge = FindBridgeImplementation(AvailableRuntimes.Android); #elif UNITY_IOS && !UNITY_EDITOR nativeBridge = FindBridgeImplementation(AvailableRuntimes.iOS); #elif UNITY_STANDALONE_WIN nativeBridge = FindBridgeImplementation(AvailableRuntimes.Windows); #elif UNITY_STANDALONE_LINUX nativeBridge = FindBridgeImplementation(AvailableRuntimes.Linux); #elif UNITY_STANDALONE_OSX nativeBridge = FindBridgeImplementation(AvailableRuntimes.OSX); #elif UNITY_EDITOR nativeBridge = FindBridgeImplementation(AvailableRuntimes.Editor); #else nativeBridge = GetSocialNativeBridgeMock.Instance; #endif if (nativeBridge != null) { return(nativeBridge); } if (Application.isEditor) { return(GetSocialNativeBridgeMock.Instance); } throw new Exception("Could not find native implementation."); }
/// <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); }
/// <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); }
/// <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); }
public static IGetSocialNativeBridge GetInstance() { if (instance == null) { instance = new GetSocialNativeBridgeIOS(); } MainThreadExecutor.Init(); return(instance); }
private GetSocialChat() { unreadRoomCountChangedListeners = new List <IUnreadRoomCountChangedListener>(); messagesListeners = new List <IChatMessageListener>(); typingStatusListeners = new List <ITypingStatusListener>(); getSocialImpl = GetSocialFactory.InstantiateGetSocial(); getSocialChatImpl = GetSocialChatFactory.InstantiateGetSocialChat(); getSocialChatImpl.SetOnUnreadCountChangedListenerInternal(OnPublicRoomCountChange, OnPrivateRoomCountChange); getSocialChatImpl.SetMessagesListenerInternal(OnPublicRoomMessageReceived, OnPrivateRoomMessageReceived); getSocialChatImpl.SetTypingStatusListenerInternal(OnPublicRoomTypingStatusReceived, OnPrivateRoomTypingStatusReceived); }
/// <summary> /// Must not be invoked directly. Invoke <c><see cref="GetSocial.CreateActivitiesView"/></c> instead. /// </summary> public static ActivitiesViewBuilder Construct(IGetSocialNativeBridge getSocialImpl, string group, params string[] tags) { Check.Argument.IsNotNull(group, "group", "Can't create activity view with null group"); var filteredTags = Array.FindAll(tags, tag => !string.IsNullOrEmpty(tag)); var activitiesViewBuilder = new ActivitiesViewBuilder(getSocialImpl); activitiesViewBuilder.group = group; activitiesViewBuilder.tags = filteredTags; return(activitiesViewBuilder); }
private GetSocial() { getSocialImpl = GetSocialFactory.InstantiateGetSocial(); currentUser = new CurrentUser(getSocialImpl); getSocialImpl.SetOnWindowStateChangeListener( () => { IsViewOpened = true; if (onViewOpen != null) { onViewOpen(); } }, () => { IsViewOpened = false; if (onViewClose != null) { onViewClose(); } } ); }
private ChatViewBuilder(IGetSocialNativeBridge getSocialImpl) : base(getSocialImpl) { }
/// <summary> /// Must not be invoked directly. Invoke <c><see cref="GetSocial.CreateActivitiesView"/></c> instead. /// </summary> public static ActivitiesViewBuilder Construct(IGetSocialNativeBridge getSocialImpl) { return(new ActivitiesViewBuilder(getSocialImpl)); }
private ActivitiesViewBuilder(IGetSocialNativeBridge getSocialImpl) : base(getSocialImpl) { }
internal static IGetSocialNativeBridge GetInstance() { return(instance ?? (instance = new GetSocialEditorMock())); }
protected ViewBuilder(IGetSocialNativeBridge getSocialImpl) { this.getSocialImpl = getSocialImpl; }
private SmartInviteViewBuilder(IGetSocialNativeBridge getSocialImpl) : base(getSocialImpl) { }
/// <summary> /// Must not be invoked directly. Invoke <c><see cref="GetSocial.CreateSmartInviteView"/></c> instead. /// </summary> public static SmartInviteViewBuilder Construct(IGetSocialNativeBridge getSocialImpl) { return(new SmartInviteViewBuilder(getSocialImpl)); }
/// <summary> /// Must not be invoked directly. Invoke <c><see cref="GetSocialChat.CreateChatListView"/></c> instead. /// </summary> public static ChatListViewBuilder Construct(IGetSocialNativeBridge getSocialImpl) { return(new ChatListViewBuilder(getSocialImpl)); }
/// <summary> /// Must not be invoked directly. Invoke <c><see cref="GetSocial.CreateUserListView"/></c> instead. /// </summary> public static UserListViewBuilder Construct(IGetSocialNativeBridge getSocialImpl, UserListType type, Action <User> onUserSelected, Action onCancel) { return(new UserListViewBuilder(getSocialImpl, type, onUserSelected, onCancel)); }
private NotificationsViewBuilder(IGetSocialNativeBridge getSocialImpl) : base(getSocialImpl) { }
internal CurrentUser(IGetSocialNativeBridge nativeBridge) { this.nativeBridge = nativeBridge; }
/// <summary> /// Must not be invoked directly. Invoke <c><see cref="GetSocial.CreateNotificationsView"/></c> instead. /// </summary> public static NotificationsViewBuilder Construct(IGetSocialNativeBridge getSocialImpl) { return(new NotificationsViewBuilder(getSocialImpl)); }