|
|
(24 intermediate revisions by one other user not shown) |
Line 1: |
Line 1: |
| {{Template:APIClass|Repository Class|Repository}}
| | #REDIRECT [[Repository.XFRACAS.WriteMessageToDiagnosticsLog]] |
| | |
| {{Template:Repository.WriteToDiagnosticsLog.Cmt}}
| |
| | |
| == Syntax ==
| |
| *WriteToDiagnosticsLog(message {{APIPrefix|As String}} , entrytype {{APIPrefix|As}} [[Repository.XFRACASDiagnosticEntryType|XFRACASDiagnosticEntryType]], comment{{APIPrefix|As String}})
| |
| | |
| Parameters
| |
| :''message'': The message that should be displayed in the diagnostics log for the diagnostics entry type
| |
| :''entryType'': The type of diagnostics entry type, specified as [[Repository.XFRACASDiagnosticsEntryType Enumeration|XFRACASDiagnosticsEntryType]]
| |
| :''exObject'': The object that can be written into the diagnostics log.
| |
| :''comment'': ''Optional'' comment that can be written into the diagnostics log.
| |
| | |
| == Usage Example ==
| |
| {{APIComment|Code Block}}
| |
| | |
| '{{APIComment|Declare a new repository connection class.}}
| |
| {{APIPrefix|Private WithEvents MyRepository As [[New Repository]]}}
| |
| '{{APIComment|Connect to the Synthesis repository.}}
| |
| {{APIPrefix|Dim}} Success {{APIPrefix|As Boolean}} = {{APIPrefix|False}}
| |
| Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
| |
| '{{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}
| |
| {{APIPrefix|Dim}} ListOfXFRACASEntities() {{APIPrefix|As [[NameIdPair Class|NameIdPair]]}}
| |
| ListOfXFRACASEntities = MyRepository.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()
| |
| '{{APIComment|Import the XML file into the entity desired. In this example, the first entity is used.}}
| |
| {{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
| |
| ImportXMLSystemID = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]](ListOfXFRACASEntities(0).ID, [[XFRACASImportType]].Incident, "XMLFileName", "XMLFileDescription")
| |
| '{{APIComment|Process the imported file.}}
| |
| MyRepository.[[Repository.ProcessXfracasImports|ProcessXfracasImports]]()
| |
| '{{APIComment|Create place to see where code is breaking instead of writing to your own logfile}}
| |
| MyRepository.[[Repository.WriteToDiagnosticsLog|WriteToDiagosticsLog]](Diagnostics Message {{APIPrefix|As}} String, entryType {{APIPrefix|As}}[[Repository.XFRACASDiagnosticsEntryType Enumeration|XFRACASDiagnosticsEntryType]].Information)
| |
| | |
| === Reformatted Usage Example ===
| |
| {{APIComment|Declare a new repository connection class.}}
| |
| Private WithEvents MyRepository As [[New Repository]]
| |
| | |
| {{APIComment|Connect to the Synthesis repository.}}
| |
| Dim Success As Boolean = False
| |
| Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
| |
| | |
| {{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}
| |
| Dim ListOfXFRACASEntities() As [[NameIdPair Class|NameIdPair]]
| |
| ListOfXFRACASEntities = MyRepository.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()
| |
| | |
| {{APIComment|Import the XML file into the entity desired. In this example, the first entity is used.}}
| |
| Dim ImportXMLSystemID As Integer
| |
| ImportXMLSystemID = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]](ListOfXFRACASEntities(0).ID, [[XFRACASImportType]].Incident, "XMLFileName", "XMLFileDescription")
| |
| | |
| {{APIComment|Process the imported file.}}
| |
| MyRepository.[[Repository.ProcessXfracasImports|ProcessXfracasImports]]()
| |
| | |
| {{APIComment|Create place to see where code is breaking instead of writing to your own logfile}}
| |
| MyRepository.[[Repository.WriteToDiagnosticsLog|WriteToDiagosticsLog]]({{APIPrefix|ByVal}}Diagnostics Message {{APIPrefix|As}}String, entryType {{APIPrefix|AS}}[[Repository.XFRACASDiagnosticsEntryType Enumeration|XFRACASDiagnosticsEntryType]].Information)
| |