@tsonic/dotnet
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library)
136 lines (105 loc) • 6.29 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: Microsoft.CSharp.RuntimeBinder
// Assembly: Microsoft.CSharp
// Branded primitive types are sourced from @tsonic/types
import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/types';
// Import types from other namespaces
import type { IEnumerable_1 } from "../../System.Collections.Generic/internal/index.js";
import type { IDictionary } from "../../System.Collections/internal/index.js";
import type { ExpressionType } from "../../System.Linq.Expressions/internal/index.js";
import type { MethodBase } from "../../System.Reflection/internal/index.js";
import type { CallSiteBinder } from "../../System.Runtime.CompilerServices/internal/index.js";
import * as System_Runtime_Serialization_Internal from "../../System.Runtime.Serialization/internal/index.js";
import type { ISerializable, SerializationInfo, StreamingContext } from "../../System.Runtime.Serialization/internal/index.js";
import * as System_Internal from "../../System/internal/index.js";
import type { Boolean as ClrBoolean, Enum, Exception, IComparable, IConvertible, IFormatProvider, IFormattable, Int32, ISpanFormattable, Object as ClrObject, String as ClrString, Type, TypeCode, Void } from "../../System/internal/index.js";
// CLROf<T> - Maps ergonomic primitives to their CLR types for generic constraints
// This utility is used ONLY in generic type arguments to satisfy CLR interface constraints
// Value positions (parameters, return types) use lowercase primitives for ergonomics
export type CLROf<T> =
T extends sbyte ? System_Internal.SByte :
T extends short ? System_Internal.Int16 :
T extends int ? System_Internal.Int32 :
T extends long ? System_Internal.Int64 :
T extends int128 ? System_Internal.Int128 :
T extends nint ? System_Internal.IntPtr :
T extends byte ? System_Internal.Byte :
T extends ushort ? System_Internal.UInt16 :
T extends uint ? System_Internal.UInt32 :
T extends ulong ? System_Internal.UInt64 :
T extends uint128 ? System_Internal.UInt128 :
T extends nuint ? System_Internal.UIntPtr :
T extends half ? System_Internal.Half :
T extends float ? System_Internal.Single :
T extends double ? System_Internal.Double :
T extends decimal ? System_Internal.Decimal :
T extends char ? System_Internal.Char :
T extends boolean ? System_Internal.Boolean :
T extends string ? System_Internal.String :
T; // Identity fallback for non-primitive types
export enum CSharpArgumentInfoFlags {
none = 0,
useCompileTimeType = 1,
constant = 2,
namedArgument = 4,
isRef = 8,
isOut = 16,
isStaticType = 32
}
export enum CSharpBinderFlags {
none = 0,
checkedContext = 1,
invokeSimpleName = 2,
invokeSpecialName = 4,
binaryOperationLogical = 8,
convertExplicit = 16,
convertArrayIndex = 32,
resultIndexed = 64,
valueFromCompoundAssignment = 128,
resultDiscarded = 256
}
export interface CSharpArgumentInfo$instance {
}
export const CSharpArgumentInfo: {
new(): CSharpArgumentInfo$instance;
create(flags: CSharpArgumentInfoFlags, name: string): CSharpArgumentInfo;
};
export type CSharpArgumentInfo = CSharpArgumentInfo$instance;
export interface RuntimeBinderException$instance extends Exception {
getObjectData(info: SerializationInfo, context: StreamingContext): void;
}
export const RuntimeBinderException: {
new(): RuntimeBinderException$instance;
new(message: string): RuntimeBinderException$instance;
new(message: string, innerException: Exception): RuntimeBinderException$instance;
};
export interface __RuntimeBinderException$views {
As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance;
}
export type RuntimeBinderException = RuntimeBinderException$instance & __RuntimeBinderException$views;
export interface RuntimeBinderInternalCompilerException$instance extends Exception {
getObjectData(info: SerializationInfo, context: StreamingContext): void;
}
export const RuntimeBinderInternalCompilerException: {
new(): RuntimeBinderInternalCompilerException$instance;
new(message: string): RuntimeBinderInternalCompilerException$instance;
new(message: string, innerException: Exception): RuntimeBinderInternalCompilerException$instance;
};
export interface __RuntimeBinderInternalCompilerException$views {
As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance;
}
export type RuntimeBinderInternalCompilerException = RuntimeBinderInternalCompilerException$instance & __RuntimeBinderInternalCompilerException$views;
export abstract class Binder$instance {
static binaryOperation(flags: CSharpBinderFlags, operation: ExpressionType, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static convert(flags: CSharpBinderFlags, type_: Type, context: Type): CallSiteBinder;
static getIndex(flags: CSharpBinderFlags, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static getMember(flags: CSharpBinderFlags, name: string, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static invoke(flags: CSharpBinderFlags, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static invokeConstructor(flags: CSharpBinderFlags, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static invokeMember(flags: CSharpBinderFlags, name: string, typeArguments: IEnumerable_1<Type>, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static isEvent(flags: CSharpBinderFlags, name: string, context: Type): CallSiteBinder;
static setIndex(flags: CSharpBinderFlags, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static setMember(flags: CSharpBinderFlags, name: string, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
static unaryOperation(flags: CSharpBinderFlags, operation: ExpressionType, context: Type, argumentInfo: IEnumerable_1<CSharpArgumentInfo>): CallSiteBinder;
}
export type Binder = Binder$instance;