public void HookTo(Entity entity) { var chain = chainPath.Get(entity); Assert.False(chain is null, $"{entity} did not contain the chain {chainPath}"); chain.Add(handler); }
public void HookTo(Entity entity) { var chain = chainPath.Get(entity); foreach (var handler in handlers) { chain.Add(handler); } }
public static bool TryGet <T>(this IPath <T> path, Entity entity, out T thing) { thing = path.Get(entity); return(thing != null); }