Table of Contents

Class CodeBlock

Namespace
NetCord
Assembly
NetCord.dll
public class CodeBlock : ISpanFormattable, IFormattable, ISpanParsable<CodeBlock>, IParsable<CodeBlock>
Inheritance
CodeBlock
Implements
Inherited Members

Constructors

CodeBlock(string, string?)

public CodeBlock(string code, string? formatter = null)

Parameters

code string
formatter string

Properties

Code

public string Code { get; }

Property Value

string

Formatter

public string? Formatter { get; }

Property Value

string

Methods

Parse(ReadOnlySpan<char>)

public static CodeBlock Parse(ReadOnlySpan<char> s)

Parameters

s ReadOnlySpan<char>

Returns

CodeBlock

Parse(ReadOnlySpan<char>, bool)

public static CodeBlock Parse(ReadOnlySpan<char> s, bool strictMode)

Parameters

s ReadOnlySpan<char>
strictMode bool

Returns

CodeBlock

ToString()

public override string ToString()

Returns

string

ToString(string?, IFormatProvider?)

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

Parameters

format string
formatProvider IFormatProvider

Returns

string

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

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

Parameters

destination Span<char>
charsWritten int
format ReadOnlySpan<char>
provider IFormatProvider

Returns

bool

TryParse(ReadOnlySpan<char>, out CodeBlock)

public static bool TryParse(ReadOnlySpan<char> s, out CodeBlock result)

Parameters

s ReadOnlySpan<char>
result CodeBlock

Returns

bool

TryParse(ReadOnlySpan<char>, bool, out CodeBlock)

public static bool TryParse(ReadOnlySpan<char> s, bool strictMode, out CodeBlock result)

Parameters

s ReadOnlySpan<char>
strictMode bool
result CodeBlock

Returns

bool

Explicit Interface Implementations

Parse(ReadOnlySpan<char>, IFormatProvider?)

static CodeBlock Parse(ReadOnlySpan<char> s, IFormatProvider? provider)

Parameters

s ReadOnlySpan<char>
provider IFormatProvider

Returns

CodeBlock

Parse(string, IFormatProvider?)

static CodeBlock Parse(string s, IFormatProvider? provider)

Parameters

s string
provider IFormatProvider

Returns

CodeBlock

TryParse(ReadOnlySpan<char>, IFormatProvider?, out CodeBlock)

static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CodeBlock result)

Parameters

s ReadOnlySpan<char>
provider IFormatProvider
result CodeBlock

Returns

bool

TryParse(string?, IFormatProvider?, out CodeBlock)

static bool TryParse(string? s, IFormatProvider? provider, out CodeBlock result)

Parameters

s string
provider IFormatProvider
result CodeBlock

Returns

bool