Class PageHistory
Namespace: Aspose.Note
Assembly: Aspose.Note.dll (25.6.0)
Represents the page history.
public class PageHistory : IList<Page>, ICollection<Page>, IEnumerable<Page>, IEnumerable
{
private readonly List<Page> _pages = new List<Page>();
public int Count => _pages.Count;
public bool IsReadOnly => false;
public Page this[int index]
{
get => _pages[index];
set => _pages[index] = value;
}
public void Add(Page item)
{
_pages.Add(item);
}
public void Clear()
{
_pages.Clear();
}
public bool Contains(Page item)
{
return _pages.Contains(item);
}
public void CopyTo(Page[] array, int arrayIndex)
{
_pages.CopyTo(array, arrayIndex);
}
public IEnumerator<Page> GetEnumerator()
{
return _pages.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return _pages.GetEnumerator();
}
public int IndexOf(Page item)
{
return _pages.IndexOf(item);
}
public void Insert(int index, Page item)
{
_pages.Insert(index, item);
}
public bool Remove(Page item)
{
return _pages.Remove(item);
}
}
Inheritance
Implements
IList
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
PageHistory(Page)
Initializes a new instance of the Aspose.Note.PageHistory class.
public PageHistory(Aspose.Words.Document.Page page)
{
}
Parameters
page
Page
The current page version.
Properties
Count
Gets the count of the page versions in the page history.
public int Count
{
get;
set;
}
Property Value
Current
Gets the current page version.
public Page Current
{
get;
}
Property Value
IsReadOnly
Gets a value indicating whether the page history is read only.
public bool IsReadOnly
{
get;
}
Property Value
this[int]
Gets or sets the page version at the specified index of the Aspose.Note.PageHistory.
public Page This[int index]
{
get;
set;
}
Property Value
Methods
Add(Page)
Adds the page version to the end of the Aspose.Note.PageHistory.
public void Add(Page item)
{
}
Parameters
item
Page
The page version.
AddRange(IEnumerable)
Adds the page versions to the end of the Aspose.Note.PageHistory.
public void AddRange(IEnumerable<Page> items)
{
}
Parameters
items
IEnumerable
<
Page
>
The System.Collections.Generic.IEnumerable`1 collection of page versions.
Clear()
Clears the page history.
public void Clear()
{
}
Contains(Page)
Determines whether the page history contains the page version.
public bool Contains(Page item)
{
if (this._pages != null && this._pages.Count > 0)
{
foreach (var page in this._pages)
{
if (Object.ReferenceEquals(page, item))
{
return true;
}
}
}
return false;
}
Parameters
item
Page
The page version.
Returns
The System.Boolean.
CopyTo(Page[], int)
Copies the page versions to an array, starting at the beginning.
public void CopyTo(Page[] array, int arrayIndex)
{
}
Parameters
array
Page
[]
The target array.
arrayIndex
int
The array index.
GetEnumerator()
Returns an enumerator that iterates through child nodes of the Aspose.Note.PageHistory.
public IEnumerator<page> GetEnumerator()
{
}
Returns
IEnumerator < Page >
The System.Collections.IEnumerator.
IndexOf(Page)
Determines the index of a specific page version in the page history.
public int IndexOf(Page item)
{
}
Parameters
item
Page
The page version.
Returns
The System.Int32.
Insert(int, Page)
Inserts a page version into the page history.
public void Insert(int index, Page item)
{
}
Parameters
index
int
The index.
item
Page
The page version.
Remove(Page)
Removes the page version from the Aspose.Note.PageHistory.
The provided code is already properly formatted according to standard C# conventions. Here it is for clarity:
public bool Remove(Page item)
{
}
Parameters
item
Page
The page version.
Returns
The System.Boolean.
RemoveAt(int)
Removes the page version at the specified index of the Aspose.Note.PageHistory.
public void RemoveAt(int index)
{
}
Parameters
index
int
The index.
RemoveRange(int, int)
Removes a range of the page versions from the Aspose.Note.PageHistory.
public void RemoveRange(int index, int count)
{
}
Parameters
index
int
The index.
count
int
The count.