Micro Focus Content Manager SDK 9.4
HP.HPTRIM.SDK.TrimApplicationBase Class Reference
Inheritance diagram for HP.HPTRIM.SDK.TrimApplicationBase:
HP.HPTRIM.SDK.TrimApplication

Classes

class  DummyFinalizer
 

Static Public Member Functions

static void Initialize ()
 Initializes the SDK, by explicitly loading native binaries. Once Initialize() returns successfully, subsequent calls to Initialize() have no effect. If Initialize() is not called by the application, it will be called implicitly by the SDK, when the first native-backed SDK method is called. More...
 
static void EnableSdkLeakTracking (bool enable)
 Enables or disables SDK leak tracking. If leak tracking is enabled, stack traces are collected upon the creation of each Database. If the leak tracker subsequently detects that one of these objects is being disposed by the garbage collector, rather than through explicit disposal, an error will be logged to the Windows Application event log. Such an error will only be logged once. More...
 
static int GetSdkLeakCount ()
 Gets the current number of SDK leaks. Requires SDK leak tracking to be enabled. More...
 
static List< string > GetSdkLeakStackTraces ()
 Gets the current list of SDK leaks. Requires SDK leak tracking to be enabled. More...
 
static int GetSdkObjectCount ()
 Gets the current number of SDK objects that have not yet been disposed. More...
 
static long ToErrorCode (MessageIds msgId)
 Converts the error message enumeration value to an ErrorCode that is used by the TRIMSDK TrimException class. More...
 
static string GetMessage (MessageIds msgId)
 Retrieves a message with the specified message id from the TRIM Messages database. More...
 
static string GetMessage (MessageIds msgId, string substPercent1)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string provided will replace all occurrences of %1% that are found inside the TRIM Message. More...
 
static string GetMessage (MessageIds msgId, string substPercent1, string substPercent2)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string substPercent1 will replace all occurrences of %1% that are found inside the TRIM Message. The substitution string substPercent2 will replace all occurrences of %2% that are found inside the TRIM Message. More...
 
static string GetMessage (MessageIds msgId, string[] substPercentStrings)
 Retrieves a message with the specified message id from the TRIM Messages database. The array of substitition strings will replace the values %1%, %2%, ... that are found inside the message. Note that although the array index is 0-based, the substitution strings are 1-based, so substPercentStrings[0] will be used to replace %1%. A maximum of 8 substitution strings are currently supported. More...
 
static string GetMessage (Database db, MessageIds msgId)
 Retrieves a message with the specified message id from the TRIM Messages database. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 
static string GetMessage (Database db, MessageIds msgId, string substPercent1)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string provided will replace all occurrences of %1% that are found inside the TRIM Message. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 
static string GetMessage (Database db, MessageIds msgId, string substPercent1, string substPercent2)
 Retrieves a message with the specified message id from the TRIM Messages database. The substitution string substPercent1 will replace all occurrences of %1% that are found inside the TRIM Message. The substitution string substPercent2 will replace all occurrences of %2% that are found inside the TRIM Message. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 
static string GetMessage (Database db, MessageIds msgId, string[] substPercentStrings)
 Retrieves a message with the specified message id from the TRIM Messages database. The array of substitition strings will replace the values %1%, %2%, ... that are found inside the message. Note that although the array index is 0-based, the substitution strings are 1-based, so substPercentStrings[0] will be used to replace %1%. A maximum of 8 substitution strings are currently supported. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database. More...
 

Properties

static string TrimBinariesLoadPath [get, set]
 Set TrimBinariesLoadPath, to force the SDK to load native binaries from a particular path. This will override the searching logic that the SDK would otherwise apply. More...
 
static bool HasBeenInitialized [get]
 

Member Function Documentation

static void HP.HPTRIM.SDK.TrimApplicationBase.EnableSdkLeakTracking ( bool  enable)
static

Enables or disables SDK leak tracking. If leak tracking is enabled, stack traces are collected upon the creation of each Database. If the leak tracker subsequently detects that one of these objects is being disposed by the garbage collector, rather than through explicit disposal, an error will be logged to the Windows Application event log. Such an error will only be logged once.

If leak tracking is enabled, SDK applications can also manually check for leaks by calling GetSdkLeakCount() and GetSdkLeakStackTraces() at arbitrary points in the application.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( MessageIds  msgId)
static

Retrieves a message with the specified message id from the TRIM Messages database.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( MessageIds  msgId,
string  substPercent1 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The substitution string provided will replace all occurrences of %1% that are found inside the TRIM Message.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( MessageIds  msgId,
string  substPercent1,
string  substPercent2 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The substitution string substPercent1 will replace all occurrences of %1% that are found inside the TRIM Message. The substitution string substPercent2 will replace all occurrences of %2% that are found inside the TRIM Message.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( MessageIds  msgId,
string[]  substPercentStrings 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The array of substitition strings will replace the values %1%, %2%, ... that are found inside the message. Note that although the array index is 0-based, the substitution strings are 1-based, so substPercentStrings[0] will be used to replace %1%. A maximum of 8 substitution strings are currently supported.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( Database  db,
MessageIds  msgId 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( Database  db,
MessageIds  msgId,
string  substPercent1 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The substitution string provided will replace all occurrences of %1% that are found inside the TRIM Message. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( Database  db,
MessageIds  msgId,
string  substPercent1,
string  substPercent2 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The substitution string substPercent1 will replace all occurrences of %1% that are found inside the TRIM Message. The substitution string substPercent2 will replace all occurrences of %2% that are found inside the TRIM Message. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database.

static string HP.HPTRIM.SDK.TrimApplicationBase.GetMessage ( Database  db,
MessageIds  msgId,
string[]  substPercentStrings 
)
static

Retrieves a message with the specified message id from the TRIM Messages database. The array of substitition strings will replace the values %1%, %2%, ... that are found inside the message. Note that although the array index is 0-based, the substitution strings are 1-based, so substPercentStrings[0] will be used to replace %1%. A maximum of 8 substitution strings are currently supported. The supplied database (if not null) will be used to do any customer-specific captioning of certain TRIM strings, and will also return the message in the language designated for the currently logged-on user in that database.

static int HP.HPTRIM.SDK.TrimApplicationBase.GetSdkLeakCount ( )
static

Gets the current number of SDK leaks. Requires SDK leak tracking to be enabled.

static List<string> HP.HPTRIM.SDK.TrimApplicationBase.GetSdkLeakStackTraces ( )
static

Gets the current list of SDK leaks. Requires SDK leak tracking to be enabled.

Returns
static int HP.HPTRIM.SDK.TrimApplicationBase.GetSdkObjectCount ( )
static

Gets the current number of SDK objects that have not yet been disposed.

static void HP.HPTRIM.SDK.TrimApplicationBase.Initialize ( )
static

Initializes the SDK, by explicitly loading native binaries. Once Initialize() returns successfully, subsequent calls to Initialize() have no effect. If Initialize() is not called by the application, it will be called implicitly by the SDK, when the first native-backed SDK method is called.

static long HP.HPTRIM.SDK.TrimApplicationBase.ToErrorCode ( MessageIds  msgId)
static

Converts the error message enumeration value to an ErrorCode that is used by the TRIMSDK TrimException class.

Property Documentation

bool HP.HPTRIM.SDK.TrimApplicationBase.HasBeenInitialized
staticget
string HP.HPTRIM.SDK.TrimApplicationBase.TrimBinariesLoadPath
staticgetset

Set TrimBinariesLoadPath, to force the SDK to load native binaries from a particular path. This will override the searching logic that the SDK would otherwise apply.