///<inheritdoc/> public bool TryGet <TComponent>(string typeName, out IComponentBuffer <TComponent> buffer) where TComponent : struct, IEquatable <TComponent> { bool ret = _registry.TryGet(typeName, out IComponentBuffer temp); buffer = temp as IComponentBuffer <TComponent>; return(ret); }
///<inheritdoc/> public int Register(IComponentBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } return(_registry.Add(buffer.TypeName, buffer)); }
///<inheritdoc/> public int GetID(IComponentBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } return(_registry.GetIDFromName(buffer.TypeName)); }
///<inheritdoc/> public void Remove(IComponentBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } _registry.RemoveAt(buffer.TypeName); }
///<inheritdoc/> public string GetName(IComponentBuffer buffer) { return(_registry.GetName(buffer)); }