| ContextFactoryCreateForSuperAdmin Method |
Creates a new context of execution for the super-admin user.
Namespace:
AskiaFieldCom
Assembly:
AskiaFieldCom (in AskiaFieldCom.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static IContext CreateForSuperAdmin(
IFieldConnection connection
)
public:
static IContext^ CreateForSuperAdmin(
IFieldConnection^ connection
)
Parameters
- connection
- Type: AskiaFieldComIFieldConnection
AskiaField connection object used to communicate with the AskiaField engine.
Return Value
Type:
IContextNew context with the super-admin account.
Examples Create a context using the session token
var moduleName = "AskiaPortal";
var connectionString = "Server=(local);Database=CcaTest;Trusted_Connection=yes";
var address = "localhost";
var port = 980;
var connection = FieldConnectionFactory.Get(moduleName, connectionString, address, port);
if (!connection.Success) throw connection.Exception;
var context = ContextFactory.CreateForSuperAdmin(connection);
See Also