Merge branch 'dev' of https://github.com/dotnet-architecture/eShopOnContainers into dev
This commit is contained in:
commit
97a6728d70
@ -3,12 +3,15 @@
|
||||
# List of microservices here needs to be updated to include all the new microservices (Marketing, etc.)
|
||||
|
||||
projectList=(
|
||||
"../src/Services/Catalog/Catalog.API"
|
||||
"../src/Services/Basket/Basket.API"
|
||||
"../src/Services/Ordering/Ordering.API"
|
||||
"../src/Services/Identity/Identity.API"
|
||||
"../src/Web/WebMVC"
|
||||
"../src/Web/WebSPA"
|
||||
"../src/Services/Identity/Identity.API"
|
||||
"../src/Services/Catalog/Catalog.API"
|
||||
"../src/Services/Ordering/Ordering.API"
|
||||
"../src/Services/Basket/Basket.API"
|
||||
"../src/Services/Location/Locations.API"
|
||||
"../src/Services/Marketing/Marketing.API"
|
||||
"../src/Services/Payment/Payment.API"
|
||||
"../src/Web/WebStatus"
|
||||
)
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace eShopOnContainers.Core.Services.Basket
|
||||
CustomerBasket basket =
|
||||
await _requestProvider.GetAsync<CustomerBasket>(uri, token);
|
||||
|
||||
ServicesHelper.FixBasketItemPictureUri(basket?.Items);
|
||||
ServicesHelper.FixBasketItemPictureUri(basket?.Items);
|
||||
|
||||
return basket;
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ namespace eShopOnContainers.Core.Services.Order
|
||||
Task CreateOrderAsync(Models.Orders.Order newOrder, string token);
|
||||
Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token);
|
||||
Task<Models.Orders.Order> GetOrderAsync(int orderId, string token);
|
||||
Task<ObservableCollection<Models.Orders.CardType>> GetCardTypesAsync(string token);
|
||||
Task<bool> CancelOrderAsync(int orderId, string token);
|
||||
BasketCheckout MapOrderToBasket(Models.Orders.Order order);
|
||||
}
|
||||
|
@ -55,15 +55,8 @@ namespace eShopOnContainers.Core.Services.Order
|
||||
|
||||
private static List<OrderItem> MockOrderItems = new List<OrderItem>()
|
||||
{
|
||||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId01, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png" },
|
||||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId03, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png" }
|
||||
};
|
||||
|
||||
private static List<CardType> MockCardTypes = new List<CardType>()
|
||||
{
|
||||
new CardType { Id = 1, Name = "Amex" },
|
||||
new CardType { Id = 2, Name = "Visa" },
|
||||
new CardType { Id = 3, Name = "MasterCard" },
|
||||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId01, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png" },
|
||||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId03, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png" }
|
||||
};
|
||||
|
||||
private static BasketCheckout MockBasketCheckout = new BasketCheckout()
|
||||
@ -114,19 +107,9 @@ namespace eShopOnContainers.Core.Services.Order
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ObservableCollection<CardType>> GetCardTypesAsync(string token)
|
||||
{
|
||||
await Task.Delay(500);
|
||||
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
return MockCardTypes.ToObservableCollection();
|
||||
else
|
||||
return new ObservableCollection<CardType>();
|
||||
}
|
||||
|
||||
public BasketCheckout MapOrderToBasket(Models.Orders.Order order)
|
||||
{
|
||||
return MockBasketCheckout;
|
||||
return MockBasketCheckout;
|
||||
}
|
||||
|
||||
public Task<bool> CancelOrderAsync(int orderId, string token)
|
||||
|
@ -34,7 +34,7 @@ namespace eShopOnContainers.Core.Services.Order
|
||||
await _requestProvider.GetAsync<ObservableCollection<Models.Orders.Order>>(uri, token);
|
||||
|
||||
return orders;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public async Task<Models.Orders.Order> GetOrderAsync(int orderId, string token)
|
||||
@ -58,27 +58,6 @@ namespace eShopOnContainers.Core.Services.Order
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ObservableCollection<Models.Orders.CardType>> GetCardTypesAsync(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
|
||||
|
||||
builder.Path = "api/v1/orders/cardtypes";
|
||||
|
||||
string uri = builder.ToString();
|
||||
|
||||
ObservableCollection<Models.Orders.CardType> cardTypes =
|
||||
await _requestProvider.GetAsync<ObservableCollection<Models.Orders.CardType>>(uri, token);
|
||||
|
||||
return cardTypes;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new ObservableCollection<Models.Orders.CardType>();
|
||||
}
|
||||
}
|
||||
|
||||
public BasketCheckout MapOrderToBasket(Models.Orders.Order order)
|
||||
{
|
||||
return new BasketCheckout()
|
||||
|
@ -16,7 +16,6 @@ namespace eShopOnContainers.Core.Services.User
|
||||
|
||||
public async Task<UserInfo> GetUserInfoAsync(string authToken)
|
||||
{
|
||||
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint);
|
||||
|
||||
string uri = builder.ToString();
|
||||
@ -25,7 +24,6 @@ namespace eShopOnContainers.Core.Services.User
|
||||
await _requestProvider.GetAsync<UserInfo>(uri, authToken);
|
||||
|
||||
return userInfo;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -65,6 +65,20 @@
|
||||
Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SettingsEntryStyle"
|
||||
TargetType="{x:Type Entry}"
|
||||
BasedOn="{StaticResource EntryStyle}">
|
||||
<Setter Property="Margin"
|
||||
Value="12, 0" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SettingsUwpEntryStyle"
|
||||
TargetType="{x:Type Entry}"
|
||||
BasedOn="{StaticResource UwpEntryStyle}">
|
||||
<Setter Property="Margin"
|
||||
Value="12, 0" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HeaderLabelStyle"
|
||||
TargetType="{x:Type Label}">
|
||||
<Setter Property="FontFamily"
|
||||
@ -169,9 +183,9 @@
|
||||
<Entry.Style>
|
||||
<OnPlatform
|
||||
x:TypeArguments="Style"
|
||||
iOS="{StaticResource EntryStyle}"
|
||||
Android="{StaticResource EntryStyle}"
|
||||
WinPhone="{StaticResource UwpEntryStyle}"/>
|
||||
iOS="{StaticResource SettingsEntryStyle}"
|
||||
Android="{StaticResource SettingsEntryStyle}"
|
||||
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
|
||||
</Entry.Style>
|
||||
</Entry>
|
||||
</StackLayout>
|
||||
@ -226,9 +240,9 @@
|
||||
<Entry.Style>
|
||||
<OnPlatform
|
||||
x:TypeArguments="Style"
|
||||
iOS="{StaticResource EntryStyle}"
|
||||
Android="{StaticResource EntryStyle}"
|
||||
WinPhone="{StaticResource UwpEntryStyle}"/>
|
||||
iOS="{StaticResource SettingsEntryStyle}"
|
||||
Android="{StaticResource SettingsEntryStyle}"
|
||||
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
|
||||
</Entry.Style>
|
||||
</Entry>
|
||||
<Label
|
||||
@ -240,9 +254,9 @@
|
||||
<Entry.Style>
|
||||
<OnPlatform
|
||||
x:TypeArguments="Style"
|
||||
iOS="{StaticResource EntryStyle}"
|
||||
Android="{StaticResource EntryStyle}"
|
||||
WinPhone="{StaticResource UwpEntryStyle}"/>
|
||||
iOS="{StaticResource SettingsEntryStyle}"
|
||||
Android="{StaticResource SettingsEntryStyle}"
|
||||
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
|
||||
</Entry.Style>
|
||||
</Entry>
|
||||
<Button
|
||||
|
@ -161,7 +161,6 @@
|
||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ObjectModel" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7, processorArchitecture=MSIL">
|
||||
|
@ -42,7 +42,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
||||
{
|
||||
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
|
||||
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
|
||||
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
|
||||
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
|
||||
}));
|
||||
|
||||
services.AddIdentity<ApplicationUser, IdentityRole>()
|
||||
@ -91,7 +91,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
||||
{
|
||||
sqlOptions.MigrationsAssembly(migrationsAssembly);
|
||||
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
|
||||
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
|
||||
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
|
||||
});
|
||||
})
|
||||
.AddOperationalStore(options =>
|
||||
@ -101,7 +101,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
||||
{
|
||||
sqlOptions.MigrationsAssembly(migrationsAssembly);
|
||||
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
|
||||
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
|
||||
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
|
||||
});
|
||||
})
|
||||
.Services.AddTransient<IProfileService, ProfileService>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user