protected void Application_Start(object sender, EventArgs e) { var defaultServiceLocator = DefaultServiceLocator.Create(); //defaultServiceLocator.Register (typeof (Remotion.Data.DomainObjects.IClientTransactionExtensionFactory), typeof (Remotion.Data.DomainObjects.UberProfIntegration.LinqToSqlExtensionFactory), LifetimeKind.Singleton); //defaultServiceLocator.Register (typeof (Remotion.Data.DomainObjects.Tracing.IPersistenceExtensionFactory), typeof (Remotion.Data.DomainObjects.UberProfIntegration.LinqToSqlExtensionFactory), LifetimeKind.Singleton); //defaultServiceLocator.RegisterMultiple<IOrganizationalStructureEditControlFormGridRowProvider<EditUserControl>> (() => new EditUserControlFormGridRowProvider()); ServiceLocator.SetLocatorProvider(() => defaultServiceLocator); Assertion.IsTrue( defaultServiceLocator.GetInstance <IPrincipalProvider>() is SecurityManagerPrincipalProvider, "Wrong IPrincipalProvider is configured"); _resourceVirtualPathProvider = new ResourceVirtualPathProvider( new[] { new ResourcePathMapping("Remotion.Web", @"..\..\Remotion\Web\Core\res"), new ResourcePathMapping("Remotion.Web.Legacy", @"..\..\Remotion\Web\Legacy\Res"), new ResourcePathMapping("Remotion.ObjectBinding.Web", @"..\..\Remotion\ObjectBinding\Web\res"), new ResourcePathMapping("Remotion.ObjectBinding.Web.Legacy", @"..\..\Remotion\ObjectBinding\Web.Legacy\Res"), new ResourcePathMapping("Remotion.SecurityManager.Clients.Web/Html", @"..\Clients.Web\res\Html"), new ResourcePathMapping("Remotion.SecurityManager.Clients.Web/Themes", @"..\Clients.Web\res\Themes"), new ResourcePathMapping("Remotion.SecurityManager.Clients.Web/UI", @"..\Clients.Web\UI"), }, FileExtensionHandlerMapping.Default); _resourceVirtualPathProvider.Register(); }
private static void RegisterResourceVirtualPathProvider() { _resourceVirtualPathProvider = new ResourceVirtualPathProvider( new[] { new ResourcePathMapping("Remotion.Web", @"..\..\Web\Core\res") }, FileExtensionHandlerMapping.Default); _resourceVirtualPathProvider.Register(); }
protected void Application_Start(Object sender, EventArgs e) { var defaultServiceLocator = DefaultServiceLocator.Create(); ServiceLocator.SetLocatorProvider(() => defaultServiceLocator); LogManager.Initialize(); _resourceVirtualPathProvider = new ResourceVirtualPathProvider( new[] { new ResourcePathMapping("Remotion.Web", @"..\Core\res"), }, FileExtensionHandlerMapping.Default); _resourceVirtualPathProvider.Register(); }
protected void Application_Start(Object sender, EventArgs e) { var mappingConfiguration = MappingConfiguration.Current; Trace.WriteLine(mappingConfiguration.GetTypeDefinitions().Length); _resourceVirtualPathProvider = new ResourceVirtualPathProvider( new[] { new ResourcePathMapping("Remotion.Web", @"..\..\Web\Core\res"), new ResourcePathMapping("Remotion.Web.Legacy", @"..\..\Web\Legacy\Res"), new ResourcePathMapping("Remotion.ObjectBinding.Web", @"..\..\ObjectBinding\Web\res"), new ResourcePathMapping("Remotion.ObjectBinding.Web.Legacy", @"..\..\ObjectBinding\Web.Legacy\Res") }, FileExtensionHandlerMapping.Default); _resourceVirtualPathProvider.Register(); var serviceLocator = DefaultServiceLocator.Create(); serviceLocator.RegisterSingle <ISecurityProvider> (() => new StubSecurityProvider()); ServiceLocator.SetLocatorProvider(() => serviceLocator); }
protected void Application_Start(object sender, EventArgs e) { ResourceVirtualPathProvider.Register(); ContainerManager.CreateContainer("micajahazurefileservice", false); }
protected void Application_Start(Object sender, EventArgs e) { LogManager.Initialize(); PreferQuirksModeRendering = false; bool useClassicBlueTheme = false; if (useClassicBlueTheme) { DefaultServiceLocator defaultServiceLocator = DefaultServiceLocator.Create(); defaultServiceLocator.Register(typeof(ResourceTheme), typeof(ResourceTheme.ClassicBlue), LifetimeKind.Singleton); ServiceLocator.SetLocatorProvider(() => defaultServiceLocator); } string objectPath = Server.MapPath("~/objects"); if (!Directory.Exists(objectPath)) { Directory.CreateDirectory(objectPath); } XmlReflectionBusinessObjectStorageProvider provider = new XmlReflectionBusinessObjectStorageProvider(objectPath); XmlReflectionBusinessObjectStorageProvider.SetCurrent(provider); BusinessObjectProvider.GetProvider <BindableObjectWithIdentityProviderAttribute>().AddService(typeof(IGetObjectService), provider); BusinessObjectProvider.GetProvider <BindableObjectWithIdentityProviderAttribute>() .AddService(typeof(ISearchAvailableObjectsService), new BindableXmlObjectSearchService()); BusinessObjectProvider.GetProvider <BindableObjectWithIdentityProviderAttribute>() .AddService(typeof(IBusinessObjectWebUIService), new ReflectionBusinessObjectWebUIService()); BusinessObjectProvider.GetProvider <BindableObjectProviderAttribute>().AddService(new ReferenceDataSourceTestDefaultValueService()); BusinessObjectProvider.GetProvider <BindableObjectProviderAttribute>().AddService(new ReferenceDataSourceTestDeleteObjectService()); if (PreferQuirksModeRendering) { DefaultServiceLocator defaultServiceLocator = DefaultServiceLocator.Create(); foreach (var entry in LegacyServiceConfigurationService.GetConfiguration()) { defaultServiceLocator.Register(entry); } foreach (var entry in BocLegacyServiceConfigurationService.GetConfiguration()) { defaultServiceLocator.Register(entry); } ServiceLocator.SetLocatorProvider(() => defaultServiceLocator); Assertion.IsTrue(SafeServiceLocator.Current.GetInstance <IBocListRenderer>() is BocListQuirksModeRenderer); Assertion.IsTrue(SafeServiceLocator.Current.GetInstance <IBocTextValueRenderer>() is BocTextValueQuirksModeRenderer); } _resourceVirtualPathProvider = new ResourceVirtualPathProvider( new[] { new ResourcePathMapping("Remotion.Web", @"..\..\Web\Core\res"), new ResourcePathMapping("Remotion.ObjectBinding.Web", @"..\..\ObjectBinding\Web\res"), new ResourcePathMapping("Remotion.Web.Legacy", @"..\..\Web\Legacy\res"), new ResourcePathMapping("Remotion.ObjectBinding.Web.Legacy", @"..\..\ObjectBinding\Web.Legacy\res") }, FileExtensionHandlerMapping.Default); _resourceVirtualPathProvider.Register(); //var bundle = new Bundle ("~/bundles/css"); //foreach (var resourcePathMapping in _resourceVirtualPathProvider.Mappings) // BundleCssFilesRecursively ((ResourceVirtualDirectory) _resourceVirtualPathProvider.GetDirectory(resourcePathMapping.VirtualPath), bundle); //BundleTable.Bundles.Add (bundle); }