Skip to main content

DefaultMemory

Assembly: ServiceStack.Text.dll
View Source
Declaration
public sealed class DefaultMemory : MemoryProvider

Properties

Provider

View Source
Declaration
public static DefaultMemory Provider { get; }

Methods

Configure()

View Source
Declaration
public static void Configure()

ParseBoolean(ReadOnlySpan<Char>)

View Source
Declaration
public override bool ParseBoolean(ReadOnlySpan<char> value)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value

TryParseBoolean(ReadOnlySpan<Char>, out Boolean)

View Source
Declaration
public override bool TryParseBoolean(ReadOnlySpan<char> value, out bool result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Booleanresult

TryParseDecimal(ReadOnlySpan<Char>, out Decimal)

View Source
Declaration
public override bool TryParseDecimal(ReadOnlySpan<char> value, out decimal result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Decimalresult

ParseDecimal(ReadOnlySpan<Char>)

View Source
Declaration
public override decimal ParseDecimal(ReadOnlySpan<char> value)
Returns

System.Decimal

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseDecimal(ReadOnlySpan<Char>, Boolean)

View Source
Declaration
public override decimal ParseDecimal(ReadOnlySpan<char> value, bool allowThousands)
Returns

System.Decimal

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.BooleanallowThousands

TryParseFloat(ReadOnlySpan<Char>, out Single)

View Source
Declaration
public override bool TryParseFloat(ReadOnlySpan<char> value, out float result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Singleresult

ParseFloat(ReadOnlySpan<Char>)

View Source
Declaration
public override float ParseFloat(ReadOnlySpan<char> value)
Returns

System.Single

Parameters
TypeName
ReadOnlySpan<System.Char>value

TryParseDouble(ReadOnlySpan<Char>, out Double)

View Source
Declaration
public override bool TryParseDouble(ReadOnlySpan<char> value, out double result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Doubleresult

ParseDouble(ReadOnlySpan<Char>)

View Source
Declaration
public override double ParseDouble(ReadOnlySpan<char> value)
Returns

System.Double

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseSByte(ReadOnlySpan<Char>)

View Source
Declaration
public override sbyte ParseSByte(ReadOnlySpan<char> value)
Returns

System.SByte

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseByte(ReadOnlySpan<Char>)

View Source
Declaration
public override byte ParseByte(ReadOnlySpan<char> value)
Returns

System.Byte

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseInt16(ReadOnlySpan<Char>)

View Source
Declaration
public override short ParseInt16(ReadOnlySpan<char> value)
Returns

System.Int16

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt16(ReadOnlySpan<Char>)

View Source
Declaration
public override ushort ParseUInt16(ReadOnlySpan<char> value)
Returns

System.UInt16

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseInt32(ReadOnlySpan<Char>)

View Source
Declaration
public override int ParseInt32(ReadOnlySpan<char> value)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt32(ReadOnlySpan<Char>)

View Source
Declaration
public override uint ParseUInt32(ReadOnlySpan<char> value)
Returns

System.UInt32

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt32(ReadOnlySpan<Char>, NumberStyles)

View Source
Declaration
public override uint ParseUInt32(ReadOnlySpan<char> value, NumberStyles style)
Returns

System.UInt32

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Globalization.NumberStylesstyle

ParseInt64(ReadOnlySpan<Char>)

View Source
Declaration
public override long ParseInt64(ReadOnlySpan<char> value)
Returns

System.Int64

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt64(ReadOnlySpan<Char>)

View Source
Declaration
public override ulong ParseUInt64(ReadOnlySpan<char> value)
Returns

System.UInt64

Parameters
TypeName
ReadOnlySpan<System.Char>value

TryParseDecimal(ReadOnlySpan<Char>, Boolean, out Decimal)

View Source
Declaration
public static bool TryParseDecimal(ReadOnlySpan<char> value, bool allowThousands, out decimal result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.BooleanallowThousands
System.Decimalresult

ParseGuid(ReadOnlySpan<Char>)

View Source
Declaration
public override Guid ParseGuid(ReadOnlySpan<char> value)
Returns

System.Guid

Parameters
TypeName
ReadOnlySpan<System.Char>value

Write(Stream, ReadOnlyMemory<Char>)

View Source
Declaration
public override void Write(Stream stream, ReadOnlyMemory<char> value)
Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Char>value

Write(Stream, ReadOnlyMemory<Byte>)

View Source
Declaration
public override void Write(Stream stream, ReadOnlyMemory<byte> value)
Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Byte>value

WriteAsync(Stream, ReadOnlySpan<Char>, CancellationToken)

View Source
Declaration
public override Task WriteAsync(Stream stream, ReadOnlySpan<char> value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
ReadOnlySpan<System.Char>value
System.Threading.CancellationTokentoken

WriteAsync(Stream, ReadOnlyMemory<Char>, CancellationToken)

View Source
Declaration
public override Task WriteAsync(Stream stream, ReadOnlyMemory<char> value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Char>value
System.Threading.CancellationTokentoken

WriteAsync(Stream, ReadOnlyMemory<Byte>, CancellationToken)

View Source
Declaration
public override async Task WriteAsync(Stream stream, ReadOnlyMemory<byte> value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Byte>value
System.Threading.CancellationTokentoken

Deserialize(Stream, Type, DeserializeStringSpanDelegate)

View Source
Declaration
public override object Deserialize(Stream stream, Type type, DeserializeStringSpanDelegate deserializer)
Returns

System.Object

Parameters
TypeName
System.IO.Streamstream
System.Typetype
ServiceStack.Text.Common.DeserializeStringSpanDelegatedeserializer

DeserializeAsync(Stream, Type, DeserializeStringSpanDelegate)

View Source
Declaration
public override async Task<object> DeserializeAsync(Stream stream, Type type, DeserializeStringSpanDelegate deserializer)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.IO.Streamstream
System.Typetype
ServiceStack.Text.Common.DeserializeStringSpanDelegatedeserializer

ParseBase64(ReadOnlySpan<Char>)

View Source
Declaration
public override byte[] ParseBase64(ReadOnlySpan<char> value)
Returns

System.Byte[]

Parameters
TypeName
ReadOnlySpan<System.Char>value

ToBase64(ReadOnlyMemory<Byte>)

View Source
Declaration
public override string ToBase64(ReadOnlyMemory<byte> value)
Returns

System.String

Parameters
TypeName
ReadOnlyMemory<System.Byte>value

Append(StringBuilder, ReadOnlySpan<Char>)

View Source
Declaration
public override StringBuilder Append(StringBuilder sb, ReadOnlySpan<char> value)
Returns

System.Text.StringBuilder

Parameters
TypeName
System.Text.StringBuildersb
ReadOnlySpan<System.Char>value

GetUtf8CharCount(ReadOnlySpan<Byte>)

View Source
Declaration
public override int GetUtf8CharCount(ReadOnlySpan<byte> bytes)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Byte>bytes

GetUtf8ByteCount(ReadOnlySpan<Char>)

View Source
Declaration
public override int GetUtf8ByteCount(ReadOnlySpan<char> chars)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Char>chars

ToUtf8(ReadOnlySpan<Char>)

View Source
Declaration
public override ReadOnlyMemory<byte> ToUtf8(ReadOnlySpan<char> source)
Returns

ReadOnlyMemory<System.Byte>

Parameters
TypeName
ReadOnlySpan<System.Char>source

FromUtf8(ReadOnlySpan<Byte>)

View Source
Declaration
public override ReadOnlyMemory<char> FromUtf8(ReadOnlySpan<byte> source)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Byte>source

ToUtf8(ReadOnlySpan<Char>, Span<Byte>)

View Source
Declaration
public override int ToUtf8(ReadOnlySpan<char> source, Span<byte> destination)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Char>source
Span<System.Byte>destination

FromUtf8(ReadOnlySpan<Byte>, Span<Char>)

View Source
Declaration
public override int FromUtf8(ReadOnlySpan<byte> source, Span<char> destination)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Byte>source
Span<System.Char>destination

ToUtf8Bytes(ReadOnlySpan<Char>)

View Source
Declaration
public override byte[] ToUtf8Bytes(ReadOnlySpan<char> source)
Returns

System.Byte[]

Parameters
TypeName
ReadOnlySpan<System.Char>source

FromUtf8Bytes(ReadOnlySpan<Byte>)

View Source
Declaration
public override string FromUtf8Bytes(ReadOnlySpan<byte> source)
Returns

System.String

Parameters
TypeName
ReadOnlySpan<System.Byte>source

ToMemoryStream(ReadOnlySpan<Byte>)

View Source
Declaration
public override MemoryStream ToMemoryStream(ReadOnlySpan<byte> source)
Returns

System.IO.MemoryStream

Parameters
TypeName
ReadOnlySpan<System.Byte>source

Inherited Methods

Append(StringBuilder, ReadOnlySpan<Char>)

View Source
Declaration
public abstract StringBuilder Append(StringBuilder sb, ReadOnlySpan<char> value)
Returns

System.Text.StringBuilder

Parameters
TypeName
System.Text.StringBuildersb
ReadOnlySpan<System.Char>value

Deserialize(Stream, Type, DeserializeStringSpanDelegate)

View Source
Declaration
public abstract object Deserialize(Stream stream, Type type, DeserializeStringSpanDelegate deserializer)
Returns

System.Object

Parameters
TypeName
System.IO.Streamstream
System.Typetype
ServiceStack.Text.Common.DeserializeStringSpanDelegatedeserializer

DeserializeAsync(Stream, Type, DeserializeStringSpanDelegate)

View Source
Declaration
public abstract Task<object> DeserializeAsync(Stream stream, Type type, DeserializeStringSpanDelegate deserializer)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.IO.Streamstream
System.Typetype
ServiceStack.Text.Common.DeserializeStringSpanDelegatedeserializer

FromUtf8(ReadOnlySpan<Byte>)

View Source
Declaration
public abstract ReadOnlyMemory<char> FromUtf8(ReadOnlySpan<byte> source)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Byte>source

FromUtf8(ReadOnlySpan<Byte>, Span<Char>)

View Source
Declaration
public abstract int FromUtf8(ReadOnlySpan<byte> source, Span<char> destination)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Byte>source
Span<System.Char>destination

FromUtf8Bytes(ReadOnlySpan<Byte>)

View Source
Declaration
public abstract string FromUtf8Bytes(ReadOnlySpan<byte> source)
Returns

System.String

Parameters
TypeName
ReadOnlySpan<System.Byte>source

GetUtf8ByteCount(ReadOnlySpan<Char>)

View Source
Declaration
public abstract int GetUtf8ByteCount(ReadOnlySpan<char> chars)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Char>chars

GetUtf8CharCount(ReadOnlySpan<Byte>)

View Source
Declaration
public abstract int GetUtf8CharCount(ReadOnlySpan<byte> bytes)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Byte>bytes

ParseBase64(ReadOnlySpan<Char>)

View Source
Declaration
public abstract byte[] ParseBase64(ReadOnlySpan<char> value)
Returns

System.Byte[]

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseBoolean(ReadOnlySpan<Char>)

View Source
Declaration
public abstract bool ParseBoolean(ReadOnlySpan<char> value)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseByte(ReadOnlySpan<Char>)

View Source
Declaration
public abstract byte ParseByte(ReadOnlySpan<char> value)
Returns

System.Byte

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseDecimal(ReadOnlySpan<Char>)

View Source
Declaration
public abstract decimal ParseDecimal(ReadOnlySpan<char> value)
Returns

System.Decimal

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseDecimal(ReadOnlySpan<Char>, Boolean)

View Source
Declaration
public abstract decimal ParseDecimal(ReadOnlySpan<char> value, bool allowThousands)
Returns

System.Decimal

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.BooleanallowThousands

ParseDouble(ReadOnlySpan<Char>)

View Source
Declaration
public abstract double ParseDouble(ReadOnlySpan<char> value)
Returns

System.Double

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseFloat(ReadOnlySpan<Char>)

View Source
Declaration
public abstract float ParseFloat(ReadOnlySpan<char> value)
Returns

System.Single

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseGuid(ReadOnlySpan<Char>)

View Source
Declaration
public abstract Guid ParseGuid(ReadOnlySpan<char> value)
Returns

System.Guid

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseInt16(ReadOnlySpan<Char>)

View Source
Declaration
public abstract short ParseInt16(ReadOnlySpan<char> value)
Returns

System.Int16

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseInt32(ReadOnlySpan<Char>)

View Source
Declaration
public abstract int ParseInt32(ReadOnlySpan<char> value)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseInt64(ReadOnlySpan<Char>)

View Source
Declaration
public abstract long ParseInt64(ReadOnlySpan<char> value)
Returns

System.Int64

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseSByte(ReadOnlySpan<Char>)

View Source
Declaration
public abstract sbyte ParseSByte(ReadOnlySpan<char> value)
Returns

System.SByte

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt16(ReadOnlySpan<Char>)

View Source
Declaration
public abstract ushort ParseUInt16(ReadOnlySpan<char> value)
Returns

System.UInt16

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt32(ReadOnlySpan<Char>)

View Source
Declaration
public abstract uint ParseUInt32(ReadOnlySpan<char> value)
Returns

System.UInt32

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseUInt32(ReadOnlySpan<Char>, NumberStyles)

View Source
Declaration
public abstract uint ParseUInt32(ReadOnlySpan<char> value, NumberStyles style)
Returns

System.UInt32

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Globalization.NumberStylesstyle

ParseUInt64(ReadOnlySpan<Char>)

View Source
Declaration
public abstract ulong ParseUInt64(ReadOnlySpan<char> value)
Returns

System.UInt64

Parameters
TypeName
ReadOnlySpan<System.Char>value

ToBase64(ReadOnlyMemory<Byte>)

View Source
Declaration
public abstract string ToBase64(ReadOnlyMemory<byte> value)
Returns

System.String

Parameters
TypeName
ReadOnlyMemory<System.Byte>value

ToMemoryStream(ReadOnlySpan<Byte>)

View Source
Declaration
public abstract MemoryStream ToMemoryStream(ReadOnlySpan<byte> source)
Returns

System.IO.MemoryStream

Parameters
TypeName
ReadOnlySpan<System.Byte>source

ToUtf8(ReadOnlySpan<Char>)

View Source
Declaration
public abstract ReadOnlyMemory<byte> ToUtf8(ReadOnlySpan<char> source)
Returns

ReadOnlyMemory<System.Byte>

Parameters
TypeName
ReadOnlySpan<System.Char>source

ToUtf8(ReadOnlySpan<Char>, Span<Byte>)

View Source
Declaration
public abstract int ToUtf8(ReadOnlySpan<char> source, Span<byte> destination)
Returns

System.Int32

Parameters
TypeName
ReadOnlySpan<System.Char>source
Span<System.Byte>destination

ToUtf8Bytes(ReadOnlySpan<Char>)

View Source
Declaration
public abstract byte[] ToUtf8Bytes(ReadOnlySpan<char> source)
Returns

System.Byte[]

Parameters
TypeName
ReadOnlySpan<System.Char>source

TryParseBoolean(ReadOnlySpan<Char>, out Boolean)

View Source
Declaration
public abstract bool TryParseBoolean(ReadOnlySpan<char> value, out bool result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Booleanresult

TryParseDecimal(ReadOnlySpan<Char>, out Decimal)

View Source
Declaration
public abstract bool TryParseDecimal(ReadOnlySpan<char> value, out decimal result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Decimalresult

TryParseDouble(ReadOnlySpan<Char>, out Double)

View Source
Declaration
public abstract bool TryParseDouble(ReadOnlySpan<char> value, out double result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Doubleresult

TryParseFloat(ReadOnlySpan<Char>, out Single)

View Source
Declaration
public abstract bool TryParseFloat(ReadOnlySpan<char> value, out float result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Singleresult

Write(Stream, ReadOnlyMemory<Byte>)

View Source
Declaration
public abstract void Write(Stream stream, ReadOnlyMemory<byte> value)
Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Byte>value

Write(Stream, ReadOnlyMemory<Char>)

View Source
Declaration
public abstract void Write(Stream stream, ReadOnlyMemory<char> value)
Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Char>value

WriteAsync(Stream, ReadOnlyMemory<Byte>, CancellationToken)

View Source
Declaration
public abstract Task WriteAsync(Stream stream, ReadOnlyMemory<byte> value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Byte>value
System.Threading.CancellationTokentoken

WriteAsync(Stream, ReadOnlyMemory<Char>, CancellationToken)

View Source
Declaration
public abstract Task WriteAsync(Stream stream, ReadOnlyMemory<char> value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
ReadOnlyMemory<System.Char>value
System.Threading.CancellationTokentoken

WriteAsync(Stream, ReadOnlySpan<Char>, CancellationToken)

View Source
Declaration
public abstract Task WriteAsync(Stream stream, ReadOnlySpan<char> value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
ReadOnlySpan<System.Char>value
System.Threading.CancellationTokentoken