Show / Hide Table of Contents

Class TypeExpression

Representa una expresión que puede resolverse a un tipo definido.

Inheritance
object
TypeExpression
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types
Assembly: MCART.dll
Syntax
public class TypeExpression

Constructors

| Edit this page View Source

TypeExpression(string)

Representa una expresión que puede resolverse a un tipo definido.

Declaration
public TypeExpression(string fullName)
Parameters
Type Name Description
string fullName

Nombre completo del tipo al que esta expresión hace referencia.

| Edit this page View Source

TypeExpression(Type)

Initializes a new instance of the TypeExpression, utilizando el tipo especificado como base.

Declaration
public TypeExpression(Type type)
Parameters
Type Name Description
Type type

Tipo a partir del cual generar el TypeExpression.

Properties

| Edit this page View Source

FullName

Obtiene el nombre completo del tipo.

Declaration
public string FullName { get; }
Property Value
Type Description
string
| Edit this page View Source

GenericArgs

Obtiene una colección por medio de la cual se pueden obtener y establecer los argumentos de tipo a incluir al tratar de resolver un tipo.

Declaration
public ICollection<TypeExpression> GenericArgs { get; }
Property Value
Type Description
ICollection<TypeExpression>
| Edit this page View Source

Name

Obtiene el nombre del tipo.

Declaration
public string Name { get; }
Property Value
Type Description
string
| Edit this page View Source

Namespace

Obtiene el espacio de nombres del tipo.

Declaration
public string Namespace { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

Resolve()

Resuelve un tipo a partir de esta expresión.

Declaration
public Type Resolve()
Returns
Type Description
Type

Un tipo resuelto a partir de esta expresión.

Exceptions
Type Condition
MissingTypeException

Se produce si no ha sido posible resolver el tipo a partir de la expresión representada por esta instancia.

| Edit this page View Source

Resolve(bool)

Resuelve un tipo a partir de esta expresión.

Declaration
public Type? Resolve(bool throwOnFail)
Parameters
Type Name Description
bool throwOnFail

true para lanzar una excepción si no es posible resolver la expresión de tipo representada por esta instancia, false para retornar null en su lugar.

Returns
Type Description
Type

Un tipo resuelto a partir de esta expresión, o null en caso de no poder resolverse la expresión representada por esta instancia si throwOnFail se establece en false.

Exceptions
Type Condition
MissingTypeException

Se produce si no ha sido posible resolver el tipo a partir de la expresión representada por esta instancia si throwOnFail se establece en true.

Operators

| Edit this page View Source

implicit operator Type(TypeExpression)

Convierte implícitamente un TypeExpression en un Type.

Declaration
public static implicit operator Type(TypeExpression expression)
Parameters
Type Name Description
TypeExpression expression

Objeto a convertir.

Returns
Type Description
Type

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX