Beispiel #1
0
        public ResolvedMethod <TNode> FindMethodInFullHierarchy(ResolvedMethodId id)
        {
            var exists = myMethods.TryGetValue(id, out var method);

            if (!exists)
            {
                method = ResolvedBase?.FindMethodInFullHierarchy(id);
            }

            return(method);
        }
Beispiel #2
0
        public ResolvedMethod(ResolvedMethodId id, TNode start, TNode final)
        {
            Start = start;
            Final = final;

            myOwned = new List <TNode> {
                Start, Final
            };
            myVariables         = new Dictionary <int, ResolvedLocalVariable>();
            myLocalFunctions    = new Dictionary <ResolvedMethodId, ResolvedMethod <TNode> >();
            myAttributes        = new SortedSet <int>();
            AdditionalVariables = new HashSet <SecondaryEntity>();
        }
Beispiel #3
0
        public void AddMethod(ResolvedMethodId id, ResolvedMethod <TNode> method)
        {
            var exists = myLocalFunctions.ContainsKey(id);

            if (!exists)
            {
                myLocalFunctions.Add(id, method);
            }
            else
            {
                myLocalFunctions[id] = method;
            }
        }
Beispiel #4
0
 public ResolvedFullMethodId(ResolvedClassId classId, ResolvedMethodId methodId)
 {
     ClassId  = classId;
     MethodId = methodId;
 }
 public ResolvedLocalFunctionReference(ResolvedMethodId methodId)
 {
     MethodId = methodId;
 }
Beispiel #6
0
 public bool RemoveMethod(ResolvedMethodId id)
 {
     return(myLocalFunctions.Remove(id));
 }
Beispiel #7
0
 public ResolvedMethod <TNode> FindLocalMethod(ResolvedMethodId id)
 {
     return(FindMethodInFullHierarchy(id));
 }
Beispiel #8
0
        public ResolvedMethod <TNode> FindMethodInFullHierarchy(ResolvedMethodId id)
        {
            Methods.TryGetValue(id, out var method);

            return(method);
        }
Beispiel #9
0
 public ResolvedMethod <TNode> FindLocalMethod(ResolvedMethodId id)
 {
     myMethods.TryGetValue(id, out var method);
     return(method);
 }
Beispiel #10
0
 public bool RemoveMethod(ResolvedMethodId id)
 {
     return(myMethods.Remove(id));
 }
Beispiel #11
0
 public ResolvedClassMethodReference(ResolvedClassId ownerId, ResolvedMethodId methodId)
 {
     OwnerId  = ownerId;
     MethodId = methodId;
 }