C# Class Summer.Batch.Infrastructure.Support.PropertiesConverter

Properties converter helper (NameValueCollection to String, and back).
Mostrar archivo Open project: SummerBatch/SummerBatch

Public Methods

Method Description
PropertiesToString ( NameValueCollection propertiesToParse ) : string

Convert NameValueCollection object to String. This is only necessary for compatibility with converting the String back to a NameValueCollection object. If an empty properties object is passed in, nempty string is returned, otherwise its string representation is returned.

StringToProperties ( string stringToParse ) : NameValueCollection

Parse a String to a NameValueCollection object. If string is null, an empty NameValueCollection object will be returned. The input String is a set of name=value pairs, delimited by either newline or comma (for brevity). If the input String contains a newline it is assumed that the separator is newline, otherwise comma.

Method Details

PropertiesToString() public static method

Convert NameValueCollection object to String. This is only necessary for compatibility with converting the String back to a NameValueCollection object. If an empty properties object is passed in, nempty string is returned, otherwise its string representation is returned.
 in case of I/O errors
public static PropertiesToString ( NameValueCollection propertiesToParse ) : string
propertiesToParse System.Collections.Specialized.NameValueCollection the NameValueCollection to load into
return string

StringToProperties() public static method

Parse a String to a NameValueCollection object. If string is null, an empty NameValueCollection object will be returned. The input String is a set of name=value pairs, delimited by either newline or comma (for brevity). If the input String contains a newline it is assumed that the separator is newline, otherwise comma.
 in case of I/O errors
public static StringToProperties ( string stringToParse ) : NameValueCollection
stringToParse string String to parse
return System.Collections.Specialized.NameValueCollection