TypedDataSetGenerator.Generate Method

Definition

Generates a strongly typed DataSet class.

Overloads

Generate(DataSet, CodeNamespace, CodeDomProvider)

Generates a strongly typed DataSet based on an existing DataSet.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, DbProviderFactory)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, TypedDataSetGenerator+GenerateOption)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable, TypedDataSetGenerator+GenerateOption)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, TypedDataSetGenerator+GenerateOption, String)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable, TypedDataSetGenerator+GenerateOption, String)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, TypedDataSetGenerator+GenerateOption, String, String)

Generates a strongly typed DataSet based on the provided input file.

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable, TypedDataSetGenerator+GenerateOption, String, String)

Generates a strongly typed DataSet based on the provided input file.

Remarks

Generates a strongly typed DataSet.

Generate(DataSet, CodeNamespace, CodeDomProvider)

Generates a strongly typed DataSet based on an existing DataSet.

public:
 static System::String ^ Generate(System::Data::DataSet ^ dataSet, System::CodeDom::CodeNamespace ^ codeNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider);
public static string Generate (System.Data.DataSet dataSet, System.CodeDom.CodeNamespace codeNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider);
static member Generate : System.Data.DataSet * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider -> string
Public Shared Function Generate (dataSet As DataSet, codeNamespace As CodeNamespace, codeProvider As CodeDomProvider) As String

Parameters

dataSet
DataSet

The source DataSet that specifies the metadata for the typed DataSet.

codeNamespace
CodeNamespace

The namespace that provides the target namespace for the typed DataSet.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

Returns

A strongly typed DataSet.

Remarks

Generates a strongly typed DataSet. The dataset is created in the namespace indicated in the codeNamespace parameter, and the dataset is generated in the managed programming language indicated in the codeProvider parameter.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider)

Generates a strongly typed DataSet based on the provided input file.

public:
 static System::String ^ Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider);
public static string Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider -> string
Public Shared Function Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider) As String

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

Returns

A strongly typed DataSet.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable)

Generates a strongly typed DataSet based on the provided input file.

public:
 static void Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Collections::Hashtable ^ customDBProviders);
public static void Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Collections.Hashtable customDBProviders);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Collections.Hashtable -> unit
Public Shared Sub Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, customDBProviders As Hashtable)

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language specific CodeDomProvider to use to generate the dataset.

customDBProviders
Hashtable

A HashTable that maps connections to specific providers in the typed dataset.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, DbProviderFactory)

Generates a strongly typed DataSet based on the provided input file.

public:
 static void Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Data::Common::DbProviderFactory ^ specifiedFactory);
public static void Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Data.Common.DbProviderFactory specifiedFactory);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Data.Common.DbProviderFactory -> unit
Public Shared Sub Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, specifiedFactory As DbProviderFactory)

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

specifiedFactory
DbProviderFactory

The DbProviderFactory to use to override the provider contained in the inputFileContent.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, TypedDataSetGenerator+GenerateOption)

Generates a strongly typed DataSet based on the provided input file.

public:
 static System::String ^ Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Data::Design::TypedDataSetGenerator::GenerateOption option);
public static string Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Data.Design.TypedDataSetGenerator.GenerateOption option);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Data.Design.TypedDataSetGenerator.GenerateOption -> string
Public Shared Function Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, option As TypedDataSetGenerator.GenerateOption) As String

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

option
TypedDataSetGenerator.GenerateOption

The TypedDataSetGenerator.GenerateOption that determines what (if any) additional components and methods to create when generating a typed dataset.

Returns

A strongly typed DataSet.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable, TypedDataSetGenerator+GenerateOption)

Generates a strongly typed DataSet based on the provided input file.

public:
 static void Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Collections::Hashtable ^ customDBProviders, System::Data::Design::TypedDataSetGenerator::GenerateOption option);
public static void Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Collections.Hashtable customDBProviders, System.Data.Design.TypedDataSetGenerator.GenerateOption option);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Collections.Hashtable * System.Data.Design.TypedDataSetGenerator.GenerateOption -> unit
Public Shared Sub Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, customDBProviders As Hashtable, option As TypedDataSetGenerator.GenerateOption)

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

customDBProviders
Hashtable

A HashTable that maps connections to specific providers in the typed dataset.

option
TypedDataSetGenerator.GenerateOption

The TypedDataSetGenerator.GenerateOption that determines what (if any) additional components and methods to create when generating a typed dataset.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, TypedDataSetGenerator+GenerateOption, String)

Generates a strongly typed DataSet based on the provided input file.

