C# Class DtaSpy.BizTalkTrackingDb

Database wrapper for retrieval of tracked messages, parts, fragments and context. Normally you'd use an instance of this object to retrieve one or more messages and then use the message instances to access all related objects (parts, fragments and contexts). For all methods to work the connection needs to have EXECUTE permissions for the following stored procedures in the BizTalk DTA database: ops_LoadTrackedMessages, ops_LoadTrackedPartByID, ops_LoadTrackedParts, ops_LoadTrackedMessageContext and ops_LoadTrackedPartFragment.
Inheritance: IDisposable
Show file Open project: niik/DtaSpy Class Usage Examples

Public Methods

Method Description
BizTalkTrackingDb ( string connectionString ) : System

Initializes a new instance of the BizTalkTrackingDb class with which you can retrieve tracked messages, parts, fragments and contexts.

IDisposable ( ) : void
LoadTrackedMessage ( Guid messageId ) : BizTalkTrackedMessage

Attempts to load the tracked message regardless of which spool it resides in by first testing spool 1 then spool 2. Returns null if no message was found.

LoadTrackedMessage ( Guid messageId, int spoolId ) : BizTalkTrackedMessage

Attempts to load the tracked message regardless from the given spool. Returns null if no message was found.

LoadTrackedMessageContext ( Guid messageId, int spoolId ) : BizTalkPropertyBag

Loads the tracked message context. Returns null if no part fragment was found.

LoadTrackedMessages ( ) : IEnumerable

Loads all tracked messages in the current database (in both pools).

LoadTrackedMessages ( int spoolId ) : IEnumerable

Loads all tracked messages in the given spool.

LoadTrackedPart ( Guid messageId, Guid partId, int spoolId ) : BizTalkTrackedMessagePart

Loads the tracked part. Returns null if no such part was found in the specified spool.

LoadTrackedPartFragment ( Guid partId, int fragmentNumber, int spoolId ) : BizTalkFragment

Loads a tracked part fragment. Returns null if no part fragment was found.

LoadTrackedParts ( Guid messageId, int spoolId ) : IEnumerable

Loads all tracked parts for the given message id.

Protected Methods

Method Description
DeserializeMessageFromRecord ( IDataRecord record, int spoolId ) : BizTalkTrackedMessage

Given a data record; tranform that record into a message.

DeserializeMessagePartFromRecord ( IDataReader record, int spoolId ) : BizTalkTrackedMessagePart

Given a data record; tranform that record into a message part.

Private Methods

Method Description
AddInParameter ( SqlCommand cmd, string parameterName, SqlDbType type, int size, object value ) : SqlParameter
AddInParameter ( SqlCommand cmd, string parameterName, SqlDbType type, object value ) : SqlParameter
CreateStoredProcedureCommand ( SqlConnection connection, string storedProcedureName ) : SqlCommand
LoadTrackedMessages ( Guid messageGuid, int spoolId ) : IEnumerable

Internal message access method; accepts Guid.Empty

Method Details

BizTalkTrackingDb() public method

Initializes a new instance of the BizTalkTrackingDb class with which you can retrieve tracked messages, parts, fragments and contexts.
public BizTalkTrackingDb ( string connectionString ) : System
connectionString string The connection string to the BizTalk DTA database.
return System

DeserializeMessageFromRecord() protected method

Given a data record; tranform that record into a message.
protected DeserializeMessageFromRecord ( IDataRecord record, int spoolId ) : BizTalkTrackedMessage
record IDataRecord
spoolId int
return BizTalkTrackedMessage

DeserializeMessagePartFromRecord() protected method

Given a data record; tranform that record into a message part.
protected DeserializeMessagePartFromRecord ( IDataReader record, int spoolId ) : BizTalkTrackedMessagePart
record IDataReader
spoolId int
return BizTalkTrackedMessagePart

IDisposable() public method

public IDisposable ( ) : void
return void

LoadTrackedMessage() public method

Attempts to load the tracked message regardless of which spool it resides in by first testing spool 1 then spool 2. Returns null if no message was found.
public LoadTrackedMessage ( Guid messageId ) : BizTalkTrackedMessage
messageId Guid The message id.
return BizTalkTrackedMessage

LoadTrackedMessage() public method

Attempts to load the tracked message regardless from the given spool. Returns null if no message was found.
public LoadTrackedMessage ( Guid messageId, int spoolId ) : BizTalkTrackedMessage
messageId Guid The message id.
spoolId int The spool id.
return BizTalkTrackedMessage

LoadTrackedMessageContext() public method

Loads the tracked message context. Returns null if no part fragment was found.
public LoadTrackedMessageContext ( Guid messageId, int spoolId ) : BizTalkPropertyBag
messageId Guid The message id.
spoolId int The spool id.
return BizTalkPropertyBag

LoadTrackedMessages() public method

Loads all tracked messages in the current database (in both pools).
public LoadTrackedMessages ( ) : IEnumerable
return IEnumerable

LoadTrackedMessages() public method

Loads all tracked messages in the given spool.
public LoadTrackedMessages ( int spoolId ) : IEnumerable
spoolId int The spool id.
return IEnumerable

LoadTrackedPart() public method

Loads the tracked part. Returns null if no such part was found in the specified spool.
public LoadTrackedPart ( Guid messageId, Guid partId, int spoolId ) : BizTalkTrackedMessagePart
messageId Guid The message id.
partId Guid The part id.
spoolId int The spool id.
return BizTalkTrackedMessagePart

LoadTrackedPartFragment() public method

Loads a tracked part fragment. Returns null if no part fragment was found.
public LoadTrackedPartFragment ( Guid partId, int fragmentNumber, int spoolId ) : BizTalkFragment
partId Guid The part id.
fragmentNumber int The fragment number.
spoolId int The spool id.
return BizTalkFragment

LoadTrackedParts() public method

Loads all tracked parts for the given message id.
public LoadTrackedParts ( Guid messageId, int spoolId ) : IEnumerable
messageId Guid The message id.
spoolId int The spool id.
return IEnumerable