Skip to content

Commit e9d6ace

Browse files
authored
Merge pull request #72 from skbkontur/d.kop/add-one-method
Add WithTypeBuildingContext method
2 parents eaa21eb + aeecfa2 commit e9d6ace

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

TypeScript.ContractGenerator/CustomTypeGenerator.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public CustomTypeGenerator WithTypeBuildingContext(Func<ITypeInfo, bool> accept,
108108
return this;
109109
}
110110

111+
public CustomTypeGenerator WithTypeBuildingContext(Func<ITypeInfo, bool> accept, Func<ITypeInfo, ITypeBuildingContext> createContext)
112+
{
113+
typeBuildingContextRules.Add(new TypeBuildingContextRule(accept, createContext));
114+
return this;
115+
}
116+
111117
public CustomTypeGenerator WithPropertyResolver(IPropertyResolver propertyResolver)
112118
{
113119
propertyResolvers.Add(propertyResolver);

0 commit comments

Comments
 (0)