├── .gitignore ├── ReadMe.txt ├── lib ├── AutoMoq.dll ├── Machine.Specifications.dll ├── Machine.Specifications.dll.VisualState.xml ├── Microsoft.Practices.ServiceLocation.dll ├── Microsoft.Practices.Unity.dll ├── MongoDB.GridFS.dll ├── MongoDB.dll ├── NServiceBus.Core.dll ├── NServiceBus.Host.exe ├── NServiceBus.dll ├── Rhino.ServiceBus.dll ├── ServiceStack.Text.dll ├── Should.dll ├── Simple.Data.Ado.dll ├── Simple.Data.SqlServer.dll ├── Simple.Data.dll ├── TechTalk.SpecFlow.dll ├── log4net.dll └── nunit.framework.dll ├── sample ├── NServiceBus │ └── Sample.JesseHouse │ │ ├── Sample.JesseHouse.Commands │ │ ├── CreateCustomerCommand.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample.JesseHouse.Commands.csproj │ │ ├── Sample.JesseHouse.Domain │ │ ├── Customer.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample.JesseHouse.Domain.csproj │ │ ├── Sample.JesseHouse.Events │ │ ├── CustomerHasBeenCreatedEvent.cs │ │ ├── CustomerNameHasChangedEvent.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample.JesseHouse.Events.csproj │ │ ├── Sample.JesseHouse.Processing │ │ ├── App.config │ │ ├── CreateCustomerCommandHandler.cs │ │ ├── EndpointConfiguration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample.JesseHouse.Processing.csproj │ │ ├── Sample.JesseHouse.ViewModel │ │ ├── App.config │ │ ├── CustomerDenormalizer.cs │ │ ├── EndpointConfiguration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample.JesseHouse.ViewModel.csproj │ │ ├── Sample.JesseHouse.sln │ │ ├── Sample.JesseHouse │ │ ├── App_Data │ │ │ └── Sample.JesseHouse.sdf │ │ ├── Content │ │ │ └── Site.css │ │ ├── Controllers │ │ │ └── CustomerController.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Models │ │ │ └── CustomerInputModel.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Sample.JesseHouse.Web.csproj │ │ ├── Scripts │ │ │ ├── MicrosoftAjax.debug.js │ │ │ ├── MicrosoftAjax.js │ │ │ ├── MicrosoftMvcAjax.debug.js │ │ │ ├── MicrosoftMvcAjax.js │ │ │ ├── MicrosoftMvcValidation.debug.js │ │ │ ├── MicrosoftMvcValidation.js │ │ │ ├── jquery-1.4.1-vsdoc.js │ │ │ ├── jquery-1.4.1.js │ │ │ ├── jquery-1.4.1.min.js │ │ │ ├── jquery.validate-vsdoc.js │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.min.js │ │ ├── Views │ │ │ ├── Customer │ │ │ │ └── Index.aspx │ │ │ ├── Shared │ │ │ │ ├── Error.aspx │ │ │ │ ├── LogOnUserControl.ascx │ │ │ │ └── Site.Master │ │ │ └── Web.config │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ └── Web.config │ │ └── lib │ │ ├── Microsoft.Practices.ServiceLocation.dll │ │ ├── Microsoft.Practices.Unity.dll │ │ ├── NServiceBus.Core.dll │ │ ├── NServiceBus.Host.exe │ │ ├── NServiceBus.dll │ │ ├── SimpleCqrs.NServiceBus.dll │ │ ├── SimpleCqrs.Unity.dll │ │ ├── SimpleCqrs.dll │ │ └── log4net.dll ├── NerdDinner_2.0 │ ├── CodeCoverage.testrunconfig │ ├── Logs │ │ └── readme.txt │ ├── NerdDinner.CommandService │ │ ├── CommandHandlers │ │ │ ├── CancelDinnerCommandHandler.cs │ │ │ ├── ChangePasswordCommandHandler.cs │ │ │ ├── CreateDinnerCommandHandler.cs │ │ │ ├── EditDinnerCommandHandler.cs │ │ │ ├── RegisterUserCommandErrorHandler.cs │ │ │ ├── RegisterUserCommandHandler.cs │ │ │ └── RsvpForDinnerCommandHandler.cs │ │ ├── CommandService.svc │ │ ├── CommandService.svc.cs │ │ ├── Domain │ │ │ ├── Dinner.cs │ │ │ └── User.cs │ │ ├── EventHandlers │ │ │ ├── DinnersDenormalizer.cs │ │ │ ├── MembershipDenormalizer.cs │ │ │ ├── PopularDinnersDenormalizer.cs │ │ │ ├── RsvpDenormalizer.cs │ │ │ └── UserMemberStatusNotifyHandler.cs │ │ ├── Events │ │ │ ├── DinnerCancelledEvent.cs │ │ │ ├── DinnerChangedEvent.cs │ │ │ ├── DinnerContactPhoneChangedEvent.cs │ │ │ ├── DinnerCreatedEvent.cs │ │ │ ├── DinnerEventDateChangedEvent.cs │ │ │ ├── DinnerHostAssignedEvent.cs │ │ │ ├── DinnerHostChangedEvent.cs │ │ │ ├── DinnerLocationChangedEvent.cs │ │ │ ├── DinnerLocationSetEvent.cs │ │ │ ├── DinnerRsvpAddedEvent.cs │ │ │ ├── UserCreatedEvent.cs │ │ │ ├── UserMemberStatusChangedEvent.cs │ │ │ └── UserPasswordChangedEvent.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── ICommandService.cs │ │ ├── Models │ │ │ ├── NerdDinner.Designer.cs │ │ │ └── NerdDinner.edmx │ │ ├── NerdDinner.CommandService.csproj │ │ ├── NerdDinnerCqrsRuntime.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Services │ │ │ ├── DinnerService.cs │ │ │ └── UserService.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ └── Web.config │ ├── NerdDinner.Commands │ │ ├── CancelDinnerCommand.cs │ │ ├── ChangePasswordCommand.cs │ │ ├── CreateDinnerCommand.cs │ │ ├── DinnerHost.cs │ │ ├── EditDinnerCommand.cs │ │ ├── Location.cs │ │ ├── NerdDinner.Commands.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── RegisterUserCommand.cs │ │ └── RsvpForDinnerCommand.cs │ ├── NerdDinner.Tests │ │ ├── App.config │ │ ├── Controllers │ │ │ ├── AccountControllerTest.cs │ │ │ ├── DinnersControllerTest.cs │ │ │ ├── HomeControllerTest.cs │ │ │ ├── RSVPControllerTest.cs │ │ │ └── SearchControllerTest.cs │ │ ├── Fakes │ │ │ ├── FakeDinnerData.cs │ │ │ ├── FakeDinnerRepository.cs │ │ │ └── FakeIdentity.cs │ │ ├── Helpers │ │ │ ├── FileNotFoundResultTests.cs │ │ │ └── PhoneValidatorTest.cs │ │ ├── Models │ │ │ └── DinnerTest.cs │ │ ├── NerdDinner.Tests.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── UnitTestHelper.cs │ │ └── lib │ │ │ └── Moq.dll │ ├── NerdDinner.sln │ ├── NerdDinner.vsmdi │ └── NerdDinner │ │ ├── App_Browsers │ │ └── Devices │ │ │ ├── Capability Documentation.url │ │ │ ├── EULA.rtf │ │ │ ├── mobile.browser │ │ │ └── readme.txt │ │ ├── App_Data │ │ ├── ASPNETDB.MDF │ │ ├── NerdDinner.mdf │ │ ├── NerdDinner_log.ldf │ │ └── aspnetdb_log.LDF │ │ ├── ConnectionStrings.config │ │ ├── Content │ │ ├── Flair.css │ │ ├── Img │ │ │ ├── Mobile │ │ │ │ ├── btn-search.jpg │ │ │ │ ├── logo.png │ │ │ │ ├── logo_medium.jpg │ │ │ │ ├── logo_medium.png │ │ │ │ ├── logo_medium_trans.png │ │ │ │ └── logo_small.png │ │ │ ├── bkg.jpg │ │ │ ├── btn-go.png │ │ │ ├── btn-login.png │ │ │ ├── button-google.png │ │ │ ├── button-twitter.png │ │ │ ├── button-yahoo.png │ │ │ ├── content-bottom.png │ │ │ ├── content-top.png │ │ │ ├── exclamation.png │ │ │ ├── google.gif │ │ │ ├── header-bkg.jpg │ │ │ ├── hm-content-bkg.png │ │ │ ├── hm-content-bottom.png │ │ │ ├── hm-content-top.png │ │ │ ├── hm-masthead.png │ │ │ ├── icon-facebook.png │ │ │ ├── icon-feed-28x28.png │ │ │ ├── icon-google.png │ │ │ ├── icon-icalfeed-16x16.png │ │ │ ├── icon-icalfeed-28x28.png │ │ │ ├── icon-odatafeed-28x28.png │ │ │ ├── icon-twitter.png │ │ │ ├── icon-yahoo.png │ │ │ ├── logo.png │ │ │ ├── menu-left-selected.png │ │ │ ├── menu-left.png │ │ │ ├── menu-right-selected.png │ │ │ ├── menu-right.png │ │ │ ├── microformat_hcalendar.png │ │ │ ├── search-bubble.png │ │ │ ├── search-header.png │ │ │ └── yahoo.gif │ │ ├── Mobile │ │ │ └── mobile-xhtml.css │ │ ├── Production.css │ │ ├── Site.css │ │ ├── images │ │ │ ├── google.gif │ │ │ ├── infocard_23x16.png │ │ │ ├── myopenid.png │ │ │ ├── openid.gif │ │ │ ├── openid_login.gif │ │ │ ├── verisign.gif │ │ │ ├── yahoo.gif │ │ │ └── yahoo_login.png │ │ ├── iui │ │ │ ├── LICENSE.txt │ │ │ ├── NOTICE.txt │ │ │ ├── README.txt │ │ │ ├── backButton.png │ │ │ ├── blueButton.png │ │ │ ├── cancel.png │ │ │ ├── custom.css │ │ │ ├── custom.js │ │ │ ├── grayButton.png │ │ │ ├── iPhoneLogo.png │ │ │ ├── iui.css │ │ │ ├── iui.js │ │ │ ├── iuix.css │ │ │ ├── iuix.js │ │ │ ├── listArrow.png │ │ │ ├── listArrowSel.png │ │ │ ├── listGroup.png │ │ │ ├── loading.gif │ │ │ ├── pinstripes.png │ │ │ ├── releaseNotes.txt │ │ │ ├── selection.png │ │ │ ├── thumb.png │ │ │ ├── toggle.png │ │ │ ├── toggleOn.png │ │ │ ├── toolButton.png │ │ │ ├── toolbar.png │ │ │ └── whiteButton.png │ │ ├── loginpopup.css │ │ ├── nerd.jpg │ │ └── theme │ │ │ ├── images │ │ │ ├── ui-bg_flat_55_999999_40x100.png │ │ │ ├── ui-bg_flat_75_aaaaaa_40x100.png │ │ │ ├── ui-bg_glass_45_0078ae_1x400.png │ │ │ ├── ui-bg_glass_55_f8da4e_1x400.png │ │ │ ├── ui-bg_glass_75_79c9ec_1x400.png │ │ │ ├── ui-bg_gloss-wave_45_e14f1c_500x100.png │ │ │ ├── ui-bg_gloss-wave_50_6eac2c_500x100.png │ │ │ ├── ui-bg_gloss-wave_75_2191c0_500x100.png │ │ │ ├── ui-bg_inset-hard_100_fcfdfd_1x100.png │ │ │ ├── ui-icons_0078ae_256x240.png │ │ │ ├── ui-icons_056b93_256x240.png │ │ │ ├── ui-icons_d8e7f3_256x240.png │ │ │ ├── ui-icons_e0fdff_256x240.png │ │ │ ├── ui-icons_f5e175_256x240.png │ │ │ ├── ui-icons_f7a50d_256x240.png │ │ │ └── ui-icons_fcd113_256x240.png │ │ │ ├── ui.accordion.css │ │ │ ├── ui.all.css │ │ │ ├── ui.base.css │ │ │ ├── ui.core.css │ │ │ ├── ui.datepicker.css │ │ │ ├── ui.dialog.css │ │ │ ├── ui.progressbar.css │ │ │ ├── ui.resizable.css │ │ │ ├── ui.slider.css │ │ │ ├── ui.tabs.css │ │ │ └── ui.theme.css │ │ ├── Controllers │ │ ├── AccountController.cs │ │ ├── AuthController.cs │ │ ├── DinnersController.cs │ │ ├── HomeController.cs │ │ ├── RSVPController.cs │ │ ├── SearchController.cs │ │ └── ServicesController.cs │ │ ├── Default.aspx │ │ ├── Default.aspx.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Helpers │ │ ├── CalendarHelpers.cs │ │ ├── ControllerHelpers.cs │ │ ├── FileNotFoundResult.cs │ │ ├── HandleErrorWithELMAHAttribute.cs │ │ ├── InMemoryTokenManager.cs │ │ ├── MobileCapableWebFormViewEngine.cs │ │ ├── PaginatedList.cs │ │ ├── PhoneValidator.cs │ │ ├── RSSResult.cs │ │ ├── StringExtensions.cs │ │ ├── TwitterConsumer.cs │ │ ├── UrlHelperExtensions.cs │ │ └── iCalResult.cs │ │ ├── Logs │ │ └── readme.txt │ │ ├── Models │ │ ├── Dinner.cs │ │ ├── DinnerReadModel.cs │ │ ├── FlairViewModel.cs │ │ ├── MembershipReadModel.cs │ │ ├── NerdDinner.dbml │ │ ├── NerdDinner.dbml.layout │ │ ├── NerdDinner.designer.cs │ │ ├── NerdDinner.edmx │ │ ├── NerdIdentity.cs │ │ ├── RsvpReadModel.cs │ │ └── RuleViolation.cs │ │ ├── NerdDinner.csproj │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Scripts │ │ ├── MSAjaxHistoryBundle.js │ │ ├── MicrosoftAjax.debug.js │ │ ├── MicrosoftAjax.js │ │ ├── MicrosoftMvcAjax.debug.js │ │ ├── MicrosoftMvcAjax.js │ │ ├── MicrosoftMvcValidation.debug.js │ │ ├── MicrosoftMvcValidation.js │ │ ├── NerdDinner.js │ │ ├── date.format.js │ │ ├── jquery-1.4.1-vsdoc.js │ │ ├── jquery-1.4.1.js │ │ ├── jquery-1.4.1.min.js │ │ ├── jquery.cookie.js │ │ ├── jquery_ui_datepicker.js │ │ ├── smothness │ │ │ ├── images │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ │ └── jquery_ui_datepicker.css │ │ └── timepicker_plug │ │ │ ├── css │ │ │ └── style.css │ │ │ └── timepicker.js │ │ ├── Service References │ │ └── Services │ │ │ ├── CommandService.disco │ │ │ ├── CommandService.wsdl │ │ │ ├── CommandService.xsd │ │ │ ├── CommandService1.xsd │ │ │ ├── CommandService2.xsd │ │ │ ├── CommandService3.xsd │ │ │ ├── CommandService4.xsd │ │ │ ├── CommandService5.xsd │ │ │ ├── NerdDinner.Services.CancelDinnerStatus.datasource │ │ │ ├── NerdDinner.Services.CreateDinnerStatus.datasource │ │ │ ├── Reference.cs │ │ │ ├── Reference.svcmap │ │ │ ├── configuration.svcinfo │ │ │ └── configuration91.svcinfo │ │ ├── Services │ │ ├── AccountMembershipService.cs │ │ ├── FormsAuthenticationService.cs │ │ ├── GeolocationService.cs │ │ ├── IFormsAuthentication.cs │ │ ├── IMembershipService.cs │ │ ├── JSONPSupportBehavior.cs │ │ ├── OData.svc │ │ ├── OData.svc.cs │ │ ├── OpenIdRelyingPartyService.cs │ │ ├── OpenSearch.ashx │ │ └── OpenSearch.ashx.cs │ │ ├── Views │ │ ├── Account │ │ │ ├── ChangePassword.aspx │ │ │ ├── ChangePasswordSuccess.aspx │ │ │ ├── LogOn.aspx │ │ │ └── Register.aspx │ │ ├── Dinners │ │ │ ├── Create.aspx │ │ │ ├── Delete.aspx │ │ │ ├── Deleted.aspx │ │ │ ├── Details.aspx │ │ │ ├── DinnerForm.ascx │ │ │ ├── Edit.aspx │ │ │ ├── EditAndDeleteLinks.ascx │ │ │ ├── Index.aspx │ │ │ ├── InvalidOwner.aspx │ │ │ ├── Map.ascx │ │ │ ├── Mobile │ │ │ │ ├── Details.aspx │ │ │ │ └── iPhone │ │ │ │ │ └── Details.aspx │ │ │ ├── My.aspx │ │ │ ├── NotFound.aspx │ │ │ ├── RSVPStatus.ascx │ │ │ └── WebSlice.aspx │ │ ├── Home │ │ │ ├── About.aspx │ │ │ ├── Index.aspx │ │ │ ├── Mobile │ │ │ │ ├── Index.aspx │ │ │ │ └── iPhone │ │ │ │ │ └── Index.aspx │ │ │ └── PrivacyPolicy.aspx │ │ ├── Services │ │ │ ├── Flair.aspx │ │ │ └── JavascriptFlair.aspx │ │ ├── Shared │ │ │ ├── Confused.aspx │ │ │ ├── EditorTemplates │ │ │ │ ├── CountryDropDown.ascx │ │ │ │ └── DateTime.ascx │ │ │ ├── Error.aspx │ │ │ ├── LocationDetail.ascx │ │ │ ├── LogOn.aspx │ │ │ ├── LogOnContent.ascx │ │ │ ├── LoginStatus.ascx │ │ │ ├── Masthead.ascx │ │ │ ├── Mobile │ │ │ │ ├── Results.aspx │ │ │ │ ├── Site.Master │ │ │ │ └── iPhone │ │ │ │ │ ├── Results.aspx │ │ │ │ │ └── Site.Master │ │ │ └── Site.Master │ │ └── Web.config │ │ ├── Web.config │ │ ├── apple-touch-icon.png │ │ ├── favicon.ico │ │ └── lib │ │ ├── DDay.iCal-License.txt │ │ ├── DDay.iCal.dll │ │ ├── DotNetOpenAuth.dll │ │ ├── DotNetOpenAuth.pdb │ │ ├── ELMAH-LICENSE.txt │ │ ├── Elmah.dll │ │ ├── Elmah.pdb │ │ ├── Elmah.xml │ │ ├── OpenSearchToolkit.dll │ │ └── antlr.runtime.dll ├── SimpleCQRSDemo │ ├── SimpleCQRSDemo.sln │ └── SimpleCQRSDemo │ │ ├── CommandHandlers │ │ └── CreateAccountCommandHandler.cs │ │ ├── Commands │ │ └── CreateAccountCommand.cs │ │ ├── Denormalizers │ │ └── AccountReportDenormalizer.cs │ │ ├── Domain │ │ └── Account.cs │ │ ├── Events │ │ ├── AccountCreatedEvent.cs │ │ └── AccountNameSetEvent.cs │ │ ├── FakeDb │ │ ├── FakeAccountTable.cs │ │ └── FakeAccountTableRow.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── ReadModel │ │ ├── AccountReadModel.cs │ │ └── AccountReportReadService.cs │ │ ├── SampleRunTime.cs │ │ └── SimpleCQRSDemo.csproj └── SqlServerEventStore │ ├── SqlServerEventStore.sln │ └── SqlServerEventStore │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── SqlServerEventStore.csproj ├── src ├── EventStores │ ├── SimpleCqrs.EventStore.File │ │ ├── FileEventStore.cs │ │ ├── FileSnapshotStore.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SimpleCqrs.EventStore.File.csproj │ ├── SimpleCqrs.EventStore.MongoDb │ │ ├── MongoEventStore.cs │ │ ├── MongoSnapshotStore.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SimpleCqrs.EventStore.MongoDb.csproj │ └── SimpleCqrs.EventStore.SqlServer │ │ ├── IDomainEventSerializer.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Serializers │ │ └── JsonDomainEventSerializer.cs │ │ ├── SimpleCqrs.EventStore.SqlServer.csproj │ │ ├── SqlServerConfiguration.cs │ │ ├── SqlServerEventStore.cs │ │ ├── SqlStatements.cs │ │ └── TypeToStringHelperMethods.cs ├── Extensions │ ├── SimpleCqrs.NServiceBus.Core │ │ ├── Commanding │ │ │ ├── CommandBusExtensionMethods.cs │ │ │ ├── CommandMessage.cs │ │ │ ├── CommandMessageHandler.cs │ │ │ ├── CommandWithReturnValueMessage.cs │ │ │ ├── CommandWithReturnValueMessageHandler.cs │ │ │ ├── Config │ │ │ │ ├── CommandBusConfig.cs │ │ │ │ ├── CommandEndpointMapping.cs │ │ │ │ └── CommandEndpointMappingCollection.cs │ │ │ ├── ConfigCommandBus.cs │ │ │ └── NsbCommandBus.cs │ │ ├── ConfigSimpleCqrs.cs │ │ ├── ConfigureSimpleCqrs.cs │ │ ├── Eventing │ │ │ ├── Config │ │ │ │ ├── DomainEventBusConfig.cs │ │ │ │ ├── DomainEventEndpointMapping.cs │ │ │ │ └── DomainEventEndpointMappingCollection.cs │ │ │ ├── ConfigEventBus.cs │ │ │ ├── DomainEventMessage.cs │ │ │ ├── DomainEventMessageHandler.cs │ │ │ ├── IDomainEventMessage.cs │ │ │ ├── NsbEventBus.cs │ │ │ └── NsbLocalEventBus.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SimpleCqrs.NServiceBus.csproj │ └── SimpleCqrs.Rhino.ServiceBus │ │ ├── DomainEventConsumer.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Reply.cs │ │ ├── ReplyConsumer.cs │ │ ├── Request.cs │ │ ├── RequestReplyMessageOwnersSelector.cs │ │ ├── RsbCommandBus.cs │ │ ├── RsbCommandConsumer.cs │ │ ├── RsbEventBus.cs │ │ └── SimpleCqrs.Rhino.ServiceBus.csproj ├── Local.testsettings ├── Packages │ ├── repositories.config │ └── structuremap.2.6.3 │ │ ├── lib │ │ ├── StructureMap.XML │ │ └── StructureMap.dll │ │ └── structuremap.2.6.3.nupkg ├── ServiceLocators │ ├── SimpleCqrs.StructureMap │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── SimpleCqrs.StructureMap.csproj │ │ ├── StructureMapServiceLocator.cs │ │ └── packages.config │ └── SimpleCqrs.Unity │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── SimpleCqrs.Unity.csproj │ │ └── UnityServiceLocator.cs ├── SimpleCQRS.sln ├── SimpleCqrs.Utilites │ ├── DomainEventReplayer.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SimpleCqrs.Utilites.csproj ├── SimpleCqrs │ ├── AssemblyTypeCatalog.cs │ ├── Commanding │ │ ├── AggregateRootCommandHandler.cs │ │ ├── CommandHandler.cs │ │ ├── CommandHandlerNotFoundException.cs │ │ ├── CommandInvokerDictionaryBuilderHelpers.cs │ │ ├── CommandWithAggregateRootId.cs │ │ ├── CreateCommandHandler.cs │ │ ├── DuplicateCommandHandlersException.cs │ │ ├── ExecuteTimeoutException.cs │ │ ├── ICommand.cs │ │ ├── ICommandBus.cs │ │ ├── ICommandErrorHandler.cs │ │ ├── ICommandHandlingContext.cs │ │ ├── ICommandWithAggregateRootId.cs │ │ ├── IHandleCommands.cs │ │ └── LocalCommandBus.cs │ ├── Domain │ │ ├── AggregateRoot.cs │ │ ├── AggregateRootNotFoundException.cs │ │ ├── DomainRepository.cs │ │ ├── Entity.cs │ │ ├── EntityCollection.cs │ │ ├── EventModifier.cs │ │ ├── IDomainRepository.cs │ │ ├── IEventModification.cs │ │ ├── IGenerateEventSequences.cs │ │ ├── IRegisterEntities.cs │ │ ├── ISnapshotOriginator.cs │ │ └── Snapshot.cs │ ├── Eventing │ │ ├── DomainEvent.cs │ │ ├── DomainEventHandlerFactory.cs │ │ ├── EntityDomainEvent.cs │ │ ├── IDomainEventHandlerFactory.cs │ │ ├── IEventBus.cs │ │ ├── IEventStore.cs │ │ ├── IHandleDomainEvents.cs │ │ ├── ISnapshotStore.cs │ │ ├── LocalEventBus.cs │ │ ├── MemoryEventStore.cs │ │ └── NullSnapshotStore.cs │ ├── IHaveATestMode.cs │ ├── IRegisterComponents.cs │ ├── IServiceLocator.cs │ ├── ISimpleCqrsRuntime.cs │ ├── ITypeCatalog.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ServiceLocator.cs │ ├── ServiceResolutionException.cs │ ├── SimpleCqrs.csproj │ └── SimpleCqrsRuntime.cs ├── Tests │ ├── EventStores │ │ ├── SimpleCqrs.EventStore.SqlServer.Tests │ │ │ ├── Features │ │ │ │ ├── CreateEventStore.feature │ │ │ │ ├── CreateEventStore.feature.cs │ │ │ │ ├── GetEvents.feature │ │ │ │ ├── GetEvents.feature.cs │ │ │ │ ├── InsertEvents.feature │ │ │ │ └── InsertEvents.feature.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── SimpleCqrs.EventStore.SqlServer.Tests.csproj │ │ │ ├── SomethingElseHappenedEvent.cs │ │ │ ├── SomethingHappenedEvent.cs │ │ │ ├── Specs │ │ │ │ └── JsonDomainEventSerializerTests.cs │ │ │ ├── Steps │ │ │ │ ├── DatabaseSteps.cs │ │ │ │ ├── DomainEventSteps.cs │ │ │ │ ├── JsonSerializerSteps.cs │ │ │ │ ├── RuntimeSteps.cs │ │ │ │ ├── SomethingHappenedEventSteps.cs │ │ │ │ ├── SqlServerConfigurationSteps.cs │ │ │ │ └── SqlServerEventStoreSteps.cs │ │ │ ├── TestingRuntime.cs │ │ │ └── with_automoqer.cs │ │ └── SimpleCrqs.EventStore.MongoDb.Tests │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ └── SimpleCrqs.EventStore.MongoDb.Tests.csproj │ ├── SimpleCqrs.EventStore.Tests │ │ ├── DomainRepositoryTests.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SimpleCqrs.EventStore.Tests.csproj │ └── SimpleCqrs.Tests │ │ ├── Commanding │ │ ├── AggregateRootCommandHandlerTests.cs │ │ ├── LocalCommandBusTests.cs │ │ └── MockServiceLocator.cs │ │ ├── CustomAsserts.cs │ │ ├── Domain │ │ ├── AggregateRootTests.cs │ │ ├── DomainRepositoryTests.cs │ │ └── EntityTests.cs │ │ ├── Events │ │ └── DirectEventBusTests.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── SimpleCqrs.Tests.csproj └── TraceAndTestImpact.testsettings └── tools └── Simple-CQRS Visual Studio Extensions ├── Simple-CQRS Visual Studio Extensions.sln └── SimpleCqrs.VisualStudio.Extensions ├── GlobalSuppressions.cs ├── Guids.cs ├── Key.snk ├── Properties └── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Resources └── Package.ico ├── SimpleCqrs.VisualStudio.Extensions.csproj ├── SimpleCqrsPackage.cs ├── VSPackage.resx └── source.extension.vsixmanifest /.gitignore: -------------------------------------------------------------------------------- 1 | *ReSharper* 2 | *resharper* 3 | *.suo 4 | *.cache 5 | obj 6 | bin 7 | *.csproj.user 8 | * Thumbs.db 9 | *.cache 10 | *.log 11 | *.user 12 | *.gpState 13 | TestResults 14 | [Bb]inaries -------------------------------------------------------------------------------- /ReadMe.txt: -------------------------------------------------------------------------------- 1 | Getting Started Videos: 2 | Part 1 http://youtu.be/tTbHR5KScEE 3 | Part 2 http://youtu.be/6lonryMNDWg 4 | 5 | Copyright (c) 2011 Tyrone Groves 6 | 7 | MIT LICENSE 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. -------------------------------------------------------------------------------- /lib/AutoMoq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/AutoMoq.dll -------------------------------------------------------------------------------- /lib/Machine.Specifications.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Machine.Specifications.dll -------------------------------------------------------------------------------- /lib/Machine.Specifications.dll.VisualState.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | [0-1000]C:\_Application\AGCEVENTREG\lib\Machine.Specifications\Machine.Specifications.dll 4 | [0-1000]C:\_Application\AGCEVENTREG\lib\Machine.Specifications\Machine.Specifications.dll 5 | false 6 | 7 | -------------------------------------------------------------------------------- /lib/Microsoft.Practices.ServiceLocation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Microsoft.Practices.ServiceLocation.dll -------------------------------------------------------------------------------- /lib/Microsoft.Practices.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Microsoft.Practices.Unity.dll -------------------------------------------------------------------------------- /lib/MongoDB.GridFS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/MongoDB.GridFS.dll -------------------------------------------------------------------------------- /lib/MongoDB.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/MongoDB.dll -------------------------------------------------------------------------------- /lib/NServiceBus.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/NServiceBus.Core.dll -------------------------------------------------------------------------------- /lib/NServiceBus.Host.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/NServiceBus.Host.exe -------------------------------------------------------------------------------- /lib/NServiceBus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/NServiceBus.dll -------------------------------------------------------------------------------- /lib/Rhino.ServiceBus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Rhino.ServiceBus.dll -------------------------------------------------------------------------------- /lib/ServiceStack.Text.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/ServiceStack.Text.dll -------------------------------------------------------------------------------- /lib/Should.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Should.dll -------------------------------------------------------------------------------- /lib/Simple.Data.Ado.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Simple.Data.Ado.dll -------------------------------------------------------------------------------- /lib/Simple.Data.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Simple.Data.SqlServer.dll -------------------------------------------------------------------------------- /lib/Simple.Data.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/Simple.Data.dll -------------------------------------------------------------------------------- /lib/TechTalk.SpecFlow.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/TechTalk.SpecFlow.dll -------------------------------------------------------------------------------- /lib/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/log4net.dll -------------------------------------------------------------------------------- /lib/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/lib/nunit.framework.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Commands/CreateCustomerCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace Sample.JesseHouse.Commands 5 | { 6 | [Serializable] 7 | public class CreateCustomerCommand : ICommand 8 | { 9 | public Guid CustomerId { get; set; } 10 | public string FirstName { get; set; } 11 | public string LastName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Domain/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sample.JesseHouse.Events; 3 | using SimpleCqrs.Domain; 4 | 5 | namespace Sample.JesseHouse.Domain 6 | { 7 | public class Customer : AggregateRoot 8 | { 9 | public Customer(Guid customerId) 10 | { 11 | Apply(new CustomerHasBeenCreatedEvent{CustomerId = customerId}); 12 | } 13 | 14 | public void SetName(string firstName, string lastName) 15 | { 16 | Apply(new CustomerNameHasChangedEvent{FirstName = firstName, LastName = lastName}); 17 | } 18 | 19 | protected void OnCustomerHasBeenCreated(CustomerHasBeenCreatedEvent domainEvent) 20 | { 21 | Id = domainEvent.CustomerId; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Events/CustomerHasBeenCreatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace Sample.JesseHouse.Events 5 | { 6 | [Serializable] 7 | public class CustomerHasBeenCreatedEvent : DomainEvent 8 | { 9 | public Guid CustomerId 10 | { 11 | get { return AggregateRootId; } 12 | set { AggregateRootId = value; } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Events/CustomerNameHasChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace Sample.JesseHouse.Events 5 | { 6 | [Serializable] 7 | public class CustomerNameHasChangedEvent : DomainEvent 8 | { 9 | public Guid CustomerId 10 | { 11 | get { return AggregateRootId; } 12 | set { AggregateRootId = value; } 13 | } 14 | 15 | public string FirstName { get; set; } 16 | public string LastName { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Processing/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 |
6 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Processing/CreateCustomerCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using Sample.JesseHouse.Commands; 2 | using Sample.JesseHouse.Domain; 3 | using SimpleCqrs.Commanding; 4 | using SimpleCqrs.Domain; 5 | 6 | namespace Sample.JesseHouse.Processing 7 | { 8 | public class CreateCustomerCommandHandler : CommandHandler 9 | { 10 | private readonly IDomainRepository domainRepository; 11 | 12 | public CreateCustomerCommandHandler(IDomainRepository domainRepository) 13 | { 14 | this.domainRepository = domainRepository; 15 | } 16 | 17 | public override void Handle(CreateCustomerCommand command) 18 | { 19 | var customer = new Customer(command.CustomerId); 20 | customer.SetName(command.FirstName, command.LastName); 21 | 22 | domainRepository.Save(customer); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.Processing/EndpointConfiguration.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs; 3 | using SimpleCqrs.NServiceBus; 4 | using SimpleCqrs.Unity; 5 | 6 | namespace Sample.JesseHouse.Processing 7 | { 8 | public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Publisher, IWantCustomInitialization 9 | { 10 | public void Init() 11 | { 12 | Configure.With() 13 | .DefaultBuilder() 14 | .BinarySerializer() 15 | .SimpleCqrs(new SimpleCqrsRuntime()) 16 | .UseLocalCommandBus() // Tell SimpleCqrs to dispatch command locally (in this application) 17 | .UseNsbEventBus(); // Tell SimpleCqrs to use NServiceBus to publish domain events 18 | 19 | // TODO: Go to Sample.JesseHouse.ViewModel project's EndpointConfiguration class 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.ViewModel/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.ViewModel/CustomerDenormalizer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sample.JesseHouse.Events; 3 | using SimpleCqrs.Eventing; 4 | 5 | namespace Sample.JesseHouse.ViewModel 6 | { 7 | public class CustomerDenormalizer : 8 | IHandleDomainEvents, 9 | IHandleDomainEvents 10 | { 11 | public void Handle(CustomerHasBeenCreatedEvent domainEvent) 12 | { 13 | Console.WriteLine("New customer created with ID: {0}", domainEvent.CustomerId); 14 | } 15 | 16 | public void Handle(CustomerNameHasChangedEvent domainEvent) 17 | { 18 | Console.WriteLine("Customer with ID: {0} name has changed. New name is {1} {2}", domainEvent.CustomerId, domainEvent.FirstName, domainEvent.LastName); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse.ViewModel/EndpointConfiguration.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs; 3 | using SimpleCqrs.NServiceBus; 4 | using SimpleCqrs.Unity; 5 | 6 | namespace Sample.JesseHouse.ViewModel 7 | { 8 | public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization 9 | { 10 | public void Init() 11 | { 12 | Configure.With() 13 | .DefaultBuilder() 14 | .BinarySerializer() 15 | .SimpleCqrs(new SimpleCqrsRuntime()) 16 | .SubscribeForDomainEvents(); // Tells SimpleCqrs to subscribe for domain events 17 | 18 | // The DomainEventBusConfig element in the Web.config tell SimpleCqrs which domain events to listen for and the queue 19 | // to listen for them from. 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/App_Data/Sample.JesseHouse.sdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/App_Data/Sample.JesseHouse.sdf -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Sample.JesseHouse.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/Models/CustomerInputModel.cs: -------------------------------------------------------------------------------- 1 | namespace Sample.JesseHouse.Models 2 | { 3 | public class CustomerInputModel 4 | { 5 | public string FirstName { get; set; } 6 | public string LastName { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/Views/Shared/Error.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Error 5 | 6 | 7 | 8 |

9 | Sorry, an error occurred while processing your request. 10 |

11 |
12 | -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/Views/Shared/LogOnUserControl.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <% 3 | if (Request.IsAuthenticated) { 4 | %> 5 | Welcome <%: Page.User.Identity.Name %>! 6 | [ <%: Html.ActionLink("Log Off", "LogOff", "Account") %> ] 7 | <% 8 | } 9 | else { 10 | %> 11 | [ <%: Html.ActionLink("Log On", "LogOn", "Account") %> ] 12 | <% 13 | } 14 | %> 15 | -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/Sample.JesseHouse/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/Microsoft.Practices.ServiceLocation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/Microsoft.Practices.ServiceLocation.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/Microsoft.Practices.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/Microsoft.Practices.Unity.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/NServiceBus.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/NServiceBus.Core.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/NServiceBus.Host.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/NServiceBus.Host.exe -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/NServiceBus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/NServiceBus.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/SimpleCqrs.NServiceBus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/SimpleCqrs.NServiceBus.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/SimpleCqrs.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/SimpleCqrs.Unity.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/SimpleCqrs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/SimpleCqrs.dll -------------------------------------------------------------------------------- /sample/NServiceBus/Sample.JesseHouse/lib/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NServiceBus/Sample.JesseHouse/lib/log4net.dll -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/CodeCoverage.testrunconfig: -------------------------------------------------------------------------------- 1 |  2 | 3 | This is a default test run configuration for a local test run. 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/Logs/readme.txt: -------------------------------------------------------------------------------- 1 | For ELMAH Logs, if you choose to have them logged to XML files. -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandHandlers/CancelDinnerCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.Commands; 2 | using NerdDinner.CommandService.Domain; 3 | using NerdDinner.CommandService.Services; 4 | using SimpleCqrs.Commanding; 5 | 6 | namespace NerdDinner.CommandService.CommandHandlers 7 | { 8 | public enum CancelDinnerStatus 9 | { 10 | DinnerDoesNotExists, 11 | Successful, 12 | } 13 | 14 | public class CancelDinnerCommandHandler : AggregateRootCommandHandler 15 | { 16 | private readonly IDinnerService dinnerReadModel; 17 | 18 | public CancelDinnerCommandHandler(IDinnerService dinnerReadModel) 19 | { 20 | this.dinnerReadModel = dinnerReadModel; 21 | } 22 | 23 | public override int ValidateCommand(CancelDinnerCommand command) 24 | { 25 | if(!dinnerReadModel.DinnerExists(command.DinnerId)) 26 | return (int)CancelDinnerStatus.DinnerDoesNotExists; 27 | 28 | return (int)CancelDinnerStatus.Successful; 29 | } 30 | 31 | public override void Handle(CancelDinnerCommand command, Dinner dinner) 32 | { 33 | dinner.Cancel(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandHandlers/ChangePasswordCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.Commands; 2 | using NerdDinner.CommandService.Domain; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace NerdDinner.CommandService.CommandHandlers 6 | { 7 | public class ChangePasswordCommandHandler : AggregateRootCommandHandler 8 | { 9 | public override void Handle(ChangePasswordCommand command, User user) 10 | { 11 | user.ChangePassword(command.NewPassword); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandHandlers/EditDinnerCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.Commands; 2 | using NerdDinner.CommandService.Domain; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace NerdDinner.CommandService.CommandHandlers 6 | { 7 | public class EditDinnerCommandHandler : AggregateRootCommandHandler 8 | { 9 | public override void Handle(EditDinnerCommand command, Dinner dinner) 10 | { 11 | dinner.Edit(command.EventDate, command.Title, command.Description, command.ContactPhone, command.Host, command.Location); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandHandlers/RegisterUserCommandErrorHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NerdDinner.Commands; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace NerdDinner.CommandService.CommandHandlers 6 | { 7 | public class RegisterUserCommandErrorHandler : ICommandErrorHandler 8 | { 9 | public void Handle(ICommandHandlingContext handlingContext, Exception exception) 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandHandlers/RegisterUserCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.Commands; 2 | using NerdDinner.CommandService.Domain; 3 | using SimpleCqrs.Commanding; 4 | using SimpleCqrs.Domain; 5 | 6 | namespace NerdDinner.CommandService.CommandHandlers 7 | { 8 | public class RegisterUserCommandHandler : CommandHandler 9 | { 10 | private readonly IDomainRepository domainRepository; 11 | 12 | public RegisterUserCommandHandler(IDomainRepository domainRepository) 13 | { 14 | this.domainRepository = domainRepository; 15 | } 16 | 17 | public override void Handle(RegisterUserCommand command) 18 | { 19 | var user = new User(command.UserId, command.UserName, command.Password, command.Email); 20 | domainRepository.Save(user); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandHandlers/RsvpForDinnerCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.Commands; 2 | using NerdDinner.CommandService.Domain; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace NerdDinner.CommandService.CommandHandlers 6 | { 7 | public class RsvpForDinnerCommandHandler : AggregateRootCommandHandler 8 | { 9 | public override void Handle(RsvpForDinnerCommand command, Dinner dinner) 10 | { 11 | dinner.RegisterRsvp(command.AttendeeId, command.AttendeeName); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/CommandService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="NerdDinner.CommandService.CommandService" CodeBehind="CommandService.svc.cs" %> -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Domain/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NerdDinner.CommandService.Events; 3 | using SimpleCqrs.Domain; 4 | 5 | namespace NerdDinner.CommandService.Domain 6 | { 7 | public class User : AggregateRoot 8 | { 9 | public User() 10 | { 11 | } 12 | 13 | public User(Guid userId, string userName, string password, string email) 14 | { 15 | Apply(new UserCreatedEvent {UserId = userId, UserName = userName, Password = password, Email = email}); 16 | } 17 | 18 | public void ChangePassword(string newPassword) 19 | { 20 | Apply(new UserPasswordChangedEvent {NewPassword = newPassword}); 21 | } 22 | 23 | protected void OnUserCreated(UserCreatedEvent domainEvent) 24 | { 25 | Id = domainEvent.AggregateRootId; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/EventHandlers/RsvpDenormalizer.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.CommandService.Events; 2 | using NerdDinner.CommandService.Models; 3 | using SimpleCqrs.Eventing; 4 | 5 | namespace NerdDinner.CommandService.EventHandlers 6 | { 7 | public class RsvpDenormalizer : IHandleDomainEvents 8 | { 9 | private readonly NerdDinnerEntities db = new NerdDinnerEntities(); 10 | 11 | public void Handle(DinnerRsvpAddedEvent domainEvent) 12 | { 13 | var rsvp = RsvpReadModel.CreateRsvpReadModel(domainEvent.DinnerId, domainEvent.AttendeeId, domainEvent.AttendeeName); 14 | db.AddToRsvpReadModels(rsvp); 15 | db.SaveChanges(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/EventHandlers/UserMemberStatusNotifyHandler.cs: -------------------------------------------------------------------------------- 1 | using NerdDinner.CommandService.Events; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.EventHandlers 5 | { 6 | public class UserMemberStatusNotifyHandler : IHandleDomainEvents 7 | { 8 | public void Handle(UserMemberStatusChangedEvent domainEvent) 9 | { 10 | // Send email 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerCancelledEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerCancelledEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerChangedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string NewTitle { get; set; } 15 | public string NewDescription { get; set; } 16 | public string PreviousTitle { get; set; } 17 | public string PreviousDescription { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerContactPhoneChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerContactPhoneChangedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string NewContactPhone { get; set; } 15 | public string PreviousContactPhone { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerCreatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerCreatedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public DateTime DinnerDate { get; set; } 15 | public string Title { get; set; } 16 | public string Description { get; set; } 17 | public string ContactPhone { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerEventDateChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerEventDateChangedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public DateTime NewEventDate { get; set; } 15 | public DateTime PreviousEventDate { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerHostAssignedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerHostAssignedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public Guid HostedById { get; set; } 15 | public string HostedBy { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerHostChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Domain 5 | { 6 | public class DinnerHostChangedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public Guid HostedById { get; set; } 15 | public string HostedBy { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerLocationChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerLocationChangedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string Address { get; set; } 15 | public string Country { get; set; } 16 | public double Latitude { get; set; } 17 | public double Longitude { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerLocationSetEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerLocationSetEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string Address { get; set; } 15 | public string Country { get; set; } 16 | public double Latitude { get; set; } 17 | public double Longitude { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/DinnerRsvpAddedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class DinnerRsvpAddedEvent : DomainEvent 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public Guid AttendeeId { get; set; } 15 | public string AttendeeName { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/UserCreatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class UserCreatedEvent : DomainEvent 7 | { 8 | public string UserName { get; set; } 9 | public string Password { get; set; } 10 | public string Email { get; set; } 11 | 12 | public Guid UserId 13 | { 14 | get { return AggregateRootId; } 15 | set { AggregateRootId = value; } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/UserMemberStatusChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class UserMemberStatusChangedEvent : DomainEvent 7 | { 8 | public Guid UserId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string Status { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Events/UserPasswordChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace NerdDinner.CommandService.Events 5 | { 6 | public class UserPasswordChangedEvent : DomainEvent 7 | { 8 | public string NewPassword { get; set; } 9 | 10 | public Guid UserId 11 | { 12 | get { return AggregateRootId; } 13 | set { AggregateRootId = value; } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="NerdDinner.CommandService.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | 4 | namespace NerdDinner.CommandService 5 | { 6 | public class Global : HttpApplication 7 | { 8 | public static NerdDinnerCqrsRuntime CqrsRuntime { get; private set; } 9 | 10 | protected void Application_Start(object sender, EventArgs e) 11 | { 12 | var nerdDinnerCqrsRuntime = new NerdDinnerCqrsRuntime(); 13 | nerdDinnerCqrsRuntime.Start(); 14 | CqrsRuntime = nerdDinnerCqrsRuntime; 15 | } 16 | 17 | protected void Application_End(object sender, EventArgs e) 18 | { 19 | CqrsRuntime.Shutdown(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/ICommandService.cs: -------------------------------------------------------------------------------- 1 | using System.ServiceModel; 2 | using System.Web.Security; 3 | using NerdDinner.Commands; 4 | using NerdDinner.CommandService.CommandHandlers; 5 | 6 | namespace NerdDinner.CommandService 7 | { 8 | [ServiceContract] 9 | public interface ICommandService 10 | { 11 | [OperationContract] 12 | MembershipCreateStatus RegisterUser(RegisterUserCommand registerUserCommand); 13 | 14 | [OperationContract] 15 | bool ChangePassword(ChangePasswordCommand changePasswordCommand); 16 | 17 | [OperationContract] 18 | CreateDinnerStatus CreateDinner(CreateDinnerCommand createDinnerCommand); 19 | 20 | [OperationContract] 21 | CancelDinnerStatus CancelDinner(CancelDinnerCommand cancelDinnerCommand); 22 | 23 | [OperationContract(IsOneWay = true)] 24 | void EditDinner(EditDinnerCommand editDinnerCommand); 25 | 26 | [OperationContract(IsOneWay = true)] 27 | void RsvpForDinner(RsvpForDinnerCommand rsvpForDinnerCommand); 28 | } 29 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/NerdDinnerCqrsRuntime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using NerdDinner.CommandService.Models; 4 | using NerdDinner.CommandService.Services; 5 | using SimpleCqrs; 6 | using SimpleCqrs.Eventing; 7 | using SimpleCqrs.EventStore.File; 8 | using SimpleCqrs.Unity; 9 | 10 | namespace NerdDinner.CommandService 11 | { 12 | public class NerdDinnerCqrsRuntime : SimpleCqrsRuntime 13 | { 14 | protected override UnityServiceLocator GetServiceLocator() 15 | { 16 | var serviceLocator = base.GetServiceLocator(); 17 | serviceLocator.Register(); 18 | serviceLocator.Register(); 19 | return serviceLocator; 20 | } 21 | 22 | protected override IEventStore GetEventStore(IServiceLocator serviceLocator) 23 | { 24 | var baseDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "EventStoreData"); 25 | return new FileEventStore(baseDirectory, serviceLocator.Resolve()); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Services/DinnerService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using NerdDinner.CommandService.Models; 4 | 5 | namespace NerdDinner.CommandService.Services 6 | { 7 | public interface IDinnerService 8 | { 9 | bool DinnerExists(Guid dinnerId); 10 | } 11 | 12 | public class DinnerService : IDinnerService 13 | { 14 | private readonly NerdDinnerEntities db = new NerdDinnerEntities(); 15 | 16 | public bool DinnerExists(Guid dinnerId) 17 | { 18 | return db.DinnerReadModels.Any(dinner => dinner.DinnerId == dinnerId); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Services/UserService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace NerdDinner.CommandService.Models 5 | { 6 | public interface IUserService 7 | { 8 | bool UserIdExists(Guid hostedById); 9 | } 10 | 11 | public class UserService : IUserService 12 | { 13 | private readonly NerdDinnerEntities db = new NerdDinnerEntities(); 14 | 15 | public bool UserIdExists(Guid hostedById) 16 | { 17 | return db.UserReadModels.Any(membership => membership.UserId == hostedById); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.CommandService/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/CancelDinnerCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace NerdDinner.Commands 5 | { 6 | public class CancelDinnerCommand : CommandWithAggregateRootId 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/ChangePasswordCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace NerdDinner.Commands 5 | { 6 | public class ChangePasswordCommand : CommandWithAggregateRootId 7 | { 8 | public Guid UserId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string NewPassword { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/CreateDinnerCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace NerdDinner.Commands 5 | { 6 | public class CreateDinnerCommand : ICommand 7 | { 8 | public Guid DinnerId { get; set; } 9 | public DinnerHost Host { get; set; } 10 | public string ContactPhone { get; set; } 11 | public string Description { get; set; } 12 | public DateTime EventDate { get; set; } 13 | public string Title { get; set; } 14 | public Location Location { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/DinnerHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NerdDinner.Commands 4 | { 5 | public class DinnerHost 6 | { 7 | public Guid HostedById { get; set; } 8 | public string HostedBy { get; set; } 9 | 10 | public override bool Equals(object obj) 11 | { 12 | if(ReferenceEquals(null, obj)) return false; 13 | if(ReferenceEquals(this, obj)) return true; 14 | if(obj.GetType() != typeof(DinnerHost)) return false; 15 | return Equals((DinnerHost)obj); 16 | } 17 | 18 | public bool Equals(DinnerHost other) 19 | { 20 | if(ReferenceEquals(null, other)) return false; 21 | if(ReferenceEquals(this, other)) return true; 22 | return other.HostedById.Equals(HostedById) && Equals(other.HostedBy, HostedBy); 23 | } 24 | 25 | public override int GetHashCode() 26 | { 27 | unchecked 28 | { 29 | return (HostedById.GetHashCode() * 397) ^ (HostedBy != null ? HostedBy.GetHashCode() : 0); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/EditDinnerCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace NerdDinner.Commands 5 | { 6 | public class EditDinnerCommand : CommandWithAggregateRootId 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | public DinnerHost Host { get; set; } 14 | public string ContactPhone { get; set; } 15 | public string Description { get; set; } 16 | public DateTime EventDate { get; set; } 17 | public string Title { get; set; } 18 | public Location Location { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/RegisterUserCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace NerdDinner.Commands 5 | { 6 | public class RegisterUserCommand : ICommand 7 | { 8 | public RegisterUserCommand() 9 | { 10 | UserId = Guid.NewGuid(); 11 | } 12 | 13 | public Guid UserId { get; set; } 14 | public string UserName { get; set; } 15 | public string Email { get; set; } 16 | public string Password { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Commands/RsvpForDinnerCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace NerdDinner.Commands 5 | { 6 | public class RsvpForDinnerCommand : CommandWithAggregateRootId 7 | { 8 | public Guid DinnerId 9 | { 10 | get { return AggregateRootId; } 11 | set { AggregateRootId = value; } 12 | } 13 | 14 | public string AttendeeName { get; set; } 15 | public Guid AttendeeId { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Tests/Controllers/HomeControllerTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Mvc; 6 | using Microsoft.VisualStudio.TestTools.UnitTesting; 7 | using NerdDinner; 8 | using NerdDinner.Controllers; 9 | 10 | namespace NerdDinner.Tests.Controllers { 11 | [TestClass] 12 | public class HomeControllerTest { 13 | [TestMethod] 14 | public void Index() { 15 | // Arrange 16 | HomeController controller = new HomeController(); 17 | 18 | // Act 19 | ViewResult result = controller.Index() as ViewResult; 20 | 21 | // Assert 22 | } 23 | 24 | [TestMethod] 25 | public void About() { 26 | // Arrange 27 | HomeController controller = new HomeController(); 28 | 29 | // Act 30 | ViewResult result = controller.About() as ViewResult; 31 | 32 | // Assert 33 | Assert.IsNotNull(result); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Tests/Fakes/FakeIdentity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Security; 6 | 7 | namespace NerdDinner.Tests.Fakes 8 | { 9 | class FakeIdentity 10 | { 11 | public static NerdIdentity CreateIdentity(string userName) 12 | { 13 | FormsAuthenticationTicket authTicket = new 14 | FormsAuthenticationTicket(1, //version 15 | userName, // user name 16 | DateTime.Now, //creation 17 | DateTime.Now.AddMinutes(30), //Expiration 18 | false, //Persistent 19 | userName); 20 | 21 | var nerdIdentity = new NerdIdentity(authTicket); 22 | return nerdIdentity; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Tests/Helpers/FileNotFoundResultTests.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | using NerdDinner.Helpers; 5 | 6 | namespace NerdDinner.Tests.Helpers 7 | { 8 | [TestClass] 9 | public class FileNotFoundResultTests 10 | { 11 | [TestMethod] 12 | public void ExecuteResult_Throws_HttpException_With_404_Status() { 13 | // Arrange 14 | ControllerContext context = new ControllerContext(); 15 | FileNotFoundResult result = new FileNotFoundResult(); 16 | 17 | // Act 18 | var thrownException = UnitTestHelper.AssertThrows(() => result.ExecuteResult(context)); 19 | 20 | // Assert 21 | Assert.AreEqual(404, thrownException.GetHttpCode()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Tests/UnitTestHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | 7 | namespace NerdDinner.Tests 8 | { 9 | public static class UnitTestHelper 10 | { 11 | public static TException AssertThrows(Action action) where TException : Exception { 12 | try { 13 | action(); 14 | } 15 | catch (TException e) { 16 | return e; 17 | } 18 | Assert.Fail(); 19 | return null; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.Tests/lib/Moq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner.Tests/lib/Moq.dll -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner.vsmdi: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/App_Browsers/Devices/Capability Documentation.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://mdbf.codeplex.com/Wiki/View.aspx?title=Capabilities&referringTitle=Home 5 | IDList= 6 | IconFile=http://mdbf.codeplex.com/favicon.ico 7 | IconIndex=1 8 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/App_Browsers/Devices/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/App_Browsers/Devices/readme.txt -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/App_Data/ASPNETDB.MDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/App_Data/ASPNETDB.MDF -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/App_Data/NerdDinner.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/App_Data/NerdDinner.mdf -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/App_Data/NerdDinner_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/App_Data/NerdDinner_log.ldf -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/App_Data/aspnetdb_log.LDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/App_Data/aspnetdb_log.LDF -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/ConnectionStrings.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Flair.css: -------------------------------------------------------------------------------- 1 | body, h2, h3, ul{padding:0; margin:0} 2 | #nd-wrapper{border:#c66 1px dotted; width:150px; overflow:hidden} 3 | #nd-outer{margin:0} 4 | h2, #nd-outer{font:13px/1.231 arial,helvetica,clean,sans-serif} 5 | h3{text-align:center} 6 | ul{padding-left:20px} 7 | a{color:#600} 8 | #nd-footer, ul{font-size:11px} 9 | #nd-footer{text-align:center; border-top:black 1px dotted; margin-top:2px} 10 | #nd-header{background-image:url(http://nerddinner.com/Content/Img/flair-logo.png); background-repeat:no-repeat; height:43px; text-indent:-5000px} 11 | #nd-bummer{font-size:11px; padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px} -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/btn-search.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/btn-search.jpg -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_medium.jpg -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_medium.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_medium_trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_medium_trans.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/Mobile/logo_small.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/bkg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/bkg.jpg -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/btn-go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/btn-go.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/btn-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/btn-login.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/button-google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/button-google.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/button-twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/button-twitter.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/button-yahoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/button-yahoo.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/content-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/content-bottom.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/content-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/content-top.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/exclamation.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/google.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/google.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/header-bkg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/header-bkg.jpg -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-content-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-content-bkg.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-content-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-content-bottom.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-content-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-content-top.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-masthead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/hm-masthead.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-facebook.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-feed-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-feed-28x28.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-google.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-icalfeed-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-icalfeed-16x16.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-icalfeed-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-icalfeed-28x28.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-odatafeed-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-odatafeed-28x28.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-twitter.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-yahoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/icon-yahoo.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/logo.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-left-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-left-selected.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-left.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-right-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-right-selected.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/menu-right.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/microformat_hcalendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/microformat_hcalendar.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/search-bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/search-bubble.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/search-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/search-header.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Img/yahoo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/Img/yahoo.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/Mobile/mobile-xhtml.css: -------------------------------------------------------------------------------- 1 | body {font-family: Arial; font-size: medium; background-color: #f7f4e6;} 2 | h1 { margin-top: 5px; } 3 | h2 { margin-left: 5px; font-size: large; color: Gray; } 4 | ul { margin: 0px; padding: 0px; list-style-type: none; } 5 | #search img { border-width: 0px; width: 24px; height: 24px; } 6 | #dinnerList .item { height: 25px; padding: 5px; border-bottom: solid 1px lightblue;} 7 | 8 | #placeOrZip { width: 100%; } 9 | #search { width: 100%; } 10 | 11 | ul { 12 | border-bottom: solid 1px black; } 13 | 14 | ul li { 15 | display: block; 16 | padding: 5px 3px 5px 5px; 17 | border-left: solid 1px black; 18 | border-right: solid 1px black; 19 | border-top: solid 1px black; 20 | } 21 | 22 | ul li ul { 23 | border: none; 24 | } 25 | 26 | ul li ul li{ 27 | border: none; 28 | font-weight: bold; 29 | } 30 | 31 | img { border: none; } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/google.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/google.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/infocard_23x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/infocard_23x16.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/myopenid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/myopenid.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/openid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/openid.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/openid_login.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/openid_login.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/verisign.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/verisign.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/yahoo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/yahoo.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/images/yahoo_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/images/yahoo_login.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/NOTICE.txt: -------------------------------------------------------------------------------- 1 | NOTICE.txt - iUI credits and copyright notices 2 | 3 | Roller is Copyright (c) 2007 by the iUI project members: 4 | Joe Hewitt 5 | Christopher Allen 6 | M. Sean Gilligan 7 | Past members: 8 | (none) 9 | 10 | THIRD PARTY COMPONENTS 11 | 12 | * iUI includes software developed by the Mozilla Project 13 | Copyright (c) 1997-2007, Netscape Communications Corporation and others. 14 | All rights reserved. 15 | http://www.mozilla.org/rhino/ 16 | 17 | * iUI includes software developed by the Dojo Foundation 18 | http://dojotoolkit.org/docs/shrinksafe 19 | 20 | * iUI includes software developed by LCA Soft Ltd. 21 | http://www.lcasoft.com/compress-js.html 22 | 23 | * iUI includes software developed by the ant-googlcode Project 24 | http://code.google.com/p/ant-googlecode/ 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/README.txt: -------------------------------------------------------------------------------- 1 | README.txt 2 | 3 | iUI is a JavaScript and CSS package for developing WebApps for the iPhone. 4 | 5 | To install and use iUI, follow the instructions on the iUI Project Wiki: 6 | http://code.google.com/p/iui/wiki/Introduction 7 | 8 | See also 9 | 10 | NOTICE.txt - iUI credits and copyright notices 11 | LICENSE.txt - iUI licensing terms 12 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/backButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/backButton.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/blueButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/blueButton.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/cancel.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/custom.css: -------------------------------------------------------------------------------- 1 | .row > .toggle { width: 140px } 2 | .toggleOn { width: 100px } 3 | .toggleOff { width: 100px } 4 | .row > select { margin: 12px 6px 0 0; width: 140px } 5 | 6 | li a[href="#"] { background: #fff } 7 | 8 | /* Fix for box-sizing */ 9 | body >.toolbar { -webkit-box-sizing: border-box; } 10 | a[target="_replace"] { -webkit-box-sizing: border-box; } 11 | .dialog >fieldset { -webkit-box-sizing: border-box; } 12 | input { -webkit-box-sizing: border-box; } 13 | body >.panel { -webkit-box-sizing: border-box; } 14 | .row >input { -webkit-box-sizing: border-box; } 15 | 16 | .logo { 17 | display: block; 18 | padding: 0; 19 | width: 244px; 20 | height: 87px; 21 | border-width: 0 8px 0 14px; 22 | background: url(iPhoneLogo.png) no-repeat center; 23 | } 24 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/custom.js: -------------------------------------------------------------------------------- 1 | function toggleView() { 2 | document.moviesapp.view.value = (document.moviesapp.view.value == "Theater") ? "Movie" : "Theater"; 3 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/grayButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/grayButton.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/iPhoneLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/iPhoneLogo.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/listArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/listArrow.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/listArrowSel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/listArrowSel.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/listGroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/listGroup.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/loading.gif -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/pinstripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/pinstripes.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/releaseNotes.txt: -------------------------------------------------------------------------------- 1 | REL-0.13 (in process) 2 | 3 | * Changed releaseNotes.txt to reverse chronological order 4 | 5 | REL-0.12 2007-10-19 6 | 7 | * Google Code Release of v0.12 8 | 9 | v0.12 7/17/2007 10 | 11 | * Fix bug that caused back button to disappear 12 | 13 | v0.11 7/16/2007 14 | 15 | * Fixed bug where clicking a form background would make it disappear 16 | * Added support for to cancel dialogs 17 | * Added leftButton class for placing toolbar buttons on the left 18 | * Added whiteButton and grayButton styles for large dialog buttons 19 | * Support axis="y" to animate pages in vertically 20 | 21 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/selection.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/thumb.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/toggle.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/toggleOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/toggleOn.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/toolButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/toolButton.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/toolbar.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/iui/whiteButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/iui/whiteButton.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/loginpopup.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | font-family: Verdana; 4 | font-size: 10pt; 5 | background-color: White; 6 | margin: 10px; 7 | } 8 | /* 9 | body > div.wrapper 10 | { 11 | width: 355px; 12 | height: 235px; 13 | } 14 | */ 15 | Div#NotMyComputerDiv 16 | { 17 | display: none; 18 | } 19 | 20 | .helpDoc 21 | { 22 | font-size: 80%; 23 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/nerd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/nerd.jpg -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_flat_55_999999_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_flat_55_999999_40x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_flat_75_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_flat_75_aaaaaa_40x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_glass_45_0078ae_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_glass_45_0078ae_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_glass_55_f8da4e_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_glass_55_f8da4e_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_glass_75_79c9ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_glass_75_79c9ec_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_gloss-wave_45_e14f1c_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_gloss-wave_45_e14f1c_500x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_gloss-wave_50_6eac2c_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_gloss-wave_50_6eac2c_500x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_gloss-wave_75_2191c0_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_gloss-wave_75_2191c0_500x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_inset-hard_100_fcfdfd_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-bg_inset-hard_100_fcfdfd_1x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_0078ae_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_0078ae_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_056b93_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_056b93_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_d8e7f3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_d8e7f3_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_e0fdff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_e0fdff_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_f5e175_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_f5e175_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_f7a50d_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_f7a50d_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_fcd113_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Content/theme/images/ui-icons_fcd113_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.accordion.css: -------------------------------------------------------------------------------- 1 | /* Accordion 2 | ----------------------------------*/ 3 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 4 | .ui-accordion li {display: inline;} 5 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 6 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } 7 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 8 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } 9 | .ui-accordion .ui-accordion-content-active { display: block; } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.all.css: -------------------------------------------------------------------------------- 1 | @import "ui.base.css"; 2 | @import "ui.theme.css"; 3 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.base.css: -------------------------------------------------------------------------------- 1 | @import url("ui.core.css"); 2 | 3 | @import url("ui.accordion.css"); 4 | @import url("ui.datepicker.css"); 5 | @import url("ui.dialog.css"); 6 | @import url("ui.progressbar.css"); 7 | @import url("ui.resizable.css"); 8 | @import url("ui.slider.css"); 9 | @import url("ui.tabs.css"); 10 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.dialog.css: -------------------------------------------------------------------------------- 1 | /* Dialog 2 | ----------------------------------*/ 3 | .ui-dialog { position: relative; padding: .2em; width: 300px; } 4 | .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } 5 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } 6 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 7 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 8 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 9 | .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; } 10 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 11 | .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } 12 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 13 | .ui-draggable .ui-dialog-titlebar { cursor: move; } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /* Progressbar 2 | ----------------------------------*/ 3 | .ui-progressbar { height:2em; text-align: left; } 4 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.resizable.css: -------------------------------------------------------------------------------- 1 | /* Resizable 2 | ----------------------------------*/ 3 | .ui-resizable { position: relative;} 4 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} 5 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 6 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } 7 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } 8 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } 9 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } 10 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 11 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 12 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 13 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.slider.css: -------------------------------------------------------------------------------- 1 | /* Slider 2 | ----------------------------------*/ 3 | .ui-slider { position: relative; text-align: left; } 4 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 5 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: 1%; display: block; border: 0; } 6 | 7 | .ui-slider-horizontal { height: .8em; } 8 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 9 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 10 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 11 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 12 | 13 | .ui-slider-vertical { width: .8em; height: 100px; } 14 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 15 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 16 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 17 | .ui-slider-vertical .ui-slider-range-max { top: 0; } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Content/theme/ui.tabs.css: -------------------------------------------------------------------------------- 1 | /* Tabs 2 | ----------------------------------*/ 3 | .ui-tabs {padding: .2em;} 4 | .ui-tabs .ui-tabs-nav { padding: .2em .2em 0 .2em; position: relative; } 5 | .ui-tabs .ui-tabs-nav li { float: left; border-bottom: 0 !important; margin: 0 .2em -1px 0; padding: 0; list-style: none; } 6 | .ui-tabs .ui-tabs-nav li a { display:block; text-decoration: none; padding: .5em 1em; } 7 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: .1em; border-bottom: 0; } 8 | .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border: 0; background: none; } 9 | .ui-tabs .ui-tabs-hide { display: none !important; } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Controllers/HomeController.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 NerdDinner.Controllers { 8 | 9 | [HandleErrorWithELMAH] 10 | public class HomeController : Controller { 11 | 12 | public ActionResult Index() { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() { 17 | return View(); 18 | } 19 | 20 | public ActionResult PrivacyPolicy() 21 | { 22 | return View(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Default.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NerdDinner._Default" %> 2 | 3 | <%-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. --%> 4 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Default.aspx.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.UI; 4 | 5 | namespace NerdDinner { 6 | public partial class _Default : Page { 7 | public void Page_Load(object sender, System.EventArgs e) { 8 | HttpContext.Current.RewritePath(Request.ApplicationPath, false); 9 | IHttpHandler httpHandler = new MvcHttpHandler(); 10 | httpHandler.ProcessRequest(HttpContext.Current); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="NerdDinner.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Helpers/CalendarHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using NerdDinner.Models; 6 | using DDay.iCal; 7 | using DDay.iCal.Components; 8 | using DDay.iCal.Serialization; 9 | using System.Web.Mvc; 10 | using DDay.iCal.DataTypes; 11 | 12 | namespace NerdDinner.Helpers 13 | { 14 | public static class CalendarHelpers 15 | { 16 | public static Event DinnerToEvent(Dinner dinner, iCalendar iCal) 17 | { 18 | string eventLink = "http://nrddnr.com/" + dinner.DinnerId; 19 | Event evt = iCal.Create(); 20 | evt.Start = dinner.EventDate; 21 | evt.Duration = new TimeSpan(3, 0, 0); 22 | evt.Location = dinner.Address; 23 | evt.Summary = String.Format("{0} with {1}", dinner.Description, dinner.HostedBy); 24 | evt.AddContact(dinner.ContactPhone); 25 | evt.Geo = new Geo(dinner.Latitude, dinner.Longitude); 26 | evt.Url = eventLink; 27 | evt.Description = eventLink; 28 | return evt; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Helpers/ControllerHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using NerdDinner.Models; 6 | using System.Web.Mvc; 7 | 8 | namespace NerdDinner.Helpers { 9 | 10 | public static class ModelStateHelpers { 11 | 12 | public static void AddModelErrors(this ModelStateDictionary modelState, IEnumerable errors) { 13 | 14 | foreach (RuleViolation issue in errors) { 15 | modelState.AddModelError(issue.PropertyName, issue.ErrorMessage); 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Helpers/FileNotFoundResult.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 NerdDinner.Helpers 8 | { 9 | public class FileNotFoundResult : ActionResult 10 | { 11 | public string Message { 12 | get; 13 | set; 14 | } 15 | 16 | public override void ExecuteResult(ControllerContext context) { 17 | throw new HttpException(404, Message); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Helpers/PaginatedList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace NerdDinner.Helpers { 6 | 7 | public class PaginatedList : List { 8 | 9 | public int PageIndex { get; private set; } 10 | public int PageSize { get; private set; } 11 | public int TotalCount { get; private set; } 12 | public int TotalPages { get; private set; } 13 | 14 | public PaginatedList(IQueryable source, int pageIndex, int pageSize) { 15 | PageIndex = pageIndex; 16 | PageSize = pageSize; 17 | TotalCount = source.Count(); 18 | TotalPages = (int) Math.Ceiling(TotalCount / (double)PageSize); 19 | 20 | this.AddRange(source.Skip(PageIndex * PageSize).Take(PageSize)); 21 | } 22 | 23 | public bool HasPreviousPage { 24 | get { 25 | return (PageIndex > 0); 26 | } 27 | } 28 | 29 | public bool HasNextPage { 30 | get { 31 | return (PageIndex+1 < TotalPages); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Logs/readme.txt: -------------------------------------------------------------------------------- 1 | For ELMAH Logs, if you choose to have them logged to XML files. -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Models/FlairViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using NerdDinner.Models; 6 | 7 | namespace NerdDinner.Models 8 | { 9 | public class FlairViewModel 10 | { 11 | public IList Dinners { get; set; } 12 | public string LocationName { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Models/MembershipReadModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace NerdDinner.Models 5 | { 6 | public class MembershipReadModel 7 | { 8 | private readonly NerdDinnerEntities db = new NerdDinnerEntities(); 9 | 10 | public MembershipReadModel() 11 | { 12 | MinPasswordLength = 6; 13 | } 14 | 15 | public int MinPasswordLength { get; private set; } 16 | 17 | public string GetCanonicalUsername(string userName) 18 | { 19 | return (from membership in db.Memberships 20 | where membership.UserName == userName 21 | select membership.CanonicalUsername).FirstOrDefault(); 22 | } 23 | 24 | public bool ValidateUser(string userName, string password) 25 | { 26 | return db.Memberships.Any(membership => membership.UserName == userName && membership.Password == password); 27 | } 28 | 29 | public Guid GetUserIdByUserName(string userName) 30 | { 31 | return (from membership in db.Memberships 32 | where membership.UserName == userName 33 | select membership.UserId).FirstOrDefault(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Models/NerdIdentity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Security.Principal; 6 | 7 | namespace NerdDinner 8 | { 9 | public class NerdIdentity : IIdentity 10 | { 11 | private System.Web.Security.FormsAuthenticationTicket ticket; 12 | private readonly string friendlyName; 13 | private readonly Guid userId; 14 | 15 | public NerdIdentity(System.Web.Security.FormsAuthenticationTicket ticket) 16 | { 17 | this.ticket = ticket; 18 | var userData = ticket.UserData.Split('|'); 19 | 20 | if(userData.Length != 2) return; 21 | friendlyName = userData[0]; 22 | userId = new Guid(userData[1]); 23 | } 24 | 25 | public string AuthenticationType 26 | { 27 | get { return "Nerd"; } 28 | } 29 | 30 | public bool IsAuthenticated 31 | { 32 | get { return true; } 33 | } 34 | 35 | public string Name 36 | { 37 | get { return ticket.Name; } 38 | } 39 | 40 | public string FriendlyName 41 | { 42 | get { return friendlyName; } 43 | } 44 | 45 | public Guid UserId 46 | { 47 | get { return userId; } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Models/RsvpReadModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace NerdDinner.Models 6 | { 7 | public class RsvpReadModel 8 | { 9 | private readonly NerdDinnerEntities db = new NerdDinnerEntities(); 10 | 11 | public bool IsUserRegistered(Guid dinnerId, string name) 12 | { 13 | return (from rsvp in db.Rsvps 14 | where rsvp.DinnerId == dinnerId 15 | where rsvp.AttendeeName == name 16 | select rsvp).Any(); 17 | } 18 | 19 | public int GetNumberOfRsvpsForDinner(Guid dinnerId) 20 | { 21 | return db.Rsvps.Where(rsvp => rsvp.DinnerId == dinnerId).Count(); 22 | } 23 | 24 | public IEnumerable GetRsvpsForDinner(Guid dinnerId) 25 | { 26 | return db.Rsvps.Where(rsvp => rsvp.DinnerId == dinnerId); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Models/RuleViolation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace NerdDinner.Models { 7 | 8 | public class RuleViolation { 9 | 10 | public string ErrorMessage { get; private set; } 11 | public string PropertyName { get; private set; } 12 | 13 | public RuleViolation(string errorMessage) { 14 | ErrorMessage = errorMessage; 15 | } 16 | 17 | public RuleViolation(string errorMessage, string propertyName) { 18 | ErrorMessage = errorMessage; 19 | PropertyName = propertyName; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/Scripts/smothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Service References/Services/CommandService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Service References/Services/CommandService1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Service References/Services/CommandService4.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Service References/Services/CommandService5.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Service References/Services/NerdDinner.Services.CancelDinnerStatus.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | NerdDinner.Services.CancelDinnerStatus, Service References.Services.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Service References/Services/NerdDinner.Services.CreateDinnerStatus.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | NerdDinner.Services.CreateDinnerStatus, Service References.Services.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/FormsAuthenticationService.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Security; 2 | 3 | namespace NerdDinner.Services 4 | { 5 | public class FormsAuthenticationService : IFormsAuthentication 6 | { 7 | public void SignIn(string userName, bool createPersistentCookie) 8 | { 9 | FormsAuthentication.SetAuthCookie(userName, createPersistentCookie); 10 | } 11 | 12 | public void SignOut() 13 | { 14 | FormsAuthentication.SignOut(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/IFormsAuthentication.cs: -------------------------------------------------------------------------------- 1 | namespace NerdDinner.Services 2 | { 3 | public interface IFormsAuthentication 4 | { 5 | void SignIn(string userName, bool createPersistentCookie); 6 | void SignOut(); 7 | } 8 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/IMembershipService.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Security; 2 | 3 | namespace NerdDinner.Services 4 | { 5 | public interface IMembershipService 6 | { 7 | int MinPasswordLength { get; } 8 | 9 | bool ValidateUser(string userName, string password); 10 | string GetCanonicalUsername(string userName); 11 | MembershipCreateStatus CreateUser(string userName, string password, string email); 12 | bool ChangePassword(string userName, string oldPassword, string newPassword); 13 | } 14 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/OData.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="NerdDinner.ODataServices" %> 2 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/OData.svc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Services; 3 | using System.Data.Services.Common; 4 | using System.Linq; 5 | using System.ServiceModel; 6 | using System.ServiceModel.Web; 7 | using System.Web; 8 | using System.Xml.Linq; 9 | using NerdDinner.Helpers; 10 | using NerdDinner.Models; 11 | using NerdDinner.Services; 12 | using DataServicesJSONP; 13 | 14 | namespace NerdDinner 15 | { 16 | [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)] 17 | [JSONPSupportBehavior] 18 | public class ODataServices : DataService 19 | { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/OpenSearch.ashx: -------------------------------------------------------------------------------- 1 | <%@ WebHandler Language="C#" CodeBehind="OpenSearch.ashx.cs" Class="NerdDinner.OpenSearch" %> 2 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Services/OpenSearch.ashx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using OpenSearchToolkit; 6 | using NerdDinner.Models; 7 | 8 | namespace NerdDinner 9 | { 10 | /// 11 | /// Summary description for OpenSearch 12 | /// 13 | public class OpenSearch : OpenSearchHandler 14 | { 15 | protected override Description Description 16 | { 17 | get 18 | { 19 | return new Description 20 | { 21 | DisplayName = "NerdDinner.com", 22 | LongDescription = "Nerd Dinner - Organizing the world's nerds and helping them eat in packs", 23 | SearchPathTemplate = "/Dinners?q={0}", 24 | IconPath = "~/favicon.ico" 25 | }; 26 | } 27 | } 28 | 29 | protected override IEnumerable GetResults(string term) 30 | { 31 | throw new NotImplementedException(); 32 | } 33 | 34 | protected override IEnumerable GetSuggestions(string term) 35 | { 36 | throw new NotImplementedException(); 37 | } 38 | 39 | protected override bool SupportsSuggestions 40 | { 41 | get { return true; } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Account/ChangePasswordSuccess.aspx: -------------------------------------------------------------------------------- 1 | <%@Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Change Password 5 | 6 | 7 | 8 |

Change Password

9 |

10 | Your password has been changed successfully. 11 |

12 |
13 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/Create.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Views/Shared/Site.Master" %> 2 | 3 | 4 | Host a Nerd Dinner 5 | 6 | 7 | 8 | 9 |

Host a Dinner

10 | 11 | <% Html.RenderPartial("DinnerForm"); %> 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/Delete.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Delete Confirmation: <%:Model.Title %> 5 | 6 | 7 | 8 | 9 |

10 | Delete Confirmation 11 |

12 | 13 |
14 |

Please confirm you want to cancel the dinner titled: 15 | <%:Model.Title %>?

16 |
17 | 18 | <% using (Html.BeginForm()) { %> 19 | 20 | 21 | 22 | <% } %> 23 | 24 |
25 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/Deleted.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Deleted 5 | 6 | 7 | 8 | 9 |

Dinner Deleted

10 | 11 |
12 |

Your dinner was successfully deleted.

13 |
14 | 15 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/EditAndDeleteLinks.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | 3 | <% if (Model.IsHostedBy(Context.User.Identity.Name)) { %> 4 | 5 | <%: Html.ActionLink("Edit Dinner", "Edit", new { id=Model.DinnerId })%> 6 | | 7 | <%: Html.ActionLink("Delete Dinner", "Delete", new { id = Model.DinnerId })%> 8 | 9 | <% } %> -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/InvalidOwner.aspx: -------------------------------------------------------------------------------- 1 | 2 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 3 | 4 | 5 | You Don't Own This Dinner 6 | 7 | 8 | 9 | 10 |

Error Accessing Dinner

11 | 12 |

Sorry - but only the host of a Dinner can edit or delete it.

13 | 14 |
15 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/Map.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | 3 | 4 | 5 | 6 | 7 |
8 | 29 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/Mobile/iPhone/Details.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 11 | 12 |
13 |

Who's Coming?

14 | <%if (Model.GetRsvpCount() == 0){%> 15 |
  • No one has registered.
16 | <% } %> 17 | 18 | <%if(Model.GetRsvpCount() > 0) {%> 19 |
    20 | <%foreach (var rsvp in Model.GetRsvps()){%> 21 |
  • <%: rsvp.AttendeeName.Replace("@", " at ")%>
  • 22 | <% } %> 23 |
24 | <%} %> 25 |
-------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/My.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %> 2 | 3 | 4 | My Dinners 5 | 6 | 7 | 8 | 9 |

My Dinners

10 | 11 |
    12 | 13 | <% foreach (var dinner in Model) { %> 14 | 15 |
  • 16 | <%: Html.ActionLink(dinner.Title, "Details", new { id=dinner.DinnerId }) %> 17 | on 18 | <%: dinner.EventDate.ToString("yyyy-MMM-dd")%> 19 | <%: dinner.EventDate.ToString("HH:mm tt")%> 20 | at 21 | <%: dinner.Address + " " + dinner.Country %> 22 |
  • 23 | 24 | <% } %> 25 | 26 | <% if (Model.Count() == 0) { %> 27 |
  • You don't own or aren't registered for any dinners.
  • 28 | <% } %> 29 | 30 | 31 |
32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/NotFound.aspx: -------------------------------------------------------------------------------- 1 | 2 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 3 | 4 | 5 | Nerd Dinner Not Found 6 | 7 | 8 | 9 | 10 |

Lost?

11 | 12 |

Sorry - but the dinner you requested doesn't exist or was deleted.

13 | 14 |
15 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Dinners/WebSlice.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage>" ContentType="text/html" %> 2 | 3 | 4 | 5 | 6 | 7 | <%: ViewData["Title"] %>< 8 | 9 | 10 |
11 |
12 |

<%: ViewData["Title"] %>

13 |
14 |
    15 | <% foreach (var dinner in Model) { %> 16 |
  • 17 | <%: Html.ActionLink(dinner.Title, "Details", new { id=dinner.DinnerId }) %> 18 | on 19 | <%: dinner.EventDate.ToString("yyyy-MMM-dd")%> 20 | <%: dinner.EventDate.ToString("HH:mm tt")%> at 21 | <%: dinner.Address + " " + dinner.Country %> 22 |
  • 23 | <% } %> 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Home/Mobile/Index.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Mobile/Site.Master" 2 | Inherits="System.Web.Mvc.ViewPage" %> 3 | 4 | 5 | NerdDinner.com 6 | 7 | 8 |

nerddinner

9 |

Find a Nerd Dinner near you!

10 | <% using (Html.BeginForm("SearchByPlaceNameOrZip", "Search", FormMethod.Post)) { %> 11 | 15 | <% } %> 16 |
17 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Home/Mobile/iPhone/Index.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Mobile/iPhone/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | NerdDinner 5 | 6 | 7 | 8 | 9 |
10 |

11 | 12 |
13 |
14 | 15 |

Find a Nerd Dinner near you!

16 |
17 |
18 | 19 | 20 |
21 |
22 | Go 23 |
24 | 25 |
26 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Home/PrivacyPolicy.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | PrivacyPolicy 5 | 6 | 7 | 8 | 9 |

PrivacyPolicy

10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | We will never sell or give away anything of yours that we have. Honest. 18 | 19 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Confused.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Error 5 | 6 | 7 | 8 |

Confused?

9 |

Are you lost? Try taking a look at the complete list of Upcoming Dinners.

10 |
11 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/EditorTemplates/CountryDropDown.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <%: Html.DropDownList("", new SelectList(NerdDinner.Helpers.PhoneValidator.Countries, Model)) %> -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/EditorTemplates/DateTime.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <%: Html.TextBox("", String.Format("{0:yyyy-MM-dd HH:mm}",Model)) %> 3 | 11 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Error.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Error 5 | 6 | 7 | 8 |

Oh Snap!

9 |

Sorry, an error occurred while processing your request. We've been notified and we will check it out. If you know what you were doing, or if you're evil, let us know on our feedback site.

10 |
11 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/LocationDetail.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | 3 | 4 |
5 |
6 | 27 | (drag the pin in the map if it doesn't look right) * 28 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/LogOn.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | " /> 5 | " /> 6 | 7 | 8 | <% Html.RenderPartial("LogOnContent"); %> 9 | 10 | 11 | <% Html.RenderPartial("LogOnScripts"); %> 12 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/LogOnContent.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <%@ Import Namespace="DotNetOpenAuth.Mvc" %> 3 | <%@ Import Namespace="DotNetOpenAuth.OpenId.RelyingParty" %> 4 | 5 | <% using (Html.BeginForm("LogOnPostAssertion", "Auth", FormMethod.Post, new { target = "_top" })) { %> 6 | <%= Html.AntiForgeryToken() %> 7 | <%= Html.Hidden("ReturnUrl", Request.QueryString["ReturnUrl"], new { id = "ReturnUrl" }) %> 8 | <%= Html.Hidden("openid_openidAuthData") %> 9 |
10 | <%= Html.OpenIdSelector(this.Page, new SelectorButton[] { 11 | new SelectorProviderButton("https://me.yahoo.com/", Url.Content("~/Content/images/yahoo.gif")), 12 | new SelectorProviderButton("https://www.google.com/accounts/o8/id", Url.Content("~/Content/images/google.gif")), 13 | new SelectorOpenIdButton(Url.Content("~/Content/images/openid.gif")), 14 | }) %> 15 | 16 |
17 |

18 | If you have logged in previously, click the same button you did last time. 19 |

20 |
21 | 22 |
23 | <% } %> 24 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/LoginStatus.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <%@ Import Namespace="NerdDinner" %> 3 | <% 4 | if (Request.IsAuthenticated) { 5 | %> 6 | Welcome <%: ((NerdIdentity)Page.User.Identity).FriendlyName %>! 7 | [ <%: Html.ActionLink("Log Off", "LogOff", "Account") %> ] 8 | <% 9 | } 10 | else { 11 | %> 12 | [ <%: Html.ActionLink("Log On", "LogOn", new { controller = "Account", returnUrl = HttpContext.Current.Request.RawUrl }) %> ] 13 | <% 14 | } 15 | %> 16 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Masthead.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 |
3 | <%if ((bool)Model == true) { //Show Search Box %> 4 | 9 | <% } %> 10 |
11 | 12 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Mobile/Results.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Mobile/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %> 2 | 3 | 4 | Results 5 | 6 | 7 | 8 | 9 |

Nerd Dinners

10 |
    11 | <% foreach (var dinner in Model) { %> 12 |
  • 13 |
      14 |
    • 15 | "><%:dinner.Title %> 16 |
    • 17 |
    • 18 | <%:dinner.EventDate.ToString("yyyy-MMM-dd")%> 19 | @ 20 | <%: dinner.EventDate.ToString("h:mm tt")%> 21 |
    • 22 |
    23 | 24 |
  • 25 | <% } %> 26 | <% if (Model.Count() == 0) { %> 27 |
  • No Nerd Dinners found!
  • 28 | <% } %> 29 | 30 |
31 |

32 | <%: Html.ActionLink("Back", "Index", "Home") %> 33 |

34 | 35 |
36 | 37 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Mobile/Site.Master: -------------------------------------------------------------------------------- 1 | <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> 2 | 3 | 4 | 5 | <asp:ContentPlaceHolder ID="TitleContent" runat="server" ></asp:ContentPlaceHolder> 6 | 7 | <%-- TODO: Remove expires tag --%> 8 | 9 | 10 | 11 | , height=<%:Request.Browser["ScreenPixelsHeight"]%>"/> 12 | 13 | 14 |
15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Mobile/iPhone/Results.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Inherits="System.Web.Mvc.ViewPage>" Language="C#" %> 2 | 12 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/Views/Shared/Mobile/iPhone/Site.Master: -------------------------------------------------------------------------------- 1 | <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> 2 | 3 | 4 | 5 | <asp:ContentPlaceHolder ID="TitleContent" runat="server" ></asp:ContentPlaceHolder> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/apple-touch-icon.png -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/favicon.ico -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/DDay.iCal-License.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/DDay.iCal-License.txt -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/DDay.iCal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/DDay.iCal.dll -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/DotNetOpenAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/DotNetOpenAuth.dll -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/DotNetOpenAuth.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/DotNetOpenAuth.pdb -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/Elmah.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/Elmah.dll -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/Elmah.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/Elmah.pdb -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/OpenSearchToolkit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/OpenSearchToolkit.dll -------------------------------------------------------------------------------- /sample/NerdDinner_2.0/NerdDinner/lib/antlr.runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/sample/NerdDinner_2.0/NerdDinner/lib/antlr.runtime.dll -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleCQRSDemo", "SimpleCQRSDemo\SimpleCQRSDemo.csproj", "{E9C9FB2C-9DF3-492F-BC94-47298AD92E14}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {E9C9FB2C-9DF3-492F-BC94-47298AD92E14}.Debug|x86.ActiveCfg = Debug|x86 13 | {E9C9FB2C-9DF3-492F-BC94-47298AD92E14}.Debug|x86.Build.0 = Debug|x86 14 | {E9C9FB2C-9DF3-492F-BC94-47298AD92E14}.Release|x86.ActiveCfg = Release|x86 15 | {E9C9FB2C-9DF3-492F-BC94-47298AD92E14}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/CommandHandlers/CreateAccountCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Commanding; 3 | using SimpleCqrs.Domain; 4 | using SimpleCQRSDemo.Commands; 5 | using SimpleCQRSDemo.Domain; 6 | 7 | namespace SimpleCQRSDemo.CommandHandlers 8 | { 9 | public class CreateAccountCommandHandler : CommandHandler 10 | { 11 | private readonly IDomainRepository repository; 12 | 13 | public CreateAccountCommandHandler(IDomainRepository repository) 14 | { 15 | this.repository = repository; 16 | } 17 | 18 | public override void Handle(CreateAccountCommand command) 19 | { 20 | var account = new Account(Guid.NewGuid()); 21 | account.SetName(command.FirstName, command.LastName); 22 | 23 | repository.Save(account); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/Commands/CreateAccountCommand.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Commanding; 2 | 3 | namespace SimpleCQRSDemo.Commands 4 | { 5 | public class CreateAccountCommand : ICommand 6 | { 7 | public string FirstName { get; set; } 8 | public string LastName { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/Denormalizers/AccountReportDenormalizer.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using SimpleCqrs.Eventing; 3 | using SimpleCQRSDemo.Events; 4 | using SimpleCQRSDemo.FakeDb; 5 | 6 | namespace SimpleCQRSDemo.Denormalizers 7 | { 8 | public class AccountReportDenormalizer : IHandleDomainEvents, 9 | IHandleDomainEvents 10 | { 11 | private readonly FakeAccountTable accountTable; 12 | 13 | public AccountReportDenormalizer(FakeAccountTable accountTable) 14 | { 15 | this.accountTable = accountTable; 16 | } 17 | 18 | public void Handle(AccountCreatedEvent domainEvent) 19 | { 20 | accountTable.Add(new FakeAccountTableRow {Id = domainEvent.AggregateRootId }); 21 | } 22 | 23 | public void Handle(AccountNameSetEvent domainEvent) 24 | { 25 | var account = accountTable.Single(x => x.Id == domainEvent.AggregateRootId); 26 | account.Name = domainEvent.FirstName + " " + domainEvent.LastName; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/Domain/Account.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Domain; 3 | using SimpleCQRSDemo.Events; 4 | 5 | namespace SimpleCQRSDemo.Domain 6 | { 7 | public class Account : AggregateRoot 8 | { 9 | public Account(Guid id) 10 | { 11 | Apply(new AccountCreatedEvent { AggregateRootId = id }); 12 | } 13 | 14 | public void SetName(string firstName, string lastName) 15 | { 16 | Apply(new AccountNameSetEvent{ FirstName = firstName, LastName = lastName}); 17 | } 18 | 19 | public void OnAccountCreated(AccountCreatedEvent evt) 20 | { 21 | Id = evt.AggregateRootId; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/Events/AccountCreatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace SimpleCQRSDemo.Events 5 | { 6 | public class AccountCreatedEvent : DomainEvent { } 7 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/Events/AccountNameSetEvent.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Eventing; 2 | 3 | namespace SimpleCQRSDemo.Events 4 | { 5 | public class AccountNameSetEvent : DomainEvent 6 | { 7 | public string FirstName { get; set; } 8 | public string LastName { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/FakeDb/FakeAccountTable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace SimpleCQRSDemo.FakeDb 4 | { 5 | public class FakeAccountTable : List 6 | { } 7 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/FakeDb/FakeAccountTableRow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCQRSDemo.FakeDb 4 | { 5 | public class FakeAccountTableRow 6 | { 7 | public Guid Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/ReadModel/AccountReadModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCQRSDemo.ReadModel 4 | { 5 | public class AccountReadModel 6 | { 7 | public string Name { get; set; } 8 | public Guid Id { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/ReadModel/AccountReportReadService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using SimpleCQRSDemo.FakeDb; 4 | 5 | namespace SimpleCQRSDemo.ReadModel 6 | { 7 | public class AccountReportReadService 8 | { 9 | private FakeAccountTable fakeAccountDb; 10 | 11 | public AccountReportReadService(FakeAccountTable fakeAccountDb) 12 | { 13 | this.fakeAccountDb = fakeAccountDb; 14 | } 15 | 16 | public IEnumerable GetAccounts() 17 | { 18 | return from a in fakeAccountDb 19 | select new AccountReadModel { Id = a.Id, Name = a.Name }; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /sample/SimpleCQRSDemo/SimpleCQRSDemo/SampleRunTime.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs; 2 | using SimpleCqrs.Unity; 3 | 4 | namespace SimpleCQRSDemo 5 | { 6 | public class SampleRunTime : SimpleCqrsRuntime { } 7 | } -------------------------------------------------------------------------------- /sample/SqlServerEventStore/SqlServerEventStore.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerEventStore", "SqlServerEventStore\SqlServerEventStore.csproj", "{EAE99B0F-509C-4268-BA1E-2D225745AC0B}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {EAE99B0F-509C-4268-BA1E-2D225745AC0B}.Debug|x86.ActiveCfg = Debug|x86 13 | {EAE99B0F-509C-4268-BA1E-2D225745AC0B}.Debug|x86.Build.0 = Debug|x86 14 | {EAE99B0F-509C-4268-BA1E-2D225745AC0B}.Release|x86.ActiveCfg = Release|x86 15 | {EAE99B0F-509C-4268-BA1E-2D225745AC0B}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /src/EventStores/SimpleCqrs.EventStore.File/FileSnapshotStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Domain; 3 | using SimpleCqrs.Eventing; 4 | 5 | namespace SimpleCqrs.EventStore.File 6 | { 7 | public class FileSnapshotStore : ISnapshotStore 8 | { 9 | public Snapshot GetSnapshot(Guid aggregateRootId) 10 | { 11 | throw new NotImplementedException(); 12 | } 13 | 14 | public void SaveSnapshot(TSnapshot snapshot) where TSnapshot : Snapshot 15 | { 16 | throw new NotImplementedException(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/EventStores/SimpleCqrs.EventStore.SqlServer/IDomainEventSerializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using SimpleCqrs.Eventing; 6 | 7 | namespace SimpleCqrs.EventStore.SqlServer 8 | { 9 | public interface IDomainEventSerializer 10 | { 11 | string Serialize(DomainEvent domainEvent); 12 | DomainEvent Deserialize(Type targetType, string serializedDomainEvent); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EventStores/SimpleCqrs.EventStore.SqlServer/SqlServerConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.EventStore.SqlServer 2 | { 3 | public class SqlServerConfiguration 4 | { 5 | private readonly string connectionString; 6 | 7 | public SqlServerConfiguration(string connectionString) 8 | { 9 | this.connectionString = connectionString; 10 | } 11 | 12 | public string ConnectionString 13 | { 14 | get { return connectionString; } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/EventStores/SimpleCqrs.EventStore.SqlServer/SqlStatements.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.EventStore.SqlServer 2 | { 3 | public class SqlStatements 4 | { 5 | internal const string GetEventsByType = "select eventtype, data from {0} where eventtype in ('{1}')"; 6 | internal const string InsertEvents = "insert into {0} values ('{1}', '{2}', '{3}', {4}, '{5}')"; 7 | internal const string GetEventsByAggregateRootAndSequence = "select eventtype, data from {1} where aggregaterootid = '{2}' and sequence >= {3}"; 8 | internal const string CreateTheEventStoreTable = @"IF not EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[{0}]') AND type in (N'U')) 9 | begin 10 | create table dbo.[{0}]( 11 | EventId int identity not null primary key, 12 | EventType nvarchar(255), 13 | AggregateRootId uniqueidentifier not null, 14 | EventDate datetime not null, 15 | Sequence int not null, 16 | Data nvarchar(max) 17 | ) 18 | end"; 19 | } 20 | } -------------------------------------------------------------------------------- /src/EventStores/SimpleCqrs.EventStore.SqlServer/TypeToStringHelperMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.EventStore.SqlServer 4 | { 5 | public static class TypeToStringHelperMethods 6 | { 7 | public static string GetString(Type type) 8 | { 9 | var typeArray = type.AssemblyQualifiedName.Split(" ".ToCharArray()); 10 | var returnValue = typeArray[0] + " " + typeArray[1].Replace(",", ""); 11 | return returnValue; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/CommandBusExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace SimpleCqrs.NServiceBus.Commanding 5 | { 6 | public static class CommandBusExtensionMethods 7 | { 8 | public static ICallback ExecuteWithCallback(this ICommandBus commandBus, TCommand command) where TCommand : ICommand 9 | { 10 | var bus = (NsbCommandBus)commandBus; 11 | var destination = bus.GetDestinationForCommandType(); 12 | return bus.InnerBus.Send(destination, message => message.Command = command); 13 | } 14 | 15 | public static int ExecuteWeb(this ICommandBus commandBus, TCommand command) where TCommand : ICommand 16 | { 17 | var bus = (NsbCommandBus)commandBus; 18 | var destination = bus.GetDestinationForCommandType(); 19 | var returnValue = 0; 20 | 21 | bus.InnerBus.Send(destination, message => message.Command = command) 22 | .RegisterWebCallback(errorCode => returnValue = errorCode, null); 23 | 24 | return returnValue; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/CommandMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NServiceBus; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace SimpleCqrs.NServiceBus.Commanding 6 | { 7 | [Serializable] 8 | public class CommandMessage : IMessage 9 | { 10 | public ICommand Command { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/CommandMessageHandler.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs.Commanding; 3 | using SimpleCqrs.NServiceBus.Commanding; 4 | 5 | namespace SimpleCqrs.NServiceBus 6 | { 7 | public class CommandMessageHandler : IHandleMessages 8 | { 9 | private readonly ICommandBus commandBus; 10 | 11 | public CommandMessageHandler(ICommandBus commandBus) 12 | { 13 | this.commandBus = commandBus; 14 | } 15 | 16 | public void Handle(CommandMessage message) 17 | { 18 | commandBus.Send(message.Command); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/CommandWithReturnValueMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NServiceBus; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace SimpleCqrs.NServiceBus.Commanding 6 | { 7 | [Serializable] 8 | public class CommandWithReturnValueMessage : IMessage 9 | { 10 | public ICommand Command { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/CommandWithReturnValueMessageHandler.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace SimpleCqrs.NServiceBus.Commanding 5 | { 6 | public class CommandWithReturnValueMessageHandler : IHandleMessages 7 | { 8 | private readonly ICommandBus commandBus; 9 | private readonly IBus bus; 10 | 11 | public CommandWithReturnValueMessageHandler(ICommandBus commandBus, IBus bus) 12 | { 13 | this.commandBus = commandBus; 14 | this.bus = bus; 15 | } 16 | 17 | public void Handle(CommandWithReturnValueMessage message) 18 | { 19 | var value = commandBus.Execute(message.Command); 20 | bus.Return(value); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/Config/CommandBusConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Configuration; 2 | 3 | namespace SimpleCqrs.NServiceBus.Commanding.Config 4 | { 5 | public class CommandBusConfig : ConfigurationSection 6 | { 7 | private const string CommandEndpointMappingsElementName = "CommandEndpointMappings"; 8 | 9 | [ConfigurationProperty(CommandEndpointMappingsElementName, IsRequired = false)] 10 | public CommandEndpointMappingCollection CommandEndpointMappings 11 | { 12 | get { return (base[CommandEndpointMappingsElementName] as CommandEndpointMappingCollection); } 13 | set { base[CommandEndpointMappingsElementName] = value; } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Commanding/Config/CommandEndpointMapping.cs: -------------------------------------------------------------------------------- 1 | using System.Configuration; 2 | 3 | namespace SimpleCqrs.NServiceBus.Commanding.Config 4 | { 5 | public class CommandEndpointMapping : ConfigurationElement 6 | { 7 | private const string CommandsPropertyName = "Commands"; 8 | private const string EndpointPropertyName = "Endpoint"; 9 | 10 | [ConfigurationProperty(EndpointPropertyName, IsRequired = true, IsKey = true)] 11 | public string Endpoint 12 | { 13 | get { return (string)base[EndpointPropertyName]; } 14 | set { base[EndpointPropertyName] = value; } 15 | } 16 | 17 | [ConfigurationProperty(CommandsPropertyName, IsRequired = false)] 18 | public string Commands 19 | { 20 | get { return (string)base[CommandsPropertyName]; } 21 | set { base[CommandsPropertyName] = value; } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/ConfigureSimpleCqrs.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | 3 | namespace SimpleCqrs.NServiceBus 4 | { 5 | public static class ConfigureSimpleCqrs 6 | { 7 | public static ConfigSimpleCqrs SimpleCqrs(this Configure configure, ISimpleCqrsRuntime runtime) 8 | { 9 | var configSimpleCqrs = new ConfigSimpleCqrs(runtime); 10 | configSimpleCqrs.Configure(configure); 11 | return configSimpleCqrs; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Eventing/Config/DomainEventBusConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Configuration; 2 | 3 | namespace SimpleCqrs.NServiceBus.Eventing.Config 4 | { 5 | public class DomainEventBusConfig : ConfigurationSection 6 | { 7 | private const string DomainEventEndpointMappingsElementName = "DomainEventEndpointMappings"; 8 | 9 | [ConfigurationProperty(DomainEventEndpointMappingsElementName, IsRequired = false)] 10 | public DomainEventEndpointMappingCollection DomainEventEndpointMappings 11 | { 12 | get { return (base[DomainEventEndpointMappingsElementName] as DomainEventEndpointMappingCollection); } 13 | set { base[DomainEventEndpointMappingsElementName] = value; } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Eventing/Config/DomainEventEndpointMapping.cs: -------------------------------------------------------------------------------- 1 | using System.Configuration; 2 | 3 | namespace SimpleCqrs.NServiceBus.Eventing.Config 4 | { 5 | public class DomainEventEndpointMapping : ConfigurationElement 6 | { 7 | private const string DomainEventsPropertyName = "DomainEvents"; 8 | private const string EndpointPropertyName = "Endpoint"; 9 | 10 | [ConfigurationProperty(EndpointPropertyName, IsRequired = true, IsKey = true)] 11 | public string Endpoint 12 | { 13 | get { return (string)base[EndpointPropertyName]; } 14 | set { base[EndpointPropertyName] = value; } 15 | } 16 | 17 | [ConfigurationProperty(DomainEventsPropertyName, IsRequired = true, IsKey = true)] 18 | public string DomainEvents 19 | { 20 | get { return (string)base[DomainEventsPropertyName]; } 21 | set { base[DomainEventsPropertyName] = value; } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Eventing/DomainEventMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace SimpleCqrs.NServiceBus.Eventing 5 | { 6 | [Serializable] 7 | public class DomainEventMessage : IDomainEventMessage 8 | where TDomainEvent : DomainEvent 9 | { 10 | public TDomainEvent DomainEvent { get; set; } 11 | 12 | public string Header { get; set; } 13 | 14 | DomainEvent IDomainEventMessage.DomainEvent 15 | { 16 | get { return DomainEvent; } 17 | set { DomainEvent = (TDomainEvent)value; } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Eventing/DomainEventMessageHandler.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace SimpleCqrs.NServiceBus.Eventing 5 | { 6 | public class DomainEventMessageHandler : IHandleMessages 7 | { 8 | private readonly IEventBus eventBus; 9 | 10 | public DomainEventMessageHandler(IEventBus eventBus) 11 | { 12 | this.eventBus = eventBus; 13 | } 14 | 15 | public void Handle(IDomainEventMessage message) 16 | { 17 | var domainEvent = message.DomainEvent; 18 | eventBus.PublishEvent(domainEvent); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Eventing/IDomainEventMessage.cs: -------------------------------------------------------------------------------- 1 | using NServiceBus; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace SimpleCqrs.NServiceBus.Eventing 5 | { 6 | public interface IDomainEventMessage : IMessage 7 | { 8 | DomainEvent DomainEvent { get; set; } 9 | string Header { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.NServiceBus.Core/Eventing/NsbEventBus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using NServiceBus; 5 | using SimpleCqrs.Eventing; 6 | 7 | namespace SimpleCqrs.NServiceBus.Eventing 8 | { 9 | internal class NsbEventBus : IEventBus 10 | { 11 | private IBus bus; 12 | 13 | public void PublishEvent(DomainEvent domainEvent) 14 | { 15 | Bus.Publish(message => message.DomainEvent = domainEvent); 16 | } 17 | 18 | public void PublishEvents(IEnumerable domainEvents) 19 | { 20 | var domainEventMessages = domainEvents.Select(CreateDomainEventMessage).ToList(); 21 | domainEventMessages.ForEach(message => Bus.Publish(message)); 22 | } 23 | 24 | private IBus Bus 25 | { 26 | get { return bus ?? (bus = Configure.Instance.Builder.Build()); } 27 | } 28 | 29 | private static IDomainEventMessage CreateDomainEventMessage(DomainEvent domainEvent) 30 | { 31 | var domainEventMessageType = typeof(DomainEventMessage<>).MakeGenericType(domainEvent.GetType()); 32 | var message = (IDomainEventMessage)Activator.CreateInstance(domainEventMessageType); 33 | message.DomainEvent = domainEvent; 34 | return message; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/DomainEventConsumer.cs: -------------------------------------------------------------------------------- 1 | using Rhino.ServiceBus; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace SimpleCqrs.Rhino.ServiceBus 5 | { 6 | public class DomainEventConsumer : ConsumerOf 7 | { 8 | private readonly IEventBus eventBus; 9 | 10 | public DomainEventConsumer(IEventBus eventBus) 11 | { 12 | this.eventBus = eventBus; 13 | } 14 | 15 | public void Consume(DomainEvent domainEvent) 16 | { 17 | eventBus.PublishEvent(domainEvent); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/Reply.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Commanding; 2 | 3 | namespace SimpleCqrs.Rhino.ServiceBus 4 | { 5 | public class Reply : IReply where TCommand : ICommand 6 | { 7 | public int ValidationResult { get; set; } 8 | } 9 | 10 | public interface IReply 11 | { 12 | int ValidationResult { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/ReplyConsumer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using Rhino.ServiceBus; 4 | using SimpleCqrs.Commanding; 5 | 6 | namespace SimpleCqrs.Rhino.ServiceBus 7 | { 8 | public class ReplyConsumer : OccasionalConsumerOf> where TCommand : ICommand 9 | { 10 | public ReplyConsumer() 11 | { 12 | Event = new ManualResetEvent(false); 13 | } 14 | 15 | public ManualResetEvent Event { get; set; } 16 | public int ValidationResult { get; set; } 17 | 18 | public void Consume(Reply replay) 19 | { 20 | ValidationResult = replay.ValidationResult; 21 | Event.Set(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/Request.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Commanding; 2 | 3 | namespace SimpleCqrs.Rhino.ServiceBus 4 | { 5 | public class Request : IRequest where TCommand : ICommand 6 | { 7 | public TCommand Command { get; set; } 8 | 9 | ICommand IRequest.Command 10 | { 11 | get { return Command; } 12 | set { Command = (TCommand)value; } 13 | } 14 | } 15 | 16 | public interface IRequest 17 | { 18 | ICommand Command { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/RsbCommandBus.cs: -------------------------------------------------------------------------------- 1 | using Rhino.ServiceBus; 2 | using SimpleCqrs.Commanding; 3 | 4 | namespace SimpleCqrs.Rhino.ServiceBus 5 | { 6 | public class RsbCommandBus : ICommandBus 7 | { 8 | private readonly IServiceBus serviceBus; 9 | 10 | public RsbCommandBus(IServiceBus serviceBus) 11 | { 12 | this.serviceBus = serviceBus; 13 | } 14 | 15 | public int Execute(TCommand command) where TCommand : ICommand 16 | { 17 | var replyConsumer = new ReplyConsumer(); 18 | using(serviceBus.AddInstanceSubscription(replyConsumer)) 19 | { 20 | serviceBus.Send(new Request{Command = command }); 21 | if (!replyConsumer.Event.WaitOne(50000)) 22 | throw new ExecuteTimeoutException(); 23 | 24 | return replyConsumer.ValidationResult; 25 | } 26 | } 27 | 28 | public void Send(TCommand command) where TCommand : ICommand 29 | { 30 | serviceBus.Send(command); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/RsbCommandConsumer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rhino.ServiceBus; 3 | using SimpleCqrs.Commanding; 4 | 5 | namespace SimpleCqrs.Rhino.ServiceBus 6 | { 7 | public class RsbCommandConsumer : ConsumerOf, ConsumerOf 8 | { 9 | private readonly ICommandBus commandBus; 10 | private readonly IServiceBus serviceBus; 11 | 12 | public RsbCommandConsumer(ICommandBus commandBus, IServiceBus serviceBus) 13 | { 14 | this.commandBus = commandBus; 15 | this.serviceBus = serviceBus; 16 | } 17 | 18 | public void Consume(ICommand command) 19 | { 20 | commandBus.Send(command); 21 | } 22 | 23 | public void Consume(IRequest request) 24 | { 25 | var validationResult = commandBus.Execute(request.Command); 26 | var reply = (IReply)Activator.CreateInstance(typeof(Reply<>).MakeGenericType(request.Command.GetType())); 27 | reply.ValidationResult = validationResult; 28 | serviceBus.Reply(reply); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Extensions/SimpleCqrs.Rhino.ServiceBus/RsbEventBus.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Rhino.ServiceBus; 4 | using SimpleCqrs.Eventing; 5 | 6 | namespace SimpleCqrs.Rhino.ServiceBus 7 | { 8 | public class RsbEventBus : IEventBus 9 | { 10 | private readonly IServiceBus serviceBus; 11 | 12 | public RsbEventBus(IServiceBus serviceBus) 13 | { 14 | this.serviceBus = serviceBus; 15 | } 16 | 17 | public void PublishEvent(DomainEvent domainEvent) 18 | { 19 | serviceBus.Notify(domainEvent); 20 | } 21 | 22 | public void PublishEvents(IEnumerable domainEvents) 23 | { 24 | serviceBus.Notify(domainEvents.ToArray()); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Local.testsettings: -------------------------------------------------------------------------------- 1 |  2 | 3 | These are default test settings for a local test run. 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Packages/structuremap.2.6.3/lib/StructureMap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/src/Packages/structuremap.2.6.3/lib/StructureMap.dll -------------------------------------------------------------------------------- /src/Packages/structuremap.2.6.3/structuremap.2.6.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/src/Packages/structuremap.2.6.3/structuremap.2.6.3.nupkg -------------------------------------------------------------------------------- /src/ServiceLocators/SimpleCqrs.StructureMap/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/CommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | public abstract class CommandHandler : IHandleCommands where TCommand : ICommand 6 | { 7 | private ICommandHandlingContext context; 8 | 9 | void IHandleCommands.Handle(ICommandHandlingContext handlingContext) 10 | { 11 | context = handlingContext; 12 | Handle(handlingContext.Command); 13 | } 14 | 15 | public abstract void Handle(TCommand command); 16 | 17 | protected void Return(int value) 18 | { 19 | context.Return(value); 20 | } 21 | 22 | protected void Return(Enum value) 23 | { 24 | context.Return(Convert.ToInt32(value)); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/CommandHandlerNotFoundException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | public class CommandHandlerNotFoundException : Exception 6 | { 7 | public CommandHandlerNotFoundException(Type commandType) 8 | : base(string.Format("No command handlers were found for '{0}'", commandType)) 9 | { 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/CommandWithAggregateRootId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | [Serializable] 6 | public class CommandWithAggregateRootId : ICommandWithAggregateRootId 7 | { 8 | public Guid AggregateRootId { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/CreateCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Domain; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | public abstract class CreateCommandHandler : CommandHandler where TCommand : ICommand 6 | { 7 | public override void Handle(TCommand command) 8 | { 9 | var aggregateRoot = CreateAggregateRoot(command); 10 | 11 | Handle(command, aggregateRoot); 12 | 13 | var domainRepository = ServiceLocator.Current.Resolve(); 14 | 15 | domainRepository.Save(aggregateRoot); 16 | } 17 | 18 | public abstract AggregateRoot CreateAggregateRoot(TCommand command); 19 | 20 | public virtual void Handle(TCommand command, AggregateRoot aggregateRoot) 21 | { 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/DuplicateCommandHandlersException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | public class DuplicateCommandHandlersException : Exception 6 | { 7 | public DuplicateCommandHandlersException(Type commandType) 8 | : base(string.Format("Duplicate handlers were found for type {0}", commandType)) 9 | { 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/ExecuteTimeoutException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace SimpleCqrs.Commanding 5 | { 6 | [Serializable] 7 | public class ExecuteTimeoutException : Exception 8 | { 9 | public ExecuteTimeoutException() 10 | : base("The allotted time for the ICommandBus.Execute method has expired.") 11 | { 12 | } 13 | 14 | public ExecuteTimeoutException(string message) : base(message) 15 | { 16 | } 17 | 18 | public ExecuteTimeoutException(string message, Exception inner) : base(message, inner) 19 | { 20 | } 21 | 22 | protected ExecuteTimeoutException(SerializationInfo info, StreamingContext context) : base(info, context) 23 | { 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/ICommand.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Commanding 2 | { 3 | public interface ICommand 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/ICommandBus.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Commanding 2 | { 3 | public interface ICommandBus 4 | { 5 | int Execute(TCommand command) where TCommand : ICommand; 6 | void Send(TCommand command) where TCommand : ICommand; 7 | } 8 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/ICommandErrorHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | public interface ICommandErrorHandler where TCommand : ICommand 6 | { 7 | void Handle(ICommandHandlingContext handlingContext, Exception exception); 8 | } 9 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/ICommandHandlingContext.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Commanding 2 | { 3 | public interface ICommandHandlingContext where TCommand : ICommand 4 | { 5 | TCommand Command { get; } 6 | void Return(int value); 7 | } 8 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/ICommandWithAggregateRootId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Commanding 4 | { 5 | public interface ICommandWithAggregateRootId : ICommand 6 | { 7 | Guid AggregateRootId { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Commanding/IHandleCommands.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Commanding 2 | { 3 | public interface IHandleCommands where TCommand : ICommand 4 | { 5 | void Handle(ICommandHandlingContext handlingContext); 6 | } 7 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/AggregateRootNotFoundException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Domain 4 | { 5 | public class AggregateRootNotFoundException : Exception 6 | { 7 | public Guid AggregateRootId { get; private set; } 8 | public Type Type { get; private set; } 9 | 10 | public AggregateRootNotFoundException(Guid aggregateRootId, Type type) 11 | { 12 | AggregateRootId = aggregateRootId; 13 | Type = type; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/EntityCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.ObjectModel; 3 | using System.Linq; 4 | 5 | namespace SimpleCqrs.Domain 6 | { 7 | public class EntityCollection : Collection where TEntity : Entity 8 | { 9 | private readonly AggregateRoot aggregateRoot; 10 | 11 | public EntityCollection(AggregateRoot aggregateRoot) 12 | { 13 | this.aggregateRoot = aggregateRoot; 14 | } 15 | 16 | public TEntity FindById(Guid id) 17 | { 18 | return this.SingleOrDefault(entity => entity.Id == id); 19 | } 20 | 21 | protected override void InsertItem(int index, TEntity entity) 22 | { 23 | aggregateRoot.RegisterEntity(entity); 24 | base.InsertItem(index, entity); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/EventModifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Eventing; 3 | 4 | namespace SimpleCqrs.Domain 5 | { 6 | public static class EventModifier 7 | { 8 | public static IEventModification Modification; 9 | 10 | public static void Modify(DomainEvent e) 11 | { 12 | if (Modification != null) 13 | Modification.Apply(e); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/IDomainRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Domain 4 | { 5 | public interface IDomainRepository 6 | { 7 | TAggregateRoot GetById(Guid aggregateRootId) where TAggregateRoot : AggregateRoot, new(); 8 | TAggregateRoot GetExistingById(Guid aggregateRootId) where TAggregateRoot : AggregateRoot, new(); 9 | void Save(AggregateRoot aggregateRoot); 10 | } 11 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/IEventModification.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Eventing; 2 | 3 | namespace SimpleCqrs.Domain 4 | { 5 | public interface IEventModification 6 | { 7 | void Apply(DomainEvent e); 8 | } 9 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/IGenerateEventSequences.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Domain 2 | { 3 | public interface IGenerateEventSequences 4 | { 5 | int GetNextSequence(); 6 | } 7 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/IRegisterEntities.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Domain 2 | { 3 | public interface IRegisterEntities 4 | { 5 | void RegisterEntity(Entity entity); 6 | } 7 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/ISnapshotOriginator.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Domain 2 | { 3 | public interface ISnapshotOriginator 4 | { 5 | Snapshot GetSnapshot(); 6 | void LoadSnapshot(Snapshot snapshot); 7 | bool ShouldTakeSnapshot(Snapshot previousSnapshot); 8 | } 9 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Domain/Snapshot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Domain 4 | { 5 | public class Snapshot 6 | { 7 | public Guid AggregateRootId { get; set; } 8 | public int LastEventSequence { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/DomainEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Eventing 4 | { 5 | [Serializable] 6 | public class DomainEvent 7 | { 8 | public Guid AggregateRootId { get; set; } 9 | public int Sequence { get; set; } 10 | public DateTime EventDate { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/DomainEventHandlerFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Eventing 4 | { 5 | public class DomainEventHandlerFactory : IDomainEventHandlerFactory 6 | { 7 | private readonly IServiceLocator serviceLocator; 8 | 9 | public DomainEventHandlerFactory(IServiceLocator serviceLocator) 10 | { 11 | this.serviceLocator = serviceLocator; 12 | } 13 | 14 | public object Create(Type domainEventHandlerType) 15 | { 16 | return serviceLocator.Resolve(domainEventHandlerType); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/EntityDomainEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Eventing 4 | { 5 | [Serializable] 6 | public class EntityDomainEvent : DomainEvent 7 | { 8 | public Guid EntityId { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/IDomainEventHandlerFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.Eventing 4 | { 5 | public interface IDomainEventHandlerFactory 6 | { 7 | object Create(Type domainEventHandlerType); 8 | } 9 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/IEventBus.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace SimpleCqrs.Eventing 4 | { 5 | public interface IEventBus 6 | { 7 | void PublishEvent(DomainEvent domainEvent); 8 | void PublishEvents(IEnumerable domainEvents); 9 | } 10 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/IEventStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace SimpleCqrs.Eventing 5 | { 6 | public interface IEventStore 7 | { 8 | IEnumerable GetEvents(Guid aggregateRootId, int startSequence); 9 | void Insert(IEnumerable domainEvents); 10 | IEnumerable GetEventsByEventTypes(IEnumerable domainEventTypes); 11 | IEnumerable GetEventsByEventTypes(IEnumerable domainEventTypes, Guid aggregateRootId); 12 | IEnumerable GetEventsByEventTypes(IEnumerable domainEventTypes, DateTime startDate, DateTime endDate); 13 | } 14 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/IHandleDomainEvents.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs.Eventing 2 | { 3 | public interface IHandleDomainEvents where TDomainEvent : DomainEvent 4 | { 5 | void Handle(TDomainEvent domainEvent); 6 | } 7 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/ISnapshotStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Domain; 3 | 4 | namespace SimpleCqrs.Eventing 5 | { 6 | public interface ISnapshotStore 7 | { 8 | Snapshot GetSnapshot(Guid aggregateRootId); 9 | void SaveSnapshot(TSnapshot snapshot) where TSnapshot : Snapshot; 10 | } 11 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/Eventing/NullSnapshotStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SimpleCqrs.Domain; 3 | 4 | namespace SimpleCqrs.Eventing 5 | { 6 | public class NullSnapshotStore : ISnapshotStore 7 | { 8 | public Snapshot GetSnapshot(Guid aggregateRootId) 9 | { 10 | return null; 11 | } 12 | 13 | public void SaveSnapshot(TSnapshot snapshot) where TSnapshot : Snapshot 14 | { 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/IHaveATestMode.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs 2 | { 3 | public interface IHaveATestMode 4 | { 5 | bool IsInTestMode { get; set; } 6 | } 7 | 8 | namespace Testing 9 | { 10 | public static class TestModeExtensionMethods 11 | { 12 | public static void TurnTestModeOn(this IHaveATestMode value) 13 | { 14 | value.IsInTestMode = true; 15 | } 16 | 17 | public static void TurnTestModeOff(this IHaveATestMode value) 18 | { 19 | value.IsInTestMode = false; 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/IRegisterComponents.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs 2 | { 3 | public interface IRegisterComponents 4 | { 5 | void Register(IServiceLocator serviceLocator); 6 | } 7 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/ISimpleCqrsRuntime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs 4 | { 5 | /// 6 | /// Defines a runtime environment for a SimpleCqrs applications. 7 | /// 8 | public interface ISimpleCqrsRuntime : IDisposable 9 | { 10 | /// 11 | /// Gets the service locator associated with the runtime. 12 | /// 13 | IServiceLocator ServiceLocator { get; } 14 | 15 | /// 16 | /// Starts the runtime environment. 17 | /// 18 | void Start(); 19 | 20 | /// 21 | /// Shutdowns the runtime environment and release all the resouces held by the runtime environment. 22 | /// 23 | void Shutdown(); 24 | } 25 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/ITypeCatalog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs 4 | { 5 | public interface ITypeCatalog 6 | { 7 | Type[] LoadedTypes { get; } 8 | Type[] GetDerivedTypes(Type type); 9 | Type[] GetDerivedTypes(); 10 | Type[] GetGenericInterfaceImplementations(Type type); 11 | Type[] GetInterfaceImplementations(Type type); 12 | Type[] GetInterfaceImplementations(); 13 | } 14 | } -------------------------------------------------------------------------------- /src/SimpleCqrs/ServiceLocator.cs: -------------------------------------------------------------------------------- 1 | namespace SimpleCqrs 2 | { 3 | public static class ServiceLocator 4 | { 5 | public static IServiceLocator Current { get; private set; } 6 | 7 | public static void SetCurrent(IServiceLocator serviceLocator) 8 | { 9 | Current = serviceLocator; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/SomethingElseHappenedEvent.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Eventing; 2 | 3 | namespace SimpleCqrs.EventStore.SqlServer.Tests 4 | { 5 | public class SomethingElseHappenedEvent : DomainEvent 6 | { 7 | public string SomeDataToStore { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/SomethingHappenedEvent.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.Eventing; 2 | 3 | namespace SimpleCqrs.EventStore.SqlServer.Tests 4 | { 5 | public class SomethingHappenedEvent : DomainEvent 6 | { 7 | public string ThisHappened { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/Steps/JsonSerializerSteps.cs: -------------------------------------------------------------------------------- 1 | using SimpleCqrs.EventStore.SqlServer.Serializers; 2 | using TechTalk.SpecFlow; 3 | 4 | namespace SimpleCqrs.EventStore.SqlServer.Tests.Steps 5 | { 6 | [Binding] 7 | public class JsonSerializerSteps 8 | { 9 | [Given(@"I am choosing to use the Json Serializer")] 10 | public void GivenIAmChoosingToUseTheJsonSerializer() 11 | { 12 | ScenarioContext.Current.Set(new JsonDomainEventSerializer()); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/Steps/RuntimeSteps.cs: -------------------------------------------------------------------------------- 1 | using TechTalk.SpecFlow; 2 | 3 | namespace SimpleCqrs.EventStore.SqlServer.Tests.Specs 4 | { 5 | [Binding] 6 | public class RuntimeSteps 7 | { 8 | public static TestingRuntime Runtime; 9 | 10 | [BeforeTestRun] 11 | public static void TestRun() 12 | { 13 | Runtime = new TestingRuntime(); 14 | Runtime.Start(); 15 | } 16 | 17 | [AfterTestRun] 18 | public static void Cleanup() 19 | { 20 | Runtime.Shutdown(); 21 | } 22 | 23 | [BeforeScenario] 24 | public void Setup() 25 | { 26 | ScenarioContext.Current.Set(Runtime.ServiceLocator); 27 | } 28 | 29 | [AfterScenario] 30 | public void Teardown() 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/Steps/SomethingHappenedEventSteps.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using TechTalk.SpecFlow; 6 | 7 | namespace SimpleCqrs.EventStore.SqlServer.Tests.Steps 8 | { 9 | [Binding] 10 | public class SomethingHappenedEventSteps 11 | { 12 | 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/Steps/SqlServerConfigurationSteps.cs: -------------------------------------------------------------------------------- 1 | using TechTalk.SpecFlow; 2 | 3 | namespace SimpleCqrs.EventStore.SqlServer.Tests.Steps 4 | { 5 | [Binding] 6 | public class SqlServerConfigurationSteps 7 | { 8 | [Given(@"the connection string to my database is")] 9 | public void x(string connectionString) 10 | { 11 | var sqlServerConfiguration = new SqlServerConfiguration(connectionString); 12 | ScenarioContext.Current.Set(sqlServerConfiguration); 13 | 14 | DatabaseSteps.ClearTheEventStore(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Tests/EventStores/SimpleCqrs.EventStore.SqlServer.Tests/with_automoqer.cs: -------------------------------------------------------------------------------- 1 | using AutoMoq; 2 | using Moq; 3 | 4 | namespace SimpleCqrs.EventStore.SqlServer.Tests 5 | { 6 | public class with_automoqer 7 | { 8 | public static AutoMoqer mocker; 9 | 10 | public with_automoqer() 11 | { 12 | mocker = new AutoMoqer(); 13 | } 14 | 15 | public static T Create() 16 | { 17 | return mocker.Resolve(); 18 | } 19 | 20 | public static Mock GetMock() where T : class 21 | { 22 | return mocker.GetMock(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Tests/SimpleCqrs.Tests/CustomAsserts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | 5 | namespace SimpleCqrs.Core.Tests 6 | { 7 | public static class CustomAsserts 8 | { 9 | [DebuggerStepThrough()] 10 | public static T Throws(Action action) where T : Exception 11 | { 12 | try 13 | { 14 | action.Invoke(); 15 | } 16 | catch (T ex) 17 | { 18 | return ex; 19 | } 20 | catch (Exception ex) 21 | { 22 | throw new AssertFailedException( 23 | string.Format("Expected exception was not thrown! Got other exception: '{0}'.", ex.GetType()) 24 | ,ex); 25 | } 26 | 27 | throw new AssertFailedException("Expected exception was not thrown! None was thrown."); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/TraceAndTestImpact.testsettings: -------------------------------------------------------------------------------- 1 |  2 | 3 | These are test settings for Trace and Test Impact. 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/Simple-CQRS Visual Studio Extensions.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleCqrs.VisualStudio.Extensions", "SimpleCqrs.VisualStudio.Extensions\SimpleCqrs.VisualStudio.Extensions.csproj", "{01404D42-9C36-4AFB-BBDD-B31CD3C8E5FC}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {01404D42-9C36-4AFB-BBDD-B31CD3C8E5FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {01404D42-9C36-4AFB-BBDD-B31CD3C8E5FC}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {01404D42-9C36-4AFB-BBDD-B31CD3C8E5FC}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {01404D42-9C36-4AFB-BBDD-B31CD3C8E5FC}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | 3 | [assembly: SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")] -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/Guids.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SimpleCqrs.VisualStudio.Extensions 4 | { 5 | static class Guids 6 | { 7 | public const string GuidSimpleCqrsPkgString = "d846aad1-bc98-4a9f-9303-b17509457dbc"; 8 | public const string GuidSimpleCqrsCmdSetString = "67f09cb0-3702-4855-b37b-4e494c699d30"; 9 | public static readonly Guid GuidSimpleCqrsCmdSet = new Guid(GuidSimpleCqrsCmdSetString); 10 | }; 11 | } -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/Key.snk -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Resources; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("SimpleCqrs.VisualStudio.Extensions")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Tyrone Groves")] 14 | [assembly: AssemblyProduct("SimpleCqrs.VisualStudio.Extensions")] 15 | [assembly: AssemblyCopyright("")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | [assembly: ComVisible(false)] 19 | [assembly: CLSCompliant(false)] 20 | [assembly: NeutralResourcesLanguage("en-US")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Revision and Build Numbers 30 | // by using the '*' as shown below: 31 | 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/Resources/Package.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyronegroves/SimpleCQRS/e66c54edacd05edf60d3d3333e837eb0c7d6f33e/tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/Resources/Package.ico -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/SimpleCqrsPackage.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Globalization; 3 | using System.Runtime.InteropServices; 4 | using Microsoft.VisualStudio.Shell; 5 | 6 | namespace SimpleCqrs.VisualStudio.Extensions 7 | { 8 | [PackageRegistration(UseManagedResourcesOnly = true)] 9 | [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] 10 | [Guid(Guids.GuidSimpleCqrsPkgString)] 11 | public sealed class SimpleCqrsPackage : Package 12 | { 13 | public SimpleCqrsPackage() 14 | { 15 | Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering constructor for: {0}", ToString())); 16 | } 17 | 18 | protected override void Initialize() 19 | { 20 | Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", ToString())); 21 | base.Initialize(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /tools/Simple-CQRS Visual Studio Extensions/SimpleCqrs.VisualStudio.Extensions/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Simple-CQRS Visual Studio Extensions 5 | Tyrone Groves 6 | 1.0 7 | The Simple-CQRS Visual Studio Extensions assists architects and developers creating applications that uses the CQRS and Event Sourcing design patterns. 8 | 1033 9 | false 10 | 11 | 12 | Pro 13 | 14 | 15 | 16 | 17 | 18 | 19 | Visual Studio MPF 20 | 21 | 22 | 23 | |%CurrentProject%;PkgdefProjectOutputGroup| 24 | 25 | 26 | --------------------------------------------------------------------------------