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
[FunctionName("CreateMessage")] | |
public static async Task<string> FirstActivityFunction([ActivityTrigger] string input) | |
{ | |
return $"Hello {input}!"; | |
} | |
[FunctionName("SendMessageToQueue")] | |
public static async Task SecondActivityFunction( | |
[ActivityTrigger] string input, | |
[Queue("messages", Connection = "StorageConnection")] |
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
[FunctionName("OrchestrationFunction")] | |
public static async Task<string> OrchestrationStart( | |
[OrchestrationTrigger] IDurableOrchestrationContext context, ILogger logger) | |
{ | |
var result = ""; | |
var input = context.GetInput<string>(); | |
try | |
{ | |
result = await context.CallActivityAsync<string>("CreateMessage", input); | |
await context.CallActivityAsync("SendMessageToQueue", result); |
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
[FunctionName("ClientFunction")] | |
public static async Task<IActionResult> ClientFunctionStart( | |
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, | |
[DurableClient] IDurableOrchestrationClient client, | |
ILogger log) | |
{ | |
string name = req.Query["name"]; | |
string instanceId = Guid.NewGuid().ToString(); | |
await client.StartNewAsync("OrchestrationFunction", instanceId, name); | |
return client.CreateCheckStatusResponse(req, instanceId); |
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.Configuration; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.Azure.WebJobs.Host; |
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.Configuration; | |
using System.IO; | |
using System.Reflection; | |
using Xunit.Runners; | |
using System.Threading; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Host; | |
namespace TestsViaFunction |
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.Configuration; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.Azure.WebJobs.Host; |
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 AutomapperConfiguration.AutoMapperConfig; | |
namespace AutomapperConfiguration | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using AutomapperConfiguration.AutoMapperConfig; | |
using AutoMapper; | |
namespace AutomapperConfiguration | |
{ | |
public class PeopleService | |
{ | |
private readonly IMapper _mapper; |
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 AutomapperConfiguration.AutoMapperConfig.Profiles; | |
using AutoMapper; | |
namespace AutomapperConfiguration.AutoMapperConfig | |
{ | |
public class AutoMapperConfiguration : IAutoMapperConfiguration | |
{ | |
public MapperConfiguration Configure() | |
{ | |
var config = new MapperConfiguration(cfg => |
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 AutoMapper; | |
namespace AutomapperConfiguration.AutoMapperConfig | |
{ | |
public interface IAutoMapperConfiguration | |
{ | |
MapperConfiguration Configure(); | |
} | |
} |
NewerOlder