diff --git a/build/runbuild.ps1 b/build/runbuild.ps1 index d9639820..cc6b5085 100644 --- a/build/runbuild.ps1 +++ b/build/runbuild.ps1 @@ -78,7 +78,7 @@ task NuGet -depends Compile -description "This tasks makes creates the NuGet pac Create-MvcSiteMapProvider-Web-Package - Create-DIContainer-Packages ("Autofac", "Ninject", "SimpleInjector", "StructureMap", "Unity", "Windsor") + Create-DIContainer-Packages ("Autofac", "Grace", "Ninject", "SimpleInjector", "StructureMap", "Unity", "Windsor") } task Finalize -depends NuGet -description "This tasks finalizes the build" { @@ -262,17 +262,25 @@ function Create-DIContainer-Packages ([string[]] $di_containers) { Write-Host $di_container -ForegroundColor Yellow #exception: SimpleInjector version 2 doesn't support .NET 3.5 - if ($di_container -ne "SimpleInjector") { + if ($di_container -ne "SimpleInjector" -and $di_container -ne "Grace") { Create-DIContainer-Package $di_container ("net35", "net40", "net45") -mvc_version "2" Create-DIContainer-Modules-Package $di_container ("net35", "net40", "net45") -mvc_version "2" } - Create-DIContainer-Package $di_container ("net40", "net45") -mvc_version "3" - Create-DIContainer-Modules-Package $di_container ("net40", "net45") -mvc_version "3" + if ($di_container -ne "Grace") { + Create-DIContainer-Package $di_container ("net40", "net45") -mvc_version "3" + Create-DIContainer-Modules-Package $di_container ("net40", "net45") -mvc_version "3" + + Create-DIContainer-Package $di_container ("net40", "net45") -mvc_version "4" + Create-DIContainer-Modules-Package $di_container ("net40", "net45") -mvc_version "4" + } else { + Create-DIContainer-Package $di_container ("net45") -mvc_version "3" + Create-DIContainer-Modules-Package $di_container ("net45") -mvc_version "3" + + Create-DIContainer-Package $di_container ("net45") -mvc_version "4" + Create-DIContainer-Modules-Package $di_container ("net45") -mvc_version "4" + } - Create-DIContainer-Package $di_container ("net40", "net45") -mvc_version "4" - Create-DIContainer-Modules-Package $di_container ("net40", "net45") -mvc_version "4" - Create-DIContainer-Package $di_container ("net45") -mvc_version "5" Create-DIContainer-Modules-Package $di_container ("net45") -mvc_version "5" } diff --git a/nuget/mvcsitemapprovider.di.modules/MvcSiteMapProvider.DI.Grace.Modules.nutrans b/nuget/mvcsitemapprovider.di.modules/MvcSiteMapProvider.DI.Grace.Modules.nutrans new file mode 100644 index 00000000..bf909005 --- /dev/null +++ b/nuget/mvcsitemapprovider.di.modules/MvcSiteMapProvider.DI.Grace.Modules.nutrans @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/App_Start/CompositionRoot.cs b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/App_Start/CompositionRoot.cs new file mode 100644 index 00000000..a22400e3 --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/App_Start/CompositionRoot.cs @@ -0,0 +1,23 @@ +using System; +using DI; +using DI.Grace; +using DI.Grace.Modules; + +internal class CompositionRoot +{ + public static IDependencyInjectionContainer Compose() + { + // Create new container + var container = new Grace.DependencyInjection.DependencyInjectionContainer(); + + // Install MVC sitemap provider + container.Configure(new MvcSiteMapProviderModule()); + + // Install Controllers + container.Configure(new MvcModule()); + + // Add your DI configuration here + + return new GraceDependencyInjectionContainer(container.RootScope); + } +} diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/GraceDependencyInjectionContainer.cs b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/GraceDependencyInjectionContainer.cs new file mode 100644 index 00000000..4426c5ce --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/GraceDependencyInjectionContainer.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Grace.DependencyInjection; + +namespace DI.Grace +{ + internal class GraceDependencyInjectionContainer + : IDependencyInjectionContainer + { + public GraceDependencyInjectionContainer(IExportLocator container) + { + if (container == null) + throw new ArgumentNullException("container"); + + this.container = container; + } + private readonly IExportLocator container; + + public object GetInstance(Type type) + { + return container.Locate(type); + } + + public object TryGetInstance(Type type) + { + try + { + return container.Locate(type); + } + catch + { + return null; + } + } + + public IEnumerable GetAllInstances(Type type) + { + return container.LocateAll(type); + } + + public void Release(object instance) + { + // Ddo nothing + } + } +} diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcModule.cs b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcModule.cs new file mode 100644 index 00000000..d29f2e3e --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcModule.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Mvc; +using Grace.DependencyInjection; + +namespace DI.Grace.Modules +{ + public class MvcModule : IConfigurationModule + { + public void Configure(IExportRegistrationBlock registrationBlock) + { + + registrationBlock.Export(AllTypes()) + .BasedOn() + .ByType() + .ExternallyOwned(); + } + + private IEnumerable AllTypes() + { + return GetType().Assembly.ExportedTypes; + } + } +} diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcSiteMapProviderModule.cs b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcSiteMapProviderModule.cs new file mode 100644 index 00000000..93de75a3 --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcSiteMapProviderModule.cs @@ -0,0 +1,197 @@ +using System; +using System.Collections.Generic; +using System.Web.Mvc; +using System.Web.Hosting; +using System.Reflection; +using Grace.DependencyInjection; +using Microsoft.SqlServer.Server; +using MvcSiteMapProvider; +using MvcSiteMapProvider.Builder; +using MvcSiteMapProvider.Caching; +using MvcSiteMapProvider.Security; +using MvcSiteMapProvider.Visitor; +using MvcSiteMapProvider.Web.Compilation; +using MvcSiteMapProvider.Web.Mvc; +using MvcSiteMapProvider.Web.UrlResolver; +using MvcSiteMapProvider.Xml; + +namespace DI.Grace.Modules +{ + public class MvcSiteMapProviderModule : IConfigurationModule + { + public void Configure(IExportRegistrationBlock container) + { + bool enableLocalization = true; + string absoluteFileName = HostingEnvironment.MapPath("~/Mvc.sitemap"); + TimeSpan absoluteCacheExpiration = TimeSpan.FromMinutes(5); + TimeSpan slidingCacheExpiration = TimeSpan.MinValue; + bool includeRootNode = true; + bool useNestedDynamicNodeRecursion = false; + bool visibilityAffectsDescendants = true; + bool useTitleIfDescriptionNotProvided = true; + +#if Demo + // Settings for MvcMusicStore demo: don't copy into your project + bool securityTrimmingEnabled = true; + string[] includeAssembliesForScan = new string[] { "Mvc Music Store" }; +#else + bool securityTrimmingEnabled = false; + string[] includeAssembliesForScan = new string[] { "$AssemblyName$" }; +#endif + + var currentAssembly = this.GetType().Assembly; + var siteMapProviderAssembly = typeof(SiteMaps).Assembly; + var allAssemblies = new Assembly[] { currentAssembly, siteMapProviderAssembly }; + var excludeTypes = new Type[] { + // Use this array to add types you wish to explicitly exclude from convention-based + // auto-registration. By default all types that either match I[TypeName] = [TypeName] or + // I[TypeName] = [TypeName]Adapter will be automatically wired up as long as they don't + // have the [ExcludeFromAutoRegistrationAttribute]. + // + // If you want to override a type that follows the convention, you should add the name + // of either the implementation name or the interface that it inherits to this list and + // add your manual registration code below. This will prevent duplicate registrations + // of the types from occurring. + + // Example: + // typeof(SiteMap), + // typeof(SiteMapNodeVisibilityProviderStrategy) + typeof(SiteMapNodeUrlResolver) + }; + + var multipleImplementationTypes = new Type[] { + typeof(ISiteMapNodeUrlResolver), + typeof(ISiteMapNodeVisibilityProvider), + typeof(IDynamicNodeProvider) + }; + + // Matching type name (I[TypeName] = [TypeName]) or matching type name + suffix Adapter (I[TypeName] = [TypeName]Adapter) + // and not decorated with the [ExcludeFromAutoRegistrationAttribute]. + CommonConventions.RegisterDefaultConventions( + (interfaceType, implementationType) => container.Export(implementationType).As(interfaceType).AndSingleton(), + new Assembly[] { siteMapProviderAssembly }, + allAssemblies, + excludeTypes, + string.Empty); + + // Multiple implementations of strategy based extension points (and not decorated with [ExcludeFromAutoRegistrationAttribute]). + CommonConventions.RegisterAllImplementationsOfInterface( + (interfaceType, implementationType) => container.Export(implementationType).As(interfaceType).AndSingleton(), + multipleImplementationTypes, + allAssemblies, + new Type[0], + string.Empty); + + // Registration of internal controllers + CommonConventions.RegisterAllImplementationsOfInterface( + (interfaceType, implementationType) => container.Export(implementationType).As(interfaceType), + new Type[] { typeof(IController) }, + new Assembly[] { siteMapProviderAssembly }, + new Type[0], + string.Empty); + + // Visibility Providers + container.Export() + .As() + .WithCtorParam(() => string.Empty).Named("defaultProviderName"); + + // Pass in the global controllerBuilder reference + container.ExportInstance((s, c) => ControllerBuilder.Current); + + container.Export().As(); + + // Configure attribute security + string attributeModuleKey = typeof(AuthorizeAttributeAclModule).Name; + container.Export() + .As() + .WithKey(attributeModuleKey); + + // Configure XML security + string xmlModuleKey = typeof(XmlRolesAclModule).Name; + container.Export() + .As() + .WithKey(xmlModuleKey); + + // Combine attribute and xml security + container.Export() + .As() + .WithCtorParam().Named("aclModules").LocateWithKey(new[] { attributeModuleKey, xmlModuleKey }); + + // Configure cache + container.ExportInstance( + (scope, context) => System.Runtime.Caching.MemoryCache.Default); + + container.Export(typeof(RuntimeCacheProvider<>)).As(typeof(ICacheProvider<>)); + + container.Export() + .As() + .WithKey("cacheDependency1") + .WithCtorParam(() => absoluteFileName); + + container.Export() + .As() + .WithKey("cacheDetails1") + .WithCtorParam().LocateWithKey("cacheDependency1") + .WithNamedCtorValue(() => absoluteCacheExpiration) + .WithNamedCtorValue(() => slidingCacheExpiration); + + // Configure the visitors + container.Export().As(); + + // Prepare for our node providers + container.Export() + .As() + .WithKey("xmlSource1") + .WithCtorParam(() => absoluteFileName); + + container.Export() + .As(); + + // Register the sitemap node providers + container.Export() + .As() + .WithKey("xmlSiteMapNodeProvider1") + .WithCtorParam().LocateWithKey("xmlSource1") + .WithNamedCtorValue(() => includeRootNode) + .WithNamedCtorValue(() => useNestedDynamicNodeRecursion); + + container.Export() + .As() + .WithKey("reflectionSiteMapNodeProvider1") + .WithCtorParam(() => includeAssembliesForScan).Named("includeAssemblies") + .WithCtorParam(() => new string[0]).Named("excludeAssemblies"); + + container.Export() + .As() + .WithKey("siteMapNodeProvider1") + .WithCtorParam().LocateWithKey(new[] + { + "xmlSiteMapNodeProvider1", + "reflectionSiteMapNodeProvider1" + }); + + // Register the sitemap builders + container.Export() + .As() + .WithKey("siteMapBuilder1") + .WithCtorParam().Named("siteMapNodeProvider").LocateWithKey("siteMapNodeProvider1"); + + // Configure the builder setsbuilderSet1 + container.Export() + .As() + .WithKey("builderSet1") + .WithCtorParam(() => "default").Named("instanceName") + .WithCtorParam().Named("siteMapBuilder").LocateWithKey("siteMapBuilder1") + .WithCtorParam().Named("cacheDetails").LocateWithKey("cacheDetails1") + .WithNamedCtorValue(() => securityTrimmingEnabled) + .WithNamedCtorValue(() => enableLocalization) + .WithNamedCtorValue(() => visibilityAffectsDescendants) + .WithNamedCtorValue(() => useTitleIfDescriptionNotProvided); + + // Configure the builder sets + container.Export() + .As() + .WithCtorParam().Named("siteMapBuilderSets").LocateWithKey(new[] { "builderSet1" }); + } + } +} diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/ReadMe.txt b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/ReadMe.txt new file mode 100644 index 00000000..b52e4157 --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/ReadMe.txt @@ -0,0 +1,55 @@ +Integrating MvcSiteMapProvider with Grace +========================================================================= + +To add MvcSiteMapProvider to your DI configuration, +add the following code to your composition root. + + // Create new container + var container = new Grace.DependencyInjection.DependencyInjectionContainer(); + + // Install MVC sitemap provider + container.Configure(new MvcSiteMapProviderModule()); + + // Install Controllers + container.Configure(new MvcModule()); + + // Setup global sitemap loader (required) + MvcSiteMapProvider.SiteMaps.Loader = container.Locate(); + + // Check all configured .sitemap files to ensure they follow the XSD for MvcSiteMapProvider (optional) + var validator = container.Locate(); + validator.ValidateXml(HostingEnvironment.MapPath("~/Mvc.sitemap")); + + // Register the Sitemaps routes for search engines (optional) + XmlSiteMapController.RegisterRoutes(RouteTable.Routes); + +For more help consult the Grace documentation at +https://github.com/ipjohnson/Grace/wiki/Getting-Started + + +IMPORTANT: KEEPING YOUR DI CONFIGURATION UP TO DATE +========================================================================= + +Making MvcSiteMapProvider depend on DI is a bit of a double-edged sword. +While this makes MvcSiteMapProvider extremely easy to extend, it is +possible that new features added to MvcSiteMapProvider will cause +your existing DI configuration to break when doing an upgrade. + +Unfortunately, NuGet doesn't have a way to automatically merge changes +into your DI modules - if you have changed your configuration in any +way, the module will be skipped when you upgrade. But then, the purpose +of giving you this code is so you can change it. For this reason, +when you upgrade your MvcSiteMapProvider version, you should also compare +your DI module to the corresponding module in the master branch to see if +there are any changes that need to be made to your configuration. The best +way to do this is to use some kind of diff tool (such as Beyond Compare) +to highlight the differences and assist with bringing the changes into +your configuration without overwriting your customizations. + +Note that you don't need to merge in #if, #else, and #endif blocks inside +of the module, but only the code between them that applies to your specific +.NET and/or MVC version. + +The latest module for Grace is located at the following location: + +https://github.com/maartenba/MvcSiteMapProvider/blob/master/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/DI/Grace/Modules/MvcSiteMapProviderModule.cs diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/Grace.csproj b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/Grace.csproj new file mode 100644 index 00000000..f5d7fed8 --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/Grace.csproj @@ -0,0 +1,115 @@ + + + + + Debug + AnyCPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159} + Library + Properties + Grace + Grace + v4.5 + 512 + ..\..\ + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + False + ..\..\packages\Grace.2.3.6\lib\portable-net45+win+wp80\Grace.dll + + + True + ..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net45\Microsoft.Web.Infrastructure.dll + + + + + + + ..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net45\System.Web.Helpers.dll + True + + + True + ..\..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net45\System.Web.Mvc.dll + + + ..\..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net45\System.Web.Razor.dll + True + + + + ..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net45\System.Web.WebPages.dll + True + + + ..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net45\System.Web.WebPages.Deployment.dll + True + + + True + ..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net45\System.Web.WebPages.Razor.dll + + + + + + + + + + DI\CommonConventions.cs + + + DI\IDependencyInjectionContainer.cs + + + + + + + + + + + + + {8625fb9c-be71-41ef-993d-3c05ea11def4} + MvcSiteMapProvider + + + + + + + + + + diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/Properties/AssemblyInfo.cs b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..f0a8bdc4 --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Grace")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Grace")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("fdcf6980-f654-4a5f-bb48-86bfe416534b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/packages.config b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/packages.config new file mode 100644 index 00000000..3b6c7be4 --- /dev/null +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Grace/packages.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj b/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj index 53d4c71b..60f26b24 100644 --- a/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj +++ b/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj @@ -1,430 +1,452 @@ - - - - - Debug - AnyCPU - - - 2.0 - {C83FE52C-47DD-4433-B34E-9C9D72BBFFA1} - {E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - MvcMusicStore - Mvc Music Store - v4.0 - - - - - - - - - false - - - 4.0 - - ..\ - true - - - - - - - true - full - false - bin\ - TRACE;DEBUG;Demo;MVC4;NET40;SimpleInjector - prompt - 4 - false - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\packages\Autofac.3.0.2\lib\net40\Autofac.dll - - - ..\packages\Autofac.3.0.2\lib\net40\Autofac.Configuration.dll - - - ..\packages\Castle.Core.3.2.0\lib\net40-client\Castle.Core.dll - - - ..\packages\Castle.Windsor.3.2.0\lib\net40\Castle.Windsor.dll - - - - ..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll - - - False - ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.dll - - - False - ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.Configuration.dll - - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\Ninject.3.0.1.10\lib\net40\Ninject.dll - - - False - ..\packages\SimpleInjector.2.3.0\lib\net40-client\SimpleInjector.dll - - - False - ..\packages\structuremap.2.6.3\lib\StructureMap.dll - - - - - - - - - - - - - 3.5 - - - 3.5 - - - 3.5 - - - True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll - - - False - ..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll - True - - - True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll - - - 3.5 - - - - 3.5 - - - - - - - - - - False - ..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll - - - - - - - - - App_Start\CompositionRoot.cs - - - DI\StructureMap\StructureMapDependencyInjectionContainer.cs - - - - - - - App_Start\CompositionRoot.cs - - - DI\Unity\UnityDependencyInjectionContainer.cs - - - - - - - App_Start\CompositionRoot.cs - - - DI\Autofac\AutofacDependencyInjectionContainer.cs - - - - - - - App_Start\CompositionRoot.cs - - - DI\Ninject\NinjectDependencyInjectionContainer.cs - - - - - - - App_Start\CompositionRoot.cs - - - DI\SimpleInjector\SimpleInjectorDependencyInjectionContainer.cs - - - - - - - App_Start\CompositionRoot.cs - - - DI\Windsor\WindsorDependencyInjectionContainer.cs - - - - - - - - DI\Autofac\Modules\MvcModule.cs - - - DI\Autofac\Modules\MvcSiteMapProviderModule.cs - - - DI\Ninject\Modules\MvcSiteMapProviderModule.cs - - - App_Start\DIConfig.cs - - - App_Start\MvcSiteMapProviderConfig.cs - - - DI\CommonConventions.cs - - - DI\IDependencyInjectionContainer.cs - - - DI\InjectableControllerFactory.cs - - - DI\InjectableDependencyResolver.cs - - - DI\SimpleInjector\MvcSiteMapProviderContainerInitializer.cs - - - DI\StructureMap\Registries\MvcSiteMapProviderRegistry.cs - - - DI\Unity\ContainerExtensions\MvcSiteMapProviderContainerExtension.cs - - - DI\Windsor\Installers\MvcInstaller.cs - - - DI\Windsor\Installers\MvcSiteMapProviderInstaller.cs - - - True - True - SiteMapLocalizations.resx - - - - - - - - - - - - - - - - - - - Global.asax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - ASPXCodeBehind - - - - - - - - - - - - - - - - - - Designer - - - Web.config - - - Web.config - - - Designer - - - - - - Designer - - - - - - - - - - - GlobalResourceProxyGenerator - SiteMapLocalizations.Designer.cs - Designer - - - - - {8625FB9C-BE71-41EF-993D-3C05EA11DEF4} - MvcSiteMapProvider - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - - - - - - - False - False - 1397 - / - - - False - False - - - False - - - - - + + + + + Debug + AnyCPU + + + 2.0 + {C83FE52C-47DD-4433-B34E-9C9D72BBFFA1} + {E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + MvcMusicStore + Mvc Music Store + v4.5 + v4.0 + + + + + + + + + false + + + 4.0 + + ..\ + true + + + + + + + true + full + false + bin\ + TRACE;DEBUG;Demo;MVC4;NET45;Grace + v4.5 + prompt + 4 + false + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\packages\Autofac.3.0.2\lib\net40\Autofac.dll + + + ..\packages\Autofac.3.0.2\lib\net40\Autofac.Configuration.dll + + + ..\packages\Castle.Core.3.2.0\lib\net40-client\Castle.Core.dll + + + ..\packages\Castle.Windsor.3.2.0\lib\net40\Castle.Windsor.dll + + + False + ..\packages\Grace.2.3.6\lib\portable-net45+win+wp80\Grace.dll + + + + ..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll + + + False + ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.dll + + + False + ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.Configuration.dll + + + True + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + ..\packages\Ninject.3.0.1.10\lib\net40\Ninject.dll + + + False + ..\packages\SimpleInjector.2.3.0\lib\net40-client\SimpleInjector.dll + + + False + ..\packages\structuremap.2.6.3\lib\StructureMap.dll + + + + + + + + + + + + + 3.5 + + + 3.5 + + + 3.5 + + + True + ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll + + + False + ..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll + + + ..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll + True + + + True + ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll + + + True + ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll + + + True + ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll + + + 3.5 + + + + 3.5 + + + + + + + + + + False + ..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll + + + + + + + + + App_Start\CompositionRoot.cs + + + DI\StructureMap\StructureMapDependencyInjectionContainer.cs + + + + + + + App_Start\CompositionRoot.cs + + + DI\Unity\UnityDependencyInjectionContainer.cs + + + + + + + App_Start\CompositionRoot.cs + + + DI\Autofac\AutofacDependencyInjectionContainer.cs + + + + + + + App_Start\CompositionRoot.cs + + + DI\Ninject\NinjectDependencyInjectionContainer.cs + + + + + + + App_Start\CompositionRoot.cs + + + DI\SimpleInjector\SimpleInjectorDependencyInjectionContainer.cs + + + + + + + App_Start\CompositionRoot.cs + + + DI\Windsor\WindsorDependencyInjectionContainer.cs + + + + + + + App_Start\CompositionRoot.cs + + + DI\Grace\GraceDependencyInjectionContainer.cs + + + + + + + + DI\Autofac\Modules\MvcModule.cs + + + DI\Autofac\Modules\MvcSiteMapProviderModule.cs + + + DI\Ninject\Modules\MvcSiteMapProviderModule.cs + + + App_Start\DIConfig.cs + + + App_Start\MvcSiteMapProviderConfig.cs + + + DI\CommonConventions.cs + + + DI\IDependencyInjectionContainer.cs + + + DI\InjectableControllerFactory.cs + + + DI\InjectableDependencyResolver.cs + + + DI\SimpleInjector\MvcSiteMapProviderContainerInitializer.cs + + + DI\StructureMap\Registries\MvcSiteMapProviderRegistry.cs + + + DI\Unity\ContainerExtensions\MvcSiteMapProviderContainerExtension.cs + + + DI\Windsor\Installers\MvcInstaller.cs + + + DI\Windsor\Installers\MvcSiteMapProviderInstaller.cs + + + DI\Grace\Modules\MvcModule.cs + + + DI\Grace\Modules\MvcSiteMapProviderModule.cs + + + True + True + SiteMapLocalizations.resx + + + + + + + + + + + + + + + + + + + Global.asax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + ASPXCodeBehind + + + + + + + + + + + + + + + + + + Designer + + + Web.config + + + Web.config + + + Designer + + + + + + Designer + + + + + + + + + + + GlobalResourceProxyGenerator + SiteMapLocalizations.Designer.cs + Designer + + + + + {8625FB9C-BE71-41EF-993D-3C05EA11DEF4} + MvcSiteMapProvider + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + + False + False + 1397 + / + + + False + False + + + False + + + + + \ No newline at end of file diff --git a/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj.user b/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj.user index cee16507..671a0102 100644 --- a/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj.user +++ b/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj.user @@ -1,31 +1,31 @@ - - - - ProjectFiles - - - - - - - - CurrentPage - True - False - False - False - - - - - - - - - False - True - - - - + + + + ProjectFiles + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + False + True + + + + \ No newline at end of file diff --git a/src/MvcSiteMapProvider/MvcMusicStore/packages.config b/src/MvcSiteMapProvider/MvcMusicStore/packages.config index b459a01d..757d6771 100644 --- a/src/MvcSiteMapProvider/MvcMusicStore/packages.config +++ b/src/MvcSiteMapProvider/MvcMusicStore/packages.config @@ -1,20 +1,21 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.MVC5.sln b/src/MvcSiteMapProvider/MvcSiteMapProvider.MVC5.sln index 9ce14e82..db4d703e 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider.MVC5.sln +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.MVC5.sln @@ -35,6 +35,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity", "CodeAsConfiguratio EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autofac", "CodeAsConfiguration\Autofac\Autofac.csproj", "{6C951158-E5DF-45FF-996D-5E72116C73AC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grace", "CodeAsConfiguration\Grace\Grace.csproj", "{3C73F4FB-7FD7-4E5B-B62D-854B58B77159}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject", "CodeAsConfiguration\Ninject\Ninject.csproj", "{4EC1AAED-4179-4ADC-96BC-18CCCF429B65}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Windsor", "CodeAsConfiguration\Windsor\Windsor.csproj", "{B559B084-8AFF-457B-9054-373ECC7F979D}" @@ -81,6 +83,10 @@ Global {6C951158-E5DF-45FF-996D-5E72116C73AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C951158-E5DF-45FF-996D-5E72116C73AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C951158-E5DF-45FF-996D-5E72116C73AC}.Release|Any CPU.Build.0 = Release|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Release|Any CPU.Build.0 = Release|Any CPU {4EC1AAED-4179-4ADC-96BC-18CCCF429B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4EC1AAED-4179-4ADC-96BC-18CCCF429B65}.Debug|Any CPU.Build.0 = Debug|Any CPU {4EC1AAED-4179-4ADC-96BC-18CCCF429B65}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -109,6 +115,7 @@ Global {2282E09D-96D4-4173-96CA-ED716B72AAB4} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {738E278C-49C0-43BD-BEC6-06CA3B5CA0CD} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {6C951158-E5DF-45FF-996D-5E72116C73AC} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {4EC1AAED-4179-4ADC-96BC-18CCCF429B65} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {B559B084-8AFF-457B-9054-373ECC7F979D} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {029EA3F0-37FA-4A67-AD8E-075226FBC950} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.sln b/src/MvcSiteMapProvider/MvcSiteMapProvider.sln index e552f5fa..b3b81dbe 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider.sln +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.sln @@ -35,6 +35,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity", "CodeAsConfiguratio EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autofac", "CodeAsConfiguration\Autofac\Autofac.csproj", "{6C951158-E5DF-45FF-996D-5E72116C73AC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grace", "CodeAsConfiguration\Grace\Grace.csproj", "{3C73F4FB-7FD7-4E5B-B62D-854B58B77159}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject", "CodeAsConfiguration\Ninject\Ninject.csproj", "{4EC1AAED-4179-4ADC-96BC-18CCCF429B65}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Windsor", "CodeAsConfiguration\Windsor\Windsor.csproj", "{B559B084-8AFF-457B-9054-373ECC7F979D}" @@ -80,6 +82,10 @@ Global {6C951158-E5DF-45FF-996D-5E72116C73AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6C951158-E5DF-45FF-996D-5E72116C73AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C951158-E5DF-45FF-996D-5E72116C73AC}.Release|Any CPU.Build.0 = Release|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159}.Release|Any CPU.Build.0 = Release|Any CPU {4EC1AAED-4179-4ADC-96BC-18CCCF429B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4EC1AAED-4179-4ADC-96BC-18CCCF429B65}.Release|Any CPU.ActiveCfg = Release|Any CPU {4EC1AAED-4179-4ADC-96BC-18CCCF429B65}.Release|Any CPU.Build.0 = Release|Any CPU @@ -106,6 +112,7 @@ Global {2282E09D-96D4-4173-96CA-ED716B72AAB4} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {738E278C-49C0-43BD-BEC6-06CA3B5CA0CD} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {6C951158-E5DF-45FF-996D-5E72116C73AC} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} + {3C73F4FB-7FD7-4E5B-B62D-854B58B77159} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {4EC1AAED-4179-4ADC-96BC-18CCCF429B65} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {B559B084-8AFF-457B-9054-373ECC7F979D} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {029EA3F0-37FA-4A67-AD8E-075226FBC950} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} diff --git a/src/MvcSiteMapProvider/Shared/CommonAssemblyInfo.cs b/src/MvcSiteMapProvider/Shared/CommonAssemblyInfo.cs index 82d8daec..93cf3297 100644 --- a/src/MvcSiteMapProvider/Shared/CommonAssemblyInfo.cs +++ b/src/MvcSiteMapProvider/Shared/CommonAssemblyInfo.cs @@ -1,14 +1,13 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: CLSCompliantAttribute(false)] -[assembly: ComVisibleAttribute(false)] -[assembly: AssemblyCompanyAttribute("MvcSiteMapProvider")] -[assembly: AssemblyCopyrightAttribute("Copyright © MvcSiteMapProvider 2009 - 2013")] -[assembly: AssemblyVersionAttribute("4.0.0")] -[assembly: AssemblyInformationalVersionAttribute("4.0.0")] -[assembly: AssemblyFileVersionAttribute("4.0.0")] -[assembly: AssemblyDelaySignAttribute(false)] - +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: CLSCompliantAttribute(false)] +[assembly: ComVisibleAttribute(false)] +[assembly: AssemblyCompanyAttribute("MvcSiteMapProvider")] +[assembly: AssemblyCopyrightAttribute("Copyright © MvcSiteMapProvider 2009 - 2013")] +[assembly: AssemblyVersionAttribute("4.0.0")] +[assembly: AssemblyInformationalVersionAttribute("4.0.0")] +[assembly: AssemblyFileVersionAttribute("4.0.0")] +[assembly: AssemblyDelaySignAttribute(false)]