Class RevisionSummary

Class RevisionSummary

Tên không gian: Aspose.Note Tổng hợp: Aspose.Note.dll (25.4.0)

Hiển thị một tổng hợp cho việc sửa đổi nút.

public class RevisionSummary
   {
       private int _id;
       private string _author;
       private string _text;
       public int Id
       {
           get { return _id; }
           set { _id = value; }
       }
       public string Author
       {
           get { return _author; }
           set { _author = value; }
       }
       public string Text
       {
           get { return _text; }
           set { _text = value; }
       }
   }

Inheritance

object RevisionSummary

Thành viên thừa kế

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Hiển thị cách chỉnh sửa thông tin meta của trang.

string dataDir = RunExamples.GetDataDir_Pages();
   Document document = new Document(dataDir + "Aspose.one");
   Page page = document.FirstChild;
   var pageRevisionInfo = page.PageContentRevisionSummary;
   Console.WriteLine(string.Format("Author:\t{0}\nModified:\t{1}",
      pageRevisionInfo.AuthorMostRecent,
      pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));
   pageRevisionInfo.AuthorMostRecent = "New Author";
   pageRevisionInfo.LastModifiedTime = DateTime.Now;
   document.Save(dataDir + "WorkingWithPageRevisions_out.one");

Hiển thị cách kiểm tra xem một trang có phải là trang xung đột (ví dụ, nó có những thay đổi mà OneNote không thể tự động kết hợp).

string dataDir = RunExamples.GetDataDir_Pages();
   Document doc = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });
   var history = doc.GetPageHistory(doc.FirstChild);
   for (int i = 0; i < history.Count; i++)
   {
       var historyPage = history[i];
       Console.Write("    {0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
                      i,
                      historyPage.PageContentRevisionSummary.AuthorMostRecent,
                      historyPage.PageContentRevisionSummary.LastModifiedTime);
       Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);
       if (historyPage.IsConflictPage)
           historyPage.IsConflictPage = false;
   }
   doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);

Constructors

Đánh giá ( )

public RevisionSummary()
   {
   }

Properties

AuthorMostRecent

Nhận hoặc đặt tác giả mới nhất.

public string AuthorMostRecent
   {
      get;
      set;
   }

Giá trị bất động sản

string

Examples

Hiển thị cách chỉnh sửa thông tin meta của trang.

string dataDir = RunExamples.GetDataDir_Pages();
   Document document = new Document(dataDir + "Aspose.one");
   Page page = document.FirstChild;
   var pageRevisionInfo = page.PageContentRevisionSummary;
   Console.WriteLine(string.Format("Author:   {0}\nModified:  {1}",
                                     pageRevisionInfo.AuthorMostRecent,
                                     pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));
   pageRevisionInfo.AuthorMostRecent = "New Author";
   pageRevisionInfo.LastModifiedTime = DateTime.Now;
   document.Save(dataDir + "WorkingWithPageRevisions_out.one");

Hiển thị cách kiểm tra xem một trang có phải là trang xung đột (ví dụ, nó có những thay đổi mà OneNote không thể tự động kết hợp).

string dataDir = RunExamples.GetDataDir_Pages();
   Document doc = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });
   var history = doc.GetPageHistory(doc.FirstChild);
   for (int i = 0; i < history.Count; i++)
   {
      var historyPage = history[i];
      Console.Write("{0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
                    i,
                    historyPage.PageContentRevisionSummary.AuthorMostRecent,
                    historyPage.PageContentRevisionSummary.LastModifiedTime);
      Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);
      if (historyPage.IsConflictPage)
          historyPage.IsConflictPage = false;
   }
   doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);

LastModifiedTime

Nhận hoặc đặt thời gian sửa đổi cuối cùng.

public DateTime LastModifiedTime
   {
      get;
      set;
   }

Giá trị bất động sản

DateTime

Examples

Hiển thị cách chỉnh sửa thông tin meta của trang.

string dataDir = RunExamples.GetDataDir_Pages();
   Document document = new Document(dataDir + "Aspose.one");
   Page page = document.FirstChild;
   var pageRevisionInfo = page.PageContentRevisionSummary;
   Console.WriteLine(string.Format("Author:\t{0}\nModified:\t{1}",
      pageRevisionInfo.AuthorMostRecent,
      pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));
   pageRevisionInfo.AuthorMostRecent = "New Author";
   pageRevisionInfo.LastModifiedTime = DateTime.Now;
   document.Save(dataDir + "WorkingWithPageRevisions_out.one");

Hiển thị cách kiểm tra xem một trang có phải là trang xung đột (ví dụ, nó có những thay đổi mà OneNote không thể tự động kết hợp).

string dataDir = RunExamples.GetDataDir_Pages();
   Document doc = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });
   var history = doc.GetPageHistory(doc.FirstChild);
   for (int i = 0; i < history.Count; i++)
   {
      var historyPage = history[i];
      Console.Write("{0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
                     i,
                     historyPage.PageContentRevisionSummary.AuthorMostRecent,
                     historyPage.PageContentRevisionSummary.LastModifiedTime);
      Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);
      if (historyPage.IsConflictPage)
          historyPage.IsConflictPage = false;
   }
   doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);
 Tiếng Việt