Show / Hide Table of Contents

Class AttachmentInfo

References a piece of data or file attached to a crash.

Inheritance
System.Object
AttachmentInfo
Implements
System.IEquatable<AttachmentInfo>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CrashCABN.Metadata
Assembly: CrashCABN.Metadata.Abstractions.dll
Syntax
public sealed class AttachmentInfo : IEquatable<AttachmentInfo>

Constructors

View Source

AttachmentInfo(String, Object, AttachmentType)

Initializes a new instance of the AttachmentInfo class.

Declaration
public AttachmentInfo(string name, object source, AttachmentType type = AttachmentType.Constant)
Parameters
Type Name Description
System.String name

The attachment name.

System.Object source

The attachment value or location.

AttachmentType type

The attachment type, a constant value by default.

Properties

View Source

Name

Gets the attachment name.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
View Source

Source

Gets the attachment value or location.

Declaration
public object Source { get; }
Property Value
Type Description
System.Object
View Source

Type

Gets the attachment type.

Declaration
public AttachmentType Type { get; }
Property Value
Type Description
AttachmentType

Methods

View Source

GetUriValue()

Gets the attachment value as a URL.

Declaration
public Uri GetUriValue()
Returns
Type Description
System.Uri

The typed attachment value.

Exceptions
Type Condition
System.NotSupportedException

If the type was incorrect.

View Source

GetValue<T>()

Gets the attachment value or location as the given type.

Declaration
public T GetValue<T>()
    where T : class
Returns
Type Description
T

The typed attachment value or location.

Type Parameters
Name Description
T

The type to cast to.

Exceptions
Type Condition
System.InvalidOperationException

If the type was incorrect.

Implements

System.IEquatable<T>
  • View Source
In This Article
Back to top Generated by DocFX