├── .gitignore ├── .nuget ├── NuGet.Config ├── NuGet.exe ├── NuGet.targets └── packages.config ├── BoC.4.5.resharper ├── BoC.sln ├── Boc.snk ├── LICENSE ├── Packages.dgml ├── README.md ├── Src ├── Commons.InversionOfControl.DryIoC │ ├── BoC.InversionOfControl.DryIoC.csproj │ ├── BoC.InversionOfControl.DryIoC.nuspec │ ├── DryIoCDependencyResolver.cs │ ├── DryIoc │ │ ├── AsyncExecutionFlowScopeContext.cs │ │ ├── Container.cs │ │ ├── FastExpressionCompiler.cs │ │ └── ImTools.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── Commons.InversionOfControl.Ninject │ ├── BoC.InversionOfControl.Ninject.csproj │ ├── BoC.InversionOfControl.Ninject.nuspec │ ├── Extensions.cs │ ├── NinjectDependencyResolver.cs │ ├── NinjectWebActivator.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── Commons.InversionOfControl.SimpleInjector │ ├── AllowMultipleConstructorResolutionBehavior.cs │ ├── BoC.InversionOfControl.SimpleInjector.csproj │ ├── BoC.InversionOfControl.SimpleInjector.nuspec │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleInjectorDependencyResolver.cs │ ├── app.config │ └── packages.config ├── Commons.InversionOfControl.Unity │ ├── App_Start │ │ └── UnityMvcActivator.cs │ ├── ArrayResolutionStrategy.cs │ ├── BoC.InversionOfControl.Unity.csproj │ ├── BoC.InversionOfControl.Unity.nuspec │ ├── PerRequestLifeTimeManager.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── TypeTrackingExtension.cs │ ├── UnityDependencyResolver.cs │ ├── UnityPerRequestHttpModule.cs │ ├── app.config │ └── packages.config ├── Commons.Logging.Log4Net │ ├── BoC.Logging.Log4Net.2.0.0.0.nupkg │ ├── BoC.Logging.Log4Net.2.0.1.0.nupkg │ ├── BoC.Logging.Log4Net.csproj │ ├── BoC.Logging.Log4Net.nuspec │ ├── DefaultSetupTasks │ │ └── InitDefaultLoggerTask.cs │ ├── Log4netLogger.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── Commons.Logging.Sitecore │ ├── BoC.Logging.Sitecore.2.0.0.0.nupkg │ ├── BoC.Logging.Sitecore.2.0.1.0.nupkg │ ├── BoC.Logging.Sitecore.csproj │ ├── BoC.Logging.Sitecore.nuspec │ ├── DefaultSetupTasks │ │ └── InitDefaultLoggerTask.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SitecoreLogger.cs │ └── app.config ├── Commons.Persistence.NHibernate │ ├── AutoContextSessionContext.cs │ ├── BoC.Persistence.NHibernate.csproj │ ├── BoC.Persistence.NHibernate.nuspec │ ├── Cache │ │ └── ProjectionEnabledQueryCache.cs │ ├── CurrentContextSessionManager.cs │ ├── DataContext │ │ ├── DataContextWorkSessionManager.cs │ │ └── NHibernateDataContext.cs │ ├── DefaultSetupTasks │ │ ├── AutoNhibernateConfigurator.cs │ │ └── AutoNhibernateRepositoryGenerator.cs │ ├── FluentExtensions │ │ └── AutoMappingExtensions.cs │ ├── ISessionManager.cs │ ├── NHRepository.cs │ ├── NHibernateConfigHelper.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── WebSessionManager.cs │ ├── app.config │ └── packages.config ├── Commons.Persistence.NoRM │ ├── BoC.Persistence.Norm.csproj │ ├── DataContext │ │ ├── NormDataContext.cs │ │ └── NormDataContextSessionManager.cs │ ├── DefaultSessionFactory.cs │ ├── DefaultSetupTasks │ │ ├── AutoNormConfigurator.cs │ │ └── AutoNormRepositoryGenerator.cs │ ├── ISessionFactory.cs │ ├── ISessionManager.cs │ ├── NoRMRepository.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── Commons.Persistence.Sitecore.Core │ ├── App_Config │ │ └── Include │ │ │ └── Glass │ │ │ └── Glass.Mapper.Sc.ContentSearch.Lucene.Config │ ├── BoC.Persistence.SitecoreGlass.Core.csproj │ ├── BoC.Persistence.SitecoreGlass.Core.nuspec │ ├── ContentSearchContextIndexNameProvider.cs │ ├── ContextDatabaseProvider.cs │ ├── CustomDatabaseProvider.cs │ ├── DataContext │ │ ├── DataContextException.cs │ │ ├── SitecoreBucketDataContext.cs │ │ ├── SitecoreDataContext.cs │ │ ├── SitecoreDataContextDatabaseProvider.cs │ │ └── SitecoreDataContextIndexSearchContextProvider.cs │ ├── IDatabaseProvider.cs │ ├── IIndexNameProvider.cs │ ├── IIndexSearchContextProvider.cs │ ├── ISitecoreServiceProvider.cs │ ├── Profiling │ │ └── SitecorePerformanceProfiler.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SitecoreRepository.cs │ ├── SitecoreServiceProvider.cs │ ├── TemplateParametersValueProviderFactory.cs │ ├── app.config │ └── packages.config ├── Commons.Persistence.Sitecore.Models │ ├── BoC.Persistence.SitecoreGlass.Models.csproj │ ├── BoC.Persistence.SitecoreGlass.Models.nuspec │ ├── Models │ │ ├── ISearchable.cs │ │ ├── ISitecoreItem.cs │ │ └── SitecoreItem.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── app.config ├── Commons.Persistence.Sitecore │ ├── App_Config │ │ └── Include │ │ │ └── Glass │ │ │ └── Glass.Mapper.Sc.ContentSearch.Lucene.Config │ ├── App_Start │ │ └── GlassMapperScCustom.BoC.cs.pp │ ├── BoC.Persistence.SitecoreGlass.csproj │ ├── BoC.Persistence.SitecoreGlass.nuspec │ ├── DefaultSetupTasks │ │ ├── AutoSitecoreConfigurator.cs │ │ ├── AutoSitecoreRepositoryGenerator.cs │ │ ├── BaseModelConfigurationLoader.cs │ │ ├── RegisterConfigLoader.cs │ │ ├── RegisterPerformanceProfilers.cs │ │ └── RegisterValueProvider.cs │ ├── GlassConfig │ │ └── AppDomainHelperConfigLoader.cs │ ├── Initialize │ │ └── InitBoc.cs │ ├── License.txt │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── packages.config ├── Commons.Persistence.UmbracoGlass │ ├── BoC.Persistence.UmbracoGlass.csproj │ ├── DefaultSetupTask │ │ ├── AutoUmbracoConfigurator.cs │ │ └── AutoUmbracoRepositoryGenerator.cs │ ├── IUmbracoServiceProvider.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UmbracoRepository.cs │ ├── UmbracoServiceProvider.cs │ ├── app.config │ └── packages.config ├── Commons.Persistence.XPO │ ├── BoC.Persistence.Xpo.csproj │ ├── DataContext │ │ ├── XpoDataContext.cs │ │ ├── XpoDataContextSessionFactory.cs │ │ └── XpoDataContextSessionManager.cs │ ├── DefaultSetupTasks │ │ ├── AutoXpoConfigurator.cs │ │ └── AutoXpoRepositoryGenerator.cs │ ├── ISessionFactory.cs │ ├── ISessionManager.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── XPORepository.cs ├── Commons.Persistence.db4o │ ├── AutoIncrement │ │ ├── AutoIncrementSupport.cs │ │ └── IdGenerator.cs │ ├── BoC.Persistence.db4o.csproj │ ├── DataContext │ │ ├── Db4oDataContext.cs │ │ └── Db4oDataContextSessionManager.cs │ ├── Db4oSessionFactory.cs │ ├── DefaultSetupTasks │ │ ├── AutoDb4oConfigurator.cs │ │ └── AutoDb4oRepositoryGenerator.cs │ ├── IConfigurationExtender.cs │ ├── ISessionFactory.cs │ ├── ISessionManager.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Repository │ │ ├── Db4oEnlist.cs │ │ └── Db4oRepository.cs │ └── packages.config ├── Commons.Security.Mvc │ ├── App_Start │ │ └── RazorGeneratorMvcStart.cs │ ├── AreaRegistration.cs │ ├── BoC.Security.Mvc.csproj │ ├── Controllers │ │ ├── AccountController.cs │ │ └── AuthController.cs │ ├── Init │ │ └── AddViewEngine.cs │ ├── OpenIdRelyingPartyService.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ViewModels │ │ ├── ChangePasswordModel.cs │ │ ├── LogOnModel.cs │ │ └── RegisterModel.cs │ ├── Views │ │ ├── Account │ │ │ ├── Register.cs │ │ │ └── Register.cshtml │ │ ├── Auth │ │ │ ├── LogOn.cs │ │ │ ├── LogOn.cshtml │ │ │ ├── _LogOnNative.cs │ │ │ ├── _LogOnNative.cshtml │ │ │ ├── _LogOnOpenId.cs │ │ │ └── _LogOnOpenId.cshtml │ │ ├── Web.config │ │ ├── _ViewStart.cs │ │ └── _ViewStart.cshtml │ ├── app.config │ └── packages.config ├── Commons.Security.NHibernate │ ├── BoC.Security.NHibernate.csproj │ ├── Mappings │ │ ├── Role.cs │ │ └── User.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── packages.config ├── Commons.Security │ ├── BoC.Security.csproj │ ├── DefaultSetupTasks │ │ └── RegisterDefaultUserServices.cs │ ├── EmailInUseException.cs │ ├── LoginInUseException.cs │ ├── Model │ │ ├── AuthenticationToken.cs │ │ ├── Role.cs │ │ └── User.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RoleExistsException.cs │ ├── RoleInUseException.cs │ ├── RoleNotFoundException.cs │ ├── Roles.cs │ ├── Services │ │ ├── DefaultUserService.cs │ │ └── IUserService.cs │ ├── UserNotFoundException.cs │ └── UserServiceException.cs ├── Commons.Sitecore.Mvc │ ├── BoC.Sitecore.Mvc.csproj │ ├── BoC.Sitecore.Mvc.nuspec │ ├── Initialize │ │ ├── RegisterValueProvider.cs │ │ └── SetDefaultMvcDependencyResolver.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SitecoreSpecificResolver.cs │ ├── SitecoreValueProvider.cs │ ├── WildcardValueProvider.cs │ ├── app.config │ └── packages.config ├── Commons.Web.Mvc │ ├── ActionResults │ │ ├── DataContractJsonResult.cs │ │ ├── DataContractXmlResult.cs │ │ ├── HttpStatusCodeResult.cs │ │ ├── JsonNetJsonResult.cs │ │ └── XmlResult.cs │ ├── Attributes │ │ ├── EventTriggerAttribute.cs │ │ ├── JsonRequestBehaviorAttribute.cs │ │ └── ValidationExceptionAttribute.cs │ ├── Binders │ │ ├── DateTimeModelBinder.cs │ │ └── DecimalModelBinder.cs │ ├── BoC.Web.Mvc.csproj │ ├── BoC.Web.Mvc.nuspec │ ├── Events │ │ └── ActionEvents.cs │ ├── Extensions │ │ ├── HtmlHelperExtensions.cs │ │ ├── HttpRequestBaseExtensions.cs │ │ ├── HttpSessionStateBaseExtensions.cs │ │ └── StringExtensions.cs │ ├── Init │ │ ├── RegisterGlobalFilters.cs │ │ ├── SetDefaultHttpControllerActivator.cs │ │ ├── SetDefaultModelBinders.cs │ │ ├── SetDefaultModelMetaDataProvider.cs │ │ ├── SetDefaultMvcDependencyResolver.cs │ │ └── SetDefaultNameSpace.cs │ ├── IoC │ │ └── BoCDependencyResolver.cs │ ├── MetaData │ │ ├── Extensions │ │ │ ├── AttributeExtensions.cs │ │ │ └── DisplayAttributeExtensions.cs │ │ ├── ExtraModelMetadataProvider.cs │ │ └── MetadataConventionsAttribute.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Validation │ │ └── RulesExceptionExtensions.cs │ ├── app.config │ └── packages.config ├── Commons │ ├── BoC.csproj │ ├── BoC.nuspec │ ├── ComponentModel │ │ └── TypeExtension │ │ │ ├── DefaultSetupTasks │ │ │ ├── RegisterExtentedTypesRegistry.cs │ │ │ └── RegisterTypeDescriptor.cs │ │ │ ├── ExtendWithTypeAttribute.cs │ │ │ ├── ExtendedPropertyDescriptor.cs │ │ │ ├── ExtendedTypeDescriptionProvider.cs │ │ │ ├── ExtendedTypeDescriptor.cs │ │ │ ├── ExtendedTypesRegistry.cs │ │ │ └── IExtendedTypesRegistry.cs │ ├── DataContext │ │ ├── BaseThreadSafeSingleDataContext.cs │ │ ├── DataContext.cs │ │ └── IDataContext.cs │ ├── Dynamic │ │ └── NullingExpandoObject.cs │ ├── EventAggregator │ │ ├── BaseEvent.cs │ │ ├── BaseEvent`1.cs │ │ ├── DefaultSetupTasks │ │ │ └── InitEventAggregatorTask.cs │ │ ├── DelegateReference.cs │ │ ├── EventAggregator.cs │ │ ├── EventSubscription.cs │ │ ├── IDelegateReference.cs │ │ ├── IEventAggregator.cs │ │ ├── IEventSubscription.cs │ │ └── SubscriptionToken.cs │ ├── Events │ │ ├── DeletedEvent.cs │ │ ├── DeletingEvent.cs │ │ ├── EventArgs.cs │ │ ├── InsertedEvent.cs │ │ ├── InsertingEvent.cs │ │ ├── UpdatedEvent.cs │ │ └── UpdatingEvent.cs │ ├── Extensions │ │ ├── EnumerableExtensions.cs │ │ ├── ExpressionExtensions.cs │ │ ├── ObjectExtensions.cs │ │ ├── StringExtensions.cs │ │ └── TypeExtensions.cs │ ├── Helpers │ │ ├── AppDomainHelper.cs │ │ ├── BuildManagerAppDomainHelper.cs │ │ ├── CheckArgument.cs │ │ ├── IAppDomainHelper.cs │ │ └── Inflector.cs │ ├── Initializer.cs │ ├── InversionOfControl │ │ ├── IContainerInitializer.cs │ │ ├── IDependencyResolver.cs │ │ ├── IoC.cs │ │ └── LifeTimeScope.cs │ ├── License.txt │ ├── Linq │ │ ├── Dynamic.cs │ │ ├── ExpressionUtility.cs │ │ └── IQueryableExtensions.cs │ ├── Logging │ │ ├── ILogContext.cs │ │ ├── ILogger.cs │ │ └── LogContext.cs │ ├── Persistence │ │ ├── BaseEntity.cs │ │ ├── Exceptions.cs │ │ ├── IBaseEntity.cs │ │ ├── IRepository.cs │ │ └── RepositoryGenerator.cs │ ├── Profiling │ │ ├── DefaultSetupTasks │ │ │ └── RegisterProfiler.cs │ │ ├── IPerformanceProfiler.cs │ │ └── Profiler.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ServiceModel │ │ ├── IoCInstanceProvider.cs │ │ ├── IoCServiceBehavior.cs │ │ ├── IoCServiceHost.cs │ │ ├── ServiceErrorLogger.cs │ │ └── ServiceErrorLoggerBehavior.cs │ ├── Services │ │ ├── BaseModelService.cs │ │ ├── DefaultSetupTasks │ │ │ └── AutoRegisterModelServices.cs │ │ ├── IModelService.cs │ │ └── ModelQuery.cs │ ├── Tasks │ │ ├── BaseBackgroundTask.cs │ │ ├── BaseThreadedBackgroundTask.cs │ │ ├── BaseTimedBackgroundTask.cs │ │ ├── Bootstrapper.cs │ │ ├── IBackgroundTask.cs │ │ ├── IBootstrapperTask.cs │ │ ├── RegisterBackgroundTasks.cs │ │ ├── RegisterBootstrapTasks.cs │ │ └── StartBackgroundTasks.cs │ ├── Validation │ │ ├── DataAnnotationsModelValidator.cs │ │ ├── DefaultSetupTasks │ │ │ └── RegisterDefaultModelValidator.cs │ │ ├── ErrorInfo.cs │ │ ├── Expressions.cs │ │ ├── IModelValidator.cs │ │ └── RulesException.cs │ ├── Web │ │ ├── ApplicationStarterHttpModule.cs │ │ ├── CookieAwareWebClient.cs │ │ ├── DataContextPerRequestHttpModule.cs │ │ ├── EventTriggeringHttpModule.cs │ │ ├── Events.cs │ │ └── PreApplicationStartCode.cs │ ├── packages.config │ └── readme.txt └── nuget.bat ├── Templates ├── DynamicData │ ├── Content │ │ ├── DynamicData │ │ │ ├── back.gif │ │ │ ├── header.gif │ │ │ ├── page_first.gif │ │ │ ├── page_last.gif │ │ │ ├── page_next.gif │ │ │ ├── page_prev.gif │ │ │ └── plus.gif │ │ └── Site.css │ └── Views │ │ ├── Home │ │ └── Index.aspx │ │ └── Shared │ │ ├── EntityTemplates │ │ ├── Default.ascx │ │ ├── Default_Edit.ascx │ │ └── Default_Insert.ascx │ │ ├── FieldTemplates │ │ ├── Boolean.ascx │ │ ├── Boolean_Edit.ascx │ │ ├── Children.ascx │ │ ├── DateTime.ascx │ │ ├── EmailAddress.ascx │ │ ├── ForeignKey.ascx │ │ ├── ForeignKey_Edit.ascx │ │ ├── Integer_Edit.ascx │ │ ├── MultilineText_Edit.ascx │ │ ├── Text.ascx │ │ └── Text_Edit.ascx │ │ ├── PageTemplates │ │ ├── Edit.aspx │ │ ├── List.aspx │ │ ├── New.aspx │ │ └── Show.aspx │ │ ├── Site.Master │ │ ├── Site.Master.cs │ │ └── Site.Master.designer.cs ├── NorthwindDB │ └── Northwind.mdf └── t4 │ ├── Model │ ├── SQLServer.ttinclude │ ├── Settings.ttinclude │ └── _classes.tt │ └── Repository │ ├── _repositories.tt │ └── _utils.tt ├── Tests ├── Commons.InversionOfControl.DryIoC.Tests │ ├── BoC.InversionOfControl.DryIoC.Tests.csproj │ ├── DryIoCDependencyResolverFixtures.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Commons.InversionOfControl.Ninject.Tests │ ├── BoC.InversionOfControl.Ninject.Tests.csproj │ ├── NinjectDependencyResolverFixtures.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Commons.InversionOfControl.SimpleInjector.Tests │ ├── BoC.InversionOfControl.SimpleInjector.Tests.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleInjectorResolverFixtures.cs │ └── app.config ├── Commons.InversionOfControl.Unity.Tests │ ├── BoC.InversionOfControl.Unity.Tests.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UnityDependencyResolverFixtures.cs │ └── app.config ├── Commons.Persistence.db4o.Tests │ ├── App.config │ ├── BoC.Persistence.db4o.Tests.csproj │ ├── Fixtures │ │ ├── Db4oFixture.cs │ │ ├── Db4oTransactionsFixture.cs │ │ └── Db4oUnitOfWorkFixture.cs │ ├── Model │ │ ├── Address.cs │ │ ├── Child.cs │ │ ├── Parent.cs │ │ ├── ParentConfigExtender.cs │ │ └── Person.cs │ └── Properties │ │ └── AssemblyInfo.cs └── Commons.Tests │ ├── BaseIoCFixture.cs │ ├── BoC.Tests.csproj │ ├── EventAggregator │ ├── BaseEventFixture.cs │ ├── BaseEvent`1Fixture.cs │ ├── DefaultSetupTasks │ │ └── InitEventAggregatorTaskFixture.cs │ ├── DelegateReferenceFixture.cs │ ├── EventAggregatorFixture.cs │ ├── EventSubscriptionFixture.cs │ └── SubscriptionTokenFixture.cs │ ├── Extensions │ ├── ExpressionExtensionFixture.cs │ ├── StringExtensionFixture.cs │ └── TypeExtensionsFixture.cs │ ├── Helpers │ ├── AppDomainHelperFixture.cs │ ├── CheckArgumentFixture.cs │ └── InflectorFixture.cs │ ├── InversionOfControl │ └── IoCFixture.cs │ ├── Persistence │ └── BaseEntityFixture.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Services │ ├── AutoRegisterModelServicesFixture.cs │ ├── BaseModelServiceFixtures │ │ ├── BaseModelServiceBaseFixture.cs │ │ ├── BasicQueryFixture.cs │ │ ├── DeleteFixture.cs │ │ ├── DummyModel.cs │ │ ├── FindByModelFixture.cs │ │ ├── FindFixture.cs │ │ ├── InsertFixture.cs │ │ ├── UpdateFixture.cs │ │ └── ValidateEntityFixture.cs │ └── DummyModel.cs │ ├── Tasks │ ├── BaseBackgroundTaskFixture.cs │ ├── BaseThreadedBackgroundTaskFixture.cs │ ├── BaseTimedBackgroundTaskFixture.cs │ ├── BootstrapperTasksInitializerFixture.cs │ ├── RegisterBackgroundTasksFixture.cs │ └── StartBackgroundTasksFixture.cs │ ├── UnitOfWork │ └── UnitOfWorkFixture.cs │ └── Validation │ ├── DataAnnotationsModelValidatorFixture.cs │ ├── ErrorInfoFixture.cs │ ├── RegisterDefaultModelValidatorFixture.cs │ └── RulesExceptionFixture.cs ├── lib ├── DotNetOpenAuth │ ├── DotNetOpenAuth.Contracts.dll │ ├── DotNetOpenAuth.dll │ ├── DotNetOpenAuth.pdb │ ├── DotNetOpenAuth.xml │ ├── DotNetOpenAuth.xsd │ ├── LICENSE.txt │ ├── Microsoft.Contracts.dll │ └── README.Bin.html ├── FluentNHibernate │ ├── 0001-Fixes-BuiltConventionBase-s-Accept-never-being-calle.patch │ ├── 0002-Fixes-error-on-relation-being-added-to-the-propertie.patch │ ├── 0003-Allow-to-reset-cache.patch │ ├── 0004-Fix-that-allows-to-add-multiple-AutoMappingOverrideA.patch │ ├── FluentNHibernate.XML │ ├── FluentNHibernate.dll │ └── FluentNHibernate.pdb ├── JsonNet │ ├── Newtonsoft.Json.dll │ ├── Newtonsoft.Json.pdb │ ├── Newtonsoft.Json.xml │ └── readme.txt ├── Microsoft.Web.DynamicData │ ├── DynamicScaffold │ │ ├── DynamicScaffoldController.cs │ │ ├── DynamicScaffoldViewPage.cs │ │ ├── MapScaffoldRouteExtensions.cs │ │ ├── RedirectToScaffoldExtensions.cs │ │ ├── ScaffoldLinkExtensions.cs │ │ └── ScaffoldUrlExtensions.cs │ ├── EntityTemplates │ │ ├── DynamicEntityExtensions.cs │ │ ├── EntityTemplateExtensions.cs │ │ ├── EntityTemplateFactory.cs │ │ ├── IEntityTemplate.cs │ │ ├── IEntityTemplateFactory.cs │ │ ├── IEntityTemplateHost.cs │ │ ├── MvcEntityTemplate.cs │ │ └── MvcEntityTemplate`1.cs │ ├── Extensions │ │ ├── FormExtensions.cs │ │ ├── HtmlHelperExtensions.cs │ │ ├── HttpStatusCode.cs │ │ ├── HttpStatusCodeExtensions.cs │ │ ├── HttpStatusCodeResult.cs │ │ ├── IQueryableExtensions.cs │ │ ├── IsPostExtensions.cs │ │ ├── RelativeUrlExtensions.cs │ │ ├── SetQueryParamsExtensions.cs │ │ └── ViewDataDictionaryExtensions.cs │ ├── FieldTemplates │ │ ├── DynamicFieldExtensions.cs │ │ ├── DynamicFieldTitleExtensions.cs │ │ ├── MvcFieldTemplate.cs │ │ └── MvcFieldTemplate`1.cs │ ├── Microsoft.Web.DynamicData.Mvc.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Utility │ │ ├── Dynamic.cs │ │ ├── DynamicDataHelper.cs │ │ ├── ExpressionUtility.cs │ │ ├── IPagedList.cs │ │ └── PagedList`1.cs ├── RouteDebug.dll ├── SqLite │ ├── Doc │ │ └── SQLite.NET.chm │ ├── readme.htm │ ├── sqliteadmin │ │ ├── changelog.txt │ │ ├── languages │ │ │ ├── catalan.lng │ │ │ ├── czech.lng │ │ │ ├── danish.lng │ │ │ ├── dutch.lng │ │ │ ├── english.lng │ │ │ ├── french.lng │ │ │ ├── greek.lng │ │ │ ├── hungarian.lng │ │ │ ├── italian.lng │ │ │ ├── polish.lng │ │ │ ├── portugues_br.lng │ │ │ ├── russian.lng │ │ │ ├── simplified_chinese.lng │ │ │ ├── spanish.lng │ │ │ ├── traditional_chinese.lng │ │ │ └── turkish.lng │ │ ├── sqlite.dll │ │ ├── sqlite3.dll │ │ └── sqliteadmin.exe │ └── sqliteproviders │ │ ├── App_Code │ │ ├── SQLiteMembershipProvider.cs │ │ ├── SQLitePersonalizationProvider.cs │ │ ├── SQLiteProfileProvider.cs │ │ └── SQLiteRoleProvider.cs │ │ ├── App_Data │ │ └── Provider.db │ │ ├── Bin │ │ └── System.Data.SQLite.DLL │ │ ├── Default.aspx │ │ ├── Default.aspx.cs │ │ ├── ProviderSql.sql │ │ ├── login.aspx │ │ ├── login.aspx.cs │ │ ├── sqliteproviders.sln │ │ ├── users │ │ ├── Default.aspx │ │ ├── Default.aspx.cs │ │ └── Web.config │ │ └── web.config ├── XPO │ ├── DevExpress.Data.v9.3.Linq.dll │ ├── DevExpress.Data.v9.3.Linq.pdb │ ├── DevExpress.Data.v9.3.dll │ ├── DevExpress.Data.v9.3.pdb │ ├── DevExpress.Xpo.v9.3.Linq.dll │ ├── DevExpress.Xpo.v9.3.Linq.pdb │ ├── DevExpress.Xpo.v9.3.dll │ ├── DevExpress.Xpo.v9.3.pdb │ └── Dummy │ │ ├── DevExpress.Data.9.3.Linq │ │ ├── Class1.cs │ │ ├── DevExpress.Data.9.3.Linq.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── DevExpress.Data.9.3 │ │ ├── Class1.cs │ │ ├── DevExpress.Data.9.3.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── DevExpress.Xpo.9.3.Linq │ │ ├── Class1.cs │ │ ├── DevExpress.Xpo.9.3.Linq.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Dummy.5.1.ReSharper.user │ │ ├── Dummy.sln │ │ ├── Dummy.suo │ │ └── Dummy │ │ ├── DevExpress.Xpo.v9.3.csproj │ │ ├── FakeClasses.cs │ │ └── Properties │ │ └── AssemblyInfo.cs ├── atheken-NoRM │ ├── LICENSE.txt │ ├── Norm.XML │ ├── Norm.dll │ └── Norm.pdb ├── db4o 8.0 │ ├── Db4objects.Db4o.Linq.dll │ └── Db4objects.Db4o.dll └── xval │ ├── Optional │ ├── Internationalization │ │ └── xVal.Messages.en-US.js │ └── RulesProviders │ │ ├── xVal.RulesProviders.CastleValidator.dll │ │ └── xVal.RulesProviders.NHibernateValidator.dll │ ├── xVal.AspNetNative.js │ ├── xVal.dll │ ├── xVal.jquery.validate.js │ └── xVal.license.txt ├── nuget.config ├── packages └── repositories.config └── vstest.executionengine.x86.pdb └── 746DB072234140F88238CFB5E6BA0E2B1 └── download.error /.gitignore: -------------------------------------------------------------------------------- 1 | _ReSharper.**.suo 2 | *.ReSharper 3 | _ReSharper.Caches/ 4 | *.user 5 | Build/ 6 | bin/ 7 | obj/ 8 | Samples/*/App_Data/* 9 | 10 | /Samples/Commons.Sample.Web.NerdDinner 11 | *.suo 12 | **.svn** 13 | packages/ 14 | lib/Sitecore/ 15 | _ReSharper.BoC/ 16 | UpgradeLog.* 17 | *.nupkg 18 | -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/.nuget/NuGet.exe -------------------------------------------------------------------------------- /.nuget/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /BoC.4.5.resharper: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Boc.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Boc.snk -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | Copyright (c) 2010 Chris van de Steeg 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BoC needs some documentation, but contains lots of usefull stuff like 2 | * EventAggregator pattern implementation 3 | * Inversion of Control wrapper (although being an anti-pattern, still very usefull. see other BoC packages like BoC.InversionOfControl.Unity for implementations) 4 | * UnitOfWork pattern implementation (see other BoC packages like BoC.Persistence.NHibernate for implementations) 5 | * Bootstrapper and Background task pattern implementation 6 | * Logging wrapper (see BoC.Logging.log4net for implementation) 7 | * Persistence repository and service pattern implementation (see other BoC packages like BoC.Persistence.NHibernate for implementations) 8 | 9 | #BoC and Sitecore 10 | If you would like to get started with the BoC and Sitecore, follow this excellent tutorial by Guido van Tricht: 11 | http://guidovtricht.nl/2015/07/sitecore-mvc-musicstore-part-1/ 12 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.DryIoC/BoC.InversionOfControl.DryIoC.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Copyright 2014 14 | BoC,InversionOfControl,DryIOC 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.DryIoC/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Ninject/BoC.InversionOfControl.Ninject.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Copyright 2014 14 | BoC,InversionOfControl,Ninject 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Ninject/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Ninject.Syntax; 7 | using Ninject.Web.Common; 8 | 9 | namespace BoC.InversionOfControl.Ninject 10 | { 11 | public static class Extensions 12 | { 13 | public static IBindingNamedWithOrOnSyntax SetLifeStyle(this IBindingInSyntax registration, LifetimeScope lifeTimeKey) 14 | { 15 | switch (lifeTimeKey) 16 | { 17 | case LifetimeScope.Unowned: 18 | return registration.InTransientScope(); 19 | case LifetimeScope.PerHttpRequest: 20 | return registration.InRequestScope(); 21 | case LifetimeScope.PerThread: 22 | return registration.InThreadScope(); 23 | case LifetimeScope.Singleton: 24 | return registration.InSingletonScope(); 25 | default: 26 | return registration.InTransientScope(); 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Ninject/NinjectWebActivator.cs: -------------------------------------------------------------------------------- 1 | 2 | using BoC.InversionOfControl.Ninject; 3 | using Ninject.Web.Common; 4 | 5 | [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(NinjectWebActivator), "Start")] 6 | 7 | namespace BoC.InversionOfControl.Ninject 8 | { 9 | /// Provides the bootstrapping for integrating Unity with ASP.NET MVC. 10 | public static class NinjectWebActivator 11 | { 12 | /// Integrates Unity when the application starts. 13 | public static void Start() 14 | { 15 | Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule)); 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Ninject/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.SimpleInjector/BoC.InversionOfControl.SimpleInjector.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Copyright 2014 14 | BoC,InversionOfControl,SimpleInjector 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.SimpleInjector/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.SimpleInjector/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Unity/App_Start/UnityMvcActivator.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl.Unity; 2 | using Microsoft.Practices.Unity.Mvc; 3 | 4 | [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(UnityWebActivator), "Start")] 5 | 6 | namespace BoC.InversionOfControl.Unity 7 | { 8 | /// Provides the bootstrapping for integrating Unity with ASP.NET MVC. 9 | public static class UnityWebActivator 10 | { 11 | /// Integrates Unity when the application starts. 12 | public static void Start() 13 | { 14 | Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule)); 15 | } 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Unity/BoC.InversionOfControl.Unity.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Copyright 2014 14 | BoC,InversionOfControl,Unity 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Unity/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.InversionOfControl.Unity/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/Commons.Logging.Log4Net/BoC.Logging.Log4Net.2.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Src/Commons.Logging.Log4Net/BoC.Logging.Log4Net.2.0.0.0.nupkg -------------------------------------------------------------------------------- /Src/Commons.Logging.Log4Net/BoC.Logging.Log4Net.2.0.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Src/Commons.Logging.Log4Net/BoC.Logging.Log4Net.2.0.1.0.nupkg -------------------------------------------------------------------------------- /Src/Commons.Logging.Log4Net/BoC.Logging.Log4Net.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Summary of changes made in this release of the package. 14 | Copyright 2014 15 | BoC,Logging,Log4net 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/Commons.Logging.Log4Net/DefaultSetupTasks/InitDefaultLoggerTask.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | 3 | namespace BoC.Logging.Log4Net.DefaultSetupTasks 4 | { 5 | public class InitDefaultLoggerTask : IContainerInitializer 6 | { 7 | private readonly IDependencyResolver dependencyResolver; 8 | 9 | public InitDefaultLoggerTask(IDependencyResolver dependencyResolver) 10 | { 11 | this.dependencyResolver = dependencyResolver; 12 | } 13 | 14 | public void Execute() 15 | { 16 | if (!dependencyResolver.IsRegistered()) 17 | { 18 | log4net.Config.XmlConfigurator.Configure(); 19 | dependencyResolver.RegisterType(); 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/Commons.Logging.Log4Net/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Commons.Logging.Sitecore/BoC.Logging.Sitecore.2.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Src/Commons.Logging.Sitecore/BoC.Logging.Sitecore.2.0.0.0.nupkg -------------------------------------------------------------------------------- /Src/Commons.Logging.Sitecore/BoC.Logging.Sitecore.2.0.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Src/Commons.Logging.Sitecore/BoC.Logging.Sitecore.2.0.1.0.nupkg -------------------------------------------------------------------------------- /Src/Commons.Logging.Sitecore/BoC.Logging.Sitecore.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Summary of changes made in this release of the package. 14 | Copyright 2014 15 | BoC,Logging,Sitecore 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/Commons.Logging.Sitecore/DefaultSetupTasks/InitDefaultLoggerTask.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | 3 | namespace BoC.Logging.Sitecore.DefaultSetupTasks 4 | { 5 | public class InitDefaultLoggerTask : IContainerInitializer 6 | { 7 | private readonly IDependencyResolver dependencyResolver; 8 | 9 | public InitDefaultLoggerTask(IDependencyResolver dependencyResolver) 10 | { 11 | this.dependencyResolver = dependencyResolver; 12 | } 13 | 14 | public void Execute() 15 | { 16 | if (!dependencyResolver.IsRegistered()) 17 | { 18 | log4net.Config.XmlConfigurator.Configure(); 19 | dependencyResolver.RegisterSingleton(); 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/Commons.Logging.Sitecore/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NHibernate/BoC.Persistence.NHibernate.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | 14 | Copyright 2014 15 | BoC,Persistence,Nhibernate 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NHibernate/DataContext/DataContextWorkSessionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using NHibernate; 7 | 8 | namespace BoC.Persistence.NHibernate.DataContext 9 | { 10 | public class DataContextSessionManager: ISessionManager 11 | { 12 | public ISession Session 13 | { 14 | get 15 | { 16 | if (NHibernateDataContext.OuterDataContext == null) 17 | { 18 | throw new DataContextException("You are using DataContextSessionManager but are accessing a session outside a unit of work"); 19 | } 20 | return ((NHibernateDataContext)NHibernateDataContext.OuterDataContext).Session; 21 | } 22 | } 23 | 24 | 25 | } 26 | 27 | public class DataContextException : Exception 28 | { 29 | public DataContextException() { } 30 | public DataContextException(string message) : base(message) { } 31 | public DataContextException(string message, Exception innerException) : base(message, innerException) { } 32 | protected DataContextException(SerializationInfo info, StreamingContext context) : base(info, context) { } 33 | } 34 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.NHibernate/DefaultSetupTasks/AutoNhibernateRepositoryGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using BoC.Helpers; 4 | using BoC.InversionOfControl; 5 | using BoC.Persistence.NHibernate; 6 | 7 | namespace BoC.Persistence.DefaultSetupTasks 8 | { 9 | public class AutoNhibernateRepositoryGenerator : IContainerInitializer 10 | { 11 | private readonly IDependencyResolver dependencyResolver; 12 | private readonly IAppDomainHelper[] _appDomainHelpers; 13 | 14 | public AutoNhibernateRepositoryGenerator(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 15 | { 16 | this.dependencyResolver = dependencyResolver; 17 | _appDomainHelpers = appDomainHelpers; 18 | } 19 | 20 | public void Execute() 21 | { 22 | var orm = ConfigurationManager.AppSettings["BoC.Persistence.Orm"]; 23 | if (orm != null && !orm.Equals("nhibernate", StringComparison.InvariantCultureIgnoreCase)) 24 | return; 25 | 26 | var defaultBaseType = typeof(NHRepository<>); 27 | var constructorParams = new[] { typeof(ISessionManager) }; 28 | 29 | RepositoryGenerator.GenerateRepositories(dependencyResolver, defaultBaseType, constructorParams, _appDomainHelpers); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.NHibernate/ISessionManager.cs: -------------------------------------------------------------------------------- 1 | using NHibernate; 2 | 3 | namespace BoC.Persistence.NHibernate 4 | { 5 | public interface ISessionManager 6 | { 7 | ISession Session { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.NHibernate/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NHibernate/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/DataContext/NormDataContext.cs: -------------------------------------------------------------------------------- 1 | using BoC.DataContext; 2 | using Norm; 3 | 4 | namespace BoC.Persistence.Norm.DataContext 5 | { 6 | public class NormDataContext : BaseThreadSafeSingleDataContext 7 | { 8 | private readonly ISessionFactory sessionFactory; 9 | private IMongo mongo; 10 | 11 | public NormDataContext(ISessionFactory sessionFactory) 12 | { 13 | this.sessionFactory = sessionFactory; 14 | } 15 | 16 | override protected void CleanUpOuterDataContext() 17 | { 18 | if (mongo == null) return; 19 | 20 | mongo.Dispose(); 21 | mongo = null; 22 | } 23 | 24 | public IMongo Session 25 | { 26 | get 27 | { 28 | if (OuterDataContext == this) 29 | { 30 | return mongo ?? (mongo = sessionFactory.CreateSession()); 31 | } 32 | return OuterDataContext != null ? ((NormDataContext)OuterDataContext).Session : null; 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/DataContext/NormDataContextSessionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using BoC.Persistence.Norm; 4 | using Norm; 5 | 6 | namespace BoC.Persistence.Norm.DataContext 7 | { 8 | public class NormDataContextSessionManager: ISessionManager 9 | { 10 | public IMongo Session 11 | { 12 | get 13 | { 14 | if (NormDataContext.OuterDataContext == null) 15 | { 16 | throw new DataContextException("You are using DataContextSessionManager but are accessing a session outside a unit of work"); 17 | } 18 | return ((NormDataContext)NormDataContext.OuterDataContext).Session; 19 | } 20 | } 21 | 22 | 23 | } 24 | 25 | public class DataContextException : Exception 26 | { 27 | public DataContextException() { } 28 | public DataContextException(string message) : base(message) { } 29 | public DataContextException(string message, Exception innerException) : base(message, innerException) { } 30 | protected DataContextException(SerializationInfo info, StreamingContext context) : base(info, context) { } 31 | } 32 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/DefaultSessionFactory.cs: -------------------------------------------------------------------------------- 1 | using Norm; 2 | 3 | namespace BoC.Persistence.Norm 4 | { 5 | public class DefaultSessionFactory: ISessionFactory 6 | { 7 | //this looks for a connection string in your Web.config - you can override this if you want 8 | public static string ConnectionString = "MongoDB"; 9 | public IMongo CreateSession() 10 | { 11 | return Mongo.Create(ConnectionString); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/DefaultSetupTasks/AutoNormRepositoryGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using BoC.Helpers; 4 | using BoC.InversionOfControl; 5 | using BoC.Persistence.Norm; 6 | 7 | namespace BoC.Persistence.Norm.DefaultSetupTasks 8 | { 9 | public class AutoNormRepositoryGenerator : IContainerInitializer 10 | { 11 | private readonly IDependencyResolver dependencyResolver; 12 | private readonly IAppDomainHelper[] _appDomainHelpers; 13 | 14 | public AutoNormRepositoryGenerator(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 15 | { 16 | this.dependencyResolver = dependencyResolver; 17 | _appDomainHelpers = appDomainHelpers; 18 | } 19 | 20 | public void Execute() 21 | { 22 | var orm = ConfigurationManager.AppSettings["BoC.Persistence.Orm"]; 23 | if (orm != null && !orm.Equals("norm", StringComparison.InvariantCultureIgnoreCase)) 24 | return; 25 | 26 | var defaultBaseType = typeof(NormRepository<>); 27 | var constructorParams = new Type[] { typeof(ISessionManager) }; 28 | 29 | RepositoryGenerator.GenerateRepositories(dependencyResolver, defaultBaseType, constructorParams, _appDomainHelpers); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/ISessionFactory.cs: -------------------------------------------------------------------------------- 1 | using Norm; 2 | 3 | namespace BoC.Persistence.Norm 4 | { 5 | public interface ISessionFactory 6 | { 7 | IMongo CreateSession(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/ISessionManager.cs: -------------------------------------------------------------------------------- 1 | using Norm; 2 | 3 | namespace BoC.Persistence.Norm 4 | { 5 | public interface ISessionManager 6 | { 7 | IMongo Session { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.NoRM/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/BoC.Persistence.SitecoreGlass.Core.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Copyright 2014 14 | BoC,Persistence,Glass,Mapper,ORM,Repository,Sitecore 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/ContentSearchContextIndexNameProvider.cs: -------------------------------------------------------------------------------- 1 | using Sitecore; 2 | 3 | namespace BoC.Persistence.SitecoreGlass 4 | { 5 | public class ContentSearchContextIndexNameProvider : IIndexNameProvider 6 | { 7 | public string GetIndexName() 8 | { 9 | var currentDatabase = Context.Database ?? Context.ContentDatabase;; 10 | 11 | return currentDatabase == null 12 | ? string.Empty 13 | : string.Format("sitecore_{0}_index", currentDatabase.Name); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/ContextDatabaseProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Sitecore.Data; 3 | using Sitecore; 4 | 5 | namespace BoC.Persistence.SitecoreGlass 6 | { 7 | public class ContextDatabaseProvider : IDatabaseProvider 8 | { 9 | public Database GetDatabase() 10 | { 11 | return Context.Database ?? Context.ContentDatabase; 12 | } 13 | 14 | public CultureInfo GetCulture() 15 | { 16 | return Context.Language.CultureInfo; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/CustomDatabaseProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Sitecore.Data; 3 | using Sitecore; 4 | 5 | namespace BoC.Persistence.SitecoreGlass 6 | { 7 | public class CustomDatabaseProvider : IDatabaseProvider 8 | { 9 | private readonly string _dbName; 10 | 11 | public CustomDatabaseProvider(string dbName, string cultureName = null) 12 | { 13 | _dbName = dbName; 14 | if (cultureName != null) 15 | { 16 | Culture = CultureInfo.GetCultureInfo(cultureName); 17 | } 18 | } 19 | 20 | public Database GetDatabase() 21 | { 22 | return Database.GetDatabase(_dbName); 23 | } 24 | 25 | public CultureInfo Culture { get; set; } 26 | 27 | public CultureInfo GetCulture() 28 | { 29 | return Culture ?? Context.Language.CultureInfo; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/DataContext/DataContextException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace BoC.Persistence.SitecoreGlass.DataContext 5 | { 6 | public class DataContextException : Exception 7 | { 8 | public DataContextException() { } 9 | public DataContextException(string message) : base(message) { } 10 | public DataContextException(string message, Exception innerException) : base(message, innerException) { } 11 | protected DataContextException(SerializationInfo info, StreamingContext context) : base(info, context) { } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/DataContext/SitecoreBucketDataContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sitecore.ContentSearch; 3 | using Sitecore.ContentSearch.Security; 4 | using Sitecore.Data; 5 | using Sitecore.Data.Items; 6 | 7 | namespace BoC.Persistence.SitecoreGlass.DataContext 8 | { 9 | public class SitecoreBucketDataContext : SitecoreDataContext 10 | { 11 | private Item _item; 12 | 13 | private SitecoreBucketDataContext(Item item) : base(null) 14 | { 15 | _item = item; 16 | } 17 | 18 | public static SitecoreBucketDataContext BeginDataContext(Guid itemId, Database db) 19 | { 20 | return new SitecoreBucketDataContext(db.GetItem(ID.Parse(itemId))); 21 | } 22 | 23 | public override IProviderSearchContext IndexSearchContext 24 | { 25 | get 26 | { 27 | if (this._index == null) 28 | this._index = ContentSearchManager.GetIndex((SitecoreIndexableItem)_item).CreateSearchContext(); 29 | return this._index; 30 | } 31 | } 32 | 33 | protected override void CleanUpOuterDataContext() 34 | { 35 | _item = null; 36 | base.CleanUpOuterDataContext(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/DataContext/SitecoreDataContextDatabaseProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using BoC.DataContext; 3 | using BoC.Persistence.SitecoreGlass.DataContext; 4 | using Sitecore.Data; 5 | using Sitecore; 6 | 7 | namespace BoC.Persistence.SitecoreGlass 8 | { 9 | public class SitecoreDataContextDatabaseProvider : IDatabaseProvider 10 | { 11 | public Database GetDatabase() 12 | { 13 | if (!(BaseThreadSafeSingleDataContext.CurrentDataContext is SitecoreDataContext)) 14 | { 15 | throw new DataContextException("You are using SitecoreDataContextDatabaseProvider but are accessing a session outside a SitecoreDataContext"); 16 | } 17 | return ((SitecoreDataContext)SitecoreDataContext.CurrentDataContext).GetDatabase(); 18 | } 19 | 20 | public CultureInfo GetCulture() 21 | { 22 | if (!(BaseThreadSafeSingleDataContext.CurrentDataContext is SitecoreDataContext)) 23 | { 24 | throw new DataContextException("You are using SitecoreDataContextDatabaseProvider but are accessing a session outside a SitecoreDataContext"); 25 | } 26 | return ((SitecoreDataContext)SitecoreDataContext.CurrentDataContext).GetCultureInfo(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/DataContext/SitecoreDataContextIndexSearchContextProvider.cs: -------------------------------------------------------------------------------- 1 | using BoC.DataContext; 2 | using Sitecore.ContentSearch; 3 | using Sitecore.Search; 4 | 5 | namespace BoC.Persistence.SitecoreGlass.DataContext 6 | { 7 | public class SitecoreDataContextIndexSearchContextProvider : IProviderSearchContextProvider 8 | { 9 | public IProviderSearchContext GetProviderSearchContext() 10 | { 11 | if (!(BaseThreadSafeSingleDataContext.CurrentDataContext is SitecoreDataContext)) 12 | { 13 | throw new DataContextException("You are using SitecoreDataContextIndexProvider but are accessing a session outside a SitecoreDataContext"); 14 | } 15 | return ((SitecoreDataContext)SitecoreDataContext.CurrentDataContext).IndexSearchContext; 16 | 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/IDatabaseProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using Sitecore.Data; 3 | 4 | namespace BoC.Persistence.SitecoreGlass 5 | { 6 | public interface IDatabaseProvider 7 | { 8 | Database GetDatabase(); 9 | CultureInfo GetCulture(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/IIndexNameProvider.cs: -------------------------------------------------------------------------------- 1 | using Sitecore.Data.Items; 2 | 3 | namespace BoC.Persistence.SitecoreGlass 4 | { 5 | public interface IIndexNameProvider 6 | { 7 | string GetIndexName(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/IIndexSearchContextProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sitecore.ContentSearch; 3 | using Sitecore.Data.Items; 4 | using Sitecore.Search; 5 | 6 | namespace BoC.Persistence.SitecoreGlass 7 | { 8 | public interface IProviderSearchContextProvider 9 | { 10 | IProviderSearchContext GetProviderSearchContext(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/ISitecoreServiceProvider.cs: -------------------------------------------------------------------------------- 1 | using Glass.Mapper.Sc; 2 | 3 | namespace BoC.Persistence.SitecoreGlass 4 | { 5 | public interface ISitecoreServiceProvider 6 | { 7 | ISitecoreService GetSitecoreService(); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/Profiling/SitecorePerformanceProfiler.cs: -------------------------------------------------------------------------------- 1 | using BoC.Profiling; 2 | 3 | namespace BoC.Persistence.SitecoreGlass.Profiling 4 | { 5 | public class SitecorePerformanceProfiler: IPerformanceProfiler 6 | { 7 | public void BeginSession(string key) 8 | { 9 | Sitecore.Diagnostics.Profiler.StartOperation(key); 10 | } 11 | 12 | public void EndSession(string key) 13 | { 14 | Sitecore.Diagnostics.Profiler.EndOperation(key); 15 | } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/SitecoreServiceProvider.cs: -------------------------------------------------------------------------------- 1 | using BoC.Persistence.SitecoreGlass; 2 | using Glass.Mapper.Sc; 3 | 4 | 5 | namespace BoC.Persistence.SitecoreGlass 6 | { 7 | public class SitecoreServiceProvider : ISitecoreServiceProvider 8 | { 9 | private IDatabaseProvider databaseProvider; 10 | public SitecoreServiceProvider(IDatabaseProvider databaseProvider) 11 | { 12 | this.databaseProvider = databaseProvider; 13 | } 14 | 15 | public ISitecoreService GetSitecoreService() 16 | { 17 | return new SitecoreService(databaseProvider.GetDatabase()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Core/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Models/BoC.Persistence.SitecoreGlass.Models.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | Copyright 2014 14 | BoC,Persistence,Glass,Mapper,ORM,Repository,Sitecore 15 | 16 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Models/Models/ISearchable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using Sitecore.ContentSearch; 5 | 6 | namespace BoC.Persistence.SitecoreGlass.Models 7 | { 8 | public interface ISearchable : ISitecoreItem, ISearchResult 9 | { 10 | [IndexField(BuiltinFields.Parent)] 11 | Guid ParentId { get; set; } 12 | 13 | [ScaffoldColumn(false)] 14 | [IndexField(BuiltinFields.Path)] 15 | IEnumerable ParentIds { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Models/Models/ISitecoreItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using Sitecore.ContentSearch; 5 | using Sitecore.Globalization; 6 | 7 | namespace BoC.Persistence.SitecoreGlass.Models 8 | { 9 | public interface ISitecoreItem : IBaseEntity 10 | { 11 | [IndexField(BuiltinFields.Group)] 12 | new Guid Id { get; set; } 13 | 14 | [IndexField(BuiltinFields.Template)] 15 | Guid TemplateId { get; set; } 16 | 17 | [IndexField(BuiltinFields.FullPath)] 18 | string SitecorePath { get; set; } 19 | 20 | [IndexField(BuiltinFields.Name)] 21 | string Name { get; set; } 22 | 23 | [IndexField(BuiltinFields.DisplayName)] 24 | string DisplayName { get; set; } 25 | 26 | [IndexField(BuiltinFields.Icon)] 27 | string Icon { get; set; } 28 | 29 | IEnumerable Children { get; set; } 30 | 31 | ISitecoreItem Parent { get; set; } 32 | 33 | [IndexField("__sortorder")] 34 | int SortOrder { get; set; } 35 | 36 | [IndexField(BuiltinFields.AllTemplates)] 37 | IEnumerable BaseTemplateIds { get; set; } 38 | 39 | [IndexField(BuiltinFields.Language)] 40 | Language Language { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore.Models/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/DefaultSetupTasks/AutoSitecoreRepositoryGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using BoC.Helpers; 4 | using BoC.InversionOfControl; 5 | using BoC.Logging; 6 | 7 | namespace BoC.Persistence.SitecoreGlass.DefaultSetupTasks 8 | { 9 | public class AutoSitecoreRepositoryGenerator : IContainerInitializer 10 | { 11 | private readonly IDependencyResolver dependencyResolver; 12 | private readonly IAppDomainHelper[] _appDomainHelpers; 13 | 14 | public AutoSitecoreRepositoryGenerator(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 15 | { 16 | this.dependencyResolver = dependencyResolver; 17 | _appDomainHelpers = appDomainHelpers; 18 | } 19 | 20 | public void Execute() 21 | { 22 | var orm = ConfigurationManager.AppSettings["BoC.Persistence.Orm"]; 23 | if (orm != null && !orm.Equals("sitecoreglass", StringComparison.InvariantCultureIgnoreCase)) 24 | return; 25 | 26 | var defaultBaseType = typeof(SitecoreRepository<>); 27 | var constructorParams = new[] { typeof(IDatabaseProvider), typeof(ISitecoreServiceProvider), typeof(IProviderSearchContextProvider), typeof(ILogger) }; 28 | 29 | RepositoryGenerator.GenerateRepositories(dependencyResolver, defaultBaseType, constructorParams, _appDomainHelpers); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/DefaultSetupTasks/RegisterConfigLoader.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | using BoC.Persistence.SitecoreGlass.GlassConfig; 3 | using Glass.Mapper.Configuration; 4 | 5 | namespace BoC.Persistence.SitecoreGlass.DefaultSetupTasks 6 | { 7 | public class RegisterConfigLoader: IContainerInitializer 8 | { 9 | private readonly IDependencyResolver _resolver; 10 | 11 | public RegisterConfigLoader(IDependencyResolver resolver) 12 | { 13 | _resolver = resolver; 14 | } 15 | 16 | public void Execute() 17 | { 18 | _resolver.RegisterType(); 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/DefaultSetupTasks/RegisterPerformanceProfilers.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | using BoC.Persistence.SitecoreGlass.Profiling; 3 | using BoC.Profiling; 4 | 5 | namespace BoC.Persistence.SitecoreGlass.DefaultSetupTasks 6 | { 7 | 8 | public class ContainerRegistrations: IContainerInitializer 9 | { 10 | private readonly IDependencyResolver _resolver; 11 | 12 | public ContainerRegistrations(IDependencyResolver resolver) 13 | { 14 | _resolver = resolver; 15 | } 16 | 17 | public void Execute() 18 | { 19 | _resolver.RegisterSingleton(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/DefaultSetupTasks/RegisterValueProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web.Mvc; 3 | using BoC.Tasks; 4 | 5 | namespace BoC.Persistence.SitecoreGlass.DefaultSetupTasks 6 | { 7 | public class RegisterValueProvider : IBootstrapperTask 8 | { 9 | public void Execute() 10 | { 11 | var index = ValueProviderFactories.Factories.FirstOrDefault(f => f is ChildActionValueProviderFactory); 12 | if (index != null) 13 | { 14 | ValueProviderFactories.Factories.Insert(ValueProviderFactories.Factories.IndexOf(index) + 1, new ParametersTemplateValueProviderFactory()); 15 | } 16 | else 17 | { 18 | ValueProviderFactories.Factories.Add(new ParametersTemplateValueProviderFactory()); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/GlassConfig/AppDomainHelperConfigLoader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using BoC.Helpers; 4 | using Glass.Mapper.Configuration; 5 | using Glass.Mapper.Configuration.Attributes; 6 | 7 | namespace BoC.Persistence.SitecoreGlass.GlassConfig 8 | { 9 | public class AppDomainHelperConfigLoader : IConfigurationLoader 10 | { 11 | private readonly IAppDomainHelper[] _helpers; 12 | public AppDomainHelperConfigLoader(IAppDomainHelper[] helpers) 13 | { 14 | _helpers = helpers; 15 | } 16 | 17 | public IEnumerable Load() 18 | { 19 | return 20 | _helpers.SelectMany(helper => helper.GetTypes(t => true), 21 | (helper, type) => new AttributeTypeLoader(type)) 22 | .Select(loader => loader.Load().FirstOrDefault()) 23 | .Where(config => config != null) 24 | .ToList(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | Copyright (c) 2010 Chris van de Steeg 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.Sitecore/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.UmbracoGlass/DefaultSetupTask/AutoUmbracoConfigurator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using BoC.InversionOfControl; 4 | 5 | namespace BoC.Persistence.UmbracoGlass.DefaultSetupTask 6 | { 7 | public class AutoUmbracoConfigurator : IContainerInitializer 8 | { 9 | private readonly IDependencyResolver _dependencyResolver; 10 | 11 | public AutoUmbracoConfigurator(IDependencyResolver dependencyResolver) 12 | { 13 | _dependencyResolver = dependencyResolver; 14 | } 15 | 16 | public void Execute() 17 | { 18 | var orm = ConfigurationManager.AppSettings["BoC.Persistence.Orm"]; 19 | if (orm != null && !orm.Equals("umbracoglass", StringComparison.InvariantCultureIgnoreCase)) 20 | return; 21 | 22 | if (!_dependencyResolver.IsRegistered()) 23 | { 24 | _dependencyResolver.RegisterSingleton(); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.UmbracoGlass/DefaultSetupTask/AutoUmbracoRepositoryGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using BoC.Helpers; 4 | using BoC.InversionOfControl; 5 | 6 | namespace BoC.Persistence.UmbracoGlass.DefaultSetupTask 7 | { 8 | public class AutoUmbracoRepositoryGenerator : IContainerInitializer 9 | { 10 | private readonly IDependencyResolver _dependencyResolver; 11 | private readonly IAppDomainHelper[] _appDomainHelpers; 12 | 13 | public AutoUmbracoRepositoryGenerator(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 14 | { 15 | _dependencyResolver = dependencyResolver; 16 | _appDomainHelpers = appDomainHelpers; 17 | } 18 | 19 | public void Execute() 20 | { 21 | var orm = ConfigurationManager.AppSettings["BoC.Persistence.Orm"]; 22 | if (orm != null && !orm.Equals("umbracoglass", StringComparison.InvariantCultureIgnoreCase)) 23 | return; 24 | 25 | var defaultBaseType = typeof(UmbracoRepository<>); 26 | var constructorParams = new[] {typeof (IUmbracoServiceProvider)}; 27 | 28 | RepositoryGenerator.GenerateRepositories(_dependencyResolver, defaultBaseType, constructorParams, _appDomainHelpers); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.UmbracoGlass/IUmbracoServiceProvider.cs: -------------------------------------------------------------------------------- 1 | using Glass.Mapper.Umb; 2 | 3 | namespace BoC.Persistence.UmbracoGlass 4 | { 5 | public interface IUmbracoServiceProvider 6 | { 7 | IUmbracoService GetUmbracoService(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.UmbracoGlass/UmbracoServiceProvider.cs: -------------------------------------------------------------------------------- 1 | using Glass.Mapper.Umb; 2 | using Umbraco.Core.Services; 3 | 4 | namespace BoC.Persistence.UmbracoGlass 5 | { 6 | public class UmbracoServiceProvider : IUmbracoServiceProvider 7 | { 8 | public IUmbracoService GetUmbracoService() 9 | { 10 | return new UmbracoService(new ContentService()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.XPO/DataContext/XpoDataContextSessionFactory.cs: -------------------------------------------------------------------------------- 1 | using DevExpress.Xpo; 2 | 3 | namespace BoC.Persistence.Xpo.DataContext 4 | { 5 | public class XpoDataContextSessionFactory: ISessionFactory 6 | { 7 | public Session OpenSession() 8 | { 9 | return new DevExpress.Xpo.UnitOfWork(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.XPO/DataContext/XpoDataContextSessionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using DevExpress.Xpo; 4 | 5 | namespace BoC.Persistence.Xpo.DataContext 6 | { 7 | public class XpoDataContextSessionManager: ISessionManager 8 | { 9 | public Session Session 10 | { 11 | get 12 | { 13 | if (XpoDataContext.OuterDataContext == null) 14 | { 15 | throw new DataContextException("You are using DataContextSessionManager but are accessing a session outside a unit of work"); 16 | } 17 | return ((XpoDataContext)XpoDataContext.OuterDataContext).Session; 18 | } 19 | } 20 | 21 | 22 | } 23 | 24 | public class DataContextException : Exception 25 | { 26 | public DataContextException() { } 27 | public DataContextException(string message) : base(message) { } 28 | public DataContextException(string message, Exception innerException) : base(message, innerException) { } 29 | protected DataContextException(SerializationInfo info, StreamingContext context) : base(info, context) { } 30 | } 31 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.XPO/DefaultSetupTasks/AutoXpoConfigurator.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | using BoC.Persistence.Xpo.DataContext; 3 | using BoC.DataContext; 4 | 5 | namespace BoC.Persistence.Xpo.DefaultSetupTasks 6 | { 7 | public class AutoXpoConfigurator : IContainerInitializer 8 | { 9 | private readonly IDependencyResolver dependencyResolver; 10 | 11 | public AutoXpoConfigurator(IDependencyResolver dependencyResolver) 12 | { 13 | this.dependencyResolver = dependencyResolver; 14 | } 15 | 16 | public void Execute() 17 | { 18 | if (!dependencyResolver.IsRegistered()) 19 | { 20 | dependencyResolver.RegisterType(); 21 | } 22 | 23 | if (!dependencyResolver.IsRegistered()) 24 | { 25 | //IoC.RegisterSingleton(); 26 | dependencyResolver.RegisterSingleton(); 27 | } 28 | 29 | if (!dependencyResolver.IsRegistered()) 30 | { 31 | dependencyResolver.RegisterType(); 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.XPO/DefaultSetupTasks/AutoXpoRepositoryGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BoC.Helpers; 3 | using BoC.InversionOfControl; 4 | using BoC.Persistence.NHibernate; 5 | 6 | namespace BoC.Persistence.Xpo.DefaultSetupTasks 7 | { 8 | public class AutoXpoRepositoryGenerator : IContainerInitializer 9 | { 10 | private readonly IDependencyResolver dependencyResolver; 11 | private readonly IAppDomainHelper[] _appDomainHelpers; 12 | 13 | public AutoXpoRepositoryGenerator(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 14 | { 15 | this.dependencyResolver = dependencyResolver; 16 | _appDomainHelpers = appDomainHelpers; 17 | } 18 | 19 | public void Execute() 20 | { 21 | var defaultBaseType = typeof(XpoRepository<>); 22 | var constructorParams = new Type[] { typeof(ISessionManager) }; 23 | 24 | RepositoryGenerator.GenerateRepositories(dependencyResolver, defaultBaseType, constructorParams, _appDomainHelpers); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.XPO/ISessionFactory.cs: -------------------------------------------------------------------------------- 1 | using DevExpress.Xpo; 2 | 3 | namespace BoC.Persistence.Xpo 4 | { 5 | public interface ISessionFactory 6 | { 7 | Session OpenSession(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.XPO/ISessionManager.cs: -------------------------------------------------------------------------------- 1 | using DevExpress.Xpo; 2 | 3 | namespace BoC.Persistence.Xpo 4 | { 5 | public interface ISessionManager 6 | { 7 | Session Session { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/DataContext/Db4oDataContextSessionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using Db4objects.Db4o; 7 | 8 | namespace BoC.Persistence.db4o.DataContext 9 | { 10 | public class Db4oDataContextSessionManager : ISessionManager 11 | { 12 | public IObjectContainer Session 13 | { 14 | get 15 | { 16 | if (Db4oDataContext.OuterDataContext == null) 17 | { 18 | throw new DataContextException("You are using DataContextSessionManager but are accessing a session outside a unit of work"); 19 | } 20 | return ((Db4oDataContext)Db4oDataContext.OuterDataContext).Session; 21 | } 22 | } 23 | } 24 | 25 | public class DataContextException : Exception 26 | { 27 | public DataContextException() { } 28 | public DataContextException(string message) : base(message) { } 29 | public DataContextException(string message, Exception innerException) : base(message, innerException) { } 30 | protected DataContextException(SerializationInfo info, StreamingContext context) : base(info, context) { } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/DefaultSetupTasks/AutoDb4oRepositoryGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using BoC.Helpers; 4 | using BoC.InversionOfControl; 5 | using BoC.Persistence; 6 | using BoC.Persistence.db4o.Repository; 7 | 8 | namespace BoC.Persistence.db4o.DefaultSetupTasks 9 | { 10 | public class AutoDb4oRepositoryGenerator : IContainerInitializer 11 | { 12 | private readonly IDependencyResolver _dependencyResolver; 13 | private readonly IAppDomainHelper[] _appDomainHelpers; 14 | 15 | public AutoDb4oRepositoryGenerator(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 16 | { 17 | this._dependencyResolver = dependencyResolver; 18 | _appDomainHelpers = appDomainHelpers; 19 | } 20 | 21 | public void Execute() 22 | { 23 | var orm = ConfigurationManager.AppSettings["BoC.Persistence.Orm"]; 24 | if (orm != null && !orm.Equals("db4o", StringComparison.InvariantCultureIgnoreCase)) 25 | return; 26 | 27 | var defaultBaseType = typeof(Db4oRepository<>); 28 | var constructorParams = new[] { typeof(ISessionManager) }; 29 | 30 | RepositoryGenerator.GenerateRepositories(_dependencyResolver, defaultBaseType, constructorParams, _appDomainHelpers); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/IConfigurationExtender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Db4objects.Db4o.Config; 6 | 7 | namespace BoC.Persistence.db4o 8 | { 9 | public interface IConfigurationExtender 10 | { 11 | void Configure(IEmbeddedConfiguration configuration); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/ISessionFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Db4objects.Db4o; 6 | 7 | namespace BoC.Persistence.db4o 8 | { 9 | public interface ISessionFactory : IDisposable 10 | { 11 | IObjectContainer CreateSession(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/ISessionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Db4objects.Db4o; 6 | 7 | namespace BoC.Persistence.db4o 8 | { 9 | public interface ISessionManager 10 | { 11 | IObjectContainer Session { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/Repository/Db4oEnlist.cs: -------------------------------------------------------------------------------- 1 | using System.Transactions; 2 | 3 | using Db4objects.Db4o; 4 | 5 | namespace BoC.Persistence.db4o.Repository 6 | { 7 | public class Db4oEnlist : IEnlistmentNotification 8 | { 9 | private IObjectContainer container; 10 | private object oldItem; 11 | 12 | public Db4oEnlist(IObjectContainer container, object item) 13 | { 14 | this.container = container; 15 | oldItem = item; 16 | } 17 | 18 | #region IEnlistmentNotification 19 | 20 | public void Commit(Enlistment enlistment) 21 | { 22 | container.Commit(); 23 | oldItem = null; 24 | container = null; 25 | } 26 | 27 | public void InDoubt(Enlistment enlistment) 28 | { 29 | //throw new Exception("The method or operation is not implemented."); 30 | } 31 | 32 | public void Prepare(PreparingEnlistment preparingEnlistment) 33 | { 34 | preparingEnlistment.Prepared(); 35 | } 36 | 37 | public void Rollback(Enlistment enlistment) 38 | { 39 | container.Rollback(); 40 | container.Ext().Refresh(oldItem, int.MaxValue); 41 | oldItem = null; 42 | container = null; 43 | } 44 | 45 | #endregion 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Src/Commons.Persistence.db4o/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/App_Start/RazorGeneratorMvcStart.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.WebPages; 4 | using RazorGenerator.Mvc; 5 | 6 | [assembly: WebActivatorEx.PostApplicationStartMethod(typeof(BoC.Security.Mvc.App_Start.RazorGeneratorMvcStart), "Start")] 7 | 8 | namespace BoC.Security.Mvc.App_Start { 9 | public static class RazorGeneratorMvcStart { 10 | public static void Start() { 11 | var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) { 12 | UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal 13 | }; 14 | 15 | ViewEngines.Engines.Insert(0, engine); 16 | 17 | // StartPage lookups are done by WebPages. 18 | VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/AreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using BoC.Security.Mvc.Controllers; 4 | 5 | namespace BoC.Security.Mvc 6 | { 7 | public class SecurityAreaRegistration : AreaRegistration 8 | { 9 | public override void RegisterArea(AreaRegistrationContext context) 10 | { 11 | context.MapRoute("security_default", "Security/{controller}/{action}/{id}", 12 | new {controller = "Home", action = "index", id = ""}, 13 | new [] {typeof(AccountController).Namespace}); 14 | 15 | context.MapRoute( 16 | "OpenIdDiscover", 17 | "Security/Auth/Discover"); 18 | } 19 | 20 | public override string AreaName 21 | { 22 | get { return "Security"; } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/Init/AddViewEngine.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Hosting; 2 | using System.Web.Mvc; 3 | using System.Web.WebPages; 4 | using BoC.Tasks; 5 | using BoC.Web.Mvc; 6 | using RazorGenerator.Mvc; 7 | 8 | namespace BoC.Security.Mvc.Init 9 | { 10 | public class AddViewEngine : IBootstrapperTask 11 | { 12 | public void Execute() 13 | { 14 | var engine = new CompositePrecompiledMvcEngine(PrecompiledViewAssembly.OfType()); 15 | ViewEngines.Engines.Add(engine); 16 | VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); 17 | } 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/ViewModels/ChangePasswordModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace BoC.Security.Mvc.ViewModels 4 | { 5 | public class ChangePasswordModel 6 | { 7 | [Required] 8 | [DataType(DataType.Password)] 9 | [Display(Name = "Current password")] 10 | public string OldPassword { get; set; } 11 | 12 | [Required] 13 | [MinLength(8)] 14 | [DataType(DataType.Password)] 15 | [Display(Name = "New password")] 16 | public string NewPassword { get; set; } 17 | 18 | [Required] 19 | [DataType(DataType.Password)] 20 | [Display(Name = "Confirm new password")] 21 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 22 | public string ConfirmPassword { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/ViewModels/LogOnModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace BoC.Security.Mvc.ViewModels 4 | { 5 | public class LogOnModel 6 | { 7 | [Required] 8 | [Display(Name = "User name")] 9 | public string UserName { get; set; } 10 | 11 | [Required] 12 | [DataType(DataType.Password)] 13 | [Display(Name = "Password")] 14 | public string Password { get; set; } 15 | 16 | [Display(Name = "Remember me?")] 17 | public bool RememberMe { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/ViewModels/RegisterModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace BoC.Security.Mvc.ViewModels 4 | { 5 | public class RegisterModel 6 | { 7 | [Required] 8 | [Display(Name = "User name")] 9 | public string UserName { get; set; } 10 | 11 | [Required] 12 | [DataType(DataType.EmailAddress)] 13 | [Display(Name = "Email address")] 14 | public string Email { get; set; } 15 | 16 | [Required] 17 | [MinLength(8)] 18 | [DataType(DataType.Password)] 19 | [Display(Name = "Password")] 20 | public string Password { get; set; } 21 | 22 | [Required] 23 | [DataType(DataType.Password)] 24 | [Display(Name = "Confirm password")] 25 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 26 | public string ConfirmPassword { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/Views/Auth/LogOn.cshtml: -------------------------------------------------------------------------------- 1 | @inherits System.Web.Mvc.WebViewPage 2 | @using DotNetOpenAuth.Mvc; 3 | @{ 4 | ViewBag.Title = "Log On"; 5 | } 6 | @section head { 7 | @MvcHtmlString.Create(Html.OpenIdSelectorStyles()) 8 | } 9 | 10 | @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") 11 | @Html.ValidationMessage("_FORM") 12 | @Html.Partial("_LogonOpenId") 13 | @Html.Partial("_LogonNative") 14 | -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/Views/Auth/_LogOnNative.cshtml: -------------------------------------------------------------------------------- 1 | @inherits System.Web.Mvc.WebViewPage 2 | 3 |

Log On

4 |

5 | Please enter your username and password. @Html.ActionLink("Register", "Register") if you don't have an account. 6 |

7 | @using (Html.BeginForm()) { 8 |
9 |
10 | Sign in with a username/password 11 | 12 |
13 | @Html.LabelFor(m => m.UserName) 14 |
15 |
16 | @Html.TextBoxFor(m => m.UserName) 17 | @Html.ValidationMessageFor(m => m.UserName) 18 |
19 | 20 |
21 | @Html.LabelFor(m => m.Password) 22 |
23 |
24 | @Html.PasswordFor(m => m.Password) 25 | @Html.ValidationMessageFor(m => m.Password) 26 |
27 | 28 |
29 | @Html.CheckBoxFor(m => m.RememberMe) 30 | @Html.LabelFor(m => m.RememberMe) 31 |
32 | 33 |

34 | 35 |

36 |
37 |
38 | } 39 | -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/Commons.Security.Mvc/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/Commons.Security.NHibernate/Mappings/Role.cs: -------------------------------------------------------------------------------- 1 | using FluentNHibernate.Automapping; 2 | using FluentNHibernate.Automapping.Alterations; 3 | 4 | namespace BoC.Security.Model.Mappings 5 | { 6 | public class RoleMap : IAutoMappingOverride 7 | { 8 | public void Override(AutoMapping m) 9 | { 10 | m.HasManyToMany(r => r.Users).AsSet().Cascade.SaveUpdate(); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/Commons.Security.NHibernate/Mappings/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FluentNHibernate.Automapping; 3 | using FluentNHibernate.Automapping.Alterations; 4 | 5 | namespace BoC.Security.Model.Mappings 6 | { 7 | public class UserMap : IAutoMappingOverride 8 | { 9 | public void Override(AutoMapping m) 10 | { 11 | m.HasManyToMany(u => u.Roles).Cascade.SaveUpdate().AsSet(); 12 | m.HasMany(u => u.AuthenticationTokens).Cascade.AllDeleteOrphan().AsSet(); 13 | m.IgnoreProperty(u => u.IsOnLine); 14 | m.IgnoreProperty(u => u.Identity); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/Commons.Security.NHibernate/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.Security.NHibernate/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Src/Commons.Security/DefaultSetupTasks/RegisterDefaultUserServices.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | using BoC.Security.Services; 3 | 4 | namespace BoC.Security.DefaultSetupTasks 5 | { 6 | public class RegisterDefaultUserServices : IContainerInitializer 7 | { 8 | private readonly IDependencyResolver dependencyResolver; 9 | 10 | public RegisterDefaultUserServices(IDependencyResolver dependencyResolver) 11 | { 12 | this.dependencyResolver = dependencyResolver; 13 | } 14 | 15 | public void Execute() 16 | { 17 | if (!dependencyResolver.IsRegistered()) 18 | { 19 | dependencyResolver.RegisterType(); 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/Commons.Security/EmailInUseException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BoC.Security; 3 | 4 | namespace BoC.Security 5 | { 6 | public class EmailInUseException : UserServiceException 7 | { 8 | public EmailInUseException(String email) : base("Email", string.Format("The email address {0} is already registered", email)) { } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/Commons.Security/LoginInUseException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Security 4 | { 5 | public class LoginInUseException : UserServiceException 6 | { 7 | public LoginInUseException(String login) : base("Login", string.Format("A user with login {0} already exists", login)) { } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/Commons.Security/Model/AuthenticationToken.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.Persistence; 6 | 7 | namespace BoC.Security.Model 8 | { 9 | public class AuthenticationToken : BaseEntity 10 | { 11 | public virtual User User { get; set; } 12 | public virtual string ClaimedIdentifier { get; set; } 13 | public virtual string FriendlyIdentifier { get; set; } 14 | public virtual DateTime LastUsed { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Src/Commons.Security/Model/Role.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using BoC.Persistence; 5 | 6 | namespace BoC.Security.Model 7 | { 8 | public class Role: BaseEntity 9 | { 10 | public Role() { } 11 | public Role(String roleName) 12 | { 13 | this.RoleName = roleName; 14 | } 15 | 16 | [Required] 17 | virtual public string RoleName { get; set; } 18 | 19 | ICollection users = new HashSet(); 20 | virtual public ICollection Users 21 | { 22 | get { return this.users; } 23 | protected set { this.users = value; } 24 | } 25 | 26 | public override String ToString() 27 | { 28 | return this.RoleName; 29 | } 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /Src/Commons.Security/RoleExistsException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Security 4 | { 5 | public class RoleExistsException : UserServiceException 6 | { 7 | public RoleExistsException(String roleName) : base("RoleName", string.Format("There already is a role with the name {0}", roleName)) { } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/Commons.Security/RoleInUseException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Security 4 | { 5 | public class RoleInUseException : UserServiceException 6 | { 7 | public RoleInUseException(String roleName) : base("RoleName", string.Format("The role with the name {0} is currently assigned to one or more users", roleName)) { } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/Commons.Security/RoleNotFoundException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Security 4 | { 5 | public class RoleNotFoundException : UserServiceException 6 | { 7 | public RoleNotFoundException() : base("RoleName", "The role could not be found") { } 8 | public RoleNotFoundException(String role) : base("RoleName", string.Format("The role with name {0} could not be found", role)) { } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/Commons.Security/Roles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BoC.Security 6 | { 7 | public class Roles 8 | { 9 | public const string ADMINISTRATORS = "Administrators"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/Commons.Security/UserNotFoundException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Security 4 | { 5 | public class UserNotFoundException : UserServiceException 6 | { 7 | public UserNotFoundException() : base("Login", "The user could not be found") { } 8 | public UserNotFoundException(String login) : base("Login", string.Format("The user with login {0} could not be found", login)) { } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/Commons.Security/UserServiceException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using BoC.Validation; 4 | 5 | namespace BoC.Security 6 | { 7 | public class UserServiceException : RulesException 8 | { 9 | public UserServiceException(IEnumerable errors) : base(errors) {} 10 | public UserServiceException(string propertyName, string errorMessage) : base(propertyName, errorMessage) {} 11 | public UserServiceException(string propertyName, string errorMessage, object onObject) : base(propertyName, errorMessage, onObject) {} 12 | } 13 | } -------------------------------------------------------------------------------- /Src/Commons.Sitecore.Mvc/BoC.Sitecore.Mvc.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | $description$ 13 | 14 | Copyright 2014 15 | BoC,Persistence,Glass,Mapper,ORM,Repository,Sitecore 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/Commons.Sitecore.Mvc/Initialize/RegisterValueProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web.Mvc; 3 | using BoC.Tasks; 4 | 5 | namespace BoC.Sitecore.Mvc.Initialize 6 | { 7 | public class RegisterValueProvider : IBootstrapperTask 8 | { 9 | public void Execute() 10 | { 11 | var index = ValueProviderFactories.Factories.FirstOrDefault(f => f is ChildActionValueProviderFactory); 12 | if (index != null) 13 | { 14 | ValueProviderFactories.Factories.Insert(ValueProviderFactories.Factories.IndexOf(index) + 1, new WildcardValueProviderFactory()); 15 | ValueProviderFactories.Factories.Insert(ValueProviderFactories.Factories.IndexOf(index) + 1, new SitecoreValueProviderFactory()); 16 | } 17 | else 18 | { 19 | ValueProviderFactories.Factories.Add(new SitecoreValueProviderFactory()); 20 | ValueProviderFactories.Factories.Add(new WildcardValueProviderFactory()); 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/Commons.Sitecore.Mvc/Initialize/SetDefaultMvcDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | using BoC.EventAggregator; 4 | using BoC.Tasks; 5 | using BoC.Web.Mvc.IoC; 6 | using IDependencyResolver = BoC.InversionOfControl.IDependencyResolver; 7 | 8 | namespace BoC.Sitecore.Mvc.Initialize 9 | { 10 | public class SetDefaultMvcDependencyResolver : IBootstrapperTask 11 | { 12 | public static bool Disabled = false; 13 | private readonly SitecoreSpecificResolver _dependencyResolver; 14 | 15 | public SetDefaultMvcDependencyResolver(IDependencyResolver dependencyResolver, IEventAggregator eventAggregator) 16 | { 17 | if (!Disabled) 18 | { 19 | global::BoC.Web.Mvc.Init.SetDefaultMvcDependencyResolver.Disabled = true; 20 | _dependencyResolver = new SitecoreSpecificResolver(dependencyResolver, eventAggregator); 21 | } 22 | } 23 | 24 | public void Execute() 25 | { 26 | if (!Disabled) 27 | { 28 | DependencyResolver.SetResolver(_dependencyResolver); 29 | GlobalConfiguration.Configuration.DependencyResolver = _dependencyResolver; 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Src/Commons.Sitecore.Mvc/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.Sitecore.Mvc/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/ActionResults/XmlResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Mvc; 6 | using System.Xml.Serialization; 7 | 8 | namespace BoC.Web.Mvc.ActionResults 9 | { 10 | public class XmlResult : ActionResult 11 | { 12 | 13 | public XmlResult(object objectToSerialize) 14 | { 15 | ObjectToSerialize = objectToSerialize; 16 | } 17 | 18 | public object ObjectToSerialize { get; set; } 19 | 20 | /// 21 | /// Serialises the object that was passed into the constructor to XML and writes the corresponding XML to the result stream. 22 | /// 23 | /// The controller context for the current request. 24 | public override void ExecuteResult(ControllerContext context) 25 | { 26 | if (ObjectToSerialize != null) 27 | { 28 | var xs = new XmlSerializer(ObjectToSerialize.GetType()); 29 | context.HttpContext.Response.ContentType = "text/xml"; 30 | xs.Serialize(context.HttpContext.Response.Output, ObjectToSerialize); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Attributes/JsonRequestBehaviorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | 4 | namespace BoC.Web.Mvc.Attributes 5 | { 6 | public class JsonRequestBehaviorAttribute: ActionFilterAttribute 7 | { 8 | public JsonRequestBehaviorAttribute(JsonRequestBehavior jsonRequestBehavior) 9 | { 10 | this.JsonRequestBehavior = jsonRequestBehavior; 11 | } 12 | 13 | public JsonRequestBehavior JsonRequestBehavior { get; set;} 14 | 15 | public override void OnResultExecuting(ResultExecutingContext filterContext) 16 | { 17 | if ((filterContext.Result is JsonResult)) 18 | { 19 | ((JsonResult) filterContext.Result).JsonRequestBehavior = JsonRequestBehavior; 20 | } 21 | base.OnResultExecuting(filterContext); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Attributes/ValidationExceptionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using System.Web; 4 | using BoC.Validation; 5 | using BoC.Web.Mvc.Validation; 6 | 7 | namespace BoC.Web.Mvc.Attributes 8 | { 9 | public class ValidationExceptionAttribute: ActionFilterAttribute, IExceptionFilter 10 | { 11 | public void OnException(ExceptionContext filterContext) 12 | { 13 | if (filterContext == null || filterContext.Exception == null) 14 | return; 15 | 16 | var exception = filterContext.Exception; 17 | if (exception.InnerException is RulesException) 18 | exception = exception.InnerException; 19 | 20 | if (exception is RulesException) 21 | { 22 | ((RulesException) exception).AddModelStateErrors(filterContext.Controller.ViewData.ModelState); 23 | filterContext.ExceptionHandled = true; 24 | } 25 | } 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Binders/DecimalModelBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Mvc; 6 | 7 | namespace BoC.Web.Mvc.Binders 8 | { 9 | public class DecimalModelBinder : DefaultModelBinder 10 | { 11 | public override object BindModel( 12 | ControllerContext controllerContext, 13 | ModelBindingContext bindingContext) 14 | { 15 | var valueProviderResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName); 16 | if (valueProviderResult.AttemptedValue.Equals("N.aN") || valueProviderResult.AttemptedValue.Equals("NaN") || valueProviderResult.AttemptedValue.Equals("Infini.ty") || valueProviderResult.AttemptedValue.Equals("Infinity")) 17 | return 0m; 18 | return valueProviderResult == null ? base.BindModel(controllerContext, bindingContext) : Convert.ToDecimal(valueProviderResult.AttemptedValue); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/BoC.Web.Mvc.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Chris van de Steeg 8 | Chris van de Steeg 9 | https://github.com/csteeg/BoC/blob/master/LICENSE 10 | https://github.com/csteeg/boc 11 | false 12 | Standard MVC stuff for the BoC 13 | Copyright 2014 14 | BoC,Logging,Log4net 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Events/ActionEvents.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Mvc; 6 | using BoC.EventAggregator; 7 | 8 | namespace BoC.Events 9 | { 10 | public class ActionExecutedEvent : BaseEvent{} 11 | public class ActionExecutingEvent : BaseEvent { } 12 | public class ResultExecutingEvent : BaseEvent { } 13 | public class ResultExecutedEvent : BaseEvent { } 14 | 15 | public class ActionExecutedEvent : ActionExecutedEvent { } 16 | public class ActionExecutingEvent : ActionExecutingEvent { } 17 | public class ResultExecutingEvent : ResultExecutingEvent { } 18 | public class ResultExecutedEvent : ResultExecutedEvent { } 19 | } 20 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Extensions/HttpSessionStateBaseExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | 3 | namespace BoC.Web.Mvc.Extensions 4 | { 5 | public static class HttpSessionStateBaseExtensions 6 | { 7 | public static T Get(this HttpSessionStateBase session, string key) where T: class 8 | { 9 | if (session != null && session[key] != null && session[key] is T) 10 | { 11 | return (T)session[key]; 12 | } 13 | return null as T; 14 | } 15 | 16 | public static void Set(this HttpSessionStateBase session, string key, T value) where T : class 17 | { 18 | if (session != null) 19 | { 20 | session[key] = value; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Init/RegisterGlobalFilters.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using BoC.Tasks; 3 | using BoC.Web.Mvc.Attributes; 4 | 5 | namespace BoC.Web.Mvc.Init 6 | { 7 | public class RegisterGlobalFilters : IBootstrapperTask 8 | { 9 | public void Execute() 10 | { 11 | Register(GlobalFilters.Filters); 12 | } 13 | 14 | internal void Register(GlobalFilterCollection filters) 15 | { 16 | filters.Add(new EventTriggerAttribute()); 17 | filters.Add(new HandleErrorAttribute()); 18 | } 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Init/SetDefaultHttpControllerActivator.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Http.Dispatcher; 3 | using BoC.Tasks; 4 | using BoC.Web.Mvc.IoC; 5 | 6 | namespace BoC.Web.Mvc.Init 7 | { 8 | //public class SetDefaultHttpControllerActivator : IBootstrapperTask 9 | //{ 10 | // public void Execute() 11 | // { 12 | // if (GlobalConfiguration.Configuration.Services.GetService(typeof(IHttpControllerActivator)) is DefaultHttpControllerActivator) 13 | // GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerActivator), new IoCHttpControllerActivator()); 14 | // } 15 | 16 | //} 17 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Init/SetDefaultModelBinders.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using BoC.Tasks; 4 | using BoC.Web.Mvc.Binders; 5 | 6 | 7 | namespace BoC.Web.Mvc.Init 8 | { 9 | public class SetDefaultModelBinders : IBootstrapperTask 10 | { 11 | public void Execute() 12 | { 13 | if (!ModelBinders.Binders.ContainsKey(typeof(DateTime))) 14 | ModelBinders.Binders.Add(typeof(DateTime), new DateTimeModelBinder()); 15 | if (!ModelBinders.Binders.ContainsKey(typeof(DateTime?))) 16 | ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeModelBinder()); 17 | if (!ModelBinders.Binders.ContainsKey(typeof(decimal))) 18 | ModelBinders.Binders.Add(typeof(decimal), new DecimalModelBinder()); 19 | if (!ModelBinders.Binders.ContainsKey(typeof(decimal?))) 20 | ModelBinders.Binders.Add(typeof(decimal?), new DecimalModelBinder()); 21 | 22 | } 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Init/SetDefaultMvcDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Linq; 3 | using System.Web.Http; 4 | using System.Web.Mvc; 5 | using BoC.EventAggregator; 6 | using BoC.Tasks; 7 | using BoC.Web.Mvc.IoC; 8 | using IDependencyResolver = BoC.InversionOfControl.IDependencyResolver; 9 | 10 | namespace BoC.Web.Mvc.Init 11 | { 12 | public class SetDefaultMvcDependencyResolver : IBootstrapperTask 13 | { 14 | public static bool Disabled = false; 15 | private readonly BoCDependencyResolver _dependencyResolver; 16 | 17 | public SetDefaultMvcDependencyResolver(IDependencyResolver dependencyResolver, IEventAggregator eventAggregator) 18 | { 19 | _dependencyResolver = new BoCDependencyResolver(dependencyResolver, eventAggregator); 20 | } 21 | 22 | public void Execute() 23 | { 24 | if (!Disabled) 25 | { 26 | DependencyResolver.SetResolver(_dependencyResolver); 27 | GlobalConfiguration.Configuration.DependencyResolver = _dependencyResolver; 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/Init/SetDefaultNameSpace.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web; 4 | using System.Web.Mvc; 5 | using System.Web.Routing; 6 | using BoC.EventAggregator; 7 | using BoC.InversionOfControl; 8 | using BoC.Tasks; 9 | using BoC.Web.Events; 10 | using BoC.Web.Mvc.Attributes; 11 | using BoC.Web.Mvc.Binders; 12 | using IDependencyResolver = BoC.InversionOfControl.IDependencyResolver; 13 | 14 | namespace BoC.Web.Mvc.Init 15 | { 16 | public class SetDefaultNameSpace : IBootstrapperTask 17 | { 18 | private readonly IEventAggregator eventAggregator; 19 | private SubscriptionToken subscriptionToken; 20 | 21 | public SetDefaultNameSpace(IEventAggregator eventAggregator) 22 | { 23 | this.eventAggregator = eventAggregator; 24 | } 25 | 26 | public void Execute() 27 | { 28 | subscriptionToken = eventAggregator.GetEvent().Subscribe(args => 29 | { 30 | var rootNamespace = args.ApplicationInstance.GetType().BaseType.Namespace; 31 | ControllerBuilder.Current.DefaultNamespaces.Add(rootNamespace + ".*"); 32 | 33 | eventAggregator.GetEvent().Unsubscribe(subscriptionToken); 34 | }); 35 | } 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/MetaData/Extensions/AttributeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | 5 | namespace ModelMetadataExtensions.Extensions { 6 | public static class AttributeExtensions { 7 | public static TAttribute GetAttributeOnTypeOrAssembly(this Type type) where TAttribute : Attribute { 8 | var attribute = type.First(); 9 | if (attribute == null) { 10 | attribute = type.Assembly.First(); 11 | } 12 | return attribute; 13 | } 14 | 15 | public static TAttribute First(this ICustomAttributeProvider attributeProvider) where TAttribute : Attribute { 16 | return attributeProvider.GetCustomAttributes(typeof(TAttribute), true).FirstOrDefault() as TAttribute; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/MetaData/Extensions/DisplayAttributeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace ModelMetadataExtensions.Extensions { 4 | public static class DisplayAttributeExtensions { 5 | public static DisplayAttribute Copy(this DisplayAttribute attribute) { 6 | if (attribute == null) { 7 | return null; 8 | } 9 | var copy = new DisplayAttribute(); 10 | 11 | // DisplayAttribute is sealed, so safe to copy. 12 | copy.Name = attribute.Name; 13 | copy.GroupName = attribute.GroupName; 14 | copy.Description = attribute.Description; 15 | copy.ResourceType = attribute.ResourceType; 16 | copy.ShortName = attribute.ShortName; 17 | 18 | return copy; 19 | } 20 | 21 | public static bool CanSupplyDisplayName(this DisplayAttribute attribute) { 22 | return attribute != null 23 | && attribute.ResourceType != null 24 | && !string.IsNullOrEmpty(attribute.Name); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/MetaData/MetadataConventionsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ModelMetadataExtensions { 4 | public class MetadataConventionsAttribute : Attribute { 5 | public Type ResourceType { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons.Web.Mvc/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/Commons/ComponentModel/TypeExtension/DefaultSetupTasks/RegisterExtentedTypesRegistry.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | 3 | namespace BoC.ComponentModel.TypeExtension.DefaultSetupTasks 4 | { 5 | public class RegisterExtentedTypesRegistry : IContainerInitializer 6 | { 7 | private readonly IDependencyResolver dependencyResolver; 8 | 9 | public RegisterExtentedTypesRegistry(IDependencyResolver dependencyResolver) 10 | { 11 | this.dependencyResolver = dependencyResolver; 12 | } 13 | 14 | public void Execute() 15 | { 16 | if (!(dependencyResolver.IsRegistered(typeof(IExtendedTypesRegistry)))) 17 | { 18 | dependencyResolver.RegisterSingleton(); 19 | } 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /Src/Commons/ComponentModel/TypeExtension/DefaultSetupTasks/RegisterTypeDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using BoC.InversionOfControl; 3 | 4 | namespace BoC.ComponentModel.TypeExtension.DefaultSetupTasks 5 | { 6 | public class RegisterTypeDescriptor : IContainerInitializer 7 | { 8 | public void Execute() 9 | { 10 | TypeDescriptor.AddProvider(new ExtendedTypeDescriptionProvider(typeof(object)), typeof(object)); 11 | } 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /Src/Commons/ComponentModel/TypeExtension/ExtendWithTypeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.ComponentModel.TypeExtension 4 | { 5 | public class ExtendWithTypeAttribute : Attribute 6 | { 7 | private readonly Type with; 8 | 9 | public ExtendWithTypeAttribute(Type with) 10 | { 11 | this.with = with; 12 | } 13 | 14 | public Type With 15 | { 16 | get { return with; } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Src/Commons/ComponentModel/TypeExtension/ExtendedTypeDescriptionProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | 4 | namespace BoC.ComponentModel.TypeExtension 5 | { 6 | public class ExtendedTypeDescriptionProvider : TypeDescriptionProvider 7 | { 8 | public ExtendedTypeDescriptionProvider(Type type): base(TypeDescriptor.GetProvider(type)) 9 | { 10 | } 11 | 12 | public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) 13 | { 14 | return new ExtendedTypeDescriptor(objectType, base.GetTypeDescriptor(objectType, instance)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/Commons/ComponentModel/TypeExtension/ExtendedTypesRegistry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | 4 | namespace BoC.ComponentModel.TypeExtension 5 | { 6 | public class ExtendedTypesRegistry : IExtendedTypesRegistry 7 | { 8 | public void Extend() 9 | { 10 | Extend(typeof (TFrom), typeof (TWith)); 11 | } 12 | 13 | public void Extend(Type type, Type with) 14 | { 15 | TypeDescriptor.AddAttributes(type, new ExtendWithTypeAttribute(with)); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Src/Commons/ComponentModel/TypeExtension/IExtendedTypesRegistry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.ComponentModel.TypeExtension 4 | { 5 | public interface IExtendedTypesRegistry 6 | { 7 | void Extend(); 8 | void Extend(Type type, Type with); 9 | } 10 | } -------------------------------------------------------------------------------- /Src/Commons/DataContext/DataContext.cs: -------------------------------------------------------------------------------- 1 | using BoC.InversionOfControl; 2 | 3 | namespace BoC.DataContext 4 | { 5 | public static class DataContext 6 | { 7 | public static IDataContext BeginDataContext() 8 | { 9 | if (IoC.IsInitialized()) 10 | return IoC.Resolver.Resolve() ?? new DummyDataContext(); 11 | return new DummyDataContext(); 12 | } 13 | } 14 | 15 | class DummyDataContext : IDataContext 16 | { 17 | public void Dispose() 18 | { 19 | 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Src/Commons/DataContext/IDataContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.DataContext 7 | { 8 | public interface IDataContext: IDisposable 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/Commons/EventAggregator/DefaultSetupTasks/InitEventAggregatorTask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BoC.InversionOfControl; 3 | 4 | namespace BoC.EventAggregator.DefaultSetupTasks 5 | { 6 | public class InitEventAggregatorTask : IContainerInitializer 7 | { 8 | private readonly IDependencyResolver dependencyResolver; 9 | public InitEventAggregatorTask(IDependencyResolver dependencyResolver) 10 | { 11 | this.dependencyResolver = dependencyResolver; 12 | } 13 | 14 | public void Execute() 15 | { 16 | if (!dependencyResolver.IsRegistered()) 17 | { 18 | dependencyResolver.RegisterSingleton(); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Src/Commons/EventAggregator/IDelegateReference.cs: -------------------------------------------------------------------------------- 1 | namespace BoC.EventAggregator 2 | { 3 | using System; 4 | 5 | public interface IDelegateReference 6 | { 7 | Delegate Target 8 | { 9 | get; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/Commons/EventAggregator/IEventAggregator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.EventAggregator 4 | { 5 | public interface IEventAggregator 6 | { 7 | TEventType GetEvent() where TEventType : BaseEvent, new(); 8 | BaseEvent GetEvent(Type eventType); 9 | } 10 | } -------------------------------------------------------------------------------- /Src/Commons/EventAggregator/IEventSubscription.cs: -------------------------------------------------------------------------------- 1 | namespace BoC.EventAggregator 2 | { 3 | using System; 4 | 5 | public interface IEventSubscription 6 | { 7 | SubscriptionToken SubscriptionToken 8 | { 9 | get; 10 | set; 11 | } 12 | 13 | Action GetExecutionStrategy(); 14 | } 15 | } -------------------------------------------------------------------------------- /Src/Commons/EventAggregator/SubscriptionToken.cs: -------------------------------------------------------------------------------- 1 | namespace BoC.EventAggregator 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | 6 | public class SubscriptionToken : IEquatable 7 | { 8 | private readonly Guid _token = Guid.NewGuid(); 9 | 10 | [DebuggerStepThrough] 11 | public bool Equals(SubscriptionToken other) 12 | { 13 | return (other != null) && Equals(_token, other._token); 14 | } 15 | 16 | [DebuggerStepThrough] 17 | public override bool Equals(object obj) 18 | { 19 | return ReferenceEquals(this, obj) || Equals(obj as SubscriptionToken); 20 | } 21 | 22 | [DebuggerStepThrough] 23 | public override int GetHashCode() 24 | { 25 | return _token.GetHashCode(); 26 | } 27 | 28 | [DebuggerStepThrough] 29 | public override string ToString() 30 | { 31 | return _token.ToString(); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Src/Commons/Events/DeletedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.EventAggregator; 6 | 7 | namespace BoC.Events 8 | { 9 | public class DeletedEvent : BaseEvent> 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Events/DeletingEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.EventAggregator; 6 | 7 | namespace BoC.Events 8 | { 9 | public class DeletingEvent : BaseEvent> 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Events/EventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.Events 7 | { 8 | public class EventArgs 9 | { 10 | public EventArgs(TForType item) 11 | { 12 | Item = item; 13 | } 14 | 15 | public TForType Item { get; private set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/Commons/Events/InsertedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.EventAggregator; 6 | 7 | namespace BoC.Events 8 | { 9 | public class InsertedEvent : BaseEvent> 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Events/InsertingEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.EventAggregator; 6 | 7 | namespace BoC.Events 8 | { 9 | public class InsertingEvent : BaseEvent> 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Events/UpdatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.EventAggregator; 6 | 7 | namespace BoC.Events 8 | { 9 | public class UpdatedEvent : BaseEvent> 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Events/UpdatingEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.EventAggregator; 6 | 7 | namespace BoC.Events 8 | { 9 | public class UpdatingEvent : BaseEvent> 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Extensions/EnumerableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Web; 7 | 8 | namespace BoC.Extensions { 9 | public static class EnumerableExtensions { 10 | public static IEnumerable Replace(this IEnumerable collection, T source, T replacement) { 11 | IEnumerable collectionWithout = collection; 12 | if (source != null) { 13 | collectionWithout = collectionWithout.Except(new[] { source }); 14 | } 15 | return collectionWithout.Union(new[] { replacement }); 16 | } 17 | 18 | public static HtmlString ToUnsortedHtmlList(this IEnumerable data) 19 | { 20 | if (data != null) 21 | { 22 | var ul = new StringBuilder("
    \n"); 23 | var hasItems = false; 24 | foreach (var m in data) 25 | { 26 | hasItems = true; 27 | ul.Append("
  • ").Append(m).AppendLine("
  • "); 28 | } 29 | return !hasItems ? new HtmlString(String.Empty) : new HtmlString(ul.AppendLine("
").ToString()); 30 | 31 | } 32 | return new HtmlString(String.Empty); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Src/Commons/Extensions/ExpressionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using System.Text; 6 | 7 | namespace BoC.Extensions 8 | { 9 | public static class ExpressionExtensions 10 | { 11 | public static Expression> Or(this Expression> expr1, 12 | Expression> expr2) 13 | { 14 | var invokedExpr = Expression.Invoke(expr2, expr1.Parameters.Cast()); 15 | return Expression.Lambda> 16 | (Expression.OrElse(expr1.Body, invokedExpr), expr1.Parameters); 17 | } 18 | 19 | public static Expression> And(this Expression> expr1, 20 | Expression> expr2) 21 | { 22 | var invokedExpr = Expression.Invoke(expr2, expr1.Parameters.Cast()); 23 | return Expression.Lambda> 24 | (Expression.AndAlso(expr1.Body, invokedExpr), expr1.Parameters); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Src/Commons/Extensions/ObjectExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Web; 7 | 8 | namespace BoC.Extensions 9 | { 10 | public static class ObjectExtensions 11 | { 12 | static public IDictionary ToDictionary(this object o) 13 | { 14 | return o.GetType().GetProperties() 15 | .Select(n => n.Name) 16 | .ToDictionary(k => k, k => o.GetType().GetProperty(k).GetValue(o, null)); 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Src/Commons/Helpers/IAppDomainHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace BoC.Helpers 6 | { 7 | public interface IAppDomainHelper 8 | { 9 | IEnumerable GetAssemblies(); 10 | IEnumerable GetTypes(Func where); 11 | ICollection> TypeFilters { get; } 12 | ICollection> AssemblyFilters { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/Commons/InversionOfControl/IContainerInitializer.cs: -------------------------------------------------------------------------------- 1 | namespace BoC.InversionOfControl 2 | { 3 | public interface IContainerInitializer 4 | { 5 | void Execute(); 6 | } 7 | } -------------------------------------------------------------------------------- /Src/Commons/InversionOfControl/IDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | namespace BoC.InversionOfControl 6 | { 7 | public interface IDependencyResolver : IDisposable 8 | { 9 | void RegisterInstance(T instance) where T : class; 10 | void RegisterSingleton() where TTo : class, TFrom where TFrom : class; 11 | void RegisterSingleton(Type from, Type to); 12 | void RegisterType(LifetimeScope scope = LifetimeScope.Transient) where TTo : class, TFrom where TFrom : class; 13 | void RegisterType(Type from, Type to, LifetimeScope scope = LifetimeScope.Transient); 14 | void RegisterFactory(Type from, Func factory); 15 | void RegisterFactory(Type from, Func factory, LifetimeScope scope); 16 | void RegisterFactory(Func factory, LifetimeScope scope) where TFrom: class; 17 | void RegisterFactory(Func factory) where TFrom : class; 18 | IDependencyResolver CreateChildResolver(); 19 | 20 | object Resolve(Type type); 21 | T Resolve() where T:class; 22 | IEnumerable ResolveAll() where T:class; 23 | IEnumerable ResolveAll(Type type); 24 | bool IsRegistered(Type type); 25 | bool IsRegistered() where T : class; 26 | } 27 | } -------------------------------------------------------------------------------- /Src/Commons/InversionOfControl/LifeTimeScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.InversionOfControl 7 | { 8 | public enum LifetimeScope 9 | { 10 | Transient, 11 | PerHttpRequest, 12 | PerThread, 13 | Singleton, 14 | Unowned 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Src/Commons/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | Copyright (c) 2010 Chris van de Steeg 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /Src/Commons/Linq/IQueryableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Security.Permissions; 4 | using System.Web; 5 | 6 | namespace BoC.Linq 7 | { 8 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 9 | public static class IQueryableExtensions { 10 | public static object FirstOrDefault(this IQueryable source) { 11 | if (source == null) { 12 | throw new ArgumentNullException("source"); 13 | } 14 | 15 | foreach (object obj in source) 16 | return obj; 17 | 18 | return null; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/Commons/Logging/ILogContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Logging 4 | { 5 | public interface ILogContext : IDisposable 6 | { 7 | string Name { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Src/Commons/Persistence/IBaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoC.Persistence 4 | { 5 | public interface IBaseEntity : IBaseEntity 6 | { 7 | new TKey Id { get; set; } 8 | } 9 | 10 | public interface IBaseEntity : IEquatable 11 | { 12 | object Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/Commons/Persistence/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Linq.Expressions; 4 | 5 | namespace BoC.Persistence 6 | { 7 | public interface IRepository 8 | { 9 | object Get(object id); 10 | void Delete(object target); 11 | object Save(object target); 12 | object Update(object target); 13 | object SaveOrUpdate(object target); 14 | void Evict(object target); 15 | } 16 | 17 | public interface IRepository: IRepository where T : IBaseEntity 18 | { 19 | T Get(object id); 20 | void Delete(T target); 21 | void DeleteById(object id); 22 | IQueryable Query(); 23 | T Save(T target); 24 | T Update(T target); 25 | T SaveOrUpdate(T target); 26 | void Evict(T target); 27 | } 28 | } -------------------------------------------------------------------------------- /Src/Commons/Profiling/DefaultSetupTasks/RegisterProfiler.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using BoC.ComponentModel.TypeExtension; 3 | using BoC.InversionOfControl; 4 | 5 | namespace BoC.Profiling.DefaultSetupTasks 6 | { 7 | public class RegisterProfiler : IContainerInitializer 8 | { 9 | private readonly IDependencyResolver _resolver; 10 | 11 | public RegisterProfiler(IDependencyResolver resolver) 12 | { 13 | _resolver = resolver; 14 | } 15 | 16 | public void Execute() 17 | { 18 | _resolver.RegisterType(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/Commons/Profiling/IPerformanceProfiler.cs: -------------------------------------------------------------------------------- 1 | namespace BoC.Profiling 2 | { 3 | public interface IPerformanceProfiler 4 | { 5 | void BeginSession(string key); 6 | void EndSession(string key); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Src/Commons/ServiceModel/IoCInstanceProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.ServiceModel; 5 | using System.ServiceModel.Channels; 6 | using System.ServiceModel.Dispatcher; 7 | using System.Text; 8 | using BoC.InversionOfControl; 9 | 10 | namespace BoC.ServiceModel 11 | { 12 | public class IoCInstanceProvider: IInstanceProvider 13 | { 14 | private readonly Type type; 15 | 16 | public IoCInstanceProvider(Type type) 17 | { 18 | this.type = type; 19 | //test if we can create instances for this type 20 | IoC.Resolver.Resolve(type); 21 | } 22 | 23 | #region IInstanceProvider Members 24 | 25 | public object GetInstance(InstanceContext instanceContext, Message message) 26 | { 27 | return IoC.Resolver.Resolve(type); 28 | } 29 | 30 | public object GetInstance(InstanceContext instanceContext) 31 | { 32 | return GetInstance(instanceContext, null); 33 | } 34 | public void ReleaseInstance(InstanceContext instanceContext, object instance) 35 | { 36 | if (instance is IDisposable) 37 | ((IDisposable)instance).Dispose(); 38 | } 39 | #endregion 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Src/Commons/ServiceModel/IoCServiceHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.ServiceModel; 6 | using System.Text; 7 | using BoC.InversionOfControl; 8 | 9 | namespace BoC.ServiceModel 10 | { 11 | public class IoCServiceHost: ServiceHost 12 | { 13 | protected IoCServiceHost() {} 14 | 15 | public IoCServiceHost(Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses) {} 16 | public IoCServiceHost(object singletonInstance, params Uri[] baseAddresses) : base(singletonInstance, baseAddresses) {} 17 | 18 | protected override void OnOpening() 19 | { 20 | IoC.Resolver.Resolve().AddToHost(this); 21 | IoC.Resolver.Resolve().AddToHost(this); 22 | base.OnOpening(); 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Src/Commons/ServiceModel/ServiceErrorLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.ServiceModel; 6 | using System.ServiceModel.Channels; 7 | using System.ServiceModel.Dispatcher; 8 | using System.Text; 9 | using BoC.Logging; 10 | 11 | namespace BoC.ServiceModel 12 | { 13 | public class ServiceErrorLogger : IErrorHandler 14 | { 15 | private readonly ILogger logger; 16 | 17 | public ServiceErrorLogger(ILogger logger) 18 | { 19 | this.logger = logger; 20 | } 21 | 22 | // Provide a fault. The Message fault parameter can be replaced, or set to 23 | // null to suppress reporting a fault. 24 | public void ProvideFault(Exception error, MessageVersion version, ref Message fault) 25 | { 26 | } 27 | 28 | // HandleError. Log an error, then allow the error to be handled as usual. 29 | // Return true if the error is considered as already handled 30 | public bool HandleError(Exception error) 31 | { 32 | logger.Error("Service exception occurred", error); 33 | return false; 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Src/Commons/Services/IModelService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using BoC.Persistence; 6 | 7 | namespace BoC.Services 8 | { 9 | public interface IModelService : IModelService where TModel : IBaseEntity 10 | { 11 | new TModel Get(object id); 12 | TModel Insert(TModel entity); 13 | void Delete(TModel entity); 14 | TModel SaveOrUpdate(TModel entity); 15 | void ValidateEntity(TModel entity); 16 | IEnumerable ListAll(); 17 | IEnumerable Find(Expression> where); 18 | IEnumerable Find(ModelQuery query); 19 | int Count(Expression> where); 20 | } 21 | 22 | public interface IModelService 23 | { 24 | object Get(object id); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Commons/Services/ModelQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using BoC.Persistence; 4 | 5 | namespace BoC.Services 6 | { 7 | public static class ModelQuery 8 | { 9 | public static ModelQuery Where(Expression> where) where TModel : IBaseEntity 10 | { 11 | return new ModelQuery() {Expression = where }; 12 | } 13 | } 14 | public class ModelQuery where TModel : IBaseEntity 15 | { 16 | public virtual Expression> Expression { get; set; } 17 | public virtual int ItemsToSkip { get; set; } 18 | public virtual int ItemsToTake { get; set; } 19 | public virtual string OrderByExpression { get; set; } 20 | 21 | public ModelQuery Take(int take) 22 | { 23 | this.ItemsToTake = take; 24 | return this; 25 | } 26 | 27 | public ModelQuery Skip(int skip) 28 | { 29 | this.ItemsToSkip = skip; 30 | return this; 31 | } 32 | 33 | public ModelQuery OrderBy(string orderBy) 34 | { 35 | OrderByExpression = orderBy; 36 | return this; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Src/Commons/Tasks/IBackgroundTask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace BoC.Tasks 6 | { 7 | public interface IBackgroundTask: IDisposable 8 | { 9 | bool IsRunning 10 | { 11 | get; 12 | } 13 | 14 | void Start(); 15 | 16 | void Stop(); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /Src/Commons/Tasks/IBootstrapperTask.cs: -------------------------------------------------------------------------------- 1 | namespace BoC.Tasks 2 | { 3 | public interface IBootstrapperTask 4 | { 5 | void Execute(); 6 | } 7 | } -------------------------------------------------------------------------------- /Src/Commons/Tasks/RegisterBootstrapTasks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using BoC.Helpers; 5 | using BoC.InversionOfControl; 6 | 7 | namespace BoC.Tasks 8 | { 9 | public class RegisterBootstrapTasks: IContainerInitializer 10 | { 11 | private readonly IDependencyResolver dependencyResolver; 12 | private readonly IAppDomainHelper[] appDomainHelpers; 13 | 14 | public RegisterBootstrapTasks(IDependencyResolver dependencyResolver, IAppDomainHelper[] appDomainHelpers) 15 | { 16 | this.dependencyResolver = dependencyResolver; 17 | this.appDomainHelpers = appDomainHelpers; 18 | } 19 | 20 | public void Execute() 21 | { 22 | var tasks = appDomainHelpers.SelectMany(helper => helper.GetTypes(t => Bootstrapper.TaskFilters.All(func => func(t)))); 23 | foreach (var t in tasks) 24 | { 25 | dependencyResolver.RegisterType(typeof(IBootstrapperTask), t); 26 | } 27 | dependencyResolver.RegisterSingleton(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Src/Commons/Tasks/StartBackgroundTasks.cs: -------------------------------------------------------------------------------- 1 | using BoC.Helpers; 2 | 3 | namespace BoC.Tasks 4 | { 5 | public class StartBackgroundTasks : IBootstrapperTask 6 | { 7 | private readonly IBackgroundTask[] _tasks; 8 | 9 | public StartBackgroundTasks(IBackgroundTask[] tasks) 10 | { 11 | _tasks = tasks; 12 | } 13 | 14 | public void Execute() 15 | { 16 | if (_tasks != null) 17 | { 18 | foreach (var task in _tasks) 19 | { 20 | task.Start(); 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Src/Commons/Validation/DataAnnotationsModelValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Text; 7 | using BoC.Profiling; 8 | 9 | namespace BoC.Validation 10 | { 11 | public class DataAnnotationsModelValidator: IModelValidator 12 | { 13 | public IEnumerable Validate(object instance) 14 | { 15 | using (Profiler.StartContext("DataAnnotationsModelValidator.Validate({0})", instance)) 16 | return (from prop in TypeDescriptor.GetProperties(instance).Cast() 17 | from attribute in prop.Attributes.OfType() 18 | where !attribute.IsValid(prop.GetValue(instance)) 19 | select new ErrorInfo(prop.Name, attribute.FormatErrorMessage(prop.DisplayName), instance)).ToList(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Src/Commons/Validation/DefaultSetupTasks/RegisterDefaultModelValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BoC.InversionOfControl; 3 | 4 | namespace BoC.Validation.DefaultSetupTasks 5 | { 6 | public class RegisterDefaultModelValidator : IContainerInitializer 7 | { 8 | private readonly IDependencyResolver dependencyResolver; 9 | public RegisterDefaultModelValidator(IDependencyResolver dependencyResolver) 10 | { 11 | this.dependencyResolver = dependencyResolver; 12 | } 13 | 14 | public void Execute() 15 | { 16 | if (!dependencyResolver.IsRegistered()) 17 | { 18 | dependencyResolver.RegisterType(); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Src/Commons/Validation/ErrorInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.Validation 7 | { 8 | public class ErrorInfo 9 | { 10 | public string PropertyName { get; private set; } 11 | public string ErrorMessage { get; private set; } 12 | public object Object { get; private set; } 13 | 14 | public ErrorInfo(string propertyName, string errorMessage, object onObject) 15 | { 16 | PropertyName = propertyName; 17 | ErrorMessage = errorMessage; 18 | Object = onObject; 19 | } 20 | 21 | public ErrorInfo(string propertyName, string errorMessage) 22 | : this(propertyName, errorMessage, null) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Commons/Validation/Expressions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.Validation 7 | { 8 | public static class Expressions 9 | { 10 | public const string Email = @"^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$"; 11 | public const string Guid = @"^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$"; 12 | public const string WebUrl = @"(http|https)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/Commons/Validation/IModelValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.Validation 7 | { 8 | public interface IModelValidator 9 | { 10 | IEnumerable Validate(object model); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/Commons/Validation/RulesException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BoC.Validation 7 | { 8 | public class RulesException : Exception 9 | { 10 | public RulesException(IEnumerable errors) 11 | { 12 | Errors = errors; 13 | } 14 | 15 | public RulesException(string propertyName, string errorMessage) 16 | : this(propertyName, errorMessage, null) { } 17 | 18 | public RulesException(string propertyName, string errorMessage, object onObject) 19 | { 20 | Errors = new[] { new ErrorInfo(propertyName, errorMessage, onObject) }; 21 | } 22 | 23 | public IEnumerable Errors { get; private set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Src/Commons/Web/CookieAwareWebClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Text; 6 | 7 | namespace BoC.Web 8 | { 9 | public class CookieAwareWebClient : WebClient 10 | { 11 | 12 | private CookieContainer m_container = new CookieContainer(); 13 | public CookieContainer CookieContainer 14 | { 15 | get { return m_container; } 16 | } 17 | 18 | private string lastRequest; 19 | protected override WebRequest GetWebRequest(Uri address) 20 | { 21 | WebRequest request = base.GetWebRequest(address); 22 | if (request is HttpWebRequest) 23 | { 24 | (request as HttpWebRequest).CookieContainer = m_container; 25 | if (!String.IsNullOrEmpty(lastRequest)) 26 | { 27 | (request as HttpWebRequest).Referer = lastRequest; 28 | } 29 | if (request.Method == "POST" && String.IsNullOrEmpty(request.ContentType)) 30 | { 31 | request.ContentType = "application/x-www-form-urlencoded"; 32 | } 33 | } 34 | 35 | lastRequest = address.ToString(); 36 | return request; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Src/Commons/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/Commons/readme.txt: -------------------------------------------------------------------------------- 1 | BoC needs some documentation, but contains lots of usefull stuff like 2 | -EventAggregator pattern implementation 3 | -Inversion of Control wrapper (see other BoC packages like BoC.InversionOfControl.Unity for implementations) 4 | -UnitOfWork pattern implementation (see other BoC packages like BoC.Persistence.NHibernate for implementations) 5 | -Bootstrapper and Background task pattern implementation 6 | -Logging wrapper (see BoC.Logging.log4net for implementation) 7 | -Persistence repository and service pattern implementation (see other BoC packages like BoC.Persistence.NHibernate for implementations) 8 | -------------------------------------------------------------------------------- /Src/nuget.bat: -------------------------------------------------------------------------------- 1 | cd Commons 2 | nuget pack 3 | cd .. 4 | cd Commons.InversionOfControl.DryIoC 5 | nuget pack 6 | cd .. 7 | cd Commons.InversionOfControl.Ninject 8 | nuget pack 9 | cd .. 10 | cd Commons.InversionOfControl.SimpleInjector 11 | nuget pack 12 | cd .. 13 | cd Commons.InversionOfControl.Unity 14 | nuget pack 15 | cd .. 16 | cd Commons.Logging.Log4Net 17 | nuget pack 18 | cd .. 19 | cd Commons.Logging.Sitecore 20 | nuget pack 21 | cd .. 22 | cd Commons.Persistence.db4o 23 | nuget pack 24 | cd .. 25 | cd Commons.Persistence.NHibernate 26 | nuget pack 27 | cd .. 28 | cd Commons.Persistence.NoRM 29 | nuget pack 30 | cd .. 31 | cd Commons.Persistence.Sitecore 32 | nuget pack 33 | cd .. 34 | cd Commons.Persistence.UmbracoGlass 35 | nuget pack 36 | cd .. 37 | cd Commons.Persistence.XPO 38 | nuget pack 39 | cd .. 40 | cd Commons.Security 41 | nuget pack 42 | cd .. 43 | cd Commons.Security.Mvc 44 | nuget pack 45 | cd .. 46 | cd Commons.Security.NHibernate 47 | nuget pack 48 | cd .. 49 | cd Commons.Sitecore.Mvc 50 | nuget pack 51 | cd .. 52 | cd Commons.Web.Mvc 53 | nuget pack 54 | cd .. 55 | -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/back.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/header.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/header.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/page_first.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/page_first.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/page_last.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/page_last.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/page_next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/page_next.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/page_prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/page_prev.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Content/DynamicData/plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/DynamicData/Content/DynamicData/plus.gif -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Home/Index.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 |

My Tables

5 |
    6 | <% foreach (var table in MetaModel.Default.Tables.Where(t => t.Scaffold).OrderBy(t => t.DisplayName)) 7 | {%> 8 |
  • <%= 9 | Html.ScaffoldLink(table.DisplayName, table, "list")%>
  • 10 | <% 11 | }%> 12 |
13 |
14 | -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/EntityTemplates/Default.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" AutoEventWireup="true" Inherits="Microsoft.Web.DynamicData.Mvc.MvcEntityTemplate" %> 2 | 3 | <% foreach (var column in DisplayColumns) { %> 4 | 5 | 6 | 7 | 8 | <% } %> 9 |
<%= DynamicFieldTitle(column) %><%= DynamicField(column) %>
-------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/EntityTemplates/Default_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" AutoEventWireup="true" Inherits="Microsoft.Web.DynamicData.Mvc.MvcEntityTemplate" %> 2 | <% foreach (var keycolumn in Table.PrimaryKeyColumns) { %> 3 | <%= Html.Hidden(keycolumn.Name, DataBinder.GetPropertyValue(this.Entity, keycolumn.Name)) %> 4 | <% } %> 5 | 6 | <% foreach (var column in EditColumns) { %> 7 | 8 | 9 | 13 | 14 | <% } %> 15 |
<%= DynamicFieldTitle(column) %> 10 | <%= DynamicField(column) %>
11 | <%= DynamicFieldErrors(column) %> 12 |
-------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/EntityTemplates/Default_Insert.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" AutoEventWireup="true" Inherits="Microsoft.Web.DynamicData.Mvc.MvcEntityTemplate" %> 2 | 3 | <% foreach (var column in InsertColumns) { %> 4 | 5 | 6 | 10 | 11 | <% } %> 12 |
<%= DynamicFieldTitle(column) %> 7 | <%= DynamicField(column) %>
8 | <%= DynamicFieldErrors(column) %> 9 |
-------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/Boolean.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | 11 | /> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/Boolean_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | <%= Html.CheckBox(Column.Name, FieldValue != null && ((bool)FieldValue)) %> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/Children.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | 20 | <%= Html.ScaffoldLink("View " + Column.Name, ChildColumn.ChildTable, "list", ChildRouteValues) %> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/DateTime.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | <%= FieldValueString %> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/EmailAddress.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" AutoEventWireup="true" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %><%= FieldValueString %> 2 | -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/ForeignKey.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | 24 | "><%= ForeignKeyColumn.ParentTable.GetDisplayString(FieldValue) %> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/ForeignKey_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | 9 | <% var parentTable = ForeignKeyColumn.ParentTable; %> 10 | <%--<%= Html.Select(Column.Name, parentTable.Query, 11 | parentTable.PrimaryKeyColumns[0].Name, 12 | parentTable.DisplayColumn.Name, 13 | DataBinder.GetPropertyValue(FieldValue, parentTable.PrimaryKeyColumns[0].Name))%> 14 | --%> 15 | -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/Integer_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | <%= Html.TextBox(Column.Name, FieldValueEditString, 3 | new { @class = "text-box" + (Column.IsRequired ? " field-required" : "") 4 | }) %> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/MultilineText_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | <%= Html.TextArea(Column.Name, FieldValueEditString, 10, 80, 3 | new { @class = "text-box" + 4 | (Column.IsRequired ? " field-required" : "") 5 | })%> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/Text.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | <%= FieldValueString %> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/FieldTemplates/Text_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="Microsoft.Web.DynamicData.Mvc.MvcFieldTemplate" %> 2 | <%= Html.TextBox(Column.Name, null, 3 | new { @class = "text-box" + 4 | (Column.IsRequired ? " field-required" : "") 5 | })%> -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/PageTemplates/Edit.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Microsoft.Web.DynamicData.Mvc.DynamicScaffoldViewPage" %> 2 | 11 | 12 |
13 |

Edit entry from table <%= DynamicData.Table.DisplayName %>

14 |
15 | <%= Html.ValidationSummary() %> 16 | <% using (Html.BeginForm("Update", null)) 17 | { %> 18 | <%= Html.DynamicEntity(ViewData.Model, DataBoundControlMode.Edit)%> 19 |
20 | 21 |   22 | <%= Html.ScaffoldLink("Cancel", DynamicData.Table, "list")%> 23 |
24 | <% } %> 25 |
26 |
-------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/PageTemplates/New.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" ValidateRequest="false" Inherits="Microsoft.Web.DynamicData.Mvc.DynamicScaffoldViewPage" %> 2 | 11 | 12 |
13 |

<%= Page.Title %>

14 |
15 | <%= Html.ValidationSummary() %> 16 | <% 17 | using (Html.BeginForm("New", null)) 18 | {%> 19 | <%=Html.DynamicEntity(DynamicData.Table.EntityType, DataBoundControlMode.Insert)%> 20 |
21 | 22 | <%=Html.ScaffoldLink("Cancel", DynamicData.Table, "list")%> 23 |
24 | <% 25 | } %> 26 |
27 |
-------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/PageTemplates/Show.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Microsoft.Web.DynamicData.Mvc.DynamicScaffoldViewPage" %> 2 | 8 | 9 |
10 |

Entry from table <%= DynamicData.Table.DisplayName %>

11 |
12 | <%= Html.DynamicEntity(ViewData.Model) %> 13 |
14 | <% var routeData = DynamicData.GetRouteData(ViewData.Model); %> 15 |
16 | <%= Html.ScaffoldLink("Edit", DynamicData.Table, "edit", routeData) %>   17 |
" method="post" id="dddelete"> 18 | 19 |
20 |   <%= Html.ScaffoldLink("Show All Items", DynamicData.Table, "list") %> 21 |
22 |
23 |
-------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/Site.Master: -------------------------------------------------------------------------------- 1 | <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="BoC.Views.Shared.Site" %> 2 | 3 | 4 | 5 | <%= Page.Title %> 6 | " rel="stylesheet" type="text/css" /> 7 | 8 | 9 | 18 |
19 |
20 | 21 |
22 |
23 | 24 | -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/Site.Master.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace BoC.Views.Shared { 8 | public partial class Site : System.Web.Mvc.ViewMasterPage { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Templates/DynamicData/Views/Shared/Site.Master.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3053 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BoC.Views.Shared { 12 | 13 | 14 | public partial class Site { 15 | 16 | /// 17 | /// MainContent control. 18 | /// 19 | /// 20 | /// Auto-generated field. 21 | /// To modify move field declaration from designer file to code-behind file. 22 | /// 23 | protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Templates/NorthwindDB/Northwind.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/Templates/NorthwindDB/Northwind.mdf -------------------------------------------------------------------------------- /Templates/t4/Repository/_repositories.tt: -------------------------------------------------------------------------------- 1 | <#@ template language="C#v3.5" debug="True" hostspecific="True" #> 2 | <#@ include file="../../CodeGeneration/_utils.tt" #> 3 | <# 4 | //SETTINGS: 5 | string entityFolder = "Entities"; 6 | ///////// 7 | 8 | EnvDTE.Project project = GetCurrentProject(); 9 | System.IO.FileInfo info = new System.IO.FileInfo(project.FullName); 10 | var dir = new System.IO.DirectoryInfo(System.IO.Path.Combine(info.Directory.FullName, "Entities")); 11 | 12 | if (dir.Exists) 13 | { #> 14 | using System; 15 | using BoC.Persistence; 16 | using BoC.Persistence.NHibernate; 17 | using <#= project.Name #>.<#= entityFolder #>; 18 | namespace <#= project.Name #>.Repositories 19 | { 20 | <# foreach (var file in dir.GetFiles("*.cs")) 21 | { 22 | var name = System.IO.Path.GetFileNameWithoutExtension(file.Name); 23 | #> 24 | public partial interface I<#= name #>Repository: IRepository<<#= name #>> {} 25 | <# 26 | } 27 | #> 28 | } 29 | namespace <#= project.Name #>.Repositories.NHibernate 30 | { 31 | <# foreach (var file in dir.GetFiles("*.cs")) 32 | { 33 | var name = System.IO.Path.GetFileNameWithoutExtension(file.Name); 34 | #> 35 | public partial class <#= name #>Repository: NHRepository<<#= name #>>, I<#= name #>Repository 36 | { 37 | public <#= name #>Repository(SessionManager sessionManager):base(sessionManager){} 38 | } 39 | <# 40 | } 41 | #> 42 | } 43 | <# 44 | } #> -------------------------------------------------------------------------------- /Tests/Commons.InversionOfControl.SimpleInjector.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Commons.InversionOfControl.Unity.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/Commons.Persistence.db4o.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tests/Commons.Persistence.db4o.Tests/Model/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.Persistence; 6 | 7 | namespace Commons.Persistence.db4o.Tests.Model 8 | { 9 | public class Address : BaseEntity 10 | { 11 | public String Type { get; set; } 12 | public String Street { get; set; } 13 | public int HouseNumber { get; set; } 14 | 15 | public String ZipCode { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Tests/Commons.Persistence.db4o.Tests/Model/Child.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.Persistence; 6 | 7 | namespace Commons.Persistence.db4o.Tests.Model 8 | { 9 | public class Child : BaseEntity 10 | { 11 | public String Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Commons.Persistence.db4o.Tests/Model/Parent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.Persistence; 6 | 7 | namespace Commons.Persistence.db4o.Tests.Model 8 | { 9 | public class Parent : BaseEntity 10 | { 11 | public Child Child { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Commons.Persistence.db4o.Tests/Model/ParentConfigExtender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.InversionOfControl; 6 | using BoC.Persistence.db4o; 7 | using Db4objects.Db4o.Config; 8 | 9 | namespace Commons.Persistence.db4o.Tests.Model 10 | { 11 | public class ParentConfigExtender : IConfigurationExtender, IContainerInitializer 12 | { 13 | private readonly IDependencyResolver dependencyResolver; 14 | 15 | public ParentConfigExtender(IDependencyResolver dependencyResolver) 16 | { 17 | this.dependencyResolver = dependencyResolver; 18 | } 19 | 20 | public void Configure(IEmbeddedConfiguration configuration) 21 | { 22 | configuration.Common.ObjectClass(typeof(Parent)).CascadeOnDelete(true); 23 | } 24 | 25 | public void Execute() 26 | { 27 | dependencyResolver.RegisterInstance(this); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Tests/Commons.Persistence.db4o.Tests/Model/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.Persistence; 6 | 7 | namespace Commons.Persistence.db4o.Tests.Model 8 | { 9 | public class Person : BaseEntity 10 | { 11 | public String FirstName { get; set; } 12 | 13 | public String LastName { get; set; } 14 | 15 | public DateTime? BirthDate { get; set; } 16 | 17 | public Address HomeAddress { get; set; } 18 | 19 | public Address WorkAddress { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Tests/Commons.Tests/EventAggregator/EventAggregatorFixture.cs: -------------------------------------------------------------------------------- 1 | using BoC.EventAggregator; 2 | using Xunit; 3 | 4 | namespace BoC.Tests.EventAggregator 5 | { 6 | public class EventAggregatorFixture 7 | { 8 | private readonly BoC.EventAggregator.EventAggregator _eventAggregator; 9 | 10 | public EventAggregatorFixture() 11 | { 12 | _eventAggregator = new BoC.EventAggregator.EventAggregator(); 13 | } 14 | 15 | [Fact] 16 | public void Get_Should_Return_Instance_Of_Event_Type() 17 | { 18 | var instance1 = _eventAggregator.GetEvent(); 19 | 20 | Assert.NotNull(instance1); 21 | Assert.IsAssignableFrom(instance1); 22 | } 23 | 24 | [Fact] 25 | public void Get_Should_Return_Same_Instance_Of_Same_Event_Type() 26 | { 27 | var instance1 = _eventAggregator.GetEvent(); 28 | var instance2 = _eventAggregator.GetEvent(); 29 | 30 | Assert.Same(instance2, instance1); 31 | 32 | instance1.Tag = "Should be same"; 33 | 34 | Assert.Equal("Should be same", instance2.Tag); 35 | } 36 | } 37 | 38 | public class SomeEvent: BaseEvent 39 | { 40 | public string Tag { get; set; } 41 | } 42 | } -------------------------------------------------------------------------------- /Tests/Commons.Tests/EventAggregator/SubscriptionTokenFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BoC.EventAggregator; 3 | using Xunit; 4 | 5 | namespace BoC.Tests.EventAggregator 6 | { 7 | public class SubscriptionTokenFixture 8 | { 9 | private readonly SubscriptionToken token; 10 | 11 | public SubscriptionTokenFixture() 12 | { 13 | token = new SubscriptionToken(); 14 | } 15 | 16 | [Fact] 17 | public void Equals_Should_Return_False_When_Tokens_Are_Not_Same() 18 | { 19 | SubscriptionToken token = new SubscriptionToken(); 20 | 21 | Assert.False(this.token.Equals(token)); 22 | } 23 | 24 | [Fact] 25 | public void Equals_Should_Return_False_When_Comparing_Different_Instances() 26 | { 27 | SubscriptionToken token = new SubscriptionToken(); 28 | 29 | object tokenObject = new SubscriptionToken(); 30 | 31 | Assert.False(token.Equals(tokenObject)); 32 | } 33 | 34 | [Fact] 35 | public void GetHashCode_Should_Not_Be_Zero() 36 | { 37 | Assert.NotEqual(0, token.GetHashCode()); 38 | } 39 | 40 | [Fact] 41 | public void ToString_Should_Return_Internal_Guid() 42 | { 43 | Assert.NotEqual(new Guid(token.ToString()), Guid.Empty); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Tests/Commons.Tests/Extensions/ExpressionExtensionFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Linq.Expressions; 4 | using System.Text; 5 | using BoC.Extensions; 6 | using Xunit; 7 | using Xunit.Extensions; 8 | 9 | namespace BoC.Tests.Extensions 10 | { 11 | public class ExpressionExtensionFixture 12 | { 13 | [Fact] 14 | public void And_Expression_Should_Tighten_Filter() 15 | { 16 | var items = new[] {"item1", "item2", "item3", "item4"}; 17 | 18 | Expression> filter = s => s.StartsWith("item"); 19 | filter = filter.And(s1 => s1.EndsWith("2")); 20 | 21 | var result = items.Where(filter.Compile()); 22 | 23 | Assert.Equal(1, result.Count()); 24 | Assert.Equal("item2", result.First()); 25 | } 26 | 27 | [Fact] 28 | public void Or_Expression_Should_Modify_Filter() 29 | { 30 | var items = new[] { "item1", "item2", "item3", "item4" }; 31 | 32 | Expression> filter = s => s == "item2"; 33 | filter = filter.Or(s => s == "item3"); 34 | 35 | var result = items.Where(filter.Compile()); 36 | 37 | Assert.Equal(2, result.Count()); 38 | Assert.Contains("item2", result); 39 | Assert.Contains("item3", result); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Tests/Commons.Tests/Services/BaseModelServiceFixtures/DummyModel.cs: -------------------------------------------------------------------------------- 1 | using BoC.Persistence; 2 | 3 | namespace BoC.Tests.Services.BaseModelServiceFixtures 4 | { 5 | public class DummyModel: IBaseEntity 6 | { 7 | public bool Equals(IBaseEntity other) 8 | { 9 | return other == this; 10 | } 11 | 12 | public object Id { get; set; } 13 | 14 | public bool Saved { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Tests/Commons.Tests/Services/BaseModelServiceFixtures/ValidateEntityFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Transactions; 3 | using BoC.Events; 4 | using BoC.Persistence; 5 | using BoC.Validation; 6 | using Moq; 7 | using Xunit; 8 | 9 | namespace BoC.Tests.Services.BaseModelServiceFixtures 10 | { 11 | public class ValidateEntityFixture : BaseModelServiceBaseFixture 12 | { 13 | [Fact] 14 | public void ValidateEntity_Should_Call_Validator() 15 | { 16 | service.Object.ValidateEntity(dummy1); 17 | 18 | validator.Verify(v => v.Validate(dummy1), Times.Once()); 19 | } 20 | 21 | [Fact] 22 | public void ValidateEntity_Should_Throw_RulesException_If_Errors_Are_Noticed() 23 | { 24 | validator.Setup(v =>v.Validate(dummy1)).Returns(() => new[]{new ErrorInfo("Saved", "Is invalid boolean?", dummy1)}).Verifiable(); 25 | Assert.Throws(() => service.Object.ValidateEntity(dummy1)); 26 | 27 | validator.Verify(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Tests/Commons.Tests/Tasks/StartBackgroundTasksFixture.cs: -------------------------------------------------------------------------------- 1 | using BoC.Tasks; 2 | using Moq; 3 | using Xunit; 4 | 5 | namespace BoC.Tests.Tasks 6 | { 7 | public class StartBackgroundTasksFixture 8 | { 9 | private readonly Mock _task1; 10 | private readonly Mock _task2; 11 | 12 | private readonly StartBackgroundTasks _startTasks; 13 | 14 | public StartBackgroundTasksFixture() 15 | { 16 | _task1 = new Mock(); 17 | _task2 = new Mock(); 18 | 19 | _startTasks = new StartBackgroundTasks(new[] { _task1.Object, _task2.Object }); 20 | } 21 | 22 | [Fact] 23 | public void Exceute_Should_Start_Tasks() 24 | { 25 | _task1.Setup(t => t.Start()).Verifiable(); 26 | _task2.Setup(t => t.Start()).Verifiable(); 27 | 28 | _startTasks.Execute(); 29 | 30 | _task1.Verify(); 31 | _task2.Verify(); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Tests/Commons.Tests/Validation/ErrorInfoFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BoC.Validation; 6 | using Xunit; 7 | 8 | namespace BoC.Tests.Validation 9 | { 10 | public class ErrorInfoFixture 11 | { 12 | [Fact] 13 | public void Constructor_Should_Set_All_3_Properties() 14 | { 15 | var onObject = new object(); 16 | var errorInfo = new ErrorInfo("Dummy", "Error!", onObject); 17 | 18 | Assert.Equal(onObject, errorInfo.Object); 19 | Assert.Equal("Dummy", errorInfo.PropertyName); 20 | Assert.Equal("Error!", errorInfo.ErrorMessage); 21 | } 22 | 23 | [Fact] 24 | public void Constructor_Should_Set_Properties() 25 | { 26 | var errorInfo = new ErrorInfo("Dummy", "Error!"); 27 | 28 | Assert.Equal(null, errorInfo.Object); 29 | Assert.Equal("Dummy", errorInfo.PropertyName); 30 | Assert.Equal("Error!", errorInfo.ErrorMessage); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/DotNetOpenAuth/DotNetOpenAuth.Contracts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/DotNetOpenAuth/DotNetOpenAuth.Contracts.dll -------------------------------------------------------------------------------- /lib/DotNetOpenAuth/DotNetOpenAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/DotNetOpenAuth/DotNetOpenAuth.dll -------------------------------------------------------------------------------- /lib/DotNetOpenAuth/DotNetOpenAuth.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/DotNetOpenAuth/DotNetOpenAuth.pdb -------------------------------------------------------------------------------- /lib/DotNetOpenAuth/Microsoft.Contracts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/DotNetOpenAuth/Microsoft.Contracts.dll -------------------------------------------------------------------------------- /lib/FluentNHibernate/FluentNHibernate.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/FluentNHibernate/FluentNHibernate.dll -------------------------------------------------------------------------------- /lib/FluentNHibernate/FluentNHibernate.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/FluentNHibernate/FluentNHibernate.pdb -------------------------------------------------------------------------------- /lib/JsonNet/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/JsonNet/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /lib/JsonNet/Newtonsoft.Json.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/JsonNet/Newtonsoft.Json.pdb -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/DynamicScaffold/DynamicScaffoldViewPage.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace Microsoft.Web.DynamicData.Mvc { 6 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 7 | [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 8 | public class DynamicScaffoldViewPage : ViewPage { 9 | DynamicDataHelper _dynamicDataHelper; 10 | 11 | protected DynamicDataHelper DynamicData { 12 | get { 13 | if (_dynamicDataHelper == null) { 14 | _dynamicDataHelper = ViewData.DynamicData(); 15 | } 16 | return _dynamicDataHelper; 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/EntityTemplates/EntityTemplateExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | using System.Web.DynamicData; 4 | 5 | namespace Microsoft.Web.DynamicData { 6 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 7 | public static class EntityTemplateExtensions { 8 | static IEntityTemplateFactory _entityTemplateFactory; 9 | 10 | public static IEntityTemplateFactory GetEntityTemplateFactory(this MetaModel model) { 11 | if (_entityTemplateFactory == null) { 12 | SetEntityTemplateFactory(model, new EntityTemplateFactory()); 13 | } 14 | 15 | return _entityTemplateFactory; 16 | } 17 | 18 | public static void SetEntityTemplateFactory(this MetaModel model, IEntityTemplateFactory factory) { 19 | _entityTemplateFactory = factory; 20 | _entityTemplateFactory.Initialize(model); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/EntityTemplates/IEntityTemplate.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | 4 | namespace Microsoft.Web.DynamicData { 5 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 6 | [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 7 | public interface IEntityTemplate { 8 | void SetHost(IEntityTemplateHost host); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/EntityTemplates/IEntityTemplateFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | using System.Web.DynamicData; 4 | using System.Web.UI.WebControls; 5 | 6 | namespace Microsoft.Web.DynamicData { 7 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 8 | [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 9 | public interface IEntityTemplateFactory { 10 | IEntityTemplate CreateEntityTemplate(MetaTable table, ref DataBoundControlMode mode, string uiHint); 11 | void Initialize(MetaModel model); 12 | } 13 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/EntityTemplates/IEntityTemplateHost.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | using System.Web.DynamicData; 4 | using System.Web.UI.WebControls; 5 | 6 | namespace Microsoft.Web.DynamicData { 7 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 8 | [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 9 | public interface IEntityTemplateHost { 10 | DataBoundControlMode Mode { get; } 11 | MetaTable Table { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/EntityTemplates/MvcEntityTemplate`1.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.Web.DynamicData.Mvc { 2 | public class MvcEntityTemplate : MvcEntityTemplate where TEntity : class, new() { 3 | public new DynamicDataHelper DynamicData { 4 | get { return (DynamicDataHelper)base.DynamicData; } 5 | } 6 | 7 | public new TEntity Entity { 8 | get { return (TEntity)base.Entity; } 9 | } 10 | 11 | protected override DynamicDataHelper CreateDynamicData() { 12 | return new DynamicDataHelper(this); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Extensions/FormExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Permissions; 3 | using System.Web; 4 | using System.Web.Mvc; 5 | using System.Web.Mvc.Html; 6 | using System.Web.Routing; 7 | 8 | namespace Microsoft.Web.DynamicData.Mvc { 9 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 10 | public static class FormExtensions { 11 | public static IDisposable FormRoute(this HtmlHelper html, string routeName, FormMethod method, object values) { 12 | return FormRoute(html, routeName, method, new RouteValueDictionary(values)); 13 | } 14 | 15 | public static IDisposable FormRoute(this HtmlHelper html, string routeName, FormMethod method, RouteValueDictionary valuesDictionary) { 16 | VirtualPathData virtualPath = RouteTable.Routes.GetVirtualPath(html.ViewContext.RequestContext, routeName, valuesDictionary); 17 | string formAction = (virtualPath == null) ? null : virtualPath.VirtualPath; 18 | return html.BeginRouteForm(routeName, method, valuesDictionary); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Extensions/HtmlHelperExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using System.IO; 3 | using System.Security.Permissions; 4 | using System.Text; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | 8 | namespace Microsoft.Web.DynamicData.Mvc { 9 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 10 | public static class HtmlHelperExtensions { 11 | public static string RenderViewUserControl(this HtmlHelper html, ViewUserControl control, object model) { 12 | ViewPage viewPage = new ViewPage(); 13 | viewPage.ViewContext = html.ViewContext; 14 | viewPage.Controls.Add(control); 15 | viewPage.Url = new UrlHelper(html.ViewContext.RequestContext); 16 | viewPage.Html = new HtmlHelper(html.ViewContext, viewPage); 17 | 18 | control.ViewData = new ViewDataDictionary(html.ViewContext.ViewData); 19 | control.ViewData.Model = model; 20 | control.InitializeAsUserControl(viewPage); 21 | 22 | StringBuilder sb = new StringBuilder(); 23 | StringWriter writer = new StringWriter(sb, CultureInfo.CurrentCulture); 24 | HttpContext.Current.Server.Execute(viewPage, writer, true); 25 | return sb.ToString(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Extensions/HttpStatusCodeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Permissions; 3 | using System.Web; 4 | using System.Web.Mvc; 5 | 6 | namespace Microsoft.Web.DynamicData.Mvc { 7 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 8 | public static class HttpStatusCodeExtensions { 9 | public static ActionResult HttpStatusCode(this Controller controller, HttpStatusCode statusCode) { 10 | return HttpStatusCode(controller, statusCode, null); 11 | } 12 | 13 | public static ActionResult HttpStatusCode(this Controller controller, HttpStatusCode statusCode, object httpHeaders) { 14 | return new HttpStatusCodeResult(statusCode, httpHeaders); 15 | } 16 | 17 | public static ActionResult HttpStatusCode(this Controller controller, int statusCode) { 18 | return HttpStatusCode(controller, statusCode, null); 19 | } 20 | 21 | public static ActionResult HttpStatusCode(this Controller controller, int statusCode, object httpHeaders) { 22 | return new HttpStatusCodeResult((HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), statusCode.ToString()), httpHeaders); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Extensions/IQueryableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Security.Permissions; 4 | using System.Web; 5 | 6 | namespace Microsoft.Web.DynamicData.Mvc { 7 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 8 | public static class IQueryableExtensions { 9 | public static object FirstOrDefault(this IQueryable source) { 10 | if (source == null) { 11 | throw new ArgumentNullException("source"); 12 | } 13 | 14 | foreach (object obj in source) 15 | return obj; 16 | 17 | return null; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Extensions/IsPostExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | 4 | namespace Microsoft.Web.DynamicData.Mvc { 5 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 6 | public static class IsPostExtensions { 7 | public static bool IsPost(this HttpRequest request) { 8 | return request.HttpMethod.ToUpperInvariant() == "POST"; 9 | } 10 | 11 | public static bool IsPost(this HttpRequestBase request) { 12 | return request.HttpMethod.ToUpperInvariant() == "POST"; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Extensions/RelativeUrlExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace Microsoft.Web.DynamicData.Mvc { 6 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 7 | public static class RelativeUrlExtensions { 8 | public static string RelativeUrl(this UrlHelper url, string relativeUrl) { 9 | if (relativeUrl == "~") 10 | return url.RequestContext.HttpContext.Request.ApplicationPath; 11 | 12 | if (!relativeUrl.StartsWith("~/")) 13 | return relativeUrl; 14 | 15 | return url.RequestContext.HttpContext.Request.ApplicationPath.TrimEnd('/') + relativeUrl.Substring(1); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/FieldTemplates/MvcFieldTemplate`1.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Permissions; 2 | using System.Web; 3 | 4 | namespace Microsoft.Web.DynamicData.Mvc { 5 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 6 | [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 7 | public class MvcFieldTemplate : MvcFieldTemplate where TEntity : class 8 | { 9 | public new TEntity Entity { 10 | get { return (TEntity)base.Entity; } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /lib/Microsoft.Web.DynamicData/Utility/IPagedList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Security.Permissions; 3 | using System.Web; 4 | 5 | namespace Microsoft.Web.DynamicData.Mvc { 6 | [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] 7 | [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 8 | public interface IPagedList : IEnumerable 9 | { 10 | bool HasPreviousPage { get; } 11 | bool HasNextPage { get; } 12 | int TotalPages { get; } 13 | int CurrentPage { get; set; } 14 | int PageSize { get; set; } 15 | int TotalCount { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /lib/RouteDebug.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/RouteDebug.dll -------------------------------------------------------------------------------- /lib/SqLite/Doc/SQLite.NET.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/Doc/SQLite.NET.chm -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/changelog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/changelog.txt -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/catalan.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/catalan.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/czech.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/czech.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/danish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/danish.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/dutch.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/dutch.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/french.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/french.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/greek.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/greek.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/hungarian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/hungarian.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/italian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/italian.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/polish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/polish.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/portugues_br.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/portugues_br.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/simplified_chinese.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/simplified_chinese.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/spanish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/spanish.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/traditional_chinese.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/traditional_chinese.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/languages/turkish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/languages/turkish.lng -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/sqlite.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/sqlite.dll -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/sqlite3.dll -------------------------------------------------------------------------------- /lib/SqLite/sqliteadmin/sqliteadmin.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteadmin/sqliteadmin.exe -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/App_Data/Provider.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteproviders/App_Data/Provider.db -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/Bin/System.Data.SQLite.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/SqLite/sqliteproviders/Bin/System.Data.SQLite.DLL -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/Default.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data; 3 | using System.Configuration; 4 | using System.Collections; 5 | using System.Web; 6 | using System.Web.Security; 7 | using System.Web.UI; 8 | using System.Web.UI.WebControls; 9 | using System.Web.UI.WebControls.WebParts; 10 | using System.Web.UI.HtmlControls; 11 | 12 | public partial class _Default : System.Web.UI.Page 13 | { 14 | protected void Page_Load(object sender, EventArgs e) 15 | { 16 | 17 | } 18 | protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) 19 | { 20 | 21 | } 22 | protected void Login1_LoggedIn(object sender, EventArgs e) 23 | { 24 | Response.Redirect("~/users/"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/login.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %> 2 | 3 | <% 4 | Response.Redirect("~"); 5 | %> 6 | -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/login.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data; 3 | using System.Configuration; 4 | using System.Collections; 5 | using System.Web; 6 | using System.Web.Security; 7 | using System.Web.UI; 8 | using System.Web.UI.WebControls; 9 | using System.Web.UI.WebControls.WebParts; 10 | using System.Web.UI.HtmlControls; 11 | 12 | public partial class login : System.Web.UI.Page 13 | { 14 | protected void Page_Load(object sender, EventArgs e) 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/users/Default.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data; 3 | using System.Configuration; 4 | using System.Collections; 5 | using System.Web; 6 | using System.Web.Security; 7 | using System.Web.UI; 8 | using System.Web.UI.WebControls; 9 | using System.Web.UI.WebControls.WebParts; 10 | using System.Web.UI.HtmlControls; 11 | 12 | public partial class users_Default : System.Web.UI.Page 13 | { 14 | protected void Page_Load(object sender, EventArgs e) 15 | { 16 | Profile.HomePhone = "21212"; 17 | } 18 | protected void Button2_Click(object sender, EventArgs e) 19 | { 20 | WebPartManager1.Personalization.ResetPersonalizationState(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/SqLite/sqliteproviders/users/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Data.v9.3.Linq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Data.v9.3.Linq.dll -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Data.v9.3.Linq.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Data.v9.3.Linq.pdb -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Data.v9.3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Data.v9.3.dll -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Data.v9.3.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Data.v9.3.pdb -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Xpo.v9.3.Linq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Xpo.v9.3.Linq.dll -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Xpo.v9.3.Linq.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Xpo.v9.3.Linq.pdb -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Xpo.v9.3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Xpo.v9.3.dll -------------------------------------------------------------------------------- /lib/XPO/DevExpress.Xpo.v9.3.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/DevExpress.Xpo.v9.3.pdb -------------------------------------------------------------------------------- /lib/XPO/Dummy/DevExpress.Data.9.3.Linq/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DevExpress.Data._9._3.Linq 7 | { 8 | public class Class1 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/XPO/Dummy/DevExpress.Data.9.3/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DevExpress.Data._9._3 7 | { 8 | public class Class1 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/XPO/Dummy/DevExpress.Xpo.9.3.Linq/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DevExpress.Xpo._9._3.Linq 7 | { 8 | public class Class1 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/XPO/Dummy/Dummy.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/XPO/Dummy/Dummy.suo -------------------------------------------------------------------------------- /lib/atheken-NoRM/Norm.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/atheken-NoRM/Norm.dll -------------------------------------------------------------------------------- /lib/atheken-NoRM/Norm.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/atheken-NoRM/Norm.pdb -------------------------------------------------------------------------------- /lib/db4o 8.0/Db4objects.Db4o.Linq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/db4o 8.0/Db4objects.Db4o.Linq.dll -------------------------------------------------------------------------------- /lib/db4o 8.0/Db4objects.Db4o.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/db4o 8.0/Db4objects.Db4o.dll -------------------------------------------------------------------------------- /lib/xval/Optional/RulesProviders/xVal.RulesProviders.CastleValidator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/xval/Optional/RulesProviders/xVal.RulesProviders.CastleValidator.dll -------------------------------------------------------------------------------- /lib/xval/Optional/RulesProviders/xVal.RulesProviders.NHibernateValidator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/xval/Optional/RulesProviders/xVal.RulesProviders.NHibernateValidator.dll -------------------------------------------------------------------------------- /lib/xval/xVal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/lib/xval/xVal.dll -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /vstest.executionengine.x86.pdb/746DB072234140F88238CFB5E6BA0E2B1/download.error: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csteeg/BoC/b186a5c477b10dd566145a5ebe817368cf2a7276/vstest.executionengine.x86.pdb/746DB072234140F88238CFB5E6BA0E2B1/download.error --------------------------------------------------------------------------------