示例#1
0
 internal NativePlayer GetElement(UIntPtr index)
 {
     if (index.ToUInt64() >= Length().ToUInt64())
     {
         throw new ArgumentOutOfRangeException();
     }
     return(new NativePlayer(
                C.PlayerManager_FetchListResponse_GetData_GetElement(SelfPtr(), index)));
 }
示例#2
0
 internal void FetchFriends(Action <BasicApi.ResponseStatus, List <Player> > callback)
 {
     C.PlayerManager_FetchConnected(mGameServices.AsHandle(),
                                    Types.DataSource.CACHE_OR_NETWORK,
                                    InternalFetchConnectedCallback,
                                    Callbacks.ToIntPtr <FetchListResponse>(
                                        (rsp) => HandleFetchCollected(rsp, callback),
                                        FetchListResponse.FromPointer)
                                    );
 }
示例#3
0
        internal void FetchList(string[] userIds, Action <NativePlayer[]> callback)
        {
            FetchResponseCollector coll = new FetchResponseCollector();

            coll.pendingCount = userIds.Length;
            coll.callback     = callback;
            foreach (string id in userIds)
            {
                C.PlayerManager_Fetch(mGameServices.AsHandle(),
                                      Types.DataSource.CACHE_OR_NETWORK,
                                      id,
                                      InternalFetchCallback,
                                      Callbacks.ToIntPtr <FetchResponse>(
                                          (rsp) => HandleFetchResponse(coll, rsp),
                                          FetchResponse.FromPointer)
                                      );
            }
        }
示例#4
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     C.PlayerManager_FetchSelfResponse_Dispose(SelfPtr());
 }
示例#5
0
 internal NativePlayer Self()
 {
     return(new NativePlayer(C.PlayerManager_FetchSelfResponse_GetData(SelfPtr())));
 }
示例#6
0
 internal Status.ResponseStatus Status()
 {
     return(C.PlayerManager_FetchSelfResponse_GetStatus(SelfPtr()));
 }
示例#7
0
 internal void FetchSelf(Action <FetchSelfResponse> callback)
 {
     C.PlayerManager_FetchSelf(mGameServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK,
                               InternalFetchSelfCallback, Callbacks.ToIntPtr(callback, FetchSelfResponse.FromPointer));
 }
示例#8
0
 internal UIntPtr Length()
 {
     return(C.PlayerManager_FetchListResponse_GetData_Length(SelfPtr()));
 }