public AttributeGen <TypeGen> BeginAttribute(AttributeType type, params object[] args) { AttributeTargets target = AttributeTargets.Class; if (baseType == null) { target = AttributeTargets.Interface; } else if (baseType == typeof(ValueType)) { target = AttributeTargets.Struct; } else { target = AttributeTargets.Class; } return(AttributeGen <TypeGen> .CreateAndAdd(this, ref customAttributes, target, type, args)); }
public override AttributeGen <TypeGen> BeginAttribute(AttributeType type, params object[] args) { AttributeTargets target = AttributeTargets.Class; if (BaseType == null) { target = AttributeTargets.Interface; } else if (BaseType == TypeMapper.MapType(typeof(ValueType))) { target = AttributeTargets.Struct; } else { target = AttributeTargets.Class; } return(AttributeGen <TypeGen> .CreateAndAdd(this, ref _customAttributes, target, type, args, TypeMapper)); }
public AttributeGen <AssemblyGen> BeginModuleAttribute(AttributeType type, params object[] args) { return(AttributeGen <AssemblyGen> .CreateAndAdd(this, ref _moduleAttributes, AttributeTargets.Module, type, args, TypeMapper)); }
public AttributeGen <FieldGen> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <FieldGen> .CreateAndAdd(this, ref _customAttributes, AttributeTargets.Field, type, args, _owner.TypeMapper)); }
public override AttributeGen <ParameterGen> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <ParameterGen> .CreateAndAdd(this, ref CustomAttributes, Position == 0?AttributeTargets.ReturnValue : AttributeTargets.Parameter, type, args, TypeMapper)); }
public AttributeGen <ParameterGen> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <ParameterGen> .CreateAndAdd(this, ref customAttributes, position == 0?AttributeTargets.ReturnValue : AttributeTargets.Parameter, type, args)); }
public AttributeGen <PropertyGen> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <PropertyGen> .CreateAndAdd(this, ref customAttributes, AttributeTargets.Property, type, args)); }
public override AttributeGen <T> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <T> .CreateAndAdd(TypedThis, ref _customAttributes, AttributeTarget, type, args, TypeMapper)); }
public AttributeGen <T> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <T> .CreateAndAdd(typedThis, ref customAttributes, AttributeTarget, type, args)); }
public AttributeGen <AssemblyGen> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <AssemblyGen> .CreateAndAdd(this, ref assemblyAttributes, AttributeTargets.Assembly, type, args)); }
public override AttributeGen <DelegateGen> BeginAttribute(AttributeType type, params object[] args) { return(AttributeGen <DelegateGen> .CreateAndAdd(this, ref _customAttributes, AttributeTargets.Delegate, type, args, TypeMapper)); }