C# Class Microsoft.Samples.Synchronization.ClientServices.Formatters.FormatterUtilities

Show file Open project: rafek/SyncFx Class Usage Examples

Public Methods

Method Description
ConvertDateTimeForType_Atom ( object objValue, Type type ) : object

Looks at passed in Type and calls the appropriate Date functions for Atom

ConvertDateTimeToAtom ( System.DateTime date ) : string

Converts DateTime to OData Atom format as specified in http://www.odata.org/developers/protocols/atom-format#PrimitiveTypes for DateTime Format is"yyyy-MM-ddThh:mm:ss.fffffff" DateTime to convert

ConvertTimeToAtom ( System.TimeSpan t ) : string

Converts a TimeSpan to OData atom format as specified in http://www.odata.org/developers/protocols/atom-format#PrimitiveTypes for Time Actual lexical representation is time'hh:mm:ss.fffffff'

GetEdmType ( Type type ) : string

Private Methods

Method Description
ParseAtomString ( string value, Type type ) : object
ParseDateTimeFromString ( string value, Type type ) : object

Method Details

ConvertDateTimeForType_Atom() public static method

Looks at passed in Type and calls the appropriate Date functions for Atom
public static ConvertDateTimeForType_Atom ( object objValue, Type type ) : object
objValue object Actual value
type System.Type Type coverting from
return object

ConvertDateTimeToAtom() public static method

Converts DateTime to OData Atom format as specified in http://www.odata.org/developers/protocols/atom-format#PrimitiveTypes for DateTime Format is"yyyy-MM-ddThh:mm:ss.fffffff" DateTime to convert
public static ConvertDateTimeToAtom ( System.DateTime date ) : string
date System.DateTime
return string

ConvertTimeToAtom() public static method

Converts a TimeSpan to OData atom format as specified in http://www.odata.org/developers/protocols/atom-format#PrimitiveTypes for Time Actual lexical representation is time'hh:mm:ss.fffffff'
public static ConvertTimeToAtom ( System.TimeSpan t ) : string
t System.TimeSpan Timespan to convert
return string

GetEdmType() public static method

public static GetEdmType ( Type type ) : string
type System.Type
return string