/// <summary> /// Registers a behavior factory for an entity type. /// </summary> /// <param name="entityType">Type of the entity.</param> /// <param name="dictionary">The dictionary.</param> protected static void RegisterBehaviorFactory(Type entityType, BehaviorFactoryDictionary dictionary) { Lock.EnterWriteLock(); try { BehaviorFactories.Add(entityType, dictionary); } finally { Lock.ExitWriteLock(); } }
/// <summary> /// Registers a behavior factory for an entity type. /// </summary> /// <param name="entityType">Type of the entity.</param> /// <param name="dictionary">The dictionary.</param> protected static void RegisterBehaviorFactory(Type entityType, BehaviorFactoryDictionary dictionary) { // We do this to avoid anyone unregistering factories! BehaviorFactories.Add(entityType, dictionary); }