In This Article

TypeResolutionEventArgs Class

Provides data for a TrustedCodeService event related resolving a string type name to a Type.

public class TypeResolutionEventArgs : EventArgs
Inheritance:
object EventArgs object

Constructors

TypeResolutionEventArgs(string?, string, StringTypeNameTrustLevel)

Initializes an instance of the class.

public TypeResolutionEventArgs(string? assemblyName, string typeName, StringTypeNameTrustLevel trustLevel)
Parameter Type Description
assemblyName string

The name of the assembly containing the type, or null if not specified.

typeName string

The full name of the type to resolve.

trustLevel StringTypeNameTrustLevel

A StringTypeNameTrustLevel value indicating the type's trust level, which initializes the IsTrusted property.

Properties

AssemblyName

The name of the assembly containing the type, or null if not specified.

public string? AssemblyName { get; }

Property Value

string

IsTrusted

Indicates whether the type is trusted.

public bool IsTrusted { get; set; }

Property Value

bool:

The default value depends on whether the assembly and type match with trust information maintained in TrustedCodeService.

Remarks

Set this property to true to mark the type as trusted for resolution and instantiation, or false to mark it as untrusted.

ResolvedType

The resolved Type to use if custom handling is performed to resolve the type.

public Type? ResolvedType { get; set; }

Property Value

Type

Remarks

Set this property to a Type instance to use it as the resolved type, thereby avoiding any Actipro logic to attempt dynamic loading when IsTrusted is true.

TrustLevel

A StringTypeNameTrustLevel value indicating the type's trust level from initial examination in TrustedCodeService.

public StringTypeNameTrustLevel TrustLevel { get; }

Property Value

StringTypeNameTrustLevel

TypeName

The full name of the type to resolve.

public string TypeName { get; }

Property Value

string

Inherited Members