Exemplo n.º 1
0
 public bool TryGetReference(System.Type type, out ComponentReference val)
 {
     if (_components.TryGetValue(type, out val))
     {
         return(true);
     }
     val = default(ComponentReference);
     return(false);
 }
Exemplo n.º 2
0
 public bool TryGetReference <T>(out ComponentReference val)
 {
     if (_components.TryGetValue(typeof(T), out val))
     {
         return(true);
     }
     val = default(ComponentReference);
     return(false);
 }
Exemplo n.º 3
0
        public void AddReference(ComponentReference reference)
        {
            var type = reference.Array.ArrayType;

            if (_components.ContainsKey(type))
            {
                _components[type] = reference;
            }
            else
            {
                _components.Add(type, reference);
            }
        }
Exemplo n.º 4
0
 public void RemoveReference(ComponentReference reference)
 {
     _components.Remove(reference.Array.ArrayType);
 }