public void AddConcern <TForType>(ILifecycleConcern lifecycleConcern) { if (concerns == null) { concerns = new Dictionary <Type, ILifecycleConcern>(2); #if DOTNET40 concernsCache = new ConcurrentDictionary <Type, List <ILifecycleConcern> >(2, 2); #else concernsCache = new Dictionary <Type, List <ILifecycleConcern> >(2); #endif } concerns.Add(typeof(TForType), lifecycleConcern); }
public TypeAwareFacility(string modelPropertyName, Type componentType, ILifecycleConcern componentCommissionConcern) { _configurationAttributeName = modelPropertyName; _componentCommissionConcern = componentCommissionConcern; _componentType = componentType; }