Options
All
  • Public
  • Public/Protected
  • All
Menu

APIs to inspect .NET Types

Hierarchy

  • Types

Index

Methods

  • alias(type: string): any
  • Return well-known C# alias for its .NET Type name

    Parameters

    • type: string

    Returns any

  • equals(a: { name: string; namespace: string }, b: { name: string; namespace: string }): boolean
  • Return true if both Type Refs are equivalent

    Parameters

    • a: { name: string; namespace: string }
      • name: string
      • namespace: string
    • b: { name: string; namespace: string }
      • name: string
      • namespace: string

    Returns boolean

  • formatValue(type: string, value: any): any
  • Return value suitable for human display

    Parameters

    • type: string
    • value: any

    Returns any

  • isArray(type: string): boolean
  • Return true if .NET Type is a collection

    Parameters

    • type: string

    Returns boolean

  • isNumber(type: string): boolean
  • Return true if .NET Type is numeric

    Parameters

    • type: string

    Returns boolean

  • isPrimitive(type: string): boolean
  • Return true if typeof is a scalar value (string|number|symbol|boolean)

    Parameters

    • type: string

    Returns boolean

  • isString(type: string): boolean
  • Return true if .NET Type is a string

    Parameters

    • type: string

    Returns boolean

  • key(typeRef: { name: string; namespace: string }): string
  • Create a unique key string from a Type Ref

    Parameters

    • typeRef: { name: string; namespace: string }
      • name: string
      • namespace: string

    Returns string

  • typeName(metaType: { genericArgs: string[]; name: string }): string
  • Resolve well-known C# Type Name from Type Ref

    Parameters

    • metaType: { genericArgs: string[]; name: string }
      • genericArgs: string[]
      • name: string

    Returns string

  • typeName2(name: string, genericArgs: string[]): string
  • Resolve well-known C# Type Name from Name and Generic Args

    Parameters

    • name: string
    • genericArgs: string[]

    Returns string

  • unwrap(type: string): string
  • Return underlying Type if nullable

    Parameters

    • type: string

    Returns string

Generated using TypeDoc