private static void AddPostLoadInstrinsics(TypeInfoDataBase db)
        {
            FormatShapeSelectionOnType shapeSelectionOnType = new FormatShapeSelectionOnType();

            shapeSelectionOnType.appliesTo = new AppliesTo();
            shapeSelectionOnType.appliesTo.AddAppliesToType("Microsoft.PowerShell.Commands.FormatDataLoadingInfo");
            shapeSelectionOnType.formatShape = FormatShape.List;
            db.defaultSettingsSection.shapeSelectionDirectives.formatShapeSelectionOnTypeList.Add(shapeSelectionOnType);
        }
Example #2
0
        /// <summary>
        /// helper to to add any post-load intrinsics to the db
        /// </summary>
        /// <param name="db">db being initialized</param>
        private static void AddPostLoadIntrinsics(TypeInfoDataBase db)
        {
            // add entry for the output of update-formatdata
            // we want to be able to display this as a list, unless overridden
            // by an entry loaded from file
            FormatShapeSelectionOnType sel = new FormatShapeSelectionOnType();

            sel.appliesTo = new AppliesTo();
            sel.appliesTo.AddAppliesToType("Microsoft.PowerShell.Commands.FormatDataLoadingInfo");
            sel.formatShape = FormatShape.List;

            db.defaultSettingsSection.shapeSelectionDirectives.formatShapeSelectionOnTypeList.Add(sel);
        }
Example #3
0
 private static void AddPostLoadInstrinsics(TypeInfoDataBase db)
 {
     FormatShapeSelectionOnType item = new FormatShapeSelectionOnType {
         appliesTo = new AppliesTo()
     };
     item.appliesTo.AddAppliesToType("Microsoft.PowerShell.Commands.FormatDataLoadingInfo");
     item.formatShape = FormatShape.List;
     db.defaultSettingsSection.shapeSelectionDirectives.formatShapeSelectionOnTypeList.Add(item);
 }
Example #4
0
        /// <summary>
        /// helper to to add any post-load intrinsics to the db
        /// </summary>
        /// <param name="db">db being initialized</param>
        private static void AddPostLoadInstrinsics(TypeInfoDataBase db)
        {
            // add entry for the output of update-formatdata
            // we want to be able to display this as a list, unless overridden
            // by an entry loaded from file
            FormatShapeSelectionOnType sel = new FormatShapeSelectionOnType();
            sel.appliesTo = new AppliesTo();
            sel.appliesTo.AddAppliesToType("Microsoft.PowerShell.Commands.FormatDataLoadingInfo");
            sel.formatShape = FormatShape.List;

            db.defaultSettingsSection.shapeSelectionDirectives.formatShapeSelectionOnTypeList.Add(sel);
        }