Merge pull request #567 from dotnet-architecture/xamarin-settings
Simplified SettingsService in Xamarin Client
This commit is contained in:
commit
94410b433f
@ -3,7 +3,7 @@
|
||||
The ARM template `sbusdeploy.json` and its parameter file (`sbusdeploy.parameters.json`) are used to deploy following resources:
|
||||
|
||||
1. One Service Bus namespace
|
||||
2. One Service Bus
|
||||
2. One Service Bus topic
|
||||
3. Subscriptions used by application
|
||||
|
||||
## Editing sbusdeploy.parameters.json file
|
||||
@ -17,17 +17,8 @@ be set is:
|
||||
|
||||
Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
|
||||
|
||||
i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
|
||||
i. e. if you are in windows, to deploy servicebus in a new resourcegroup located in westus, go to `deploy\az` folder and type:
|
||||
|
||||
```
|
||||
create-resources.cmd servicebus\sbusdeploy newResourceGroup -c westus
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
@ -24,7 +24,7 @@ Once parameter file is edited you can deploy it using [create-resources script](
|
||||
i. e. if you are in windows, to deploy a Storage account in a new resourcegroup located in westus, go to `deploy\az` folder and type:
|
||||
|
||||
```
|
||||
create-resources.cmd marketing\deploystorage newResourceGroup -c westus
|
||||
create-resources.cmd storage\marketing\deploystorage newResourceGroup -c westus
|
||||
```
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
sql.data:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
sql.data:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
# The Production docker-compose file has to have the external/real IPs or DNS names for the services
|
||||
# The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
basket.api:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
ci-build:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
basket.api:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
# ONLY NEEDED WHEN RUNNING WINDOWS CONTAINERS
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
|
||||
# The Production docker-compose file has to have the external/real IPs or DNS names for the services
|
||||
# The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,8 +3,8 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: externalcfg
|
||||
labels:
|
||||
app: eshop
|
||||
data:
|
||||
app: eshop
|
||||
data:
|
||||
# Basket.API entries
|
||||
basket__ConnectionString: REDIS CONNECTION STRING FOR BASKET
|
||||
# Catalog.API entries
|
||||
@ -12,23 +12,23 @@ data:
|
||||
# Identity.API entries
|
||||
IdentitySqlDb: Identity SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
||||
# Locations.API entries
|
||||
LocationsBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
|
||||
LocationsBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
||||
LocationsNoSqlDb: Locations MongoDb ConnectionString
|
||||
LocationsNoSqlDbName: Locations MongoDb database (LocationsDb)
|
||||
# Marketing.API entries
|
||||
MarketingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
|
||||
MarketingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
||||
MarketingNoSqlDb: Marketing MongoDb ConnectionString
|
||||
MarketingNoSqlDbName: Marketing MongoDb database (MarketingDb)
|
||||
MarketingSqlDb: Marketing SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
||||
# Ordering.API entries
|
||||
OrderingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
|
||||
OrderingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
||||
OrderingSqlDb: Ordering SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
|
||||
GracePeriodManager_GracePeriodTime: "1"
|
||||
GracePeriodManager_CheckUpdateTime: "15000"
|
||||
# Payment.API entries
|
||||
PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
|
||||
PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX for topic in case of using Azure)
|
||||
# Global entries
|
||||
all_UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ)
|
||||
keystore: REDIS CONNECTION STRING FOR KEYSTORE
|
||||
all_EventBusConnection: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
|
||||
all_InstrumentationKey: APPINSIGHTS KEY
|
||||
all_InstrumentationKey: APPINSIGHTS KEY
|
||||
|
@ -22,10 +22,10 @@ if ($createAcr -eq $true) {
|
||||
Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow
|
||||
az aks create --resource-group=$resourceGroupName --name=$serviceName --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize
|
||||
|
||||
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
||||
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
||||
az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName
|
||||
|
||||
if ($createAcr -eq $true) {
|
||||
# Show ACR credentials
|
||||
az acr credential show -n $registryName
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -7,9 +7,10 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.6.2" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Polly" Version="5.6.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||
<PackageReference Include="Polly" Version="5.8.0" />
|
||||
<PackageReference Include="RabbitMQ.Client" Version="5.0.1" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
||||
</ItemGroup>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="4.6.2" />
|
||||
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.4.0" />
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="8.7.0" />
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="9.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
|
||||
|
@ -8,8 +8,8 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Polly" Version="5.6.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||
<PackageReference Include="Polly" Version="5.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -5,8 +5,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Polly" Version="5.6.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Polly" Version="5.8.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -15,7 +15,6 @@ namespace eShopOnContainers.Core.Extensions
|
||||
}
|
||||
|
||||
return collection;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
namespace eShopOnContainers.Core.Services.Settings
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Settings
|
||||
{
|
||||
public interface ISettingsService
|
||||
{
|
||||
@ -10,5 +12,10 @@
|
||||
string Latitude { get; set; }
|
||||
string Longitude { get; set; }
|
||||
bool AllowGpsLocation { get; set; }
|
||||
|
||||
bool GetValueOrDefault(string key, bool defaultValue);
|
||||
string GetValueOrDefault(string key, string defaultValue);
|
||||
Task AddOrUpdateValue(string key, bool value);
|
||||
Task AddOrUpdateValue(string key, string value);
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
namespace eShopOnContainers.Core.Services.Settings
|
||||
{
|
||||
public interface ISettingsServiceImplementation
|
||||
{
|
||||
bool GetValueOrDefault(string key, bool defaultValue);
|
||||
string GetValueOrDefault(string key, string defaultValue);
|
||||
|
||||
bool AddOrUpdateValue(string key, bool value);
|
||||
bool AddOrUpdateValue(string key, string value);
|
||||
|
||||
void Remove(string key);
|
||||
}
|
||||
}
|
@ -1,21 +1,11 @@
|
||||
using eShopOnContainers.Core.Services.Dependency;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Settings
|
||||
{
|
||||
public class SettingsService : ISettingsService
|
||||
{
|
||||
private readonly ISettingsServiceImplementation _settingsService;
|
||||
|
||||
ISettingsServiceImplementation AppSettings
|
||||
{
|
||||
get { return _settingsService; }
|
||||
}
|
||||
|
||||
public SettingsService(IDependencyService dependencyService)
|
||||
{
|
||||
_settingsService = dependencyService.Get<ISettingsServiceImplementation>();
|
||||
}
|
||||
|
||||
#region Setting Constants
|
||||
|
||||
private const string AccessToken = "access_token";
|
||||
@ -37,52 +27,113 @@ namespace eShopOnContainers.Core.Services.Settings
|
||||
|
||||
#endregion
|
||||
|
||||
#region Settings Properties
|
||||
|
||||
public string AuthAccessToken
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(AccessToken, AccessTokenDefault);
|
||||
set => AppSettings.AddOrUpdateValue(AccessToken, value);
|
||||
get => GetValueOrDefault(AccessToken, AccessTokenDefault);
|
||||
set => AddOrUpdateValue(AccessToken, value);
|
||||
}
|
||||
|
||||
public string AuthIdToken
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdToken, IdTokenDefault);
|
||||
set => AppSettings.AddOrUpdateValue(IdToken, value);
|
||||
get => GetValueOrDefault(IdToken, IdTokenDefault);
|
||||
set => AddOrUpdateValue(IdToken, value);
|
||||
}
|
||||
|
||||
public bool UseMocks
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdUseMocks, UseMocksDefault);
|
||||
set => AppSettings.AddOrUpdateValue(IdUseMocks, value);
|
||||
get => GetValueOrDefault(IdUseMocks, UseMocksDefault);
|
||||
set => AddOrUpdateValue(IdUseMocks, value);
|
||||
}
|
||||
|
||||
public string UrlBase
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdUrlBase, UrlBaseDefault);
|
||||
set => AppSettings.AddOrUpdateValue(IdUrlBase, value);
|
||||
get => GetValueOrDefault(IdUrlBase, UrlBaseDefault);
|
||||
set => AddOrUpdateValue(IdUrlBase, value);
|
||||
}
|
||||
|
||||
public bool UseFakeLocation
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdUseFakeLocation, UseFakeLocationDefault);
|
||||
set => AppSettings.AddOrUpdateValue(IdUseFakeLocation, value);
|
||||
get => GetValueOrDefault(IdUseFakeLocation, UseFakeLocationDefault);
|
||||
set => AddOrUpdateValue(IdUseFakeLocation, value);
|
||||
}
|
||||
|
||||
public string Latitude
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdLatitude, FakeLatitudeDefault.ToString());
|
||||
set => AppSettings.AddOrUpdateValue(IdLatitude, value);
|
||||
get => GetValueOrDefault(IdLatitude, FakeLatitudeDefault.ToString());
|
||||
set => AddOrUpdateValue(IdLatitude, value);
|
||||
}
|
||||
|
||||
public string Longitude
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdLongitude, FakeLongitudeDefault.ToString());
|
||||
set => AppSettings.AddOrUpdateValue(IdLongitude, value);
|
||||
get => GetValueOrDefault(IdLongitude, FakeLongitudeDefault.ToString());
|
||||
set => AddOrUpdateValue(IdLongitude, value);
|
||||
}
|
||||
|
||||
public bool AllowGpsLocation
|
||||
{
|
||||
get => AppSettings.GetValueOrDefault(IdAllowGpsLocation, AllowGpsLocationDefault);
|
||||
set => AppSettings.AddOrUpdateValue(IdAllowGpsLocation, value);
|
||||
get => GetValueOrDefault(IdAllowGpsLocation, AllowGpsLocationDefault);
|
||||
set => AddOrUpdateValue(IdAllowGpsLocation, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public Task AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
||||
public Task AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
||||
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
|
||||
async Task AddOrUpdateValueInternal<T>(string key, T value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
await Remove(key);
|
||||
}
|
||||
|
||||
Application.Current.Properties[key] = value;
|
||||
try
|
||||
{
|
||||
await Application.Current.SavePropertiesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Unable to save: " + key, " Message: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
||||
{
|
||||
object value = null;
|
||||
if (Application.Current.Properties.ContainsKey(key))
|
||||
{
|
||||
value = Application.Current.Properties[key];
|
||||
}
|
||||
return null != value ? (T)value : defaultValue;
|
||||
}
|
||||
|
||||
async Task Remove(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Application.Current.Properties[key] != null)
|
||||
{
|
||||
Application.Current.Properties.Remove(key);
|
||||
await Application.Current.SavePropertiesAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Unable to remove: " + key, " Message: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -32,7 +32,7 @@ namespace eShopOnContainers.Droid.Extensions
|
||||
{
|
||||
return new DateTimeOffset(Epoch.AddMilliseconds(location.Time));
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
return new DateTimeOffset(Epoch);
|
||||
}
|
||||
|
@ -1,149 +0,0 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Preferences;
|
||||
using eShopOnContainers.Core.Services.Settings;
|
||||
using eShopOnContainers.Droid.Services;
|
||||
using System;
|
||||
|
||||
[assembly: Xamarin.Forms.Dependency(typeof(SettingsServiceImplementation))]
|
||||
namespace eShopOnContainers.Droid.Services
|
||||
{
|
||||
public class SettingsServiceImplementation : ISettingsServiceImplementation
|
||||
{
|
||||
#region Internal Implementation
|
||||
|
||||
readonly object _locker = new object();
|
||||
|
||||
ISharedPreferences GetSharedPreference()
|
||||
{
|
||||
return PreferenceManager.GetDefaultSharedPreferences(Application.Context);
|
||||
}
|
||||
|
||||
bool AddOrUpdateValueInternal<T>(string key, T value)
|
||||
{
|
||||
if (Application.Context == null)
|
||||
return false;
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
Remove(key);
|
||||
return true;
|
||||
}
|
||||
|
||||
var type = typeof(T);
|
||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
||||
{
|
||||
type = Nullable.GetUnderlyingType(type);
|
||||
}
|
||||
var typeCode = Type.GetTypeCode(type);
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
using (var sharedPrefs = GetSharedPreference())
|
||||
{
|
||||
using (var editor = sharedPrefs.Edit())
|
||||
{
|
||||
switch (typeCode)
|
||||
{
|
||||
case TypeCode.Boolean:
|
||||
editor.PutBoolean(key, Convert.ToBoolean(value));
|
||||
break;
|
||||
case TypeCode.String:
|
||||
editor.PutString(key, Convert.ToString(value));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"Value of type {typeCode} is not supported.");
|
||||
}
|
||||
editor.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
||||
{
|
||||
if (Application.Context == null)
|
||||
return defaultValue;
|
||||
|
||||
if (!Contains(key))
|
||||
return defaultValue;
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
using (var sharedPrefs = GetSharedPreference())
|
||||
{
|
||||
var type = typeof(T);
|
||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
||||
{
|
||||
type = Nullable.GetUnderlyingType(type);
|
||||
}
|
||||
|
||||
object value = null;
|
||||
var typeCode = Type.GetTypeCode(type);
|
||||
switch (typeCode)
|
||||
{
|
||||
case TypeCode.Boolean:
|
||||
value = sharedPrefs.GetBoolean(key, Convert.ToBoolean(defaultValue));
|
||||
break;
|
||||
case TypeCode.String:
|
||||
value = sharedPrefs.GetString(key, Convert.ToString(defaultValue));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"Value of type {typeCode} is not supported.");
|
||||
}
|
||||
|
||||
return null != value ? (T)value : defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Contains(string key)
|
||||
{
|
||||
if (Application.Context == null)
|
||||
return false;
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
using (var sharedPrefs = GetSharedPreference())
|
||||
{
|
||||
if (sharedPrefs == null)
|
||||
return false;
|
||||
return sharedPrefs.Contains(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISettingsServiceImplementation
|
||||
|
||||
public bool AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
||||
|
||||
public bool AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
||||
|
||||
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
public void Remove(string key)
|
||||
{
|
||||
if (Application.Context == null)
|
||||
return;
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
using (var sharedPrefs = GetSharedPreference())
|
||||
{
|
||||
using (var editor = sharedPrefs.Edit())
|
||||
{
|
||||
editor.Remove(key);
|
||||
editor.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
|
||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
||||
<AndroidStoreUncompressedFileExtensions />
|
||||
<MandroidI18n />
|
||||
@ -211,7 +211,6 @@
|
||||
<Compile Include="Effects\CircleEffect.cs" />
|
||||
<Compile Include="Effects\BaseContainerEffect.cs" />
|
||||
<Compile Include="Activities\SplashActivity.cs" />
|
||||
<Compile Include="Services\SettingsServiceImplementation.cs" />
|
||||
<Compile Include="Services\PermissionsService.cs" />
|
||||
<Compile Include="Services\LocationServiceImplementation.cs" />
|
||||
<Compile Include="Services\GeolocationSingleListener.cs" />
|
||||
|
@ -1,232 +1,232 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" />
|
||||
<Import Project="..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProjectGuid>{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>eShopOnContainers.TestRunner.iOS</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>eShopOnContainersTestRunneriOS</AssemblyName>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchProfiling>False</MtouchProfiling>
|
||||
<MtouchFastDev>False</MtouchFastDev>
|
||||
<MtouchUseLlvm>False</MtouchUseLlvm>
|
||||
<MtouchUseThumb>False</MtouchUseThumb>
|
||||
<MtouchEnableBitcode>False</MtouchEnableBitcode>
|
||||
<OptimizePNGs>True</OptimizePNGs>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchFloat32>False</MtouchFloat32>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<BuildIpa>True</BuildIpa>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.xib" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="xunit.runner.devices">
|
||||
<HintPath>..\..\..\..\packages\xunit.runner.devices.2.3.3\lib\xamarinios10\xunit.runner.devices.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.runner.utility.netstandard15">
|
||||
<HintPath>..\..\..\..\packages\xunit.runner.devices.2.3.3\lib\xamarinios10\xunit.runner.utility.netstandard15.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.abstractions">
|
||||
<HintPath>..\..\..\..\packages\xunit.abstractions.2.0.1\lib\netstandard1.0\xunit.abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.assert">
|
||||
<HintPath>..\..\..\..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.core">
|
||||
<HintPath>..\..\..\..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.execution.dotnet">
|
||||
<HintPath>..\..\..\..\packages\xunit.extensibility.execution.2.3.1\lib\netstandard1.1\xunit.execution.dotnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit.iOS">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IdentityModel">
|
||||
<HintPath>..\..\..\..\packages\IdentityModel.3.0.0\lib\netstandard2.0\IdentityModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.Support.iOS">
|
||||
<HintPath>..\..\..\..\packages\Acr.Support.2.1.0\lib\Xamarin.iOS10\Acr.Support.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BTProgressHUD">
|
||||
<HintPath>..\..\..\..\packages\BTProgressHUD.1.2.0.5\lib\Xamarin.iOS10\BTProgressHUD.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Splat">
|
||||
<HintPath>..\..\..\..\packages\Splat.2.0.0\lib\Xamarin.iOS10\Splat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs.Interface">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebP.Touch">
|
||||
<HintPath>..\..\..\..\packages\WebP.Touch.1.0.7\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Platform">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms.Touch">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Windows.Core">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Kernel32">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.BCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.NCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Validation">
|
||||
<HintPath>..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PCLCrypto">
|
||||
<HintPath>..\..\..\..\packages\PCLCrypto.2.0.147\lib\xamarinios10\PCLCrypto.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Entitlements.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj">
|
||||
<Project>{FDD910BC-DF0F-483D-B7D5-C7D831855172}</Project>
|
||||
<Name>eShopOnContainers.UnitTests</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Import Project="..\..\..\..\packages\xunit.runner.devices.2.3.3\build\xamarinios10\xunit.runner.devices.targets" Condition="Exists('..\..\..\..\packages\xunit.runner.devices.2.3.3\build\xamarinios10\xunit.runner.devices.targets')" />
|
||||
<Import Project="..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" />
|
||||
<Import Project="..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProjectGuid>{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>eShopOnContainers.TestRunner.iOS</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>eShopOnContainersTestRunneriOS</AssemblyName>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchProfiling>False</MtouchProfiling>
|
||||
<MtouchFastDev>False</MtouchFastDev>
|
||||
<MtouchUseLlvm>False</MtouchUseLlvm>
|
||||
<MtouchUseThumb>False</MtouchUseThumb>
|
||||
<MtouchEnableBitcode>False</MtouchEnableBitcode>
|
||||
<OptimizePNGs>True</OptimizePNGs>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchFloat32>False</MtouchFloat32>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<BuildIpa>True</BuildIpa>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.xib" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="xunit.runner.devices">
|
||||
<HintPath>..\..\..\..\packages\xunit.runner.devices.2.3.3\lib\xamarinios10\xunit.runner.devices.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.runner.utility.netstandard15">
|
||||
<HintPath>..\..\..\..\packages\xunit.runner.devices.2.3.3\lib\xamarinios10\xunit.runner.utility.netstandard15.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.abstractions">
|
||||
<HintPath>..\..\..\..\packages\xunit.abstractions.2.0.1\lib\netstandard1.0\xunit.abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.assert">
|
||||
<HintPath>..\..\..\..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.core">
|
||||
<HintPath>..\..\..\..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.execution.dotnet">
|
||||
<HintPath>..\..\..\..\packages\xunit.extensibility.execution.2.3.1\lib\netstandard1.1\xunit.execution.dotnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit.iOS">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IdentityModel">
|
||||
<HintPath>..\..\..\..\packages\IdentityModel.3.0.0\lib\netstandard2.0\IdentityModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.Support.iOS">
|
||||
<HintPath>..\..\..\..\packages\Acr.Support.2.1.0\lib\Xamarin.iOS10\Acr.Support.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BTProgressHUD">
|
||||
<HintPath>..\..\..\..\packages\BTProgressHUD.1.2.0.5\lib\Xamarin.iOS10\BTProgressHUD.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Splat">
|
||||
<HintPath>..\..\..\..\packages\Splat.2.0.0\lib\Xamarin.iOS10\Splat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs.Interface">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebP.Touch">
|
||||
<HintPath>..\..\..\..\packages\WebP.Touch.1.0.7\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Platform">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms.Touch">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Windows.Core">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Kernel32">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.BCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.NCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Validation">
|
||||
<HintPath>..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PCLCrypto">
|
||||
<HintPath>..\..\..\..\packages\PCLCrypto.2.0.147\lib\xamarinios10\PCLCrypto.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Entitlements.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj">
|
||||
<Project>{FDD910BC-DF0F-483D-B7D5-C7D831855172}</Project>
|
||||
<Name>eShopOnContainers.UnitTests</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Import Project="..\..\..\..\packages\xunit.runner.devices.2.3.3\build\xamarinios10\xunit.runner.devices.targets" Condition="Exists('..\..\..\..\packages\xunit.runner.devices.2.3.3\build\xamarinios10\xunit.runner.devices.targets')" />
|
||||
<Import Project="..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\..\..\..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
</Project>
|
@ -1,65 +1,110 @@
|
||||
using eShopOnContainers.Core.Services.Settings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopOnContainers.UnitTests.Mocks
|
||||
{
|
||||
public class MockSettingsService : ISettingsService
|
||||
{
|
||||
string _accessTokenDefault = string.Empty;
|
||||
string _idTokenDefault = string.Empty;
|
||||
bool _useMocksDefault = true;
|
||||
string _urlBaseDefault = "https://13.88.8.119";
|
||||
bool _useFakeLocationDefault = false;
|
||||
bool _allowGpsLocationDefault = false;
|
||||
double _fakeLatitudeDefault = 47.604610d;
|
||||
double _fakeLongitudeDefault = -122.315752d;
|
||||
IDictionary<string, object> _settings = new Dictionary<string, object>();
|
||||
|
||||
const string AccessToken = "access_token";
|
||||
const string IdToken = "id_token";
|
||||
const string IdUseMocks = "use_mocks";
|
||||
const string IdUrlBase = "url_base";
|
||||
const string IdUseFakeLocation = "use_fake_location";
|
||||
const string IdLatitude = "latitude";
|
||||
const string IdLongitude = "longitude";
|
||||
const string IdAllowGpsLocation = "allow_gps_location";
|
||||
readonly string AccessTokenDefault = string.Empty;
|
||||
readonly string IdTokenDefault = string.Empty;
|
||||
readonly bool UseMocksDefault = true;
|
||||
readonly bool UseFakeLocationDefault = false;
|
||||
readonly bool AllowGpsLocationDefault = false;
|
||||
readonly double FakeLatitudeDefault = 47.604610d;
|
||||
readonly double FakeLongitudeDefault = -122.315752d;
|
||||
readonly string UrlBaseDefault = "https://13.88.8.119";
|
||||
|
||||
public string AuthAccessToken
|
||||
{
|
||||
get { return _accessTokenDefault; }
|
||||
set { _accessTokenDefault = value; }
|
||||
get => GetValueOrDefault(AccessToken, AccessTokenDefault);
|
||||
set => AddOrUpdateValue(AccessToken, value);
|
||||
}
|
||||
|
||||
public string AuthIdToken
|
||||
{
|
||||
get { return _idTokenDefault; }
|
||||
set { _idTokenDefault = value; }
|
||||
get => GetValueOrDefault(IdToken, IdTokenDefault);
|
||||
set => AddOrUpdateValue(IdToken, value);
|
||||
}
|
||||
|
||||
public bool UseMocks
|
||||
{
|
||||
get { return _useMocksDefault; }
|
||||
set { _useMocksDefault = value; }
|
||||
get => GetValueOrDefault(IdUseMocks, UseMocksDefault);
|
||||
set => AddOrUpdateValue(IdUseMocks, value);
|
||||
}
|
||||
|
||||
public string UrlBase
|
||||
{
|
||||
get { return _urlBaseDefault; }
|
||||
set { _urlBaseDefault = value; }
|
||||
get => GetValueOrDefault(IdUrlBase, UrlBaseDefault);
|
||||
set => AddOrUpdateValue(IdUrlBase, value);
|
||||
}
|
||||
|
||||
public bool UseFakeLocation
|
||||
{
|
||||
get { return _useFakeLocationDefault; }
|
||||
set { _useFakeLocationDefault = value; }
|
||||
get => GetValueOrDefault(IdUseFakeLocation, UseFakeLocationDefault);
|
||||
set => AddOrUpdateValue(IdUseFakeLocation, value);
|
||||
}
|
||||
|
||||
public string Latitude
|
||||
{
|
||||
get { return _fakeLatitudeDefault.ToString(); }
|
||||
set { _fakeLatitudeDefault = Convert.ToDouble(value); }
|
||||
get => GetValueOrDefault(IdLatitude, FakeLatitudeDefault.ToString());
|
||||
set => AddOrUpdateValue(IdLatitude, value);
|
||||
}
|
||||
|
||||
public string Longitude
|
||||
{
|
||||
get { return _fakeLongitudeDefault.ToString(); }
|
||||
set { _fakeLongitudeDefault = Convert.ToDouble(value); }
|
||||
get => GetValueOrDefault(IdLongitude, FakeLongitudeDefault.ToString());
|
||||
set => AddOrUpdateValue(IdLongitude, value);
|
||||
}
|
||||
|
||||
public bool AllowGpsLocation
|
||||
{
|
||||
get { return _allowGpsLocationDefault; }
|
||||
set { _allowGpsLocationDefault = value; }
|
||||
get => GetValueOrDefault(IdAllowGpsLocation, AllowGpsLocationDefault);
|
||||
set => AddOrUpdateValue(IdAllowGpsLocation, value);
|
||||
}
|
||||
|
||||
public Task AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
||||
public Task AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
||||
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
Task AddOrUpdateValueInternal<T>(string key, T value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
Remove(key);
|
||||
}
|
||||
|
||||
_settings[key] = value;
|
||||
return Task.Delay(10);
|
||||
}
|
||||
|
||||
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
||||
{
|
||||
object value = null;
|
||||
if (_settings.ContainsKey(key))
|
||||
{
|
||||
value = _settings[key];
|
||||
}
|
||||
return null != value ? (T)value : defaultValue;
|
||||
}
|
||||
|
||||
void Remove(string key)
|
||||
{
|
||||
if (_settings[key] != null)
|
||||
{
|
||||
_settings.Remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,99 +0,0 @@
|
||||
using eShopOnContainers.Core.Services.Settings;
|
||||
using eShopOnContainers.Windows.Services;
|
||||
using Windows.Storage;
|
||||
|
||||
[assembly: Xamarin.Forms.Dependency(typeof(SettingsServiceImplementation))]
|
||||
namespace eShopOnContainers.Windows.Services
|
||||
{
|
||||
public class SettingsServiceImplementation : ISettingsServiceImplementation
|
||||
{
|
||||
#region Internal Implementation
|
||||
|
||||
readonly object _locker = new object();
|
||||
|
||||
ApplicationDataContainer GetAppSettings()
|
||||
{
|
||||
return ApplicationData.Current.LocalSettings;
|
||||
}
|
||||
|
||||
bool AddOrUpdateValueInternal<T>(string key, T value)
|
||||
{
|
||||
bool valueChanged = false;
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
Remove(key);
|
||||
return true;
|
||||
}
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
var settings = GetAppSettings();
|
||||
if (settings.Values.ContainsKey(key))
|
||||
{
|
||||
if (settings.Values[key] != (object)value)
|
||||
{
|
||||
settings.Values[key] = value;
|
||||
valueChanged = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.Values[key] = value;
|
||||
valueChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
return valueChanged;
|
||||
}
|
||||
|
||||
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
||||
{
|
||||
object value;
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
var settings = GetAppSettings();
|
||||
if (settings.Values.ContainsKey(key))
|
||||
{
|
||||
var tempValue = settings.Values[key];
|
||||
if (tempValue != null)
|
||||
value = (T)tempValue;
|
||||
else
|
||||
value = defaultValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = defaultValue;
|
||||
}
|
||||
}
|
||||
return null != value ? (T)value : defaultValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISettingsServiceImplementation
|
||||
|
||||
public bool AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
||||
|
||||
public bool AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
||||
|
||||
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
public void Remove(string key)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
var settings = GetAppSettings();
|
||||
if (settings.Values.ContainsKey(key))
|
||||
{
|
||||
settings.Values.Remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -123,7 +123,6 @@
|
||||
<Compile Include="Renderers\CustomTabbedPageRenderer.cs" />
|
||||
<Compile Include="Renderers\SlideDownMenuPageRenderer.cs" />
|
||||
<Compile Include="Services\LocationServiceImplementation.cs" />
|
||||
<Compile Include="Services\SettingsServiceImplementation.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
|
@ -1,128 +0,0 @@
|
||||
using eShopOnContainers.Core.Services.Settings;
|
||||
using eShopOnContainers.iOS.Services;
|
||||
using Foundation;
|
||||
using System;
|
||||
|
||||
[assembly: Xamarin.Forms.Dependency(typeof(SettingsServiceImplementation))]
|
||||
namespace eShopOnContainers.iOS.Services
|
||||
{
|
||||
public class SettingsServiceImplementation : ISettingsServiceImplementation
|
||||
{
|
||||
#region Internal Implementation
|
||||
|
||||
readonly object _locker = new object();
|
||||
|
||||
NSUserDefaults GetUserDefaults() => NSUserDefaults.StandardUserDefaults;
|
||||
|
||||
bool AddOrUpdateValueInternal<T>(string key, T value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
Remove(key);
|
||||
return true;
|
||||
}
|
||||
|
||||
var type = typeof(T);
|
||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
||||
{
|
||||
type = Nullable.GetUnderlyingType(type);
|
||||
}
|
||||
var typeCode = Type.GetTypeCode(type);
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
var defaults = GetUserDefaults();
|
||||
switch (typeCode)
|
||||
{
|
||||
case TypeCode.Boolean:
|
||||
defaults.SetBool(Convert.ToBoolean(value), key);
|
||||
break;
|
||||
case TypeCode.String:
|
||||
defaults.SetString(Convert.ToString(value), key);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"Value of type {typeCode} is unsupported.");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
defaults.Synchronize();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Unable to save: " + key, " Message: " + ex.Message);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
T GetValueOrDefaultInternal<T>(string key, T defaultValue = default(T))
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
var defaults = GetUserDefaults();
|
||||
|
||||
if (defaults[key] == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
var type = typeof(T);
|
||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
||||
{
|
||||
type = Nullable.GetUnderlyingType(type);
|
||||
}
|
||||
|
||||
object value = null;
|
||||
var typeCode = Type.GetTypeCode(type);
|
||||
switch (typeCode)
|
||||
{
|
||||
case TypeCode.Boolean:
|
||||
value = defaults.BoolForKey(key);
|
||||
break;
|
||||
case TypeCode.String:
|
||||
value = defaults.StringForKey(key);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"Value of type {typeCode} is unsupported.");
|
||||
}
|
||||
|
||||
return null != value ? (T)value : defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISettingsServiceImplementation
|
||||
|
||||
public bool AddOrUpdateValue(string key, bool value) => AddOrUpdateValueInternal(key, value);
|
||||
|
||||
public bool AddOrUpdateValue(string key, string value) => AddOrUpdateValueInternal(key, value);
|
||||
|
||||
public bool GetValueOrDefault(string key, bool defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
public string GetValueOrDefault(string key, string defaultValue) => GetValueOrDefaultInternal(key, defaultValue);
|
||||
|
||||
public void Remove(string key)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
var defaults = GetUserDefaults();
|
||||
try
|
||||
{
|
||||
if (defaults[key] != null)
|
||||
{
|
||||
defaults.RemoveObject(key);
|
||||
defaults.Synchronize();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Unable to remove: " + key, " Message: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,429 +1,428 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6EEB23DC-7063-4444-9AF8-90DF24F549C0}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>eShopOnContainers.iOS</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>eShopOnContainersiOS</AssemblyName>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<SkipValidatePackageReferences>true</SkipValidatePackageReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386, x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchProfiling>False</MtouchProfiling>
|
||||
<MtouchFastDev>False</MtouchFastDev>
|
||||
<MtouchUseLlvm>False</MtouchUseLlvm>
|
||||
<MtouchUseThumb>False</MtouchUseThumb>
|
||||
<MtouchEnableBitcode>False</MtouchEnableBitcode>
|
||||
<OptimizePNGs>True</OptimizePNGs>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchFloat32>False</MtouchFloat32>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>i386, x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<BuildIpa>True</BuildIpa>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Effects\EntryLineColorEffect.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<BundleResource Include="..\CommonResources\Fonts\Montserrat-Bold.ttf">
|
||||
<Link>Resources\fonts\Montserrat-Bold.ttf</Link>
|
||||
</BundleResource>
|
||||
<BundleResource Include="..\CommonResources\Fonts\Montserrat-Regular.ttf">
|
||||
<Link>Resources\fonts\Montserrat-Regular.ttf</Link>
|
||||
</BundleResource>
|
||||
<BundleResource Include="..\CommonResources\Fonts\SourceSansPro-Regular.ttf">
|
||||
<Link>Resources\fonts\SourceSansPro-Regular.ttf</Link>
|
||||
</BundleResource>
|
||||
<Compile Include="Renderers\CustomTabbedPageRenderer.cs" />
|
||||
<Compile Include="Renderers\SlideDownMenuPageRenderer.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<ITunesArtwork Include="iTunesArtwork" />
|
||||
<ITunesArtwork Include="iTunesArtwork@2x" />
|
||||
<Compile Include="Effects\CircleEffect.cs" />
|
||||
<BundleResource Include="Resources\menu_campaigns.png" />
|
||||
<BundleResource Include="Resources\menu_campaigns%402x.png" />
|
||||
<BundleResource Include="Resources\menu_campaigns%403x.png" />
|
||||
<None Include="packages.config" />
|
||||
<Compile Include="Services\SettingsServiceImplementation.cs" />
|
||||
<Compile Include="Services\LocationServiceImplementation.cs" />
|
||||
<Compile Include="Services\PermissionsService.cs" />
|
||||
<Compile Include="Services\GeolocationSingleUpdateDelegate.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-60%403x.png" />
|
||||
<BundleResource Include="Resources\Icon-Small-40%403x.png" />
|
||||
<BundleResource Include="Resources\Icon-Small%403x.png" />
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="Xamarin.Forms.Core">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform.iOS">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebP.Touch">
|
||||
<HintPath>..\..\..\..\packages\WebP.Touch.1.0.7\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Platform">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms.Touch">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit.iOS">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Plugin.Settings.Abstractions">
|
||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Plugin.Settings">
|
||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.Support.iOS">
|
||||
<HintPath>..\..\..\..\packages\Acr.Support.2.1.0\lib\Xamarin.iOS10\Acr.Support.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BTProgressHUD">
|
||||
<HintPath>..\..\..\..\packages\BTProgressHUD.1.2.0.5\lib\Xamarin.iOS10\BTProgressHUD.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Splat">
|
||||
<HintPath>..\..\..\..\packages\Splat.2.0.0\lib\Xamarin.iOS10\Splat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs.Interface">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Windows.Core">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Kernel32">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.BCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.NCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Validation">
|
||||
<HintPath>..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PCLCrypto">
|
||||
<HintPath>..\..\..\..\packages\PCLCrypto.2.0.147\lib\xamarinios10\PCLCrypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IdentityModel">
|
||||
<HintPath>..\..\..\..\packages\IdentityModel.3.0.0\lib\netstandard2.0\IdentityModel.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_01.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_03.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_02.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_04.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_05.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_cart.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_cart%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_cart%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_filter.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_filter%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_filter%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_profile.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_profile%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_profile%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\product_add.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\product_add%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\product_add%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\app_settings%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\app_settings.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\app_settings%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOff.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOff%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOff%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOn.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOn%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOn%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-60%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-76.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-76%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small-40.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small-40%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-568h%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-Portrait.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-Portrait%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-750%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-1242%403x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\noimage.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\default_product.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\banner.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default-568h%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default-Portrait.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default-Portrait%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-60%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-76.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-76%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small-40.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small-40%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_campaign_01.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_campaign_02.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\default_campaign.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\eShopOnContainers.Core\eShopOnContainers.Core.csproj">
|
||||
<Project>{76C5F2A7-6CD5-49EA-9F33-EC44DE6539C7}</Project>
|
||||
<Name>eShopOnContainers.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" />
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6EEB23DC-7063-4444-9AF8-90DF24F549C0}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>eShopOnContainers.iOS</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>eShopOnContainersiOS</AssemblyName>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<SkipValidatePackageReferences>true</SkipValidatePackageReferences>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386, x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchProfiling>False</MtouchProfiling>
|
||||
<MtouchFastDev>False</MtouchFastDev>
|
||||
<MtouchUseLlvm>False</MtouchUseLlvm>
|
||||
<MtouchUseThumb>False</MtouchUseThumb>
|
||||
<MtouchEnableBitcode>False</MtouchEnableBitcode>
|
||||
<OptimizePNGs>True</OptimizePNGs>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchFloat32>False</MtouchFloat32>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>i386, x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<BuildIpa>True</BuildIpa>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Effects\EntryLineColorEffect.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<BundleResource Include="..\CommonResources\Fonts\Montserrat-Bold.ttf">
|
||||
<Link>Resources\fonts\Montserrat-Bold.ttf</Link>
|
||||
</BundleResource>
|
||||
<BundleResource Include="..\CommonResources\Fonts\Montserrat-Regular.ttf">
|
||||
<Link>Resources\fonts\Montserrat-Regular.ttf</Link>
|
||||
</BundleResource>
|
||||
<BundleResource Include="..\CommonResources\Fonts\SourceSansPro-Regular.ttf">
|
||||
<Link>Resources\fonts\SourceSansPro-Regular.ttf</Link>
|
||||
</BundleResource>
|
||||
<Compile Include="Renderers\CustomTabbedPageRenderer.cs" />
|
||||
<Compile Include="Renderers\SlideDownMenuPageRenderer.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<ITunesArtwork Include="iTunesArtwork" />
|
||||
<ITunesArtwork Include="iTunesArtwork@2x" />
|
||||
<Compile Include="Effects\CircleEffect.cs" />
|
||||
<BundleResource Include="Resources\menu_campaigns.png" />
|
||||
<BundleResource Include="Resources\menu_campaigns%402x.png" />
|
||||
<BundleResource Include="Resources\menu_campaigns%403x.png" />
|
||||
<None Include="packages.config" />
|
||||
<Compile Include="Services\LocationServiceImplementation.cs" />
|
||||
<Compile Include="Services\PermissionsService.cs" />
|
||||
<Compile Include="Services\GeolocationSingleUpdateDelegate.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-60%403x.png" />
|
||||
<BundleResource Include="Resources\Icon-Small-40%403x.png" />
|
||||
<BundleResource Include="Resources\Icon-Small%403x.png" />
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="Xamarin.Forms.Core">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform.iOS">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebP.Touch">
|
||||
<HintPath>..\..\..\..\packages\WebP.Touch.1.0.7\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Platform">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms.Touch">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.3.4\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit.iOS">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.5\lib\Xamarin.iOS10\SlideOverKit.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Plugin.Settings.Abstractions">
|
||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Plugin.Settings">
|
||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.Support.iOS">
|
||||
<HintPath>..\..\..\..\packages\Acr.Support.2.1.0\lib\Xamarin.iOS10\Acr.Support.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BTProgressHUD">
|
||||
<HintPath>..\..\..\..\packages\BTProgressHUD.1.2.0.5\lib\Xamarin.iOS10\BTProgressHUD.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Splat">
|
||||
<HintPath>..\..\..\..\packages\Splat.2.0.0\lib\Xamarin.iOS10\Splat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs.Interface">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.5.1\lib\Xamarin.iOS10\Acr.UserDialogs.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Windows.Core">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Kernel32">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.BCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.NCrypt">
|
||||
<HintPath>..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Validation">
|
||||
<HintPath>..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PCLCrypto">
|
||||
<HintPath>..\..\..\..\packages\PCLCrypto.2.0.147\lib\xamarinios10\PCLCrypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IdentityModel">
|
||||
<HintPath>..\..\..\..\packages\IdentityModel.3.0.0\lib\netstandard2.0\IdentityModel.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_01.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_03.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_02.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_04.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_product_05.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_cart.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_cart%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_cart%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_filter.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_filter%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_filter%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_profile.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_profile%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\menu_profile%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\product_add.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\product_add%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\product_add%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\app_settings%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\app_settings.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\app_settings%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOff.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOff%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOff%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOn.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOn%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\switchOn%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-60%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-76.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-76%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small-40.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small-40%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-568h%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-Portrait.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-Portrait%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-750%402x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\Default-1242%403x.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\noimage.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\default_product.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\banner.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default-568h%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default-Portrait.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Default-Portrait%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-60%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-76.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-76%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small-40.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Icon-Small-40%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_campaign_01.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_campaign_02.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\default_campaign.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\eShopOnContainers.Core\eShopOnContainers.Core.csproj">
|
||||
<Project>{76C5F2A7-6CD5-49EA-9F33-EC44DE6539C7}</Project>
|
||||
<Name>eShopOnContainers.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
@ -13,13 +13,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -30,7 +30,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Even
|
||||
|
||||
private async Task UpdatePriceInBasketItems(int productId, decimal newPrice, decimal oldPrice, CustomerBasket basket)
|
||||
{
|
||||
var itemsToUpdate = basket?.Items?.Where(x => int.Parse(x.ProductId) == productId).ToList();
|
||||
string match = productId.ToString();
|
||||
var itemsToUpdate = basket?.Items?.Where(x => x.ProductId == match).ToList();
|
||||
|
||||
if (itemsToUpdate != null)
|
||||
{
|
||||
|
@ -205,7 +205,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Basket.API V1");
|
||||
c.ConfigureOAuth2("basketswaggerui", "", "", "Basket Swagger UI");
|
||||
c.OAuthClientId ("basketswaggerui");
|
||||
c.OAuthAppName("Basket Swagger UI");
|
||||
});
|
||||
|
||||
ConfigureEventBus(app);
|
||||
|
@ -34,13 +34,13 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -14,16 +14,16 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.0.0" />
|
||||
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.1.0" />
|
||||
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -6,18 +6,18 @@
|
||||
<UserSecretsId>aspnet-Locations.API-20161122013619</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="mongocsharpdriver" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Driver.Core" Version="2.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="1.1.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
|
||||
|
@ -176,7 +176,8 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Locations.API V1");
|
||||
c.ConfigureOAuth2("locationsswaggerui", "", "", "Locations Swagger UI");
|
||||
c.OAuthClientId("locationsswaggerui");
|
||||
c.OAuthAppName("Locations Swagger UI");
|
||||
});
|
||||
|
||||
LocationsContextSeed.SeedAsync(app, loggerFactory)
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -20,17 +20,17 @@
|
||||
<Folder Include="Infrastructure\MarketingMigrations\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="mongocsharpdriver" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Driver.Core" Version="2.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
|
||||
|
@ -208,7 +208,8 @@
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Marketing.API V1");
|
||||
c.ConfigureOAuth2("marketingswaggerui", "", "", "Marketing Swagger UI");
|
||||
c.OAuthClientId("marketingswaggerui");
|
||||
c.OAuthAppName("Marketing Swagger UI");
|
||||
});
|
||||
|
||||
ConfigureEventBus(app);
|
||||
|
@ -48,11 +48,16 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
|
||||
else
|
||||
{
|
||||
await _requestManager.CreateRequestForCommandAsync<T>(message.Id);
|
||||
|
||||
// Send the embeded business command to mediator so it runs its related CommandHandler
|
||||
var result = await _mediator.Send(message.Command);
|
||||
|
||||
return result;
|
||||
try
|
||||
{
|
||||
// Send the embeded business command to mediator so it runs its related CommandHandler
|
||||
var result = await _mediator.Send(message.Command);
|
||||
return result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return default(R);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -30,20 +30,20 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentValidation.AspNetCore" Version="7.3.4" />
|
||||
<PackageReference Include="FluentValidation.AspNetCore" Version="7.5.0" />
|
||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="4.0.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="MediatR" Version="4.0.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="System.Reflection" Version="4.3.0" />
|
||||
<PackageReference Include="Dapper" Version="1.50.4" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
||||
<PackageReference Include="Polly" Version="5.6.1" />
|
||||
<PackageReference Include="Polly" Version="5.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -226,7 +226,8 @@
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Ordering.API V1");
|
||||
c.ConfigureOAuth2("orderingswaggerui", "", "", "Ordering Swagger UI");
|
||||
c.OAuthClientId("orderingswaggerui");
|
||||
c.OAuthAppName("Ordering Swagger UI");
|
||||
});
|
||||
|
||||
ConfigureEventBus(app);
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -11,9 +11,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Dapper" Version="1.50.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -6,11 +6,11 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O
|
||||
{
|
||||
public class Address : ValueObject
|
||||
{
|
||||
public String Street { get; private set; }
|
||||
public String City { get; private set; }
|
||||
public String State { get; private set; }
|
||||
public String Country { get; private set; }
|
||||
public String ZipCode { get; private set; }
|
||||
public String Street { get; }
|
||||
public String City { get; }
|
||||
public String State { get; }
|
||||
public String Country { get; }
|
||||
public String ZipCode { get; }
|
||||
|
||||
private Address() { }
|
||||
|
||||
|
@ -11,13 +11,13 @@ namespace Ordering.Domain.Events
|
||||
/// </summary>
|
||||
public class OrderStartedDomainEvent : INotification
|
||||
{
|
||||
public string UserId { get; private set; }
|
||||
public int CardTypeId { get; private set; }
|
||||
public string CardNumber { get; private set; }
|
||||
public string CardSecurityNumber { get; private set; }
|
||||
public string CardHolderName { get; private set; }
|
||||
public DateTime CardExpiration { get; private set; }
|
||||
public Order Order { get; private set; }
|
||||
public string UserId { get; }
|
||||
public int CardTypeId { get; }
|
||||
public string CardNumber { get; }
|
||||
public string CardSecurityNumber { get; }
|
||||
public string CardHolderName { get; }
|
||||
public DateTime CardExpiration { get; }
|
||||
public Order Order { get; }
|
||||
|
||||
public OrderStartedDomainEvent(Order order, string userId,
|
||||
int cardTypeId, string cardNumber,
|
||||
|
@ -21,17 +21,22 @@
|
||||
}
|
||||
|
||||
private List<INotification> _domainEvents;
|
||||
public List<INotification> DomainEvents => _domainEvents;
|
||||
|
||||
public IReadOnlyCollection<INotification> DomainEvents => _domainEvents?.AsReadOnly();
|
||||
|
||||
public void AddDomainEvent(INotification eventItem)
|
||||
{
|
||||
_domainEvents = _domainEvents ?? new List<INotification>();
|
||||
_domainEvents.Add(eventItem);
|
||||
}
|
||||
|
||||
public void RemoveDomainEvent(INotification eventItem)
|
||||
{
|
||||
if (_domainEvents is null) return;
|
||||
_domainEvents.Remove(eventItem);
|
||||
_domainEvents?.Remove(eventItem);
|
||||
}
|
||||
|
||||
public void ClearDomainEvents()
|
||||
{
|
||||
_domainEvents?.Clear();
|
||||
}
|
||||
|
||||
public bool IsTransient()
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@ -11,9 +11,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
protected Enumeration()
|
||||
{
|
||||
}
|
||||
protected Enumeration(){}
|
||||
|
||||
protected Enumeration(int id, string name)
|
||||
{
|
||||
@ -21,10 +19,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
public override string ToString() => Name;
|
||||
|
||||
public static IEnumerable<T> GetAll<T>() where T : Enumeration, new()
|
||||
{
|
||||
@ -37,9 +32,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
||||
var locatedValue = info.GetValue(instance) as T;
|
||||
|
||||
if (locatedValue != null)
|
||||
{
|
||||
yield return locatedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,9 +41,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
||||
var otherValue = obj as Enumeration;
|
||||
|
||||
if (otherValue == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var typeMatches = GetType().Equals(obj.GetType());
|
||||
var valueMatches = Id.Equals(otherValue.Id);
|
||||
@ -58,10 +49,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
||||
return typeMatches && valueMatches;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id.GetHashCode();
|
||||
}
|
||||
public override int GetHashCode() => Id.GetHashCode();
|
||||
|
||||
public static int AbsoluteDifference(Enumeration firstValue, Enumeration secondValue)
|
||||
{
|
||||
@ -86,18 +74,11 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork
|
||||
var matchingItem = GetAll<T>().FirstOrDefault(predicate);
|
||||
|
||||
if (matchingItem == null)
|
||||
{
|
||||
var message = string.Format("'{0}' is not a valid {1} in {2}", value, description, typeof(T));
|
||||
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
throw new InvalidOperationException($"'{value}' is not a valid {description} in {typeof(T)}");
|
||||
|
||||
return matchingItem;
|
||||
}
|
||||
|
||||
public int CompareTo(object other)
|
||||
{
|
||||
return Id.CompareTo(((Enumeration)other).Id);
|
||||
}
|
||||
public int CompareTo(object other) => Id.CompareTo(((Enumeration) other).Id);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace Ordering.Infrastructure
|
||||
.ToList();
|
||||
|
||||
domainEntities.ToList()
|
||||
.ForEach(entity => entity.Entity.DomainEvents.Clear());
|
||||
.ForEach(entity => entity.Entity.ClearDomainEvents());
|
||||
|
||||
var tasks = domainEvents
|
||||
.Select(async (domainEvent) => {
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -7,12 +7,12 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -18,13 +18,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.3" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
|
@ -27,13 +27,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.3 AS base
|
||||
FROM microsoft/aspnetcore:2.0.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.0 AS build
|
||||
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
@ -16,3 +16,4 @@ FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENTRYPOINT ["dotnet", "WebStatus.dll"]
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta3" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta5" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
|
||||
|
@ -44,10 +44,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.1" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AssemblyName>FunctionalTests</AssemblyName>
|
||||
<PackageId>FunctionalTests</PackageId>
|
||||
<AssemblyName>IntegrationTests</AssemblyName>
|
||||
<PackageId>IntegrationTests</PackageId>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
@ -44,13 +44,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="Moq" Version="4.7.142" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
|
||||
<PackageReference Include="Moq" Version="4.8.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.3.0" />
|
||||
<PackageReference Include="StackExchange.Redis.strongname" Version="1.2.4" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="StackExchange.Redis.strongname" Version="1.2.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -58,6 +58,15 @@ namespace IntegrationTests.Services.Basket
|
||||
string BuildBasket()
|
||||
{
|
||||
var order = new CustomerBasket("1234");
|
||||
|
||||
order.Items.Add(new BasketItem
|
||||
{
|
||||
ProductId = "1",
|
||||
ProductName = ".NET Bot Black Hoodie",
|
||||
UnitPrice = 10,
|
||||
Quantity = 1
|
||||
});
|
||||
|
||||
return JsonConvert.SerializeObject(order);
|
||||
}
|
||||
|
||||
@ -70,10 +79,10 @@ namespace IntegrationTests.Services.Basket
|
||||
State = "state",
|
||||
Country = "coutry",
|
||||
ZipCode = "zipcode",
|
||||
CardNumber = "CardNumber",
|
||||
CardNumber = "1234567890123456",
|
||||
CardHolderName = "CardHolderName",
|
||||
CardExpiration = DateTime.UtcNow,
|
||||
CardSecurityNumber = "1234",
|
||||
CardExpiration = DateTime.UtcNow.AddDays(1),
|
||||
CardSecurityNumber = "123",
|
||||
CardTypeId = 1,
|
||||
Buyer = "Buyer",
|
||||
RequestId = Guid.NewGuid()
|
||||
|
@ -21,12 +21,12 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||
<PackageReference Include="MediatR" Version="4.0.1" />
|
||||
<PackageReference Include="Moq" Version="4.7.142" />
|
||||
<PackageReference Include="xunit" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />
|
||||
<PackageReference Include="Moq" Version="4.8.1" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user