Class EmbeddedFilesCollection
Represents collection of embedded files.
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Collections
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public sealed class EmbeddedFilesCollection : NamedCollectionBase<EmbeddedFile>, IEnumerable<EmbeddedFile>, IEnumerable
Properties
ContainsZugferdInvoice
Determines whether the collection contains a ZUGFeRD invoice name.
Declaration
public bool ContainsZugferdInvoice { get; }
Property Value
System.Boolean
true if the collection contains an element with a ZUGFeRD name; otherwise, false |
Count
Gets the number of embedded files in the collection.
Declaration
public int Count { get; }
Property Value
System.Int32
|
Item[String]
Gets the embedded file associated with the specified name.
Declaration
public EmbeddedFile this[string name] { get; }
Parameters
System.String
name
The name of the named destination to get. |
Property Value
EmbeddedFile
The named destination associated with the specified name. |
Exceptions
System.Collections.Generic.KeyNotFoundException
If the specified name is not found. |
Names
Gets a collection containing the names of the embedded files in the collection.
Declaration
public IEnumerable<string> Names { get; }
Property Value
System.Collections.Generic.IEnumerable<System.String>
|
Methods
Add(String, Byte[])
Adds an embedded file with the specified name and value to the collection and returns it.
Declaration
public EmbeddedFile Add(string name, byte[] data)
Parameters
System.String
name
The name of the embedded file. |
System.Byte[]
data
The data for the embedded file. |
Returns
EmbeddedFile
The created embedded file. |
Exceptions
System.ArgumentException
name is null or empty. |
System.ArgumentNullException
data is null. |
DuplicatedEmbeddedFileNameException
An embedded file with the same name is already added to the collection. |
AddZugferdInvoice(Byte[])
Adds an embedded ZUGFeRD complaint file to the collection and returns it. The Conformance level is set to Basic.
Declaration
public EmbeddedFile AddZugferdInvoice(byte[] data)
Parameters
System.Byte[]
data
The data for the embedded file. |
Returns
EmbeddedFile
The created embedded file. |
Exceptions
System.NotSupportedException
A ZUGFeRD invoice embedded file is already added to the collection. |
Clear()
Removes all embedded files from the collection.
Declaration
public void Clear()
ContainsName(String)
Determines whether the collection contains the specified name.
Declaration
public bool ContainsName(string name)
Parameters
System.String
name
The name to locate in the collection. |
Returns
System.Boolean
true if the collection contains an element with the specified name; otherwise, false |
Exceptions
System.ArgumentNullException
name is null |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public override IEnumerator<EmbeddedFile> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<EmbeddedFile>
A numerator for the collection |
Overrides
IncrementFileNameOverride(ref Int32, String[], String, String)
Increments the file name if the provided name already exists.
Declaration
protected override string IncrementFileNameOverride(ref int counter, string[] splitName, string fileName, string newName)
Parameters
System.Int32
counter
|
System.String[]
splitName
|
System.String
fileName
|
System.String
newName
|
Returns
System.String
|
Overrides
Remove(String)
Removes the embedded file with the specified name from the collection.
Declaration
public bool Remove(string name)
Parameters
System.String
name
The name of the named embedded file to remove |
Returns
System.Boolean
true if the named embedded file is successfully found and removed; otherwise, false. This method returns false if name is not found in the collection. |
Exceptions
System.ArgumentException
name is null. |
RemoveZugferdInvoice()
Removes the embedded ZUGFeRD file with the specified name from the collection.
Declaration
public bool RemoveZugferdInvoice()
Returns
System.Boolean
true if the named embedded file is successfully found and removed; otherwise, false. This method returns false if name is not found in the collection. |
Exceptions
System.ArgumentException
name is null. |
Rename(String, String)
Renames an embedded file in the collection.
Declaration
public void Rename(string oldName, string newName)
Parameters
System.String
oldName
The old name of the embedded file. |
System.String
newName
The new name of the embedded file. |
VerifyCollectionLimit()
Verifies the limit for the collection.
Declaration
protected override void VerifyCollectionLimit()