Inheritance: DocumentNode, IVsTextBufferProvider
示例#1
0
        public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor, TableNode parent)
        {
            TriggerNode node = new TriggerNode(HierarchyAccessor, 0);

            node.ParentTable = parent;
            node.Edit();
        }
示例#2
0
 public override void ExecuteCommand(int command)
 {
     if (command == PkgCmdIDList.cmdCreateTrigger)
     {
         TriggerNode.CreateNew(HierarchyAccessor, this);
     }
     else
     {
         base.ExecuteCommand(command);
     }
 }
        private BaseNode MakeNewNode(int id)
        {
            string nodeId = DataViewHierarchyAccessor.GetNodeId(id);

            nodeId = nodeId.ToLowerInvariant();

            BaseNode newNode = null;

            switch (nodeId)
            {
            case "table":
                newNode = new TableNode(DataViewHierarchyAccessor, id);
                break;

            case "storedprocedure":
                newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, false);
                break;

            case "storedfunction":
                newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, true);
                break;

            case "view":
                newNode = new ViewNode(DataViewHierarchyAccessor, id);
                break;

            case "udf":
                newNode = new UDFNode(DataViewHierarchyAccessor, id);
                break;

            case "trigger":
                newNode = new TriggerNode(DataViewHierarchyAccessor, id);
                break;

            default:
                throw new NotSupportedException("Node type not supported");
            }
            Debug.Assert(newNode != null);
            return(newNode);
        }
    private BaseNode MakeNewNode(int id)
    {
      string nodeId = DataViewHierarchyAccessor.GetNodeId(id);
      nodeId = nodeId.ToLowerInvariant();

      BaseNode newNode = null;
      switch (nodeId)
      {
        case "table":
          newNode = new TableNode(DataViewHierarchyAccessor, id);
          break;
        case "storedprocedure":
          newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, false);
          break;
        case "storedfunction":
          newNode = new StoredProcedureNode(DataViewHierarchyAccessor, id, true);
          break;
        case "view":
          newNode = new ViewNode(DataViewHierarchyAccessor, id);
          break;
        case "udf":
          newNode = new UDFNode(DataViewHierarchyAccessor, id);
          break;
        case "trigger":
          newNode = new TriggerNode(DataViewHierarchyAccessor, id);
          break;
        default:
          throw new NotSupportedException("Node type not supported");
      }
      Debug.Assert(newNode != null);
      return newNode;
    }
示例#5
0
 public static void CreateNew(DataViewHierarchyAccessor HierarchyAccessor, TableNode parent)
 {
   TriggerNode node = new TriggerNode(HierarchyAccessor, 0);
   node.ParentTable = parent;
   node.Edit();
 }