Table of Contents

Interface IValue

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Represent a value extracted from analyzing the code base.

public interface IValue
Extension Methods

Properties (14)

AsBool

Get the value as boolean.

bool AsBool { get; }

Property Value

bool

Exceptions

InvalidCastException

The value is not typed as boolean.

AsByte

Get the value as byte.

byte AsByte { get; }

Property Value

byte

Exceptions

InvalidCastException

The value is not typed as byte.

AsDouble

Get the value as ulong.

double AsDouble { get; }

Property Value

double

Exceptions

InvalidCastException

The value is not typed as double.

AsFloat

Get the value as float.

float AsFloat { get; }

Property Value

float

Exceptions

InvalidCastException

The value is not typed as float.

AsInt

Get the value as int.

int AsInt { get; }

Property Value

int

Exceptions

InvalidCastException

The value is not typed as int.

AsLong

Get the value as long.

long AsLong { get; }

Property Value

long

Exceptions

InvalidCastException

The value is not typed as long.

AsObject

Get the value as object.

object AsObject { get; }

Property Value

object

Remarks

If the value is typed with value type, it is boxed in an object.

AsSByte

Get the value as sbyte.

sbyte AsSByte { get; }

Property Value

sbyte

Exceptions

InvalidCastException

The value is not typed as sbyte.

AsShort

Get the value as short.

short AsShort { get; }

Property Value

short

Exceptions

InvalidCastException

The value is not typed as short.

AsString

Get the value as string.

string AsString { get; }

Property Value

string

Exceptions

InvalidCastException

The value is not typed as string.

AsType

Get the value as IType.

IType AsType { get; }

Property Value

IType

Remarks

This handles the case when typeof(typeName) is used in attribute tag parameter.

Exceptions

InvalidCastException

The value is not typed as IType.

AsUInt

Get the value as uint.

uint AsUInt { get; }

Property Value

uint

Exceptions

InvalidCastException

The value is not typed as uint.

AsULong

Get the value as ulong.

ulong AsULong { get; }

Property Value

ulong

Exceptions

InvalidCastException

The value is not typed as ulong.

AsUShort

Get the value as ushort.

ushort AsUShort { get; }

Property Value

ushort

Exceptions

InvalidCastException

The value is not typed as ushort.