Exemplo n.º 1
0
 private void RegisterCollision(string name, ResourceRegistration registration)
 {
     // We maintain an internal list of resource collisions for debugging purposes.
     // In a successfully configured system, this should be empty.
     List<ResourceRegistration> registrations;
     if (!collisions.TryGetValue(name, out registrations))
     {
         registrations = new List<ResourceRegistration>();
         collisions.Add(name, registrations);
     }
     registrations.Add(registration);
 }
Exemplo n.º 2
0
 public void RegisterResource(string name, Assembly assembly, string resourceKey)
 {
     var registration = new ResourceRegistration { Assembly = assembly, Name = resourceKey};
     if (!registrations.ContainsKey(name))
     {
         registrations.Add(name, registration);
     }
     else
     {
         RegisterCollision(name, registration);
     }
 }