MultiplayerSession Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MultiplayerSession(XboxLiveContext) |
Creates a new MultiplayerSession Class object from the supplied Xbox Live context, without any constants or session reference. |
MultiplayerSession(XboxLiveContext, MultiplayerSessionReference) |
Creates a new MultiplayerSession without any constants, which allows the request to simply use whatever constants are already specified in the session template on the service. Those constants are returned in the response session data. |
MultiplayerSession(XboxLiveContext, MultiplayerSessionReference, UInt32, MultiplayerSessionVisibility, IVectorView<String>, String) |
MultiplayerSession(XboxLiveContext)
Creates a new MultiplayerSession Class object from the supplied Xbox Live context, without any constants or session reference.
[Windows.Foundation.Metadata.Overload("CreateInstance3")]
public MultiplayerSession (Microsoft.Xbox.Services.XboxLiveContext xboxLiveContext);
new Microsoft.Xbox.Services.Multiplayer.MultiplayerSession : Microsoft.Xbox.Services.XboxLiveContext -> Microsoft.Xbox.Services.Multiplayer.MultiplayerSession
Parameters
- xboxLiveContext
- XboxLiveContext
The XboxLiveContext containing the user who is creating this session.
- Attributes
-
Windows.Foundation.Metadata.OverloadAttribute
Remarks
This override is intended to be used when the session serviceconfigid, template, and name are not known. A MultiplayerSession created using this constructor must be retrieved or written to by using the "ByHandle" overrides. (e.g. WriteSessionByHandleAsync and GetCurrentSessionByHandleAsync)
After calling this constructor, the client must use the MultiplayerService::WriteSessionAsync method to write batched local changes to the service. If this constructor is called without calling MultiplayerService::WriteSessionAsync, it only changes the local session object but does not commit it to the service.
This constructor is intended for use with template contract 104/105 or later.
Applies to
MultiplayerSession(XboxLiveContext, MultiplayerSessionReference)
Creates a new MultiplayerSession without any constants, which allows the request to simply use whatever constants are already specified in the session template on the service. Those constants are returned in the response session data.
[Windows.Foundation.Metadata.Overload("CreateInstance1")]
public MultiplayerSession (Microsoft.Xbox.Services.XboxLiveContext xboxLiveContext, Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference multiplayerSessionReference);
new Microsoft.Xbox.Services.Multiplayer.MultiplayerSession : Microsoft.Xbox.Services.XboxLiveContext * Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference -> Microsoft.Xbox.Services.Multiplayer.MultiplayerSession
Parameters
- xboxLiveContext
- XboxLiveContext
The XboxLiveContext containing the user who is creating this session.
- multiplayerSessionReference
- MultiplayerSessionReference
A reference that uniquely identifies the session.
- Attributes
-
Windows.Foundation.Metadata.OverloadAttribute
Remarks
After calling this constructor, the client must use the MultiplayerService::WriteSessionAsync method to write batched local changes to the service. If this constructor is called without calling MultiplayerService::WriteSessionAsync, it only changes the local session
Applies to
MultiplayerSession(XboxLiveContext, MultiplayerSessionReference, UInt32, MultiplayerSessionVisibility, IVectorView<String>, String)
[Windows.Foundation.Metadata.Overload("CreateInstance2")]
public MultiplayerSession (Microsoft.Xbox.Services.XboxLiveContext xboxLiveContext, Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference multiplayerSessionReference, uint maxMembersInSession, Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionVisibility multiplayerSessionVisibility, Windows.Foundation.Collections.IVectorView<string> initiatorXboxUserIds, string sessionCustomConstantsJson);
new Microsoft.Xbox.Services.Multiplayer.MultiplayerSession : Microsoft.Xbox.Services.XboxLiveContext * Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference * uint32 * Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionVisibility * Windows.Foundation.Collections.IVectorView<string> * string -> Microsoft.Xbox.Services.Multiplayer.MultiplayerSession
Parameters
- xboxLiveContext
- XboxLiveContext
- multiplayerSessionReference
- MultiplayerSessionReference
- maxMembersInSession
- UInt32
- multiplayerSessionVisibility
- MultiplayerSessionVisibility
- initiatorXboxUserIds
- Windows.Foundation.Collections.IVectorView<String>
- sessionCustomConstantsJson
- String
- Attributes
-
Windows.Foundation.Metadata.OverloadAttribute