Exemple #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;
 }
Exemple #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;
        }