// public constructor to form the custom attribute with constructor, constructor
// parameters and named properties.
public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs,
- PropertyInfo[] namedProperties, object[] propertyValues)
+ PropertyInfo[] namedProperties, object?[] propertyValues)
{
InitCustomAttributeBuilder(con, constructorArgs, namedProperties,
propertyValues, Array.Empty<FieldInfo>(), Array.Empty<object>());
// public constructor to form the custom attribute with constructor and constructor
// parameters.
public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs,
- FieldInfo[] namedFields, object[] fieldValues)
+ FieldInfo[] namedFields, object?[] fieldValues)
{
InitCustomAttributeBuilder(con, constructorArgs, Array.Empty<PropertyInfo>(),
Array.Empty<object>(), namedFields, fieldValues);
// public constructor to form the custom attribute with constructor and constructor
// parameters.
public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs,
- PropertyInfo[] namedProperties, object[] propertyValues,
- FieldInfo[] namedFields, object[] fieldValues)
+ PropertyInfo[] namedProperties, object?[] propertyValues,
+ FieldInfo[] namedFields, object?[] fieldValues)
{
InitCustomAttributeBuilder(con, constructorArgs, namedProperties,
propertyValues, namedFields, fieldValues);
}
internal void InitCustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs,
- PropertyInfo[] namedProperties, object[] propertyValues,
- FieldInfo[] namedFields, object[] fieldValues)
+ PropertyInfo[] namedProperties, object?[] propertyValues,
+ FieldInfo[] namedFields, object?[] fieldValues)
{
if (con == null)
throw new ArgumentNullException(nameof(con));
// Allow null for non-primitive types only.
Type propType = property.PropertyType;
- object propertyValue = propertyValues[i];
+ object? propertyValue = propertyValues[i];
if (propertyValue == null && propType.IsValueType)
throw new ArgumentNullException("propertyValues[" + i + "]");
// Allow null for non-primitive types only.
Type fldType = namedField.FieldType;
- object fieldValue = fieldValues[i];
+ object? fieldValue = fieldValues[i];
if (fieldValue == null && fldType.IsValueType)
throw new ArgumentNullException("fieldValues[" + i + "]");
public partial class CustomAttributeBuilder
{
public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs) { }
- public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.FieldInfo[] namedFields, object[] fieldValues) { }
- public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues) { }
- public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues, System.Reflection.FieldInfo[] namedFields, object[] fieldValues) { }
+ public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.FieldInfo[] namedFields, object?[] fieldValues) { }
+ public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object?[] propertyValues) { }
+ public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object?[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object?[] propertyValues, System.Reflection.FieldInfo[] namedFields, object?[] fieldValues) { }
}
public partial class ILGenerator
{