skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class EmbeddedFilesCollection

Represents a collection of embedded files within a document, supporting file attachment and ZUGFeRD invoice functionality.

Inheritance
System.Object
NamedCollectionBase<EmbeddedFile>
EmbeddedFilesCollection
Inherited Members
NamedCollectionBase<EmbeddedFile>.IEnumerable.GetEnumerator()
NamedCollectionBase<EmbeddedFile>.IncrementFileName(Int32, String[], String)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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

Gets a value indicating whether the collection contains a ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) invoice file.

Declaration
public bool ContainsZugferdInvoice { get; }
Property Value
System.Boolean

True if the collection contains a ZUGFeRD invoice file; 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 from the collection.

Declaration
public EmbeddedFile this[string name] { get; }
Parameters
System.String name

The name of the embedded file to retrieve.

Property Value
EmbeddedFile

The embedded file with the specified name.

Exceptions
System.Collections.Generic.KeyNotFoundException

Thrown when no embedded file with the specified name exists in the collection.

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[])

Creates and adds a new embedded file with the specified name and binary data to the collection.

Declaration
public EmbeddedFile Add(string name, byte[] data)
Parameters
System.String name

The name to assign to the embedded file.

System.Byte[] data

The binary data content of the embedded file.

Returns
EmbeddedFile

The newly created embedded file instance.

Exceptions
System.ArgumentException

Thrown when the name is null or empty.

System.ArgumentNullException

Thrown when the data is null.

DuplicatedEmbeddedFileNameException

Thrown when an embedded file with the same name already exists in the collection.

AddZugferdInvoice(Byte[])

Creates and adds a ZUGFeRD-compliant embedded invoice file to the collection with basic conformance level.

Declaration
public EmbeddedFile AddZugferdInvoice(byte[] data)
Parameters
System.Byte[] data

The XML invoice data content for the ZUGFeRD file.

Returns
EmbeddedFile

The newly created ZUGFeRD embedded file instance.

Exceptions
System.NotSupportedException

Thrown when a ZUGFeRD invoice file already exists in the collection, as only one is allowed per document.

Clear()

Removes all embedded files from the collection.

Declaration
public void Clear()

ContainsName(String)

Determines whether an embedded file with the specified name exists in the collection.

Declaration
public bool ContainsName(string name)
Parameters
System.String name

The name to search for in the collection.

Returns
System.Boolean

True if an embedded file with the specified name exists; otherwise, false.

Exceptions
System.ArgumentNullException

Thrown when the name parameter is null.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public override IEnumerator<EmbeddedFile> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<EmbeddedFile>

An enumerator for the collection.

Overrides
Telerik.Windows.Documents.Fixed.Model.Collections.NamedCollectionBase<Telerik.Windows.Documents.Fixed.Model.EmbeddedFile>.GetEnumerator()

IncrementFileNameOverride(ref Int32, String[], String, String)

Generates an incremented version of the provided name if it already exists in the collection.

Declaration
protected override string IncrementFileNameOverride(ref int counter, string[] splitName, string fileName, string newName)
Parameters
System.Int32 counter

The current counter value used for generating unique suffixes.

System.String[] splitName

The name components split by dot separators.

System.String fileName

The base file name without extension or numeric suffix.

System.String newName

The candidate new name to check for uniqueness.

Returns
System.String

A unique name that doesn't conflict with existing names in the collection.

Overrides
Telerik.Windows.Documents.Fixed.Model.Collections.NamedCollectionBase<Telerik.Windows.Documents.Fixed.Model.EmbeddedFile>.IncrementFileNameOverride(System.Int32, System.String[], System.String, System.String)

Remove(String)

Removes the embedded file with the specified name from the collection and cleans up its parent associations.

Declaration
public bool Remove(string name)
Parameters
System.String name

The name of the embedded file to remove.

Returns
System.Boolean

True if the embedded file was successfully found and removed; otherwise, false.

Exceptions
System.ArgumentException

Thrown when the name parameter is null.

RemoveZugferdInvoice()

Removes all ZUGFeRD invoice files from the collection.

Declaration
public bool RemoveZugferdInvoice()
Returns
System.Boolean

True if any ZUGFeRD invoice files were successfully found and removed; otherwise, false.

Rename(String, String)

Changes the name of an existing embedded file in the collection.

Declaration
public void Rename(string oldName, string newName)
Parameters
System.String oldName

The current name of the embedded file to rename.

System.String newName

The new name to assign to the embedded file.

VerifyCollectionLimit()

Verifies that the collection has not exceeded its maximum capacity limit.

Declaration
protected override void VerifyCollectionLimit()
Overrides
Telerik.Windows.Documents.Fixed.Model.Collections.NamedCollectionBase<Telerik.Windows.Documents.Fixed.Model.EmbeddedFile>.VerifyCollectionLimit()
Exceptions
System.InvalidOperationException

Thrown when the collection size exceeds the maximum allowed limit.

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.