public void Dispose()
        {
            _domainService = null;
            var dataManagers = _dataManagers.Values.Where(m => m is IDisposable).Select(m => (IDisposable)m).ToArray();

            Array.ForEach(dataManagers, m => { m.Dispose(); });
            _dataManagers.Clear();
        }
Exemple #2
0
 public RequestContext(BaseDomainService dataService,
                       DbSet dbSet                    = null,
                       ChangeSet changeSet            = null,
                       RowInfo rowInfo                = null,
                       QueryRequest queryInfo         = null,
                       ServiceOperationType operation = ServiceOperationType.None)
 {
     DataService      = dataService;
     CurrentDbSet     = dbSet;
     CurrentChangeSet = changeSet;
     CurrentRowInfo   = rowInfo;
     CurrentQueryInfo = queryInfo;
     CurrentOperation = operation;
     _dataBag         = null;
 }
 public ServiceOperationsHelper(BaseDomainService domainService)
 {
     _domainService = domainService;
     _dataManagers  = new ConcurrentDictionary <Type, object>();
 }
 public SubsetsGenerator(BaseDomainService domainService)
 {
     _domainService = domainService;
     _dataHelper    = _domainService.ServiceContainer.DataHelper;
 }