Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/13 18:33:15 (11 years ago)
Author:
pfleck
Message:

#2030
Changed Linq.Binary to byte array to avoid hash computation.
DataContext in HiveOperationContext is now lazy initialized.
Added missing HiveDao from last commit failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveOperationContext.cs

    r9391 r9393  
    3939    }
    4040
    41     public HiveDataContext DataContext { get; private set; }
     41    private HiveDataContext dataContext;
     42    public HiveDataContext DataContext {
     43      get {
     44        if (dataContext == null) {
     45          dataContext = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
     46          //dataContext.Log = new DebugWriter();
     47        }
     48        return dataContext;
     49      }
     50    }
     51
    4252
    4353    public void Attach(OperationContext owner) {
    44       DataContext = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
    45       //DataContext.Log = new DebugWriter();
    4654    }
    4755
    4856    public void Detach(OperationContext owner) {
    49       DataContext.Dispose();
     57      if (dataContext != null) {
     58        dataContext.Dispose();
     59      }
    5060    }
    5161  }
Note: See TracChangeset for help on using the changeset viewer.