예제 #1
0
        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());
        }
예제 #2
0
 public Dash(Retainer <T> retainer)
 {
     this.retainer = retainer;
 }