├── v0 └── Mantle │ ├── UpgradeLog.htm │ ├── .nuget │ ├── NuGet.exe │ └── NuGet.Config │ ├── Mantle.Hosting.Azure │ ├── app.config │ └── AzureRoleWorkerHost.cs │ ├── Mantle.Logging │ ├── ILog.cs │ ├── packages.config │ ├── ILogAdapter.cs │ ├── BaseLogAdapter.cs │ ├── LogModule.cs │ └── Severity.cs │ ├── Mantle │ ├── IDependencyResolver.cs │ ├── ProfileAttribute.cs │ └── TypeExtensions.cs │ ├── NugetPackages │ ├── mantle-aws.1.0.0-beta.nupkg │ ├── mantle-base.1.0.0-beta.nupkg │ ├── mantle-base.1.0.1-beta.nupkg │ ├── mantle-base.1.0.2-beta.nupkg │ ├── mantle-base.1.0.3-beta.nupkg │ ├── mantle-wsb.1.0.0-beta.nupkg │ ├── mantle-azure.1.0.0-beta.nupkg │ ├── mantle-hosting.1.0.0-beta.nupkg │ ├── mantle-logging.1.0.0-beta.nupkg │ ├── mantle-logging.1.0.1-beta.nupkg │ ├── mantle-logging.1.0.2-beta.nupkg │ ├── mantle-logging.1.0.3-beta.nupkg │ ├── mantle-messaging.1.0.0-beta.nupkg │ ├── mantle-messaging.1.0.1-beta.nupkg │ ├── mantle-messaging.1.0.2-beta.nupkg │ ├── mantle-messaging.1.0.3-beta.nupkg │ ├── mantle-messaging.1.0.4-beta.nupkg │ ├── mantle-ninject.1.0.0-beta.nupkg │ ├── mantle-ninject.1.0.1-beta.nupkg │ ├── mantle-ninject.1.0.2-beta.nupkg │ ├── mantle-ninject.1.0.3-beta.nupkg │ ├── mantle-ninject.1.0.4-beta.nupkg │ ├── mantle-ninject.1.0.5-beta.nupkg │ ├── mantle-storage.1.0.0-beta.nupkg │ ├── mantle-storage.1.0.1-beta.nupkg │ ├── mantle-configuration.1.0.0-beta.nupkg │ ├── mantle-messaging-msmq.1.0.0-beta.nupkg │ ├── mantle-messaging-msmq.1.0.1-beta.nupkg │ ├── mantle-messaging-wsb.1.0.0-beta.nupkg │ ├── mantle-messaging-wsb.1.0.1-beta.nupkg │ ├── mantle-storage-aws-s3.1.0.0-beta.nupkg │ ├── mantle-storage-aws-s3.1.0.1-beta.nupkg │ ├── mantle-storage-azure.1.0.0-beta.nupkg │ ├── mantle-storage-azure.1.0.1-beta.nupkg │ ├── mantle-storage-azure.1.0.2-beta.nupkg │ ├── mantle-storage-azure.1.0.3-beta.nupkg │ ├── mantle-storage-azure.1.0.4-beta.nupkg │ ├── mantle-messaging-azure.1.0.0-beta.nupkg │ ├── mantle-messaging-azure.1.0.1-beta.nupkg │ ├── mantle-messaging-azure.1.0.10-beta.nupkg │ ├── mantle-messaging-azure.1.0.11-beta.nupkg │ ├── mantle-messaging-azure.1.0.12-beta.nupkg │ ├── mantle-messaging-azure.1.0.13-beta.nupkg │ ├── mantle-messaging-azure.1.0.3-beta.nupkg │ ├── mantle-messaging-azure.1.0.4-beta.nupkg │ ├── mantle-messaging-azure.1.0.5-beta.nupkg │ ├── mantle-messaging-azure.1.0.6-beta.nupkg │ ├── mantle-messaging-azure.1.0.7-beta.nupkg │ ├── mantle-messaging-azure.1.0.8-beta.nupkg │ ├── mantle-messaging-azure.1.0.9-beta.nupkg │ ├── mantle-storage-windows.1.0.0-beta.nupkg │ ├── mantle-storage-windows.1.0.1-beta.nupkg │ ├── mantle-worker-template.1.0.0-beta.nupkg │ ├── mantle-worker-template.1.0.1-beta.nupkg │ ├── mantle-dictionary-storage.1.0.0-beta.nupkg │ ├── mantle-messaging-aws-sqs.1.0.0-beta.nupkg │ ├── mantle-messaging-aws-sqs.1.0.1-beta.nupkg │ ├── mantle-worker-console-host.1.0.0-beta.nupkg │ ├── mantle-worker-console-host.1.0.1-beta.nupkg │ ├── mantle-configuration-sql-server.1.0.0-beta.nupkg │ ├── mantle-dictionary-storage-azure.1.0.0-beta.nupkg │ ├── mantle-loggingadapter-messaging.1.0.0-beta.nupkg │ ├── mantle-loggingadapter-messaging.1.0.1-beta.nupkg │ ├── mantle-loggingadapter-messaging.1.0.2-beta.nupkg │ ├── mantle-loggingadapter-messaging.1.0.3-beta.nupkg │ ├── mantle-dictionary-storage-inmemory.1.0.0-beta.nupkg │ ├── mantle-worker-windows-service-host.1.0.0-beta.nupkg │ ├── mantle-worker-windows-service-host.1.0.1-beta.nupkg │ ├── mantle-worker-windows-service-host.1.0.2-beta.nupkg │ ├── mantle-worker-azure-cloud-service-role-host.1.0.0-beta.nupkg │ └── mantle-worker-azure-cloud-service-role-host.1.0.1-beta.nupkg │ ├── Mantle.Messaging │ ├── ICanBeKilled.cs │ ├── ICanBeAbandoned.cs │ ├── ICanBeCompleted.cs │ ├── IPublisherEndpointManager.cs │ ├── IHaveADeliveryCount.cs │ ├── IPublisherClient.cs │ ├── IEndpointManager.cs │ ├── ISubscriberEndpointManager.cs │ ├── IPublisherEndpointDirectory.cs │ ├── ISubscriberEndpointDirectory.cs │ ├── ISubscriberClient.cs │ ├── ICanRenewLock.cs │ ├── Message.cs │ ├── IPublisherEndpoint.cs │ ├── ISubscriberEndpoint.cs │ ├── Endpoint.cs │ ├── MessageScope.cs │ ├── ISubscriberClientExtensions.cs │ ├── CompositePublisherClient.cs │ ├── PublisherEndpointDirectory.cs │ └── MessagingException.cs │ ├── Mantle.Aws │ ├── packages.config │ └── IAwsConfiguration.cs │ ├── Mantle.Hosting │ ├── IWorkerHost.cs │ ├── IWorker.cs │ ├── Profiles │ │ └── ProfileAttribute.cs │ └── HostingException.cs │ ├── Mantle.Ninject │ └── packages.config │ ├── Mantle.Storage.Aws │ └── packages.config │ ├── Mantle.Messaging.Aws │ ├── packages.config │ ├── SqsPublisherEndpointManager.cs │ ├── SqsSubscriberEndpointManager.cs │ ├── SqsMessage.cs │ ├── SqsPublisherEndpoint.cs │ ├── SqsSubscriberEndpoint.cs │ └── SqsClient.cs │ ├── Mantle.Configuration.Ninject │ └── packages.config │ ├── Mantle.Hosting.WindowsServices │ └── packages.config │ ├── Mantle.Storage.Dictionary.Aws │ ├── packages.config │ └── Class1.cs │ ├── Mantle.Configuration │ ├── IConfigurable.cs │ ├── IConfigurationMetadataSource.cs │ ├── IConfigurationMetadata.cs │ └── ConfigurationMetadata.cs │ ├── Mantle.Logging.MessagingAdapter │ ├── packages.config │ └── MessagingLogAdapterModule.cs │ ├── Mantle.Messaging.WindowsServiceBus │ ├── packages.config │ ├── app.config │ ├── WindowsServiceBusQueuePublisherEndpointManager.cs │ ├── WindowsServiceBusQueueSubscriberEndpointManager.cs │ ├── WindowsServiceBusQueuePublisherClient.cs │ ├── WindowsServiceBusClient.cs │ ├── WindowsServiceBusEndpointManager.cs │ ├── WindowsServiceBusQueuePublisherEndpoint.cs │ ├── WindowsServiceBusQueueEndpointManager.cs │ └── WindowsServiceBusQueueSubscriberEndpoint.cs │ ├── Mantle.Configuration.Source.SqlServer │ ├── packages.config │ └── Models │ │ ├── Group.cs │ │ ├── Property.cs │ │ ├── PropertyValue.cs │ │ ├── Module.cs │ │ └── Mapping │ │ ├── PropertyMap.cs │ │ └── PropertyValueMap.cs │ ├── Mantle.Messaging.Msmq │ ├── Mantle.Logging.MessagingAdapter │ │ ├── packages.config │ │ └── MessagingLogAdapterModule.cs │ ├── MsmqPublisherEndpointManager.cs │ ├── MsmqPublisherEndpoint.cs │ ├── MsmqSubscriberEndpoint.cs │ ├── MsmqSubscriberEndpointManager.cs │ ├── MsmqEndpointManager.cs │ ├── MsmqPublisherClient.cs │ └── MsmqClient.cs │ ├── Mantle.Storage │ ├── IStorageClientDirectory.cs │ ├── BaseStorageClient.cs │ ├── IStorageClient.cs │ ├── StorageException.cs │ └── StorageClientDirectory.cs │ ├── Mantle.Azure │ ├── IAzureStorageConfiguration.cs │ └── IAzureServiceBusConfiguration.cs │ ├── Mantle.Storage.Dictionary │ ├── DictionaryEntity.cs │ └── IDictionaryStorageClient.cs │ ├── Mantle.Storage.Dictionary.Azure │ ├── AzureDictionaryEntity.cs │ └── packages.config │ ├── Mantle.WindowsServiceBus │ └── IWindowsServiceBusConfiguration.cs │ ├── Mantle.Storage.Azure │ └── packages.config │ ├── Mantle.Messaging.Azure │ ├── AzureStorageQueuePublisherEndpointManager.cs │ ├── packages.config │ ├── AzureServiceBusQueuePublisherEndpointManager.cs │ ├── AzureStorageQueuePublisherEndpoint.cs │ ├── AzureStorageQueueSubscriberEndpointManager.cs │ ├── AzureStorageQueueSubscriberEndpoint.cs │ ├── AzureServiceBusQueueSubscriberEndpointManager.cs │ ├── AzureServiceBusQueuePublisherClient.cs │ ├── AzureStorageQueuePublisherClient.cs │ ├── AzureServiceBusClient.cs │ ├── AzureServiceBusQueuePublisherEndpoint.cs │ ├── AzureServiceBusEndpointManager.cs │ ├── AzureServiceBusQueueSubscriberEndpoint.cs │ └── AzureServiceBusQueueEndpointManager.cs │ └── Mantle.Console.Hosting │ └── ConsoleWorkerHost.cs ├── v1 ├── Mantle │ ├── .nuget │ │ ├── NuGet.exe │ │ └── NuGet.Config │ ├── Mantle.PhotoGallery.Web │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ ├── Home │ │ │ │ ├── About.cshtml │ │ │ │ └── Contact.cshtml │ │ │ ├── Account │ │ │ │ ├── ExternalLoginFailure.cshtml │ │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ │ ├── ConfirmEmail.cshtml │ │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ │ ├── SendCode.cshtml │ │ │ │ └── ForgotPassword.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── Lockout.cshtml │ │ │ │ └── _LoginPartial.cshtml │ │ │ └── Manage │ │ │ │ ├── AddPhoneNumber.cshtml │ │ │ │ └── VerifyPhoneNumber.cshtml │ │ ├── favicon.ico │ │ ├── Global.asax │ │ ├── Scripts │ │ │ └── _references.js │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── Enumerations │ │ │ └── Platform.cs │ │ ├── Interfaces │ │ │ └── IDeploymentMetadata.cs │ │ ├── Service References │ │ │ └── Application Insights │ │ │ │ └── ConnectedService.json │ │ ├── Mantle │ │ │ ├── Constants │ │ │ │ ├── BlobStorageClientNames.cs │ │ │ │ ├── DictionaryStorageClientNames.cs │ │ │ │ └── ChannelNames.cs │ │ │ └── Profiles │ │ │ │ ├── Default │ │ │ │ ├── AwsModule.cs │ │ │ │ ├── RepositoryModule.cs │ │ │ │ ├── DeploymentModule.cs │ │ │ │ └── IdentityModule.cs │ │ │ │ └── Aws │ │ │ │ └── DictionaryStorageModule.cs │ │ ├── App_Start │ │ │ ├── FilterConfig.cs │ │ │ └── RouteConfig.cs │ │ ├── Startup.cs │ │ ├── Metadata │ │ │ └── DeploymentMetadata.cs │ │ ├── Models │ │ │ ├── PhotoUploadViewModel.cs │ │ │ └── PhotoViewModel.cs │ │ ├── Global.asax.cs │ │ └── Content │ │ │ └── Site.css │ ├── Mantle │ │ ├── Interfaces │ │ │ ├── ICommand.cs │ │ │ ├── IEvent.cs │ │ │ ├── IAutoSetup.cs │ │ │ ├── IDirectory.cs │ │ │ ├── IInitializer.cs │ │ │ ├── ITypeTokenProvider.cs │ │ │ ├── IProfileNamesProvider.cs │ │ │ ├── IOrderable.cs │ │ │ ├── ISerializer.cs │ │ │ ├── ITypeMetadata.cs │ │ │ └── IDependencyResolver.cs │ │ ├── packages.config │ │ ├── Extensions │ │ │ ├── TypeExtensions.cs │ │ │ ├── StreamExtensions.cs │ │ │ └── ObjectExtensions.cs │ │ ├── Providers │ │ │ ├── NameTypeTokenProvider.cs │ │ │ ├── FullNameTypeTokenProvider.cs │ │ │ ├── AssemblyQualifiedNameTypeTokenProvider.cs │ │ │ └── DataContractTypeTokenProvider.cs │ │ ├── Flattened.cs │ │ ├── Serializers │ │ │ ├── XmlSerializer.cs │ │ │ └── JsonSerializer.cs │ │ ├── DefaultDirectory.cs │ │ ├── PropertyMetadata.cs │ │ ├── MantleContext.cs │ │ └── TypeMetadata.cs │ ├── Mantle.Hosting.Messaging │ │ └── packages.config │ ├── Mantle.Hosting │ │ ├── Interfaces │ │ │ ├── IWorkerHost.cs │ │ │ └── IWorker.cs │ │ ├── Hosts │ │ │ └── BaseWorkerHost.cs │ │ └── Workers │ │ │ └── BaseWorker.cs │ ├── Mantle.Identity │ │ ├── packages.config │ │ ├── Interfaces │ │ │ ├── IMantleUserRepository.cs │ │ │ ├── IMantleUserService.cs │ │ │ ├── IMantleUserCommandService.cs │ │ │ └── IMantleUserQueryService.cs │ │ ├── Commands │ │ │ ├── CreateUser.cs │ │ │ ├── UpdateUser.cs │ │ │ └── DeleteUser.cs │ │ ├── MantleUserClaim.cs │ │ └── MantleUserLogin.cs │ ├── Mantle.Messaging │ │ ├── Interfaces │ │ │ ├── IPublisherChannel.cs │ │ │ ├── IMessageDistributor.cs │ │ │ ├── IMessageHandler.cs │ │ │ ├── ISubscriptionConstraint.cs │ │ │ ├── IDeadLetterStrategy.cs │ │ │ ├── IPublisher.cs │ │ │ ├── IMessageSerializer.cs │ │ │ ├── ISubscriptionFilter.cs │ │ │ ├── ISubscriberChannel.cs │ │ │ ├── ISubscriber.cs │ │ │ ├── ISubscription.cs │ │ │ ├── ISagaRepository.cs │ │ │ ├── IMessageContext.cs │ │ │ ├── ISubscriptionConfiguration.cs │ │ │ └── ISubscriptionConfigurer.cs │ │ ├── Channels │ │ │ └── NullPublisherChannel.cs │ │ ├── Subscription.cs │ │ ├── Strategies │ │ │ ├── NullDeadLetterStrategy.cs │ │ │ └── DefaultDeadLetterStrategy.cs │ │ ├── Messages │ │ │ └── MessageEnvelope.cs │ │ └── Constraints │ │ │ └── FunctionalSubscriptionConstraint.cs │ ├── Mantle.PhotoGallery.PhotoProcessing │ │ ├── packages.config │ │ ├── Constants │ │ │ ├── PhotoSources.cs │ │ │ └── PhotoStorageClientNames.cs │ │ ├── Interfaces │ │ │ ├── IPhotoThumbnailService.cs │ │ │ ├── IPhotoCopyService.cs │ │ │ └── IPhotoMetadataRepository.cs │ │ ├── Models │ │ │ └── PhotoMetadata.cs │ │ └── Commands │ │ │ ├── SavePhoto.cs │ │ │ └── CopyPhoto.cs │ ├── Mantle.DictionaryStorage.InMemory.Tests │ │ ├── InMemoryDictionaryStorageClientTests.cs │ │ └── packages.config │ ├── Mantle.Cache.Azure │ │ ├── Microsoft.WindowsAzure.Caching │ │ │ ├── ClientPerfCountersInstaller.exe │ │ │ └── ClientPerfCountersInstaller.exe.config │ │ └── packages.config │ ├── Mantle.Messaging.Aws │ │ ├── Constants │ │ │ ├── AwsSqsErrorCodes.cs │ │ │ └── AwsSqsMessageAttributes.cs │ │ └── packages.config │ ├── Mantle.Aws │ │ ├── Interfaces │ │ │ └── IAwsRegionEndpoints.cs │ │ ├── packages.config │ │ └── AwsRegionEndpoints.cs │ ├── Mantle.Ninject │ │ ├── packages.config │ │ ├── AssemblyExtensions.cs │ │ └── IBindingToSyntaxExtensions.cs │ ├── Mantle.DictionaryStorage.Redis │ │ └── packages.config │ ├── Mantle.Auditing │ │ ├── Interfaces │ │ │ └── IAuditLog.cs │ │ └── Subscribers │ │ │ └── AuditSubscriber.cs │ ├── Mantle.Configuration │ │ ├── Interfaces │ │ │ ├── IConfigurationProvider.cs │ │ │ ├── IConfigurer.cs │ │ │ └── IPropertyConfigurer.cs │ │ ├── ConfigurableProperty.cs │ │ ├── Attributes │ │ │ └── ConfigurableAttribute.cs │ │ ├── ConfigurableObject.cs │ │ ├── ConfigurationSetting.cs │ │ ├── Configurers │ │ │ ├── AppSettingsConfigurer.cs │ │ │ ├── ConnectionStringsConfigurer.cs │ │ │ ├── DefaultConfigurer.cs │ │ │ └── AdHocConfigurer.cs │ │ └── Providers │ │ │ ├── AppSettingsConfigurationProvider.cs │ │ │ ├── EnvironmentVariablesConfigurationProvider.cs │ │ │ ├── ConnectionStringsConfigurationProvider.cs │ │ │ └── AdHocConfigurationProvider.cs │ ├── Mantle.FaultTolerance │ │ ├── Interfaces │ │ │ ├── ITransientFaultStrategy.cs │ │ │ └── IBreakerPanel.cs │ │ ├── packages.config │ │ ├── Strategies │ │ │ └── NoTransientFaultStrategy.cs │ │ ├── TrialResult.cs │ │ └── TrialException.cs │ ├── Mantle.Tests │ │ ├── packages.config │ │ ├── NameTypeTokenProviderTests.cs │ │ ├── FullNameTypeTokenProviderTests.cs │ │ └── AssemblyQualifiedNameTypeTokenProviderTests.cs │ ├── Mantle.BlobStorage.Tests │ │ └── packages.config │ ├── Mantle.Aws.Tests │ │ ├── packages.config │ │ ├── Constants │ │ │ └── AwsTestConfiguration.cs │ │ └── app.config │ ├── Mantle.Cache │ │ └── Interfaces │ │ │ └── ICacheClient.cs │ ├── Mantle.Configuration.Tests │ │ ├── packages.config │ │ ├── Objects │ │ │ └── RequiredTestObject.cs │ │ └── Configurers │ │ │ └── TestConfigurer.cs │ ├── Mantle.PhotoGallery.Processor.Worker │ │ ├── Constants │ │ │ └── ChannelNames.cs │ │ └── Workers │ │ │ └── ProcessorWorker.cs │ ├── Mantle.Identity.Azure │ │ ├── packages.config │ │ ├── Entities │ │ │ ├── DocumentDbMantleUserClaim.cs │ │ │ └── DocumentDbMantleUserLogin.cs │ │ └── app.config │ ├── Mantle.BlobStorage │ │ └── Interfaces │ │ │ └── IBlobStorageClient.cs │ ├── Mantle.PhotoGallery.Processor.Console │ │ ├── Mantle │ │ │ └── Profiles │ │ │ │ ├── Default │ │ │ │ ├── AwsModule.cs │ │ │ │ ├── WorkerModule.cs │ │ │ │ ├── RepositoryModule.cs │ │ │ │ ├── MessagingModule.cs │ │ │ │ └── ServiceModule.cs │ │ │ │ ├── Aws │ │ │ │ ├── IdentityModule.cs │ │ │ │ └── DictionaryStorageModule.cs │ │ │ │ └── Azure │ │ │ │ └── IdentityModule.cs │ │ └── Program.cs │ ├── Mantle.PhotoGallery.Web.Tests │ │ └── packages.config │ ├── Mantle.Identity.Aws │ │ └── packages.config │ ├── Mantle.BlobStorage.Aws │ │ └── packages.config │ ├── Mantle.DictionaryStorage │ │ ├── Interfaces │ │ │ ├── IReadOnlyDictionaryStorageClient.cs │ │ │ └── IDictionaryStorageClient.cs │ │ └── Entities │ │ │ └── DictionaryStorageEntity.cs │ ├── Mantle.DictionaryStorage.Aws │ │ └── packages.config │ ├── Mantle.BlobStorage.Azure │ │ └── packages.config │ ├── Mantle.DictionaryStorage.Azure │ │ └── packages.config │ ├── Mantle.Hosting.Azure │ │ └── AzureCloudServiceRoleWorkerHost.cs │ ├── Mantle.Messaging.Azure │ │ └── packages.config │ └── Mantle.Hosting.Console │ │ └── ConsoleWorkerHost.cs └── Nuget │ ├── Mantle.0.1.nupkg │ ├── Mantle.0.2.nupkg │ ├── MantleMvc.0.1.nupkg │ ├── MantleAzure.0.1.nupkg │ ├── MantleWebApi.0.1.nupkg │ ├── MantleWorker.0.1.nupkg │ ├── MantleConsoleHost.0.1.nupkg │ ├── MantleSubscriptionWorker.0.1.nupkg │ ├── MantleSubscriptionWorker.0.2.nupkg │ ├── MantleSubscriptionWorker.0.3.nupkg │ └── MantleAzureCloudServiceRoleHost.0.1.nupkg └── README.md /v0/Mantle/UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/UpgradeLog.htm -------------------------------------------------------------------------------- /v0/Mantle/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/.nuget/NuGet.exe -------------------------------------------------------------------------------- /v1/Mantle/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/.nuget/NuGet.exe -------------------------------------------------------------------------------- /v1/Nuget/Mantle.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/Mantle.0.1.nupkg -------------------------------------------------------------------------------- /v1/Nuget/Mantle.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/Mantle.0.2.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleMvc.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleMvc.0.1.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /v1/Nuget/MantleAzure.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleAzure.0.1.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleWebApi.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleWebApi.0.1.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleWorker.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleWorker.0.1.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleConsoleHost.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleConsoleHost.0.1.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleSubscriptionWorker.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleSubscriptionWorker.0.1.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleSubscriptionWorker.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleSubscriptionWorker.0.2.nupkg -------------------------------------------------------------------------------- /v1/Nuget/MantleSubscriptionWorker.0.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleSubscriptionWorker.0.3.nupkg -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting.Azure/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/Mantle.PhotoGallery.Web/favicon.ico -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging/ILog.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Logging 2 | { 3 | public interface ILog 4 | { 5 | void Record(Event evt); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle/IDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle 2 | { 3 | public interface IDependencyResolver 4 | { 5 | T Get(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-aws.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-aws.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-base.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-base.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-base.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-base.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-base.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-base.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-base.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-base.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-wsb.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-wsb.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Mantle.PhotoGallery.Web.MvcApplication" Language="C#" %> -------------------------------------------------------------------------------- /v1/Nuget/MantleAzureCloudServiceRoleHost.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Nuget/MantleAzureCloudServiceRoleHost.0.1.nupkg -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ICanBeKilled.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface ICanBeKilled 4 | { 5 | void Kill(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-azure.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-azure.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-hosting.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-hosting.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-logging.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-logging.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-logging.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-logging.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-logging.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-logging.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-logging.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-logging.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging.1.0.4-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging.1.0.4-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-ninject.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-ninject.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-ninject.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-ninject.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-ninject.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-ninject.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-ninject.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-ninject.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-ninject.1.0.4-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-ninject.1.0.4-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-ninject.1.0.5-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-ninject.1.0.5-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/Mantle.PhotoGallery.Web/Scripts/_references.js -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/ICommand.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface ICommand 4 | { 5 | string Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface IEvent 4 | { 5 | string Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ICanBeAbandoned.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface ICanBeAbandoned 4 | { 5 | void Abandon(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ICanBeCompleted.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface ICanBeCompleted 4 | { 5 | void Complete(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-configuration.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-configuration.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-msmq.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-msmq.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-msmq.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-msmq.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-wsb.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-wsb.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-wsb.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-wsb.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-aws-s3.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-aws-s3.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-aws-s3.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-aws-s3.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-azure.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-azure.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-azure.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-azure.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-azure.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-azure.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-azure.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-azure.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-azure.1.0.4-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-azure.1.0.4-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IAutoSetup.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface IAutoSetup 4 | { 5 | bool AutoSetup { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting/IWorkerHost.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Hosting 2 | { 3 | public interface IWorkerHost 4 | { 5 | void Start(); 6 | void Stop(); 7 | } 8 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/IPublisherEndpointManager.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface IPublisherEndpointManager : IEndpointManager 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Ninject/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.10-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.10-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.11-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.11-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.12-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.12-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.13-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.13-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.4-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.4-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.5-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.5-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.6-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.6-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.7-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.7-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.8-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.8-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.9-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-azure.1.0.9-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-windows.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-windows.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-storage-windows.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-storage-windows.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-template.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-template.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-template.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-template.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IDirectory.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface IDirectory 4 | { 5 | T this[string name] { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/IHaveADeliveryCount.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface IHaveADeliveryCount 4 | { 5 | int GetDeliveryCount(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/IPublisherClient.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface IPublisherClient 4 | { 5 | void Publish(T message); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-dictionary-storage.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-dictionary-storage.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-aws-sqs.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-aws-sqs.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-messaging-aws-sqs.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-messaging-aws-sqs.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-console-host.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-console-host.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-console-host.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-console-host.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IInitializer.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface IInitializer 4 | { 5 | void Initialize(T toInitialize); 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/ITypeTokenProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface ITypeTokenProvider 4 | { 5 | string GetTypeToken(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Ninject/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting.WindowsServices/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-configuration-sql-server.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-configuration-sql-server.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-dictionary-storage-azure.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-dictionary-storage-azure.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.3-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-loggingadapter-messaging.1.0.3-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/Mantle.PhotoGallery.Web/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/Mantle.PhotoGallery.Web/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IProfileNamesProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface IProfileNamesProvider 4 | { 5 | string[] GetProfiles(); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/IEndpointManager.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface IEndpointManager 4 | { 5 | bool DoesExist(); 6 | void Create(); 7 | } 8 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Dictionary.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/Mantle.PhotoGallery.Web/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-dictionary-storage-inmemory.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-dictionary-storage-inmemory.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-windows-service-host.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-windows-service-host.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-windows-service-host.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-windows-service-host.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-windows-service-host.1.0.2-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-windows-service-host.1.0.2-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting.Messaging/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting/Interfaces/IWorkerHost.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Hosting.Interfaces 2 | { 3 | public interface IWorkerHost 4 | { 5 | void Start(); 6 | void Stop(); 7 | } 8 | } -------------------------------------------------------------------------------- /v0/Mantle/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration/IConfigurable.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Configuration 2 | { 3 | public interface IConfigurable 4 | { 5 | void Configure(IConfigurationMetadata metadata); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging.MessagingAdapter/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging/ILogAdapter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Logging 4 | { 5 | public interface ILogAdapter : ILog 6 | { 7 | Func Condition { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IPublisherChannel.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface IPublisherChannel 4 | { 5 | void Publish(T message); 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IOrderable.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface IOrderable 4 | { 5 | int Order { get; set; } 6 | T Service { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ISubscriberEndpointManager.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface ISubscriberEndpointManager : IEndpointManager 4 | { 5 | void Create(); 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/Mantle.Logging.MessagingAdapter/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-azure-cloud-service-role-host.1.0.0-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-azure-cloud-service-role-host.1.0.0-beta.nupkg -------------------------------------------------------------------------------- /v0/Mantle/NugetPackages/mantle-worker-azure-cloud-service-role-host.1.0.1-beta.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v0/Mantle/NugetPackages/mantle-worker-azure-cloud-service-role-host.1.0.1-beta.nupkg -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IMessageDistributor.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface IMessageDistributor 4 | { 5 | void Distribute(Message message); 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

-------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/ISerializer.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Interfaces 2 | { 3 | public interface ISerializer 4 | { 5 | T Deserialize(string source); 6 | string Serialize(T source); 7 | } 8 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging/BaseLogAdapter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Logging 4 | { 5 | public abstract class BaseLogAdapter 6 | { 7 | public Func Condition { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage.InMemory.Tests/InMemoryDictionaryStorageClientTests.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.DictionaryStorage.InMemory.Tests 2 | { 3 | public class InMemoryDictionaryStorageClientTests 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Enumerations/Platform.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.Web.Enumerations 2 | { 3 | public enum Platform 4 | { 5 | Undefined = 0, 6 | Aws, 7 | Azure 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IMessageHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface IMessageHandler 4 | { 5 | bool Handle(IMessageContext messageContext); 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage/IStorageClientDirectory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Storage 4 | { 5 | public interface IStorageClientDirectory : IDictionary 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Cache.Azure/Microsoft.WindowsAzure.Caching/ClientPerfCountersInstaller.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caseywatson/Mantle/HEAD/v1/Mantle/Mantle.Cache.Azure/Microsoft.WindowsAzure.Caching/ClientPerfCountersInstaller.exe -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Azure/IAzureStorageConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Azure 2 | { 3 | public interface IAzureStorageConfiguration 4 | { 5 | string ConnectionString { get; set; } 6 | 7 | void Validate(); 8 | } 9 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Azure/IAzureServiceBusConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Azure 2 | { 3 | public interface IAzureServiceBusConfiguration 4 | { 5 | string ConnectionString { get; set; } 6 | 7 | void Validate(); 8 | } 9 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/IPublisherEndpointDirectory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Messaging 4 | { 5 | public interface IPublisherEndpointDirectory : IDictionary 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging.Aws/Constants/AwsSqsErrorCodes.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Aws.Constants 2 | { 3 | public static class AwsSqsErrorCodes 4 | { 5 | public const string QueueDoesNotExist = "QueueDoesNotExist"; 6 | } 7 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ISubscriberEndpointDirectory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Messaging 4 | { 5 | public interface ISubscriberEndpointDirectory : IDictionary 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Aws/Interfaces/IAwsRegionEndpoints.cs: -------------------------------------------------------------------------------- 1 | using Amazon; 2 | 3 | namespace Mantle.Aws.Interfaces 4 | { 5 | public interface IAwsRegionEndpoints 6 | { 7 | RegionEndpoint GetRegionEndpointByName(string regionName); 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Interfaces/IMantleUserRepository.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Identity.Interfaces 2 | { 3 | public interface IMantleUserRepository : 4 | IMantleUserService 5 | where TUser : MantleUser 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Ninject/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
-------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

-------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ISubscriberClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging 4 | { 5 | public interface ISubscriberClient 6 | { 7 | Message Receive(); 8 | Message Receive(TimeSpan timeout); 9 | } 10 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Dictionary.Aws/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Mantle.Storage.Dictionary.Aws 7 | { 8 | public class Class1 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Dictionary/DictionaryEntity.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Storage.Dictionary 2 | { 3 | public abstract class DictionaryEntity 4 | { 5 | public string EntityId { get; set; } 6 | public string DictionaryId { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscriptionConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface ISubscriptionConstraint 4 | where T : class 5 | { 6 | bool Match(IMessageContext messageContext); 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging.Aws/Constants/AwsSqsMessageAttributes.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Aws.Constants 2 | { 3 | public static class AwsSqsMessageAttributes 4 | { 5 | public const string ApproximateReceiveCount = "ApproximateReceiveCount"; 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IDeadLetterStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface IDeadLetterStrategy 4 | where T : class 5 | { 6 | void HandleDeadLetterMessage(IMessageContext messageContext); 7 | } 8 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Aws/IAwsConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Amazon; 2 | 3 | namespace Mantle.Aws 4 | { 5 | public interface IAwsConfiguration 6 | { 7 | string AccessKey { get; set; } 8 | string SecretKey { get; set; } 9 | 10 | void Validate(); 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage.Redis/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Constants/PhotoSources.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.PhotoProcessing.Constants 2 | { 3 | public static class PhotoSources 4 | { 5 | public const string Aws = "Aws"; 6 | public const string Azure = "Azure"; 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Extensions/TypeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Mantle.Extensions 8 | { 9 | class TypeExtensions 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ICanRenewLock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Mantle.Messaging 7 | { 8 | public interface ICanRenewLock 9 | { 10 | void RenewLock(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Dictionary.Azure/AzureDictionaryEntity.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.WindowsAzure.Storage.Table; 2 | 3 | namespace Mantle.Storage.Dictionary.Azure 4 | { 5 | public class AzureDictionaryEntity : TableEntity 6 | { 7 | public byte[] Data { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Cache.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/Message.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public abstract class Message 4 | { 5 | protected Message(T payload) 6 | { 7 | Payload = payload; 8 | } 9 | 10 | public T Payload { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration/IConfigurationMetadataSource.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Configuration 4 | { 5 | public interface IConfigurationMetadataSource 6 | { 7 | IEnumerable LoadConfiguration(string groupName); 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Auditing/Interfaces/IAuditLog.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Auditing.Interfaces 2 | { 3 | public interface IAuditLog 4 | { 5 | string GetEventId(T auditEvent); 6 | string GetEventPartitionId(T auditEvent); 7 | 8 | void Record(T auditEvent); 9 | } 10 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Interfaces/IConfigurationProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Configuration.Interfaces 4 | { 5 | public interface IConfigurationProvider 6 | { 7 | IEnumerable GetConfigurationSettings(); 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.FaultTolerance/Interfaces/ITransientFaultStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.FaultTolerance.Interfaces 4 | { 5 | public interface ITransientFaultStrategy 6 | { 7 | void Try(Action toTryAction); 8 | T Try(Func toTryFunc); 9 | } 10 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Interfaces/IMantleUserService.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Identity.Interfaces 2 | { 3 | public interface IMantleUserService : 4 | IMantleUserCommandService, 5 | IMantleUserQueryService 6 | where TUser : MantleUser 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IPublisher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Mantle.Messaging.Interfaces 8 | { 9 | class IPublisher 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging/LogModule.cs: -------------------------------------------------------------------------------- 1 | using Ninject.Modules; 2 | 3 | namespace Mantle.Logging 4 | { 5 | public class LogModule : NinjectModule 6 | { 7 | public override void Load() 8 | { 9 | Bind().To().InTransientScope(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Cache.Azure/Microsoft.WindowsAzure.Caching/ClientPerfCountersInstaller.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Interfaces/IPhotoThumbnailService.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Mantle.PhotoGallery.PhotoProcessing.Interfaces 4 | { 5 | public interface IPhotoThumbnailService 6 | { 7 | Stream GenerateThumbnail(Stream originalImageStream); 8 | } 9 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting/IWorker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Hosting 4 | { 5 | public interface IWorker 6 | { 7 | event Action ErrorOccurred; 8 | event Action MessageOccurred; 9 | 10 | void Start(); 11 | void Stop(); 12 | } 13 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.WindowsServiceBus/IWindowsServiceBusConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.WindowsServiceBus 4 | { 5 | public interface IWindowsServiceBusConfiguration 6 | { 7 | string ConnectionString { get; set; } 8 | 9 | void Validate(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IMessageSerializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Mantle.Messaging.Interfaces 8 | { 9 | class IMessageSerializer 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Interfaces/IDeploymentMetadata.cs: -------------------------------------------------------------------------------- 1 | using Mantle.PhotoGallery.Web.Enumerations; 2 | 3 | namespace Mantle.PhotoGallery.Web.Interfaces 4 | { 5 | public interface IDeploymentMetadata 6 | { 7 | string Name { get; } 8 | Platform Platform { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/IPublisherEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface IPublisherEndpoint 4 | { 5 | string Name { get; } 6 | 7 | IPublisherClient GetClient(); 8 | IPublisherEndpointManager GetManager(); 9 | 10 | void Validate(); 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
-------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ISubscriberEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging 2 | { 3 | public interface ISubscriberEndpoint 4 | { 5 | string Name { get; } 6 | 7 | ISubscriberClient GetClient(); 8 | ISubscriberEndpointManager GetManager(); 9 | 10 | void Validate(); 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.BlobStorage.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Service References/Application Insights/ConnectedService.json: -------------------------------------------------------------------------------- 1 | { 2 | "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider", 3 | "Version": "4.0.0.0", 4 | "GettingStartedDocument": { 5 | "Uri": "http://go.microsoft.com/fwlink/?LinkID=613413" 6 | } 7 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Providers/NameTypeTokenProvider.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Interfaces; 2 | 3 | namespace Mantle.Providers 4 | { 5 | public class NameTypeTokenProvider : ITypeTokenProvider 6 | { 7 | public string GetTypeToken() 8 | { 9 | return (typeof(T).Name); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Aws.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Cache/Interfaces/ICacheClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Cache.Interfaces 4 | { 5 | public interface ICacheClient 6 | where T : class 7 | { 8 | T Get(string objectId); 9 | void Put(T @object, string objectId, TimeSpan? cacheDuration = null); 10 | } 11 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting/Interfaces/IWorker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Hosting.Interfaces 4 | { 5 | public interface IWorker 6 | { 7 | event Action ErrorOccurred; 8 | event Action MessageOccurred; 9 | 10 | void Start(); 11 | void Stop(); 12 | } 13 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Constants/BlobStorageClientNames.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.Web.Mantle.Constants 2 | { 3 | public class BlobStorageClientNames 4 | { 5 | public const string PhotoStorage = "PhotoStorage"; 6 | public const string ThumbnailStorage = "ThumbnailStorage"; 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration.Tests/Objects/RequiredTestObject.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Attributes; 2 | 3 | namespace Mantle.Configuration.Tests.Targets 4 | { 5 | public class RequiredTestTarget 6 | { 7 | [Configurable(IsRequired = true)] 8 | public string RequiredProperty { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/ConfigurableProperty.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Configuration 2 | { 3 | public class ConfigurableProperty 4 | { 5 | public bool IsRequired { get; set; } 6 | public string[] PrioritizedSettingNames { get; set; } 7 | public PropertyMetadata PropertyMetadata { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
-------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage.InMemory.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Channels/NullPublisherChannel.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Messaging.Interfaces; 2 | 3 | namespace Mantle.Messaging.Channels 4 | { 5 | public class NullPublisherChannel : IPublisherChannel 6 | { 7 | public void Publish(T message) 8 | { 9 | // Poof! 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscriptionFilter.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface ISubscriptionFilter 4 | where T : class 5 | { 6 | bool OnHandledMessage(IMessageContext messageContext); 7 | bool OnHandlingMessage(IMessageContext messageContext); 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Providers/FullNameTypeTokenProvider.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Interfaces; 2 | 3 | namespace Mantle.Providers 4 | { 5 | public class FullNameTypeTokenProvider : ITypeTokenProvider 6 | { 7 | public string GetTypeToken() 8 | { 9 | return (typeof(T).FullName); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", null, new {id = "loginLink"}) 9 |

10 |
-------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration/IConfigurationMetadata.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Configuration 4 | { 5 | public interface IConfigurationMetadata 6 | { 7 | string Name { get; } 8 | string GroupName { get; } 9 | 10 | Dictionary Properties { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Interfaces/IConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Configuration.Interfaces 4 | { 5 | public interface IConfigurer 6 | { 7 | T Configure(T target, string targetName = null); 8 | IEnumerable GetConfigurationSettings(); 9 | } 10 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Worker/Constants/ChannelNames.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.Processor.Worker.Constants 2 | { 3 | public static class ChannelNames 4 | { 5 | public const string ProcessorChannel = "ProcessorChannel"; 6 | public const string SaveImageCommandChannel = "SaveImageCommandChannel"; 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Subscription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.Messaging.Interfaces; 3 | 4 | namespace Mantle.Messaging 5 | { 6 | public class Subscription 7 | { 8 | public ISubscriptionConstraint Constraint { get; set; } 9 | public ISubscriber Subscriber { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Constants/DictionaryStorageClientNames.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.Web.Mantle.Constants 2 | { 3 | public static class DictionaryStorageClientNames 4 | { 5 | public const string PhotoMetadata = "PhotoMetadata"; 6 | public const string PhotoMetadataCache = "PhotoMetadataCache"; 7 | } 8 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Interfaces/IPhotoCopyService.cs: -------------------------------------------------------------------------------- 1 | using Mantle.PhotoGallery.PhotoProcessing.Models; 2 | 3 | namespace Mantle.PhotoGallery.PhotoProcessing.Interfaces 4 | { 5 | public interface IPhotoCopyService 6 | { 7 | void CopyPhoto(PhotoMetadata photoMetadata, string photoSource, string photoDestination); 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace Mantle.PhotoGallery.Web 4 | { 5 | public class FilterConfig 6 | { 7 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 8 | { 9 | filters.Add(new HandleErrorAttribute()); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqPublisherEndpointManager.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Msmq 2 | { 3 | public class MsmqPublisherEndpointManager : MsmqEndpointManager, IPublisherEndpointManager 4 | { 5 | public MsmqPublisherEndpointManager(MsmqPublisherEndpoint endpoint) 6 | : base(endpoint) 7 | { 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Providers/AssemblyQualifiedNameTypeTokenProvider.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Interfaces; 2 | 3 | namespace Mantle.Providers 4 | { 5 | public class AssemblyQualifiedNameTypeTokenProvider : ITypeTokenProvider 6 | { 7 | public string GetTypeToken() 8 | { 9 | return (typeof(T).AssemblyQualifiedName); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Attributes/ConfigurableAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Configuration.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Property)] 6 | public sealed class ConfigurableAttribute : Attribute 7 | { 8 | public bool IsRequired { get; set; } 9 | public string SettingName { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.FaultTolerance/Interfaces/IBreakerPanel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.FaultTolerance.Interfaces 4 | { 5 | public interface IBreakerPanel 6 | { 7 | bool IsBreakerTripped(string breakerName); 8 | void ResetBreaker(string breakerName); 9 | void TripBreaker(string breakerName, TimeSpan? resetAfter = null); 10 | } 11 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscriberChannel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Mantle.Messaging.Interfaces 5 | { 6 | public interface ISubscriberChannel 7 | where T : class 8 | { 9 | IMessageContext Receive(TimeSpan? timeout = null); 10 | Task> ReceiveAsync(); 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscriber.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging.Interfaces 4 | { 5 | public interface ISubscriber 6 | where T : class 7 | { 8 | event Action ErrorOccurred; 9 | event Action MessageOccurred; 10 | 11 | void HandleMessage(IMessageContext messageContext); 12 | } 13 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Startup.cs: -------------------------------------------------------------------------------- 1 | using Mantle.PhotoGallery.Web; 2 | using Microsoft.Owin; 3 | using Owin; 4 | 5 | [assembly: OwinStartup(typeof(Startup))] 6 | 7 | namespace Mantle.PhotoGallery.Web 8 | { 9 | public partial class Startup 10 | { 11 | public void Configuration(IAppBuilder app) 12 | { 13 | ConfigureAuth(app); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Aws.Tests/Constants/AwsTestConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Aws.Tests.Constants 2 | { 3 | public static class AwsTestConfiguration 4 | { 5 | public const bool AutoSetup = true; 6 | 7 | public const string AwsRegionName = "us-east-1"; 8 | 9 | public const string AwsAccessKeyId = ""; 10 | public const string AwsSecretAccessKey = ""; 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Flattened.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | 3 | namespace Mantle 4 | { 5 | public class Flattened 6 | { 7 | public Flattened() 8 | { 9 | } 10 | 11 | public Flattened(byte[] data) 12 | { 13 | data.Require("data"); 14 | Data = data; 15 | } 16 | 17 | public byte[] Data { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/Endpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging 4 | { 5 | public abstract class Endpoint 6 | { 7 | public string Name { get; set; } 8 | 9 | public virtual void Validate() 10 | { 11 | if (String.IsNullOrEmpty(Name)) 12 | throw new MessagingException("Endpoint name is required."); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.FaultTolerance/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", null, new {id = "loginLink"}) 11 |

12 |
-------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Strategies/NullDeadLetterStrategy.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Messaging.Interfaces; 2 | 3 | namespace Mantle.Messaging.Strategies 4 | { 5 | public class NullDeadLetterStrategy : IDeadLetterStrategy 6 | where T : class 7 | { 8 | public void HandleDeadLetterMessage(IMessageContext messageContext) 9 | { 10 | // Poof! 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage/BaseStorageClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Storage 4 | { 5 | public abstract class BaseStorageClient 6 | { 7 | public string Name { get; set; } 8 | 9 | public virtual void Validate() 10 | { 11 | if (String.IsNullOrEmpty(Name)) 12 | throw new StorageException("Storage name is required."); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage/IStorageClient.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Mantle.Storage 4 | { 5 | public interface IStorageClient 6 | { 7 | string Name { get; } 8 | 9 | bool DoesObjectExist(string objName); 10 | string[] ListObjects(); 11 | Stream LoadObject(string objName); 12 | void SaveObject(Stream obj, string objName); 13 | void Validate(); 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Constants/ChannelNames.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.Web.Mantle.Constants 2 | { 3 | public static class ChannelNames 4 | { 5 | public const string CopyImageCommandChannel = "CopyImageCommandChannel"; 6 | public const string SaveImageCommandChannel = "SaveImageCommandChannel"; 7 | public const string UserCommandChannel = "UserCommandChannel"; 8 | } 9 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/ITypeMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Interfaces 5 | { 6 | public interface ITypeMetadata : ITypeMetadata 7 | { 8 | } 9 | 10 | public interface ITypeMetadata 11 | { 12 | IList Attributes { get; } 13 | IList Properties { get; } 14 | Type Type { get; } 15 | } 16 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/SqsPublisherEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Aws; 2 | 3 | namespace Mantle.Messaging.Aws 4 | { 5 | public class SqsPublisherEndpointManager : SqsEndpointManager, IPublisherEndpointManager 6 | { 7 | public SqsPublisherEndpointManager(SqsPublisherEndpoint endpoint, IAwsConfiguration awsConfiguration) 8 | : base(endpoint, awsConfiguration) 9 | { 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging/Severity.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Mantle.Logging 4 | { 5 | [DataContract(Namespace = "http://mantle/logging/1")] 6 | public enum Severity : byte 7 | { 8 | [EnumMember] Undefined = 0, 9 | [EnumMember] Debug, 10 | [EnumMember] Information, 11 | [EnumMember] Warning, 12 | [EnumMember] Error, 13 | [EnumMember] Fatal 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Interfaces/IPropertyConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | namespace Mantle.Configuration.Interfaces 4 | { 5 | public interface IPropertyConfigurer 6 | { 7 | bool CanConfigureProperty(PropertyInfo propertyInfo); 8 | 9 | void Configure(ConfigurableObject cfgObject, ConfigurableProperty cfgProperty, 10 | ConfigurationSetting cfgSetting); 11 | } 12 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Interfaces/IDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Interfaces 5 | { 6 | public interface IDependencyResolver 7 | { 8 | T Get(); 9 | T Get(string name); 10 | 11 | object Get(Type type); 12 | object Get(Type type, string name); 13 | 14 | IEnumerable GetAll(); 15 | 16 | void Release(object target); 17 | } 18 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity.Azure/Entities/DocumentDbMantleUserClaim.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Mantle.Identity.Azure.Entities 4 | { 5 | public class DocumentDbMantleUserClaim 6 | { 7 | [JsonProperty(PropertyName = "id")] 8 | public string Id { get; set; } 9 | 10 | public string UserId { get; set; } 11 | public string ClaimType { get; set; } 12 | public string ClaimValue { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity.Azure/Entities/DocumentDbMantleUserLogin.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Mantle.Identity.Azure.Entities 4 | { 5 | public class DocumentDbMantleUserLogin 6 | { 7 | [JsonProperty(PropertyName = "id")] 8 | public string Id { get; set; } 9 | 10 | public string UserId { get; set; } 11 | public string LoginProvider { get; set; } 12 | public string ProviderKey { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqPublisherEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Msmq 2 | { 3 | public class MsmqPublisherEndpoint : MsmqEndpoint, IPublisherEndpoint 4 | { 5 | public IPublisherClient GetClient() 6 | { 7 | return new MsmqPublisherClient(this); 8 | } 9 | 10 | public IPublisherEndpointManager GetManager() 11 | { 12 | return new MsmqPublisherEndpointManager(this); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqSubscriberEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Msmq 2 | { 3 | public class MsmqSubscriberEndpoint : MsmqEndpoint, ISubscriberEndpoint 4 | { 5 | public ISubscriberClient GetClient() 6 | { 7 | return new MsmqSubscriberClient(this); 8 | } 9 | 10 | public ISubscriberEndpointManager GetManager() 11 | { 12 | return new MsmqSubscriberEndpointManager(this); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Aws.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.BlobStorage/Interfaces/IBlobStorageClient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | 4 | namespace Mantle.BlobStorage.Interfaces 5 | { 6 | public interface IBlobStorageClient 7 | { 8 | bool BlobExists(string blobName); 9 | void DeleteBlob(string blobName); 10 | Stream DownloadBlob(string blobName); 11 | IEnumerable ListBlobs(); 12 | void UploadBlob(Stream blob, string blobName); 13 | } 14 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Profiles/Default/AwsModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Aws; 2 | using Mantle.Aws.Interfaces; 3 | using Ninject.Modules; 4 | 5 | namespace Mantle.PhotoGallery.Web.Mantle.Profiles.Default 6 | { 7 | public class AwsModule : NinjectModule 8 | { 9 | public override void Load() 10 | { 11 | Bind() 12 | .To() 13 | .InTransientScope(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Tests/NameTypeTokenProviderTests.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Providers; 2 | using NUnit.Framework; 3 | 4 | namespace Mantle.Tests 5 | { 6 | [TestFixture] 7 | public class NameTypeTokenProviderTests 8 | { 9 | [Test] 10 | public void Should_get_type_token() 11 | { 12 | var tokenProvider = new NameTypeTokenProvider(); 13 | Assert.AreEqual(tokenProvider.GetTypeToken(), (typeof(string).Name)); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity.Azure/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscription.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Messaging.Messages; 3 | 4 | namespace Mantle.Messaging.Interfaces 5 | { 6 | public interface ISubscription 7 | where T : class 8 | { 9 | ISubscriptionConfiguration Configuration { get; } 10 | event Action ErrorOccurred; 11 | event Action MessageOccurred; 12 | 13 | bool HandleMessage(IMessageContext messageContext); 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISagaRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Messaging.Interfaces 4 | { 5 | public interface ISagaRepository 6 | { 7 | void AddMessageEnvelope(TEnvelope messageEnvelope); 8 | 9 | void DeleteMessages(string correlationId); 10 | 11 | IEnumerable LoadMessageEnvelopes(string correlationId); 12 | IEnumerable LoadMessages(string correlationId); 13 | } 14 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Tests/FullNameTypeTokenProviderTests.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Providers; 2 | using NUnit.Framework; 3 | 4 | namespace Mantle.Tests 5 | { 6 | [TestFixture] 7 | public class FullNameTypeTokenProviderTests 8 | { 9 | [Test] 10 | public void Should_get_type_token() 11 | { 12 | var tokenProvider = new FullNameTypeTokenProvider(); 13 | Assert.AreEqual(tokenProvider.GetTypeToken(), (typeof(string).FullName)); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Extensions/StreamExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Mantle.Extensions 4 | { 5 | public static class StreamExtensions 6 | { 7 | public static bool TryToRewind(this Stream stream) 8 | { 9 | stream.Require(nameof(stream)); 10 | 11 | if (stream.CanSeek) 12 | { 13 | stream.Position = 0; 14 | return true; 15 | } 16 | 17 | return false; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Serializers/XmlSerializer.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | using Mantle.Interfaces; 3 | 4 | namespace Mantle.Serializers 5 | { 6 | public class XmlSerializer : ISerializer 7 | { 8 | public T Deserialize(string source) 9 | { 10 | source.Require("source"); 11 | return source.FromXml(); 12 | } 13 | 14 | public string Serialize(T source) 15 | { 16 | return source.ToXml(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.FaultTolerance/Strategies/NoTransientFaultStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.FaultTolerance.Interfaces; 3 | 4 | namespace Mantle.FaultTolerance.Strategies 5 | { 6 | public class NoTransientFaultStrategy : ITransientFaultStrategy 7 | { 8 | public void Try(Action toTryAction) 9 | { 10 | toTryAction(); 11 | } 12 | 13 | public T Try(Func toTryFunc) 14 | { 15 | return toTryFunc(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Interfaces/IMantleUserCommandService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Mantle.Identity.Interfaces 4 | { 5 | public interface IMantleUserCommandService 6 | where T : MantleUser 7 | { 8 | void CreateUser(T user); 9 | void DeleteUser(string userId); 10 | void UpdateUser(T user); 11 | Task CreateUserAsync(T user); 12 | Task DeleteUserAsync(string userId); 13 | Task UpdateUserAsync(T user); 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Serializers/JsonSerializer.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | using Mantle.Interfaces; 3 | 4 | namespace Mantle.Serializers 5 | { 6 | public class JsonSerializer : ISerializer 7 | { 8 | public T Deserialize(string source) 9 | { 10 | source.Require("source"); 11 | return source.FromJson(); 12 | } 13 | 14 | public string Serialize(T source) 15 | { 16 | return source.ToJson(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqSubscriberEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging.Msmq 4 | { 5 | public class MsmqSubscriberEndpointManager : MsmqEndpointManager, ISubscriberEndpointManager 6 | { 7 | public MsmqSubscriberEndpointManager(MsmqSubscriberEndpoint endpoint) 8 | : base(endpoint) 9 | { 10 | } 11 | 12 | public void Create() 13 | { 14 | throw new NotImplementedException(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Default/AwsModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Aws; 2 | using Mantle.Aws.Interfaces; 3 | using Ninject.Modules; 4 | 5 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Default 6 | { 7 | public class AwsModule : NinjectModule 8 | { 9 | public override void Load() 10 | { 11 | Bind() 12 | .To() 13 | .InTransientScope(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Logging.MessagingAdapter/MessagingLogAdapterModule.cs: -------------------------------------------------------------------------------- 1 | using Ninject.Modules; 2 | 3 | namespace Mantle.Logging.MessagingAdapter 4 | { 5 | public class MessagingLogAdapterModule : NinjectModule 6 | { 7 | public override void Load() 8 | { 9 | Bind() 10 | .To() 11 | .InTransientScope() 12 | .OnActivation(c => c.Configure("Enter the name of the log publishing endpoint here.")); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Strategies/DefaultDeadLetterStrategy.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | using Mantle.Messaging.Interfaces; 3 | 4 | namespace Mantle.Messaging.Strategies 5 | { 6 | public class DefaultDeadLetterStrategy : IDeadLetterStrategy 7 | where T : class 8 | { 9 | public void HandleDeadLetterMessage(IMessageContext messageContext) 10 | { 11 | messageContext.Require(nameof(messageContext)); 12 | messageContext.TryToDeadLetter(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Metadata/DeploymentMetadata.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Attributes; 2 | using Mantle.PhotoGallery.Web.Enumerations; 3 | using Mantle.PhotoGallery.Web.Interfaces; 4 | 5 | namespace Mantle.PhotoGallery.Web.Metadata 6 | { 7 | public class DeploymentMetadata : IDeploymentMetadata 8 | { 9 | [Configurable(IsRequired = true)] 10 | public string Name { get; set; } 11 | 12 | [Configurable(IsRequired = true)] 13 | public Platform Platform { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration/ConfigurationMetadata.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Configuration 4 | { 5 | public class ConfigurationMetadata : IConfigurationMetadata 6 | { 7 | public ConfigurationMetadata() 8 | { 9 | Properties = new Dictionary(); 10 | } 11 | 12 | public string Name { get; set; } 13 | public string GroupName { get; set; } 14 | 15 | public Dictionary Properties { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Models/PhotoUploadViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Web; 3 | 4 | namespace Mantle.PhotoGallery.Web.Models 5 | { 6 | public class PhotoUploadViewModel 7 | { 8 | [Required(ErrorMessage = "Title is required.")] 9 | public string Title { get; set; } 10 | 11 | public string Description { get; set; } 12 | 13 | [Required(ErrorMessage = "Photo is required.")] 14 | public HttpPostedFileBase Photo { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Dictionary.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Default/WorkerModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Hosting.Interfaces; 2 | using Mantle.PhotoGallery.Processor.Worker.Workers; 3 | using Ninject.Modules; 4 | 5 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Default 6 | { 7 | public class WorkerModule : NinjectModule 8 | { 9 | public override void Load() 10 | { 11 | Bind() 12 | .To() 13 | .InTransientScope(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/MessageScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging 4 | { 5 | public class MessageScope : IDisposable 6 | { 7 | public MessageScope(Message message) 8 | { 9 | Message = message; 10 | } 11 | 12 | public Message Message { get; private set; } 13 | 14 | public void Dispose() 15 | { 16 | if ((Message != null) && (Message is ICanBeCompleted)) 17 | (Message as ICanBeCompleted).Complete(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/Mantle.Logging.MessagingAdapter/MessagingLogAdapterModule.cs: -------------------------------------------------------------------------------- 1 | using Ninject.Modules; 2 | 3 | namespace Mantle.Logging.MessagingAdapter 4 | { 5 | public class MessagingLogAdapterModule : NinjectModule 6 | { 7 | public override void Load() 8 | { 9 | Bind() 10 | .To() 11 | .InTransientScope() 12 | .OnActivation(c => c.Configure("Enter the name of the log publishing endpoint here.")); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/ConfigurableObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Configuration 4 | { 5 | public class ConfigurableObject 6 | { 7 | public ConfigurableObject() 8 | { 9 | Properties = new List(); 10 | } 11 | 12 | public string Name { get; set; } 13 | 14 | public List Properties { get; set; } 15 | public T Target { get; set; } 16 | public TypeMetadata TypeMetadata { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureStorageQueuePublisherEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Azure; 2 | 3 | namespace Mantle.Messaging.Azure 4 | { 5 | public class AzureStorageQueuePublisherEndpointManager : AzureStorageQueueEndpointManager 6 | { 7 | public AzureStorageQueuePublisherEndpointManager(AzureStorageQueuePublisherEndpoint endpoint, 8 | IAzureStorageConfiguration storageConfiguration) 9 | : base(endpoint, storageConfiguration) 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/ConfigurationSetting.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | 3 | namespace Mantle.Configuration 4 | { 5 | public class ConfigurationSetting 6 | { 7 | public ConfigurationSetting() 8 | { 9 | } 10 | 11 | public ConfigurationSetting(string name, string value) 12 | { 13 | name.Require("name"); 14 | 15 | Name = name; 16 | Value = value; 17 | } 18 | 19 | public string Name { get; set; } 20 | public string Value { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/IMessageContext.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.Messaging.Interfaces 2 | { 3 | public interface IMessageContext 4 | where T : class 5 | { 6 | int? DeliveryCount { get; } 7 | string Id { get; } 8 | T Message { get; } 9 | 10 | bool IsAbandoned { get; } 11 | bool IsCompleted { get; } 12 | bool IsDeadLettered { get; } 13 | 14 | bool TryToAbandon(); 15 | bool TryToComplete(); 16 | bool TryToDeadLetter(); 17 | bool TryToRenewLock(); 18 | } 19 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Tests/AssemblyQualifiedNameTypeTokenProviderTests.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Providers; 2 | using NUnit.Framework; 3 | 4 | namespace Mantle.Tests 5 | { 6 | [TestFixture] 7 | public class AssemblyQualifiedNameTypeTokenProviderTests 8 | { 9 | [Test] 10 | public void Should_get_type_token() 11 | { 12 | var tokenProvider = new AssemblyQualifiedNameTypeTokenProvider(); 13 | 14 | Assert.AreEqual(tokenProvider.GetTypeToken(), (typeof(string).AssemblyQualifiedName)); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/Models/Group.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Configuration.Source.SqlServer.Models 5 | { 6 | public partial class Group 7 | { 8 | public Group() 9 | { 10 | this.Modules = new List(); 11 | } 12 | 13 | public int GroupId { get; set; } 14 | public string Name { get; set; } 15 | public string Description { get; set; } 16 | public virtual ICollection Modules { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle/ProfileAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle 4 | { 5 | [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] 6 | public sealed class ProfileAttribute : Attribute 7 | { 8 | public ProfileAttribute(string profileName) 9 | { 10 | if (String.IsNullOrEmpty(profileName)) 11 | throw new ArgumentNullException("profileName"); 12 | 13 | ProfileName = profileName; 14 | } 15 | 16 | public string ProfileName { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Profiles/Default/RepositoryModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.PhotoGallery.PhotoProcessing.Interfaces; 2 | using Mantle.PhotoGallery.PhotoProcessing.Repositories; 3 | using Ninject.Modules; 4 | 5 | namespace Mantle.PhotoGallery.Web.Mantle.Profiles.Default 6 | { 7 | public class RepositoryModule : NinjectModule 8 | { 9 | public override void Load() 10 | { 11 | Bind() 12 | .To() 13 | .InTransientScope(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/SqsSubscriberEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Aws; 3 | 4 | namespace Mantle.Messaging.Aws 5 | { 6 | public class SqsSubscriberEndpointManager : SqsEndpointManager, ISubscriberEndpointManager 7 | { 8 | public SqsSubscriberEndpointManager(SqsSubscriberEndpoint endpoint, IAwsConfiguration awsConfiguration) 9 | : base(endpoint, awsConfiguration) 10 | { 11 | } 12 | 13 | public void Create() 14 | { 15 | throw new NotImplementedException(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Models/PhotoViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.PhotoGallery.Web.Models 4 | { 5 | public class PhotoViewModel 6 | { 7 | public string Id { get; set; } 8 | public string Title { get; set; } 9 | public string Description { get; set; } 10 | public string Source { get; set; } 11 | public string UserName { get; set; } 12 | public string PhotoUrl { get; set; } 13 | public string ThumbnailUrl { get; set; } 14 | public DateTime PhotoDateUtc { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.BlobStorage.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Configurers/AppSettingsConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Configuration; 3 | using System.Linq; 4 | 5 | namespace Mantle.Configuration.Configurers 6 | { 7 | public class AppSettingsConfigurer : BaseConfigurer 8 | { 9 | public override IEnumerable GetConfigurationSettings() 10 | { 11 | var appSettings = ConfigurationManager.AppSettings; 12 | return appSettings.Keys.OfType().Select(k => new ConfigurationSetting(k, appSettings[k])); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Default/RepositoryModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.PhotoGallery.PhotoProcessing.Interfaces; 2 | using Mantle.PhotoGallery.PhotoProcessing.Repositories; 3 | using Ninject.Modules; 4 | 5 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Default 6 | { 7 | public class RepositoryModule : NinjectModule 8 | { 9 | public override void Load() 10 | { 11 | Bind() 12 | .To() 13 | .InTransientScope(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting/Profiles/ProfileAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Hosting.Profiles 4 | { 5 | [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] 6 | public sealed class ProfileAttribute : Attribute 7 | { 8 | public ProfileAttribute(string profileName) 9 | { 10 | if (String.IsNullOrEmpty(profileName)) 11 | throw new ArgumentNullException("profileName"); 12 | 13 | ProfileName = profileName; 14 | } 15 | 16 | public string ProfileName { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/Models/Property.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Configuration.Source.SqlServer.Models 5 | { 6 | public partial class Property 7 | { 8 | public Property() 9 | { 10 | this.PropertyValues = new List(); 11 | } 12 | 13 | public int PropertyId { get; set; } 14 | public string Name { get; set; } 15 | public string Description { get; set; } 16 | public virtual ICollection PropertyValues { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage/Interfaces/IReadOnlyDictionaryStorageClient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.DictionaryStorage.Entities; 3 | 4 | namespace Mantle.DictionaryStorage.Interfaces 5 | { 6 | public interface IReadOnlyDictionaryStorageClient 7 | where T : class, new() 8 | { 9 | bool DoesEntityExist(string entityId, string partitionId); 10 | IEnumerable> LoadAllDictionaryStorageEntities(string partitionId); 11 | DictionaryStorageEntity LoadDictionaryStorageEntity(string entityId, string partitionId); 12 | } 13 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using System.Web.Routing; 3 | 4 | namespace Mantle.PhotoGallery.Web 5 | { 6 | public class RouteConfig 7 | { 8 | public static void RegisterRoutes(RouteCollection routes) 9 | { 10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 11 | 12 | routes.MapRoute( 13 | "Default", 14 | "{controller}/{action}/{id}", 15 | new {controller = "Photos", action = "All", id = UrlParameter.Optional} 16 | ); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.Optimization; 4 | using System.Web.Routing; 5 | 6 | namespace Mantle.PhotoGallery.Web 7 | { 8 | public class MvcApplication : HttpApplication 9 | { 10 | protected void Application_Start() 11 | { 12 | AreaRegistration.RegisterAllAreas(); 13 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 14 | RouteConfig.RegisterRoutes(RouteTable.Routes); 15 | BundleConfig.RegisterBundles(BundleTable.Bundles); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Commands/CreateUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Interfaces; 4 | 5 | namespace Mantle.Identity.Commands 6 | { 7 | public class CreateUser : ICommand 8 | { 9 | public CreateUser() 10 | { 11 | Id = Guid.NewGuid().ToString(); 12 | } 13 | 14 | public CreateUser(MantleUser user) 15 | : this() 16 | { 17 | user.Require(nameof(user)); 18 | 19 | User = user; 20 | } 21 | 22 | public MantleUser User { get; set; } 23 | 24 | public string Id { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Commands/UpdateUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Interfaces; 4 | 5 | namespace Mantle.Identity.Commands 6 | { 7 | public class UpdateUser : ICommand 8 | { 9 | public UpdateUser() 10 | { 11 | Id = Guid.NewGuid().ToString(); 12 | } 13 | 14 | public UpdateUser(MantleUser user) 15 | : this() 16 | { 17 | user.Require(nameof(user)); 18 | 19 | User = user; 20 | } 21 | 22 | public MantleUser User { get; set; } 23 | 24 | public string Id { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Commands/DeleteUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Interfaces; 4 | 5 | namespace Mantle.Identity.Commands 6 | { 7 | public class DeleteUser : ICommand 8 | { 9 | public DeleteUser() 10 | { 11 | Id = Guid.NewGuid().ToString(); 12 | } 13 | 14 | public DeleteUser(string userId) 15 | : this() 16 | { 17 | userId.Require(nameof(userId)); 18 | 19 | UserId = userId; 20 | } 21 | 22 | public string UserId { get; set; } 23 | 24 | public string Id { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.FaultTolerance/TrialResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.FaultTolerance 5 | { 6 | public class TrialResult 7 | { 8 | public TrialResult() 9 | { 10 | Exceptions = new Dictionary(); 11 | } 12 | 13 | public Dictionary Exceptions { get; set; } 14 | public int TotalAttempts { get; set; } 15 | public bool WasSuccessful { get; set; } 16 | } 17 | 18 | public class TrialResult : TrialResult 19 | { 20 | public TResult Result { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-bottom: 20px; 3 | padding-top: 50px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | 8 | .body-content { 9 | padding-left: 15px; 10 | padding-right: 15px; 11 | } 12 | 13 | /* Override the default bootstrap behavior where horizontal description lists 14 | will truncate terms that are too long to fit in the left column 15 | */ 16 | 17 | .dl-horizontal dt { white-space: normal; } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | 21 | input, 22 | select, 23 | textarea { max-width: 280px; } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/Models/PropertyValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Configuration.Source.SqlServer.Models 5 | { 6 | public partial class PropertyValue 7 | { 8 | public PropertyValue() 9 | { 10 | this.Modules = new List(); 11 | } 12 | 13 | public int ValueId { get; set; } 14 | public int PropertyId { get; set; } 15 | public string Value { get; set; } 16 | public virtual Property Property { get; set; } 17 | public virtual ICollection Modules { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting.Azure/AzureRoleWorkerHost.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Mantle.Hosting.Azure 4 | { 5 | public class AzureRoleWorkerHost : BaseWorkerHost 6 | { 7 | public AzureRoleWorkerHost(IDependencyResolver dependencyResolver) 8 | : base(dependencyResolver) 9 | { 10 | } 11 | 12 | protected override void OnErrorOccurred(string message) 13 | { 14 | Trace.TraceError(message); 15 | } 16 | 17 | protected override void OnMessageOccurred(string message) 18 | { 19 | Trace.TraceInformation(message); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Providers/AppSettingsConfigurationProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Configuration; 3 | using System.Linq; 4 | using Mantle.Configuration.Interfaces; 5 | 6 | namespace Mantle.Configuration.Providers 7 | { 8 | public class AppSettingsConfigurationProvider : IConfigurationProvider 9 | { 10 | public IEnumerable GetConfigurationSettings() 11 | { 12 | var appSettings = ConfigurationManager.AppSettings; 13 | return appSettings.Keys.OfType().Select(k => new ConfigurationSetting(k, appSettings[k])); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Constants/PhotoStorageClientNames.cs: -------------------------------------------------------------------------------- 1 | namespace Mantle.PhotoGallery.PhotoProcessing.Constants 2 | { 3 | public static class PhotoStorageClientNames 4 | { 5 | public static class Aws 6 | { 7 | public const string PhotoStorage = "Aws.PhotoStorage"; 8 | public const string ThumbnailStorage = "Aws.ThumbnailStorage"; 9 | } 10 | 11 | public static class Azure 12 | { 13 | public const string PhotoStorage = "Azure.PhotoStorage"; 14 | public const string ThumbnailStorage = "Azure.ThumbnailStorage"; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Interfaces/IPhotoMetadataRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.PhotoGallery.PhotoProcessing.Models; 3 | 4 | namespace Mantle.PhotoGallery.PhotoProcessing.Interfaces 5 | { 6 | public interface IPhotoMetadataRepository 7 | { 8 | bool DeletePhotoMetadata(PhotoMetadata photoMetadata); 9 | void InsertOrUpdatePhotoMetadata(PhotoMetadata photoMetadata); 10 | PhotoMetadata GetPhotoMetadata(string photoId); 11 | IEnumerable GetAllPhotoMetadata(); 12 | IEnumerable GetAllPhotoMetadataByUser(string userId); 13 | } 14 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusQueuePublisherEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Azure; 2 | 3 | namespace Mantle.Messaging.Azure 4 | { 5 | public class AzureServiceBusQueuePublisherEndpointManager : AzureServiceBusQueueEndpointManager, 6 | IPublisherEndpointManager 7 | { 8 | public AzureServiceBusQueuePublisherEndpointManager(AzureServiceBusQueuePublisherEndpoint endpoint, 9 | IAzureServiceBusConfiguration sbConfiguration) 10 | : base(endpoint, sbConfiguration) 11 | { 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage/Interfaces/IDictionaryStorageClient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.DictionaryStorage.Entities; 3 | 4 | namespace Mantle.DictionaryStorage.Interfaces 5 | { 6 | public interface IDictionaryStorageClient : IReadOnlyDictionaryStorageClient 7 | where T : class, new() 8 | { 9 | bool DeleteEntity(string entityId, string partitionId); 10 | bool DeletePartition(string partitionId); 11 | void InsertOrUpdateDictionaryStorageEntities(IEnumerable> entities); 12 | void InsertOrUpdateDictionaryStorageEntity(DictionaryStorageEntity entity); 13 | } 14 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/ISubscriberClientExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging 4 | { 5 | public static class ISubscriberClientExtensions 6 | { 7 | public static MessageScope ReceiveInScope(this ISubscriberClient client) 8 | { 9 | return client.ReceiveInScope(TimeSpan.Zero); 10 | } 11 | 12 | public static MessageScope ReceiveInScope(this ISubscriberClient client, TimeSpan timeout) 13 | { 14 | if (client == null) 15 | throw new ArgumentNullException("client"); 16 | 17 | return new MessageScope(client.Receive(timeout)); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage.Aws/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Ninject/AssemblyExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Reflection; 3 | using Mantle.Extensions; 4 | using Ninject.Modules; 5 | 6 | namespace Mantle.Ninject 7 | { 8 | public static class AssemblyExtensions 9 | { 10 | public static IEnumerable LoadProfileNinjectModules( 11 | this Assembly sourceAssembly, 12 | params string[] profileNames) 13 | { 14 | sourceAssembly.Require(nameof(sourceAssembly)); 15 | profileNames.Require(nameof(profileNames)); 16 | 17 | return sourceAssembly.LoadAllFromProfiles(profileNames); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Profiles/Default/DeploymentModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.Ninject; 3 | using Mantle.PhotoGallery.Web.Interfaces; 4 | using Mantle.PhotoGallery.Web.Metadata; 5 | using Ninject.Modules; 6 | 7 | namespace Mantle.PhotoGallery.Web.Mantle.Profiles.Default 8 | { 9 | public class DeploymentModule : NinjectModule 10 | { 11 | public override void Load() 12 | { 13 | Bind() 14 | .To() 15 | .InTransientScope() 16 | .ConfigureUsing(new AppSettingsConfigurer()); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/Models/Module.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Configuration.Source.SqlServer.Models 5 | { 6 | public partial class Module 7 | { 8 | public Module() 9 | { 10 | this.PropertyValues = new List(); 11 | } 12 | 13 | public int ModuleId { get; set; } 14 | public int GroupId { get; set; } 15 | public string Name { get; set; } 16 | public string Description { get; set; } 17 | public virtual Group Group { get; set; } 18 | public virtual ICollection PropertyValues { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Ninject/IBindingToSyntaxExtensions.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | using Newtonsoft.Json; 3 | using Ninject.Syntax; 4 | 5 | namespace Mantle.Ninject 6 | { 7 | public static class IBindingToSyntaxExtensions 8 | { 9 | public static IBindingWhenInNamedWithOrOnSyntax ToJson(this IBindingToSyntax bindingToSyntax, 10 | string jsonSource) 11 | { 12 | bindingToSyntax.Require(nameof(bindingToSyntax)); 13 | jsonSource.Require(nameof(jsonSource)); 14 | 15 | return bindingToSyntax.ToMethod(c => JsonConvert.DeserializeObject(jsonSource)); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Providers/EnvironmentVariablesConfigurationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Mantle.Configuration.Interfaces; 6 | 7 | namespace Mantle.Configuration.Providers 8 | { 9 | public class EnvironmentVariablesConfigurationProvider : IConfigurationProvider 10 | { 11 | public IEnumerable GetConfigurationSettings() 12 | { 13 | return Environment.GetEnvironmentVariables() 14 | .OfType() 15 | .Select(de => new ConfigurationSetting(de.Key.ToString(), de.Value.ToString())); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusQueuePublisherEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using Mantle.WindowsServiceBus; 2 | 3 | namespace Mantle.Messaging.WindowsServiceBus 4 | { 5 | public class WindowsServiceBusQueuePublisherEndpointManager : WindowsServiceBusQueueEndpointManager, 6 | IPublisherEndpointManager 7 | { 8 | public WindowsServiceBusQueuePublisherEndpointManager(WindowsServiceBusQueuePublisherEndpoint endpoint, 9 | IWindowsServiceBusConfiguration sbConfiguration) 10 | : base(endpoint, sbConfiguration) 11 | { 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration.Tests/Configurers/TestConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.Configuration.Configurers; 3 | 4 | namespace Mantle.Configuration.Tests.Configurers 5 | { 6 | public class TestConfigurer : BaseConfigurer 7 | { 8 | private readonly IEnumerable configurationSettings; 9 | 10 | public TestConfigurer(IEnumerable configurationSettings) 11 | { 12 | this.configurationSettings = configurationSettings; 13 | } 14 | 15 | public override IEnumerable GetConfigurationSettings() 16 | { 17 | return configurationSettings; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/Interfaces/IMantleUserQueryService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNet.Identity; 3 | 4 | namespace Mantle.Identity.Interfaces 5 | { 6 | public interface IMantleUserQueryService 7 | where TUser : MantleUser 8 | { 9 | TUser FindUserByEmail(string email); 10 | TUser FindUserById(string id); 11 | TUser FindUserByLogin(UserLoginInfo loginInfo); 12 | TUser FindUserByName(string name); 13 | Task FindUserByEmailAsync(string email); 14 | Task FindUserByIdAsync(string id); 15 | Task FindUserByLoginAsync(UserLoginInfo loginInfo); 16 | Task FindUserByNameAsync(string name); 17 | } 18 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Extensions/ObjectExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Reflection; 3 | 4 | namespace Mantle.Extensions 5 | { 6 | public static class ObjectExtensions 7 | { 8 | public static Dictionary ToDictionary(this object source) 9 | { 10 | source.Require("source"); 11 | 12 | var dictionary = new Dictionary(); 13 | var sourceType = source.GetType(); 14 | 15 | foreach (var propertyInfo in sourceType.GetProperties(BindingFlags.Instance | BindingFlags.Public)) 16 | dictionary[propertyInfo.Name] = propertyInfo.GetValue(source); 17 | 18 | return dictionary; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Profiles/Default/IdentityModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Identity; 2 | using Mantle.Identity.Interfaces; 3 | using Mantle.Identity.Services; 4 | using Microsoft.AspNet.Identity; 5 | using Ninject.Modules; 6 | 7 | namespace Mantle.PhotoGallery.Web.Mantle.Profiles.Default 8 | { 9 | public class IdentityModule : NinjectModule 10 | { 11 | public override void Load() 12 | { 13 | Bind>() 14 | .To>() 15 | .InTransientScope(); 16 | 17 | Bind>() 18 | .To() 19 | .InTransientScope(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Messages/MessageEnvelope.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Messaging.Messages 4 | { 5 | public class MessageEnvelope 6 | { 7 | public MessageEnvelope() 8 | { 9 | BodyTypeTokens = new List(); 10 | Properties = new Dictionary(); 11 | } 12 | 13 | public string Body { get; set; } 14 | public List BodyTypeTokens { get; set; } 15 | public string CorrelationId { get; set; } 16 | public string Id { get; set; } 17 | public string Label { get; set; } 18 | 19 | public Dictionary Properties { get; set; } 20 | public int TimeToLive { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Models/PhotoMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.PhotoGallery.PhotoProcessing.Models 4 | { 5 | public class PhotoMetadata 6 | { 7 | public PhotoMetadata() 8 | { 9 | Id = Guid.NewGuid().ToString(); 10 | PhotoDateUtc = DateTime.UtcNow; 11 | } 12 | 13 | public string Id { get; set; } 14 | public string UserId { get; set; } 15 | public string UserName { get; set; } 16 | public string Title { get; set; } 17 | public string Description { get; set; } 18 | public string Source { get; set; } 19 | public string ContentType { get; set; } 20 | public DateTime PhotoDateUtc { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/DefaultDirectory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Interfaces; 3 | 4 | namespace Mantle 5 | { 6 | public class DefaultDirectory : IDirectory 7 | { 8 | private readonly IDependencyResolver dependencyResolver; 9 | 10 | public DefaultDirectory(IDependencyResolver dependencyResolver) 11 | { 12 | this.dependencyResolver = dependencyResolver; 13 | } 14 | 15 | public T this[string name] 16 | { 17 | get 18 | { 19 | if (string.IsNullOrEmpty(name)) 20 | throw new ArgumentException("Name is required.", "name"); 21 | 22 | return dependencyResolver.Get(name); 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Auditing/Subscribers/AuditSubscriber.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Auditing.Interfaces; 2 | using Mantle.Extensions; 3 | using Mantle.Messaging.Interfaces; 4 | 5 | namespace Mantle.Auditing.Subscribers 6 | { 7 | public class AuditSubscriber : ISubscriber 8 | where T : class 9 | { 10 | private readonly IAuditLog auditRepository; 11 | 12 | public AuditSubscriber(IAuditLog auditRepository) 13 | { 14 | this.auditRepository = auditRepository; 15 | } 16 | 17 | public virtual void HandleMessage(IMessageContext messageContext) 18 | { 19 | messageContext.Require("messageContext"); 20 | auditRepository.Record(messageContext.Message); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Configurers/ConnectionStringsConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Configuration; 3 | 4 | namespace Mantle.Configuration.Configurers 5 | { 6 | public class ConnectionStringsConfigurer : BaseConfigurer 7 | { 8 | public override IEnumerable GetConfigurationSettings() 9 | { 10 | var connectionStrings = ConfigurationManager.ConnectionStrings; 11 | 12 | for (var i = 0; i < connectionStrings.Count; i++) 13 | { 14 | var connectionString = connectionStrings[i]; 15 | yield return new ConfigurationSetting(connectionString.Name, connectionString.ConnectionString); 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Commands/SavePhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Interfaces; 4 | using Mantle.PhotoGallery.PhotoProcessing.Models; 5 | 6 | namespace Mantle.PhotoGallery.PhotoProcessing.Commands 7 | { 8 | public class SavePhoto : ICommand 9 | { 10 | public SavePhoto() 11 | { 12 | Id = Guid.NewGuid().ToString(); 13 | } 14 | 15 | public SavePhoto(PhotoMetadata photoMetadata) 16 | : this() 17 | { 18 | photoMetadata.Require(nameof(photoMetadata)); 19 | 20 | PhotoMetadata = photoMetadata; 21 | } 22 | 23 | public PhotoMetadata PhotoMetadata { get; set; } 24 | 25 | public string Id { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureStorageQueuePublisherEndpoint.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Azure; 2 | 3 | namespace Mantle.Messaging.Azure 4 | { 5 | public class AzureStorageQueuePublisherEndpoint : AzureStorageQueueEndpoint, IPublisherEndpoint 6 | { 7 | public AzureStorageQueuePublisherEndpoint(IAzureStorageConfiguration storageConfiguration) 8 | : base(storageConfiguration) 9 | { 10 | } 11 | 12 | public IPublisherClient GetClient() 13 | { 14 | return new AzureStorageQueuePublisherClient(this, StorageConfiguration); 15 | } 16 | 17 | public IPublisherEndpointManager GetManager() 18 | { 19 | return new AzureStorageQueuePublisherEndpointManager(this, StorageConfiguration); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureStorageQueueSubscriberEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | 4 | namespace Mantle.Messaging.Azure 5 | { 6 | public class AzureStorageQueueSubscriberEndpointManager : AzureStorageQueueEndpointManager, 7 | ISubscriberEndpointManager 8 | { 9 | public AzureStorageQueueSubscriberEndpointManager(AzureStorageQueueSubscriberEndpoint endpoint, 10 | IAzureStorageConfiguration storageConfiguration) 11 | : base(endpoint, storageConfiguration) 12 | { 13 | } 14 | 15 | public void Create() 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureStorageQueueSubscriberEndpoint.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Azure; 2 | 3 | namespace Mantle.Messaging.Azure 4 | { 5 | public class AzureStorageQueueSubscriberEndpoint : AzureStorageQueueEndpoint, ISubscriberEndpoint 6 | { 7 | public AzureStorageQueueSubscriberEndpoint(IAzureStorageConfiguration storageConfiguration) 8 | : base(storageConfiguration) 9 | { 10 | } 11 | 12 | public ISubscriberClient GetClient() 13 | { 14 | return new AzureStorageQueueSubscriberClient(this, StorageConfiguration); 15 | } 16 | 17 | public ISubscriberEndpointManager GetManager() 18 | { 19 | return new AzureStorageQueueSubscriberEndpointManager(this, StorageConfiguration); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Messaging; 3 | 4 | namespace Mantle.Messaging.Msmq 5 | { 6 | public class MsmqEndpointManager 7 | { 8 | private readonly MsmqEndpoint endpoint; 9 | 10 | public MsmqEndpointManager(MsmqEndpoint endpoint) 11 | { 12 | if (endpoint == null) 13 | throw new ArgumentNullException("endpoint"); 14 | 15 | endpoint.Validate(); 16 | 17 | this.endpoint = endpoint; 18 | } 19 | 20 | public bool DoesExist() 21 | { 22 | return MessageQueue.Exists(endpoint.QueuePath); 23 | } 24 | 25 | public void Create() 26 | { 27 | MessageQueue.Create(endpoint.QueuePath); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusQueueSubscriberEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | 4 | namespace Mantle.Messaging.Azure 5 | { 6 | public class AzureServiceBusQueueSubscriberEndpointManager : AzureServiceBusQueueEndpointManager, 7 | ISubscriberEndpointManager 8 | { 9 | public AzureServiceBusQueueSubscriberEndpointManager(AzureServiceBusQueueSubscriberEndpoint endpoint, 10 | IAzureServiceBusConfiguration sbConfiguration) 11 | : base(endpoint, sbConfiguration) 12 | { 13 | } 14 | 15 | public void Create() 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqPublisherClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Messaging; 3 | 4 | namespace Mantle.Messaging.Msmq 5 | { 6 | public class MsmqPublisherClient : MsmqClient, IPublisherClient 7 | { 8 | public MsmqPublisherClient(MsmqPublisherEndpoint endpoint) 9 | : base(endpoint) 10 | { 11 | } 12 | 13 | public void Publish(T message) 14 | { 15 | try 16 | { 17 | Queue.Send(new Message {BodyStream = message.Serialize()}, MessageQueueTransactionType.Single); 18 | } 19 | catch (Exception ex) 20 | { 21 | throw new MessagingException("Unable to send message. See inner exception for more details.", ex); 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.BlobStorage.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Providers/ConnectionStringsConfigurationProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Configuration; 3 | using Mantle.Configuration.Interfaces; 4 | 5 | namespace Mantle.Configuration.Providers 6 | { 7 | public class ConnectionStringsConfigurationProvider : IConfigurationProvider 8 | { 9 | public IEnumerable GetConfigurationSettings() 10 | { 11 | var connectionStrings = ConfigurationManager.ConnectionStrings; 12 | 13 | for (var i = 0; i < connectionStrings.Count; i++) 14 | { 15 | var connectionString = connectionStrings[i]; 16 | yield return new ConfigurationSetting(connectionString.Name, connectionString.ConnectionString); 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting/Hosts/BaseWorkerHost.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | using Mantle.Hosting.Interfaces; 3 | 4 | namespace Mantle.Hosting.Hosts 5 | { 6 | public abstract class BaseWorkerHost : IWorkerHost 7 | { 8 | protected BaseWorkerHost(IWorker worker) 9 | { 10 | worker.Require(nameof(worker)); 11 | 12 | Worker = worker; 13 | 14 | Worker.ErrorOccurred += OnErrorOccurred; 15 | Worker.MessageOccurred += OnMessageOccurred; 16 | } 17 | 18 | protected IWorker Worker { get; } 19 | 20 | public void Start() => Worker.Start(); 21 | 22 | public void Stop() => Worker.Stop(); 23 | 24 | protected abstract void OnErrorOccurred(string message); 25 | protected abstract void OnMessageOccurred(string message); 26 | } 27 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Configurers/DefaultConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.Configuration.Interfaces; 3 | using Mantle.Extensions; 4 | 5 | namespace Mantle.Configuration.Configurers 6 | { 7 | public class DefaultConfigurer : BaseConfigurer 8 | { 9 | private readonly IConfigurationProvider configurationProvider; 10 | 11 | public DefaultConfigurer(IConfigurationProvider configurationProvider) 12 | { 13 | configurationProvider.Require(nameof(configurationProvider)); 14 | this.configurationProvider = configurationProvider; 15 | } 16 | 17 | public override IEnumerable GetConfigurationSettings() 18 | { 19 | return configurationProvider.GetConfigurationSettings(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Configurers/AdHocConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Mantle.Extensions; 4 | 5 | namespace Mantle.Configuration.Configurers 6 | { 7 | public class AdHocConfigurer : BaseConfigurer 8 | { 9 | private readonly Dictionary configurationDictionary; 10 | 11 | public AdHocConfigurer(object configurationObject) 12 | { 13 | configurationObject.Require(nameof(configurationObject)); 14 | configurationDictionary = configurationObject.ToDictionary(); 15 | } 16 | 17 | public override IEnumerable GetConfigurationSettings() 18 | { 19 | return configurationDictionary.Select(cs => new ConfigurationSetting(cs.Key, cs.Value.ToString())); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Constraints/FunctionalSubscriptionConstraint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Messaging.Interfaces; 4 | 5 | namespace Mantle.Messaging.Constraints 6 | { 7 | public class FunctionalSubscriptionConstraint : ISubscriptionConstraint 8 | where T : class 9 | { 10 | private readonly Func, bool> condition; 11 | 12 | public FunctionalSubscriptionConstraint(Func, bool> condition) 13 | { 14 | condition.Require(nameof(condition)); 15 | this.condition = condition; 16 | } 17 | 18 | public bool Match(IMessageContext messageContext) 19 | { 20 | messageContext.Require(nameof(messageContext)); 21 | return condition(messageContext); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Aws/IdentityModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.Identity; 3 | using Mantle.Identity.Aws.Repositories; 4 | using Mantle.Identity.Interfaces; 5 | using Mantle.Ninject; 6 | using Ninject.Modules; 7 | 8 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Aws 9 | { 10 | public class IdentityModule : NinjectModule 11 | { 12 | public override void Load() 13 | { 14 | Bind>() 15 | .To() 16 | .InTransientScope() 17 | .ConfigureUsing(new ConnectionStringsConfigurer(), 18 | new AppSettingsConfigurer()); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusQueueSubscriberEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.WindowsServiceBus; 3 | 4 | namespace Mantle.Messaging.WindowsServiceBus 5 | { 6 | public class WindowsServiceBusQueueSubscriberEndpointManager : WindowsServiceBusQueueEndpointManager, 7 | ISubscriberEndpointManager 8 | { 9 | public WindowsServiceBusQueueSubscriberEndpointManager(WindowsServiceBusQueueSubscriberEndpoint endpoint, 10 | IWindowsServiceBusConfiguration sbConfiguration) 11 | : base(endpoint, sbConfiguration) 12 | { 13 | } 14 | 15 | public void Create() 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting.Azure/AzureCloudServiceRoleWorkerHost.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using Mantle.Extensions; 3 | using Mantle.Hosting.Hosts; 4 | using Mantle.Hosting.Interfaces; 5 | 6 | namespace Mantle.Hosting.Azure 7 | { 8 | public class AzureCloudServiceRoleWorkerHost : BaseWorkerHost 9 | { 10 | public AzureCloudServiceRoleWorkerHost(IWorker worker) 11 | : base(worker) 12 | { 13 | } 14 | 15 | protected override void OnErrorOccurred(string message) 16 | { 17 | message.Require(nameof(message)); 18 | 19 | Trace.TraceError(message); 20 | } 21 | 22 | protected override void OnMessageOccurred(string message) 23 | { 24 | message.Require(nameof(message)); 25 | 26 | Trace.TraceInformation(message); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Azure/IdentityModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.Identity; 3 | using Mantle.Identity.Azure.Repositories; 4 | using Mantle.Identity.Interfaces; 5 | using Mantle.Ninject; 6 | using Ninject.Modules; 7 | 8 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Azure 9 | { 10 | public class IdentityModule : NinjectModule 11 | { 12 | public override void Load() 13 | { 14 | Bind>() 15 | .To() 16 | .InTransientScope() 17 | .ConfigureUsing(new ConnectionStringsConfigurer(), 18 | new AppSettingsConfigurer()); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.DictionaryStorage/Entities/DictionaryStorageEntity.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Extensions; 2 | 3 | namespace Mantle.DictionaryStorage.Entities 4 | { 5 | public class DictionaryStorageEntity 6 | where T : class, new() 7 | { 8 | public DictionaryStorageEntity() 9 | { 10 | } 11 | 12 | public DictionaryStorageEntity(string entityId, string partitionId, T entity) 13 | { 14 | entityId.Require(nameof(entityId)); 15 | partitionId.Require(nameof(partitionId)); 16 | entity.Require(nameof(entity)); 17 | 18 | EntityId = entityId; 19 | PartitionId = partitionId; 20 | Entity = entity; 21 | } 22 | 23 | public string EntityId { get; set; } 24 | public string PartitionId { get; set; } 25 | 26 | public T Entity { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model Mantle.PhotoGallery.Web.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new {Model.ReturnUrl}, FormMethod.Post, new {@class = "form-horizontal", role = "form"})) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("rememberMe", Model.RememberMe) 12 |

Send verification code

13 |
14 |
15 |
16 | Select Two-Factor Authentication Provider: 17 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 18 | 19 |
20 |
21 | } 22 | 23 | @section Scripts { 24 | @Scripts.Render("~/bundles/jqueryval") 25 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Console.Hosting/ConsoleWorkerHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Hosting; 3 | 4 | namespace Mantle.Console.Hosting 5 | { 6 | public class ConsoleWorkerHost : BaseWorkerHost 7 | { 8 | public ConsoleWorkerHost(IDependencyResolver dependencyResolver) 9 | : base(dependencyResolver) 10 | { 11 | } 12 | 13 | protected override void OnErrorOccurred(string message) 14 | { 15 | System.Console.ForegroundColor = ConsoleColor.Red; 16 | System.Console.WriteLine(message); 17 | System.Console.WriteLine(); 18 | } 19 | 20 | protected override void OnMessageOccurred(string message) 21 | { 22 | System.Console.ForegroundColor = ConsoleColor.White; 23 | System.Console.WriteLine(message); 24 | System.Console.WriteLine(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging.Azure/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Configuration/Providers/AdHocConfigurationProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Mantle.Configuration.Interfaces; 4 | using Mantle.Extensions; 5 | 6 | namespace Mantle.Configuration.Providers 7 | { 8 | public class AdHocConfigurationProvider : IConfigurationProvider 9 | { 10 | private readonly Dictionary configurationDictionary; 11 | 12 | public AdHocConfigurationProvider(object configurationObject) 13 | { 14 | configurationObject.Require("configurationObject"); 15 | configurationDictionary = configurationObject.ToDictionary(); 16 | } 17 | 18 | public IEnumerable GetConfigurationSettings() 19 | { 20 | return configurationDictionary.Select(cs => new ConfigurationSetting(cs.Key, cs.Value.ToString())); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/SqsMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Mantle.Messaging.Aws 4 | { 5 | public class SqsMessage : Message, ICanBeCompleted 6 | { 7 | private readonly SqsSubscriberClient client; 8 | private readonly string receiptHandle; 9 | 10 | public SqsMessage(T payload, SqsSubscriberClient client, string receiptHandle) 11 | : base(payload) 12 | { 13 | if (client == null) 14 | throw new ArgumentNullException("client"); 15 | 16 | if (String.IsNullOrEmpty(receiptHandle)) 17 | throw new ArgumentException("Receipt handle is required.", "receiptHandle"); 18 | 19 | this.client = client; 20 | this.receiptHandle = receiptHandle; 21 | } 22 | 23 | public void Complete() 24 | { 25 | client.Delete(receiptHandle); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.FaultTolerance/TrialException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Mantle.FaultTolerance 5 | { 6 | [Serializable] 7 | public class TrialException : Exception 8 | { 9 | public TrialException(TrialResult trialResult) 10 | : this(trialResult, $"The requested operation failed [{trialResult.TotalAttempts}] times. " + 11 | "See [TrialResult] for more details.") 12 | { 13 | } 14 | 15 | public TrialException(TrialResult trialResult, string message) : base(message) 16 | { 17 | TrialResult = trialResult; 18 | } 19 | 20 | protected TrialException( 21 | SerializationInfo info, 22 | StreamingContext context) : base(info, context) 23 | { 24 | } 25 | 26 | public TrialResult TrialResult { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscriptionConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mantle.Interfaces; 3 | 4 | namespace Mantle.Messaging.Interfaces 5 | { 6 | public interface ISubscriptionConfiguration 7 | { 8 | bool AutoAbandon { get; set; } 9 | bool AutoComplete { get; set; } 10 | bool AutoDeadLetter { get; set; } 11 | int? DeadLetterDeliveryLimit { get; set; } 12 | } 13 | 14 | public interface ISubscriptionConfiguration : ISubscriptionConfiguration 15 | where T : class 16 | { 17 | IList> Filters { get; set; } 18 | IList> Constraints { get; set; } 19 | IDeadLetterStrategy DeadLetterStrategy { get; set; } 20 | ISerializer Serializer { get; set; } 21 | ISubscriber Subscriber { get; set; } 22 | 23 | void Validate(); 24 | } 25 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/MantleUserClaim.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | 4 | namespace Mantle.Identity 5 | { 6 | public class MantleUserClaim 7 | { 8 | public MantleUserClaim() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | } 12 | 13 | public MantleUserClaim(string userId, string claimType, string claimValue) 14 | { 15 | userId.Require(nameof(userId)); 16 | claimType.Require(nameof(claimType)); 17 | claimValue.Require(nameof(claimValue)); 18 | 19 | UserId = userId; 20 | ClaimType = claimType; 21 | ClaimValue = claimValue; 22 | } 23 | 24 | public virtual string Id { get; set; } 25 | public virtual string UserId { get; set; } 26 | public virtual string ClaimType { get; set; } 27 | public virtual string ClaimValue { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Default/MessagingModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.Messaging.Configuration; 3 | using Mantle.Messaging.Interfaces; 4 | using Mantle.Messaging.Strategies; 5 | using Mantle.Ninject; 6 | using Ninject.Modules; 7 | 8 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Default 9 | { 10 | public class MessagingModule : NinjectModule 11 | { 12 | public override void Load() 13 | { 14 | Bind() 15 | .To() 16 | .InSingletonScope() 17 | .ConfigureUsing(new AppSettingsConfigurer()); 18 | 19 | Bind(typeof(IDeadLetterStrategy<>)) 20 | .To(typeof(DefaultDeadLetterStrategy<>)) 21 | .InTransientScope(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/PropertyMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace Mantle 6 | { 7 | public class PropertyMetadata 8 | { 9 | public PropertyMetadata() 10 | { 11 | Attributes = new List(); 12 | } 13 | 14 | public PropertyMetadata(PropertyInfo propertyInfo) 15 | : this() 16 | { 17 | if (propertyInfo == null) 18 | throw new ArgumentNullException(nameof(propertyInfo)); 19 | 20 | Load(propertyInfo); 21 | } 22 | 23 | public List Attributes { get; set; } 24 | public PropertyInfo PropertyInfo { get; set; } 25 | 26 | private void Load(PropertyInfo propertyInfo) 27 | { 28 | PropertyInfo = propertyInfo; 29 | Attributes.AddRange(propertyInfo.GetCustomAttributes()); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Messaging/Interfaces/ISubscriptionConfigurer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Interfaces; 3 | 4 | namespace Mantle.Messaging.Interfaces 5 | { 6 | public interface ISubscriptionConfigurer 7 | where T : class 8 | { 9 | void AddConstraint(ISubscriptionConstraint constraint); 10 | void AddConstraint(Func, bool> condition); 11 | void AddFilter(ISubscriptionFilter filter); 12 | void DoAutoAbandon(); 13 | void DoAutoComplete(); 14 | void DoAutoDeadLetter(); 15 | void DoNotAutoAbandon(); 16 | void DoNotAutoComplete(); 17 | void DoNotAutoDeadLetter(); 18 | void SetDeadLetterDeliveryLimit(int deliveryLimit); 19 | void SetSubscriber(ISubscriber subscriber); 20 | void UseDeadLetterStrategy(IDeadLetterStrategy deadLetterStrategy); 21 | void UseSerializer(ISerializer serializer); 22 | } 23 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Mantle/Profiles/Aws/DictionaryStorageModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.DictionaryStorage.Aws.Clients; 3 | using Mantle.DictionaryStorage.Interfaces; 4 | using Mantle.Ninject; 5 | using Mantle.PhotoGallery.PhotoProcessing.Models; 6 | using Ninject.Modules; 7 | 8 | namespace Mantle.PhotoGallery.Web.Mantle.Profiles.Aws 9 | { 10 | public class DictionaryStorageModule : NinjectModule 11 | { 12 | public override void Load() 13 | { 14 | Bind>() 15 | .To>() 16 | .InTransientScope() 17 | .ConfigureUsing(new AppSettingsConfigurer>(), 18 | new ConnectionStringsConfigurer>()); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/MantleContext.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Mantle.Extensions; 4 | using Mantle.Interfaces; 5 | 6 | namespace Mantle 7 | { 8 | public class MantleContext 9 | { 10 | public MantleContext() 11 | { 12 | } 13 | 14 | public MantleContext(IDependencyResolver dependencyResolver, 15 | IEnumerable loadedProfiles) 16 | { 17 | dependencyResolver.Require(nameof(dependencyResolver)); 18 | loadedProfiles.Require(nameof(loadedProfiles)); 19 | 20 | DependencyResolver = dependencyResolver; 21 | LoadedProfiles = loadedProfiles.ToList(); 22 | } 23 | 24 | public static MantleContext Current { get; set; } 25 | 26 | public IDependencyResolver DependencyResolver { get; set; } 27 | public IEnumerable LoadedProfiles { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.PhotoProcessing/Commands/CopyPhoto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Interfaces; 4 | using Mantle.PhotoGallery.PhotoProcessing.Models; 5 | 6 | namespace Mantle.PhotoGallery.PhotoProcessing.Commands 7 | { 8 | public class CopyPhoto : ICommand 9 | { 10 | public CopyPhoto() 11 | { 12 | Id = Guid.NewGuid().ToString(); 13 | } 14 | 15 | public CopyPhoto(string photoSource, PhotoMetadata photoMetadata) 16 | : this() 17 | { 18 | photoSource.Require(nameof(photoSource)); 19 | photoMetadata.Require(nameof(photoMetadata)); 20 | 21 | PhotoSource = photoSource; 22 | PhotoMetadata = photoMetadata; 23 | } 24 | 25 | public string PhotoSource { get; set; } 26 | public PhotoMetadata PhotoMetadata { get; set; } 27 | 28 | public string Id { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Default/ServiceModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.Ninject; 3 | using Mantle.PhotoGallery.PhotoProcessing.Interfaces; 4 | using Mantle.PhotoGallery.PhotoProcessing.Services; 5 | using Ninject.Modules; 6 | 7 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Default 8 | { 9 | public class ServiceModule : NinjectModule 10 | { 11 | public override void Load() 12 | { 13 | Bind() 14 | .To() 15 | .InTransientScope() 16 | .ConfigureUsing(new AppSettingsConfigurer()); 17 | 18 | Bind() 19 | .To() 20 | .InTransientScope() 21 | .ConfigureUsing(new AppSettingsConfigurer()); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/SqsPublisherEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Aws; 3 | 4 | namespace Mantle.Messaging.Aws 5 | { 6 | public class SqsPublisherEndpoint : SqsEndpoint, IPublisherEndpoint 7 | { 8 | private readonly IAwsConfiguration awsConfiguration; 9 | 10 | public SqsPublisherEndpoint(IAwsConfiguration awsConfiguration) 11 | { 12 | if (awsConfiguration == null) 13 | throw new ArgumentNullException("awsConfiguration"); 14 | 15 | awsConfiguration.Validate(); 16 | 17 | this.awsConfiguration = awsConfiguration; 18 | } 19 | 20 | public IPublisherClient GetClient() 21 | { 22 | return new SqsPublisherClient(this, awsConfiguration); 23 | } 24 | 25 | public IPublisherEndpointManager GetManager() 26 | { 27 | return new SqsPublisherEndpointManager(this, awsConfiguration); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/SqsSubscriberEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Aws; 3 | 4 | namespace Mantle.Messaging.Aws 5 | { 6 | public class SqsSubscriberEndpoint : SqsEndpoint, ISubscriberEndpoint 7 | { 8 | private readonly IAwsConfiguration awsConfiguration; 9 | 10 | public SqsSubscriberEndpoint(IAwsConfiguration awsConfiguration) 11 | { 12 | if (awsConfiguration == null) 13 | throw new ArgumentNullException("awsConfiguration"); 14 | 15 | awsConfiguration.Validate(); 16 | 17 | this.awsConfiguration = awsConfiguration; 18 | } 19 | 20 | public ISubscriberClient GetClient() 21 | { 22 | return new SqsSubscriberClient(this, awsConfiguration); 23 | } 24 | 25 | public ISubscriberEndpointManager GetManager() 26 | { 27 | return new SqsSubscriberEndpointManager(this, awsConfiguration); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Aws/DictionaryStorageModule.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Configuration.Configurers; 2 | using Mantle.DictionaryStorage.Aws.Clients; 3 | using Mantle.DictionaryStorage.Interfaces; 4 | using Mantle.Ninject; 5 | using Mantle.PhotoGallery.PhotoProcessing.Models; 6 | using Ninject.Modules; 7 | 8 | namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Aws 9 | { 10 | public class DictionaryStorageModule : NinjectModule 11 | { 12 | public override void Load() 13 | { 14 | Bind>() 15 | .To>() 16 | .InTransientScope() 17 | .ConfigureUsing(new AppSettingsConfigurer>(), 18 | new ConnectionStringsConfigurer>()); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage.Dictionary/IDictionaryStorageClient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Mantle.Storage.Dictionary 4 | { 5 | public interface IDictionaryStorageClient 6 | { 7 | IEnumerable LoadEntities(string dictionaryId); 8 | 9 | T LoadEntity(string entityId, string dictionaryId); 10 | T LoadEntity(string entityId); 11 | 12 | void Insert(T entity) where T : DictionaryEntity; 13 | void Insert(T entity, string entityId); 14 | void Insert(T entity, string entityId, string dictionaryId); 15 | 16 | void Update(T entity) where T : DictionaryEntity; 17 | void Update(T entity, string entityId); 18 | void Update(T entity, string entityId, string dictionaryId); 19 | 20 | void Delete(T entity) where T : DictionaryEntity; 21 | void Delete(string entityId); 22 | void Delete(string entityId, string dictionaryId); 23 | } 24 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Identity/MantleUserLogin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | 4 | namespace Mantle.Identity 5 | { 6 | public class MantleUserLogin 7 | { 8 | public MantleUserLogin() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | } 12 | 13 | public MantleUserLogin(string userId, string loginProvider, string providerKey) 14 | : this() 15 | { 16 | userId.Require(nameof(userId)); 17 | loginProvider.Require(nameof(loginProvider)); 18 | providerKey.Require(nameof(providerKey)); 19 | 20 | UserId = userId; 21 | LoginProvider = loginProvider; 22 | ProviderKey = providerKey; 23 | } 24 | 25 | public virtual string Id { get; set; } 26 | public virtual string UserId { get; set; } 27 | public virtual string LoginProvider { get; set; } 28 | public virtual string ProviderKey { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/Providers/DataContractTypeTokenProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Runtime.Serialization; 3 | using Mantle.Interfaces; 4 | 5 | namespace Mantle.Providers 6 | { 7 | public class DataContractTypeTokenProvider : ITypeTokenProvider 8 | { 9 | public string GetTypeToken() 10 | { 11 | var dataContractAttribute = 12 | (typeof(T)).GetCustomAttributes(typeof(DataContractAttribute), false) 13 | .OfType() 14 | .FirstOrDefault(); 15 | 16 | if (dataContractAttribute == null) 17 | return null; 18 | 19 | var dataContractName = (dataContractAttribute.Name ?? (typeof(T).Name)); 20 | 21 | if (string.IsNullOrEmpty(dataContractAttribute.Namespace)) 22 | return dataContractName; 23 | 24 | return $"{dataContractAttribute.Namespace}|{dataContractName}"; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new {id = "logoutForm", @class = "navbar-right"})) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 16 | } 17 | } 18 | else 19 | { 20 | 24 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusQueuePublisherClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | using Microsoft.ServiceBus.Messaging; 4 | 5 | namespace Mantle.Messaging.Azure 6 | { 7 | public class AzureServiceBusQueuePublisherClient : AzureServiceBusQueueClient, IPublisherClient 8 | { 9 | public AzureServiceBusQueuePublisherClient(AzureServiceBusQueuePublisherEndpoint endpoint, 10 | IAzureServiceBusConfiguration sbConfiguration) 11 | : base(endpoint, sbConfiguration) 12 | { 13 | } 14 | 15 | public void Publish(T message) 16 | { 17 | try 18 | { 19 | QueueClient.Send(new BrokeredMessage(message)); 20 | } 21 | catch (Exception ex) 22 | { 23 | throw new MessagingException("Unable to send message. See inner exception for more details.", ex); 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Aws/SqsClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Amazon; 3 | using Amazon.SQS; 4 | using Mantle.Aws; 5 | 6 | namespace Mantle.Messaging.Aws 7 | { 8 | public abstract class SqsClient 9 | { 10 | protected readonly IAmazonSQS Client; 11 | 12 | protected SqsClient(IAwsConfiguration awsConfiguration) 13 | { 14 | if (awsConfiguration == null) 15 | throw new ArgumentNullException("awsConfiguration"); 16 | 17 | awsConfiguration.Validate(); 18 | 19 | try 20 | { 21 | Client = AWSClientFactory.CreateAmazonSQSClient(awsConfiguration.AccessKey, awsConfiguration.SecretKey); 22 | } 23 | catch (Exception ex) 24 | { 25 | throw new MessagingException( 26 | "An error occurred while attempting to access SQS. See inner exception for more details.", 27 | ex); 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle/TypeMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Mantle.Interfaces; 5 | 6 | namespace Mantle 7 | { 8 | public class TypeMetadata : TypeMetadata, ITypeMetadata 9 | { 10 | public TypeMetadata() 11 | : base(typeof(T)) 12 | { 13 | } 14 | } 15 | 16 | public class TypeMetadata : ITypeMetadata 17 | { 18 | public TypeMetadata(Type type) 19 | { 20 | if (type == null) 21 | throw new ArgumentNullException(nameof(type)); 22 | 23 | Type = type; 24 | Attributes = type.GetCustomAttributes(false).OfType().ToList(); 25 | Properties = type.GetProperties().Select(p => new PropertyMetadata(p)).ToList(); 26 | } 27 | 28 | public IList Attributes { get; set; } 29 | public IList Properties { get; set; } 30 | public Type Type { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/CompositePublisherClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Messaging 5 | { 6 | public class CompositePublisherClient : IPublisherClient 7 | { 8 | private readonly List publisherClients; 9 | 10 | public CompositePublisherClient(CompositePublisherEndpoint endpoint) 11 | { 12 | if (endpoint == null) 13 | throw new ArgumentNullException("endpoint"); 14 | 15 | endpoint.Validate(); 16 | 17 | publisherClients = new List(); 18 | 19 | foreach (string endpointKey in endpoint.ChildEndpoints.Keys) 20 | publisherClients.Add(endpoint.ChildEndpoints[endpointKey].GetClient()); 21 | } 22 | 23 | public void Publish(T message) 24 | { 25 | foreach (IPublisherClient publisherClient in publisherClients) 26 | publisherClient.Publish(message); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureStorageQueuePublisherClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | using Microsoft.WindowsAzure.Storage.Queue; 4 | 5 | namespace Mantle.Messaging.Azure 6 | { 7 | public class AzureStorageQueuePublisherClient : AzureStorageQueueClient, IPublisherClient 8 | { 9 | public AzureStorageQueuePublisherClient(AzureStorageQueuePublisherEndpoint endpoint, 10 | IAzureStorageConfiguration storageConfiguration) 11 | : base(endpoint, storageConfiguration) 12 | { 13 | } 14 | 15 | public void Publish(T message) 16 | { 17 | try 18 | { 19 | CloudQueue.AddMessage(new CloudQueueMessage(message.SerializeToBytes())); 20 | } 21 | catch (Exception ex) 22 | { 23 | throw new MessagingException("Unable to send message. See inner exception for more details.", ex); 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Console/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Reflection; 3 | using Mantle.Hosting.Console; 4 | using Mantle.Hosting.Interfaces; 5 | using Mantle.Ninject; 6 | using Mantle.Providers; 7 | using Ninject; 8 | 9 | namespace Mantle.PhotoGallery.Processor.Console 10 | { 11 | internal class Program 12 | { 13 | private static void Main(string[] args) 14 | { 15 | var assembly = Assembly.GetExecutingAssembly(); 16 | var profiles = ((args?.Length > 0) ? args : (new AppSettingProfileProvider().GetProfiles())); 17 | var kernel = new StandardKernel(assembly.LoadProfileNinjectModules(profiles).ToArray()); 18 | var dependencyResolver = new NinjectDependencyResolver(kernel); 19 | 20 | MantleContext.Current = new MantleContext(dependencyResolver, profiles); 21 | 22 | var workerHost = new ConsoleWorkerHost(dependencyResolver.Get()); 23 | 24 | workerHost.Start(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Processor.Worker/Workers/ProcessorWorker.cs: -------------------------------------------------------------------------------- 1 | using Mantle.Hosting.Messaging.Workers; 2 | using Mantle.Identity.Commands; 3 | using Mantle.Interfaces; 4 | using Mantle.Messaging.Interfaces; 5 | using Mantle.Messaging.Messages; 6 | using Mantle.PhotoGallery.PhotoProcessing.Commands; 7 | using Mantle.PhotoGallery.Processor.Worker.Constants; 8 | 9 | namespace Mantle.PhotoGallery.Processor.Worker.Workers 10 | { 11 | public class ProcessorWorker : SubscriptionWorker 12 | { 13 | public ProcessorWorker(IDependencyResolver dependencyResolver) : base(dependencyResolver) 14 | { 15 | AddSubscriberChannel( 16 | dependencyResolver.Get>( 17 | ChannelNames.ProcessorChannel)); 18 | 19 | SubscribeTo(); 20 | SubscribeTo(); 21 | 22 | SubscribeTo(); 23 | SubscribeTo(); 24 | SubscribeTo(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model Mantle.PhotoGallery.Web.Models.AddPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new {@class = "form-horizontal", role = "form"})) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Add a phone number

12 |
13 | @Html.ValidationSummary("", new {@class = "text-danger"}) 14 |
15 | @Html.LabelFor(m => m.Number, new {@class = "col-md-2 control-label"}) 16 |
17 | @Html.TextBoxFor(m => m.Number, new {@class = "form-control"}) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/Models/Mapping/PropertyMap.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Data.Entity.ModelConfiguration; 3 | 4 | namespace Mantle.Configuration.Source.SqlServer.Models.Mapping 5 | { 6 | public class PropertyMap : EntityTypeConfiguration 7 | { 8 | public PropertyMap() 9 | { 10 | // Primary Key 11 | this.HasKey(t => t.PropertyId); 12 | 13 | // Properties 14 | this.Property(t => t.Name) 15 | .IsRequired() 16 | .HasMaxLength(50); 17 | 18 | this.Property(t => t.Description) 19 | .HasMaxLength(50); 20 | 21 | // Table & Column Mappings 22 | this.ToTable("Property"); 23 | this.Property(t => t.PropertyId).HasColumnName("PropertyId"); 24 | this.Property(t => t.Name).HasColumnName("Name"); 25 | this.Property(t => t.Description).HasColumnName("Description"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Msmq/MsmqClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Messaging; 3 | 4 | namespace Mantle.Messaging.Msmq 5 | { 6 | public abstract class MsmqClient 7 | { 8 | protected MsmqClient(MsmqEndpoint endpoint) 9 | { 10 | if (endpoint == null) 11 | throw new ArgumentNullException("endpoint"); 12 | 13 | endpoint.Validate(); 14 | 15 | try 16 | { 17 | if (MessageQueue.Exists(endpoint.QueuePath) == false) 18 | MessageQueue.Create(endpoint.QueuePath); 19 | 20 | Queue = new MessageQueue(endpoint.QueuePath); 21 | } 22 | catch (Exception ex) 23 | { 24 | throw new MessagingException( 25 | "An error occurred while attempting to access the specified queue. See inner exception for more details.", 26 | ex); 27 | } 28 | } 29 | 30 | protected MessageQueue Queue { get; private set; } 31 | } 32 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model Mantle.PhotoGallery.Web.Models.ForgotPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Forgot your password?"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new {@class = "form-horizontal", role = "form"})) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Enter your email.

12 |
13 | @Html.ValidationSummary("", new {@class = "text-danger"}) 14 |
15 | @Html.LabelFor(m => m.Email, new {@class = "col-md-2 control-label"}) 16 |
17 | @Html.TextBoxFor(m => m.Email, new {@class = "form-control"}) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusQueuePublisherClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Mantle.WindowsServiceBus; 4 | 5 | using Microsoft.ServiceBus.Messaging; 6 | 7 | namespace Mantle.Messaging.WindowsServiceBus 8 | { 9 | public class WindowsServiceBusQueuePublisherClient : WindowsServiceBusQueueClient, IPublisherClient 10 | { 11 | public WindowsServiceBusQueuePublisherClient(WindowsServiceBusQueuePublisherEndpoint endpoint, 12 | IWindowsServiceBusConfiguration sbConfiguration) 13 | : base(endpoint, sbConfiguration) 14 | { 15 | } 16 | 17 | public void Publish(T message) 18 | { 19 | try 20 | { 21 | QueueClient.Send(new BrokeredMessage(message)); 22 | } 23 | catch (Exception ex) 24 | { 25 | throw new MessagingException("Unable to send message. See inner exception for more details.", ex); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting.Console/ConsoleWorkerHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Hosting.Hosts; 4 | using Mantle.Hosting.Interfaces; 5 | 6 | namespace Mantle.Hosting.Console 7 | { 8 | public class ConsoleWorkerHost : BaseWorkerHost 9 | { 10 | public ConsoleWorkerHost(IWorker worker) 11 | : base(worker) 12 | { 13 | } 14 | 15 | protected override void OnErrorOccurred(string message) 16 | { 17 | message.Require(nameof(message)); 18 | 19 | System.Console.ForegroundColor = ConsoleColor.Red; 20 | System.Console.Error.WriteLine(message); 21 | System.Console.Error.WriteLine(); 22 | } 23 | 24 | protected override void OnMessageOccurred(string message) 25 | { 26 | message.Require(nameof(message)); 27 | 28 | System.Console.ForegroundColor = ConsoleColor.White; 29 | System.Console.WriteLine(message); 30 | System.Console.WriteLine(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | using Microsoft.ServiceBus; 4 | 5 | namespace Mantle.Messaging.Azure 6 | { 7 | public abstract class AzureServiceBusClient 8 | { 9 | protected readonly NamespaceManager NsManager; 10 | 11 | protected AzureServiceBusClient(IAzureServiceBusConfiguration sbConfiguration) 12 | { 13 | if (sbConfiguration == null) 14 | throw new ArgumentNullException("sbConfiguration"); 15 | 16 | sbConfiguration.Validate(); 17 | 18 | try 19 | { 20 | NsManager = NamespaceManager.CreateFromConnectionString(sbConfiguration.ConnectionString); 21 | } 22 | catch (Exception ex) 23 | { 24 | throw new MessagingException( 25 | "An error occurred while attempting to access the specified Azure service bus. See inner exception for more details.", 26 | ex); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusQueuePublisherEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | 4 | namespace Mantle.Messaging.Azure 5 | { 6 | public class AzureServiceBusQueuePublisherEndpoint : AzureServiceBusQueueEndpoint, IPublisherEndpoint 7 | { 8 | private readonly IAzureServiceBusConfiguration sbConfiguration; 9 | 10 | public AzureServiceBusQueuePublisherEndpoint(IAzureServiceBusConfiguration sbConfiguration) 11 | { 12 | if (sbConfiguration == null) 13 | throw new ArgumentNullException("sbConfiguration"); 14 | 15 | sbConfiguration.Validate(); 16 | 17 | this.sbConfiguration = sbConfiguration; 18 | } 19 | 20 | public IPublisherClient GetClient() 21 | { 22 | return new AzureServiceBusQueuePublisherClient(this, sbConfiguration); 23 | } 24 | 25 | public IPublisherEndpointManager GetManager() 26 | { 27 | return new AzureServiceBusQueuePublisherEndpointManager(this, sbConfiguration); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Hosting/HostingException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Mantle.Hosting 5 | { 6 | [Serializable] 7 | public class HostingException : Exception 8 | { 9 | // For guidelines regarding the creation of new exception types, see 10 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp 11 | // and 12 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp 13 | // 14 | 15 | public HostingException() 16 | { 17 | } 18 | 19 | public HostingException(string message) : base(message) 20 | { 21 | } 22 | 23 | public HostingException(string message, Exception inner) : base(message, inner) 24 | { 25 | } 26 | 27 | protected HostingException( 28 | // 29 | SerializationInfo info, 30 | StreamingContext context) : base(info, context) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | using Microsoft.ServiceBus; 4 | 5 | namespace Mantle.Messaging.Azure 6 | { 7 | public abstract class AzureServiceBusEndpointManager 8 | { 9 | protected readonly NamespaceManager NsManager; 10 | 11 | protected AzureServiceBusEndpointManager(IAzureServiceBusConfiguration sbConfiguration) 12 | { 13 | if (sbConfiguration == null) 14 | throw new ArgumentNullException("sbConfiguration"); 15 | 16 | sbConfiguration.Validate(); 17 | 18 | try 19 | { 20 | NsManager = NamespaceManager.CreateFromConnectionString(sbConfiguration.ConnectionString); 21 | } 22 | catch (Exception ex) 23 | { 24 | throw new MessagingException( 25 | "An error occurred while attempting to access the specified Azure service bus. See inner exception for more details.", 26 | ex); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusQueueSubscriberEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | 4 | namespace Mantle.Messaging.Azure 5 | { 6 | public class AzureServiceBusQueueSubscriberEndpoint : AzureServiceBusQueueEndpoint, ISubscriberEndpoint 7 | { 8 | private readonly IAzureServiceBusConfiguration sbConfiguration; 9 | 10 | public AzureServiceBusQueueSubscriberEndpoint(IAzureServiceBusConfiguration sbConfiguration) 11 | { 12 | if (sbConfiguration == null) 13 | throw new ArgumentNullException("sbConfiguration"); 14 | 15 | sbConfiguration.Validate(); 16 | 17 | this.sbConfiguration = sbConfiguration; 18 | } 19 | 20 | public ISubscriberClient GetClient() 21 | { 22 | return new AzureServiceBusQueueSubscriberClient(this, sbConfiguration); 23 | } 24 | 25 | public ISubscriberEndpointManager GetManager() 26 | { 27 | return new AzureServiceBusQueueSubscriberEndpointManager(this, sbConfiguration); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/PublisherEndpointDirectory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Messaging 5 | { 6 | public class PublisherEndpointDirectory : Dictionary, IPublisherEndpointDirectory 7 | { 8 | public PublisherEndpointDirectory(IPublisherEndpoint[] publisherEndpoints) 9 | { 10 | Load(publisherEndpoints); 11 | } 12 | 13 | private void Load(IPublisherEndpoint[] publisherEndpoints) 14 | { 15 | foreach (IPublisherEndpoint publisherEndpoint in publisherEndpoints) 16 | { 17 | if (ContainsKey(publisherEndpoint.Name)) 18 | throw new MessagingException( 19 | String.Format("This directory already contains a publisher endpoint named [{0}].", 20 | publisherEndpoint.Name)); 21 | 22 | publisherEndpoint.Validate(); 23 | 24 | Add(publisherEndpoint.Name, publisherEndpoint); 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage/StorageException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Mantle.Storage 5 | { 6 | [Serializable] 7 | public class StorageException : Exception 8 | { 9 | // 10 | // For guidelines regarding the creation of new exception types, see 11 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp 12 | // and 13 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp 14 | // 15 | 16 | public StorageException() 17 | { 18 | } 19 | 20 | public StorageException(string message) : base(message) 21 | { 22 | } 23 | 24 | public StorageException(string message, Exception inner) : base(message, inner) 25 | { 26 | } 27 | 28 | protected StorageException( 29 | SerializationInfo info, 30 | StreamingContext context) : base(info, context) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging/MessagingException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Mantle.Messaging 5 | { 6 | [Serializable] 7 | public class MessagingException : Exception 8 | { 9 | // 10 | // For guidelines regarding the creation of new exception types, see 11 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp 12 | // and 13 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp 14 | // 15 | 16 | public MessagingException() 17 | { 18 | } 19 | 20 | public MessagingException(string message) : base(message) 21 | { 22 | } 23 | 24 | public MessagingException(string message, Exception inner) : base(message, inner) 25 | { 26 | } 27 | 28 | protected MessagingException( 29 | SerializationInfo info, 30 | StreamingContext context) : base(info, context) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Hosting/Workers/BaseWorker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Extensions; 3 | using Mantle.Hosting.Interfaces; 4 | using static System.String; 5 | 6 | namespace Mantle.Hosting.Workers 7 | { 8 | public abstract class BaseWorker : IWorker 9 | { 10 | public event Action ErrorOccurred; 11 | public event Action MessageOccurred; 12 | 13 | public abstract void Start(); 14 | public abstract void Stop(); 15 | 16 | protected virtual void OnErrorOccurred(string message, params object[] parameters) 17 | { 18 | message.Require(nameof(message)); 19 | parameters.Require(nameof(parameters)); 20 | 21 | ErrorOccurred.RaiseSafely(Format(message, parameters)); 22 | } 23 | 24 | protected virtual void OnMessageOccurred(string message, params object[] parameters) 25 | { 26 | message.Require(nameof(message)); 27 | parameters.Require(nameof(parameters)); 28 | 29 | MessageOccurred.RaiseSafely(Format(message, parameters)); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.Aws/AwsRegionEndpoints.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Amazon; 3 | using Mantle.Aws.Interfaces; 4 | using Mantle.Extensions; 5 | using Mantle.FaultTolerance.Interfaces; 6 | 7 | namespace Mantle.Aws 8 | { 9 | public class AwsRegionEndpoints : IAwsRegionEndpoints 10 | { 11 | private readonly ITransientFaultStrategy transientFaultStrategy; 12 | 13 | public AwsRegionEndpoints(ITransientFaultStrategy transientFaultStrategy) 14 | { 15 | this.transientFaultStrategy = transientFaultStrategy; 16 | } 17 | 18 | public RegionEndpoint GetRegionEndpointByName(string regionName) 19 | { 20 | regionName.Require(nameof(regionName)); 21 | 22 | regionName = regionName.ToLower(); 23 | 24 | var allRegions = transientFaultStrategy.Try(() => RegionEndpoint.EnumerableAllRegions.ToList()); 25 | 26 | return allRegions.SingleOrDefault(re => (re.DisplayName.ToLower() == regionName) || 27 | (re.SystemName.ToLower() == regionName)); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.WindowsServiceBus; 3 | 4 | using Microsoft.ServiceBus; 5 | 6 | namespace Mantle.Messaging.WindowsServiceBus 7 | { 8 | public abstract class WindowsServiceBusClient 9 | { 10 | protected readonly NamespaceManager NsManager; 11 | 12 | protected WindowsServiceBusClient(IWindowsServiceBusConfiguration sbConfiguration) 13 | { 14 | if (sbConfiguration == null) 15 | throw new ArgumentNullException("sbConfiguration"); 16 | 17 | sbConfiguration.Validate(); 18 | 19 | try 20 | { 21 | NsManager = NamespaceManager.CreateFromConnectionString(sbConfiguration.ConnectionString); 22 | } 23 | catch (Exception ex) 24 | { 25 | throw new MessagingException( 26 | "An error occurred while attempting to access the specified Windows service bus. See inner exception for more details.", 27 | ex); 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Mantle Logo](http://imgur.com/KKqjEvi.png "Mantle Logo") 2 | # Mantle 3 | Mantle is a framework for building massively scalable .NET-based applications that can be hosted either on-premises or on a variety of public cloud providers including Microsoft Azure and Amazon AWS. 4 | 5 | Cloud fragmentation has become a serious concern for many organizations due to the fact that moving from one public cloud provider to another can often times be time consuming and expensive. Mantle attempts to address these concerns by providing a transparent application hosting platform that effectively separates domain-specific application logic from the underlying enterprise infrastructure. 6 | 7 | Mantle is distributed under an [MIT](http://opensource.org/licenses/MIT) license. 8 | 9 | ## Code of Conduct 10 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 11 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.Azure/AzureServiceBusQueueEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.Azure; 3 | using Microsoft.ServiceBus; 4 | 5 | namespace Mantle.Messaging.Azure 6 | { 7 | public abstract class AzureServiceBusQueueEndpointManager : AzureServiceBusEndpointManager, IEndpointManager 8 | { 9 | private readonly AzureServiceBusQueueEndpoint endpoint; 10 | 11 | protected AzureServiceBusQueueEndpointManager(AzureServiceBusQueueEndpoint endpoint, 12 | IAzureServiceBusConfiguration sbConfiguration) 13 | : base(sbConfiguration) 14 | { 15 | if (endpoint == null) 16 | throw new ArgumentNullException("endpoint"); 17 | 18 | endpoint.Validate(); 19 | 20 | this.endpoint = endpoint; 21 | } 22 | 23 | public bool DoesExist() 24 | { 25 | return NsManager.QueueExists(endpoint.QueueName); 26 | } 27 | 28 | public void Create() 29 | { 30 | NsManager.CreateQueue(endpoint.QueueName); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Storage/StorageClientDirectory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Mantle.Storage 5 | { 6 | public class StorageClientDirectory : Dictionary, IStorageClientDirectory 7 | { 8 | public StorageClientDirectory(IStorageClient[] storageClients) 9 | { 10 | if (storageClients == null) 11 | throw new ArgumentNullException("storageClients"); 12 | 13 | Load(storageClients); 14 | } 15 | 16 | private void Load(IStorageClient[] storageClients) 17 | { 18 | foreach (IStorageClient storageClient in storageClients) 19 | { 20 | if (ContainsKey(storageClient.Name)) 21 | throw new StorageException( 22 | String.Format("This directory already contains a storage client named [{0}].", 23 | storageClient.Name)); 24 | 25 | storageClient.Validate(); 26 | 27 | Add(storageClient.Name, storageClient); 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle/TypeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Runtime.Serialization; 4 | using System.Web; 5 | 6 | namespace Mantle 7 | { 8 | public static class TypeExtensions 9 | { 10 | public static string GetMessagingTypeString(this Type type) 11 | { 12 | string typeName = type.FullName; 13 | string typeNamespace = String.Empty; 14 | 15 | DataContractAttribute dcAttribute = 16 | type.GetCustomAttributes(typeof (DataContractAttribute), false) 17 | .OfType() 18 | .FirstOrDefault(); 19 | 20 | if (dcAttribute != null) 21 | { 22 | if (String.IsNullOrEmpty(dcAttribute.Name) == false) 23 | typeName = dcAttribute.Name; 24 | 25 | if (String.IsNullOrEmpty(dcAttribute.Namespace) == false) 26 | typeNamespace = dcAttribute.Namespace; 27 | } 28 | 29 | return HttpUtility.UrlEncode(String.Format("{0};{1}", typeName, typeNamespace)); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Configuration.Source.SqlServer/Models/Mapping/PropertyValueMap.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Data.Entity.ModelConfiguration; 3 | 4 | namespace Mantle.Configuration.Source.SqlServer.Models.Mapping 5 | { 6 | public class PropertyValueMap : EntityTypeConfiguration 7 | { 8 | public PropertyValueMap() 9 | { 10 | // Primary Key 11 | this.HasKey(t => t.ValueId); 12 | 13 | // Properties 14 | this.Property(t => t.Value) 15 | .IsRequired(); 16 | 17 | // Table & Column Mappings 18 | this.ToTable("PropertyValue"); 19 | this.Property(t => t.ValueId).HasColumnName("ValueId"); 20 | this.Property(t => t.PropertyId).HasColumnName("PropertyId"); 21 | this.Property(t => t.Value).HasColumnName("Value"); 22 | 23 | // Relationships 24 | this.HasRequired(t => t.Property) 25 | .WithMany(t => t.PropertyValues) 26 | .HasForeignKey(d => d.PropertyId); 27 | 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.WindowsServiceBus; 3 | using Microsoft.ServiceBus; 4 | 5 | namespace Mantle.Messaging.WindowsServiceBus 6 | { 7 | public abstract class WindowsServiceBusEndpointManager 8 | { 9 | protected readonly NamespaceManager NsManager; 10 | 11 | protected WindowsServiceBusEndpointManager(IWindowsServiceBusConfiguration sbConfiguration) 12 | { 13 | if (sbConfiguration == null) 14 | throw new ArgumentNullException("sbConfiguration"); 15 | 16 | sbConfiguration.Validate(); 17 | 18 | try 19 | { 20 | NsManager = NamespaceManager.CreateFromConnectionString(sbConfiguration.ConnectionString); 21 | } 22 | catch (Exception ex) 23 | { 24 | throw new MessagingException( 25 | "An error occurred while attempting to access the specified Windows service bus. See inner exception for more details.", 26 | ex); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusQueuePublisherEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.WindowsServiceBus; 3 | 4 | namespace Mantle.Messaging.WindowsServiceBus 5 | { 6 | public class WindowsServiceBusQueuePublisherEndpoint : WindowsServiceBusQueueEndpoint, IPublisherEndpoint 7 | { 8 | private readonly IWindowsServiceBusConfiguration sbConfiguration; 9 | 10 | public WindowsServiceBusQueuePublisherEndpoint(IWindowsServiceBusConfiguration sbConfiguration) 11 | { 12 | if (sbConfiguration == null) 13 | throw new ArgumentNullException("sbConfiguration"); 14 | 15 | sbConfiguration.Validate(); 16 | 17 | this.sbConfiguration = sbConfiguration; 18 | } 19 | 20 | public IPublisherClient GetClient() 21 | { 22 | return new WindowsServiceBusQueuePublisherClient(this, sbConfiguration); 23 | } 24 | 25 | public IPublisherEndpointManager GetManager() 26 | { 27 | return new WindowsServiceBusQueuePublisherEndpointManager(this, sbConfiguration); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusQueueEndpointManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.WindowsServiceBus; 3 | 4 | namespace Mantle.Messaging.WindowsServiceBus 5 | { 6 | public abstract class WindowsServiceBusQueueEndpointManager : WindowsServiceBusEndpointManager, IEndpointManager 7 | { 8 | private readonly WindowsServiceBusQueueEndpoint endpoint; 9 | 10 | protected WindowsServiceBusQueueEndpointManager(WindowsServiceBusQueueEndpoint endpoint, 11 | IWindowsServiceBusConfiguration sbConfiguration) 12 | : base(sbConfiguration) 13 | { 14 | if (endpoint == null) 15 | throw new ArgumentNullException("endpoint"); 16 | 17 | endpoint.Validate(); 18 | 19 | this.endpoint = endpoint; 20 | } 21 | 22 | public bool DoesExist() 23 | { 24 | return NsManager.QueueExists(endpoint.QueueName); 25 | } 26 | 27 | public void Create() 28 | { 29 | NsManager.CreateQueue(endpoint.QueueName); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /v0/Mantle/Mantle.Messaging.WindowsServiceBus/WindowsServiceBusQueueSubscriberEndpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mantle.WindowsServiceBus; 3 | 4 | namespace Mantle.Messaging.WindowsServiceBus 5 | { 6 | public class WindowsServiceBusQueueSubscriberEndpoint : WindowsServiceBusQueueEndpoint, ISubscriberEndpoint 7 | { 8 | private readonly IWindowsServiceBusConfiguration sbConfiguration; 9 | 10 | public WindowsServiceBusQueueSubscriberEndpoint(IWindowsServiceBusConfiguration sbConfiguration) 11 | { 12 | if (sbConfiguration == null) 13 | throw new ArgumentNullException("sbConfiguration"); 14 | 15 | sbConfiguration.Validate(); 16 | 17 | this.sbConfiguration = sbConfiguration; 18 | } 19 | 20 | public ISubscriberClient GetClient() 21 | { 22 | return new WindowsServiceBusQueueSubscriberClient(this, sbConfiguration); 23 | } 24 | 25 | public ISubscriberEndpointManager GetManager() 26 | { 27 | return new WindowsServiceBusQueueSubscriberEndpointManager(this, sbConfiguration); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /v1/Mantle/Mantle.PhotoGallery.Web/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model Mantle.PhotoGallery.Web.Models.VerifyPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new {@class = "form-horizontal", role = "form"})) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("phoneNumber", Model.PhoneNumber) 12 |

Enter verification code

13 |
@ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new {@class = "text-danger"}) 16 |
17 | @Html.LabelFor(m => m.Code, new {@class = "col-md-2 control-label"}) 18 |
19 | @Html.TextBoxFor(m => m.Code, new {@class = "form-control"}) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | } 28 | 29 | @section Scripts { 30 | @Scripts.Render("~/bundles/jqueryval") 31 | } --------------------------------------------------------------------------------