GetProperties() public method

public GetProperties ( ITypeDescriptorContext context, object value, Attribute attributes ) : PropertyDescriptorCollection
context ITypeDescriptorContext
value object
attributes System.Attribute
return System.ComponentModel.PropertyDescriptorCollection
コード例 #1
0
ファイル: helpers.cs プロジェクト: odalet/Hawkeye2
 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;
         });
 }
コード例 #2
0
ファイル: helpers.cs プロジェクト: vnvizitiu/Hawkeye2
        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);
            });
        }