示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }