示例#1
0
 /// <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();
     }
 }
示例#2
0
 /// <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);
 }