private List <Triple> BackNonAccessibleConstructor(TypeReference implementingType) { var contructorTriples = new List <Triple>(); if (implementingType.Resolve().IsInterface) { var typesImplementingInterface = _typeService.GetTypesImplementing(implementingType.FullName); foreach (var interfaceImplementingType in typesImplementingInterface) { var constructors = BackNonAccessibleConstructor(interfaceImplementingType); contructorTriples.AddRange(constructors); } } else { //var constructors = _triplesHashset.Where(x => // x.From.ObjectType != ObjectType.None // && x.From.ObjectKeyType == implementingType.FullName // && x.From.ObjectKey.IndexOf(".ctor") > -1).ToList(); var constructors = _leftConstructorTriplesByTypeKey.Get(implementingType.FullName).Distinct().ToList(); contructorTriples.AddRange(constructors); } return(contructorTriples); }
public List <Triple> Back(Triple triple) { if (triple.From.ObjectType == ObjectType.None) { return(new List <Triple>()); } if (triple.From.OwnerTypeCategory == TypeCategory.Interface) { var concreteTriples = BackConcrete(triple); if (concreteTriples.Any()) { return(concreteTriples); } return(BackNonAccessibleConstructor(triple)); } return(_triplesByRight.Get(triple.From.ObjectKey)); }
private List <Triple> BackConcrete(Triple triple) { var results = new List <Triple>(); var toMemberMatches = _triplesByRightObjectKeyMember.Get(triple.From.ObjectKeyMember); var typesImplementingInterface = _typeService.GetTypesImplementing(triple.From.ObjectKeyType); foreach (var typeImplementing in typesImplementingInterface) { var tmp = toMemberMatches.Where(x => x.To.ObjectKeyType.Equals(typeImplementing.GetKey())).ToList(); results.AddRange(tmp); } return(results); }
public List <TypeReference> GetTypesImplementing(string interfaceKey) { return(_typesByInterfaceImplemented.Get(interfaceKey)); }
public List <IndexedDelegate> GetAssignedMethods(MethodDefinition parentMethod, MethodReference delegateInvocation) { string key = GetDelegateKey(parentMethod, delegateInvocation); return(_delegateMethods.Get(key)); }
public List <Triple> Next(Triple triple) { return(_triplesByLeft.Get(triple.To.ObjectKey)); }
public List <Triple> GetToViaContructorInstructionKey(string constructorInstructionKey) { return(_objectInitializerTriplesByRightByConstructorInstructionKey.Get(constructorInstructionKey)); }
public List <Triple> GetToViaInstructionKey(string instructionKey) { return(_triplesByRightInstructionKey.Get(instructionKey)); }
public List <Triple> GetFromViaInstructionKey(string instructionKey) { return(_triplesByLeftInstructionKey.Get(instructionKey)); }
public List <Triple> GetToViaInstanceOwnerKey(string instanceOwnerKey) { return(_triplesByRightInstanceOwnerKey.Get(instanceOwnerKey)); }