public override bool Equals(object x) { FontCache.CacheKey cacheKey = (FontCache.CacheKey)x; if (this == cacheKey) { return(true); } if (this.m_Hash == cacheKey.m_Hash && this.m_Hue.Equals((object)cacheKey.m_Hue)) { return(this.m_Text == cacheKey.m_Text); } return(false); }
public Texture this[string Key, IHue Hue] { get { if (Key == null) { Debug.Trace("FontCache[] crash averted where key == null"); Key = ""; } FontCache.CacheKey cacheKey = new FontCache.CacheKey(Key, Hue); Texture texture = (Texture)this.m_Cached[(object)cacheKey]; if (texture == null) { texture = !(Hue is Hues.DefaultHue) ? Texture.Clone(this[Key, Hues.Default], Hue.ShaderData) : this.m_Factory.CreateInstance(Key); this.m_Cached.Add((object)cacheKey, (object)texture); } return(texture); } }