internal NativePlayer GetElement(UIntPtr index) { if (index.ToUInt64() >= Length().ToUInt64()) { throw new ArgumentOutOfRangeException(); } return(new NativePlayer( C.PlayerManager_FetchListResponse_GetData_GetElement(SelfPtr(), index))); }
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) ); }
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) ); } }
protected override void CallDispose(HandleRef selfPointer) { C.PlayerManager_FetchSelfResponse_Dispose(SelfPtr()); }
internal NativePlayer Self() { return(new NativePlayer(C.PlayerManager_FetchSelfResponse_GetData(SelfPtr()))); }
internal Status.ResponseStatus Status() { return(C.PlayerManager_FetchSelfResponse_GetStatus(SelfPtr())); }
internal void FetchSelf(Action <FetchSelfResponse> callback) { C.PlayerManager_FetchSelf(mGameServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK, InternalFetchSelfCallback, Callbacks.ToIntPtr(callback, FetchSelfResponse.FromPointer)); }
internal UIntPtr Length() { return(C.PlayerManager_FetchListResponse_GetData_Length(SelfPtr())); }