Exemplo n.º 1
0
 public static GetUsersRequest ToRpc(this UsersQuery query)
 {
     return(new GetUsersRequest
     {
         SearchTerm = query.Query,
         FollowedByUserId = query.FollowedBy.ToRpc()
     });
 }
        // public static THNotificationContent ToRpcModel(this NotificationContent thNotification)
        // {
        //     return THNotification {

        //     }
        // }
        public static THUsersQuery ToRpcModel(this UsersQuery query)
        {
            return(new THUsersQuery
            {
                Name = query._query,
                Limit = query._limit
            });
        }
        public void FindUsers(UsersQuery query, Action <List <UserReference> > onSuccess, Action <GetSocialError> onFailure)
        {
            var rpcQuery = query.ToRpcModel();

            LogRequest("findUsers", rpcQuery);
            WithHadesClient(client =>
            {
                var response = client.findUsers(SessionId, rpcQuery);
                Ui(() =>
                {
                    LogResponse("findUsers", response.ToDebugString());
                    onSuccess.SafeCall(response.ConvertAll(user => user.ToUserReference()));
                });
            }, onFailure);
        }
 public void FindUsers(UsersQuery query, Action <List <UserReference> > onSuccess, Action <GetSocialError> onFailure)
 {
     DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), query, onSuccess, onFailure);
 }
Exemplo n.º 5
0
 public static void GetUsersCount(UsersQuery query, Action <int> success, Action <GetSocialError> error)
 {
     GetSocialFactory.Bridge.GetUsersCount(query, success, error);
 }
Exemplo n.º 6
0
 public void GetUsersCount(UsersQuery query, Action <int> success, Action <GetSocialError> error)
 {
     CallAsync("Communities.getUsersCount", GSJson.Serialize(query), success, error);
 }
Exemplo n.º 7
0
 public void FindUsers(UsersQuery query, Action <List <UserReference> > onSuccess, Action <GetSocialError> onFailure)
 {
     _gs_findUsers(query.ToJson(),
                   Callbacks.GetUserReferences, onSuccess.GetPointer(),
                   Callbacks.FailureCallback, onFailure.GetPointer());
 }
Exemplo n.º 8
0
 public void FindUsers(UsersQuery query, Action <List <UserReference> > onSuccess, Action <GetSocialError> onFailure)
 {
     _getSocial.CallStatic("findUsers", query.ToAjo(), new ListCallbackProxy <UserReference>(onSuccess, onFailure));
 }