Beispiel #1
0
 /// <summary>
 /// Libera a instancia.
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (_sourceContext != null)
     {
         _sourceContext.Dispose();
     }
     _sourceContext = null;
 }
Beispiel #2
0
 /// <summary>
 /// Construtor padrão
 /// </summary>
 /// <param name="cacheProvider">Objeto do cache</param>
 /// <param name="keyFactory"></param>
 /// <param name="typeSchema">Instancia do esquema dos tipos do sistema.</param>
 public CachePersistenceExecuter(ICacheProvider cacheProvider, Lazy <Query.IRecordKeyFactory> keyFactory, Colosoft.Data.Schema.ITypeSchema typeSchema)
 {
     cacheProvider.Require("cache").NotNull();
     keyFactory.Require("keyFactory").NotNull();
     typeSchema.Require("typeSchema").NotNull();
     _cacheProvider = cacheProvider;
     _typeSchema    = typeSchema;
     _sourceContext = new CacheSourceContext(cacheProvider, typeSchema, keyFactory);
     _keyFactory    = keyFactory;
 }