Merge pull request #171 from dotnet/xamarin
Xamarin Client: Replaced Unity with Autofac. Fixes #147
This commit is contained in:
commit
47bbc722cb
@ -27,8 +27,7 @@ namespace eShopOnContainers
|
||||
private void InitApp()
|
||||
{
|
||||
UseMockServices = Settings.UseMocks;
|
||||
ViewModelLocator.Initialize();
|
||||
ViewModelLocator.UpdateDependencies(UseMockServices);
|
||||
ViewModelLocator.RegisterDependencies(UseMockServices);
|
||||
}
|
||||
|
||||
private Task InitNavigation()
|
||||
|
@ -1,4 +1,3 @@
|
||||
using eShopOnContainers.Core.ViewModels.Base;
|
||||
using Plugin.Settings;
|
||||
using Plugin.Settings.Abstractions;
|
||||
|
||||
@ -32,7 +31,6 @@ namespace eShopOnContainers.Core.Helpers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public static string AuthAccessToken
|
||||
{
|
||||
get
|
||||
@ -57,7 +55,6 @@ namespace eShopOnContainers.Core.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool UseMocks
|
||||
{
|
||||
get
|
||||
|
@ -1,11 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Identity
|
||||
namespace eShopOnContainers.Core.Services.Identity
|
||||
{
|
||||
public interface IIdentityService
|
||||
{
|
||||
string CreateAuthorizeRequest();
|
||||
string CreateAuthorizationRequest();
|
||||
string CreateLogoutRequest(string token);
|
||||
string DecodeToken(string token);
|
||||
}
|
||||
}
|
@ -1,19 +1,15 @@
|
||||
using IdentityModel.Client;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Identity
|
||||
{
|
||||
public class IdentityService : IIdentityService
|
||||
{
|
||||
public string CreateAuthorizeRequest()
|
||||
public string CreateAuthorizationRequest()
|
||||
{
|
||||
// Create URI to authorize endpoint
|
||||
var authorizeRequest =
|
||||
new AuthorizeRequest(GlobalSetting.Instance.IdentityEndpoint);
|
||||
// Create URI to authorization endpoint
|
||||
var authorizeRequest = new AuthorizeRequest(GlobalSetting.Instance.IdentityEndpoint);
|
||||
|
||||
// Dictionary with values for the authorize request
|
||||
var dic = new Dictionary<string, string>();
|
||||
@ -29,7 +25,6 @@ namespace eShopOnContainers.Core.Services.Identity
|
||||
dic.Add("state", currentCSRFToken);
|
||||
|
||||
var authorizeUri = authorizeRequest.Create(dic);
|
||||
|
||||
return authorizeUri;
|
||||
}
|
||||
|
||||
@ -45,30 +40,5 @@ namespace eShopOnContainers.Core.Services.Identity
|
||||
token,
|
||||
GlobalSetting.Instance.LogoutCallback);
|
||||
}
|
||||
|
||||
public string DecodeToken(string token)
|
||||
{
|
||||
var parts = token.Split('.');
|
||||
|
||||
string partToConvert = parts[1];
|
||||
partToConvert = partToConvert.Replace('-', '+');
|
||||
partToConvert = partToConvert.Replace('_', '/');
|
||||
switch (partToConvert.Length % 4)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 2:
|
||||
partToConvert += "==";
|
||||
break;
|
||||
case 3:
|
||||
partToConvert += "=";
|
||||
break;
|
||||
}
|
||||
|
||||
var partAsBytes = Convert.FromBase64String(partToConvert);
|
||||
var partAsUTF8String = Encoding.UTF8.GetString(partAsBytes, 0, partAsBytes.Count());
|
||||
|
||||
return JObject.Parse(partAsUTF8String).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,16 +6,8 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
{
|
||||
Task<TResult> GetAsync<TResult>(string uri, string token = "");
|
||||
|
||||
Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "");
|
||||
|
||||
Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "", string header = "");
|
||||
|
||||
Task<TResult> PostAsync<TRequest, TResult>(string uri, TRequest data, string token = "");
|
||||
|
||||
Task<TResult> PutAsync<TResult>(string uri, TResult data, string token = "");
|
||||
|
||||
Task<TResult> PutAsync<TRequest, TResult>(string uri, TRequest data, string token = "");
|
||||
|
||||
Task DeleteAsync(string uri, string token = "");
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@ using Newtonsoft.Json.Serialization;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
@ -23,7 +22,6 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
};
|
||||
|
||||
_serializerSettings.Converters.Add(new StringEnumConverter());
|
||||
}
|
||||
|
||||
@ -33,7 +31,6 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
HttpResponseMessage response = await httpClient.GetAsync(uri);
|
||||
|
||||
await HandleResponse(response);
|
||||
|
||||
string serialized = await response.Content.ReadAsStringAsync();
|
||||
|
||||
TResult result = await Task.Run(() =>
|
||||
@ -56,7 +53,6 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
HttpResponseMessage response = await httpClient.PostAsync(uri, content);
|
||||
|
||||
await HandleResponse(response);
|
||||
|
||||
string serialized = await response.Content.ReadAsStringAsync();
|
||||
|
||||
TResult result = await Task.Run(() =>
|
||||
@ -65,61 +61,21 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
return result;
|
||||
}
|
||||
|
||||
public Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "")
|
||||
{
|
||||
return PostAsync<TResult, TResult>(uri, data, token);
|
||||
}
|
||||
|
||||
public async Task<TResult> PostAsync<TRequest, TResult>(string uri, TRequest data, string token = "")
|
||||
{
|
||||
HttpClient httpClient = CreateHttpClient(token);
|
||||
string serialized = await Task.Run(() => JsonConvert.SerializeObject(data, _serializerSettings));
|
||||
var content = new StringContent(serialized, Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response = await httpClient.PostAsync(uri, content);
|
||||
|
||||
await HandleResponse(response);
|
||||
|
||||
string responseData = await response.Content.ReadAsStringAsync();
|
||||
|
||||
return await Task.Run(() => JsonConvert.DeserializeObject<TResult>(responseData, _serializerSettings));
|
||||
}
|
||||
|
||||
public Task<TResult> PutAsync<TResult>(string uri, TResult data, string token = "")
|
||||
{
|
||||
return PutAsync<TResult, TResult>(uri, data, token);
|
||||
}
|
||||
|
||||
public async Task<TResult> PutAsync<TRequest, TResult>(string uri, TRequest data, string token = "")
|
||||
{
|
||||
HttpClient httpClient = CreateHttpClient(token);
|
||||
string serialized = await Task.Run(() => JsonConvert.SerializeObject(data, _serializerSettings));
|
||||
HttpResponseMessage response = await httpClient.PutAsync(uri, new StringContent(serialized, Encoding.UTF8, "application/json"));
|
||||
|
||||
await HandleResponse(response);
|
||||
|
||||
string responseData = await response.Content.ReadAsStringAsync();
|
||||
|
||||
return await Task.Run(() => JsonConvert.DeserializeObject<TResult>(responseData, _serializerSettings));
|
||||
}
|
||||
|
||||
public async Task DeleteAsync(string uri, string token = "")
|
||||
{
|
||||
HttpClient httpClient = CreateHttpClient(token);
|
||||
|
||||
await httpClient.DeleteAsync(uri);
|
||||
}
|
||||
|
||||
private HttpClient CreateHttpClient(string token = "")
|
||||
{
|
||||
var httpClient = new HttpClient();
|
||||
|
||||
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||
}
|
||||
|
||||
return httpClient;
|
||||
}
|
||||
|
||||
@ -140,8 +96,8 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
{
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.Forbidden
|
||||
|| response.StatusCode == HttpStatusCode.Unauthorized)
|
||||
if (response.StatusCode == HttpStatusCode.Forbidden ||
|
||||
response.StatusCode == HttpStatusCode.Unauthorized)
|
||||
{
|
||||
throw new ServiceAuthenticationException(content);
|
||||
}
|
||||
|
70
src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs
Normal file → Executable file
70
src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
using Microsoft.Practices.Unity;
|
||||
using Autofac;
|
||||
using eShopOnContainers.Services;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
@ -16,7 +16,7 @@ namespace eShopOnContainers.Core.ViewModels.Base
|
||||
{
|
||||
public static class ViewModelLocator
|
||||
{
|
||||
private static readonly IUnityContainer _unityContainer = new UnityContainer();
|
||||
private static IContainer _container;
|
||||
|
||||
public static readonly BindableProperty AutoWireViewModelProperty =
|
||||
BindableProperty.CreateAttached("AutoWireViewModel", typeof(bool), typeof(ViewModelLocator), default(bool), propertyChanged: OnAutoWireViewModelChanged);
|
||||
@ -33,56 +33,56 @@ namespace eShopOnContainers.Core.ViewModels.Base
|
||||
|
||||
public static bool UseMockService { get; set; }
|
||||
|
||||
public static void Initialize()
|
||||
public static void RegisterDependencies(bool useMockServices)
|
||||
{
|
||||
// Services
|
||||
_unityContainer.RegisterType<IDialogService, DialogService>();
|
||||
_unityContainer.RegisterType<INavigationService, NavigationService>(new ContainerControlledLifetimeManager());
|
||||
_unityContainer.RegisterType<IOpenUrlService, OpenUrlService>();
|
||||
_unityContainer.RegisterType<IRequestProvider, RequestProvider>();
|
||||
_unityContainer.RegisterType<IIdentityService, IdentityService>();
|
||||
_unityContainer.RegisterType<ICatalogService, CatalogMockService>();
|
||||
_unityContainer.RegisterType<IBasketService, BasketMockService>();
|
||||
_unityContainer.RegisterType<IUserService, UserMockService>();
|
||||
var builder = new ContainerBuilder();
|
||||
|
||||
// View models
|
||||
_unityContainer.RegisterType<BasketViewModel>();
|
||||
_unityContainer.RegisterType<CatalogViewModel>();
|
||||
_unityContainer.RegisterType<CheckoutViewModel>();
|
||||
_unityContainer.RegisterType<LoginViewModel>();
|
||||
_unityContainer.RegisterType<MainViewModel>();
|
||||
_unityContainer.RegisterType<OrderDetailViewModel>();
|
||||
_unityContainer.RegisterType<ProfileViewModel>();
|
||||
_unityContainer.RegisterType<SettingsViewModel>();
|
||||
}
|
||||
builder.RegisterType<BasketViewModel>();
|
||||
builder.RegisterType<CatalogViewModel>();
|
||||
builder.RegisterType<CheckoutViewModel>();
|
||||
builder.RegisterType<LoginViewModel>();
|
||||
builder.RegisterType<MainViewModel>();
|
||||
builder.RegisterType<OrderDetailViewModel>();
|
||||
builder.RegisterType<ProfileViewModel>();
|
||||
builder.RegisterType<SettingsViewModel>();
|
||||
|
||||
// Services
|
||||
builder.RegisterType<NavigationService>().As<INavigationService>().SingleInstance();
|
||||
builder.RegisterType<DialogService>().As<IDialogService>();
|
||||
builder.RegisterType<OpenUrlService>().As<IOpenUrlService>();
|
||||
builder.RegisterType<IdentityService>().As<IIdentityService>();
|
||||
builder.RegisterType<RequestProvider>().As<IRequestProvider>();
|
||||
|
||||
public static void UpdateDependencies(bool useMockServices)
|
||||
{
|
||||
// Change injected dependencies
|
||||
if (useMockServices)
|
||||
{
|
||||
_unityContainer.RegisterInstance<ICatalogService>(new CatalogMockService());
|
||||
_unityContainer.RegisterInstance<IBasketService>(new BasketMockService());
|
||||
_unityContainer.RegisterInstance<IOrderService>(new OrderMockService());
|
||||
_unityContainer.RegisterInstance<IUserService>(new UserMockService());
|
||||
builder.RegisterInstance(new CatalogMockService()).As<ICatalogService>();
|
||||
builder.RegisterInstance(new BasketMockService()).As<IBasketService>();
|
||||
builder.RegisterInstance(new OrderMockService()).As<IOrderService>();
|
||||
builder.RegisterInstance(new UserMockService()).As<IUserService>();
|
||||
|
||||
UseMockService = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var requestProvider = Resolve<IRequestProvider>();
|
||||
_unityContainer.RegisterInstance<ICatalogService>(new CatalogService(requestProvider));
|
||||
_unityContainer.RegisterInstance<IBasketService>(new BasketService(requestProvider));
|
||||
_unityContainer.RegisterInstance<IOrderService>(new OrderService(requestProvider));
|
||||
_unityContainer.RegisterInstance<IUserService>(new UserService(requestProvider));
|
||||
builder.RegisterType<CatalogService>().As<ICatalogService>().SingleInstance();
|
||||
builder.RegisterType<BasketService>().As<IBasketService>().SingleInstance();
|
||||
builder.RegisterType<OrderService>().As<IOrderService>().SingleInstance();
|
||||
builder.RegisterType<UserService>().As<IUserService>().SingleInstance();
|
||||
|
||||
UseMockService = false;
|
||||
}
|
||||
|
||||
if (_container != null)
|
||||
{
|
||||
_container.Dispose();
|
||||
}
|
||||
_container = builder.Build();
|
||||
}
|
||||
|
||||
public static T Resolve<T>()
|
||||
{
|
||||
return _unityContainer.Resolve<T>();
|
||||
return _container.Resolve<T>();
|
||||
}
|
||||
|
||||
private static void OnAutoWireViewModelChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
@ -103,7 +103,7 @@ namespace eShopOnContainers.Core.ViewModels.Base
|
||||
{
|
||||
return;
|
||||
}
|
||||
var viewModel = _unityContainer.Resolve(viewModelType);
|
||||
var viewModel = _container.Resolve(viewModelType);
|
||||
view.BindingContext = viewModel;
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
|
||||
await Task.Delay(500);
|
||||
|
||||
LoginUrl = _identityService.CreateAuthorizeRequest();
|
||||
LoginUrl = _identityService.CreateAuthorizationRequest();
|
||||
|
||||
IsValid = true;
|
||||
IsLogin = true;
|
||||
@ -228,7 +228,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
Settings.AuthAccessToken = string.Empty;
|
||||
Settings.AuthIdToken = string.Empty;
|
||||
IsLogin = false;
|
||||
LoginUrl = _identityService.CreateAuthorizeRequest();
|
||||
LoginUrl = _identityService.CreateAuthorizationRequest();
|
||||
}
|
||||
else if (unescapedUrl.Contains(GlobalSetting.Instance.IdentityCallback))
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using eShopOnContainers.Core.Models.Orders;
|
||||
using eShopOnContainers.Core.ViewModels.Base;
|
||||
using eShopOnContainers.Core.Services.Catalog;
|
||||
using eShopOnContainers.Core.Services.Basket;
|
||||
using eShopOnContainers.Core.Services.Order;
|
||||
using System;
|
||||
using eShopOnContainers.Core.Helpers;
|
||||
@ -11,9 +9,8 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
{
|
||||
public class OrderDetailViewModel : ViewModelBase
|
||||
{
|
||||
private Order _order;
|
||||
|
||||
private IOrderService _ordersService;
|
||||
private Order _order;
|
||||
|
||||
public OrderDetailViewModel(IOrderService ordersService)
|
||||
{
|
||||
|
@ -71,16 +71,14 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
|
||||
private void MockServices()
|
||||
{
|
||||
ViewModelLocator.UpdateDependencies(!UseAzureServices);
|
||||
ViewModelLocator.RegisterDependencies(!UseAzureServices);
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
public override Task InitializeAsync(object navigationData)
|
||||
{
|
||||
UpdateInfo();
|
||||
|
||||
Endpoint = Settings.UrlBase;
|
||||
|
||||
return base.InitializeAsync(navigationData);
|
||||
}
|
||||
|
||||
@ -89,12 +87,12 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
if (!UseAzureServices)
|
||||
{
|
||||
Title = "Use Mock Services";
|
||||
Description = "Mock Services are simulated objects that mimic the behavior of real services in controlled ways";
|
||||
Description = "Mock Services are simulated objects that mimic the behavior of real services using a controlled approach.";
|
||||
}
|
||||
else
|
||||
{
|
||||
Title = "Use Microservices/Containers from eShopOnContainers";
|
||||
Description = "When enabling the use of microservices/containers the Xamarin.Forms app will try to use real services deployed as Docker containers in the specified base IP that will need to be reachable through the network";
|
||||
Description = "When enabling the use of microservices/containers, the app will attempt to use real services deployed as Docker containers at the specified base endpoint, which will must be reachable through the network.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,11 +11,11 @@
|
||||
<RootNamespace>eShopOnContainers.Core</RootNamespace>
|
||||
<AssemblyName>eShopOnContainers.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile>Profile111</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -170,85 +170,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Acr.UserDialogs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.3.3\lib\portable-win+net45+wp8+win8+wpa81\Acr.UserDialogs.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Acr.UserDialogs.6.3.3\lib\portable-win+net45+wp8+win8+wpa81\Acr.UserDialogs.Interface.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.2.6-pre-256\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.6-pre-256\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.FFImageLoading.2.2.6-pre-256\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="IdentityModel.Portable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\IdentityModel.1.3.1\lib\portable-net45+wp80+win8+wpa81\IdentityModel.Portable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.2-beta1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Plugin.Settings, Version=2.6.0.12, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.2.6.0.12-beta\lib\portable-net45+wp80+win8+wpa81\Plugin.Settings.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Plugin.Settings.Abstractions, Version=2.6.0.12, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xam.Plugins.Settings.2.6.0.12-beta\lib\portable-net45+wp80+win8+wpa81\Plugin.Settings.Abstractions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SlideOverKit, Version=1.0.6135.18790, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\SlideOverKit.2.1.4\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\SlideOverKit.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Splat.1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Pages, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.Pages.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10\Xamarin.Forms.Pages.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.3.175\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<None Include="project.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Controls\AddBasketButton.xaml">
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Acr.UserDialogs" version="6.3.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="CommonServiceLocator" version="1.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="IdentityModel" version="1.3.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="modernhttpclient" version="2.4.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Newtonsoft.Json" version="9.0.2-beta1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="SlideOverKit" version="2.1.4" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Splat" version="1.6.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Unity" version="4.0.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xam.Plugins.Settings" version="2.6.0.12-beta" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xamarin.FFImageLoading" version="2.2.6-pre-256" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xamarin.FFImageLoading.Forms" version="2.2.6-pre-256" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xamarin.Forms" version="2.3.3.175" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xamarin.Forms.Pages" version="2.3.3.175" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xamarin.Forms.Theme.Base" version="1.0.0.43-pre1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
<package id="Xamarin.Forms.Theme.Light" version="1.0.0.43-pre1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||
</packages>
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"Acr.UserDialogs": "6.3.3",
|
||||
"Autofac": "4.4.0",
|
||||
"CommonServiceLocator": "1.3",
|
||||
"IdentityModel": "1.3.1",
|
||||
"Microsoft.Bcl": "1.1.10",
|
||||
"Microsoft.Bcl.Build": "1.0.21",
|
||||
"Microsoft.Net.Http": "2.2.29",
|
||||
"modernhttpclient": "2.4.2",
|
||||
"Newtonsoft.Json": "9.0.2-beta1",
|
||||
"SlideOverKit": "2.1.4",
|
||||
"Splat": "1.6.2",
|
||||
"Xam.Plugins.Settings": "2.6.0.12-beta",
|
||||
"Xamarin.FFImageLoading": "2.2.6-pre-256",
|
||||
"Xamarin.FFImageLoading.Forms": "2.2.6-pre-256",
|
||||
"Xamarin.Forms": "2.3.3.175",
|
||||
"Xamarin.Forms.Pages": "2.3.3.175",
|
||||
"Xamarin.Forms.Theme.Base": "1.0.0.43-pre1",
|
||||
"Xamarin.Forms.Theme.Light": "1.0.0.43-pre1"
|
||||
},
|
||||
"frameworks": {
|
||||
".NETPortable,Version=v4.5,Profile=Profile111": {}
|
||||
}
|
||||
}
|
@ -21,10 +21,11 @@
|
||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
||||
<AndroidStoreUncompressedFileExtensions />
|
||||
<MandroidI18n />
|
||||
<JavaMaximumHeapSize />
|
||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
||||
<JavaOptions />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<AndroidTlsProvider></AndroidTlsProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
@ -37,14 +38,8 @@
|
||||
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
|
||||
<AndroidLinkMode>None</AndroidLinkMode>
|
||||
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
|
||||
<BundleAssemblies>False</BundleAssemblies>
|
||||
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
|
||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
||||
<Debugger>Xamarin</Debugger>
|
||||
<AotAssemblies>False</AotAssemblies>
|
||||
<EnableLLVM>False</EnableLLVM>
|
||||
<AndroidEnableMultiDex>False</AndroidEnableMultiDex>
|
||||
<EnableProguard>False</EnableProguard>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@ -102,10 +97,6 @@
|
||||
<HintPath>..\..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\ModernHttpClient.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -35,7 +35,6 @@
|
||||
<package id="System.Threading.Tasks" version="4.0.11" targetFramework="monoandroid70" />
|
||||
<package id="System.Xml.ReaderWriter" version="4.0.11" targetFramework="monoandroid70" />
|
||||
<package id="System.Xml.XDocument" version="4.0.11" targetFramework="monoandroid70" />
|
||||
<package id="Unity" version="4.0.1" targetFramework="monoandroid70" />
|
||||
<package id="Xam.Plugins.Settings" version="2.6.0.12-beta" targetFramework="monoandroid70" />
|
||||
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid70" />
|
||||
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid70" />
|
||||
|
1
src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json
Normal file → Executable file
1
src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json
Normal file → Executable file
@ -5,7 +5,6 @@
|
||||
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
|
||||
"Newtonsoft.Json": "9.0.1",
|
||||
"SlideOverKit": "2.1.4",
|
||||
"Unity": "4.0.1",
|
||||
"Xam.Plugins.Settings": "2.6.0.12-beta",
|
||||
"Xamarin.FFImageLoading": "2.2.6-pre-256",
|
||||
"Xamarin.FFImageLoading.Forms": "2.2.6-pre-256",
|
||||
|
@ -166,10 +166,6 @@
|
||||
<HintPath>..\..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\modernhttpclient.2.4.2\lib\Xamarin.iOS10\ModernHttpClient.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -11,7 +11,6 @@
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="xamarinios10" />
|
||||
<package id="SlideOverKit" version="2.1.4" targetFramework="xamarinios10" />
|
||||
<package id="Splat" version="1.6.2" targetFramework="xamarinios10" />
|
||||
<package id="Unity" version="4.0.1" targetFramework="xamarinios10" />
|
||||
<package id="WebP.Touch" version="1.0.2" targetFramework="xamarinios10" />
|
||||
<package id="Xam.Plugins.Settings" version="2.6.0.12-beta" targetFramework="xamarinios10" />
|
||||
<package id="Xamarin.FFImageLoading" version="2.2.6-pre-256" targetFramework="xamarinios10" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user