public Token <Material> Retain(Tuple key, System.Func <Material> valueGenerator) { Retainer <Material> ret; if (!retainedMaterials.TryGetValue(key, out ret)) { ret = retainedMaterials[key] = new Retainer <Material>(valueGenerator(), GenerateDisposer(key)); } return(ret.Retain()); }
public Dash(Retainer <T> retainer) { this.retainer = retainer; }