public bool TryGetReference(System.Type type, out ComponentReference val) { if (_components.TryGetValue(type, out val)) { return(true); } val = default(ComponentReference); return(false); }
public bool TryGetReference <T>(out ComponentReference val) { if (_components.TryGetValue(typeof(T), out val)) { return(true); } val = default(ComponentReference); return(false); }
public void AddReference(ComponentReference reference) { var type = reference.Array.ArrayType; if (_components.ContainsKey(type)) { _components[type] = reference; } else { _components.Add(type, reference); } }
public void RemoveReference(ComponentReference reference) { _components.Remove(reference.Array.ArrayType); }