public IEnumerable <ISettingsPropertyDefinition> GetProperties(object @object) =>
 ((IEnumerable <object>)(GetPropertiesMethod?.Invoke(Object, new [] { @object }) ?? new List <object>()))
 .Select(o => new SettingsPropertyDefinitionWrapper(o));
Ejemplo n.º 2
0
 /// <summary>
 /// format the serialization of the specified object
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="source">object sour to serialized</param>
 /// <param name="format">output format</param>
 /// <returns>string of the format with the source propertie's serialized</returns>
 public static Dictionary <string, object> GetDictionnaryProperties(this object source, bool ignoreCase = true)
 {
     System.Diagnostics.Contracts.Contract.Requires(!object.Equals(source, null), "null reference exception 'source'");
     return(GetPropertiesMethod(source.GetType(), ignoreCase)(source));
 }