WithApp Method
Overloads
WithApp(String, SessionType) |
Initializes an app specific session
|
|||||||
WithApp(IAppIdentifier, SessionType) |
Initializes an app specific session
|
|||||||
WithApp(String, String) |
Initializes a app specific session with a custom session token |
|||||||
WithApp(IAppIdentifier, String) |
Initializes a app specific session with a custom session token |
WithApp(String, SessionType)
Initializes an app specific session
SessionType | Behavior |
---|---|
SessionType.Default | Connects to a app session shared with the Qlik Sense web client |
SessionType.Random | Connects to a globally unique app session |
Declaration
public static ISession WithApp(string appId, SessionType sessionType)
Parameters
Type | Name | Description |
---|---|---|
System.String | appId |
ID of the app to attach the session to |
SessionType | sessionType |
the wanted session type |
Returns
Type | Description |
---|---|
ISession |
a session identifier |
Examples
// create a session that is private
ISession privateSession = Session.WithApp(appIdentifier, SessionType.Random);
WithApp(IAppIdentifier, SessionType)
Initializes an app specific session
SessionType | Behavior |
---|---|
SessionType.Default | Connects to a app session shared with the Qlik Sense web client |
SessionType.Random | Connects to a globally unique app session |
Declaration
public static ISession WithApp(IAppIdentifier appIdentifier, SessionType sessionType)
Parameters
Type | Name | Description |
---|---|---|
IAppIdentifier | appIdentifier |
application identifier to attach the session to |
SessionType | sessionType |
the wanted session type |
Returns
Type | Description |
---|---|
ISession |
a session identifier |
Examples
// create a session that is private
ISession privateSession = Session.WithApp(appIdentifier, SessionType.Random);
WithApp(String, String)
Initializes a app specific session with a custom session token
Declaration
public static ISession WithApp(string appId, string sessionToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | appId |
ID of the app to attach the session to |
System.String | sessionToken |
a custom session token |
Returns
Type | Description |
---|---|
ISession |
a session identifier |
Examples
// create a session that synchronizes with the Qlik Sense client
ISession syncedSession = Session.WithApp(appIdentifier);
// create a session that synchronizes with other clients using the same token
ISession privateSession = Session.WithApp(appIdentifier, "MySpecificSession");
WithApp(IAppIdentifier, String)
Initializes a app specific session with a custom session token
Declaration
public static ISession WithApp(IAppIdentifier appIdentifier, string sessionToken = null)
Parameters
Type | Name | Description |
---|---|---|
IAppIdentifier | appIdentifier |
application identifier to attach the session to |
System.String | sessionToken |
a custom session token |
Returns
Type | Description |
---|---|
ISession |
a session identifier |
Examples
// create a session that synchronizes with the Qlik Sense client
ISession syncedSession = Session.WithApp(appIdentifier);
// create a session that synchronizes with other clients using the same token
ISession privateSession = Session.WithApp(appIdentifier, "MySpecificSession");
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!