CompositionError Constructors

Definition

Initializes a new instance of the CompositionError class.

Overloads

CompositionError(String)

Initializes a new instance of the CompositionError class with the specified error message.

CompositionError(String, ICompositionElement)

Initializes a new instance of the CompositionError class with the specified error message and the composition element that is the cause of the composition error.

CompositionError(String, Exception)

Initializes a new instance of the CompositionError class with the specified error message and the exception that is the cause of the composition error.

CompositionError(String, ICompositionElement, Exception)

Initializes a new instance of the CompositionError class with the specified error message, and the composition element and exception that are the cause of the composition error.

CompositionError(String)

Source:
CompositionError.cs
Source:
CompositionError.cs
Source:
CompositionError.cs

Initializes a new instance of the CompositionError class with the specified error message.

C#
public CompositionError(string? message);
C#
public CompositionError(string message);

Parameters

message
String

A message that describes the CompositionError or null to set the Description property to an empty string ("").

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

CompositionError(String, ICompositionElement)

Source:
CompositionError.cs
Source:
CompositionError.cs
Source:
CompositionError.cs

Initializes a new instance of the CompositionError class with the specified error message and the composition element that is the cause of the composition error.

C#
public CompositionError(string? message, System.ComponentModel.Composition.Primitives.ICompositionElement? element);
C#
public CompositionError(string message, System.ComponentModel.Composition.Primitives.ICompositionElement element);

Parameters

message
String

A message that describes the CompositionError or null to set the Description property to an empty string ("").

element
ICompositionElement

The composition element that is the cause of the CompositionError or null to set the Element property to null.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

CompositionError(String, Exception)

Source:
CompositionError.cs
Source:
CompositionError.cs
Source:
CompositionError.cs

Initializes a new instance of the CompositionError class with the specified error message and the exception that is the cause of the composition error.

C#
public CompositionError(string? message, Exception? exception);
C#
public CompositionError(string message, Exception exception);

Parameters

message
String

A message that describes the CompositionError or null to set the Description property to an empty string ("").

exception
Exception

The Exception that is the underlying cause of the CompositionError or null to set the Exception property to null.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

CompositionError(String, ICompositionElement, Exception)

Source:
CompositionError.cs
Source:
CompositionError.cs
Source:
CompositionError.cs

Initializes a new instance of the CompositionError class with the specified error message, and the composition element and exception that are the cause of the composition error.

C#
public CompositionError(string? message, System.ComponentModel.Composition.Primitives.ICompositionElement? element, Exception? exception);
C#
public CompositionError(string message, System.ComponentModel.Composition.Primitives.ICompositionElement element, Exception exception);

Parameters

message
String

A message that describes the CompositionError or null to set the Description property to an empty string ("").

element
ICompositionElement

The composition element that is the cause of the CompositionError or null to set the Element property to null.

exception
Exception

The Exception that is the underlying cause of the CompositionError or null to set the Exception property to null.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)