private DefaultConverterContext CreateConverterContext(Type targetType, object source, IReadOnlyDictionary <string, object> properties = null)
        {
            var definition      = new TestFunctionDefinition();
            var functionContext = new TestFunctionContext(definition, null);

            return(new DefaultConverterContext(targetType, source, functionContext, properties ?? ImmutableDictionary <string, object> .Empty));
        }
Exemplo n.º 2
0
        private FunctionContext GetContextWithOutputBindings(params string[] outputBindings)
        {
            var testOutputBindings = new Dictionary <string, BindingMetadata>();

            foreach (string bindingName in outputBindings)
            {
                testOutputBindings[bindingName] = new TestBindingMetadata($"SomeOutput{bindingName}", BindingDirection.Out);
            }

            var definition = new TestFunctionDefinition(outputBindings: testOutputBindings);
            var context    = new TestFunctionContext(definition, null);

            return(context);
        }