// Fact getter/creators // // There is a lot of boiler plate here; a sign of bad design on my part. internal TypeConstructedFact GetTypeConstructedFact(ITypeDefinition constructedType) { TypeConstructedFact result; if (!typeConstructionFactsByType.TryGetValue(constructedType, out result)) { result = new TypeConstructedFact(this) { TypeConstructed = constructedType }; typeConstructionFactsByType[constructedType] = result; } return(result); }
public MethodReachedBecauseDispatchedVirtuallyReason(AnalysisReasons analysisReasons, IMethodDefinition methodDispatchedUpon, ITypeDefinition typeConstructed) : base(analysisReasons) { virtualDispatchFact = analysisReasons.GetVirtualDispatchFact(methodDispatchedUpon); typeConstructedFact = analysisReasons.GetTypeConstructedFact(typeConstructed); }