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 string Generate(System.Data.DataSet dataSet, System.CodeDom.CodeNamespace codeNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Generate(String, CodeCompileUnit, CodeNamespace, CodeDomProvider)

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

public static string Generate(string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

public static void Generate(string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Collections.Hashtable customDBProviders);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

public static void Generate(string inputFileContent, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.Data.Common.DbProviderFactory specifiedFactory);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

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);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

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);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

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);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

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);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

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);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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(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);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1