|
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.3603
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml
Namespace Schema
<Serializable(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Diagnostics.DebuggerStepThrough(), _
System.ComponentModel.ToolboxItem(true)> _
Public Class dbArchiveDataset
Inherits DataSet
Private m_ArchiveTable As ArchiveTable
Private m_BookmarkTable As BookmarkTable
Private m_DocumentTable As DocumentTable
Private m_WebsiteTable As WebsiteTable
Public Sub New()
MyBase.New
Me.InitClass
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
End Sub
Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
MyBase.New
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
If (Not (strSchema) Is Nothing) Then
Dim ds As DataSet = New DataSet
ds.ReadXmlSchema(New XmlTextReader(New System.IO.StringReader(strSchema)))
If (Not (ds.Tables("ArchiveTable")) Is Nothing) Then
Me.Tables.Add(New ArchiveTable(ds.Tables("ArchiveTable")))
End If
If (Not (ds.Tables("BookmarkTable")) Is Nothing) Then
Me.Tables.Add(New BookmarkTable(ds.Tables("BookmarkTable")))
End If
If (Not (ds.Tables("DocumentTable")) Is Nothing) Then
Me.Tables.Add(New DocumentTable(ds.Tables("DocumentTable")))
End If
If (Not (ds.Tables("WebsiteTable")) Is Nothing) Then
Me.Tables.Add(New WebsiteTable(ds.Tables("WebsiteTable")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
Me.Locale = ds.Locale
Me.CaseSensitive = ds.CaseSensitive
Me.EnforceConstraints = ds.EnforceConstraints
Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
Me.InitVars
Else
Me.InitClass
End If
Me.GetSerializationData(info, context)
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
End Sub
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property ArchiveTable() As ArchiveTable
Get
Return Me.m_ArchiveTable
End Get
End Property
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property BookmarkTable() As BookmarkTable
Get
Return Me.m_BookmarkTable
End Get
End Property
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property DocumentTable() As DocumentTable
Get
Return Me.m_DocumentTable
End Get
End Property
<System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property WebsiteTable() As WebsiteTable
Get
Return Me.m_WebsiteTable
End Get
End Property
Public Overrides Function Clone() As DataSet
Dim cln As dbArchiveDataset = CType(MyBase.Clone,dbArchiveDataset)
cln.InitVars
Return cln
End Function
Protected Overrides Function ShouldSerializeTables() As Boolean
Return false
End Function
Protected Overrides Function ShouldSerializeRelations() As Boolean
Return false
End Function
Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader)
Me.Reset
Dim ds As DataSet = New DataSet
ds.ReadXml(reader)
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
Me.Locale = ds.Locale
Me.CaseSensitive = ds.CaseSensitive
Me.EnforceConstraints = ds.EnforceConstraints
Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
Me.InitVars
If (Not (ds.Tables("ArchiveTable")) Is Nothing) Then
Me.Tables.Add(New ArchiveTable(ds.Tables("ArchiveTable")))
End If
If (Not (ds.Tables("BookmarkTable")) Is Nothing) Then
Me.Tables.Add(New BookmarkTable(ds.Tables("BookmarkTable")))
End If
If (Not (ds.Tables("DocumentTable")) Is Nothing) Then
Me.Tables.Add(New DocumentTable(ds.Tables("DocumentTable")))
End If
If (Not (ds.Tables("WebsiteTable")) Is Nothing) Then
Me.Tables.Add(New WebsiteTable(ds.Tables("WebsiteTable")))
End If
End Sub
Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing))
stream.Position = 0
Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing)
End Function
Friend Sub InitVars()
Me.m_ArchiveTable = CType(Me.Tables("ArchiveTable"),ArchiveTable)
If (Not (Me.m_ArchiveTable) Is Nothing) Then
Me.m_ArchiveTable.InitVars
End If
Me.m_BookmarkTable = CType(Me.Tables("BookmarkTable"),BookmarkTable)
If (Not (Me.m_BookmarkTable) Is Nothing) Then
Me.m_BookmarkTable.InitVars
End If
Me.m_DocumentTable = CType(Me.Tables("DocumentTable"),DocumentTable)
If (Not (Me.m_DocumentTable) Is Nothing) Then
Me.m_DocumentTable.InitVars
End If
Me.m_WebsiteTable = CType(Me.Tables("WebsiteTable"),WebsiteTable)
If (Not (Me.m_WebsiteTable) Is Nothing) Then
Me.m_WebsiteTable.InitVars
End If
End Sub
Private Sub InitClass()
Me.DataSetName = "MydbArchiveDataset"
Me.Prefix = ""
Me.Namespace = "http://web.arkitechebc.com/MyDataSet.xsd"
Me.Locale = New System.Globalization.CultureInfo("en-US")
Me.CaseSensitive = false
Me.EnforceConstraints = true
Me.m_ArchiveTable = New ArchiveTable
Me.Tables.Add(Me.m_ArchiveTable)
Me.m_BookmarkTable = New BookmarkTable
Me.Tables.Add(Me.m_BookmarkTable)
Me.m_DocumentTable = New DocumentTable
Me.Tables.Add(Me.m_DocumentTable)
Me.m_WebsiteTable = New WebsiteTable
Me.Tables.Add(Me.m_WebsiteTable)
End Sub
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs)
If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then
Me.InitVars
End If
End Sub
End Class
End Namespace
|
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.
MS, BBA, software developer, consultant, and trainer. Specializing in building data-centric applications designed for business, university, community & faith based organizations. Started developing Excel VBA macros and never looked back. Freelance developer utilizing VB.Net, SQL Server, Microsoft Access, and ASP.Net.