Exemplo n.º 1
0
   /// <summary>
   /// Tests if an object is a plugin with the supplied SuperClass.
   /// </summary>
   public static bool IsSuperClass(IObject objectRef, SClass_ID scid)
   {
      if (objectRef == null)
         return false;

      return objectRef.SuperClassID == scid;
   }
Exemplo n.º 2
0
   /// <summary>
   /// Tests if an object is a plugin with the supplied SuperClass.
   /// </summary>
   public static bool IsSuperClass(IINode node, SClass_ID scid)
   {
      if (node == null)
         return false;

      return IsSuperClass(node.ObjectRef, scid);
   }
Exemplo n.º 3
0
 /// <summary>
 /// Tests if an object is a plugin with the supplied SuperClass.
 /// </summary>
 public static bool IsSuperClass(Object node, SClass_ID scid)
 {
    IINode inode = node as IINode;
    if (inode == null)
       return false;
    else
       return IsSuperClass(inode, scid);
 }
Exemplo n.º 4
0
 public static IEnumerable<IINode> NodesListBySuperClasses(this IINode rootNode, SClass_ID[] sids)
 {
     return from n in rootNode.NodeTree() where n.ObjectRef != null && sids.Any(sid => n.EvalWorldState(0, false).Obj.SuperClassID == sid) select n;
 }
Exemplo n.º 5
0
 public SuperClassID(SClass_ID id) { this.id = (ulong)id; }