public PersistenceFixture(IReferenceable refs, IConfigurable conf, IOpenable open, IClosable close, ICleanable clean,
            IWriter<Dummy, string> write, IGetter<Dummy, string> get, ISetter<Dummy> set)
        {
            Assert.NotNull(refs);
            _refs = refs;

            Assert.NotNull(conf);
            _conf = conf;

            Assert.NotNull(open);
            _open = open;

            Assert.NotNull(close);
            _close = close;

            Assert.NotNull(clean);
            _clean = clean;

            Assert.NotNull(write);
            _write = write;

            Assert.NotNull(get);
            _get = get;

            Assert.NotNull(set);
            _set = set;
        }
Beispiel #2
0
        public void Put(GameObject gameObject)
        {
            ICleanable c = gameObject.GetComponent <ICleanable>();

            if (c != null)
            {
                c.Clean();
            }
            gameObject.SetActive(false);
        }
 public void NotifyDirty(ICleanable value)
 {
     _dirtyTextureUnits.Add(value);
 }
 public void NotifyDirty(ICleanable value)
 {
     _dirtyUniforms.Add(value);
 }
 public void NotifyDirty(ICleanable value)
 {
     _dirtyUniforms.Add(value);
 }
 public virtual void Dispose()
 {
     _cleanable = null;
 }
Beispiel #7
0
 public DataCommiterComposite(ICleanable cleaner, IEnumerable <IDataCommiter> dataCommiters)
 {
     this.cleaner       = cleaner ?? throw new ArgumentNullException($"{nameof(cleaner)} should not be null");
     this.dataCommiters = dataCommiters ?? throw new ArgumentNullException($"{nameof(dataCommiters)} should not be null");
 }
Beispiel #8
0
 public DataCommiterCleanerDecorator(ICleanable cleaner, IDataCommiter dataCommiter)
 {
     this.cleaner      = cleaner ?? throw new ArgumentNullException($"{nameof(cleaner)} should not be null");
     this.dataCommiter = dataCommiter ?? throw new ArgumentNullException($"{nameof(dataCommiter)} should not be null");
 }
 public void NotifyDirty(ICleanable value)
 {
     _dirtyTextureUnits.Add(value);
 }
 public virtual void Dispose()
 {
     _cleanable = null;
 }