Skip to content

Commit a7aaf0c

Browse files
author
Nitesh Kumar Singh
committed
add RegisterWithParameter with enum
1 parent dd07cbf commit a7aaf0c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Signum/DynamicQuery/ExpressionContainer.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,22 @@ public ExtensionWithParameterInfo<T, K, V> RegisterWithParameter<T, K, V>(
164164

165165
return ei;
166166
}
167+
168+
public ExtensionWithParameterInfo<T, K, V> RegisterWithParameter<T, K, V>(
169+
Enum message,
170+
Func<QueryToken, IEnumerable<K>> getKeys,
171+
Expression<Func<T, K, V>> extensionLambda,
172+
bool autoExpand = false)
173+
where K : notnull
174+
{
175+
var ei = new ExtensionWithParameterInfo<T, K, V>(extensionLambda, message.ToString(), ()=> message.NiceToString(), getKeys);
176+
177+
RegisteredExtensionsWithParameter.GetOrCreate(typeof(T)).Add(ei.Prefix, ei);
178+
179+
ei.AutoExpand = autoExpand;
180+
181+
return ei;
182+
}
167183
}
168184

169185
public interface IExtensionDictionaryInfo

0 commit comments

Comments
 (0)