private void add(Type x, DiscreteItemResolver resolver) { if (!item_resolvers.ContainsKey(x)) { item_resolvers.Add(x, resolver); } }
private void safe_add(Type type, DiscreteItemResolver resolver) { if (!item_resolvers.ContainsKey(type)) { item_resolvers.Add(type, resolver); } }
public SingletonResolver(DiscreteItemResolver actualResolver) { actual_resolver = actualResolver; }
public void register(DiscreteItemResolver resolver, params Type[] contracts) { contracts.each(x => add(x, resolver)); }
public void register(Type type, DiscreteItemResolver resolver) { safe_add(type, resolver); }