Repository.XFRACAS.SerializeXMLObjectToByteArray

From ReliaWiki
Revision as of 18:50, 17 October 2013 by Albert Szeto (talk | contribs) (Created page with '{{Template:APIClass|Repository Class|Repository}} Uploads an import file for processing and returns the system ID == Method Syntax == {{APIName|'''SerializeXMLObjectToByteArray''…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Uploads an import file for processing and returns the system ID

Method Syntax

SerializeXMLObjectToByteArray( ByRef pData() As Byte , ByRef pObject As Object ) As Integer
Uploads an import file for processing and returns the system ID of the uploaded

Parameters

pData A defined byte array to return the

pObject An serializable XML object.

Usage Example

Declare a new repository connection class.

       Private WithEvents MyRepository As New Repository

Connect to the desired Synthesis repository.

       Dim Success As Boolean = False
       Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")

Define an serializable XML Object.

       Dim xmlObject As Object = Nothing
       'populate the xmlObject with values to import

Define the byte array.

       Dim byteArray As Byte() = Nothing

Serialize the xmlObject into the byteArray.

       Dim SerializeSuccess As Boolean
       SerializeSuccess = MyRepository.SerializeXMLObjectToByteArray(byteArray, xmlObject)