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 class CreateTenantCommand : ICommand | |
{ | |
public string Name { get; } | |
public string Description { get; } | |
public Status Status { get; } | |
public string Hostname { get; } | |
public CreateTenantCommand(string hostname, string name, string description, Status status) | |
{ | |
Hostname = hostname; |
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.Collections.ObjectModel; | |
using System.Linq; | |
using Xgen.Common.Extensions; | |
using Xgen.Common.Utils; | |
using Xgen.Domain.Common; | |
using Xgen.Domain.Common.Exceptions; | |
using Xgen.Domain.Model.Social.Events; | |
using Xgen.Domain.Model.Social.Exceptions; |
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
{ | |
"name": "Rule four", | |
"description": "description", | |
"conditions": [ | |
{ | |
"operator": "LessOrEqualsThan", | |
"type": "Weight", | |
"value": 1000 | |
}, | |
{ |
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 class AuthClient { | |
private readonly IAppLogger<StandardHttpClient> _logger = new Logger<StandardHttpClient>(); | |
private readonly IHttpClient _httpClient = new StandardHttpClient(_logger); | |
public async Task<dynamic> Authenticate(string clientId, string clientSecret) | |
{ | |
var baseAddress = "http://api.logstore.com.br"; | |
var body = new { client_id = clientId, client_secret = clientSecret, grant_typpe = "client_credentials" }; | |
var data = await _httpClient.PostAsync("/sessions", |
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
/* | |
* Exemplo de paginação usado na plataforma | |
*/ | |
SELECT * | |
FROM (SELECT Row_number() OVER (ORDER BY NAME ASC) peta_rn, | |
i.[id], | |
i.[uniqueid], | |
i.[name] | |
FROM [core].[instances] i |
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.Text.RegularExpressions; | |
using Xgen.Common.Extensions; | |
namespace Xgen.QueryProcessor.Query | |
{ | |
public class AuthorizerQueryBuilder | |
{ | |
#region Private Members | |
private static readonly Regex WhereRegex = new Regex(@"where\s+(?=\()(?=((?:(?=.*?\((?!.*?\2)(.*\)(?!.*\3).*))(?=.*?\)(?!.*?\3)(.*)).)+?.*?(?=\2)[^(]*(?=\3$)))", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase); | |
#endregion |
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 class InterfaceContractResolver : DefaultContractResolver | |
{ | |
private readonly Type[] _interfaceTypes; | |
private readonly ConcurrentDictionary<Type, Type> _typeToSerializeMap; | |
public InterfaceContractResolver(params Type[] interfaceTypes) | |
{ | |
_interfaceTypes = interfaceTypes; | |
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
Os dois desafios abaixo pretendem avaliar a capacidade do desenvolver de resolver problemas lógicos, por favor, leiam atentamente as instruções abaixo: | |
1. Você deve escolher ao menos um dos desafios. | |
2. O desafio deve ser resolvido individualmente. | |
3. É importante que os métodos criados tenham algum comentário que descreva sua finalidade. | |
4. Os desafios devem ser resolvidos, preferencialmente com C# ou Javascript | |
5. Não é obrigatório, mas vamos considerar um diferencial se forem criados testes | |
Desafios | |
-------------------------------------------------- |
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
--- | |
http_interactions: | |
- request: | |
method: post | |
uri: https://api.iugu.com/v1/marketplace/create_account | |
body: | |
encoding: UTF-8 | |
string: '{"name":"John Doe Co.","commissions":{"cents":0,"percent":20,"credit_card_cents":0,"credit_card_percent":15,"bank_slip_cents":0,"bank_slip_percent":20},"account_id":null}' | |
headers: | |
Content-Type: |
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
protected Instance(bool multichannel, string name, string url, string site = null, string assemblyName = null, string pathTemplates = null, | |
string dashboardRelativeUrl = null, int? numberOfLicenses = null, AttendanceProtocolSettings protocolSettings = null, Status status = Status.Inactive) : this() | |
{ | |
Ensure.Arg.NotEmpty(name, nameof(name)); | |
Ensure.Arg.NotEmpty(url, nameof(url)); | |
Ensure.Arg.Match(url, Validations.Url.SimpleUrlPattern, nameof(url)); | |
Ensure.Arg.Is(!multichannel || site.IsNotNullOrEmpty(), nameof(site)); | |
Ensure.Arg.Is(!multichannel || assemblyName.IsNotNullOrEmpty(), nameof(assemblyName)); | |
Ensure.Arg.Is(!multichannel || pathTemplates.IsNotNullOrEmpty(), nameof(pathTemplates)); | |
Ensure.Arg.Is(!multichannel || dashboardRelativeUrl.IsNotNullOrEmpty(), nameof(pathTemplates)); |