I would like to introduce a static extension method to a type and am able to create the method and mark it as static without issue. But when introducing the parameters to the introduced method, there isn't an option to indicate that the 'this' keyword should be inserted, leaving one unable to actually create an extension method.
var serviceCollectionType = (INamedType)TypeFactory.GetType(typeof(IServiceCollection));
builderType.IntroduceMethod(nameof(BuildMethodTemplate),
IntroductionScope.Static,
buildMethod: b =>
{
b.Name = "RegisterAllEntities";
b.Accessibility = Accessibility.Public;
//b.AddParameter("serviceCollection", serviceCollectionType); //Need some way to specify 'this'
});
I would like to request such a capability. Thank you for the consideration!
I would like to introduce a static extension method to a type and am able to create the method and mark it as static without issue. But when introducing the parameters to the introduced method, there isn't an option to indicate that the 'this' keyword should be inserted, leaving one unable to actually create an extension method.
I would like to request such a capability. Thank you for the consideration!