Skip to content

Instantly share code, notes, and snippets.

@Thialala
Thialala / gh-copilot-resources.md
Created November 4, 2025 08:18
GitHub Copilot Resources

🚀 GitHub Copilot – Ressources utiles

🧠 Awesome Copilot

Une collection de ressources, outils et exemples autour de GitHub Copilot
🔗 https://github.com/github/awesome-copilot


⚡ Prompt Boost

Optimisez vos prompts et découvrez de nouvelles approches pour Copilot

@Thialala
Thialala / Reflection.cs
Created January 3, 2021 18:34
Instancier toutes les classes implémentant une interface
using System;
using System.Reflection;
using System.Linq;
// - Récupération de toutes les classes implémentant IRule
// - Instanciation de ces classes et caste en IRule
// - Ordonner selon la Priorité
var rules = Assembly.GetExecutingAssembly()
.GetTypes()
.Where(type => typeof(IRule).IsAssignableFrom(type)
public interface IGenerateId
{
Guid Generate();
}
public class UUIDGenerator : IGenerateId
{
public Guid Generate() => Guid.NewGuid();
}
@Thialala
Thialala / CreateUserWithoutIdGenerator.cs
Last active March 3, 2020 21:51
Create an user using directly Guid
public class CreateUser
{
public class User
{
public Guid Id { get; }
public string Name { get; }
public User(Guid id, string name)
{
Id = id;
Name = name;
@Thialala
Thialala / SynchronizeInventory.cs
Created January 2, 2020 23:13
Simple use case with stream
public class SynchronizeInventory
{
private readonly InventoryApiClient _client;
private readonly IMapper _mapper;
public SynchronizeInventory(InventoryApiClient client, IMapper mapper)
{
_client = client;
_mapper = mapper;
}
@Thialala
Thialala / Program.cs
Created December 11, 2019 08:49
Simple app without data model
using Microsoft.EntityFrameworkCore;
using System;
using System.Threading.Tasks;
namespace DomainModelLayer
{
public class User
{
public Guid Id { get; }
public string FirstName { get; }
@Thialala
Thialala / Program.cs
Created December 10, 2019 23:13
Simple exemple avec DataModel
using ApplicationLayer;
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
namespace DomainModelLayer
{
public class User
{
@Thialala
Thialala / Program.cs
Last active December 5, 2019 15:52
Gérer les notifications en utilisant les events en C# (Observer Pattern)
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
namespace PurchaseApp
{
public class Purchase
{
public int Id { get; }
public string Description { get; }
@Thialala
Thialala / build.ps1
Created June 22, 2019 19:48
1- Setup and Cleanup
Param (
[string]$versionNumber = "1.0.0.0"
)
$buildConfiguration = "Release"
# Dossier à partir duquel le script est lancé
$solutionDir = $PSScriptRoot
$buildArtefacts = "$solutionDir/buildArtefacts"