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.)
|
# List of microservices here needs to be updated to include all the new microservices (Marketing, etc.)
|
||||||
|
|
||||||
projectList=(
|
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/WebMVC"
|
||||||
"../src/Web/WebSPA"
|
"../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"
|
"../src/Web/WebStatus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ namespace eShopOnContainers.Core.Services.Order
|
|||||||
Task CreateOrderAsync(Models.Orders.Order newOrder, string token);
|
Task CreateOrderAsync(Models.Orders.Order newOrder, string token);
|
||||||
Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token);
|
Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token);
|
||||||
Task<Models.Orders.Order> GetOrderAsync(int orderId, 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);
|
Task<bool> CancelOrderAsync(int orderId, string token);
|
||||||
BasketCheckout MapOrderToBasket(Models.Orders.Order order);
|
BasketCheckout MapOrderToBasket(Models.Orders.Order order);
|
||||||
}
|
}
|
||||||
|
@ -59,13 +59,6 @@ namespace eShopOnContainers.Core.Services.Order
|
|||||||
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" }
|
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" },
|
|
||||||
};
|
|
||||||
|
|
||||||
private static BasketCheckout MockBasketCheckout = new BasketCheckout()
|
private static BasketCheckout MockBasketCheckout = new BasketCheckout()
|
||||||
{
|
{
|
||||||
CardExpiration = DateTime.UtcNow,
|
CardExpiration = DateTime.UtcNow,
|
||||||
@ -114,16 +107,6 @@ 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)
|
public BasketCheckout MapOrderToBasket(Models.Orders.Order order)
|
||||||
{
|
{
|
||||||
return MockBasketCheckout;
|
return MockBasketCheckout;
|
||||||
|
@ -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)
|
public BasketCheckout MapOrderToBasket(Models.Orders.Order order)
|
||||||
{
|
{
|
||||||
return new BasketCheckout()
|
return new BasketCheckout()
|
||||||
|
@ -16,7 +16,6 @@ namespace eShopOnContainers.Core.Services.User
|
|||||||
|
|
||||||
public async Task<UserInfo> GetUserInfoAsync(string authToken)
|
public async Task<UserInfo> GetUserInfoAsync(string authToken)
|
||||||
{
|
{
|
||||||
|
|
||||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint);
|
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint);
|
||||||
|
|
||||||
string uri = builder.ToString();
|
string uri = builder.ToString();
|
||||||
@ -25,7 +24,6 @@ namespace eShopOnContainers.Core.Services.User
|
|||||||
await _requestProvider.GetAsync<UserInfo>(uri, authToken);
|
await _requestProvider.GetAsync<UserInfo>(uri, authToken);
|
||||||
|
|
||||||
return userInfo;
|
return userInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -65,6 +65,20 @@
|
|||||||
Value="True" />
|
Value="True" />
|
||||||
</Style>
|
</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"
|
<Style x:Key="HeaderLabelStyle"
|
||||||
TargetType="{x:Type Label}">
|
TargetType="{x:Type Label}">
|
||||||
<Setter Property="FontFamily"
|
<Setter Property="FontFamily"
|
||||||
@ -169,9 +183,9 @@
|
|||||||
<Entry.Style>
|
<Entry.Style>
|
||||||
<OnPlatform
|
<OnPlatform
|
||||||
x:TypeArguments="Style"
|
x:TypeArguments="Style"
|
||||||
iOS="{StaticResource EntryStyle}"
|
iOS="{StaticResource SettingsEntryStyle}"
|
||||||
Android="{StaticResource EntryStyle}"
|
Android="{StaticResource SettingsEntryStyle}"
|
||||||
WinPhone="{StaticResource UwpEntryStyle}"/>
|
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
|
||||||
</Entry.Style>
|
</Entry.Style>
|
||||||
</Entry>
|
</Entry>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
@ -226,9 +240,9 @@
|
|||||||
<Entry.Style>
|
<Entry.Style>
|
||||||
<OnPlatform
|
<OnPlatform
|
||||||
x:TypeArguments="Style"
|
x:TypeArguments="Style"
|
||||||
iOS="{StaticResource EntryStyle}"
|
iOS="{StaticResource SettingsEntryStyle}"
|
||||||
Android="{StaticResource EntryStyle}"
|
Android="{StaticResource SettingsEntryStyle}"
|
||||||
WinPhone="{StaticResource UwpEntryStyle}"/>
|
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
|
||||||
</Entry.Style>
|
</Entry.Style>
|
||||||
</Entry>
|
</Entry>
|
||||||
<Label
|
<Label
|
||||||
@ -240,9 +254,9 @@
|
|||||||
<Entry.Style>
|
<Entry.Style>
|
||||||
<OnPlatform
|
<OnPlatform
|
||||||
x:TypeArguments="Style"
|
x:TypeArguments="Style"
|
||||||
iOS="{StaticResource EntryStyle}"
|
iOS="{StaticResource SettingsEntryStyle}"
|
||||||
Android="{StaticResource EntryStyle}"
|
Android="{StaticResource SettingsEntryStyle}"
|
||||||
WinPhone="{StaticResource UwpEntryStyle}"/>
|
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
|
||||||
</Entry.Style>
|
</Entry.Style>
|
||||||
</Entry>
|
</Entry>
|
||||||
<Button
|
<Button
|
||||||
|
@ -161,7 +161,6 @@
|
|||||||
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll</HintPath>
|
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ObjectModel" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7, processorArchitecture=MSIL">
|
<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);
|
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
|
||||||
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
|
//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>()
|
services.AddIdentity<ApplicationUser, IdentityRole>()
|
||||||
@ -91,7 +91,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
|||||||
{
|
{
|
||||||
sqlOptions.MigrationsAssembly(migrationsAssembly);
|
sqlOptions.MigrationsAssembly(migrationsAssembly);
|
||||||
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
|
//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 =>
|
.AddOperationalStore(options =>
|
||||||
@ -101,7 +101,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
|||||||
{
|
{
|
||||||
sqlOptions.MigrationsAssembly(migrationsAssembly);
|
sqlOptions.MigrationsAssembly(migrationsAssembly);
|
||||||
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
|
//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>();
|
.Services.AddTransient<IProfileService, ProfileService>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user