public static TypeSingleton Get(this TypesClient that, ExtendedTypeCreateCategory category, Guid spaceId) { if (!typeSingletons.ContainsKey(category)) { typeSingletons.Add(category, new TypeSingleton(that, category, spaceId)); } return(typeSingletons[category]); }
public TypeSingleton(TypesClient client, ExtendedTypeCreateCategory category, Guid spaceId) => (this.client, this.category, this.spaceId) = (client, category, spaceId);