Skip to content

Commit 97a6728

Browse files
committed
2 parents 7801238 + 617bcdc commit 97a6728

9 files changed

Lines changed: 38 additions & 63 deletions

File tree

cli-mac/build-bits.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
# List of microservices here needs to be updated to include all the new microservices (Marketing, etc.)
44

55
projectList=(
6-
"../src/Services/Catalog/Catalog.API"
7-
"../src/Services/Basket/Basket.API"
8-
"../src/Services/Ordering/Ordering.API"
9-
"../src/Services/Identity/Identity.API"
106
"../src/Web/WebMVC"
117
"../src/Web/WebSPA"
8+
"../src/Services/Identity/Identity.API"
9+
"../src/Services/Catalog/Catalog.API"
10+
"../src/Services/Ordering/Ordering.API"
11+
"../src/Services/Basket/Basket.API"
12+
"../src/Services/Location/Locations.API"
13+
"../src/Services/Marketing/Marketing.API"
14+
"../src/Services/Payment/Payment.API"
1215
"../src/Web/WebStatus"
1316
)
1417

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public async Task<CustomerBasket> GetBasketAsync(string guidUser, string token)
2828
CustomerBasket basket =
2929
await _requestProvider.GetAsync<CustomerBasket>(uri, token);
3030

31-
ServicesHelper.FixBasketItemPictureUri(basket?.Items);
31+
ServicesHelper.FixBasketItemPictureUri(basket?.Items);
3232

3333
return basket;
3434
}

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/IOrderService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public interface IOrderService
1010
Task CreateOrderAsync(Models.Orders.Order newOrder, string token);
1111
Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token);
1212
Task<Models.Orders.Order> GetOrderAsync(int orderId, string token);
13-
Task<ObservableCollection<Models.Orders.CardType>> GetCardTypesAsync(string token);
1413
Task<bool> CancelOrderAsync(int orderId, string token);
1514
BasketCheckout MapOrderToBasket(Models.Orders.Order order);
1615
}

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,8 @@ public class OrderMockService : IOrderService
5555

5656
private static List<OrderItem> MockOrderItems = new List<OrderItem>()
5757
{
58-
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" },
59-
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" }
60-
};
61-
62-
private static List<CardType> MockCardTypes = new List<CardType>()
63-
{
64-
new CardType { Id = 1, Name = "Amex" },
65-
new CardType { Id = 2, Name = "Visa" },
66-
new CardType { Id = 3, Name = "MasterCard" },
58+
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" },
59+
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" }
6760
};
6861

6962
private static BasketCheckout MockBasketCheckout = new BasketCheckout()
@@ -114,19 +107,9 @@ public async Task CreateOrderAsync(Models.Orders.Order newOrder, string token)
114107
}
115108
}
116109

117-
public async Task<ObservableCollection<CardType>> GetCardTypesAsync(string token)
118-
{
119-
await Task.Delay(500);
120-
121-
if (!string.IsNullOrEmpty(token))
122-
return MockCardTypes.ToObservableCollection();
123-
else
124-
return new ObservableCollection<CardType>();
125-
}
126-
127110
public BasketCheckout MapOrderToBasket(Models.Orders.Order order)
128111
{
129-
return MockBasketCheckout;
112+
return MockBasketCheckout;
130113
}
131114

132115
public Task<bool> CancelOrderAsync(int orderId, string token)

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderService.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Task CreateOrderAsync(Models.Orders.Order newOrder, string token)
3434
await _requestProvider.GetAsync<ObservableCollection<Models.Orders.Order>>(uri, token);
3535

3636
return orders;
37-
37+
3838
}
3939

4040
public async Task<Models.Orders.Order> GetOrderAsync(int orderId, string token)
@@ -58,27 +58,6 @@ public Task CreateOrderAsync(Models.Orders.Order newOrder, string token)
5858
}
5959
}
6060

