Click here to Skip to main content
15,898,736 members
Articles / Programming Languages / XSLT

XSL Transform Code Generator for Visual Studio .NET

Rate me:
Please Sign up or sign in to vote.
4.88/5 (14 votes)
13 Feb 2021CPOL3 min read 146.2K   2.4K   75  
A custom tool for Visual Studio .NET which runs an XSL transformation to generate code
#region Generated File
/*
 * GENERATED FILE -- DO NOT EDIT
 *
 * Generator: TransformCodeGenerator, Version=1.0.2232.30928, Culture=neutral, PublicKeyToken=null
 * Version:   1.0.2232.30928
 *
 *
 * Generated code from "Products.xml"
 *
 * Created: Friday, February 10, 2006
 * By:      KIZEN\chriss
 *
 */
#endregion
namespace TestTransformCodeGenerator
{


    using System;
    using System.Data;

    class ProductsDataTable: DataTable
    {

      public ProductsDataTable()
      {
        InitColumns();
      }

      public ProductsDataTable(string tableName):
        base(tableName)
      {
        InitColumns();
      }
      
      void InitColumns()
      {
        
     Columns.Add(new DataColumn("Id", typeof(Int32)));
  
     Columns.Add(new DataColumn("Code", typeof(String)));
  
     Columns.Add(new DataColumn("Description", typeof(String)));
  
      }

      public new ProductsDataRow NewRow()
      {
        return (ProductsDataRow)base.NewRow();
      }

      protected override DataTable CreateInstance()
      {
        return new ProductsDataTable();
      }

      protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
      {
        return new ProductsDataRow(builder);
      }

  }

  class ProductsDataRow: DataRow
    {

      public ProductsDataRow(DataRowBuilder builder):
        base(builder)
      {
      }

      
     public Int32   Id
    {
      get { return (Int32)this["Id"]; }
      set { this["Id"] = value; }
    }
  
     public String   Code
    {
      get { return (String)this["Code"]; }
      set { this["Code"] = value; }
    }
  
     public String   Description
    {
      get { return (String)this["Description"]; }
      set { this["Description"] = value; }
    }
  

    }

  }

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
Systems builder and developer, DotNet C#, Ruby, Golang, Linux, Cloud, Open Source contributor.

Comments and Discussions