static class · System.Reflection

Fail

static class Fail

What the compiler's code calls when reflection meets what it cannot do.

Tipo
static class
Espacio de nombres
System.Reflection
Ensamblado
System.Core
Acceso
internal, static, abstract
Archivo fuente
Reflection.ant

Herencia

Clases base
Any Fail

Miembros privados e internos (5)

NotAnObject(str what) : any?
#

private static

A field or result that is not an object (an array, a pointer, a function) cannot be an any.

Target(str type) : any
#

private static

Value(str type) : any
#

private static

ValueField(str field)
#

private static

Missing(str what) : any?
#

private static

Miembros heredados (5)

Código fuente

Fail en Antril, descompilado a partir de su Larva HIR.

System.Reflection.Fail.ant
// System.Reflection.Fail — System.Core (decompiled from Larva HIR)

import System;

into namespace System.Reflection
{
	/// What the compiler's code calls when reflection meets what it cannot do.
	static class Fail
	{
		/// A field or result that is not an object (an array, a pointer, a function) cannot be an `any`.
		[NoInline]
		NotAnObject(str what) : any?
		{
			throw new NotSupportedError(what + " is not an object: reflection cannot give it as an any");
		}

		[NoInline]
		Target(str type) : any
		{
			throw new InvalidCastError("the target is not a " + type);
		}

		[NoInline]
		Value(str type) : any
		{
			throw new InvalidCastError("the value is not a " + type);
		}

		[NoInline]
		ValueField(str field)
		{
			throw new NotSupportedError(field + " belongs to a value: set it on the value itself, not through a boxed copy");
		}

		[NoInline]
		Missing(str what) : any?
		{
			throw new MissingMemberError(what);
		}
	}
}
Esc