C# Class InteropApiTests.SetupHelper

Create a directory and an instance pointed at the directory.
Mostrar archivo Open project: ayende/managed-esent Class Usage Examples

Public Methods

Method Description
CreateNewInstance ( string myDir ) : JET_INSTANCE

Create a new instance and set its log/system/temp directories to the given directory.

CreateRandomDirectory ( ) : string

Creates a new random directory in the current working directory. This should be used to ensure that each test runs in its own directory.

CreateTempTableWithAllColumns ( JET_SESID sesid, TempTableGrbit grbit, JET_TABLEID &tableid ) : JET_COLUMNID>.Dictionary

Creates a standard temp table with a column for each type.

SetLightweightConfiguration ( Microsoft.Isam.Esent.Interop.Instance instance ) : void

Turns off logging, disables the temp DB and turns off events.

Private Methods

Method Description
InstanceName ( ) : string

Creates a unique name for a new instance.

Method Details

CreateNewInstance() public static method

Create a new instance and set its log/system/temp directories to the given directory.
public static CreateNewInstance ( string myDir ) : JET_INSTANCE
myDir string The directory to use.
return JET_INSTANCE

CreateRandomDirectory() public static method

Creates a new random directory in the current working directory. This should be used to ensure that each test runs in its own directory.
public static CreateRandomDirectory ( ) : string
return string

CreateTempTableWithAllColumns() public static method

Creates a standard temp table with a column for each type.
public static CreateTempTableWithAllColumns ( JET_SESID sesid, TempTableGrbit grbit, JET_TABLEID &tableid ) : JET_COLUMNID>.Dictionary
sesid JET_SESID The session to use.
grbit TempTableGrbit Temporary table options.
tableid JET_TABLEID Returns the temporary table.
return JET_COLUMNID>.Dictionary

SetLightweightConfiguration() public static method

Turns off logging, disables the temp DB and turns off events.
public static SetLightweightConfiguration ( Microsoft.Isam.Esent.Interop.Instance instance ) : void
instance Microsoft.Isam.Esent.Interop.Instance The instance to configure.
return void