/// <summary> /// Creates a FunctionTestServer for the specified function type, with an optional /// type to inspect for <see cref="FunctionsStartupAttribute"/> attributes. /// </summary> /// <param name="functionTarget">The function type to host in the server.</param> /// <param name="startupAttributeSource">A type to examine for <see cref="FunctionsStartupAttribute"/> attributes to provide further customization. /// If this is null, or no attributes are specified in the type (or its base class hierarchy) or the assembly it's declared in, /// the startup classes in the function assembly are used.</param> public FunctionTestServer(Type functionTarget, Type?startupAttributeSource) : this(FunctionTestServerBuilder.Create(functionTarget).MaybeUseFunctionsStartupsFromAttributes(startupAttributeSource).BuildHost(), functionTarget) { }
/// <summary> /// Creates a FunctionTestServer for the specified function type, with an optional /// type to inspect for <see cref="FunctionTestStartupAttribute"/> attributes. /// </summary> /// <param name="functionTarget">The function type to host in the server.</param> /// <param name="attributedStartupType">A type to examine for <see cref="FunctionTestStartupAttribute"/> attributes to provide further customization. /// If this is null, or no attributes are specified in the type (or its base class hierarchy) the startup classes in the /// function assembly are used.</param> public FunctionTestServer(Type functionTarget, Type?attributedStartupType) : this(FunctionTestServerBuilder.Create(functionTarget).MaybeUseFunctionsStartupsFromAttributes(attributedStartupType).BuildTestServer(), functionTarget) { }