Skip to content

Instantly share code, notes, and snippets.

View renatogroffe's full-sized avatar
🎯
Focusing

Renato Groffe renatogroffe

🎯
Focusing
  • Brazil
  • 20:20 (UTC -03:00)
View GitHub Profile
using System.Buffers.Text;
using System.Runtime.InteropServices;
using System.Text;
Console.WriteLine("***** Testes com .NET 9 | Encode/Decode com Base64Url *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com .NET 9 | OrderedDictionary<TKey,TValue> *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
OrderedDictionary<string, int> d = new()
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Nodes;
Console.WriteLine("***** Testes com .NET 9 | Manipulando a ordem de itens com JsonObject *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
var plataformaDotNet = new JsonObject()
using ConsoleAppJsonSchemaExporter.Models;
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Schema;
Console.WriteLine("***** Testes com .NET 9 | Utilizando JsonSchemaExporter *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
namespace ConsoleAppJsonSchemaExporter.Models;
public class TorneioEsportivo
{
public string? Nome { get; set; }
public Edicao[] UltimasEdicoes { get; set; } = new Edicao[6];
}
public class Edicao
{
using ConsoleAppPartialProperty.Helpers;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com .NET 9 + C# 13 | Partial Property *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
var selectedDatabases = new string[] { "sqlserver", "mongodb", "postgres", "redis", "mysql" };
using System.Text.RegularExpressions;
namespace ConsoleAppPartialProperty.Helpers;
public static partial class ValidationHelpers
{
[GeneratedRegex("sqlserver|postgres|mysql")]
public static partial Regex IsRelationalDatabase { get; }
}
using ConsoleAppPartialMethod.Helpers;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com .NET 8 + GeneratedRegexAttribute + Partial Method *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
var selectedDatabases = new string[] { "sqlserver", "mongodb", "postgres", "redis", "mysql" };
using System.Text.RegularExpressions;
namespace ConsoleAppPartialMethod.Helpers;
public static partial class ValidationHelpers
{
[GeneratedRegex("sqlserver|postgres|mysql")]
public static partial Regex IsRelationalDatabase();
}
using ConsoleAppIndexEndInitializer.Models;
using System.Runtime.InteropServices;
using System.Text.Json;
Console.WriteLine("***** Testes com .NET 9 + C# 13 | Index from the end em initializer *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();