EngineManagerCreateEngine(CreateEngineOptions) Method |
Creates an
IEngine object using the specified options.
Namespace: Dundas.BIAssembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
Syntaxpublic static void CreateEngine(
CreateEngineOptions options
)
Public Shared Sub CreateEngine (
options As CreateEngineOptions
)
public:
static void CreateEngine(
CreateEngineOptions^ options
)
static member CreateEngine :
options : CreateEngineOptions -> unit Parameters
- options CreateEngineOptions
- The options for creating the engine.
Exceptions
Remarks
Once this method is called, the current engine instance may be accessed using
Current.
ExampleThis example demonstrates how to create the Dundas BI engine start the Dundas BI engine, log on, and shutdown the Dundas BI engine.
using Dundas.BI;
using Dundas.BI.AccountServices;
...
EngineManager.CreateEngine(
@"C:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\Instance1\www\BIWebsite\App_Data"
);
try
{
EngineManager.StartEngine();
using(Engine.Current.GetService<ICallerContextService>().CreateAndSetCurrentContext(null))
{
LogOnResult logOnResult = Engine.Current.GetService<ILogOnService>().LogOn(
"admin",
"1234",
true,
null
);
Engine.Current.GetService<ICallerContextService>().CurrentContext.SetCurrentSessionId(
logOnResult.Session.Id
);
}
}
finally
{
EngineManager.ShutdownEngine();
}
See Also