Esempio n. 1
0
        public DocumentWriter(IDocumentEngine engine, string typeOf)
        {
            Ensure.NotNullOrEmpty(typeOf, "TypeOf is empty");

            TypeOf         = typeOf;
            Engine         = engine;
            Meta           = engine.GetTypeMeta(typeOf);
            IsPartialStore = Engine.Option.SupportPartialStorage;

            if (IsPartialStore)
            {
                PartialStoreLimit = Engine.Option.SupportPartialStorageSize;
            }

            Transaction = Engine.GetThreadTransaction();

            if (Transaction == null)
            {
                Transaction = Engine.BeginInternalTransaction();
            }

            Transaction.EnterTypeOfLock(typeOf);
        }
Esempio n. 2
0
 public DocumentMeta GetTypeMeta <T>()
 {
     return(Engine.GetTypeMeta(GetTypeOfName <T>()));
 }