public Result <Adapter <T> > Adapter(string adapterName, T entity, string setupType = "sql") { if (adapters.ContainsKey(adapterName)) { var adapter = adapters[adapterName]; adapter.Entity = entity; return(adapter.Success()); } return (from name in validAdapterName(adapterName) from childName in adapterExists(name) from setup in Setup(setupType) from adapter in getAdapter(entity, childName, setup) select adapter); }
public void RegisterMessage(Value value, string message, Func <Value, Value> func, bool resolveArguments = true) { message = message.Replace("-", "_"); var messageKey = MessageKey(value, message); if (!messages.ContainsKey(messageKey) || TemplateMode) { messages[messageKey] = new BuiltInMessage(func, resolveArguments); } }
public bool ContainsKey(string key) => variables.ContainsKey(key);
public bool ContainsKey(string key) => menuItems.ContainsKey(MenuName(key));