Table of Contents

Class SubSystemInit

Namespace
Sdl3Sharp
Assembly
Sdl3Sharp.dll

Represents the lifetime of a set of initialized sub systems

public sealed class SubSystemInit : IDisposable, Sdl.IDisposeReceiver, ISpanFormattable, IFormattable
Inheritance
SubSystemInit
Implements
Inherited Members

Remarks

Initialized SubSystems are reference counted through SubSystemInits. That means the lifetime of a certain sub sets of SubSystems could overlap with other SubSystemInits.

Properties

SubSystems

Gets the sub systems the SubSystemInit was initialized with

public SubSystems SubSystems { get; }

Property Value

SubSystems

The sub systems the SubSystemInit was initialized with

Methods

Dispose()

Disposes the SubSystemInit and potentially shuts down some of the sub systems

public void Dispose()

Remarks

SubSystems are reference counted through SubSystemInits. This method decreases the reference count for the SubSystems.

SubSystems get shut down if their reference count reaches 0. That means if other SubSystemInits hold a reference to certain SubSystems or the Sdl instance was initialized with certain SubSystems, those might not get shut down immediately.

Dispose() shuts down all SubSystems regardless.

~SubSystemInit()

protected ~SubSystemInit()

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToString(IFormatProvider?)

Formats the value of the current instance using the specified format.

public string ToString(IFormatProvider? formatProvider)

Parameters

formatProvider IFormatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

ToString(string?)

Formats the value of the current instance using the specified format.

public string ToString(string? format)

Parameters

format string

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

Returns

string

The value of the current instance in the specified format.

ToString(string?, IFormatProvider?)

Formats the value of the current instance using the specified format.

public string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)

Tries to format the value of the current instance into the provided span of characters.

public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)

Parameters

destination Span<char>

The span in which to write this instance's value formatted as a span of characters.

charsWritten int

When this method returns, contains the number of characters that were written in destination.

format ReadOnlySpan<char>

A span containing the characters that represent a standard or custom format string that defines the acceptable format for destination.

provider IFormatProvider

An optional object that supplies culture-specific formatting information for destination.

Returns

bool

true if the formatting was successful; otherwise, false.