public static IStream <TOut> CrossApplyXmlFile <TOut>(this IStream <LocalFilesValue> stream, string name, XmlFileDefinition xmlFileDefinition, Func <LocalFilesValue, XmlNodeParsed, TOut> resultSelector, bool noParallelisation = false) { var valuesProvider = new XmlFileValuesProvider <LocalFilesValue, TOut>(new XmlFileValuesProviderArgs <LocalFilesValue, TOut>() { DataStreamSelector = i => i.GetContent(), XmlFileDefinition = xmlFileDefinition, ResultSelector = resultSelector }); return(stream.CrossApply <LocalFilesValue, TOut>(name, valuesProvider.PushValues, noParallelisation)); }
public static IStream <XmlNodeParsed> CrossApplyXmlFile(this IStream <string> stream, string name, XmlFileDefinition xmlFileDefinition, bool noParallelisation = false) { var valuesProvider = new XmlFileValuesProvider <string, XmlNodeParsed>(new XmlFileValuesProviderArgs <string, XmlNodeParsed>() { DataStreamSelector = i => File.OpenRead(i), XmlFileDefinition = xmlFileDefinition, ResultSelector = (i, o) => o }); return(stream.CrossApply <string, XmlNodeParsed>(name, valuesProvider.PushValues, noParallelisation)); }
public static IStream <TOut> CrossApplyXmlFile <TParsed, TOut>(this IStream <Stream> stream, string name, XmlNodeDefinition <TParsed> xmlNodeDefinitions, Func <TParsed, TOut> resultSelector, IDictionary <string, string> prefixToUriNamespaces = null, bool noParallelisation = false) { var valuesProvider = new XmlFileValuesProvider <Stream, TParsed, TOut>(new XmlFileValuesProviderArgs <Stream, TParsed, TOut>() { PrefixToUriNamespaces = prefixToUriNamespaces, DataStreamSelector = i => i, XmlNodeDefinition = xmlNodeDefinitions, ResultSelector = (s, o) => resultSelector(o) }); return(stream.CrossApply <Stream, TOut>(name, valuesProvider.PushValues, noParallelisation)); }
public static IStream <TOut> CrossApplyXmlFile <TIn, TOut>(this IStream <TIn> stream, string name, XmlNodeDefinition <TOut> xmlNodeDefinitions, Func <TIn, string> filePathSelector, IDictionary <string, string> prefixToUriNamespaces = null, bool noParallelisation = false) { var valuesProvider = new XmlFileValuesProvider <TIn, TOut, TOut>(new XmlFileValuesProviderArgs <TIn, TOut, TOut>() { PrefixToUriNamespaces = prefixToUriNamespaces, DataStreamSelector = i => File.OpenRead(filePathSelector(i)), XmlNodeDefinition = xmlNodeDefinitions, ResultSelector = (i, o) => o }); return(stream.CrossApply <TIn, TOut>(name, valuesProvider.PushValues, noParallelisation)); }
public static IStream <TOut> CrossApplyXmlFile <TOut>(this IStream <LocalFilesValue> stream, string name, XmlNodeDefinition <TOut> xmlNodeDefinitions, IDictionary <string, string> prefixToUriNamespaces = null, bool noParallelisation = false) { var valuesProvider = new XmlFileValuesProvider <LocalFilesValue, TOut, TOut>(new XmlFileValuesProviderArgs <LocalFilesValue, TOut, TOut>() { PrefixToUriNamespaces = prefixToUriNamespaces, DataStreamSelector = i => i.GetContent(), XmlNodeDefinition = xmlNodeDefinitions, ResultSelector = (i, o) => o }); return(stream.CrossApply <LocalFilesValue, TOut>(name, valuesProvider.PushValues, noParallelisation)); }