This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mobileshoppingapigw: | |
image: eshop/ocelotapigw:${TAG:-latest} | |
build: | |
context: . | |
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile | |
mobilemarketingapigw: | |
image: eshop/ocelotapigw:${TAG:-latest} | |
build: | |
context: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"DownstreamPathTemplate": "/api/{version}/{everything}", | |
"DownstreamScheme": "http", | |
"DownstreamHostAndPorts": [ | |
{ | |
"Host": "basket.api", | |
"Port": 80 | |
} | |
], | |
"UpstreamPathTemplate": "/api/{version}/b/{everything}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ReRoutes": [ | |
{ | |
"DownstreamPathTemplate": "/api/{version}/{everything}", | |
"DownstreamScheme": "http", | |
"DownstreamHostAndPorts": [ | |
{ | |
"Host": "catalog.api", | |
"Port": 80 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<Catalog> GetCatalogItems(int page,int take, int? brand, int? type) | |
{ | |
_apiClient = new HttpClient(); | |
var itemsQs = $"items?pageIndex={page}&pageSize={take}"; | |
var filterQs = ""; | |
if (brand.HasValue || type.HasValue) | |
{ | |
var brandQs = (brand.HasValue) ? brand.Value.ToString() : "null"; | |
var typeQs = (type.HasValue) ? type.Value.ToString() : "null"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace Microsoft.eShopOnContainers.WebMVC.Services | |
{ | |
/// <summary> | |
/// When working with cloud services and Docker containers, it's very important to always catch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
### OPTION 1 ########################################################################################### | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code can run in any Azure Service Fabric Stateful Reliable Service | |
// within the method protected override async Task RunAsync(CancellationToken cancellationToken) | |
//Aditional or similar code in: https://github.com/Azure-Samples/service-fabric-dotnet-getting-started/blob/master/Services/WordCount/WordCount.WebService/Controllers/DefaultController.cs | |
var fabricClient = new FabricClient(); | |
string serviceUri = "fabric:/MySFApp/MyStatefulService"; | |
Uri serviceUriInstance = new Uri(serviceUri); | |
System.Fabric.Query.ServicePartitionList partitionList = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"Microsoft.AspNetCore.Mvc": "1.0.0", | |
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", | |
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0", | |
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", | |
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0", | |
"Microsoft.Extensions.Configuration.Json": "1.0.0", | |
"Microsoft.Extensions.Logging": "1.0.0", | |
"Microsoft.Extensions.Logging.Console": "1.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Analogy | |
{ | |
/// <summary> | |
/// This example shows that a library that needs access to target .NET Standard 1.3 | |
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
/// </summary>INetCoreApp10 | |
class Example1 | |
{ | |
public void Net45Application(INetFramework45 platform) |