Skip to content

Instantly share code, notes, and snippets.

View jiripolasek's full-sized avatar
🧙
Making world a better place

Jiří "Wizard" Polášek jiripolasek

🧙
Making world a better place
View GitHub Profile
@dsarfati
dsarfati / ClusterSingleton.cs
Created April 5, 2016 16:49
Orleans Cluster Singleton
public static class GrainExtensions
{
public static T GetGrain<T>(this IGrainFactory grainFactory) where T : IGrainWithSingletonKey
{
return grainFactory.GetGrain<T>(Guid.Empty);
}
}
/// <summary>
/// Marker interface for cluster level singleton