public virtual void WaitForChanged(IDocumentEngine engine) { Engine = engine; Prefixs = new string[] { "Backup.", "Temp." }; DocumentExtention = engine.Option.Extention.Replace("*", ""); Extentions = new string[] { DocumentExtention, ".md", ".html", ".txt" }; engine.Logger?.Debug(ScopeType.Writer, $"Watch Directory : {engine.Provider.BaseDirectory}"); var watcher = new FileSystemWatcher(engine.Provider.BaseDirectory); watcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.FileName | //NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.Security; watcher.Filter = engine.Option.Extention; watcher.InternalBufferSize = 8192 * 5; watcher.IncludeSubdirectories = true; watcher.EnableRaisingEvents = true; watcher.Changed += delegate(object sender, FileSystemEventArgs e) { if (!IsLocked) { if (e.ChangeType == WatcherChangeTypes.Changed) { OnChangeDocument(e); } } }; }
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); }
public DocumentReader(IDocumentEngine engine, string typeOf, params object[] primaryOf) { Engine = engine; Query = new DocumentQuery(typeOf, primaryOf); }
public DocumentReader(IDocumentEngine engine, string typeOf) { Engine = engine; Query = new DocumentQuery(typeOf); }
public DocumentReader(IDocumentEngine engine) { Engine = engine; Query = new DocumentQuery(); }
public ObjectiksOf(IDbConnection connection, DocumentOption options = null) { Engine = Core.Get(new DocumentProvider(connection), options); }
public ObjectiksOf(DocumentProvider documentProvider, DocumentOption options = null) { Engine = Core.Get(documentProvider, options); }
public ObjectiksOf(string baseDirectory, DocumentOption options = null) { Engine = Core.Get(new DocumentProvider(baseDirectory), options); }
public ObjectiksOf() { Engine = Core.Get(); }
public void Parse(IDocumentEngine engine, DocumentMeta meta, Document document, DocumentStorage storage) { }
public HtmlElementHelperModel(IDataManageEngine dataManageHelper, IUnitOfWork unitOfWork, IApplicationPageEngine applicationPageEngine, e_FormAction formAction, IDynamicCodeEngine dynamicCodeEngine, IDocumentEngine documentEngine, List <QueryModel> listFormQueryModel, string apiSessionID, bool isEncrypted) { this.ResultOperation = new ResultOperation(); this.FormAction = formAction; this.DataManageHelper = dataManageHelper; this.UnitOfWork = unitOfWork; this.applicationPageEngine = applicationPageEngine; this.DynamicCodeEngine = dynamicCodeEngine; this.DocumentEngine = documentEngine; this.ListFormQueryModel = listFormQueryModel; this.ApiSessionId = apiSessionID; this.IsEncrypted = isEncrypted; }