using System; using System.Collections.Generic; using System.Web.Optimization; using EnVisage.Code; namespace EnVisage { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { ClearDefaultOrdering(bundles); CreateLayoutStyleBundles(bundles); CreateFunctionalStyleBundles(bundles); CreateCustomPagesStyleBundles(bundles); CreateLayoutScriptBundles(bundles); CreateFunctionalScriptBundles(bundles); CreateCustomPageScriptBundles(bundles); BundleTable.EnableOptimizations = AppSettingsManager.UseScriptsBundling; } private static void ClearDefaultOrdering(BundleCollection bundles) { bundles.FileSetOrderList.Clear(); } private static void CreateLayoutStyleBundles(BundleCollection bundles) { // Common styles to be included to Layout page string bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-commonstyles"); var bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/bootstrap.min.css", "~/Content/styles/pixel-admin.css", "~/Content/styles/widgets.min.css", "~/Content/styles/themes.css", "~/Content/styles/Site.css", "~/Content/styles/xeditable.css", "~/Content/styles/select.css", "~/Content/styles/bootstrap-modal-bs3patch.css", "~/Content/styles/bootstrap-modal.css"); bundles.Add(bundle); // Styles for error pages and other standard pages with no layout attached bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-standardpagestyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/pages.min.css"); bundle.Transforms.Clear(); bundles.Add(bundle); // Testing site special appearance bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-uatstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/uatoverrideStyle.css"); bundles.Add(bundle); } private static void CreateFunctionalStyleBundles(BundleCollection bundles) { // Styles for Kendo controls var bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_KENDO_PATH, "kendo-commonstyles"); var bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/kendo/kendo.common-bootstrap.css", "~/Content/styles/kendo/kendo.bootstrap.css"); bundles.Add(bundle); // Styles for Activity Calendar bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-acstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/activity-calendar.css"); bundles.Add(bundle); // Styles for Skills Matrix bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-skillmatrixstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/skills-grid.css"); bundles.Add(bundle); // Styles for Permissions Tree bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-permissiontreestyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/jquery.treegrid.css"); bundles.Add(bundle); // Styles for Workflow lists bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-wfstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/workflowLists.css"); bundles.Add(bundle); // Styles for Reporting (Kendo UI) bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_KENDO_PATH, "kendo-reportstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/kendo/kendo.common.css", "~/Content/styles/kendo/kendo.blueopal.min.css"); bundles.Add(bundle); } private static void CreateCustomPagesStyleBundles(BundleCollection bundles) { // Styles for Dashboard page var bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-dashboardstyles"); var bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/magnifyChart.css", "~/Content/styles/pv.amCharts.css"); bundles.Add(bundle); // Styles for RMO page bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-rmostyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/angular-dnd.css", "~/Content/styles/mix-grid.css", "~/Content/styles/magnifyChart.css"); bundles.Add(bundle); // Styles for Project Edit page bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-projecteditstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/fileuploads.css", "~/Content/styles/magnifyChart.css", "~/Content/styles/scenarioComparer.css", "~/Content/styles/kendo-overrides-links.css" ); bundles.Add(bundle); // Styles for Scenario Details page bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-scenariodetailsstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/angular-dnd.css"); bundles.Add(bundle); // Styles for account management pages bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-accountstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/pages.min.css"); bundle.Transforms.Clear(); bundles.Add(bundle); // Styles for Workflow Designer Page bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-wfdesignerstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/workflowdesigner.css", "~/Content/styles/jquery-ui.css"); bundles.Add(bundle); // Styles for New Reporing Pages bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-reportstyles"); bundle = new StyleBundle(bundlePath).NonOrdering().Include( "~/Content/styles/reporting.css"); bundles.Add(bundle); } private static void CreateLayoutScriptBundles(BundleCollection bundles) { string bundlePath; Bundle bundle = null; // Common core scripts. Already minified. For using in pages with no layout attached bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "platform-pixeladmin"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/bootstrap.min.js", "~/Scripts/pixel-admin.min.js", "~/Scripts/jquery.validate.min.js", "~/Scripts/jquery.validate.unobtrusive.min.js", "~/Scripts/jquery.unobtrusive-ajax.min.js"); bundle.Transforms.Clear(); bundles.Add(bundle); // Core scripts and common jquery & angular plugins bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "platform-coremodules"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/jquery.cookie.min.js", "~/Scripts/jquery.storageapi.min.js", "~/Scripts/jquery.blockUI.min.js", "~/Scripts/URIjs.min.js", "~/Scripts/bootstrap-modalmanager.js", "~/Scripts/bootstrap-modal.js", AppSettingsManager.UseScriptsBundling ? "~/Scripts/Angular/angular.min.js" : "~/Scripts/Angular/angular.js", "~/Scripts/Angular/angular-route.min.js", "~/Scripts/Angular/angular-dnd.min.js", "~/Scripts/Angular/xeditable.min.js", "~/Scripts/Angular/select.min.js" ); bundles.Add(bundle); // Prevu custom components and scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-common"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/jquery.collapsiblepanel.js", "~/Scripts/jquery.dataTables.columnFilter.js", "~/Scripts/dataTables.colReorder.js", "~/Scripts/main.js", "~/Scripts/stateManagement.js", "~/Scripts/ContentLocker.js", "~/Scripts/Views/Views/views.js", "~/Scripts/CustomValidation.js", "~/Scripts/Plugins/ModalDialogForm.js", "~/Scripts/Plugins/ButtonLocker.js", "~/Scripts/Plugins/PageState.js", "~/Scripts/Plugins/resolveForm.js", "~/Scripts/Plugins/DatePickerRange.js", "~/Scripts/Plugins/NonProjectTimeGrid.js", "~/Scripts/Plugins/uploadFile.js", "~/Scripts/Angular/Types/GridHeader.js", "~/Scripts/Angular/uiDirectives.js"); bundles.Add(bundle); // Angular app and common controllers bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "angular-common"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Angular/app-common.js", "~/Scripts/Angular/Controllers/notificationController.js" ); bundles.Add(bundle); } private static void CreateFunctionalScriptBundles(BundleCollection bundles) { string bundlePath; Bundle bundle = null; // Kendo Grid bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "kendo-grid"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Kendo/jszip.js", "~/Scripts/Kendo/kendo.core.js", "~/Scripts/Kendo/kendo.data.js", "~/Scripts/Kendo/kendo.binder.js", "~/Scripts/kendo/kendo.fx.js", "~/Scripts/Kendo/kendo.tooltip.js", "~/Scripts/Kendo/kendo.columnsorter.js", "~/Scripts/Kendo/kendo.reorderable.js", "~/Scripts/Kendo/kendo.userevents.js", "~/Scripts/Kendo/kendo.selectable.js", "~/Scripts/Kendo/kendo.popup.js", "~/Scripts/Kendo/kendo.filtermenu.js", "~/Scripts/Kendo/kendo.list.js", "~/Scripts/Kendo/kendo.dropdownlist.js", "~/Scripts/Kendo/kendo.draganddrop.js", "~/Scripts/Kendo/kendo.groupable.js", "~/Scripts/Kendo/kendo.pager.js", "~/Scripts/Kendo/kendo.resizable.js", "~/Scripts/Kendo/kendo.ooxml.js", "~/Scripts/Kendo/kendo.excel.js", "~/Scripts/Kendo/kendo.color.js", "~/Scripts/Kendo/kendo.drawing.js", "~/Scripts/Kendo/kendo.pdf.js", "~/Scripts/Kendo/kendo.progressbar.js", "~/Scripts/Kendo/kendo.grid.js", "~/Scripts/Kendo/kendo.aspnetmvc.js" ); bundles.Add(bundle); bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "kendo-reporting"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Kendo/jszip.js", "~/Scripts/Kendo/kendo.core.js", "~/Scripts/Kendo/kendo.data.js", "~/Scripts/Kendo/kendo.draganddrop.js", "~/Scripts/kendo/kendo.fx.js", "~/Scripts/Kendo/kendo.tooltip.js", "~/Scripts/Kendo/kendo.calendar.js", "~/Scripts/Kendo/kendo.menu.js", "~/Scripts/Kendo/kendo.panelbar.js", "~/Scripts/Kendo/kendo.treeview.js", "~/Scripts/Kendo/kendo.popup.js", "~/Scripts/Kendo/kendo.userevents.js", "~/Scripts/Kendo/kendo.selectable.js", "~/Scripts/Kendo/kendo.touch.js", "~/Scripts/Kendo/kendo.validator.js", "~/Scripts/Kendo/kendo.list.js", "~/Scripts/Kendo/kendo.autocomplete.js", "~/Scripts/Kendo/kendo.button.js", "~/Scripts/Kendo/kendo.datepicker.js", "~/Scripts/Kendo/kendo.timepicker.js", "~/Scripts/Kendo/kendo.datetimepicker.js", "~/Scripts/Kendo/kendo.listview.js", "~/Scripts/Kendo/kendo.dropdownlist.js", "~/Scripts/Kendo/kendo.combobox.js", "~/Scripts/Kendo/kendo.numerictextbox.js", "~/Scripts/Kendo/kendo.multiselect.js", "~/Scripts/Kendo/kendo.maskedtextbox.js", "~/Scripts/Kendo/kendo.editor.js", "~/Scripts/Kendo/kendo.slider.js", "~/Scripts/Kendo/kendo.colorpicker.js", "~/Scripts/ReportViewer/telerikReportViewer-10.0.16.113.min.js" ); bundles.Add(bundle); // Angular commonly used services by Prevu bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-angularservices"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Angular/enVisageServices.js" ); bundles.Add(bundle); // Activity calendar scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-activitycalendar"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Plugins/PopupMenu.js", "~/Scripts/Plugins/scenarioStatusToggle.js", "~/Scripts/Plugins/ActivityCalendarGrid.js", "~/Scripts/Angular/app-full.js", "~/Scripts/Angular/activityCalendarUiServices.js", "~/Scripts/Angular/Controllers/teamInfoController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/capacityManagementController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/activityCalendarController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/activityCalendarByResController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/activityCalendarByTeamController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/activityCalendarByCompanyController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/activityCalendarByClientController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/activityCalendarByCostCenterController.js" ); bundles.Add(bundle); // Supply Demand Report scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-supplydemandreport"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Plugins/PopupMenu.js", "~/Scripts/Plugins/ActivityCalendarGrid.js", "~/Scripts/Angular/activityCalendarUiServices.js", "~/Scripts/Angular/app-full.js", "~/Scripts/Angular/Controllers/teamInfoController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/supplyDemandReportController.js", "~/Scripts/Angular/Controllers/ActivityCalendarControllers/supplyDemandCalendarController.js" ); bundles.Add(bundle); // Scenario Details scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-scenariodetails"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Plugins/ScenarioDetailsGrid.js", "~/Scripts/Plugins/ScenarioDependencyInformer.js", "~/Scripts/Angular/app-full.js", "~/Scripts/Angular/Controllers/scenarioHeaderController.js", "~/Scripts/Angular/Controllers/scenarioDetailController.js", "~/Scripts/Angular/Controllers/scenarioBottomUpController.js", "~/Scripts/Angular/Controllers/costSavingController.js", "~/Scripts/Angular/Controllers/noteController.js", "~/Scripts/Angular/Controllers/slidersGroupController.js" ); bundles.Add(bundle); // Skills Matrix scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-skillsmatrix"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Angular/app-full.js", "~/Scripts/Angular/Controllers/SkillsControllers/skillsMatrixController.js", "~/Scripts/Angular/Controllers/SkillsControllers/skillsEditController.js" ); bundles.Add(bundle); bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-permissiontree"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/jquery.treegrid.js", "~/Scripts/jquery.treegrid.bootstrap3.js", "~/Scripts/ProjectTree.js", "~/Scripts/permissions.js" ); bundles.Add(bundle); // Flot graph scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "flot-scripts"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/jquery.flot.time.js", "~/Scripts/jquery.flot.stack.js", "~/Scripts/jquery.flot.tickrotor.js", "~/Scripts/jquery.flot.resize.js", "~/Scripts/jquery.flot.axislabels.js", "~/Scripts/jquery.flot.tooltip.js" ); bundles.Add(bundle); // AmChart scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "amcharts-scripts"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/amCharts/amCharts.js", "~/Scripts/amCharts/pie.js", "~/Scripts/amCharts/serial.js", "~/Scripts/amCharts/xy.js", "~/Scripts/amCharts/themes/light.js", "~/Scripts/amCharts/plugins/responsive/responsive.js", "~/Scripts/amCharts/custom.js" ); bundles.Add(bundle); } private static void CreateCustomPageScriptBundles(BundleCollection bundles) { string bundlePath; Bundle bundle = null; // Team & View borad pages bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-tvboardpage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Plugins/TeamResourcesBrowser.js", "~/Scripts/forecastDashboardScripts.js"); bundles.Add(bundle); // Import Actuals page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-importactualspage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/sliders.js"); bundles.Add(bundle); // Dashboard page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-dashboardpage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Dashboard/pv.app.init.js", "~/Scripts/Dashboard/pv.storage.js", "~/Scripts/Dashboard/pv.chart.app.js", "~/Scripts/Dashboard/pv.chart.stacked.js", "~/Scripts/Dashboard/pv.chart.bubble.js", "~/Scripts/Dashboard/pv.chart.bar1.js", "~/Scripts/Dashboard/pv.chart.bar2.js", "~/Scripts/Dashboard/pv.chart.bar3.js", "~/Scripts/magnifyChart.js", "~/Scripts/Plugins/Optimuse.js", "~/Scripts/Plugins/DonutChart.js", "~/Scripts/forecastDashboardScripts.js", "~/Scripts/Plugins/scenarioStatusToggle.js", "~/Scripts/Plugins/projectDependency.js" // ? Is it realy needed in Dashboard ); bundles.Add(bundle); // Project Edit page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-projecteditpage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/jquery.query-object.js", "~/Scripts/kendo/kendo.fx.js", "~/Scripts/kendo/kendo.window.js", "~/Scripts/kendo/kendo.editable.js", "~/Scripts/Kendo/kendo.validator.js", "~/Scripts/FileUploads/jquery.ui.widget.js", "~/Scripts/FileUploads/jquery.iframe-transport.js", "~/Scripts/FileUploads/jquery.fileupload.js", "~/Scripts/calendarMethods.js", "~/Scripts/magnifyChart.js", "~/Scripts/Plugins/scenarioStatusToggle.js", "~/Scripts/Plugins/projectDependency.js", "~/Scripts/Plugins/ScenarioComparer.js", "~/Scripts/Plugins/UploadFile.js", "~/Scripts/Angular/Controllers/masterScenarioCalendarController.js"); bundles.Add(bundle); // Project List page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-projectlistpage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Plugins/scenarioStatusToggle.js"); bundles.Add(bundle); // RMO page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-rmopage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/html2canvas.js", "~/Scripts/jspdf.min.js", "~/Scripts/magnifyChart.js", // Is it really needed here? "~/Scripts/Plugins/CapacityPlanning.js", "~/Scripts/Angular/Controllers/teamInfoController.js", "~/Scripts/Angular/Controllers/MixControllers/mixHeaderController.js", "~/Scripts/Angular/Controllers/MixControllers/mixProjectController.js"); bundles.Add(bundle); // People Resource Details page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-resourcepage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/Angular/Controllers/ActivityCalendarControllers/resourceCalendarController.js" ); bundles.Add(bundle); // People Resource Details page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-profilepage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/jquery.query-object.js", "~/Scripts/Plugins/underOverSlider.js"); bundles.Add(bundle); // Workflow designer page scripts bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-wfdesignerpage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/workflowdesigner.min.js", "~/Scripts/ace.js", "~/Scripts/json5.js", "~/Scripts/jquery-ui.min.js", "~/Scripts/kinetic-v5.1.0.min.js" ); bundles.Add(bundle); // Report pages scripts (New) bundlePath = String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-reportpage"); bundle = new ScriptBundle(bundlePath).NonOrdering().Include( "~/Scripts/ReportViewer/reporting.js" ); bundles.Add(bundle); } } class NonOrderingBundleOrderer : IBundleOrderer { public IEnumerable OrderFiles(BundleContext context, IEnumerable files) { return files; } } static class BundleExtentions { public static Bundle NonOrdering(this Bundle bundle) { bundle.Orderer = new NonOrderingBundleOrderer(); return bundle; } } }