Exemplo n.º 1
0
        public static FunctionBinding CreateTestBinding(JObject json)
        {
            ScriptBindingContext             context  = new ScriptBindingContext(json);
            WebJobsCoreScriptBindingProvider provider = new WebJobsCoreScriptBindingProvider(NullLogger <WebJobsCoreScriptBindingProvider> .Instance);
            ScriptBinding scriptBinding = null;

            provider.TryCreate(context, out scriptBinding);
            BindingMetadata bindingMetadata = BindingMetadata.Create(json);
            var             config          = new ScriptJobHostOptions();

            return(new ExtensionBinding(config, scriptBinding, bindingMetadata));
        }
        public static FunctionBinding CreateTestBinding(JObject json)
        {
            ScriptBindingContext             context  = new ScriptBindingContext(json);
            WebJobsCoreScriptBindingProvider provider = new WebJobsCoreScriptBindingProvider(new JobHostConfiguration(), new JObject(), null);
            ScriptBinding scriptBinding = null;

            provider.TryCreate(context, out scriptBinding);
            BindingMetadata         bindingMetadata = BindingMetadata.Create(json);
            ScriptHostConfiguration config          = new ScriptHostConfiguration();

            return(new ExtensionBinding(config, scriptBinding, bindingMetadata));
        }
Exemplo n.º 3
0
 public static FunctionBinding CreateTestBinding(JObject json)
 {
     ScriptBindingContext context = new ScriptBindingContext(json);
     WebJobsCoreScriptBindingProvider provider = new WebJobsCoreScriptBindingProvider(new JobHostConfiguration(), new JObject(), new TestTraceWriter(TraceLevel.Verbose));
     ScriptBinding scriptBinding = null;
     provider.TryCreate(context, out scriptBinding);
     BindingMetadata bindingMetadata = BindingMetadata.Create(json);
     ScriptHostConfiguration config = new ScriptHostConfiguration();
     return new ExtensionBinding(config, scriptBinding, bindingMetadata);
 }