This file contains hidden or 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.Linq; | |
using System.Text.RegularExpressions; | |
namespace DiegoOnSoftware.CommonDomainTypes | |
{ | |
public class Cpf | |
{ | |
private readonly string _pattern = @"\d{11}$"; |
This file contains hidden or 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.Threading; | |
namespace DomainEvents | |
{ | |
public static class DomainEvents | |
{ | |
private static AsyncLocal<List<Delegate>> actions = new AsyncLocal<List<Delegate>>(); | |
This file contains hidden or 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
{ | |
referrals: 0, | |
summary: { | |
referred: 0, | |
contacted: 0, | |
invalidated: 0, | |
converted: 0 | |
} | |
} |
This file contains hidden or 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
[HttpGet, Route("api/posts/{permalink}")] | |
public async Task<object> PostWithPermalink(string permalink) | |
{ | |
var post = await _repository.FindAsync(permalink); | |
if (post != null) | |
{ | |
return new | |
{ | |
title = post.Title, |