Exemplo n.º 1
0
        // 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);
        }
Exemplo n.º 2
0
 public MethodReachedBecauseDispatchedVirtuallyReason(AnalysisReasons analysisReasons, IMethodDefinition methodDispatchedUpon, ITypeDefinition typeConstructed)
     : base(analysisReasons)
 {
     virtualDispatchFact = analysisReasons.GetVirtualDispatchFact(methodDispatchedUpon);
     typeConstructedFact = analysisReasons.GetTypeConstructedFact(typeConstructed);
 }