Class DdiReader
Reading any type of DDI xml file
Inheritance
System.Object
DdiReader
Namespace: Algenta.Colectica.Model.Ddi.Utility
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public class DdiReader : IDisposable
Properties
FileName
File path of DDI xml file
Declaration
public string FileName { get; }
Property Value
Type | Description |
---|---|
System.String |
Format
The format of the Ddi file
Declaration
public DdiFileFormat Format { get; }
Property Value
Type | Description |
---|---|
DdiFileFormat |
Methods
Create(String)
Create a DDI file reader
Declaration
public static DdiReader Create(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The path to the DDI file |
Returns
Type | Description |
---|---|
DdiReader | A Ddi reader to use to read the file |
Dispose()
Dispose of all the resources
Declaration
public void Dispose()
Dispose(Boolean)
Protected implementation of Dispose pattern.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | disposing |
GetDdiFileFormat(String)
Determines the format of the DDI XML file.
Declaration
public static DdiFileFormat GetDdiFileFormat(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The full path and name of the DDI XML file. |
Returns
Type | Description |
---|---|
DdiFileFormat | The format of the DDI XML file. |
Import(RepositoryClientBase, out Collection<TypedIdTriple>, out Collection<ResultMessage>)
Import the contents of a DDI file into the specified connection
Declaration
public bool Import(RepositoryClientBase client, out Collection<TypedIdTriple> topLevelItems, out Collection<ResultMessage> messages)
Parameters
Type | Name | Description |
---|---|---|
RepositoryClientBase | client | connection to store items into |
Collection<TypedIdTriple> | topLevelItems | Collection of top level references |
Collection<ResultMessage> | messages | Error and warning messages |
Returns
Type | Description |
---|---|
System.Boolean | true on success |
Read(out FragmentInstance, out Collection<ResultMessage>)
Read the contents of a DDI file
Declaration
public bool Read(out FragmentInstance fragmentInstance, out Collection<ResultMessage> messages)
Parameters
Type | Name | Description |
---|---|---|
FragmentInstance | fragmentInstance | A fragment instance containing the items |
Collection<ResultMessage> | messages | Any error or warning messages |
Returns
Type | Description |
---|---|
System.Boolean | A fragment containing the items in the file |
Events
ProgressChanged
Notifies listeners of progress on a single operation
Declaration
public event ProgressChangedEventHandler ProgressChanged
Event Type
Type | Description |
---|---|
ProgressChangedEventHandler |