logo

Crowdly

Browser

Add to Chrome

public record Glyph(char Code, Font Font); public class GlyphFactory { pri...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

public record Glyph(char Code, Font Font);

public class GlyphFactory

{

private readonly Dictionary<(char, string), Glyph> _pool = new();

public Glyph Get(char c, Font f)

=> _pool.TryGetValue((c, f.Name), out var g)

? g : _pool[(c, f.Name)] = new Glyph(c, f);

}

Що робить GlyphFactory?

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on do.ipo.kpi.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome