Files

274 lines
13 KiB
C++

#pragma once
#using <mscorlib.dll>
#using <System.dll>
#using <System.Data.dll>
#using <System.Xml.dll>
using namespace System::Security::Permissions;
[assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)];
//
// このソース コードは xsd によって自動生成されました。Version=4.0.30319.33440 です。
//
using namespace System;
ref class NewDataSet;
/// <summary>
///Represents a strongly typed in-memory cache of data.
///</summary>
[System::Serializable,
System::ComponentModel::DesignerCategoryAttribute(L"code"),
System::ComponentModel::ToolboxItem(true),
System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedDataSetSchema"),
System::Xml::Serialization::XmlRootAttribute(L"NewDataSet"),
System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.DataSet")]
public ref class NewDataSet : public ::System::Data::DataSet {
private: ::System::Data::SchemaSerializationMode _schemaSerializationMode;
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
NewDataSet();
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
NewDataSet(::System::Runtime::Serialization::SerializationInfo^ info, ::System::Runtime::Serialization::StreamingContext context);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute,
System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0"),
System::ComponentModel::BrowsableAttribute(true),
System::ComponentModel::DesignerSerializationVisibilityAttribute(::System::ComponentModel::DesignerSerializationVisibility::Visible)]
virtual property ::System::Data::SchemaSerializationMode SchemaSerializationMode {
::System::Data::SchemaSerializationMode get() override;
System::Void set(::System::Data::SchemaSerializationMode value) override;
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute,
System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0"),
System::ComponentModel::DesignerSerializationVisibilityAttribute(::System::ComponentModel::DesignerSerializationVisibility::Hidden)]
property ::System::Data::DataTableCollection^ Tables {
::System::Data::DataTableCollection^ get() new;
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute,
System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0"),
System::ComponentModel::DesignerSerializationVisibilityAttribute(::System::ComponentModel::DesignerSerializationVisibility::Hidden)]
property ::System::Data::DataRelationCollection^ Relations {
::System::Data::DataRelationCollection^ get() new;
}
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
virtual ::System::Void InitializeDerivedDataSet() override;
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
virtual ::System::Data::DataSet^ Clone() override;
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
virtual ::System::Boolean ShouldSerializeTables() override;
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
virtual ::System::Boolean ShouldSerializeRelations() override;
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
virtual ::System::Void ReadXmlSerializable(::System::Xml::XmlReader^ reader) override;
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
virtual ::System::Xml::Schema::XmlSchema^ GetSchemaSerializable() override;
internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
::System::Void InitVars();
internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
::System::Void InitVars(::System::Boolean initTable);
private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
::System::Void InitClass();
private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
::System::Void SchemaChanged(::System::Object^ sender, ::System::ComponentModel::CollectionChangeEventArgs^ e);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"4.0.0.0")]
static ::System::Xml::Schema::XmlSchemaComplexType^ GetTypedDataSetSchema(::System::Xml::Schema::XmlSchemaSet^ xs);
};
inline NewDataSet::NewDataSet() {
this->BeginInit();
this->InitClass();
::System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler = gcnew ::System::ComponentModel::CollectionChangeEventHandler(this, &NewDataSet::SchemaChanged);
__super::Tables->CollectionChanged += schemaChangedHandler;
__super::Relations->CollectionChanged += schemaChangedHandler;
this->EndInit();
}
inline NewDataSet::NewDataSet(::System::Runtime::Serialization::SerializationInfo^ info, ::System::Runtime::Serialization::StreamingContext context) :
::System::Data::DataSet(info, context, false) {
if (this->IsBinarySerialized(info, context) == true) {
this->InitVars(false);
::System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler1 = gcnew ::System::ComponentModel::CollectionChangeEventHandler(this, &NewDataSet::SchemaChanged);
this->Tables->CollectionChanged += schemaChangedHandler1;
this->Relations->CollectionChanged += schemaChangedHandler1;
return;
}
::System::String^ strSchema = (cli::safe_cast<::System::String^ >(info->GetValue(L"XmlSchema", ::System::String::typeid)));
if (this->DetermineSchemaSerializationMode(info, context) == ::System::Data::SchemaSerializationMode::IncludeSchema) {
::System::Data::DataSet^ ds = (gcnew ::System::Data::DataSet());
ds->ReadXmlSchema((gcnew ::System::Xml::XmlTextReader((gcnew ::System::IO::StringReader(strSchema)))));
this->DataSetName = ds->DataSetName;
this->Prefix = ds->Prefix;
this->Namespace = ds->Namespace;
this->Locale = ds->Locale;
this->CaseSensitive = ds->CaseSensitive;
this->EnforceConstraints = ds->EnforceConstraints;
this->Merge(ds, false, ::System::Data::MissingSchemaAction::Add);
this->InitVars();
}
else {
this->ReadXmlSchema((gcnew ::System::Xml::XmlTextReader((gcnew ::System::IO::StringReader(strSchema)))));
}
this->GetSerializationData(info, context);
::System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler = gcnew ::System::ComponentModel::CollectionChangeEventHandler(this, &NewDataSet::SchemaChanged);
__super::Tables->CollectionChanged += schemaChangedHandler;
this->Relations->CollectionChanged += schemaChangedHandler;
}
inline ::System::Data::SchemaSerializationMode NewDataSet::SchemaSerializationMode::get() {
return this->_schemaSerializationMode;
}
inline System::Void NewDataSet::SchemaSerializationMode::set(::System::Data::SchemaSerializationMode value) {
this->_schemaSerializationMode = __identifier(value);
}
inline ::System::Data::DataTableCollection^ NewDataSet::Tables::get() {
return __super::Tables;
}
inline ::System::Data::DataRelationCollection^ NewDataSet::Relations::get() {
return __super::Relations;
}
inline ::System::Void NewDataSet::InitializeDerivedDataSet() {
this->BeginInit();
this->InitClass();
this->EndInit();
}
inline ::System::Data::DataSet^ NewDataSet::Clone() {
NewDataSet^ cln = (cli::safe_cast<NewDataSet^ >(__super::Clone()));
cln->InitVars();
cln->SchemaSerializationMode = this->SchemaSerializationMode;
return cln;
}
inline ::System::Boolean NewDataSet::ShouldSerializeTables() {
return false;
}
inline ::System::Boolean NewDataSet::ShouldSerializeRelations() {
return false;
}
inline ::System::Void NewDataSet::ReadXmlSerializable(::System::Xml::XmlReader^ reader) {
if (this->DetermineSchemaSerializationMode(reader) == ::System::Data::SchemaSerializationMode::IncludeSchema) {
this->Reset();
::System::Data::DataSet^ ds = (gcnew ::System::Data::DataSet());
ds->ReadXml(reader);
this->DataSetName = ds->DataSetName;
this->Prefix = ds->Prefix;
this->Namespace = ds->Namespace;
this->Locale = ds->Locale;
this->CaseSensitive = ds->CaseSensitive;
this->EnforceConstraints = ds->EnforceConstraints;
this->Merge(ds, false, ::System::Data::MissingSchemaAction::Add);
this->InitVars();
}
else {
this->ReadXml(reader);
this->InitVars();
}
}
inline ::System::Xml::Schema::XmlSchema^ NewDataSet::GetSchemaSerializable() {
::System::IO::MemoryStream^ stream = (gcnew ::System::IO::MemoryStream());
this->WriteXmlSchema((gcnew ::System::Xml::XmlTextWriter(stream, nullptr)));
stream->Position = 0;
return ::System::Xml::Schema::XmlSchema::Read((gcnew ::System::Xml::XmlTextReader(stream)), nullptr);
}
inline ::System::Void NewDataSet::InitVars() {
this->InitVars(true);
}
inline ::System::Void NewDataSet::InitVars(::System::Boolean initTable) {
}
inline ::System::Void NewDataSet::InitClass() {
this->DataSetName = L"NewDataSet";
this->Prefix = L"";
this->Namespace = L"http://microsoft.com/diskspd/DiskSpdConfig.xsd";
this->Locale = (gcnew ::System::Globalization::CultureInfo(L""));
this->EnforceConstraints = true;
this->SchemaSerializationMode = ::System::Data::SchemaSerializationMode::IncludeSchema;
}
inline ::System::Void NewDataSet::SchemaChanged(::System::Object^ sender, ::System::ComponentModel::CollectionChangeEventArgs^ e) {
if (e->Action == ::System::ComponentModel::CollectionChangeAction::Remove) {
this->InitVars();
}
}
inline ::System::Xml::Schema::XmlSchemaComplexType^ NewDataSet::GetTypedDataSetSchema(::System::Xml::Schema::XmlSchemaSet^ xs) {
NewDataSet^ ds = (gcnew NewDataSet());
::System::Xml::Schema::XmlSchemaComplexType^ type = (gcnew ::System::Xml::Schema::XmlSchemaComplexType());
::System::Xml::Schema::XmlSchemaSequence^ sequence = (gcnew ::System::Xml::Schema::XmlSchemaSequence());
::System::Xml::Schema::XmlSchemaAny^ any = (gcnew ::System::Xml::Schema::XmlSchemaAny());
any->Namespace = ds->Namespace;
sequence->Items->Add(any);
type->Particle = sequence;
::System::Xml::Schema::XmlSchema^ dsSchema = ds->GetSchemaSerializable();
if (xs->Contains(dsSchema->TargetNamespace)) {
::System::IO::MemoryStream^ s1 = (gcnew ::System::IO::MemoryStream());
::System::IO::MemoryStream^ s2 = (gcnew ::System::IO::MemoryStream());
try {
::System::Xml::Schema::XmlSchema^ schema = nullptr;
dsSchema->Write(s1);
for ( ::System::Collections::IEnumerator^ schemas = xs->Schemas(dsSchema->TargetNamespace)->GetEnumerator(); schemas->MoveNext(); ) {
schema = (cli::safe_cast<::System::Xml::Schema::XmlSchema^ >(schemas->Current));
s2->SetLength(0);
schema->Write(s2);
if (s1->Length == s2->Length) {
s1->Position = 0;
s2->Position = 0;
for ( ; ((s1->Position != s1->Length)
&& (s1->ReadByte() == s2->ReadByte())); ) {
;
}
if (s1->Position == s1->Length) {
return type;
}
}
}
}
finally {
if (s1 != nullptr) {
s1->Close();
}
if (s2 != nullptr) {
s2->Close();
}
}
}
xs->Add(dsSchema);
return type;
}