public EsentGeometryInitialiser(EsentGeometryStore esentGeometryStore, EsentShapeGeometryCursor shapeGeometryCursor, EsentShapeInstanceCursor shapeInstanceCursor) { try { _esentGeometryStore = esentGeometryStore; _shapeGeometryCursor = shapeGeometryCursor; _shapeInstanceCursor = shapeInstanceCursor; _geometryContextId = new IntPtr(_shapeGeometryCursor.GetHashCode()); _instanceContextId = new IntPtr(_shapeInstanceCursor.GetHashCode()); SetGeometryContext(); try { _shapeGeometryTransaction = _shapeGeometryCursor.BeginLazyTransaction(); } finally { ResetGeometryContext(); } SetInstanceContext(); try { _shapeInstanceTransaction = _shapeInstanceCursor.BeginLazyTransaction(); } finally{ ResetInstanceContext(); } _geometryCount = 0; _instanceCount = 0; } catch (Exception e) { throw new Exception("Error creating transactions", e); } }
internal XbimReadWriteTransaction(EsentModel model, EsentLazyDBTransaction txn, string name = null) { Name = name; Model = model; _readWriteTransaction = txn; InTransaction = true; _pulseCount = 0; _transactionBatchSize = 100; }