protected void Initialise(AbstractReference <T> m_ScriptableReference)
 {
     if (m_ScriptableReference != null)
     {
         m_ScriptableReference.Set(m_ObjectReference);
     }
 }
示例#2
0
 /// <summary>
 /// Mark the given reference reachable
 /// </summary>
 internal static void MarkReachable(this AbstractReference memberRef, IReachableContext context)
 {
     if ((memberRef != null) && (!memberRef.IsReachable))
     {
         memberRef.SetReachable(context);
     }
 }
示例#3
0
        /// <summary>
        /// Walk the given member.
        /// </summary>
        internal static void Walk(ReachableContext context, AbstractReference member)
        {
            if (member == null)
            {
                return;
            }

            ClassFile        classFile;
            FieldDefinition  field;
            MethodDefinition method;
            TypeReference    typeRef;

            if ((classFile = member as ClassFile) != null)
            {
                Walk(context, classFile);
            }
            else if ((method = member as MethodDefinition) != null)
            {
                Walk(context, method);
            }
            else if ((field = member as FieldDefinition) != null)
            {
                Walk(context, field);
            }
            else if ((typeRef = member as TypeReference) != null)
            {
                Walk(context, typeRef);
            }
        }
示例#4
0
        private void AddEdgeToExistingNode(AbstractReference reference, int column, int row)
        {
            var placedNode = _graph.Nodes.Find(x => x.Task == reference.Node.Task);

            _graph.Edges.Add(new PlacementEdge(
                                 @from: new Position(column, row),
                                 to: placedNode.Position,
                                 type: reference.Type
                                 ));
        }
示例#5
0
 /// <summary>
 /// Walk over the given member to marks its children reachable.
 /// </summary>
 public void Walk(AbstractReference member)
 {
     Java.ReachableWalker.Walk(this, member);
 }