Example #1
0
 public static void AddObject <TKeyType, TReturnType>(this IEntityGuidMappable <TKeyType, TReturnType> collection, TKeyType key, TReturnType obj)
 {
     //No null checking because we hope to inline this.
     try
     {
         collection.Add(key, obj);                 //Does NOT replace the entity if there is one.
     }
     catch (Exception e)
     {
         CreateEntityCollectionException <TKeyType, TReturnType>(key, e);
     }
 }
Example #2
0
 public static void AddObject <TReturnType>([NotNull] this IEntityGuidMappable <NetworkEntityGuid, TReturnType> collection, [NotNull] NetworkEntityGuid guid, TReturnType obj)
 {
     //No null checking because we hope to inline this.
     try
     {
         collection.Add(guid, obj);                 //Does NOT replace the entity if there is one.
     }
     catch (Exception e)
     {
         CreateEntityCollectionException <TReturnType>(guid, e);
     }
 }