public GetProperties ( ITypeDescriptorContext context, object value, |
||
context | ITypeDescriptorContext | |
value | object | |
attributes | ||
리턴 |
public static void DumpTo(this NativeMethods.MODULEENTRY32 module, StringBuilder builder, int tabCount) { var converter = new ModuleEntryConverter(); converter.GetProperties(module) .Cast<PropertyDescriptor>() .OrderBy(pd => pd.Name) .Select(pd => new { Name = pd.Name, Value = pd.GetValue(module).ToString() }) .Aggregate((acc, pair) => { builder.AppendFormattedLine(tabCount, "{0} = {1}", pair.Name, pair.Value); return pair; }); }
public static void DumpTo(this NativeMethods.MODULEENTRY32 module, StringBuilder builder, int tabCount) { var converter = new ModuleEntryConverter(); converter.GetProperties(module) .Cast <PropertyDescriptor>() .OrderBy(pd => pd.Name) .Select(pd => new { Name = pd.Name, Value = pd.GetValue(module).ToString() }) .Aggregate((acc, pair) => { builder.AppendFormattedLine(tabCount, "{0} = {1}", pair.Name, pair.Value); return(pair); }); }