C# Класс Microsoft.Synchronization.Services.Formatters.ReflectionUtility

Class that will use .NET Reflection to serialize and deserialize an Entity to Atom/JSON
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClearCache ( ) : void
GetObjectForType ( Microsoft.Synchronization.Services.Formatters.EntryInfoWrapper wrapper, Type knownTypes ) : IOfflineEntity
GetPrimaryKeyString ( IOfflineEntity live ) : string

Build the OData Atom primary keystring representation

GetPrimaryKeysPropertyInfoMapping ( Type type ) : System.Reflection.PropertyInfo[]

Get the PropertyInfo array for all Key fields

GetPropertyInfoMapping ( Type type ) : System.Reflection.PropertyInfo[]
SetDataTablePrimaryKeys ( DataTable table, Type type, string>.Dictionary mappingInfo ) : void

Reflects the Type to figure out which is the primary key for the DataTable

Приватные методы

Метод Описание
GetValueFromType ( Type type, string value ) : object

Описание методов

ClearCache() публичный статический Метод

public static ClearCache ( ) : void
Результат void

GetObjectForType() публичный статический Метод

public static GetObjectForType ( Microsoft.Synchronization.Services.Formatters.EntryInfoWrapper wrapper, Type knownTypes ) : IOfflineEntity
wrapper Microsoft.Synchronization.Services.Formatters.EntryInfoWrapper
knownTypes System.Type
Результат IOfflineEntity

GetPrimaryKeyString() публичный статический Метод

Build the OData Atom primary keystring representation
public static GetPrimaryKeyString ( IOfflineEntity live ) : string
live IOfflineEntity Entity for which primary key is required
Результат string

GetPrimaryKeysPropertyInfoMapping() публичный статический Метод

Get the PropertyInfo array for all Key fields
public static GetPrimaryKeysPropertyInfoMapping ( Type type ) : System.Reflection.PropertyInfo[]
type System.Type Type to reflect on
Результат System.Reflection.PropertyInfo[]

GetPropertyInfoMapping() публичный статический Метод

public static GetPropertyInfoMapping ( Type type ) : System.Reflection.PropertyInfo[]
type System.Type
Результат System.Reflection.PropertyInfo[]

SetDataTablePrimaryKeys() публичный статический Метод

Reflects the Type to figure out which is the primary key for the DataTable
public static SetDataTablePrimaryKeys ( DataTable table, Type type, string>.Dictionary mappingInfo ) : void
table DataTable Table to set primary keys on
type System.Type Type to reflect
mappingInfo string>.Dictionary Global to Local column name mappings
Результат void