61-
public async Task<ObservableCollection<Models.Orders.CardType>> GetCardTypesAsync(string token)
62-
{
63-
try
64-
{
65-
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
66-
67-
builder.Path = "api/v1/orders/cardtypes";
68-
69-
string uri = builder.ToString();
70-
71-
ObservableCollection<Models.Orders.CardType> cardTypes =
72-
await _requestProvider.GetAsync<ObservableCollection<Models.Orders.CardType>>(uri, token);
73-
74-
return cardTypes;
75-
}
76-
catch
77-
{
78-
return new ObservableCollection<Models.Orders.CardType>();
79-
}
80-
}
81-
8261
public BasketCheckout MapOrderToBasket(Models.Orders.Order order)
8362
{
8463
return new BasketCheckout()

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/User/UserService.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public UserService(IRequestProvider requestProvider)
1616

1717
public async Task<UserInfo> GetUserInfoAsync(string authToken)
1818
{
19-
2019
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint);
2120

2221
string uri = builder.ToString();
@@ -25,7 +24,6 @@ public async Task<UserInfo> GetUserInfoAsync(string authToken)
2524
await _requestProvider.GetAsync<UserInfo>(uri, authToken);
2625

2726
return userInfo;
28-
2927
}
3028
}
3129
}

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@
6565
Value="True" />
6666
</Style>
6767

68+
<Style x:Key="SettingsEntryStyle"
69+
TargetType="{x:Type Entry}"
70+
BasedOn="{StaticResource EntryStyle}">
71+
<Setter Property="Margin"
72+
Value="12, 0" />
73+
</Style>
74+
75+
<Style x:Key="SettingsUwpEntryStyle"
76+
TargetType="{x:Type Entry}"
77+
BasedOn="{StaticResource UwpEntryStyle}">
78+
<Setter Property="Margin"
79+
Value="12, 0" />
80+
</Style>
81+
6882
<Style x:Key="HeaderLabelStyle"
6983
TargetType="{x:Type Label}">
7084
<Setter Property="FontFamily"
@@ -169,9 +183,9 @@
169183
<Entry.Style>
170184
<OnPlatform
171185
x:TypeArguments="Style"
172-
iOS="{StaticResource EntryStyle}"
173-
Android="{StaticResource EntryStyle}"
174-
WinPhone="{StaticResource UwpEntryStyle}"/>
186+
iOS="{StaticResource SettingsEntryStyle}"
187+
Android="{StaticResource SettingsEntryStyle}"
188+
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
175189
</Entry.Style>
176190
</Entry>
177191
</StackLayout>
@@ -226,9 +240,9 @@
226240
<Entry.Style>
227241
<OnPlatform
228242
x:TypeArguments="Style"
229-
iOS="{StaticResource EntryStyle}"
230-
Android="{StaticResource EntryStyle}"
231-
WinPhone="{StaticResource UwpEntryStyle}"/>
243+
iOS="{StaticResource SettingsEntryStyle}"
244+
Android="{StaticResource SettingsEntryStyle}"
245+
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
232246
</Entry.Style>
233247
</Entry>
234248
<Label
@@ -240,9 +254,9 @@
240254
<Entry.Style>
241255
<OnPlatform
242256
x:TypeArguments="Style"
243-
iOS="{StaticResource EntryStyle}"
244-
Android="{StaticResource EntryStyle}"
245-
WinPhone="{StaticResource UwpEntryStyle}"/>
257+
iOS="{StaticResource SettingsEntryStyle}"
258+
Android="{StaticResource SettingsEntryStyle}"
259+
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
246260
</Entry.Style>
247261
</Entry>
248262
<Button

src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
<HintPath>..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll</HintPath>
162162
<Private>True</Private>
163163
</Reference>
164-
<Reference Include="System.ObjectModel" />
165164
<Reference Include="System.Xml.Linq" />
166165
<Reference Include="System.Xml" />
167166
<Reference Include="Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7, processorArchitecture=MSIL">

src/Services/Identity/Identity.API/Startup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
4242
{
4343
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
4444
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
45-
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
45+
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
4646
}));
4747

4848
services.AddIdentity<ApplicationUser, IdentityRole>()
@@ -91,7 +91,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
9191
{
9292
sqlOptions.MigrationsAssembly(migrationsAssembly);
9393
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
94-
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
94+
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
9595
});
9696
})
9797
.AddOperationalStore(options =>
@@ -101,7 +101,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
101101
{
102102
sqlOptions.MigrationsAssembly(migrationsAssembly);
103103
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
104-
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
104+
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
105105
});
106106
})
107107
.Services.AddTransient<IProfileService, ProfileService>();

0 commit comments

Comments
 (0)