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
formatProviderIFormatProviderThe provider to use to format the value.
-or-
A null reference (
Nothingin 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
formatstringThe format to use.
-or-
A null reference (
Nothingin 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
formatstringThe format to use.
-or-
A null reference (
Nothingin Visual Basic) to use the default format defined for the type of the IFormattable implementation.formatProviderIFormatProviderThe provider to use to format the value.
-or-
A null reference (
Nothingin 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
destinationSpan<char>The span in which to write this instance's value formatted as a span of characters.
charsWrittenintWhen this method returns, contains the number of characters that were written in
destination.formatReadOnlySpan<char>A span containing the characters that represent a standard or custom format string that defines the acceptable format for
destination.providerIFormatProviderAn optional object that supplies culture-specific formatting information for
destination.