public:
 static System::String ^ Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Data::Design::TypedDataSetGenerator::GenerateOption option, System::String ^ dataSetNamespace);
public static string Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Data.Design.TypedDataSetGenerator.GenerateOption option, string dataSetNamespace);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Data.Design.TypedDataSetGenerator.GenerateOption * string -> string
Public Shared Function Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, option As TypedDataSetGenerator.GenerateOption, dataSetNamespace As String) As String

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

option
TypedDataSetGenerator.GenerateOption

The TypedDataSetGenerator.GenerateOption that determines what (if any) additional components and methods to create when generating a typed dataset.

dataSetNamespace
String

A string that contains the namespace of the generated dataset.

Returns

A strongly typed DataSet.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable, TypedDataSetGenerator+GenerateOption, String)

Generates a strongly typed DataSet based on the provided input file.

public:
 static void Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Collections::Hashtable ^ customDBProviders, System::Data::Design::TypedDataSetGenerator::GenerateOption option, System::String ^ dataSetNamespace);
public static void Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Collections.Hashtable customDBProviders, System.Data.Design.TypedDataSetGenerator.GenerateOption option, string dataSetNamespace);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Collections.Hashtable * System.Data.Design.TypedDataSetGenerator.GenerateOption * string -> unit
Public Shared Sub Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, customDBProviders As Hashtable, option As TypedDataSetGenerator.GenerateOption, dataSetNamespace As String)

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

customDBProviders
Hashtable

A HashTable that maps connections to specific providers in the typed dataset.

option
TypedDataSetGenerator.GenerateOption

The TypedDataSetGenerator.GenerateOption that determines what (if any) additional components and methods to create when generating a typed dataset.

dataSetNamespace
String

A string that contains the namespace of the generated dataset.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, TypedDataSetGenerator+GenerateOption, String, String)

Generates a strongly typed DataSet based on the provided input file.

public:
 static System::String ^ Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Data::Design::TypedDataSetGenerator::GenerateOption option, System::String ^ dataSetNamespace, System::String ^ basePath);
public static string Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Data.Design.TypedDataSetGenerator.GenerateOption option, string dataSetNamespace, string basePath);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Data.Design.TypedDataSetGenerator.GenerateOption * string * string -> string
Public Shared Function Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, option As TypedDataSetGenerator.GenerateOption, dataSetNamespace As String, basePath As String) As String

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

option
TypedDataSetGenerator.GenerateOption

The TypedDataSetGenerator.GenerateOption that determines what (if any) additional components and methods to create when generating a typed dataset.

dataSetNamespace
String

A string that contains the namespace of the generated dataset.

basePath
String

A string that represents the path to the schema based on the relative path of the dataset input file.

Returns

A strongly typed DataSet.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider, Hashtable, TypedDataSetGenerator+GenerateOption, String, String)

Generates a strongly typed DataSet based on the provided input file.

public:
 static void Generate(System::String ^ inputFileContent, System::CodeDom::CodeCompileUnit ^ compileUnit, System::CodeDom::CodeNamespace ^ mainNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::Collections::Hashtable ^ customDBProviders, System::Data::Design::TypedDataSetGenerator::GenerateOption option, System::String ^ dataSetNamespace, System::String ^ basePath);
public static void Generate (string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Collections.Hashtable customDBProviders, System.Data.Design.TypedDataSetGenerator.GenerateOption option, string dataSetNamespace, string basePath);
static member Generate : string * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.CodeDom.Compiler.CodeDomProvider * System.Collections.Hashtable * System.Data.Design.TypedDataSetGenerator.GenerateOption * string * string -> unit
Public Shared Sub Generate (inputFileContent As String, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, codeProvider As CodeDomProvider, customDBProviders As Hashtable, option As TypedDataSetGenerator.GenerateOption, dataSetNamespace As String, basePath As String)

Parameters

inputFileContent
String

A string that represents the XML schema to base the DataSet on.

compileUnit
CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
CodeNamespace

The CodeNamespace that contains the generated dataset.

codeProvider
CodeDomProvider

The language-specific CodeDomProvider to use to generate the dataset.

customDBProviders
Hashtable

A HashTable that maps connections to specific providers in the typed dataset.

option
TypedDataSetGenerator.GenerateOption

The TypedDataSetGenerator.GenerateOption that determines what (if any) additional components and methods to create when generating a typed dataset.

dataSetNamespace
String

A string that contains the namespace of the generated dataset.

basePath
String

A string that represents the path to the schema based on the relative path of the dataset input file.

Remarks

Important

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Validate All Inputs.

Generates a strongly typed DataSet.

Applies to