Ejemplo n.º 1
0
        internal static FileStream ToStream(this XmlReader reader, string fileName)
        {
            FileStream fs = new FileStream(fileName, FileMode.Open);

            reader.CopyTo(fs);
            return(fs);
        }
Ejemplo n.º 2
0
        internal static MemoryStream ToStream(this XmlReader reader)
        {
            MemoryStream ms = new MemoryStream();

            reader.CopyTo(ms);
            return(ms);
        }
Ejemplo n.º 3
0
        /// <summary>Return a result from an XmlReader indicating that it is the result of a query performed on a specific connection</summary>
        /// <param name="xml">XML data</param>
        /// <param name="query">The original query which produced the <paramref name="xml"/> response</param>
        /// <param name="database">The name of the database which was queried</param>
        /// <param name="readOnly">Whether or not the data coming back should be read-only</param>
        internal IReadOnlyResult FromXml(XmlReader xml, Command query, string database, bool readOnly)
        {
            var writer = new ResultWriter(this, database, query, readOnly);

            xml.CopyTo(writer);
            return(writer.Result);
        }
    public static FileStream ToStream(this XmlReader reader, string fileName)
    {
        FileStream fs = new FileStream(fileName, FileMode.Create);

        reader.CopyTo(fs);
        return(fs);
    }
Ejemplo n.º 5
0
 /// <summary>
 /// Converts an AML node into a query which can be converted to other forms (e.g. SQL, OData, ...)
 /// </summary>
 /// <param name="xml">XML data</param>
 /// <param name="context">Localization context for parsing and formating data</param>
 public static QueryItem FromXml(XmlReader xml, IServerContext context = null)
 {
     return(FromXml(w => xml.CopyTo(w), context));
 }