Ejemplo n.º 1
0
 internal void AddResource(MemoryResource resource)
 {
     IDictionary<string, IResource> dictionary;
     if (!this.resources.TryGetValue(resource.Type, out dictionary))
     {
         dictionary = (IDictionary<string, IResource>)new Dictionary<string, IResource>();
         this.resources[resource.Type] = dictionary;
     }
     dictionary[resource.Name] = (IResource)resource;
 }
Ejemplo n.º 2
0
        internal void AddResource(MemoryResource resource)
        {
            IDictionary <string, IResource> dictionary;

            if (!this.resources.TryGetValue(resource.Type, out dictionary))
            {
                dictionary = (IDictionary <string, IResource>) new Dictionary <string, IResource>();
                this.resources[resource.Type] = dictionary;
            }
            dictionary[resource.Name] = (IResource)resource;
        }