/// <summary> /// Initializes a new instance of the <see cref="DocumentAddedEventContext"/> class. /// </summary> /// <param name="documentOperation">The operation.</param> /// <param name="destinationFolderPath">The destination folder path.</param> /// <param name="documentPathList">The list of documents added.</param> /// <param name="rootProperties">The properties of the root object.</param> public DocumentAddedEventContext(DocumentOperation documentOperation, IFolderPath destinationFolderPath, IList <IDocumentPath> documentPathList, IRootProperties rootProperties) { DocumentOperation = documentOperation; DestinationFolderPath = destinationFolderPath; DocumentPathList = documentPathList; RootProperties = rootProperties; }
public DocumentExportedEventContext(DocumentOperation documentOperation, ICollection <IDocument> exportedDocumentList, bool isDestinationFolder, string destinationPath) { this.DocumentOperation = documentOperation; this.ExportedDocumentList = exportedDocumentList; this.IsDestinationFolder = isDestinationFolder; this.DestinationPath = destinationPath; }
public Document(IIdentity identity, DocumentOperation operation, IDocumentAdapter documentAdapter, bool initializeNestedDocuments) : this(identity, operation, documentAdapter) { if (initializeNestedDocuments) { this.internalNestedDocuments = new List <IDocument>(); } }
/// <summary> /// Initializes a new instance of the <see cref="DocumentClosedEventContext"/> class. /// </summary> /// <param name="documentOperation">The operation.</param> /// <param name="closedDocumentList">The list of closed documents.</param> /// <param name="closedTree">The tree where documents are closed.</param> /// <param name="isUndoRedo">True if the operation can be undone.</param> /// <param name="clientInfo">The operation data.</param> public DocumentClosedEventContext(DocumentOperation documentOperation, IList <IDocument> closedDocumentList, IReadOnlyDictionary <ITreeNodePath, IPathConnection> closedTree, bool isUndoRedo, object?clientInfo) { DocumentOperation = documentOperation; ClosedDocumentList = closedDocumentList; ClosedTree = closedTree; IsUndoRedo = isUndoRedo; ClientInfo = clientInfo; }
/// <summary> /// Initializes a new instance of the <see cref="DocumentOpenedEventContext"/> class. /// </summary> /// <param name="documentOperation">The document operation.</param> /// <param name="destinationFolderPath">The destination folder path.</param> /// <param name="openedDocumentPathList">The list of opened documents.</param> /// <param name="documentPathList">The list of documents to open.</param> /// <param name="errorLocation">The location of the error, if any.</param> public DocumentOpenedEventContext(DocumentOperation documentOperation, IFolderPath destinationFolderPath, IList <IDocumentPath> openedDocumentPathList, IList <IDocumentPath> documentPathList, object?errorLocation) { DocumentOperation = documentOperation; DestinationFolderPath = destinationFolderPath; OpenedDocumentPathList = openedDocumentPathList; DocumentPathList = documentPathList; ErrorLocation = errorLocation; }
public DocumentOpenedEventContext(DocumentOperation documentOperation, IFolderPath destinationFolderPath, IList <IDocumentPath> openedDocumentPathList, IList <IDocumentPath> documentPathList, object errorLocation) { this.DocumentOperation = documentOperation; this.DestinationFolderPath = destinationFolderPath; this.OpenedDocumentPathList = openedDocumentPathList; this.DocumentPathList = documentPathList; this.ErrorLocation = errorLocation; }
public Document(IIdentity identity, DocumentOperation operation, IDocumentAdapter documentAdapter) { Util.ThrowOnNullArgument(identity, "identity"); this.propertyBag = new PropertyBag(); this.documentAdapter = documentAdapter; this.propertyBag.SetProperty <IIdentity>(DocumentSchema.Identity, identity); this.propertyBag.SetProperty <DocumentOperation>(DocumentSchema.Operation, operation); this.diagnosticsSession = DiagnosticsSession.CreateDocumentDiagnosticsSession(identity, ExTraceGlobals.CoreDocumentModelTracer); }
public DocumentOperation AddDocumentOperation(DocumentOperation item) { try { Repository.DocumentOperations.Add(item); Repository.SaveChanges(); } catch (Exception ex) { MessageBox.Show(ex.Message); } return(item); }
/// <summary> /// 保存单据操作日志 /// </summary> /// <param name="id"></param> /// <param name="docType"></param> /// <param name="operation"></param> /// <param name="opt"></param> /// <param name="unitWork"></param> /// <param name="dt"></param> protected virtual void AddOperationLog(string id, string docType, SheetOperation operation, IUnitWork unitWork, DateTime dt, string opt, string logID = null) { DocumentOperation doc = new DocumentOperation() { ID = Guid.NewGuid(), DocumentID = id, DocumentType = docType, OperatDate = dt, Operation = SheetOperationDescription.GetDescription(operation), Operator = opt, LogID = logID, }; ProviderFactory.Create <IProvider <DocumentOperation, Guid> >(RepoUri).Insert(doc, unitWork); }
internal MdbDocument(MdbCompositeItemIdentity identity, DocumentOperation operation, MdbDocumentAdapter documentAdapter) : base(identity, operation, documentAdapter) { Util.ThrowOnNullArgument(documentAdapter, "documentAdapter"); this.disposeTracker = this.GetDisposeTracker(); }
internal MdbDocument(MdbCompositeItemIdentity identity, PropertyDefinition[] propertiesToPreload, Item item, MailboxSession session, MdbPropertyMap propertyMap, DocumentOperation operation) : this(identity, operation, new MdbDocumentAdapter(identity, propertiesToPreload, item, session, propertyMap, true)) { }
internal MdbDocument(MdbCompositeItemIdentity identity, PropertyDefinition[] propertiesToPreload, Item item, MdbPropertyMap propertyMap, DocumentOperation operation) : this(identity, propertiesToPreload, item, null, propertyMap, operation) { }
internal MdbDocument(MdbCompositeItemIdentity identity, PropertyDefinition[] propertiesToPreload, MailboxSession session, MdbPropertyMap propertyMap, DocumentOperation operation) : this(identity, propertiesToPreload, null, session, propertyMap, operation) { }
internal IDocument CreateDocument(IIdentity documentId, DocumentOperation documentOperation) { return(this.CreateDocument(documentId, documentOperation, null)); }
internal IDocument CreateDocument(IIdentity documentId, DocumentOperation documentOperation, IDocumentAdapter documentAdapter) { return(this.CreateDocument(documentId, documentOperation, documentAdapter, false)); }
public DocumentSavedEventContext(DocumentOperation documentOperation, IDocument savedDocument, string fileName) { this.DocumentOperation = documentOperation; this.SavedDocument = savedDocument; this.FileName = fileName; }
internal ArangoDocumentOperation(DocumentOperation documentOperation) { _documentOperation = documentOperation; }
internal IDocument CreateDocument(IIdentity documentId, DocumentOperation documentOperation, IDocumentAdapter documentAdapter, bool initializeNestedDocuments) { Util.ThrowOnNullArgument(documentId, "documentId"); return(new Document(documentId, documentOperation, documentAdapter, initializeNestedDocuments)); }