From a0d0171095a9122904790eefaad4fcd9817732d7 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 29 Jan 2022 19:27:03 +0100 Subject: Update README.md --- README.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ccf66af..92e96c7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Implements https://vippsas.github.io/vipps-ecom-api, more or less (see [IVippsEcommerceService.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/IVippsEcommerceService.cs)). +Implements https://vippsas.github.io/vipps-ecom-api , more or less (see [IVippsEcommerceService.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/IVippsEcommerceService.cs)). `dotnet add package IOL.VippsEcommerce` @@ -9,7 +9,7 @@ Implements https://vippsas.github.io/vipps-ecom-api, more or less (see [IVippsEc ## Configuration -Use Dependency Injection to add and configure the service to your liking, example: +Use Dependency Injection to add and configure the service with your values, minimal setup example: ```csharp services.AddVippsEcommerceService(o => { o.ApiUrl = ""; @@ -20,18 +20,6 @@ services.AddVippsEcommerceService(o => { ``` See [VippsConfiguration.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/Models/VippsConfiguration.cs) for available properties. -You can configure how to get values with the `ConfigurationMode` property, valid modes is specified in [VippsConfigurationMode.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/Models/VippsConfigurationMode.cs), example: -```csharp -services.AddVippsEcommerceService(o => { - o.ConfigurationMode = VippsConfigurationMode.ENVIRONMENT_THEN_OBJECT; -}); -``` - -With the above example, the service will look for configuration values in the current environment using names specified in [VippsConfigurationKeyNames.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/Models/VippsConfigurationKeyNames.cs), then in the configuration object. The environment variable name for a given property is also specified in it's XML-documentation. - - -> [Environment.GetEnvironmentVariable](https://docs.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?view=net-5.0) is used to retrieve environment variables, that means that user-secrets and anything else than process-spesific variables (`VARIABLE=value dotnet YourBinary.dll`) does not register on Unix systems. - ## Caching -- cgit v1.3