MemoryProvider
Assembly: ServiceStack.Text.dll
View Source
Declaration
public abstract class MemoryProvider
Fields
Instance
View Source
Declaration
public static MemoryProvider Instance
Methods
TryParseBoolean(ReadOnlySpan<Char>, out Boolean)
View Source
Declaration
public abstract bool TryParseBoolean(ReadOnlySpan<char> value, out bool result)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
System.Boolean | result |
ParseBoolean(ReadOnlySpan<Char>)
View Source
Declaration
public abstract bool ParseBoolean(ReadOnlySpan<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
TryParseDecimal(ReadOnlySpan<Char>, out Decimal)
View Source
Declaration
public abstract bool TryParseDecimal(ReadOnlySpan<char> value, out decimal result)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
System.Decimal | result |
ParseDecimal(ReadOnlySpan<Char>)
View Source
Declaration
public abstract decimal ParseDecimal(ReadOnlySpan<char> value)
Returns
System.Decimal
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseDecimal(ReadOnlySpan<Char>, Boolean)
View Source
Declaration
public abstract decimal ParseDecimal(ReadOnlySpan<char> value, bool allowThousands)
Returns
System.Decimal
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
System.Boolean | allowThousands |
TryParseFloat(ReadOnlySpan<Char>, out Single)
View Source
Declaration
public abstract bool TryParseFloat(ReadOnlySpan<char> value, out float result)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
System.Single | result |
ParseFloat(ReadOnlySpan<Char>)
View Source
Declaration
public abstract float ParseFloat(ReadOnlySpan<char> value)
Returns
System.Single
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
TryParseDouble(ReadOnlySpan<Char>, out Double)
View Source
Declaration
public abstract bool TryParseDouble(ReadOnlySpan<char> value, out double result)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
System.Double | result |
ParseDouble(ReadOnlySpan<Char>)
View Source
Declaration
public abstract double ParseDouble(ReadOnlySpan<char> value)
Returns
System.Double
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseSByte(ReadOnlySpan<Char>)
View Source
Declaration
public abstract sbyte ParseSByte(ReadOnlySpan<char> value)
Returns
System.SByte
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseByte(ReadOnlySpan<Char>)
View Source
Declaration
public abstract byte ParseByte(ReadOnlySpan<char> value)
Returns
System.Byte
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseInt16(ReadOnlySpan<Char>)
View Source
Declaration
public abstract short ParseInt16(ReadOnlySpan<char> value)
Returns
System.Int16
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseUInt16(ReadOnlySpan<Char>)
View Source
Declaration
public abstract ushort ParseUInt16(ReadOnlySpan<char> value)
Returns
System.UInt16
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseInt32(ReadOnlySpan<Char>)
View Source
Declaration
public abstract int ParseInt32(ReadOnlySpan<char> value)
Returns
System.Int32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseUInt32(ReadOnlySpan<Char>)
View Source
Declaration
public abstract uint ParseUInt32(ReadOnlySpan<char> value)
Returns
System.UInt32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseUInt32(ReadOnlySpan<Char>, NumberStyles)
View Source
Declaration
public abstract uint ParseUInt32(ReadOnlySpan<char> value, NumberStyles style)
Returns
System.UInt32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
System.Globalization.NumberStyles | style |
ParseInt64(ReadOnlySpan<Char>)
View Source
Declaration
public abstract long ParseInt64(ReadOnlySpan<char> value)
Returns
System.Int64
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseUInt64(ReadOnlySpan<Char>)
View Source
Declaration
public abstract ulong ParseUInt64(ReadOnlySpan<char> value)
Returns
System.UInt64
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseGuid(ReadOnlySpan<Char>)
View Source
Declaration
public abstract Guid ParseGuid(ReadOnlySpan<char> value)
Returns
System.Guid
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ParseBase64(ReadOnlySpan<Char>)
View Source
Declaration
public abstract byte[] ParseBase64(ReadOnlySpan<char> value)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | value |
ToBase64(ReadOnlyMemory<Byte>)
View Source
Declaration
public abstract string ToBase64(ReadOnlyMemory<byte> value)
Returns
System.String
Parameters
Type | Name |
---|---|
ReadOnlyMemory<System.Byte> | value |
Write(Stream, ReadOnlyMemory<Char>)
View Source
Declaration
public abstract void Write(Stream stream, ReadOnlyMemory<char> value)
Parameters
Type | Name |
---|---|
System.IO.Stream | stream |
ReadOnlyMemory<System.Char> | value |
Write(Stream, ReadOnlyMemory<Byte>)
View Source
Declaration
public abstract void Write(Stream stream, ReadOnlyMemory<byte> value)
Parameters
Type | Name |
---|---|
System.IO.Stream | stream |
ReadOnlyMemory<System.Byte> | value |
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
Type | Name |
---|---|
System.IO.Stream | stream |
ReadOnlyMemory<System.Char> | value |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
System.IO.Stream | stream |
ReadOnlyMemory<System.Byte> | value |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
System.IO.Stream | stream |
ReadOnlySpan<System.Char> | value |
System.Threading.CancellationToken | token |
Deserialize(Stream, Type, DeserializeStringSpanDelegate)
View Source
Declaration
public abstract object Deserialize(Stream stream, Type type, DeserializeStringSpanDelegate deserializer)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.IO.Stream | stream |
System.Type | type |
ServiceStack.Text.Common.DeserializeStringSpanDelegate | deserializer |
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
Type | Name |
---|---|
System.IO.Stream | stream |
System.Type | type |
ServiceStack.Text.Common.DeserializeStringSpanDelegate | deserializer |
Append(StringBuilder, ReadOnlySpan<Char>)
View Source
Declaration
public abstract StringBuilder Append(StringBuilder sb, ReadOnlySpan<char> value)
Returns
System.Text.StringBuilder
Parameters
Type | Name |
---|---|
System.Text.StringBuilder | sb |
ReadOnlySpan<System.Char> | value |
GetUtf8CharCount(ReadOnlySpan<Byte>)
View Source
Declaration
public abstract int GetUtf8CharCount(ReadOnlySpan<byte> bytes)
Returns
System.Int32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Byte> | bytes |
GetUtf8ByteCount(ReadOnlySpan<Char>)
View Source
Declaration
public abstract int GetUtf8ByteCount(ReadOnlySpan<char> chars)
Returns
System.Int32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | chars |
ToUtf8(ReadOnlySpan<Char>)
View Source
Declaration
public abstract ReadOnlyMemory<byte> ToUtf8(ReadOnlySpan<char> source)
Returns
ReadOnlyMemory<System.Byte>
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | source |
FromUtf8(ReadOnlySpan<Byte>)
View Source
Declaration
public abstract ReadOnlyMemory<char> FromUtf8(ReadOnlySpan<byte> source)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Byte> | source |
ToUtf8(ReadOnlySpan<Char>, Span<Byte>)
View Source
Declaration
public abstract int ToUtf8(ReadOnlySpan<char> source, Span<byte> destination)
Returns
System.Int32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | source |
Span<System.Byte> | destination |
FromUtf8(ReadOnlySpan<Byte>, Span<Char>)
View Source
Declaration
public abstract int FromUtf8(ReadOnlySpan<byte> source, Span<char> destination)
Returns
System.Int32
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Byte> | source |
Span<System.Char> | destination |
ToUtf8Bytes(ReadOnlySpan<Char>)
View Source
Declaration
public abstract byte[] ToUtf8Bytes(ReadOnlySpan<char> source)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Char> | source |
FromUtf8Bytes(ReadOnlySpan<Byte>)
View Source
Declaration
public abstract string FromUtf8Bytes(ReadOnlySpan<byte> source)
Returns
System.String
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Byte> | source |
ToMemoryStream(ReadOnlySpan<Byte>)
View Source
Declaration
public abstract MemoryStream ToMemoryStream(ReadOnlySpan<byte> source)
Returns
System.IO.MemoryStream
Parameters
Type | Name |
---|---|
ReadOnlySpan<System.Byte> | source |