Class StringUtils
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
valuebool
Returns
FromDateTime(DateTime)
[Obsolete("This method doesn't handle correctly non-UTC DateTimes. Use FromDateTimeToISO8601 instead.", false)]
public static string FromDateTime(DateTime value)
  Parameters
valueDateTime
Returns
FromDateTimeToISO8601(DateTime)
Converts a DateTime to ISO8601 formatted string.
public static string FromDateTimeToISO8601(DateTime value)
  Parameters
valueDateTime
Returns
FromDateTimeToRFC822(DateTime)
Converts a DateTime to RFC822 formatted string.
public static string FromDateTimeToRFC822(DateTime value)
  Parameters
valueDateTime
Returns
FromDateTimeToUnixTimestamp(DateTime)
Converts a DateTime to Unix epoch time formatted string.
public static string FromDateTimeToUnixTimestamp(DateTime value)
  Parameters
valueDateTime
Returns
FromDecimal(decimal)
public static string FromDecimal(decimal value)
  Parameters
valuedecimal
Returns
FromDouble(double)
public static string FromDouble(double value)
  Parameters
valuedouble
Returns
FromFloat(float)
public static string FromFloat(float value)
  Parameters
valuefloat
Returns
FromInt(int)
public static string FromInt(int value)
  Parameters
valueint
Returns
FromInt(int?)
public static string FromInt(int? value)
  Parameters
valueint?
Returns
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
valuesIEnumerable<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
valuesIEnumerable<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
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
valuesIEnumerable<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
valuesList<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
valuelong
Returns
FromMemoryStream(MemoryStream)
public static string FromMemoryStream(MemoryStream value)
  Parameters
valueMemoryStream
Returns
FromString(ConstantClass)
public static string FromString(ConstantClass value)
  Parameters
valueConstantClass
Returns
FromString(string)
public static string FromString(string value)
  Parameters
valuestring
Returns
FromStringWithSlashEncoding(string)
public static string FromStringWithSlashEncoding(string value)
  Parameters
valuestring
Returns
Utf8ByteLength(string)
public static long Utf8ByteLength(string value)
  Parameters
valuestring