예제 #1
0
        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);
        }
예제 #2
0
 public TypeAwareFacility(string modelPropertyName, Type componentType, ILifecycleConcern componentCommissionConcern)
 {
     _configurationAttributeName = modelPropertyName;
     _componentCommissionConcern = componentCommissionConcern;
     _componentType = componentType;
 }