@tsonic/dotnet-pure
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library) - CLR naming
346 lines (256 loc) • 13.9 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: System.ComponentModel.Design.Serialization
// Assembly: System.ComponentModel.Primitives, System.ComponentModel.TypeConverter
// 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 { ICollection } from "../../System.Collections/internal/index.js";
import * as System_ComponentModel_Design_Internal from "../../System.ComponentModel.Design/internal/index.js";
import type { DesignerTransaction, DesignerTransactionCloseEventHandler, IDesigner, IDesignerHost, IServiceContainer, ServiceCreatorCallback } from "../../System.ComponentModel.Design/internal/index.js";
import type { IComponent, IContainer, MemberDescriptor, PropertyDescriptorCollection } from "../../System.ComponentModel/internal/index.js";
import type { Stream } from "../../System.IO/internal/index.js";
import type { MemberInfo, MethodInfo } from "../../System.Reflection/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 { AsyncCallback, Attribute, Boolean as ClrBoolean, Delegate, EventArgs, EventHandler, IAsyncResult, ICloneable, IDisposable, IEquatable_1, Int32, IntPtr, IServiceProvider, MulticastDelegate, Object as ClrObject, String as ClrString, Type, ValueType, 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 type ResolveNameEventHandler = (sender: unknown, e: ResolveNameEventArgs) => void;
export interface IDesignerLoaderHost$instance extends IDesignerHost, IServiceContainer, IServiceProvider {
readonly Loading: boolean;
readonly InTransaction: boolean;
readonly Container: IContainer;
readonly RootComponent: IComponent;
readonly RootComponentClassName: string;
readonly TransactionDescription: string;
AddService(serviceType: Type, callback: ServiceCreatorCallback, promote: boolean): void;
AddService(serviceType: Type, callback: ServiceCreatorCallback): void;
AddService(serviceType: Type, serviceInstance: unknown, promote: boolean): void;
AddService(serviceType: Type, serviceInstance: unknown): void;
CreateComponent(componentClass: Type, name: string): IComponent;
CreateComponent(componentClass: Type): IComponent;
CreateTransaction(): DesignerTransaction;
CreateTransaction(description: string): DesignerTransaction;
DestroyComponent(component: IComponent): void;
EndLoad(baseClassName: string, successful: boolean, errorCollection: ICollection): void;
GetDesigner(component: IComponent): IDesigner;
GetService(serviceType: Type): unknown;
GetType(typeName: string): Type;
Reload(): void;
RemoveService(serviceType: Type, promote: boolean): void;
RemoveService(serviceType: Type): void;
}
export type IDesignerLoaderHost = IDesignerLoaderHost$instance;
export interface IDesignerLoaderHost2$instance extends IDesignerLoaderHost, IDesignerHost, IServiceContainer, IServiceProvider {
IgnoreErrorsDuringReload: boolean;
CanReloadWithErrors: boolean;
readonly Loading: boolean;
readonly InTransaction: boolean;
readonly Container: IContainer;
readonly RootComponent: IComponent;
readonly RootComponentClassName: string;
readonly TransactionDescription: string;
AddService(serviceType: Type, callback: ServiceCreatorCallback, promote: boolean): void;
AddService(serviceType: Type, callback: ServiceCreatorCallback): void;
AddService(serviceType: Type, serviceInstance: unknown, promote: boolean): void;
AddService(serviceType: Type, serviceInstance: unknown): void;
CreateComponent(componentClass: Type, name: string): IComponent;
CreateComponent(componentClass: Type): IComponent;
CreateTransaction(): DesignerTransaction;
CreateTransaction(description: string): DesignerTransaction;
DestroyComponent(component: IComponent): void;
EndLoad(baseClassName: string, successful: boolean, errorCollection: ICollection): void;
GetDesigner(component: IComponent): IDesigner;
GetService(serviceType: Type): unknown;
GetType(typeName: string): Type;
Reload(): void;
RemoveService(serviceType: Type, promote: boolean): void;
RemoveService(serviceType: Type): void;
}
export type IDesignerLoaderHost2 = IDesignerLoaderHost2$instance;
export interface IDesignerLoaderService$instance {
AddLoadDependency(): void;
DependentLoadComplete(successful: boolean, errorCollection: ICollection): void;
Reload(): boolean;
}
export type IDesignerLoaderService = IDesignerLoaderService$instance;
export interface IDesignerSerializationManager$instance extends IServiceProvider {
readonly Context: ContextStack;
readonly Properties: PropertyDescriptorCollection;
AddSerializationProvider(provider: IDesignerSerializationProvider): void;
CreateInstance(type_: Type, arguments: ICollection, name: string, addToContainer: boolean): unknown;
GetInstance(name: string): unknown;
GetName(value: unknown): string;
GetSerializer(objectType: Type, serializerType: Type): unknown;
GetService(serviceType: Type): unknown;
GetType(typeName: string): Type;
ReportError(errorInformation: unknown): void;
SetName(instance: unknown, name: string): void;
}
export interface IDesignerSerializationManager$instance extends System_Internal.IServiceProvider$instance {}
export type IDesignerSerializationManager = IDesignerSerializationManager$instance;
export interface IDesignerSerializationProvider$instance {
GetSerializer(manager: IDesignerSerializationManager, currentSerializer: unknown, objectType: Type, serializerType: Type): unknown;
}
export type IDesignerSerializationProvider = IDesignerSerializationProvider$instance;
export interface IDesignerSerializationService$instance {
Deserialize(serializationData: unknown): ICollection;
Serialize(objects: ICollection): unknown;
}
export type IDesignerSerializationService = IDesignerSerializationService$instance;
export interface INameCreationService$instance {
CreateName(container: IContainer, dataType: Type): string;
IsValidName(name: string): boolean;
ValidateName(name: string): void;
}
export type INameCreationService = INameCreationService$instance;
export interface MemberRelationship$instance {
readonly IsEmpty: boolean;
readonly Member: MemberDescriptor;
readonly Owner: unknown;
Equals(obj: unknown): boolean;
Equals(other: MemberRelationship): boolean;
GetHashCode(): int;
}
export const MemberRelationship: {
new(owner: unknown, member: MemberDescriptor): MemberRelationship$instance;
readonly Empty: MemberRelationship;
};
export interface __MemberRelationship$views {
As_IEquatable_1(): System_Internal.IEquatable_1$instance<MemberRelationship>;
// Structural method bridges for numeric interface constraints
Equals(other: MemberRelationship): boolean;
}
export type MemberRelationship = MemberRelationship$instance & __MemberRelationship$views;
export interface ComponentSerializationService$instance {
CreateStore(): SerializationStore;
Deserialize(store: SerializationStore): ICollection;
Deserialize(store: SerializationStore, container: IContainer): ICollection;
DeserializeTo(store: SerializationStore, container: IContainer, validateRecycledTypes: boolean, applyDefaults: boolean): void;
DeserializeTo(store: SerializationStore, container: IContainer): void;
DeserializeTo(store: SerializationStore, container: IContainer, validateRecycledTypes: boolean): void;
LoadStore(stream: Stream): SerializationStore;
Serialize(store: SerializationStore, value: unknown): void;
SerializeAbsolute(store: SerializationStore, value: unknown): void;
SerializeMember(store: SerializationStore, owningObject: unknown, member: MemberDescriptor): void;
SerializeMemberAbsolute(store: SerializationStore, owningObject: unknown, member: MemberDescriptor): void;
}
export const ComponentSerializationService: {
};
export type ComponentSerializationService = ComponentSerializationService$instance;
export interface ContextStack$instance {
readonly Current: unknown;
Append(context: unknown): void;
get_Item(level: int): unknown;
get_Item(type_: Type): unknown;
Pop(): unknown;
Push(context: unknown): void;
}
export const ContextStack: {
new(): ContextStack$instance;
};
export type ContextStack = ContextStack$instance;
export interface DefaultSerializationProviderAttribute$instance extends Attribute {
readonly ProviderTypeName: string;
}
export const DefaultSerializationProviderAttribute: {
new(providerType: Type): DefaultSerializationProviderAttribute$instance;
new(providerTypeName: string): DefaultSerializationProviderAttribute$instance;
};
export type DefaultSerializationProviderAttribute = DefaultSerializationProviderAttribute$instance;
export interface DesignerLoader$instance {
readonly Loading: boolean;
BeginLoad(host: IDesignerLoaderHost): void;
Dispose(): void;
Flush(): void;
}
export const DesignerLoader: {
};
export type DesignerLoader = DesignerLoader$instance;
export interface DesignerSerializerAttribute$instance extends Attribute {
readonly SerializerBaseTypeName: string;
readonly SerializerTypeName: string;
readonly TypeId: unknown;
}
export const DesignerSerializerAttribute: {
new(serializerType: Type, baseSerializerType: Type): DesignerSerializerAttribute$instance;
new(serializerTypeName: string, baseSerializerType: Type): DesignerSerializerAttribute$instance;
new(serializerTypeName: string, baseSerializerTypeName: string): DesignerSerializerAttribute$instance;
};
export type DesignerSerializerAttribute = DesignerSerializerAttribute$instance;
export interface InstanceDescriptor$instance {
readonly Arguments: ICollection;
readonly IsComplete: boolean;
readonly MemberInfo: MemberInfo;
Invoke(): unknown;
}
export const InstanceDescriptor: {
new(member: MemberInfo, arguments: ICollection): InstanceDescriptor$instance;
new(member: MemberInfo, arguments: ICollection, isComplete: boolean): InstanceDescriptor$instance;
};
export type InstanceDescriptor = InstanceDescriptor$instance;
export interface MemberRelationshipService$instance {
get_Item(source: MemberRelationship): MemberRelationship;
get_Item(sourceOwner: unknown, sourceMember: MemberDescriptor): MemberRelationship;
set_Item(source: MemberRelationship, value: MemberRelationship): void;
set_Item(sourceOwner: unknown, sourceMember: MemberDescriptor, value: MemberRelationship): void;
SupportsRelationship(source: MemberRelationship, relationship: MemberRelationship): boolean;
}
export const MemberRelationshipService: {
};
export type MemberRelationshipService = MemberRelationshipService$instance;
export interface ResolveNameEventArgs$instance extends EventArgs {
readonly Name: string;
Value: unknown;
}
export const ResolveNameEventArgs: {
new(name: string): ResolveNameEventArgs$instance;
};
export type ResolveNameEventArgs = ResolveNameEventArgs$instance;
export interface RootDesignerSerializerAttribute$instance extends Attribute {
readonly Reloadable: boolean;
readonly SerializerBaseTypeName: string;
readonly SerializerTypeName: string;
readonly TypeId: unknown;
}
export const RootDesignerSerializerAttribute: {
new(serializerType: Type, baseSerializerType: Type, reloadable: boolean): RootDesignerSerializerAttribute$instance;
new(serializerTypeName: string, baseSerializerType: Type, reloadable: boolean): RootDesignerSerializerAttribute$instance;
new(serializerTypeName: string, baseSerializerTypeName: string, reloadable: boolean): RootDesignerSerializerAttribute$instance;
};
export type RootDesignerSerializerAttribute = RootDesignerSerializerAttribute$instance;
export interface SerializationStore$instance {
readonly Errors: ICollection;
Close(): void;
Save(stream: Stream): void;
}
export const SerializationStore: {
};
export interface __SerializationStore$views {
As_IDisposable(): System_Internal.IDisposable$instance;
}
export interface SerializationStore$instance extends System_Internal.IDisposable$instance {}
export type SerializationStore = SerializationStore$instance & __SerializationStore$views;