-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or requestiocSourceGen.Ioc releated issuesSourceGen.Ioc releated issues
Milestone
Description
Free user from IocGenericFactoryAttribute and IocInjectAttribute
Motivation
At version 0.9.4-alpha, IocGenericFactoryAttribute and IocInjectAttribute need mark on members to hint source generator.
We should free user from using SourceGen.Ioc attributes in their code before release 1.0.0.
Design
Type[] GenericFactoryTypeMapping: same functionality asIocGenericFactoryAttribute(params Type[] genericTypeMap)object[] InjectMembers[nameof(prop), nameof(field), nameof(method)]for ordinary service inject[new object[] { nameof(prop), MyEnum.Key }]for keyed service inject[new object[] { nameof(prop), nameof(MyClass.StaticField), KeyType.Csharp }]forKeyType.Csharpinejct
Todo
-
IocRegisterForAttributeadd arguments:GenericFactoryTypeMapping,InjectMembers. -
IocRegisterDefaultsAttributeadd argument:GenericFactoryTypeMapping - Optional:
removeIocGenericFactoryAttributeavoid duplicated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestiocSourceGen.Ioc releated issuesSourceGen.Ioc releated issues