From 64adfab86956f5778adee601e0366e426d3b07a3 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Tue, 1 Feb 2022 21:28:27 +0800 Subject: [PATCH 1/2] bump to v6.0.3 --- src/Directory.Build.props | 2 +- tests/Directory.Build.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index aa0c59a..ff035a2 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ - 6.0.2 + 6.0.3 ServiceStack ServiceStack, Inc. © 2008-2022 ServiceStack, Inc diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 0462819..7eb7717 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -1,7 +1,7 @@ - 6.0.2 + 6.0.3 latest false From 41baeaaf9e4ac86f547e8dc43e2752811cf69843 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Wed, 16 Feb 2022 12:44:18 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 88 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 962d62a..c31c2a0 100644 --- a/README.md +++ b/README.md @@ -1,89 +1,5 @@ Follow [@ServiceStack](https://twitter.com/servicestack), [view the docs](https://docs.servicestack.net), use [StackOverflow](https://stackoverflow.com/questions/ask?tags=servicestack,servicestack.azure) or [Customer Forums](https://forums.servicestack.net/) for support. -## ServiceStack.Azure +# Read ServiceStack.Azure Docs at [docs.servicestack.net/azure](https://docs.servicestack.net/azure) -ServiceStack.Azure package provides support to Azure ServiceBus and Azure Blob Storage. All features are incapsulated in single ServiceStack.Azure package. To install package run from NuGet - - PM> Install-Package ServiceStack.Azure - -ServiceStack.Azure includes implementation of the following ServiceStack providers: - -- [ServiceBusMqServer](#ServiceBusMqServer) - [MQ Server](http://docs.servicestack.net/messaging) for invoking ServiceStack Services via Azure ServiceBus -- [AzureBlobVirtualFiles](#virtual-filesystem-backed-by-azure-blob-storage) - Virtual file system based on Azure Blob Storage -- [AzureAppendBlobVirtualFiles](#virtual-filesystem-backed-by-azure-blob-storage) - Virtual file system based on Azure Blob Storage for appending scenarios -- [AzureTableCacheClient](#caching-support-with-azure-table-storage) - Cache client over Azure Table Storage - - -### ServiceBusMqServer - -The code to configure and start an ServiceBus MQ Server is similar to other MQ Servers: - -```csharp -container.Register(c => new ServiceBusMqServer(ConnectionString)); - -var mqServer = container.Resolve(); -mqServer.RegisterHandler(ExecuteMessage); -mqServer.Start(); -``` - -Where ConnectionString is connection string to Service Bus, how to obtain it from Azure Portal you can find in [Get Started with Service Bus queues](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues) article - -When an MQ Server is registered, ServiceStack automatically publishes Requests accepted on the "One Way" pre-defined route to the registered MQ broker. The message is later picked up and executed by a Message Handler on a background Thread. - -## Virtual FileSystem backed by Azure Blob Storage - -You can use an Azure Blob Storage Container to serve website content with the **AzureBlobVirtualFiles**. - -```csharp -public class AppHost : AppHostBase -{ - public override void Configure(Container container) - { - //All Razor Views, Markdown Content, imgs, js, css, etc are served from an Azure Blob Storage container - - //Use connection string to Azure Storage Emulator. For real application you should use connection string - //to your Azure Storage account - var azureBlobConnectionString = "UseDevelopmentStorage=true"; - //Azure container which hold your files. If it does not exist it will be automatically created. - var containerName = "myazurecontainer"; - - VirtualFiles = new AzureBlobVirtualFiles(azureBlobConnectionString, containerName); - AddVirtualFileSources.Add(VirtualFiles); - } -} -``` - -In addition you can use **AzureAppendBlobVirtualFiles** in scenarios that require appending such as logging. - -```csharp -public class AppHost : AppHostBase -{ - public override void Configure(Container container) - { - Plugins.Add(new RequestLogsFeature - { - RequestLogger = new CsvRequestLogger( - files: new AzureAppendBlobVirtualFiles(AppSettings.Get("storageConnection"), "logfiles"), - requestLogsPattern: "requestlogs/{year}-{month}/{year}-{month}-{day}.csv", - errorLogsPattern: "requestlogs/{year}-{month}/{year}-{month}-{day}-errors.csv", - appendEvery: TimeSpan.FromSeconds(30)) - - }); - } -} -``` - -## Caching support with Azure Table Storage - -The AzureTableCacheClient implements [ICacheClientExteded](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Caching/ICacheClientExtended.cs) and [IRemoveByPattern](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Caching/IRemoveByPattern.cs) using Azure Table Storage. - -```csharp -public class AppHost : AppHostBase -{ - public override void Configure(Container container) - { - string cacheConnStr = "UseDevelopmentStorage=true;"; - container.Register(new AzureTableCacheClient(cacheConnStr)); - } -} -``` +### This repository [has moved](https://docs.servicestack.net/mono-repo) to [github.com/ServiceStack/ServiceStack/ServiceStack.Azure](https://github.com/ServiceStack/ServiceStack/tree/main/ServiceStack.Azure)