Skip to content

Commit

Permalink
Merge pull request #72 from skbkontur/d.kop/add-one-method
Browse files Browse the repository at this point in the history
Add WithTypeBuildingContext method
  • Loading branch information
Dm17r1y authored May 16, 2024
2 parents eaa21eb + aeecfa2 commit e9d6ace
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TypeScript.ContractGenerator/CustomTypeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ public CustomTypeGenerator WithTypeBuildingContext(Func<ITypeInfo, bool> accept,
return this;
}

public CustomTypeGenerator WithTypeBuildingContext(Func<ITypeInfo, bool> accept, Func<ITypeInfo, ITypeBuildingContext> createContext)
{
typeBuildingContextRules.Add(new TypeBuildingContextRule(accept, createContext));
return this;
}

public CustomTypeGenerator WithPropertyResolver(IPropertyResolver propertyResolver)
{
propertyResolvers.Add(propertyResolver);
Expand Down

0 comments on commit e9d6ace

Please sign in to comment.