Microsoft.Extensions.Configuration.Binder
Specifies options used by the .
Gets or sets a value that indicates whether the binder attempts to set all properties or only public properties.
if the binder attempts to set all non-read-only properties; if only public properties are set.
Gets or sets a value that indicates whether exceptions are thrown when converting a value or when a configuration
key is found for which the provided model object doesn't have an appropriate property that matches the key's name.
if an is thrown with a description; if no exceptions are thrown. The default is .
Static helper class that allows binding strongly typed objects to configuration values.
Attempts to bind the configuration instance to a new instance of type T.
If this configuration section has a value, that will be used.
Otherwise binding by matching property names against configuration keys recursively.
The type of the new instance to bind.
The configuration instance to bind.
The new instance of T if successful, default(T) otherwise.
Attempts to bind the configuration instance to a new instance of type T.
If this configuration section has a value, that will be used.
Otherwise binding by matching property names against configuration keys recursively.
The type of the new instance to bind.
The configuration instance to bind.
Configures the binder options.
The new instance of T if successful, default(T) otherwise.
Attempts to bind the configuration instance to a new instance of type T.
If this configuration section has a value, that will be used.
Otherwise binding by matching property names against configuration keys recursively.
The configuration instance to bind.
The type of the new instance to bind.
The new instance if successful, null otherwise.
Attempts to bind the configuration instance to a new instance of type T.
If this configuration section has a value, that will be used.
Otherwise binding by matching property names against configuration keys recursively.
The configuration instance to bind.
The type of the new instance to bind.
Configures the binder options.
The new instance if successful, null otherwise.
Attempts to bind the given object instance to the configuration section specified by the key by matching property names against configuration keys recursively.
The configuration instance to bind.
The key of the configuration section to bind.
The object to bind.
Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.
The configuration instance to bind.
The object to bind.
Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.
The configuration instance to bind.
The object to bind.
Configures the binder options.
Extracts the value with the specified key and converts it to type T.
The type to convert the value to.
The configuration.
The key of the configuration section's value to convert.
The converted value.
Extracts the value with the specified key and converts it to type T.
The type to convert the value to.
The configuration.
The key of the configuration section's value to convert.
The default value to use if no value is found.
The converted value.
Extracts the value with the specified key and converts it to the specified type.
The configuration.
The type to convert the value to.
The key of the configuration section's value to convert.
The converted value.
Extracts the value with the specified key and converts it to the specified type.
The configuration.
The type to convert the value to.
The key of the configuration section's value to convert.
The default value to use if no value is found.
The converted value.
Reset the property value to the value from the property getter. This is useful for properties that have a getter or setters that perform some logic changing the object state.
The property to reset.
The instance to reset the property on.
The binder options.
This method doesn't do any configuration binding. It just resets the property value to the value from the property getter.
This method called only when creating an instance using a primary constructor with parameters names match properties names.
Create an instance of the specified type.
The type to create an instance of.
The configuration to bind to the instance.
The binder options.
The parameters of the constructor used to create the instance.
The created instance.
If the type cannot be created.
constructorParameters will not be null only when using a constructor with a parameters which get their values from the configuration
This happen when using types having properties match the constructor parameter names. `record` types are an example.
In such cases we need to carry the parameters list to avoid binding the properties again during BindProperties.
Indicates that certain members on a specified are accessed dynamically,
for example through .
This allows tools to understand which members are being accessed during the execution
of a program.
This attribute is valid on members whose type is or .
When this attribute is applied to a location of type , the assumption is
that the string represents a fully qualified type name.
When this attribute is applied to a class, interface, or struct, the members specified
can be accessed dynamically on instances returned from calling
on instances of that class, interface, or struct.
If the attribute is applied to a method it's treated as a special case and it implies
the attribute should be applied to the "this" parameter of the method. As such the attribute
should only be used on instance methods of types assignable to System.Type (or string, but no methods
will use it there).
Initializes a new instance of the class
with the specified member types.
The types of members dynamically accessed.
Gets the which specifies the type
of members dynamically accessed.
Specifies the types of members that are dynamically accessed.
This enumeration has a attribute that allows a
bitwise combination of its member values.
Specifies no members.
Specifies the default, parameterless public constructor.
Specifies all public constructors.
Specifies all non-public constructors.
Specifies all public methods.
Specifies all non-public methods.
Specifies all public fields.
Specifies all non-public fields.
Specifies all public nested types.
Specifies all non-public nested types.
Specifies all public properties.
Specifies all non-public properties.
Specifies all public events.
Specifies all non-public events.
Specifies all interfaces implemented by the type.
Specifies all non-public constructors, including those inherited from base classes.
Specifies all non-public methods, including those inherited from base classes.
Specifies all non-public fields, including those inherited from base classes.
Specifies all non-public nested types, including those inherited from base classes.
Specifies all non-public properties, including those inherited from base classes.
Specifies all non-public events, including those inherited from base classes.
Specifies all public constructors, including those inherited from base classes.
Specifies all public nested types, including those inherited from base classes.
Specifies all constructors, including those inherited from base classes.
Specifies all methods, including those inherited from base classes.
Specifies all fields, including those inherited from base classes.
Specifies all nested types, including those inherited from base classes.
Specifies all properties, including those inherited from base classes.
Specifies all events, including those inherited from base classes.
Specifies all members.
Indicates that the specified method requires the ability to generate new code at runtime,
for example through .
This allows tools to understand which methods are unsafe to call when compiling ahead of time.
Initializes a new instance of the class
with the specified message.
A message that contains information about the usage of dynamic code.
When set to true, indicates that the annotation should not apply to static members.
Gets a message that contains information about the usage of dynamic code.
Gets or sets an optional URL that contains more information about the method,
why it requires dynamic code, and what options a consumer has to deal with it.
Indicates that the specified method requires dynamic access to code that is not referenced
statically, for example through .
This allows tools to understand which methods are unsafe to call when removing unreferenced
code from an application.
Initializes a new instance of the class
with the specified message.
A message that contains information about the usage of unreferenced code.
When set to true, indicates that the annotation should not apply to static members.
Gets a message that contains information about the usage of unreferenced code.
Gets or sets an optional URL that contains more information about the method,
why it requires unreferenced code, and what options a consumer has to deal with it.
Suppresses reporting of a specific rule violation, allowing multiple suppressions on a
single code artifact.
is different than
in that it doesn't have a
. So it is always preserved in the compiled assembly.
Initializes a new instance of the
class, specifying the category of the tool and the identifier for an analysis rule.
The category for the attribute.
The identifier of the analysis rule the attribute applies to.
Gets the category identifying the classification of the attribute.
The property describes the tool or tool analysis category
for which a message suppression attribute applies.
Gets the identifier of the analysis tool rule to be suppressed.
Concatenated together, the and
properties form a unique check identifier.
Gets or sets the scope of the code that is relevant for the attribute.
The Scope property is an optional argument that specifies the metadata scope for which
the attribute is relevant.
Gets or sets a fully qualified path that represents the target of the attribute.
The property is an optional argument identifying the analysis target
of the attribute. An example value is "System.IO.Stream.ctor():System.Void".
Because it is fully qualified, it can be long, particularly for targets such as parameters.
The analysis tool user interface should be capable of automatically formatting the parameter.
Gets or sets an optional argument expanding on exclusion criteria.
The property is an optional argument that specifies additional
exclusion where the literal metadata target is not sufficiently precise. For example,
the cannot be applied within a method,
and it may be desirable to suppress a violation against a statement in the method that will
give a rule violation, but not against all statements in the method.
Gets or sets the justification for suppressing the code analysis message.
Specifies that null is allowed as an input even if the corresponding type disallows it.
Specifies that null is disallowed as an input even if the corresponding type allows it.
Specifies that an output may be null even if the corresponding type disallows it.
Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.
Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter may be null.
Gets the return value condition.
Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter will not be null.
Gets the return value condition.
Specifies that the output will be non-null if the named parameter is non-null.
Initializes the attribute with the associated parameter name.
The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
Gets the associated parameter name.
Applied to a method that will never return under any circumstance.
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
Initializes the attribute with the specified parameter value.
The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
the associated parameter matches this value.
Gets the condition parameter value.
Specifies that the method or property will ensure that the listed field and property members have not-null values.
Initializes the attribute with a field or property member.
The field or property member that is promised to be not-null.
Initializes the attribute with the list of field and property members.
The list of field and property members that are promised to be not-null.
Gets field or property member names.
Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
Initializes the attribute with the specified return value condition and a field or property member.
The return value condition. If the method returns this value, the associated field or property member will not be null.
The field or property member that is promised to be not-null.
Initializes the attribute with the specified return value condition and list of field and property members.
The return value condition. If the method returns this value, the associated field and property members will not be null.
The list of field and property members that are promised to be not-null.
Gets the return value condition.
Gets field or property member names.
When applied to an attribute class, instructs the compiler to flow applications of that attribute,
from source code down to compiler-generated symbols. This can help IL-based analysis tools.
One example where this attribute applies is in C# primary constructor parameters. If an attribute
marked with gets applied to a primary constructor
parameter, the attribute will also be applied to any compiler-generated fields storing that parameter.
Initializes a new instance of the class.
Attribute used to indicate a source generator should create a function for marshalling
arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
This attribute is meaningless if the source generator associated with it is not enabled.
The current built-in source generator only supports C# and only supplies an implementation when
applied to static, partial, non-generic methods.
Initializes a new instance of the .
Name of the library containing the import.
Gets the name of the library containing the import.
Gets or sets the name of the entry point to be called.
Gets or sets how to marshal string arguments to the method.
If this field is set to a value other than ,
must not be specified.
Gets or sets the used to control how string arguments to the method are marshalled.
If this field is specified, must not be specified
or must be set to .
Gets or sets whether the callee sets an error (SetLastError on Windows or errno
on other platforms) before returning from the attributed method.
Specifies how strings should be marshalled for generated p/invokes
Indicates the user is supplying a specific marshaller in .
Use the platform-provided UTF-8 marshaller.
Use the platform-provided UTF-16 marshaller.
Cannot create instance of type '{0}' because it is either abstract or an interface.
Cannot create instance of type '{0}' because one or more parameters cannot be bound to. Constructor parameters cannot be declared as in, out, or ref. Invalid parameters are: '{1}'
Cannot create instance of type '{0}' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: '{1}'
Failed to convert configuration value '{0}' at '{1}' to type '{2}'.
Failed to create instance of type '{0}'.
'{0}' was set and binding has failed. The likely cause is an invalid configuration value.
'{0}' was set on the provided {1}, but the following properties were not found on the instance of {2}: {3}
Cannot create instance of type '{0}' because it is missing a public instance constructor.
Cannot create instance of type '{0}' because it has multiple public parameterized constructors.
Cannot create instance of type '{0}' because one or more parameters are unnamed.
Cannot create instance of type '{0}' because parameter '{1}' has no matching config. Each parameter in the constructor that does not have a default value must have a corresponding config entry.
Cannot create instance of type '{0}' because multidimensional arrays are not supported.
Provides downlevel polyfills for static methods on Exception-derived types.