Table of Contents

Class SessionSearch

Class represents a Session search and search results

public class SessionSearch
Inheritance
SessionSearch
Inherited Members

Constructors

SessionSearch()

public SessionSearch()

Fields

SearchHandle

public Epic.OnlineServices.Sessions.SessionSearch SearchHandle

Field Value

SessionSearch

Properties

RunOnSearchResultReceived

Action to run when search results are successfully retrieved. Set in SetNewSearch(SessionSearch, Action<SessionSearch>), unset in Release(), when a new search is set without the argument, or after OnSearchResultReceived(Dictionary<Session, SessionDetails>) is called.

public Action<SessionSearch> RunOnSearchResultReceived { get; set; }

Property Value

Action<SessionSearch>

Methods

GetResults()

public Dictionary<Session, SessionDetails> GetResults()

Returns

Dictionary<Session, SessionDetails>

GetSearchHandle()

public Epic.OnlineServices.Sessions.SessionSearch GetSearchHandle()

Returns

SessionSearch

OnSearchResultReceived(Dictionary<Session, SessionDetails>)

Sets the SearchResults for this search. RunOnSearchResultReceived is invoked upon calling this, and then unset.

public void OnSearchResultReceived(Dictionary<Session, SessionDetails> results)

Parameters

results Dictionary<Session, SessionDetails>

A Session-to-SessionDetails dictionary with the results.

Release()

public void Release()

SetNewSearch(SessionSearch, Action<SessionSearch>)

public void SetNewSearch(Epic.OnlineServices.Sessions.SessionSearch handle, Action<SessionSearch> actionToRunOnResultsReceived = null)

Parameters

handle SessionSearch
actionToRunOnResultsReceived Action<SessionSearch>

TryGetSessionHandleById(string, out SessionDetails)

Looks through the Sessions stored in SearchResults for a Session with a matching id. If found, outputs the SessionDetails handle object. This can only find Sessions that are part of this search's results, and only if OnSearchResultReceived(Dictionary<Session, SessionDetails>) has stored those values.

public bool TryGetSessionHandleById(string sessionId, out SessionDetails sessionHandle)

Parameters

sessionId string

The id of the Session to find.

sessionHandle SessionDetails

Output parameter for the SessionDetails handle.

Returns

bool

True if a Session was found with the Id. False otherwise.