SIL.FieldWorks.SharpViews.AssembledStylesCache.GetInheritedOnlyStyle C# (CSharp) Method

GetInheritedOnlyStyle() private method

private GetInheritedOnlyStyle ( AssembledStyles basedOn ) : AssembledStyles
basedOn AssembledStyles
return AssembledStyles
		internal AssembledStyles GetInheritedOnlyStyle(AssembledStyles basedOn)
		{
			AssembledStyles result;
			// Using this as the third key is arbitrary, we just need some non-null object that will
			// be the same when we look it up again.
			var key = new Triple<AssembledStyles, int, object>(basedOn, kInheritedOnlyKey, this);
			if (m_objStyleDerivations.TryGetValue(key, out result))
				return result;
			result = new AssembledStyles(basedOn, true);
			result = CanonicalInstance(result); // AFTER finalizing values!
			m_objStyleDerivations[key] = result; // for next time.
			return result;
		}