Table of Contents

Class StringUtils

Namespace
Amazon.Runtime.Internal.Util
Assembly
AWSSDK.Core.dll

Utilities for converting objects to strings. Used by the marshaller classes.

public static class StringUtils
Inheritance
StringUtils
Inherited Members

Methods

FromBool(bool)

public static string FromBool(bool value)

Parameters

value bool

Returns

string

FromDateTime(DateTime)

[Obsolete("This method doesn't handle correctly non-UTC DateTimes. Use FromDateTimeToISO8601 instead.", false)]
public static string FromDateTime(DateTime value)

Parameters

value DateTime

Returns

string

FromDateTimeToISO8601(DateTime)

Converts a DateTime to ISO8601 formatted string.

public static string FromDateTimeToISO8601(DateTime value)

Parameters

value DateTime

Returns

string

FromDateTimeToRFC822(DateTime)

Converts a DateTime to RFC822 formatted string.

public static string FromDateTimeToRFC822(DateTime value)

Parameters

value DateTime

Returns

string

FromDateTimeToUnixTimestamp(DateTime)

Converts a DateTime to Unix epoch time formatted string.

public static string FromDateTimeToUnixTimestamp(DateTime value)

Parameters

value DateTime

Returns

string

FromDecimal(decimal)

public static string FromDecimal(decimal value)

Parameters

value decimal

Returns

string

FromDouble(double)

public static string FromDouble(double value)

Parameters

value double

Returns

string

FromFloat(float)

public static string FromFloat(float value)

Parameters

value float

Returns

string

FromInt(int)

public static string FromInt(int value)

Parameters

value int

Returns

string

FromInt(int?)

public static string FromInt(int? value)

Parameters

value int?

Returns

string

FromList(IEnumerable<Enum>)

Combines a list of enums into a comma-separated string to be marshalled as a header

public static string FromList(IEnumerable<Enum> values)

Parameters

values IEnumerable<Enum>

List of enums

Returns

string

Header value representing the list of enums

FromList(IEnumerable<string>)

Combines a list of strings into a comma-separated string to be marshalled as a header

public static string FromList(IEnumerable<string> values)

Parameters

values IEnumerable<string>

List of strings

Returns

string

Header value representing the list of strings

FromList(List<Enum>)

Combines a list of enums into a comma-separated string to be marshalled as a header

public static string FromList(List<Enum> values)

Parameters

values List<Enum>

List of enums

Returns

string

Header value representing the list of enums

FromList<T>(IEnumerable<T>)

Combines an enumerable of ConstantClass enums into a comma-separated string to be marshalled as a header

public static string FromList<T>(IEnumerable<T> values) where T : ConstantClass

Parameters

values IEnumerable<T>

List of enums

Returns

string

Header value representing the list of enums

Type Parameters

T

FromList<T>(List<T>)

Combines a list of ConstantClass enums into a comma-separated string to be marshalled as a header

public static string FromList<T>(List<T> values) where T : ConstantClass

Parameters

values List<T>

List of enums

Returns

string

Header value representing the list of enums

Type Parameters

T

FromLong(long)

public static string FromLong(long value)

Parameters

value long

Returns

string

FromMemoryStream(MemoryStream)

public static string FromMemoryStream(MemoryStream value)

Parameters

value MemoryStream

Returns

string

FromString(ConstantClass)

public static string FromString(ConstantClass value)

Parameters

value ConstantClass

Returns

string

FromString(string)

public static string FromString(string value)

Parameters

value string

Returns

string

FromStringWithSlashEncoding(string)

public static string FromStringWithSlashEncoding(string value)

Parameters

value string

Returns

string

Utf8ByteLength(string)

public static long Utf8ByteLength(string value)

Parameters

value string

Returns

long