Ejemplo n.º 1
0
 /// <summary>
 /// Creates an fragment XML reader instance.
 /// </summary>
 /// <param name="oml">OML instance which owns the fragment.</param>
 /// <param name="fragmentName">Name of the fragment to be written.</param>
 public OmlFragmentWriter(Oml oml, string fragmentName)
 {
     _instance = AssemblyUtility.ExecuteInstanceMethod <object>(oml._instance, "GetFragmentXmlWriter", new object[] { fragmentName });
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Closes the writer.
 /// </summary>
 public void Close()
 {
     AssemblyUtility.ExecuteInstanceMethod <object>(_instance, "Close");
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Writes XML to the fragment.
 /// </summary>
 /// <param name="fragment">XML to be written to the fragment.</param>
 public void Write(XElement fragment)
 {
     AssemblyUtility.ExecuteInstanceMethod <object>(_instance, "Replace", new object[] { fragment });
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Exports the OML contents to an OML stream.
 /// </summary>
 /// <param name="outputStream">Destination stream to write the OML file contents to.</param>
 public void Save(Stream outputStream)
 {
     AssemblyUtility.ExecuteInstanceMethod <object>(_instance, "WriteTo", new object[] { outputStream });
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Returns a list of available fragment names.
 /// </summary>
 /// <returns>List of availabel fragment names.</returns>
 public List <string> GetFragmentNames()
 {
     return(AssemblyUtility.ExecuteInstanceMethod <IEnumerable <string> >(_instance, "DumpFragmentsNames").ToList());
 }
 /// <summary>
 /// Returns XML element of the fragment.
 /// </summary>
 /// <returns>XML element of the fragment.</returns>
 public XElement GetXElement()
 {
     return(AssemblyUtility.ExecuteInstanceMethod <XElement>(_instance, "ToXElement"));
 }