• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class DocumentPropertyCollection

Collection of DocumentProperty objects for a presentation.

Inheritance
object
DocumentPropertyCollection
Implements
IEnumerable<DocumentProperty>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Presentation.Office
Assembly: DRIT.Presentation.dll
Syntax
public class DocumentPropertyCollection : IEnumerable<DocumentProperty>, IEnumerable

Properties

Count

Returns the number of sections.

Declaration
public int Count { get; }
Property Value
Type Description
int

this[int]

Returns the section at the given zero-based index.

Declaration
public DocumentProperty this[int index] { get; }
Parameters
Type Name Description
int index
Property Value
Type Description
DocumentProperty

this[string]

Returns the section with the given name.

Declaration
public DocumentProperty this[string name] { get; }
Parameters
Type Name Description
string name
Property Value
Type Description
DocumentProperty
Exceptions
Type Condition
KeyNotFoundException

Thrown when no section with that name exists.

Methods

Add(string, CustomPropertyType, string)

Adds a new section with the given name and returns it.

Declaration
public DocumentProperty Add(string name, CustomPropertyType type, string value)
Parameters
Type Name Description
string name
CustomPropertyType type
string value
Returns
Type Description
DocumentProperty
Exceptions
Type Condition
ArgumentException

Thrown when a section with the same name already exists.

Clear()

Removes all entries from this document property collection.

Declaration
public void Clear()

Contains(string)

Returns true if a custom property with the given name exists.

Declaration
public bool Contains(string name)
Parameters
Type Name Description
string name
Returns
Type Description
bool

GetEnumerator()

Returns an enumerator that iterates through this collection.

Declaration
public IEnumerator<DocumentProperty> GetEnumerator()
Returns
Type Description
IEnumerator<DocumentProperty>

An enumerator that iterates through this collection.

Remove(DocumentProperty)

Removes the specified custom property. Returns true if found and removed.

Declaration
public bool Remove(DocumentProperty customProperty)
Parameters
Type Name Description
DocumentProperty customProperty
Returns
Type Description
bool

Remove(string)

Removes the section with the given name. Returns true if the section was found and removed.

Declaration
public bool Remove(string name)
Parameters
Type Name Description
string name
Returns
Type Description
bool

TryGetByName(string, out DocumentProperty)

Tries to find a section by name. Returns false when not found.

Declaration
public bool TryGetByName(string name, out DocumentProperty customProperty)
Parameters
Type Name Description
string name
DocumentProperty customProperty
Returns
Type Description
bool

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX