code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
Imports System.Reflection Public Class DataScriptExecutionException Inherits Exception Private _Script As DataScript Public ReadOnly Property Script As DataScript Get Return _Script End Get End Property Public Sub New(ByVal script As DataScript, ByVal innerException As Exception) MyBase.New("An error occured while executing a DataScript. See inner exception for details.", innerException) _Script = script End Sub End Class
Symmex/Snowflake
Source/Symmex.Snowflake.DataDeployment/DataScriptExecutionException.vb
Visual Basic
mit
500
Imports System.Reflection Imports System.Runtime.CompilerServices Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. <Assembly: AssemblyTitle("CreateExtrudedSurfaceByCircles2d")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyConfiguration("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("CreateExtrudedSurfaceByCircles2d")> <Assembly: AssemblyCopyright("Copyright © 2015")> <Assembly: AssemblyTrademark("")> <Assembly: AssemblyCulture("")> ' Setting ComVisible to false makes the types in this assembly not visible ' to COM components. If you need to access a type in this assembly from ' COM, set the ComVisible attribute to true on that type. <Assembly: ComVisible(False)> ' The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("372e04ed-c3b5-4c62-a108-c75d742ef714")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' [assembly: AssemblyVersion("1.0.*")] <Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
SolidEdgeCommunity/Samples
Part/CreateExtrudedSurfaceByCircles2d/vb/CreateExtrudedSurfaceByCircles2d/My Project/AssemblyInfo.vb
Visual Basic
mit
1,426
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18444 ' ' 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 '''<summary> '''Represents a strongly typed in-memory cache of data. '''</summary> <Global.System.Serializable(), _ Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _ Global.System.Xml.Serialization.XmlRootAttribute("PlanningS_View"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _ Partial Public Class PlanningS_View Inherits Global.System.Data.DataSet Private tableGI_Doc_print As GI_Doc_printDataTable Private tablename As nameDataTable Private tableskill As skillDataTable Private tableskill_sync_view As skill_sync_viewDataTable Private tableV_100_DataPlanning As V_100_DataPlanningDataTable Private tableV_110_Master_Planning_AllPlant As V_110_Master_Planning_AllPlantDataTable Private tableV_110_Master_Planning_byPlant As V_110_Master_Planning_byPlantDataTable Private tableV_110_StockBalance90Days As V_110_StockBalance90DaysDataTable Private tableV_410_KSB1DetailCost As V_410_KSB1DetailCostDataTable Private tableV_510_TransferPlant As V_510_TransferPlantDataTable Private tableV_900_ManageStock As V_900_ManageStockDataTable Private tableV_BOI_Split_Cost As V_BOI_Split_CostDataTable Private tableV_Sales3MonthsDetails As V_Sales3MonthsDetailsDataTable Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.BeginInit Me.InitClass Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context, false) If (Me.IsBinarySerialized(info, context) = true) Then Me.InitVars(false) Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1 Return End If Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String) If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) If (Not (ds.Tables("GI_Doc_print")) Is Nothing) Then MyBase.Tables.Add(New GI_Doc_printDataTable(ds.Tables("GI_Doc_print"))) End If If (Not (ds.Tables("name")) Is Nothing) Then MyBase.Tables.Add(New nameDataTable(ds.Tables("name"))) End If If (Not (ds.Tables("skill")) Is Nothing) Then MyBase.Tables.Add(New skillDataTable(ds.Tables("skill"))) End If If (Not (ds.Tables("skill_sync_view")) Is Nothing) Then MyBase.Tables.Add(New skill_sync_viewDataTable(ds.Tables("skill_sync_view"))) End If If (Not (ds.Tables("V_100_DataPlanning")) Is Nothing) Then MyBase.Tables.Add(New V_100_DataPlanningDataTable(ds.Tables("V_100_DataPlanning"))) End If If (Not (ds.Tables("V_110_Master_Planning_AllPlant")) Is Nothing) Then MyBase.Tables.Add(New V_110_Master_Planning_AllPlantDataTable(ds.Tables("V_110_Master_Planning_AllPlant"))) End If If (Not (ds.Tables("V_110_Master_Planning_byPlant")) Is Nothing) Then MyBase.Tables.Add(New V_110_Master_Planning_byPlantDataTable(ds.Tables("V_110_Master_Planning_byPlant"))) End If If (Not (ds.Tables("V_110_StockBalance90Days")) Is Nothing) Then MyBase.Tables.Add(New V_110_StockBalance90DaysDataTable(ds.Tables("V_110_StockBalance90Days"))) End If If (Not (ds.Tables("V_410_KSB1DetailCost")) Is Nothing) Then MyBase.Tables.Add(New V_410_KSB1DetailCostDataTable(ds.Tables("V_410_KSB1DetailCost"))) End If If (Not (ds.Tables("V_510_TransferPlant")) Is Nothing) Then MyBase.Tables.Add(New V_510_TransferPlantDataTable(ds.Tables("V_510_TransferPlant"))) End If If (Not (ds.Tables("V_900_ManageStock")) Is Nothing) Then MyBase.Tables.Add(New V_900_ManageStockDataTable(ds.Tables("V_900_ManageStock"))) End If If (Not (ds.Tables("V_BOI_Split_Cost")) Is Nothing) Then MyBase.Tables.Add(New V_BOI_Split_CostDataTable(ds.Tables("V_BOI_Split_Cost"))) End If If (Not (ds.Tables("V_Sales3MonthsDetails")) Is Nothing) Then MyBase.Tables.Add(New V_Sales3MonthsDetailsDataTable(ds.Tables("V_Sales3MonthsDetails"))) 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, Global.System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) End If Me.GetSerializationData(info, context) Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler AddHandler Me.Relations.CollectionChanged, schemaChangedHandler End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property GI_Doc_print() As GI_Doc_printDataTable Get Return Me.tableGI_Doc_print End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property name() As nameDataTable Get Return Me.tablename End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property skill() As skillDataTable Get Return Me.tableskill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property skill_sync_view() As skill_sync_viewDataTable Get Return Me.tableskill_sync_view End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_100_DataPlanning() As V_100_DataPlanningDataTable Get Return Me.tableV_100_DataPlanning End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_110_Master_Planning_AllPlant() As V_110_Master_Planning_AllPlantDataTable Get Return Me.tableV_110_Master_Planning_AllPlant End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_110_Master_Planning_byPlant() As V_110_Master_Planning_byPlantDataTable Get Return Me.tableV_110_Master_Planning_byPlant End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_110_StockBalance90Days() As V_110_StockBalance90DaysDataTable Get Return Me.tableV_110_StockBalance90Days End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_410_KSB1DetailCost() As V_410_KSB1DetailCostDataTable Get Return Me.tableV_410_KSB1DetailCost End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_510_TransferPlant() As V_510_TransferPlantDataTable Get Return Me.tableV_510_TransferPlant End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_900_ManageStock() As V_900_ManageStockDataTable Get Return Me.tableV_900_ManageStock End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_BOI_Split_Cost() As V_BOI_Split_CostDataTable Get Return Me.tableV_BOI_Split_Cost End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false), _ Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property V_Sales3MonthsDetails() As V_Sales3MonthsDetailsDataTable Get Return Me.tableV_Sales3MonthsDetails End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.BrowsableAttribute(true), _ Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _ Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode Get Return Me._schemaSerializationMode End Get Set Me._schemaSerializationMode = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection Get Return MyBase.Tables End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection Get Return MyBase.Relations End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub InitializeDerivedDataSet() Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataSet Dim cln As PlanningS_View = CType(MyBase.Clone,PlanningS_View) cln.InitVars cln.SchemaSerializationMode = Me.SchemaSerializationMode Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function ShouldSerializeTables() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function ShouldSerializeRelations() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader) If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then Me.Reset Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() ds.ReadXml(reader) If (Not (ds.Tables("GI_Doc_print")) Is Nothing) Then MyBase.Tables.Add(New GI_Doc_printDataTable(ds.Tables("GI_Doc_print"))) End If If (Not (ds.Tables("name")) Is Nothing) Then MyBase.Tables.Add(New nameDataTable(ds.Tables("name"))) End If If (Not (ds.Tables("skill")) Is Nothing) Then MyBase.Tables.Add(New skillDataTable(ds.Tables("skill"))) End If If (Not (ds.Tables("skill_sync_view")) Is Nothing) Then MyBase.Tables.Add(New skill_sync_viewDataTable(ds.Tables("skill_sync_view"))) End If If (Not (ds.Tables("V_100_DataPlanning")) Is Nothing) Then MyBase.Tables.Add(New V_100_DataPlanningDataTable(ds.Tables("V_100_DataPlanning"))) End If If (Not (ds.Tables("V_110_Master_Planning_AllPlant")) Is Nothing) Then MyBase.Tables.Add(New V_110_Master_Planning_AllPlantDataTable(ds.Tables("V_110_Master_Planning_AllPlant"))) End If If (Not (ds.Tables("V_110_Master_Planning_byPlant")) Is Nothing) Then MyBase.Tables.Add(New V_110_Master_Planning_byPlantDataTable(ds.Tables("V_110_Master_Planning_byPlant"))) End If If (Not (ds.Tables("V_110_StockBalance90Days")) Is Nothing) Then MyBase.Tables.Add(New V_110_StockBalance90DaysDataTable(ds.Tables("V_110_StockBalance90Days"))) End If If (Not (ds.Tables("V_410_KSB1DetailCost")) Is Nothing) Then MyBase.Tables.Add(New V_410_KSB1DetailCostDataTable(ds.Tables("V_410_KSB1DetailCost"))) End If If (Not (ds.Tables("V_510_TransferPlant")) Is Nothing) Then MyBase.Tables.Add(New V_510_TransferPlantDataTable(ds.Tables("V_510_TransferPlant"))) End If If (Not (ds.Tables("V_900_ManageStock")) Is Nothing) Then MyBase.Tables.Add(New V_900_ManageStockDataTable(ds.Tables("V_900_ManageStock"))) End If If (Not (ds.Tables("V_BOI_Split_Cost")) Is Nothing) Then MyBase.Tables.Add(New V_BOI_Split_CostDataTable(ds.Tables("V_BOI_Split_Cost"))) End If If (Not (ds.Tables("V_Sales3MonthsDetails")) Is Nothing) Then MyBase.Tables.Add(New V_Sales3MonthsDetailsDataTable(ds.Tables("V_Sales3MonthsDetails"))) 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, Global.System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.ReadXml(reader) Me.InitVars End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing)) stream.Position = 0 Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Overloads Sub InitVars() Me.InitVars(true) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Overloads Sub InitVars(ByVal initTable As Boolean) Me.tableGI_Doc_print = CType(MyBase.Tables("GI_Doc_print"),GI_Doc_printDataTable) If (initTable = true) Then If (Not (Me.tableGI_Doc_print) Is Nothing) Then Me.tableGI_Doc_print.InitVars End If End If Me.tablename = CType(MyBase.Tables("name"),nameDataTable) If (initTable = true) Then If (Not (Me.tablename) Is Nothing) Then Me.tablename.InitVars End If End If Me.tableskill = CType(MyBase.Tables("skill"),skillDataTable) If (initTable = true) Then If (Not (Me.tableskill) Is Nothing) Then Me.tableskill.InitVars End If End If Me.tableskill_sync_view = CType(MyBase.Tables("skill_sync_view"),skill_sync_viewDataTable) If (initTable = true) Then If (Not (Me.tableskill_sync_view) Is Nothing) Then Me.tableskill_sync_view.InitVars End If End If Me.tableV_100_DataPlanning = CType(MyBase.Tables("V_100_DataPlanning"),V_100_DataPlanningDataTable) If (initTable = true) Then If (Not (Me.tableV_100_DataPlanning) Is Nothing) Then Me.tableV_100_DataPlanning.InitVars End If End If Me.tableV_110_Master_Planning_AllPlant = CType(MyBase.Tables("V_110_Master_Planning_AllPlant"),V_110_Master_Planning_AllPlantDataTable) If (initTable = true) Then If (Not (Me.tableV_110_Master_Planning_AllPlant) Is Nothing) Then Me.tableV_110_Master_Planning_AllPlant.InitVars End If End If Me.tableV_110_Master_Planning_byPlant = CType(MyBase.Tables("V_110_Master_Planning_byPlant"),V_110_Master_Planning_byPlantDataTable) If (initTable = true) Then If (Not (Me.tableV_110_Master_Planning_byPlant) Is Nothing) Then Me.tableV_110_Master_Planning_byPlant.InitVars End If End If Me.tableV_110_StockBalance90Days = CType(MyBase.Tables("V_110_StockBalance90Days"),V_110_StockBalance90DaysDataTable) If (initTable = true) Then If (Not (Me.tableV_110_StockBalance90Days) Is Nothing) Then Me.tableV_110_StockBalance90Days.InitVars End If End If Me.tableV_410_KSB1DetailCost = CType(MyBase.Tables("V_410_KSB1DetailCost"),V_410_KSB1DetailCostDataTable) If (initTable = true) Then If (Not (Me.tableV_410_KSB1DetailCost) Is Nothing) Then Me.tableV_410_KSB1DetailCost.InitVars End If End If Me.tableV_510_TransferPlant = CType(MyBase.Tables("V_510_TransferPlant"),V_510_TransferPlantDataTable) If (initTable = true) Then If (Not (Me.tableV_510_TransferPlant) Is Nothing) Then Me.tableV_510_TransferPlant.InitVars End If End If Me.tableV_900_ManageStock = CType(MyBase.Tables("V_900_ManageStock"),V_900_ManageStockDataTable) If (initTable = true) Then If (Not (Me.tableV_900_ManageStock) Is Nothing) Then Me.tableV_900_ManageStock.InitVars End If End If Me.tableV_BOI_Split_Cost = CType(MyBase.Tables("V_BOI_Split_Cost"),V_BOI_Split_CostDataTable) If (initTable = true) Then If (Not (Me.tableV_BOI_Split_Cost) Is Nothing) Then Me.tableV_BOI_Split_Cost.InitVars End If End If Me.tableV_Sales3MonthsDetails = CType(MyBase.Tables("V_Sales3MonthsDetails"),V_Sales3MonthsDetailsDataTable) If (initTable = true) Then If (Not (Me.tableV_Sales3MonthsDetails) Is Nothing) Then Me.tableV_Sales3MonthsDetails.InitVars End If End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.DataSetName = "PlanningS_View" Me.Prefix = "" Me.Namespace = "http://tempuri.org/PlanningS_View.xsd" Me.EnforceConstraints = true Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema Me.tableGI_Doc_print = New GI_Doc_printDataTable() MyBase.Tables.Add(Me.tableGI_Doc_print) Me.tablename = New nameDataTable() MyBase.Tables.Add(Me.tablename) Me.tableskill = New skillDataTable() MyBase.Tables.Add(Me.tableskill) Me.tableskill_sync_view = New skill_sync_viewDataTable() MyBase.Tables.Add(Me.tableskill_sync_view) Me.tableV_100_DataPlanning = New V_100_DataPlanningDataTable() MyBase.Tables.Add(Me.tableV_100_DataPlanning) Me.tableV_110_Master_Planning_AllPlant = New V_110_Master_Planning_AllPlantDataTable() MyBase.Tables.Add(Me.tableV_110_Master_Planning_AllPlant) Me.tableV_110_Master_Planning_byPlant = New V_110_Master_Planning_byPlantDataTable() MyBase.Tables.Add(Me.tableV_110_Master_Planning_byPlant) Me.tableV_110_StockBalance90Days = New V_110_StockBalance90DaysDataTable() MyBase.Tables.Add(Me.tableV_110_StockBalance90Days) Me.tableV_410_KSB1DetailCost = New V_410_KSB1DetailCostDataTable() MyBase.Tables.Add(Me.tableV_410_KSB1DetailCost) Me.tableV_510_TransferPlant = New V_510_TransferPlantDataTable() MyBase.Tables.Add(Me.tableV_510_TransferPlant) Me.tableV_900_ManageStock = New V_900_ManageStockDataTable() MyBase.Tables.Add(Me.tableV_900_ManageStock) Me.tableV_BOI_Split_Cost = New V_BOI_Split_CostDataTable() MyBase.Tables.Add(Me.tableV_BOI_Split_Cost) Me.tableV_Sales3MonthsDetails = New V_Sales3MonthsDetailsDataTable() MyBase.Tables.Add(Me.tableV_Sales3MonthsDetails) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeGI_Doc_print() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializename() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeskill() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeskill_sync_view() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_100_DataPlanning() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_110_Master_Planning_AllPlant() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_110_Master_Planning_byPlant() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_110_StockBalance90Days() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_410_KSB1DetailCost() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_510_TransferPlant() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_900_ManageStock() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_BOI_Split_Cost() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function ShouldSerializeV_Sales3MonthsDetails() As Boolean Return false End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then Me.InitVars End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim ds As PlanningS_View = New PlanningS_View() Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any.Namespace = ds.Namespace sequence.Items.Add(any) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub GI_Doc_printRowChangeEventHandler(ByVal sender As Object, ByVal e As GI_Doc_printRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub nameRowChangeEventHandler(ByVal sender As Object, ByVal e As nameRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub skillRowChangeEventHandler(ByVal sender As Object, ByVal e As skillRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub skill_sync_viewRowChangeEventHandler(ByVal sender As Object, ByVal e As skill_sync_viewRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_100_DataPlanningRowChangeEventHandler(ByVal sender As Object, ByVal e As V_100_DataPlanningRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_110_Master_Planning_AllPlantRowChangeEventHandler(ByVal sender As Object, ByVal e As V_110_Master_Planning_AllPlantRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_110_Master_Planning_byPlantRowChangeEventHandler(ByVal sender As Object, ByVal e As V_110_Master_Planning_byPlantRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_110_StockBalance90DaysRowChangeEventHandler(ByVal sender As Object, ByVal e As V_110_StockBalance90DaysRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_410_KSB1DetailCostRowChangeEventHandler(ByVal sender As Object, ByVal e As V_410_KSB1DetailCostRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_510_TransferPlantRowChangeEventHandler(ByVal sender As Object, ByVal e As V_510_TransferPlantRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_900_ManageStockRowChangeEventHandler(ByVal sender As Object, ByVal e As V_900_ManageStockRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_BOI_Split_CostRowChangeEventHandler(ByVal sender As Object, ByVal e As V_BOI_Split_CostRowChangeEvent) <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Delegate Sub V_Sales3MonthsDetailsRowChangeEventHandler(ByVal sender As Object, ByVal e As V_Sales3MonthsDetailsRowChangeEvent) '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class GI_Doc_printDataTable Inherits Global.System.Data.TypedTableBase(Of GI_Doc_printRow) Private columnUname As Global.System.Data.DataColumn Private columnHeadertext As Global.System.Data.DataColumn Private columnitemNo As Global.System.Data.DataColumn Private columnProductcode As Global.System.Data.DataColumn Private columnmmateng As Global.System.Data.DataColumn Private columnOrderQty As Global.System.Data.DataColumn Private columnGLAccount As Global.System.Data.DataColumn Private columnCostCenter As Global.System.Data.DataColumn Private columnmmatthai As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "GI_Doc_print" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property UnameColumn() As Global.System.Data.DataColumn Get Return Me.columnUname End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property HeadertextColumn() As Global.System.Data.DataColumn Get Return Me.columnHeadertext End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property itemNoColumn() As Global.System.Data.DataColumn Get Return Me.columnitemNo End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property ProductcodeColumn() As Global.System.Data.DataColumn Get Return Me.columnProductcode End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatengColumn() As Global.System.Data.DataColumn Get Return Me.columnmmateng End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property OrderQtyColumn() As Global.System.Data.DataColumn Get Return Me.columnOrderQty End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property GLAccountColumn() As Global.System.Data.DataColumn Get Return Me.columnGLAccount End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property CostCenterColumn() As Global.System.Data.DataColumn Get Return Me.columnCostCenter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatthaiColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatthai End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As GI_Doc_printRow Get Return CType(Me.Rows(index),GI_Doc_printRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event GI_Doc_printRowChanging As GI_Doc_printRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event GI_Doc_printRowChanged As GI_Doc_printRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event GI_Doc_printRowDeleting As GI_Doc_printRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event GI_Doc_printRowDeleted As GI_Doc_printRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddGI_Doc_printRow(ByVal row As GI_Doc_printRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddGI_Doc_printRow(ByVal Uname As String, ByVal Headertext As String, ByVal itemNo As Integer, ByVal Productcode As String, ByVal mmateng As String, ByVal OrderQty As Decimal, ByVal GLAccount As String, ByVal CostCenter As String, ByVal mmatthai As String) As GI_Doc_printRow Dim rowGI_Doc_printRow As GI_Doc_printRow = CType(Me.NewRow,GI_Doc_printRow) Dim columnValuesArray() As Object = New Object() {Uname, Headertext, itemNo, Productcode, mmateng, OrderQty, GLAccount, CostCenter, mmatthai} rowGI_Doc_printRow.ItemArray = columnValuesArray Me.Rows.Add(rowGI_Doc_printRow) Return rowGI_Doc_printRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As GI_Doc_printDataTable = CType(MyBase.Clone,GI_Doc_printDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New GI_Doc_printDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnUname = MyBase.Columns("Uname") Me.columnHeadertext = MyBase.Columns("Headertext") Me.columnitemNo = MyBase.Columns("itemNo") Me.columnProductcode = MyBase.Columns("Productcode") Me.columnmmateng = MyBase.Columns("mmateng") Me.columnOrderQty = MyBase.Columns("OrderQty") Me.columnGLAccount = MyBase.Columns("GLAccount") Me.columnCostCenter = MyBase.Columns("CostCenter") Me.columnmmatthai = MyBase.Columns("mmatthai") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnUname = New Global.System.Data.DataColumn("Uname", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUname) Me.columnHeadertext = New Global.System.Data.DataColumn("Headertext", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnHeadertext) Me.columnitemNo = New Global.System.Data.DataColumn("itemNo", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnitemNo) Me.columnProductcode = New Global.System.Data.DataColumn("Productcode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnProductcode) Me.columnmmateng = New Global.System.Data.DataColumn("mmateng", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmateng) Me.columnOrderQty = New Global.System.Data.DataColumn("OrderQty", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnOrderQty) Me.columnGLAccount = New Global.System.Data.DataColumn("GLAccount", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGLAccount) Me.columnCostCenter = New Global.System.Data.DataColumn("CostCenter", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCostCenter) Me.columnmmatthai = New Global.System.Data.DataColumn("mmatthai", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatthai) Me.columnUname.MaxLength = 20 Me.columnHeadertext.MaxLength = 25 Me.columnProductcode.MaxLength = 18 Me.columnmmateng.MaxLength = 40 Me.columnGLAccount.MaxLength = 10 Me.columnCostCenter.MaxLength = 10 Me.columnmmatthai.MaxLength = 40 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewGI_Doc_printRow() As GI_Doc_printRow Return CType(Me.NewRow,GI_Doc_printRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New GI_Doc_printRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(GI_Doc_printRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.GI_Doc_printRowChangedEvent) Is Nothing) Then RaiseEvent GI_Doc_printRowChanged(Me, New GI_Doc_printRowChangeEvent(CType(e.Row,GI_Doc_printRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.GI_Doc_printRowChangingEvent) Is Nothing) Then RaiseEvent GI_Doc_printRowChanging(Me, New GI_Doc_printRowChangeEvent(CType(e.Row,GI_Doc_printRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.GI_Doc_printRowDeletedEvent) Is Nothing) Then RaiseEvent GI_Doc_printRowDeleted(Me, New GI_Doc_printRowChangeEvent(CType(e.Row,GI_Doc_printRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.GI_Doc_printRowDeletingEvent) Is Nothing) Then RaiseEvent GI_Doc_printRowDeleting(Me, New GI_Doc_printRowChangeEvent(CType(e.Row,GI_Doc_printRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveGI_Doc_printRow(ByVal row As GI_Doc_printRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "GI_Doc_printDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class nameDataTable Inherits Global.System.Data.TypedTableBase(Of nameRow) Private columnThai_name As Global.System.Data.DataColumn Private columnJap_name As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "name" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Thai_nameColumn() As Global.System.Data.DataColumn Get Return Me.columnThai_name End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Jap_nameColumn() As Global.System.Data.DataColumn Get Return Me.columnJap_name End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As nameRow Get Return CType(Me.Rows(index),nameRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event nameRowChanging As nameRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event nameRowChanged As nameRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event nameRowDeleting As nameRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event nameRowDeleted As nameRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddnameRow(ByVal row As nameRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddnameRow(ByVal Thai_name As String, ByVal Jap_name As String) As nameRow Dim rownameRow As nameRow = CType(Me.NewRow,nameRow) Dim columnValuesArray() As Object = New Object() {Thai_name, Jap_name} rownameRow.ItemArray = columnValuesArray Me.Rows.Add(rownameRow) Return rownameRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As nameDataTable = CType(MyBase.Clone,nameDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New nameDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnThai_name = MyBase.Columns("Thai_name") Me.columnJap_name = MyBase.Columns("Jap_name") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnThai_name = New Global.System.Data.DataColumn("Thai_name", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnThai_name) Me.columnJap_name = New Global.System.Data.DataColumn("Jap_name", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnJap_name) Me.columnThai_name.MaxLength = 255 Me.columnJap_name.MaxLength = 255 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewnameRow() As nameRow Return CType(Me.NewRow,nameRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New nameRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(nameRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.nameRowChangedEvent) Is Nothing) Then RaiseEvent nameRowChanged(Me, New nameRowChangeEvent(CType(e.Row,nameRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.nameRowChangingEvent) Is Nothing) Then RaiseEvent nameRowChanging(Me, New nameRowChangeEvent(CType(e.Row,nameRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.nameRowDeletedEvent) Is Nothing) Then RaiseEvent nameRowDeleted(Me, New nameRowChangeEvent(CType(e.Row,nameRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.nameRowDeletingEvent) Is Nothing) Then RaiseEvent nameRowDeleting(Me, New nameRowChangeEvent(CType(e.Row,nameRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemovenameRow(ByVal row As nameRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "nameDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class skillDataTable Inherits Global.System.Data.TypedTableBase(Of skillRow) Private columnThai_skill As Global.System.Data.DataColumn Private columnJap_skill As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "skill" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Thai_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnThai_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Jap_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnJap_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As skillRow Get Return CType(Me.Rows(index),skillRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skillRowChanging As skillRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skillRowChanged As skillRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skillRowDeleting As skillRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skillRowDeleted As skillRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddskillRow(ByVal row As skillRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddskillRow(ByVal Thai_skill As String, ByVal Jap_skill As String) As skillRow Dim rowskillRow As skillRow = CType(Me.NewRow,skillRow) Dim columnValuesArray() As Object = New Object() {Thai_skill, Jap_skill} rowskillRow.ItemArray = columnValuesArray Me.Rows.Add(rowskillRow) Return rowskillRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As skillDataTable = CType(MyBase.Clone,skillDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New skillDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnThai_skill = MyBase.Columns("Thai_skill") Me.columnJap_skill = MyBase.Columns("Jap_skill") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnThai_skill = New Global.System.Data.DataColumn("Thai_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnThai_skill) Me.columnJap_skill = New Global.System.Data.DataColumn("Jap_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnJap_skill) Me.columnThai_skill.ReadOnly = true Me.columnThai_skill.MaxLength = 255 Me.columnJap_skill.ReadOnly = true Me.columnJap_skill.MaxLength = 255 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewskillRow() As skillRow Return CType(Me.NewRow,skillRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New skillRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(skillRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.skillRowChangedEvent) Is Nothing) Then RaiseEvent skillRowChanged(Me, New skillRowChangeEvent(CType(e.Row,skillRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.skillRowChangingEvent) Is Nothing) Then RaiseEvent skillRowChanging(Me, New skillRowChangeEvent(CType(e.Row,skillRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.skillRowDeletedEvent) Is Nothing) Then RaiseEvent skillRowDeleted(Me, New skillRowChangeEvent(CType(e.Row,skillRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.skillRowDeletingEvent) Is Nothing) Then RaiseEvent skillRowDeleting(Me, New skillRowChangeEvent(CType(e.Row,skillRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveskillRow(ByVal row As skillRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "skillDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class skill_sync_viewDataTable Inherits Global.System.Data.TypedTableBase(Of skill_sync_viewRow) Private columnskill As Global.System.Data.DataColumn Private columnMain_skill As Global.System.Data.DataColumn Private columnAtk_skill As Global.System.Data.DataColumn Private columnDef_skill As Global.System.Data.DataColumn Private columnInt_skill As Global.System.Data.DataColumn Private columnHide_skill As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "skill_sync_view" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property skillColumn() As Global.System.Data.DataColumn Get Return Me.columnskill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Main_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnMain_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Atk_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnAtk_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Def_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnDef_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Int_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnInt_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Hide_skillColumn() As Global.System.Data.DataColumn Get Return Me.columnHide_skill End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As skill_sync_viewRow Get Return CType(Me.Rows(index),skill_sync_viewRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skill_sync_viewRowChanging As skill_sync_viewRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skill_sync_viewRowChanged As skill_sync_viewRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skill_sync_viewRowDeleting As skill_sync_viewRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event skill_sync_viewRowDeleted As skill_sync_viewRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub Addskill_sync_viewRow(ByVal row As skill_sync_viewRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function Addskill_sync_viewRow(ByVal skill As String, ByVal Main_skill As String, ByVal Atk_skill As String, ByVal Def_skill As String, ByVal Int_skill As String, ByVal Hide_skill As String) As skill_sync_viewRow Dim rowskill_sync_viewRow As skill_sync_viewRow = CType(Me.NewRow,skill_sync_viewRow) Dim columnValuesArray() As Object = New Object() {skill, Main_skill, Atk_skill, Def_skill, Int_skill, Hide_skill} rowskill_sync_viewRow.ItemArray = columnValuesArray Me.Rows.Add(rowskill_sync_viewRow) Return rowskill_sync_viewRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As skill_sync_viewDataTable = CType(MyBase.Clone,skill_sync_viewDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New skill_sync_viewDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnskill = MyBase.Columns("skill") Me.columnMain_skill = MyBase.Columns("Main_skill") Me.columnAtk_skill = MyBase.Columns("Atk_skill") Me.columnDef_skill = MyBase.Columns("Def_skill") Me.columnInt_skill = MyBase.Columns("Int_skill") Me.columnHide_skill = MyBase.Columns("Hide_skill") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnskill = New Global.System.Data.DataColumn("skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnskill) Me.columnMain_skill = New Global.System.Data.DataColumn("Main_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMain_skill) Me.columnAtk_skill = New Global.System.Data.DataColumn("Atk_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAtk_skill) Me.columnDef_skill = New Global.System.Data.DataColumn("Def_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDef_skill) Me.columnInt_skill = New Global.System.Data.DataColumn("Int_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnInt_skill) Me.columnHide_skill = New Global.System.Data.DataColumn("Hide_skill", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnHide_skill) Me.columnskill.MaxLength = 255 Me.columnMain_skill.ReadOnly = true Me.columnMain_skill.MaxLength = 4000 Me.columnAtk_skill.ReadOnly = true Me.columnAtk_skill.MaxLength = 4000 Me.columnDef_skill.ReadOnly = true Me.columnDef_skill.MaxLength = 4000 Me.columnInt_skill.ReadOnly = true Me.columnInt_skill.MaxLength = 4000 Me.columnHide_skill.ReadOnly = true Me.columnHide_skill.MaxLength = 4000 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Newskill_sync_viewRow() As skill_sync_viewRow Return CType(Me.NewRow,skill_sync_viewRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New skill_sync_viewRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(skill_sync_viewRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.skill_sync_viewRowChangedEvent) Is Nothing) Then RaiseEvent skill_sync_viewRowChanged(Me, New skill_sync_viewRowChangeEvent(CType(e.Row,skill_sync_viewRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.skill_sync_viewRowChangingEvent) Is Nothing) Then RaiseEvent skill_sync_viewRowChanging(Me, New skill_sync_viewRowChangeEvent(CType(e.Row,skill_sync_viewRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.skill_sync_viewRowDeletedEvent) Is Nothing) Then RaiseEvent skill_sync_viewRowDeleted(Me, New skill_sync_viewRowChangeEvent(CType(e.Row,skill_sync_viewRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.skill_sync_viewRowDeletingEvent) Is Nothing) Then RaiseEvent skill_sync_viewRowDeleting(Me, New skill_sync_viewRowChangeEvent(CType(e.Row,skill_sync_viewRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Removeskill_sync_viewRow(ByVal row As skill_sync_viewRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "skill_sync_viewDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_100_DataPlanningDataTable Inherits Global.System.Data.TypedTableBase(Of V_100_DataPlanningRow) Private columnPlantName As Global.System.Data.DataColumn Private columnmmatno As Global.System.Data.DataColumn Private columnUR As Global.System.Data.DataColumn Private columnATP As Global.System.Data.DataColumn Private columnAvgPast As Global.System.Data.DataColumn Private columnAvgRolling As Global.System.Data.DataColumn Private columnSFPerDay As Global.System.Data.DataColumn Private columnRunDate As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_100_DataPlanning" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property PlantNameColumn() As Global.System.Data.DataColumn Get Return Me.columnPlantName End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property URColumn() As Global.System.Data.DataColumn Get Return Me.columnUR End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property ATPColumn() As Global.System.Data.DataColumn Get Return Me.columnATP End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AvgPastColumn() As Global.System.Data.DataColumn Get Return Me.columnAvgPast End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AvgRollingColumn() As Global.System.Data.DataColumn Get Return Me.columnAvgRolling End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property SFPerDayColumn() As Global.System.Data.DataColumn Get Return Me.columnSFPerDay End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property RunDateColumn() As Global.System.Data.DataColumn Get Return Me.columnRunDate End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_100_DataPlanningRow Get Return CType(Me.Rows(index),V_100_DataPlanningRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_100_DataPlanningRowChanging As V_100_DataPlanningRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_100_DataPlanningRowChanged As V_100_DataPlanningRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_100_DataPlanningRowDeleting As V_100_DataPlanningRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_100_DataPlanningRowDeleted As V_100_DataPlanningRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_100_DataPlanningRow(ByVal row As V_100_DataPlanningRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_100_DataPlanningRow(ByVal PlantName As String, ByVal mmatno As String, ByVal UR As Double, ByVal ATP As Double, ByVal AvgPast As Decimal, ByVal AvgRolling As Decimal, ByVal SFPerDay As Integer, ByVal RunDate As Date) As V_100_DataPlanningRow Dim rowV_100_DataPlanningRow As V_100_DataPlanningRow = CType(Me.NewRow,V_100_DataPlanningRow) Dim columnValuesArray() As Object = New Object() {PlantName, mmatno, UR, ATP, AvgPast, AvgRolling, SFPerDay, RunDate} rowV_100_DataPlanningRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_100_DataPlanningRow) Return rowV_100_DataPlanningRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_100_DataPlanningDataTable = CType(MyBase.Clone,V_100_DataPlanningDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_100_DataPlanningDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnPlantName = MyBase.Columns("PlantName") Me.columnmmatno = MyBase.Columns("mmatno") Me.columnUR = MyBase.Columns("UR") Me.columnATP = MyBase.Columns("ATP") Me.columnAvgPast = MyBase.Columns("AvgPast") Me.columnAvgRolling = MyBase.Columns("AvgRolling") Me.columnSFPerDay = MyBase.Columns("SFPerDay") Me.columnRunDate = MyBase.Columns("RunDate") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnPlantName = New Global.System.Data.DataColumn("PlantName", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPlantName) Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnUR = New Global.System.Data.DataColumn("UR", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUR) Me.columnATP = New Global.System.Data.DataColumn("ATP", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnATP) Me.columnAvgPast = New Global.System.Data.DataColumn("AvgPast", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAvgPast) Me.columnAvgRolling = New Global.System.Data.DataColumn("AvgRolling", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAvgRolling) Me.columnSFPerDay = New Global.System.Data.DataColumn("SFPerDay", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSFPerDay) Me.columnRunDate = New Global.System.Data.DataColumn("RunDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRunDate) Me.columnPlantName.AllowDBNull = false Me.columnPlantName.MaxLength = 10 Me.columnmmatno.MaxLength = 18 Me.columnAvgPast.AllowDBNull = false Me.columnAvgRolling.AllowDBNull = false Me.columnSFPerDay.AllowDBNull = false End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_100_DataPlanningRow() As V_100_DataPlanningRow Return CType(Me.NewRow,V_100_DataPlanningRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_100_DataPlanningRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_100_DataPlanningRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_100_DataPlanningRowChangedEvent) Is Nothing) Then RaiseEvent V_100_DataPlanningRowChanged(Me, New V_100_DataPlanningRowChangeEvent(CType(e.Row,V_100_DataPlanningRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_100_DataPlanningRowChangingEvent) Is Nothing) Then RaiseEvent V_100_DataPlanningRowChanging(Me, New V_100_DataPlanningRowChangeEvent(CType(e.Row,V_100_DataPlanningRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_100_DataPlanningRowDeletedEvent) Is Nothing) Then RaiseEvent V_100_DataPlanningRowDeleted(Me, New V_100_DataPlanningRowChangeEvent(CType(e.Row,V_100_DataPlanningRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_100_DataPlanningRowDeletingEvent) Is Nothing) Then RaiseEvent V_100_DataPlanningRowDeleting(Me, New V_100_DataPlanningRowChangeEvent(CType(e.Row,V_100_DataPlanningRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_100_DataPlanningRow(ByVal row As V_100_DataPlanningRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_100_DataPlanningDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_110_Master_Planning_AllPlantDataTable Inherits Global.System.Data.TypedTableBase(Of V_110_Master_Planning_AllPlantRow) Private columnGroup As Global.System.Data.DataColumn Private columnStatus As Global.System.Data.DataColumn Private columnmmatno As Global.System.Data.DataColumn Private columnmmateng As Global.System.Data.DataColumn Private columnmStandardCap As Global.System.Data.DataColumn Private _columnS_Day As Global.System.Data.DataColumn Private columnUtilize As Global.System.Data.DataColumn Private columnUR As Global.System.Data.DataColumn Private columnATP As Global.System.Data.DataColumn Private columnQtyGIT As Global.System.Data.DataColumn Private columnMinStock As Global.System.Data.DataColumn Private columnMaxStock As Global.System.Data.DataColumn Private columnDays_Sale As Global.System.Data.DataColumn Private columnRequest As Global.System.Data.DataColumn Private columnOverMax As Global.System.Data.DataColumn Private _columnP_Day As Global.System.Data.DataColumn Private columnAvgPast As Global.System.Data.DataColumn Private columnAvgRolling As Global.System.Data.DataColumn Private columnSFPerDay As Global.System.Data.DataColumn Private columnPercent_Min As Global.System.Data.DataColumn Private columnPercent_Max As Global.System.Data.DataColumn Private columnDays_Sale_Min As Global.System.Data.DataColumn Private columnDays_Sale_Max As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_110_Master_Planning_AllPlant" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property GroupColumn() As Global.System.Data.DataColumn Get Return Me.columnGroup End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property StatusColumn() As Global.System.Data.DataColumn Get Return Me.columnStatus End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatengColumn() As Global.System.Data.DataColumn Get Return Me.columnmmateng End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mStandardCapColumn() As Global.System.Data.DataColumn Get Return Me.columnmStandardCap End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property _S_DayColumn() As Global.System.Data.DataColumn Get Return Me._columnS_Day End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property UtilizeColumn() As Global.System.Data.DataColumn Get Return Me.columnUtilize End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property URColumn() As Global.System.Data.DataColumn Get Return Me.columnUR End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property ATPColumn() As Global.System.Data.DataColumn Get Return Me.columnATP End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property QtyGITColumn() As Global.System.Data.DataColumn Get Return Me.columnQtyGIT End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property MinStockColumn() As Global.System.Data.DataColumn Get Return Me.columnMinStock End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property MaxStockColumn() As Global.System.Data.DataColumn Get Return Me.columnMaxStock End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_SaleColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property RequestColumn() As Global.System.Data.DataColumn Get Return Me.columnRequest End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property OverMaxColumn() As Global.System.Data.DataColumn Get Return Me.columnOverMax End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property _P_DayColumn() As Global.System.Data.DataColumn Get Return Me._columnP_Day End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AvgPastColumn() As Global.System.Data.DataColumn Get Return Me.columnAvgPast End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AvgRollingColumn() As Global.System.Data.DataColumn Get Return Me.columnAvgRolling End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property SFPerDayColumn() As Global.System.Data.DataColumn Get Return Me.columnSFPerDay End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Percent_MinColumn() As Global.System.Data.DataColumn Get Return Me.columnPercent_Min End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Percent_MaxColumn() As Global.System.Data.DataColumn Get Return Me.columnPercent_Max End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_Sale_MinColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale_Min End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_Sale_MaxColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale_Max End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_110_Master_Planning_AllPlantRow Get Return CType(Me.Rows(index),V_110_Master_Planning_AllPlantRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_AllPlantRowChanging As V_110_Master_Planning_AllPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_AllPlantRowChanged As V_110_Master_Planning_AllPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_AllPlantRowDeleting As V_110_Master_Planning_AllPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_AllPlantRowDeleted As V_110_Master_Planning_AllPlantRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_110_Master_Planning_AllPlantRow(ByVal row As V_110_Master_Planning_AllPlantRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_110_Master_Planning_AllPlantRow( _ ByVal Group As String, _ ByVal Status As String, _ ByVal mmatno As String, _ ByVal mmateng As String, _ ByVal mStandardCap As Decimal, _ ByVal _S_Day As Decimal, _ ByVal Utilize As Decimal, _ ByVal UR As Double, _ ByVal ATP As Double, _ ByVal QtyGIT As Decimal, _ ByVal MinStock As Decimal, _ ByVal MaxStock As Decimal, _ ByVal Days_Sale As Decimal, _ ByVal Request As Double, _ ByVal OverMax As Double, _ ByVal _P_Day As Decimal, _ ByVal AvgPast As Decimal, _ ByVal AvgRolling As Decimal, _ ByVal SFPerDay As Integer, _ ByVal Percent_Min As Decimal, _ ByVal Percent_Max As Decimal, _ ByVal Days_Sale_Min As Integer, _ ByVal Days_Sale_Max As Integer) As V_110_Master_Planning_AllPlantRow Dim rowV_110_Master_Planning_AllPlantRow As V_110_Master_Planning_AllPlantRow = CType(Me.NewRow,V_110_Master_Planning_AllPlantRow) Dim columnValuesArray() As Object = New Object() {Group, Status, mmatno, mmateng, mStandardCap, _S_Day, Utilize, UR, ATP, QtyGIT, MinStock, MaxStock, Days_Sale, Request, OverMax, _P_Day, AvgPast, AvgRolling, SFPerDay, Percent_Min, Percent_Max, Days_Sale_Min, Days_Sale_Max} rowV_110_Master_Planning_AllPlantRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_110_Master_Planning_AllPlantRow) Return rowV_110_Master_Planning_AllPlantRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_110_Master_Planning_AllPlantDataTable = CType(MyBase.Clone,V_110_Master_Planning_AllPlantDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_110_Master_Planning_AllPlantDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnGroup = MyBase.Columns("Group") Me.columnStatus = MyBase.Columns("Status") Me.columnmmatno = MyBase.Columns("mmatno") Me.columnmmateng = MyBase.Columns("mmateng") Me.columnmStandardCap = MyBase.Columns("mStandardCap") Me._columnS_Day = MyBase.Columns("S/Day") Me.columnUtilize = MyBase.Columns("Utilize") Me.columnUR = MyBase.Columns("UR") Me.columnATP = MyBase.Columns("ATP") Me.columnQtyGIT = MyBase.Columns("QtyGIT") Me.columnMinStock = MyBase.Columns("MinStock") Me.columnMaxStock = MyBase.Columns("MaxStock") Me.columnDays_Sale = MyBase.Columns("Days Sale") Me.columnRequest = MyBase.Columns("Request") Me.columnOverMax = MyBase.Columns("OverMax") Me._columnP_Day = MyBase.Columns("P/Day") Me.columnAvgPast = MyBase.Columns("AvgPast") Me.columnAvgRolling = MyBase.Columns("AvgRolling") Me.columnSFPerDay = MyBase.Columns("SFPerDay") Me.columnPercent_Min = MyBase.Columns("Percent Min") Me.columnPercent_Max = MyBase.Columns("Percent Max") Me.columnDays_Sale_Min = MyBase.Columns("Days Sale Min") Me.columnDays_Sale_Max = MyBase.Columns("Days Sale Max") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnGroup = New Global.System.Data.DataColumn("Group", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGroup) Me.columnStatus = New Global.System.Data.DataColumn("Status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnStatus) Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnmmateng = New Global.System.Data.DataColumn("mmateng", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmateng) Me.columnmStandardCap = New Global.System.Data.DataColumn("mStandardCap", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmStandardCap) Me._columnS_Day = New Global.System.Data.DataColumn("S/Day", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) Me._columnS_Day.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnS_Day") Me._columnS_Day.ExtendedProperties.Add("Generator_UserColumnName", "S/Day") MyBase.Columns.Add(Me._columnS_Day) Me.columnUtilize = New Global.System.Data.DataColumn("Utilize", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUtilize) Me.columnUR = New Global.System.Data.DataColumn("UR", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUR) Me.columnATP = New Global.System.Data.DataColumn("ATP", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnATP) Me.columnQtyGIT = New Global.System.Data.DataColumn("QtyGIT", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQtyGIT) Me.columnMinStock = New Global.System.Data.DataColumn("MinStock", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMinStock) Me.columnMaxStock = New Global.System.Data.DataColumn("MaxStock", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMaxStock) Me.columnDays_Sale = New Global.System.Data.DataColumn("Days Sale", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale) Me.columnRequest = New Global.System.Data.DataColumn("Request", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRequest) Me.columnOverMax = New Global.System.Data.DataColumn("OverMax", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnOverMax) Me._columnP_Day = New Global.System.Data.DataColumn("P/Day", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) Me._columnP_Day.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnP_Day") Me._columnP_Day.ExtendedProperties.Add("Generator_UserColumnName", "P/Day") MyBase.Columns.Add(Me._columnP_Day) Me.columnAvgPast = New Global.System.Data.DataColumn("AvgPast", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAvgPast) Me.columnAvgRolling = New Global.System.Data.DataColumn("AvgRolling", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAvgRolling) Me.columnSFPerDay = New Global.System.Data.DataColumn("SFPerDay", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSFPerDay) Me.columnPercent_Min = New Global.System.Data.DataColumn("Percent Min", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPercent_Min) Me.columnPercent_Max = New Global.System.Data.DataColumn("Percent Max", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPercent_Max) Me.columnDays_Sale_Min = New Global.System.Data.DataColumn("Days Sale Min", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale_Min) Me.columnDays_Sale_Max = New Global.System.Data.DataColumn("Days Sale Max", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale_Max) Me.columnGroup.MaxLength = 1 Me.columnStatus.MaxLength = 10 Me.columnmmatno.MaxLength = 18 Me.columnmmateng.MaxLength = 40 Me.columnQtyGIT.ReadOnly = true Me.columnDays_Sale.ReadOnly = true Me.columnRequest.ReadOnly = true Me.columnOverMax.ReadOnly = true Me._columnP_Day.ReadOnly = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_110_Master_Planning_AllPlantRow() As V_110_Master_Planning_AllPlantRow Return CType(Me.NewRow,V_110_Master_Planning_AllPlantRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_110_Master_Planning_AllPlantRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_110_Master_Planning_AllPlantRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_110_Master_Planning_AllPlantRowChangedEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_AllPlantRowChanged(Me, New V_110_Master_Planning_AllPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_AllPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_110_Master_Planning_AllPlantRowChangingEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_AllPlantRowChanging(Me, New V_110_Master_Planning_AllPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_AllPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_110_Master_Planning_AllPlantRowDeletedEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_AllPlantRowDeleted(Me, New V_110_Master_Planning_AllPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_AllPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_110_Master_Planning_AllPlantRowDeletingEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_AllPlantRowDeleting(Me, New V_110_Master_Planning_AllPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_AllPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_110_Master_Planning_AllPlantRow(ByVal row As V_110_Master_Planning_AllPlantRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_110_Master_Planning_AllPlantDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_110_Master_Planning_byPlantDataTable Inherits Global.System.Data.TypedTableBase(Of V_110_Master_Planning_byPlantRow) Private columnGroup As Global.System.Data.DataColumn Private columnStatus As Global.System.Data.DataColumn Private columnPlantName As Global.System.Data.DataColumn Private columnmmatno As Global.System.Data.DataColumn Private columnmmateng As Global.System.Data.DataColumn Private columnmStandardCap As Global.System.Data.DataColumn Private _columnS_Day As Global.System.Data.DataColumn Private columnUtilize As Global.System.Data.DataColumn Private columnUR As Global.System.Data.DataColumn Private columnATP As Global.System.Data.DataColumn Private columnQtyGIT As Global.System.Data.DataColumn Private columnMinStock As Global.System.Data.DataColumn Private columnMaxStock As Global.System.Data.DataColumn Private columnDays_Sale As Global.System.Data.DataColumn Private columnRequest As Global.System.Data.DataColumn Private columnOverMax As Global.System.Data.DataColumn Private _columnP_Day As Global.System.Data.DataColumn Private columnAvgPast As Global.System.Data.DataColumn Private columnAvgRolling As Global.System.Data.DataColumn Private columnSFPerDay As Global.System.Data.DataColumn Private columnPercent_Min As Global.System.Data.DataColumn Private columnPercent_Max As Global.System.Data.DataColumn Private columnDays_Sale_Min As Global.System.Data.DataColumn Private columnDays_Sale_Max As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_110_Master_Planning_byPlant" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property GroupColumn() As Global.System.Data.DataColumn Get Return Me.columnGroup End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property StatusColumn() As Global.System.Data.DataColumn Get Return Me.columnStatus End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property PlantNameColumn() As Global.System.Data.DataColumn Get Return Me.columnPlantName End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatengColumn() As Global.System.Data.DataColumn Get Return Me.columnmmateng End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mStandardCapColumn() As Global.System.Data.DataColumn Get Return Me.columnmStandardCap End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property _S_DayColumn() As Global.System.Data.DataColumn Get Return Me._columnS_Day End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property UtilizeColumn() As Global.System.Data.DataColumn Get Return Me.columnUtilize End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property URColumn() As Global.System.Data.DataColumn Get Return Me.columnUR End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property ATPColumn() As Global.System.Data.DataColumn Get Return Me.columnATP End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property QtyGITColumn() As Global.System.Data.DataColumn Get Return Me.columnQtyGIT End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property MinStockColumn() As Global.System.Data.DataColumn Get Return Me.columnMinStock End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property MaxStockColumn() As Global.System.Data.DataColumn Get Return Me.columnMaxStock End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_SaleColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property RequestColumn() As Global.System.Data.DataColumn Get Return Me.columnRequest End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property OverMaxColumn() As Global.System.Data.DataColumn Get Return Me.columnOverMax End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property _P_DayColumn() As Global.System.Data.DataColumn Get Return Me._columnP_Day End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AvgPastColumn() As Global.System.Data.DataColumn Get Return Me.columnAvgPast End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AvgRollingColumn() As Global.System.Data.DataColumn Get Return Me.columnAvgRolling End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property SFPerDayColumn() As Global.System.Data.DataColumn Get Return Me.columnSFPerDay End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Percent_MinColumn() As Global.System.Data.DataColumn Get Return Me.columnPercent_Min End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Percent_MaxColumn() As Global.System.Data.DataColumn Get Return Me.columnPercent_Max End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_Sale_MinColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale_Min End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_Sale_MaxColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale_Max End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_110_Master_Planning_byPlantRow Get Return CType(Me.Rows(index),V_110_Master_Planning_byPlantRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_byPlantRowChanging As V_110_Master_Planning_byPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_byPlantRowChanged As V_110_Master_Planning_byPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_byPlantRowDeleting As V_110_Master_Planning_byPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_Master_Planning_byPlantRowDeleted As V_110_Master_Planning_byPlantRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_110_Master_Planning_byPlantRow(ByVal row As V_110_Master_Planning_byPlantRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_110_Master_Planning_byPlantRow( _ ByVal Group As String, _ ByVal Status As String, _ ByVal PlantName As String, _ ByVal mmatno As String, _ ByVal mmateng As String, _ ByVal mStandardCap As Decimal, _ ByVal _S_Day As Decimal, _ ByVal Utilize As Decimal, _ ByVal UR As Double, _ ByVal ATP As Double, _ ByVal QtyGIT As Decimal, _ ByVal MinStock As Decimal, _ ByVal MaxStock As Decimal, _ ByVal Days_Sale As Decimal, _ ByVal Request As Double, _ ByVal OverMax As Double, _ ByVal _P_Day As Decimal, _ ByVal AvgPast As Decimal, _ ByVal AvgRolling As Decimal, _ ByVal SFPerDay As Integer, _ ByVal Percent_Min As Decimal, _ ByVal Percent_Max As Decimal, _ ByVal Days_Sale_Min As Integer, _ ByVal Days_Sale_Max As Integer) As V_110_Master_Planning_byPlantRow Dim rowV_110_Master_Planning_byPlantRow As V_110_Master_Planning_byPlantRow = CType(Me.NewRow,V_110_Master_Planning_byPlantRow) Dim columnValuesArray() As Object = New Object() {Group, Status, PlantName, mmatno, mmateng, mStandardCap, _S_Day, Utilize, UR, ATP, QtyGIT, MinStock, MaxStock, Days_Sale, Request, OverMax, _P_Day, AvgPast, AvgRolling, SFPerDay, Percent_Min, Percent_Max, Days_Sale_Min, Days_Sale_Max} rowV_110_Master_Planning_byPlantRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_110_Master_Planning_byPlantRow) Return rowV_110_Master_Planning_byPlantRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_110_Master_Planning_byPlantDataTable = CType(MyBase.Clone,V_110_Master_Planning_byPlantDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_110_Master_Planning_byPlantDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnGroup = MyBase.Columns("Group") Me.columnStatus = MyBase.Columns("Status") Me.columnPlantName = MyBase.Columns("PlantName") Me.columnmmatno = MyBase.Columns("mmatno") Me.columnmmateng = MyBase.Columns("mmateng") Me.columnmStandardCap = MyBase.Columns("mStandardCap") Me._columnS_Day = MyBase.Columns("S/Day") Me.columnUtilize = MyBase.Columns("Utilize") Me.columnUR = MyBase.Columns("UR") Me.columnATP = MyBase.Columns("ATP") Me.columnQtyGIT = MyBase.Columns("QtyGIT") Me.columnMinStock = MyBase.Columns("MinStock") Me.columnMaxStock = MyBase.Columns("MaxStock") Me.columnDays_Sale = MyBase.Columns("Days Sale") Me.columnRequest = MyBase.Columns("Request") Me.columnOverMax = MyBase.Columns("OverMax") Me._columnP_Day = MyBase.Columns("P/Day") Me.columnAvgPast = MyBase.Columns("AvgPast") Me.columnAvgRolling = MyBase.Columns("AvgRolling") Me.columnSFPerDay = MyBase.Columns("SFPerDay") Me.columnPercent_Min = MyBase.Columns("Percent Min") Me.columnPercent_Max = MyBase.Columns("Percent Max") Me.columnDays_Sale_Min = MyBase.Columns("Days Sale Min") Me.columnDays_Sale_Max = MyBase.Columns("Days Sale Max") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnGroup = New Global.System.Data.DataColumn("Group", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGroup) Me.columnStatus = New Global.System.Data.DataColumn("Status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnStatus) Me.columnPlantName = New Global.System.Data.DataColumn("PlantName", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPlantName) Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnmmateng = New Global.System.Data.DataColumn("mmateng", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmateng) Me.columnmStandardCap = New Global.System.Data.DataColumn("mStandardCap", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmStandardCap) Me._columnS_Day = New Global.System.Data.DataColumn("S/Day", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) Me._columnS_Day.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnS_Day") Me._columnS_Day.ExtendedProperties.Add("Generator_UserColumnName", "S/Day") MyBase.Columns.Add(Me._columnS_Day) Me.columnUtilize = New Global.System.Data.DataColumn("Utilize", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUtilize) Me.columnUR = New Global.System.Data.DataColumn("UR", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUR) Me.columnATP = New Global.System.Data.DataColumn("ATP", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnATP) Me.columnQtyGIT = New Global.System.Data.DataColumn("QtyGIT", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQtyGIT) Me.columnMinStock = New Global.System.Data.DataColumn("MinStock", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMinStock) Me.columnMaxStock = New Global.System.Data.DataColumn("MaxStock", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMaxStock) Me.columnDays_Sale = New Global.System.Data.DataColumn("Days Sale", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale) Me.columnRequest = New Global.System.Data.DataColumn("Request", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRequest) Me.columnOverMax = New Global.System.Data.DataColumn("OverMax", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnOverMax) Me._columnP_Day = New Global.System.Data.DataColumn("P/Day", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) Me._columnP_Day.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnP_Day") Me._columnP_Day.ExtendedProperties.Add("Generator_UserColumnName", "P/Day") MyBase.Columns.Add(Me._columnP_Day) Me.columnAvgPast = New Global.System.Data.DataColumn("AvgPast", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAvgPast) Me.columnAvgRolling = New Global.System.Data.DataColumn("AvgRolling", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAvgRolling) Me.columnSFPerDay = New Global.System.Data.DataColumn("SFPerDay", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSFPerDay) Me.columnPercent_Min = New Global.System.Data.DataColumn("Percent Min", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPercent_Min) Me.columnPercent_Max = New Global.System.Data.DataColumn("Percent Max", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPercent_Max) Me.columnDays_Sale_Min = New Global.System.Data.DataColumn("Days Sale Min", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale_Min) Me.columnDays_Sale_Max = New Global.System.Data.DataColumn("Days Sale Max", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale_Max) Me.columnGroup.MaxLength = 1 Me.columnStatus.MaxLength = 10 Me.columnPlantName.AllowDBNull = false Me.columnPlantName.MaxLength = 10 Me.columnmmatno.MaxLength = 18 Me.columnmmateng.MaxLength = 40 Me.columnQtyGIT.ReadOnly = true Me.columnDays_Sale.ReadOnly = true Me.columnRequest.ReadOnly = true Me.columnOverMax.ReadOnly = true Me._columnP_Day.ReadOnly = true Me.columnAvgPast.AllowDBNull = false Me.columnAvgRolling.AllowDBNull = false Me.columnSFPerDay.AllowDBNull = false End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_110_Master_Planning_byPlantRow() As V_110_Master_Planning_byPlantRow Return CType(Me.NewRow,V_110_Master_Planning_byPlantRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_110_Master_Planning_byPlantRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_110_Master_Planning_byPlantRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_110_Master_Planning_byPlantRowChangedEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_byPlantRowChanged(Me, New V_110_Master_Planning_byPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_byPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_110_Master_Planning_byPlantRowChangingEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_byPlantRowChanging(Me, New V_110_Master_Planning_byPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_byPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_110_Master_Planning_byPlantRowDeletedEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_byPlantRowDeleted(Me, New V_110_Master_Planning_byPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_byPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_110_Master_Planning_byPlantRowDeletingEvent) Is Nothing) Then RaiseEvent V_110_Master_Planning_byPlantRowDeleting(Me, New V_110_Master_Planning_byPlantRowChangeEvent(CType(e.Row,V_110_Master_Planning_byPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_110_Master_Planning_byPlantRow(ByVal row As V_110_Master_Planning_byPlantRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_110_Master_Planning_byPlantDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_110_StockBalance90DaysDataTable Inherits Global.System.Data.TypedTableBase(Of V_110_StockBalance90DaysRow) Private columncaldate As Global.System.Data.DataColumn Private columnmmatno As Global.System.Data.DataColumn Private columnATP As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_110_StockBalance90Days" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property caldateColumn() As Global.System.Data.DataColumn Get Return Me.columncaldate End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property ATPColumn() As Global.System.Data.DataColumn Get Return Me.columnATP End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_110_StockBalance90DaysRow Get Return CType(Me.Rows(index),V_110_StockBalance90DaysRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_StockBalance90DaysRowChanging As V_110_StockBalance90DaysRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_StockBalance90DaysRowChanged As V_110_StockBalance90DaysRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_StockBalance90DaysRowDeleting As V_110_StockBalance90DaysRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_110_StockBalance90DaysRowDeleted As V_110_StockBalance90DaysRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_110_StockBalance90DaysRow(ByVal row As V_110_StockBalance90DaysRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_110_StockBalance90DaysRow(ByVal caldate As Date, ByVal mmatno As String, ByVal ATP As Double) As V_110_StockBalance90DaysRow Dim rowV_110_StockBalance90DaysRow As V_110_StockBalance90DaysRow = CType(Me.NewRow,V_110_StockBalance90DaysRow) Dim columnValuesArray() As Object = New Object() {caldate, mmatno, ATP} rowV_110_StockBalance90DaysRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_110_StockBalance90DaysRow) Return rowV_110_StockBalance90DaysRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_110_StockBalance90DaysDataTable = CType(MyBase.Clone,V_110_StockBalance90DaysDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_110_StockBalance90DaysDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columncaldate = MyBase.Columns("caldate") Me.columnmmatno = MyBase.Columns("mmatno") Me.columnATP = MyBase.Columns("ATP") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columncaldate = New Global.System.Data.DataColumn("caldate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncaldate) Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnATP = New Global.System.Data.DataColumn("ATP", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnATP) Me.columnmmatno.MaxLength = 18 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_110_StockBalance90DaysRow() As V_110_StockBalance90DaysRow Return CType(Me.NewRow,V_110_StockBalance90DaysRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_110_StockBalance90DaysRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_110_StockBalance90DaysRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_110_StockBalance90DaysRowChangedEvent) Is Nothing) Then RaiseEvent V_110_StockBalance90DaysRowChanged(Me, New V_110_StockBalance90DaysRowChangeEvent(CType(e.Row,V_110_StockBalance90DaysRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_110_StockBalance90DaysRowChangingEvent) Is Nothing) Then RaiseEvent V_110_StockBalance90DaysRowChanging(Me, New V_110_StockBalance90DaysRowChangeEvent(CType(e.Row,V_110_StockBalance90DaysRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_110_StockBalance90DaysRowDeletedEvent) Is Nothing) Then RaiseEvent V_110_StockBalance90DaysRowDeleted(Me, New V_110_StockBalance90DaysRowChangeEvent(CType(e.Row,V_110_StockBalance90DaysRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_110_StockBalance90DaysRowDeletingEvent) Is Nothing) Then RaiseEvent V_110_StockBalance90DaysRowDeleting(Me, New V_110_StockBalance90DaysRowChangeEvent(CType(e.Row,V_110_StockBalance90DaysRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_110_StockBalance90DaysRow(ByVal row As V_110_StockBalance90DaysRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_110_StockBalance90DaysDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_410_KSB1DetailCostDataTable Inherits Global.System.Data.TypedTableBase(Of V_410_KSB1DetailCostRow) Private columnPosting_Date As Global.System.Data.DataColumn Private columnDocument_No As Global.System.Data.DataColumn Private columnAccount As Global.System.Data.DataColumn Private columnCost_center As Global.System.Data.DataColumn Private columnQty As Global.System.Data.DataColumn Private columnAmount As Global.System.Data.DataColumn Private columnHeader_text As Global.System.Data.DataColumn Private columnMaterial As Global.System.Data.DataColumn Private columnMat_Name As Global.System.Data.DataColumn Private columnPO_Text As Global.System.Data.DataColumn Private columnText As Global.System.Data.DataColumn Private columnPO_No As Global.System.Data.DataColumn Private columnIO_No As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_410_KSB1DetailCost" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Posting_DateColumn() As Global.System.Data.DataColumn Get Return Me.columnPosting_Date End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Document_NoColumn() As Global.System.Data.DataColumn Get Return Me.columnDocument_No End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AccountColumn() As Global.System.Data.DataColumn Get Return Me.columnAccount End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Cost_centerColumn() As Global.System.Data.DataColumn Get Return Me.columnCost_center End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property QtyColumn() As Global.System.Data.DataColumn Get Return Me.columnQty End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property AmountColumn() As Global.System.Data.DataColumn Get Return Me.columnAmount End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Header_textColumn() As Global.System.Data.DataColumn Get Return Me.columnHeader_text End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property MaterialColumn() As Global.System.Data.DataColumn Get Return Me.columnMaterial End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Mat_NameColumn() As Global.System.Data.DataColumn Get Return Me.columnMat_Name End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property PO_TextColumn() As Global.System.Data.DataColumn Get Return Me.columnPO_Text End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property TextColumn() As Global.System.Data.DataColumn Get Return Me.columnText End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property PO_NoColumn() As Global.System.Data.DataColumn Get Return Me.columnPO_No End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property IO_NoColumn() As Global.System.Data.DataColumn Get Return Me.columnIO_No End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_410_KSB1DetailCostRow Get Return CType(Me.Rows(index),V_410_KSB1DetailCostRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_410_KSB1DetailCostRowChanging As V_410_KSB1DetailCostRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_410_KSB1DetailCostRowChanged As V_410_KSB1DetailCostRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_410_KSB1DetailCostRowDeleting As V_410_KSB1DetailCostRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_410_KSB1DetailCostRowDeleted As V_410_KSB1DetailCostRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_410_KSB1DetailCostRow(ByVal row As V_410_KSB1DetailCostRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_410_KSB1DetailCostRow(ByVal Posting_Date As Date, ByVal Document_No As String, ByVal Account As String, ByVal Cost_center As String, ByVal Qty As Decimal, ByVal Amount As Decimal, ByVal Header_text As String, ByVal Material As String, ByVal Mat_Name As String, ByVal PO_Text As String, ByVal Text As String, ByVal PO_No As String, ByVal IO_No As String) As V_410_KSB1DetailCostRow Dim rowV_410_KSB1DetailCostRow As V_410_KSB1DetailCostRow = CType(Me.NewRow,V_410_KSB1DetailCostRow) Dim columnValuesArray() As Object = New Object() {Posting_Date, Document_No, Account, Cost_center, Qty, Amount, Header_text, Material, Mat_Name, PO_Text, Text, PO_No, IO_No} rowV_410_KSB1DetailCostRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_410_KSB1DetailCostRow) Return rowV_410_KSB1DetailCostRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_410_KSB1DetailCostDataTable = CType(MyBase.Clone,V_410_KSB1DetailCostDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_410_KSB1DetailCostDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnPosting_Date = MyBase.Columns("Posting Date") Me.columnDocument_No = MyBase.Columns("Document No") Me.columnAccount = MyBase.Columns("Account") Me.columnCost_center = MyBase.Columns("Cost center") Me.columnQty = MyBase.Columns("Qty") Me.columnAmount = MyBase.Columns("Amount") Me.columnHeader_text = MyBase.Columns("Header text") Me.columnMaterial = MyBase.Columns("Material") Me.columnMat_Name = MyBase.Columns("Mat Name") Me.columnPO_Text = MyBase.Columns("PO Text") Me.columnText = MyBase.Columns("Text") Me.columnPO_No = MyBase.Columns("PO No") Me.columnIO_No = MyBase.Columns("IO No") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnPosting_Date = New Global.System.Data.DataColumn("Posting Date", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPosting_Date) Me.columnDocument_No = New Global.System.Data.DataColumn("Document No", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDocument_No) Me.columnAccount = New Global.System.Data.DataColumn("Account", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAccount) Me.columnCost_center = New Global.System.Data.DataColumn("Cost center", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCost_center) Me.columnQty = New Global.System.Data.DataColumn("Qty", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQty) Me.columnAmount = New Global.System.Data.DataColumn("Amount", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAmount) Me.columnHeader_text = New Global.System.Data.DataColumn("Header text", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnHeader_text) Me.columnMaterial = New Global.System.Data.DataColumn("Material", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMaterial) Me.columnMat_Name = New Global.System.Data.DataColumn("Mat Name", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMat_Name) Me.columnPO_Text = New Global.System.Data.DataColumn("PO Text", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPO_Text) Me.columnText = New Global.System.Data.DataColumn("Text", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnText) Me.columnPO_No = New Global.System.Data.DataColumn("PO No", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPO_No) Me.columnIO_No = New Global.System.Data.DataColumn("IO No", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnIO_No) Me.columnDocument_No.MaxLength = 10 Me.columnAccount.ReadOnly = true Me.columnAccount.MaxLength = 6 Me.columnCost_center.MaxLength = 10 Me.columnHeader_text.MaxLength = 30 Me.columnMaterial.MaxLength = 18 Me.columnMat_Name.MaxLength = 40 Me.columnPO_Text.MaxLength = 40 Me.columnText.MaxLength = 50 Me.columnPO_No.MaxLength = 10 Me.columnIO_No.MaxLength = 50 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_410_KSB1DetailCostRow() As V_410_KSB1DetailCostRow Return CType(Me.NewRow,V_410_KSB1DetailCostRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_410_KSB1DetailCostRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_410_KSB1DetailCostRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_410_KSB1DetailCostRowChangedEvent) Is Nothing) Then RaiseEvent V_410_KSB1DetailCostRowChanged(Me, New V_410_KSB1DetailCostRowChangeEvent(CType(e.Row,V_410_KSB1DetailCostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_410_KSB1DetailCostRowChangingEvent) Is Nothing) Then RaiseEvent V_410_KSB1DetailCostRowChanging(Me, New V_410_KSB1DetailCostRowChangeEvent(CType(e.Row,V_410_KSB1DetailCostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_410_KSB1DetailCostRowDeletedEvent) Is Nothing) Then RaiseEvent V_410_KSB1DetailCostRowDeleted(Me, New V_410_KSB1DetailCostRowChangeEvent(CType(e.Row,V_410_KSB1DetailCostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_410_KSB1DetailCostRowDeletingEvent) Is Nothing) Then RaiseEvent V_410_KSB1DetailCostRowDeleting(Me, New V_410_KSB1DetailCostRowChangeEvent(CType(e.Row,V_410_KSB1DetailCostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_410_KSB1DetailCostRow(ByVal row As V_410_KSB1DetailCostRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_410_KSB1DetailCostDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_510_TransferPlantDataTable Inherits Global.System.Data.TypedTableBase(Of V_510_TransferPlantRow) Private columnmmatno As Global.System.Data.DataColumn Private columnmmateng As Global.System.Data.DataColumn Private columnRY As Global.System.Data.DataColumn Private columnSB As Global.System.Data.DataColumn Private columnDays_Sale_Min As Global.System.Data.DataColumn Private columnDays_Sale_Max As Global.System.Data.DataColumn Private _columnS_Day As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_510_TransferPlant" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatengColumn() As Global.System.Data.DataColumn Get Return Me.columnmmateng End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property RYColumn() As Global.System.Data.DataColumn Get Return Me.columnRY End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property SBColumn() As Global.System.Data.DataColumn Get Return Me.columnSB End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_Sale_MinColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale_Min End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Days_Sale_MaxColumn() As Global.System.Data.DataColumn Get Return Me.columnDays_Sale_Max End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property _S_DayColumn() As Global.System.Data.DataColumn Get Return Me._columnS_Day End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_510_TransferPlantRow Get Return CType(Me.Rows(index),V_510_TransferPlantRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_510_TransferPlantRowChanging As V_510_TransferPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_510_TransferPlantRowChanged As V_510_TransferPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_510_TransferPlantRowDeleting As V_510_TransferPlantRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_510_TransferPlantRowDeleted As V_510_TransferPlantRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_510_TransferPlantRow(ByVal row As V_510_TransferPlantRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_510_TransferPlantRow(ByVal mmatno As String, ByVal mmateng As String, ByVal RY As Decimal, ByVal SB As Decimal, ByVal Days_Sale_Min As Integer, ByVal Days_Sale_Max As Integer, ByVal _S_Day As Decimal) As V_510_TransferPlantRow Dim rowV_510_TransferPlantRow As V_510_TransferPlantRow = CType(Me.NewRow,V_510_TransferPlantRow) Dim columnValuesArray() As Object = New Object() {mmatno, mmateng, RY, SB, Days_Sale_Min, Days_Sale_Max, _S_Day} rowV_510_TransferPlantRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_510_TransferPlantRow) Return rowV_510_TransferPlantRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_510_TransferPlantDataTable = CType(MyBase.Clone,V_510_TransferPlantDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_510_TransferPlantDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnmmatno = MyBase.Columns("mmatno") Me.columnmmateng = MyBase.Columns("mmateng") Me.columnRY = MyBase.Columns("RY") Me.columnSB = MyBase.Columns("SB") Me.columnDays_Sale_Min = MyBase.Columns("Days Sale Min") Me.columnDays_Sale_Max = MyBase.Columns("Days Sale Max") Me._columnS_Day = MyBase.Columns("S/Day") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnmmateng = New Global.System.Data.DataColumn("mmateng", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmateng) Me.columnRY = New Global.System.Data.DataColumn("RY", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRY) Me.columnSB = New Global.System.Data.DataColumn("SB", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSB) Me.columnDays_Sale_Min = New Global.System.Data.DataColumn("Days Sale Min", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale_Min) Me.columnDays_Sale_Max = New Global.System.Data.DataColumn("Days Sale Max", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDays_Sale_Max) Me._columnS_Day = New Global.System.Data.DataColumn("S/Day", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) Me._columnS_Day.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnS_Day") Me._columnS_Day.ExtendedProperties.Add("Generator_UserColumnName", "S/Day") MyBase.Columns.Add(Me._columnS_Day) Me.columnmmatno.MaxLength = 18 Me.columnmmateng.MaxLength = 40 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_510_TransferPlantRow() As V_510_TransferPlantRow Return CType(Me.NewRow,V_510_TransferPlantRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_510_TransferPlantRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_510_TransferPlantRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_510_TransferPlantRowChangedEvent) Is Nothing) Then RaiseEvent V_510_TransferPlantRowChanged(Me, New V_510_TransferPlantRowChangeEvent(CType(e.Row,V_510_TransferPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_510_TransferPlantRowChangingEvent) Is Nothing) Then RaiseEvent V_510_TransferPlantRowChanging(Me, New V_510_TransferPlantRowChangeEvent(CType(e.Row,V_510_TransferPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_510_TransferPlantRowDeletedEvent) Is Nothing) Then RaiseEvent V_510_TransferPlantRowDeleted(Me, New V_510_TransferPlantRowChangeEvent(CType(e.Row,V_510_TransferPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_510_TransferPlantRowDeletingEvent) Is Nothing) Then RaiseEvent V_510_TransferPlantRowDeleting(Me, New V_510_TransferPlantRowChangeEvent(CType(e.Row,V_510_TransferPlantRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_510_TransferPlantRow(ByVal row As V_510_TransferPlantRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_510_TransferPlantDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_900_ManageStockDataTable Inherits Global.System.Data.TypedTableBase(Of V_900_ManageStockRow) Private columncaldate As Global.System.Data.DataColumn Private columnmplant_location As Global.System.Data.DataColumn Private columnMat As Global.System.Data.DataColumn Private columnWe As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_900_ManageStock" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property caldateColumn() As Global.System.Data.DataColumn Get Return Me.columncaldate End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mplant_locationColumn() As Global.System.Data.DataColumn Get Return Me.columnmplant_location End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property MatColumn() As Global.System.Data.DataColumn Get Return Me.columnMat End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property WeColumn() As Global.System.Data.DataColumn Get Return Me.columnWe End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_900_ManageStockRow Get Return CType(Me.Rows(index),V_900_ManageStockRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_900_ManageStockRowChanging As V_900_ManageStockRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_900_ManageStockRowChanged As V_900_ManageStockRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_900_ManageStockRowDeleting As V_900_ManageStockRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_900_ManageStockRowDeleted As V_900_ManageStockRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_900_ManageStockRow(ByVal row As V_900_ManageStockRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_900_ManageStockRow(ByVal caldate As Date, ByVal mplant_location As String, ByVal Mat As String, ByVal We As Decimal) As V_900_ManageStockRow Dim rowV_900_ManageStockRow As V_900_ManageStockRow = CType(Me.NewRow,V_900_ManageStockRow) Dim columnValuesArray() As Object = New Object() {caldate, mplant_location, Mat, We} rowV_900_ManageStockRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_900_ManageStockRow) Return rowV_900_ManageStockRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_900_ManageStockDataTable = CType(MyBase.Clone,V_900_ManageStockDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_900_ManageStockDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columncaldate = MyBase.Columns("caldate") Me.columnmplant_location = MyBase.Columns("mplant_location") Me.columnMat = MyBase.Columns("Mat") Me.columnWe = MyBase.Columns("We") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columncaldate = New Global.System.Data.DataColumn("caldate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncaldate) Me.columnmplant_location = New Global.System.Data.DataColumn("mplant_location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmplant_location) Me.columnMat = New Global.System.Data.DataColumn("Mat", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMat) Me.columnWe = New Global.System.Data.DataColumn("We", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnWe) Me.columncaldate.AllowDBNull = false Me.columnmplant_location.AllowDBNull = false Me.columnmplant_location.MaxLength = 10 Me.columnMat.ReadOnly = true Me.columnMat.MaxLength = 8 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_900_ManageStockRow() As V_900_ManageStockRow Return CType(Me.NewRow,V_900_ManageStockRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_900_ManageStockRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_900_ManageStockRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_900_ManageStockRowChangedEvent) Is Nothing) Then RaiseEvent V_900_ManageStockRowChanged(Me, New V_900_ManageStockRowChangeEvent(CType(e.Row,V_900_ManageStockRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_900_ManageStockRowChangingEvent) Is Nothing) Then RaiseEvent V_900_ManageStockRowChanging(Me, New V_900_ManageStockRowChangeEvent(CType(e.Row,V_900_ManageStockRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_900_ManageStockRowDeletedEvent) Is Nothing) Then RaiseEvent V_900_ManageStockRowDeleted(Me, New V_900_ManageStockRowChangeEvent(CType(e.Row,V_900_ManageStockRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_900_ManageStockRowDeletingEvent) Is Nothing) Then RaiseEvent V_900_ManageStockRowDeleting(Me, New V_900_ManageStockRowChangeEvent(CType(e.Row,V_900_ManageStockRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_900_ManageStockRow(ByVal row As V_900_ManageStockRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_900_ManageStockDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_BOI_Split_CostDataTable Inherits Global.System.Data.TypedTableBase(Of V_BOI_Split_CostRow) Private columnmcompcode As Global.System.Data.DataColumn Private columnmmonth As Global.System.Data.DataColumn Private columnmyear As Global.System.Data.DataColumn Private columnmcostelement As Global.System.Data.DataColumn Private columnmmatno As Global.System.Data.DataColumn Private columnqty As Global.System.Data.DataColumn Private columnamount As Global.System.Data.DataColumn Private columnper_unit As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_BOI_Split_Cost" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mcompcodeColumn() As Global.System.Data.DataColumn Get Return Me.columnmcompcode End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmonthColumn() As Global.System.Data.DataColumn Get Return Me.columnmmonth End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property myearColumn() As Global.System.Data.DataColumn Get Return Me.columnmyear End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mcostelementColumn() As Global.System.Data.DataColumn Get Return Me.columnmcostelement End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property qtyColumn() As Global.System.Data.DataColumn Get Return Me.columnqty End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property amountColumn() As Global.System.Data.DataColumn Get Return Me.columnamount End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property per_unitColumn() As Global.System.Data.DataColumn Get Return Me.columnper_unit End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_BOI_Split_CostRow Get Return CType(Me.Rows(index),V_BOI_Split_CostRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_BOI_Split_CostRowChanging As V_BOI_Split_CostRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_BOI_Split_CostRowChanged As V_BOI_Split_CostRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_BOI_Split_CostRowDeleting As V_BOI_Split_CostRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_BOI_Split_CostRowDeleted As V_BOI_Split_CostRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_BOI_Split_CostRow(ByVal row As V_BOI_Split_CostRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_BOI_Split_CostRow(ByVal mcompcode As String, ByVal mmonth As String, ByVal myear As String, ByVal mcostelement As String, ByVal mmatno As String, ByVal qty As Decimal, ByVal amount As Decimal, ByVal per_unit As Decimal) As V_BOI_Split_CostRow Dim rowV_BOI_Split_CostRow As V_BOI_Split_CostRow = CType(Me.NewRow,V_BOI_Split_CostRow) Dim columnValuesArray() As Object = New Object() {mcompcode, mmonth, myear, mcostelement, mmatno, qty, amount, per_unit} rowV_BOI_Split_CostRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_BOI_Split_CostRow) Return rowV_BOI_Split_CostRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_BOI_Split_CostDataTable = CType(MyBase.Clone,V_BOI_Split_CostDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_BOI_Split_CostDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnmcompcode = MyBase.Columns("mcompcode") Me.columnmmonth = MyBase.Columns("mmonth") Me.columnmyear = MyBase.Columns("myear") Me.columnmcostelement = MyBase.Columns("mcostelement") Me.columnmmatno = MyBase.Columns("mmatno") Me.columnqty = MyBase.Columns("qty") Me.columnamount = MyBase.Columns("amount") Me.columnper_unit = MyBase.Columns("per unit") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnmcompcode = New Global.System.Data.DataColumn("mcompcode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmcompcode) Me.columnmmonth = New Global.System.Data.DataColumn("mmonth", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmonth) Me.columnmyear = New Global.System.Data.DataColumn("myear", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmyear) Me.columnmcostelement = New Global.System.Data.DataColumn("mcostelement", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmcostelement) Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnqty = New Global.System.Data.DataColumn("qty", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnqty) Me.columnamount = New Global.System.Data.DataColumn("amount", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnamount) Me.columnper_unit = New Global.System.Data.DataColumn("per unit", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnper_unit) Me.columnmcompcode.AllowDBNull = false Me.columnmcompcode.MaxLength = 4 Me.columnmmonth.AllowDBNull = false Me.columnmmonth.MaxLength = 2 Me.columnmyear.AllowDBNull = false Me.columnmyear.MaxLength = 4 Me.columnmcostelement.AllowDBNull = false Me.columnmcostelement.MaxLength = 10 Me.columnmmatno.MaxLength = 18 Me.columnper_unit.ReadOnly = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_BOI_Split_CostRow() As V_BOI_Split_CostRow Return CType(Me.NewRow,V_BOI_Split_CostRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_BOI_Split_CostRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_BOI_Split_CostRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_BOI_Split_CostRowChangedEvent) Is Nothing) Then RaiseEvent V_BOI_Split_CostRowChanged(Me, New V_BOI_Split_CostRowChangeEvent(CType(e.Row,V_BOI_Split_CostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_BOI_Split_CostRowChangingEvent) Is Nothing) Then RaiseEvent V_BOI_Split_CostRowChanging(Me, New V_BOI_Split_CostRowChangeEvent(CType(e.Row,V_BOI_Split_CostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_BOI_Split_CostRowDeletedEvent) Is Nothing) Then RaiseEvent V_BOI_Split_CostRowDeleted(Me, New V_BOI_Split_CostRowChangeEvent(CType(e.Row,V_BOI_Split_CostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_BOI_Split_CostRowDeletingEvent) Is Nothing) Then RaiseEvent V_BOI_Split_CostRowDeleting(Me, New V_BOI_Split_CostRowChangeEvent(CType(e.Row,V_BOI_Split_CostRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_BOI_Split_CostRow(ByVal row As V_BOI_Split_CostRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_BOI_Split_CostDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents the strongly named DataTable class. '''</summary> <Global.System.Serializable(), _ Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _ Partial Public Class V_Sales3MonthsDetailsDataTable Inherits Global.System.Data.TypedTableBase(Of V_Sales3MonthsDetailsRow) Private columnPlantName As Global.System.Data.DataColumn Private columncaldate As Global.System.Data.DataColumn Private columnmmatno As Global.System.Data.DataColumn Private columnATP As Global.System.Data.DataColumn Private columnWeight As Global.System.Data.DataColumn Private columnmplant_salezone As Global.System.Data.DataColumn Private columnComp As Global.System.Data.DataColumn <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.TableName = "V_Sales3MonthsDetails" Me.BeginInit Me.InitClass Me.EndInit End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property PlantNameColumn() As Global.System.Data.DataColumn Get Return Me.columnPlantName End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property caldateColumn() As Global.System.Data.DataColumn Get Return Me.columncaldate End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mmatnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmmatno End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property ATPColumn() As Global.System.Data.DataColumn Get Return Me.columnATP End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property WeightColumn() As Global.System.Data.DataColumn Get Return Me.columnWeight End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property mplant_salezoneColumn() As Global.System.Data.DataColumn Get Return Me.columnmplant_salezone End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property CompColumn() As Global.System.Data.DataColumn Get Return Me.columnComp End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Default ReadOnly Property Item(ByVal index As Integer) As V_Sales3MonthsDetailsRow Get Return CType(Me.Rows(index),V_Sales3MonthsDetailsRow) End Get End Property <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_Sales3MonthsDetailsRowChanging As V_Sales3MonthsDetailsRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_Sales3MonthsDetailsRowChanged As V_Sales3MonthsDetailsRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_Sales3MonthsDetailsRowDeleting As V_Sales3MonthsDetailsRowChangeEventHandler <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Event V_Sales3MonthsDetailsRowDeleted As V_Sales3MonthsDetailsRowChangeEventHandler <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Sub AddV_Sales3MonthsDetailsRow(ByVal row As V_Sales3MonthsDetailsRow) Me.Rows.Add(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overloads Function AddV_Sales3MonthsDetailsRow(ByVal PlantName As String, ByVal caldate As Date, ByVal mmatno As String, ByVal ATP As Decimal, ByVal Weight As Decimal, ByVal mplant_salezone As String, ByVal Comp As String) As V_Sales3MonthsDetailsRow Dim rowV_Sales3MonthsDetailsRow As V_Sales3MonthsDetailsRow = CType(Me.NewRow,V_Sales3MonthsDetailsRow) Dim columnValuesArray() As Object = New Object() {PlantName, caldate, mmatno, ATP, Weight, mplant_salezone, Comp} rowV_Sales3MonthsDetailsRow.ItemArray = columnValuesArray Me.Rows.Add(rowV_Sales3MonthsDetailsRow) Return rowV_Sales3MonthsDetailsRow End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As V_Sales3MonthsDetailsDataTable = CType(MyBase.Clone,V_Sales3MonthsDetailsDataTable) cln.InitVars Return cln End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New V_Sales3MonthsDetailsDataTable() End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub InitVars() Me.columnPlantName = MyBase.Columns("PlantName") Me.columncaldate = MyBase.Columns("caldate") Me.columnmmatno = MyBase.Columns("mmatno") Me.columnATP = MyBase.Columns("ATP") Me.columnWeight = MyBase.Columns("Weight") Me.columnmplant_salezone = MyBase.Columns("mplant_salezone") Me.columnComp = MyBase.Columns("Comp") End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitClass() Me.columnPlantName = New Global.System.Data.DataColumn("PlantName", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPlantName) Me.columncaldate = New Global.System.Data.DataColumn("caldate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncaldate) Me.columnmmatno = New Global.System.Data.DataColumn("mmatno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmmatno) Me.columnATP = New Global.System.Data.DataColumn("ATP", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnATP) Me.columnWeight = New Global.System.Data.DataColumn("Weight", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnWeight) Me.columnmplant_salezone = New Global.System.Data.DataColumn("mplant_salezone", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmplant_salezone) Me.columnComp = New Global.System.Data.DataColumn("Comp", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnComp) Me.columnPlantName.AllowDBNull = false Me.columnPlantName.MaxLength = 10 Me.columncaldate.AllowDBNull = false Me.columnmmatno.AllowDBNull = false Me.columnmmatno.MaxLength = 18 Me.columnmplant_salezone.AllowDBNull = false Me.columnmplant_salezone.MaxLength = 10 Me.columnComp.AllowDBNull = false Me.columnComp.MaxLength = 2 End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function NewV_Sales3MonthsDetailsRow() As V_Sales3MonthsDetailsRow Return CType(Me.NewRow,V_Sales3MonthsDetailsRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New V_Sales3MonthsDetailsRow(builder) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(V_Sales3MonthsDetailsRow) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.V_Sales3MonthsDetailsRowChangedEvent) Is Nothing) Then RaiseEvent V_Sales3MonthsDetailsRowChanged(Me, New V_Sales3MonthsDetailsRowChangeEvent(CType(e.Row,V_Sales3MonthsDetailsRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.V_Sales3MonthsDetailsRowChangingEvent) Is Nothing) Then RaiseEvent V_Sales3MonthsDetailsRowChanging(Me, New V_Sales3MonthsDetailsRowChangeEvent(CType(e.Row,V_Sales3MonthsDetailsRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.V_Sales3MonthsDetailsRowDeletedEvent) Is Nothing) Then RaiseEvent V_Sales3MonthsDetailsRowDeleted(Me, New V_Sales3MonthsDetailsRowChangeEvent(CType(e.Row,V_Sales3MonthsDetailsRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.V_Sales3MonthsDetailsRowDeletingEvent) Is Nothing) Then RaiseEvent V_Sales3MonthsDetailsRowDeleting(Me, New V_Sales3MonthsDetailsRowChangeEvent(CType(e.Row,V_Sales3MonthsDetailsRow), e.Action)) End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub RemoveV_Sales3MonthsDetailsRow(ByVal row As V_Sales3MonthsDetailsRow) Me.Rows.Remove(row) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As PlanningS_View = New PlanningS_View() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "V_Sales3MonthsDetailsDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class GI_Doc_printRow Inherits Global.System.Data.DataRow Private tableGI_Doc_print As GI_Doc_printDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableGI_Doc_print = CType(Me.Table,GI_Doc_printDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Uname() As String Get Try Return CType(Me(Me.tableGI_Doc_print.UnameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Uname' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.UnameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Headertext() As String Get Try Return CType(Me(Me.tableGI_Doc_print.HeadertextColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Headertext' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.HeadertextColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property itemNo() As Integer Get Try Return CType(Me(Me.tableGI_Doc_print.itemNoColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'itemNo' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.itemNoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Productcode() As String Get Try Return CType(Me(Me.tableGI_Doc_print.ProductcodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Productcode' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.ProductcodeColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmateng() As String Get Try Return CType(Me(Me.tableGI_Doc_print.mmatengColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmateng' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.mmatengColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property OrderQty() As Decimal Get Try Return CType(Me(Me.tableGI_Doc_print.OrderQtyColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'OrderQty' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.OrderQtyColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property GLAccount() As String Get Try Return CType(Me(Me.tableGI_Doc_print.GLAccountColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'GLAccount' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.GLAccountColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property CostCenter() As String Get Try Return CType(Me(Me.tableGI_Doc_print.CostCenterColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CostCenter' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.CostCenterColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatthai() As String Get Try Return CType(Me(Me.tableGI_Doc_print.mmatthaiColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatthai' in table 'GI_Doc_print' is DBNull.", e) End Try End Get Set Me(Me.tableGI_Doc_print.mmatthaiColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsUnameNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.UnameColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetUnameNull() Me(Me.tableGI_Doc_print.UnameColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsHeadertextNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.HeadertextColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetHeadertextNull() Me(Me.tableGI_Doc_print.HeadertextColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsitemNoNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.itemNoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetitemNoNull() Me(Me.tableGI_Doc_print.itemNoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsProductcodeNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.ProductcodeColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetProductcodeNull() Me(Me.tableGI_Doc_print.ProductcodeColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatengNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.mmatengColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatengNull() Me(Me.tableGI_Doc_print.mmatengColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsOrderQtyNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.OrderQtyColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetOrderQtyNull() Me(Me.tableGI_Doc_print.OrderQtyColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsGLAccountNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.GLAccountColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetGLAccountNull() Me(Me.tableGI_Doc_print.GLAccountColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsCostCenterNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.CostCenterColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetCostCenterNull() Me(Me.tableGI_Doc_print.CostCenterColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatthaiNull() As Boolean Return Me.IsNull(Me.tableGI_Doc_print.mmatthaiColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatthaiNull() Me(Me.tableGI_Doc_print.mmatthaiColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class nameRow Inherits Global.System.Data.DataRow Private tablename As nameDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablename = CType(Me.Table,nameDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Thai_name() As String Get Try Return CType(Me(Me.tablename.Thai_nameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Thai_name' in table 'name' is DBNull.", e) End Try End Get Set Me(Me.tablename.Thai_nameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Jap_name() As String Get Try Return CType(Me(Me.tablename.Jap_nameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Jap_name' in table 'name' is DBNull.", e) End Try End Get Set Me(Me.tablename.Jap_nameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsThai_nameNull() As Boolean Return Me.IsNull(Me.tablename.Thai_nameColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetThai_nameNull() Me(Me.tablename.Thai_nameColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsJap_nameNull() As Boolean Return Me.IsNull(Me.tablename.Jap_nameColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetJap_nameNull() Me(Me.tablename.Jap_nameColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class skillRow Inherits Global.System.Data.DataRow Private tableskill As skillDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableskill = CType(Me.Table,skillDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Thai_skill() As String Get Try Return CType(Me(Me.tableskill.Thai_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Thai_skill' in table 'skill' is DBNull.", e) End Try End Get Set Me(Me.tableskill.Thai_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Jap_skill() As String Get Try Return CType(Me(Me.tableskill.Jap_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Jap_skill' in table 'skill' is DBNull.", e) End Try End Get Set Me(Me.tableskill.Jap_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsThai_skillNull() As Boolean Return Me.IsNull(Me.tableskill.Thai_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetThai_skillNull() Me(Me.tableskill.Thai_skillColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsJap_skillNull() As Boolean Return Me.IsNull(Me.tableskill.Jap_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetJap_skillNull() Me(Me.tableskill.Jap_skillColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class skill_sync_viewRow Inherits Global.System.Data.DataRow Private tableskill_sync_view As skill_sync_viewDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableskill_sync_view = CType(Me.Table,skill_sync_viewDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property skill() As String Get Try Return CType(Me(Me.tableskill_sync_view.skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'skill' in table 'skill_sync_view' is DBNull.", e) End Try End Get Set Me(Me.tableskill_sync_view.skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Main_skill() As String Get Try Return CType(Me(Me.tableskill_sync_view.Main_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Main_skill' in table 'skill_sync_view' is DBNull.", e) End Try End Get Set Me(Me.tableskill_sync_view.Main_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Atk_skill() As String Get Try Return CType(Me(Me.tableskill_sync_view.Atk_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Atk_skill' in table 'skill_sync_view' is DBNull.", e) End Try End Get Set Me(Me.tableskill_sync_view.Atk_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Def_skill() As String Get Try Return CType(Me(Me.tableskill_sync_view.Def_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Def_skill' in table 'skill_sync_view' is DBNull.", e) End Try End Get Set Me(Me.tableskill_sync_view.Def_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Int_skill() As String Get Try Return CType(Me(Me.tableskill_sync_view.Int_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Int_skill' in table 'skill_sync_view' is DBNull.", e) End Try End Get Set Me(Me.tableskill_sync_view.Int_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Hide_skill() As String Get Try Return CType(Me(Me.tableskill_sync_view.Hide_skillColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Hide_skill' in table 'skill_sync_view' is DBNull.", e) End Try End Get Set Me(Me.tableskill_sync_view.Hide_skillColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsskillNull() As Boolean Return Me.IsNull(Me.tableskill_sync_view.skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetskillNull() Me(Me.tableskill_sync_view.skillColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMain_skillNull() As Boolean Return Me.IsNull(Me.tableskill_sync_view.Main_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMain_skillNull() Me(Me.tableskill_sync_view.Main_skillColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsAtk_skillNull() As Boolean Return Me.IsNull(Me.tableskill_sync_view.Atk_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetAtk_skillNull() Me(Me.tableskill_sync_view.Atk_skillColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDef_skillNull() As Boolean Return Me.IsNull(Me.tableskill_sync_view.Def_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDef_skillNull() Me(Me.tableskill_sync_view.Def_skillColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsInt_skillNull() As Boolean Return Me.IsNull(Me.tableskill_sync_view.Int_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetInt_skillNull() Me(Me.tableskill_sync_view.Int_skillColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsHide_skillNull() As Boolean Return Me.IsNull(Me.tableskill_sync_view.Hide_skillColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetHide_skillNull() Me(Me.tableskill_sync_view.Hide_skillColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_100_DataPlanningRow Inherits Global.System.Data.DataRow Private tableV_100_DataPlanning As V_100_DataPlanningDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_100_DataPlanning = CType(Me.Table,V_100_DataPlanningDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property PlantName() As String Get Return CType(Me(Me.tableV_100_DataPlanning.PlantNameColumn),String) End Get Set Me(Me.tableV_100_DataPlanning.PlantNameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Try Return CType(Me(Me.tableV_100_DataPlanning.mmatnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatno' in table 'V_100_DataPlanning' is DBNull.", e) End Try End Get Set Me(Me.tableV_100_DataPlanning.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property UR() As Double Get Try Return CType(Me(Me.tableV_100_DataPlanning.URColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UR' in table 'V_100_DataPlanning' is DBNull.", e) End Try End Get Set Me(Me.tableV_100_DataPlanning.URColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ATP() As Double Get Try Return CType(Me(Me.tableV_100_DataPlanning.ATPColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ATP' in table 'V_100_DataPlanning' is DBNull.", e) End Try End Get Set Me(Me.tableV_100_DataPlanning.ATPColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property AvgPast() As Decimal Get Return CType(Me(Me.tableV_100_DataPlanning.AvgPastColumn),Decimal) End Get Set Me(Me.tableV_100_DataPlanning.AvgPastColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property AvgRolling() As Decimal Get Return CType(Me(Me.tableV_100_DataPlanning.AvgRollingColumn),Decimal) End Get Set Me(Me.tableV_100_DataPlanning.AvgRollingColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property SFPerDay() As Integer Get Return CType(Me(Me.tableV_100_DataPlanning.SFPerDayColumn),Integer) End Get Set Me(Me.tableV_100_DataPlanning.SFPerDayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property RunDate() As Date Get Try Return CType(Me(Me.tableV_100_DataPlanning.RunDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'RunDate' in table 'V_100_DataPlanning' is DBNull.", e) End Try End Get Set Me(Me.tableV_100_DataPlanning.RunDateColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatnoNull() As Boolean Return Me.IsNull(Me.tableV_100_DataPlanning.mmatnoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatnoNull() Me(Me.tableV_100_DataPlanning.mmatnoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsURNull() As Boolean Return Me.IsNull(Me.tableV_100_DataPlanning.URColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetURNull() Me(Me.tableV_100_DataPlanning.URColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsATPNull() As Boolean Return Me.IsNull(Me.tableV_100_DataPlanning.ATPColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetATPNull() Me(Me.tableV_100_DataPlanning.ATPColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsRunDateNull() As Boolean Return Me.IsNull(Me.tableV_100_DataPlanning.RunDateColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetRunDateNull() Me(Me.tableV_100_DataPlanning.RunDateColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_110_Master_Planning_AllPlantRow Inherits Global.System.Data.DataRow Private tableV_110_Master_Planning_AllPlant As V_110_Master_Planning_AllPlantDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_110_Master_Planning_AllPlant = CType(Me.Table,V_110_Master_Planning_AllPlantDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Group() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.GroupColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Group' in table 'V_110_Master_Planning_AllPlant' is DBNull."& _ "", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.GroupColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Status() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.StatusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Status' in table 'V_110_Master_Planning_AllPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.StatusColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.mmatnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatno' in table 'V_110_Master_Planning_AllPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmateng() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.mmatengColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmateng' in table 'V_110_Master_Planning_AllPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.mmatengColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mStandardCap() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.mStandardCapColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mStandardCap' in table 'V_110_Master_Planning_AllPlant' is "& _ "DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.mStandardCapColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property _S_Day() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant._S_DayColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'S/Day' in table 'V_110_Master_Planning_AllPlant' is DBNull."& _ "", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant._S_DayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Utilize() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.UtilizeColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Utilize' in table 'V_110_Master_Planning_AllPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.UtilizeColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property UR() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.URColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UR' in table 'V_110_Master_Planning_AllPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.URColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ATP() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.ATPColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ATP' in table 'V_110_Master_Planning_AllPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.ATPColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property QtyGIT() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.QtyGITColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'QtyGIT' in table 'V_110_Master_Planning_AllPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.QtyGITColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property MinStock() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.MinStockColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'MinStock' in table 'V_110_Master_Planning_AllPlant' is DBNu"& _ "ll.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.MinStockColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property MaxStock() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.MaxStockColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'MaxStock' in table 'V_110_Master_Planning_AllPlant' is DBNu"& _ "ll.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.MaxStockColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.Days_SaleColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale' in table 'V_110_Master_Planning_AllPlant' is DBN"& _ "ull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.Days_SaleColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Request() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.RequestColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Request' in table 'V_110_Master_Planning_AllPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.RequestColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property OverMax() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.OverMaxColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'OverMax' in table 'V_110_Master_Planning_AllPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.OverMaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property _P_Day() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant._P_DayColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'P/Day' in table 'V_110_Master_Planning_AllPlant' is DBNull."& _ "", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant._P_DayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property AvgPast() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.AvgPastColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AvgPast' in table 'V_110_Master_Planning_AllPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.AvgPastColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property AvgRolling() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.AvgRollingColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AvgRolling' in table 'V_110_Master_Planning_AllPlant' is DB"& _ "Null.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.AvgRollingColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property SFPerDay() As Integer Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.SFPerDayColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SFPerDay' in table 'V_110_Master_Planning_AllPlant' is DBNu"& _ "ll.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.SFPerDayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Percent_Min() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.Percent_MinColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Percent Min' in table 'V_110_Master_Planning_AllPlant' is D"& _ "BNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.Percent_MinColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Percent_Max() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.Percent_MaxColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Percent Max' in table 'V_110_Master_Planning_AllPlant' is D"& _ "BNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.Percent_MaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale_Min() As Integer Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MinColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale Min' in table 'V_110_Master_Planning_AllPlant' is"& _ " DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MinColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale_Max() As Integer Get Try Return CType(Me(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MaxColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale Max' in table 'V_110_Master_Planning_AllPlant' is"& _ " DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsGroupNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.GroupColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetGroupNull() Me(Me.tableV_110_Master_Planning_AllPlant.GroupColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsStatusNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.StatusColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetStatusNull() Me(Me.tableV_110_Master_Planning_AllPlant.StatusColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatnoNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.mmatnoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatnoNull() Me(Me.tableV_110_Master_Planning_AllPlant.mmatnoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatengNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.mmatengColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatengNull() Me(Me.tableV_110_Master_Planning_AllPlant.mmatengColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmStandardCapNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.mStandardCapColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmStandardCapNull() Me(Me.tableV_110_Master_Planning_AllPlant.mStandardCapColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Is_S_DayNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant._S_DayColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Set_S_DayNull() Me(Me.tableV_110_Master_Planning_AllPlant._S_DayColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsUtilizeNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.UtilizeColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetUtilizeNull() Me(Me.tableV_110_Master_Planning_AllPlant.UtilizeColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsURNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.URColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetURNull() Me(Me.tableV_110_Master_Planning_AllPlant.URColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsATPNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.ATPColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetATPNull() Me(Me.tableV_110_Master_Planning_AllPlant.ATPColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsQtyGITNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.QtyGITColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetQtyGITNull() Me(Me.tableV_110_Master_Planning_AllPlant.QtyGITColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMinStockNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.MinStockColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMinStockNull() Me(Me.tableV_110_Master_Planning_AllPlant.MinStockColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMaxStockNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.MaxStockColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMaxStockNull() Me(Me.tableV_110_Master_Planning_AllPlant.MaxStockColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_SaleNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.Days_SaleColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_SaleNull() Me(Me.tableV_110_Master_Planning_AllPlant.Days_SaleColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsRequestNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.RequestColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetRequestNull() Me(Me.tableV_110_Master_Planning_AllPlant.RequestColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsOverMaxNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.OverMaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetOverMaxNull() Me(Me.tableV_110_Master_Planning_AllPlant.OverMaxColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Is_P_DayNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant._P_DayColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Set_P_DayNull() Me(Me.tableV_110_Master_Planning_AllPlant._P_DayColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsAvgPastNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.AvgPastColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetAvgPastNull() Me(Me.tableV_110_Master_Planning_AllPlant.AvgPastColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsAvgRollingNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.AvgRollingColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetAvgRollingNull() Me(Me.tableV_110_Master_Planning_AllPlant.AvgRollingColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsSFPerDayNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.SFPerDayColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetSFPerDayNull() Me(Me.tableV_110_Master_Planning_AllPlant.SFPerDayColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPercent_MinNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.Percent_MinColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPercent_MinNull() Me(Me.tableV_110_Master_Planning_AllPlant.Percent_MinColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPercent_MaxNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.Percent_MaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPercent_MaxNull() Me(Me.tableV_110_Master_Planning_AllPlant.Percent_MaxColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_Sale_MinNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MinColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_Sale_MinNull() Me(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MinColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_Sale_MaxNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_Sale_MaxNull() Me(Me.tableV_110_Master_Planning_AllPlant.Days_Sale_MaxColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_110_Master_Planning_byPlantRow Inherits Global.System.Data.DataRow Private tableV_110_Master_Planning_byPlant As V_110_Master_Planning_byPlantDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_110_Master_Planning_byPlant = CType(Me.Table,V_110_Master_Planning_byPlantDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Group() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.GroupColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Group' in table 'V_110_Master_Planning_byPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.GroupColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Status() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.StatusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Status' in table 'V_110_Master_Planning_byPlant' is DBNull."& _ "", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.StatusColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property PlantName() As String Get Return CType(Me(Me.tableV_110_Master_Planning_byPlant.PlantNameColumn),String) End Get Set Me(Me.tableV_110_Master_Planning_byPlant.PlantNameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.mmatnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatno' in table 'V_110_Master_Planning_byPlant' is DBNull."& _ "", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmateng() As String Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.mmatengColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmateng' in table 'V_110_Master_Planning_byPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.mmatengColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mStandardCap() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.mStandardCapColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mStandardCap' in table 'V_110_Master_Planning_byPlant' is D"& _ "BNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.mStandardCapColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property _S_Day() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant._S_DayColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'S/Day' in table 'V_110_Master_Planning_byPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant._S_DayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Utilize() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.UtilizeColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Utilize' in table 'V_110_Master_Planning_byPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.UtilizeColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property UR() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.URColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UR' in table 'V_110_Master_Planning_byPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.URColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ATP() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.ATPColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ATP' in table 'V_110_Master_Planning_byPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.ATPColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property QtyGIT() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.QtyGITColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'QtyGIT' in table 'V_110_Master_Planning_byPlant' is DBNull."& _ "", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.QtyGITColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property MinStock() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.MinStockColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'MinStock' in table 'V_110_Master_Planning_byPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.MinStockColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property MaxStock() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.MaxStockColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'MaxStock' in table 'V_110_Master_Planning_byPlant' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.MaxStockColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.Days_SaleColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale' in table 'V_110_Master_Planning_byPlant' is DBNu"& _ "ll.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.Days_SaleColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Request() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.RequestColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Request' in table 'V_110_Master_Planning_byPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.RequestColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property OverMax() As Double Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.OverMaxColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'OverMax' in table 'V_110_Master_Planning_byPlant' is DBNull"& _ ".", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.OverMaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property _P_Day() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant._P_DayColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'P/Day' in table 'V_110_Master_Planning_byPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant._P_DayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property AvgPast() As Decimal Get Return CType(Me(Me.tableV_110_Master_Planning_byPlant.AvgPastColumn),Decimal) End Get Set Me(Me.tableV_110_Master_Planning_byPlant.AvgPastColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property AvgRolling() As Decimal Get Return CType(Me(Me.tableV_110_Master_Planning_byPlant.AvgRollingColumn),Decimal) End Get Set Me(Me.tableV_110_Master_Planning_byPlant.AvgRollingColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property SFPerDay() As Integer Get Return CType(Me(Me.tableV_110_Master_Planning_byPlant.SFPerDayColumn),Integer) End Get Set Me(Me.tableV_110_Master_Planning_byPlant.SFPerDayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Percent_Min() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.Percent_MinColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Percent Min' in table 'V_110_Master_Planning_byPlant' is DB"& _ "Null.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.Percent_MinColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Percent_Max() As Decimal Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.Percent_MaxColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Percent Max' in table 'V_110_Master_Planning_byPlant' is DB"& _ "Null.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.Percent_MaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale_Min() As Integer Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MinColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale Min' in table 'V_110_Master_Planning_byPlant' is "& _ "DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MinColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale_Max() As Integer Get Try Return CType(Me(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MaxColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale Max' in table 'V_110_Master_Planning_byPlant' is "& _ "DBNull.", e) End Try End Get Set Me(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsGroupNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.GroupColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetGroupNull() Me(Me.tableV_110_Master_Planning_byPlant.GroupColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsStatusNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.StatusColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetStatusNull() Me(Me.tableV_110_Master_Planning_byPlant.StatusColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatnoNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.mmatnoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatnoNull() Me(Me.tableV_110_Master_Planning_byPlant.mmatnoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatengNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.mmatengColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatengNull() Me(Me.tableV_110_Master_Planning_byPlant.mmatengColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmStandardCapNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.mStandardCapColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmStandardCapNull() Me(Me.tableV_110_Master_Planning_byPlant.mStandardCapColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Is_S_DayNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant._S_DayColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Set_S_DayNull() Me(Me.tableV_110_Master_Planning_byPlant._S_DayColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsUtilizeNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.UtilizeColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetUtilizeNull() Me(Me.tableV_110_Master_Planning_byPlant.UtilizeColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsURNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.URColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetURNull() Me(Me.tableV_110_Master_Planning_byPlant.URColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsATPNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.ATPColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetATPNull() Me(Me.tableV_110_Master_Planning_byPlant.ATPColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsQtyGITNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.QtyGITColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetQtyGITNull() Me(Me.tableV_110_Master_Planning_byPlant.QtyGITColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMinStockNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.MinStockColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMinStockNull() Me(Me.tableV_110_Master_Planning_byPlant.MinStockColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMaxStockNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.MaxStockColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMaxStockNull() Me(Me.tableV_110_Master_Planning_byPlant.MaxStockColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_SaleNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.Days_SaleColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_SaleNull() Me(Me.tableV_110_Master_Planning_byPlant.Days_SaleColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsRequestNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.RequestColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetRequestNull() Me(Me.tableV_110_Master_Planning_byPlant.RequestColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsOverMaxNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.OverMaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetOverMaxNull() Me(Me.tableV_110_Master_Planning_byPlant.OverMaxColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Is_P_DayNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant._P_DayColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Set_P_DayNull() Me(Me.tableV_110_Master_Planning_byPlant._P_DayColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPercent_MinNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.Percent_MinColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPercent_MinNull() Me(Me.tableV_110_Master_Planning_byPlant.Percent_MinColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPercent_MaxNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.Percent_MaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPercent_MaxNull() Me(Me.tableV_110_Master_Planning_byPlant.Percent_MaxColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_Sale_MinNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MinColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_Sale_MinNull() Me(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MinColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_Sale_MaxNull() As Boolean Return Me.IsNull(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_Sale_MaxNull() Me(Me.tableV_110_Master_Planning_byPlant.Days_Sale_MaxColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_110_StockBalance90DaysRow Inherits Global.System.Data.DataRow Private tableV_110_StockBalance90Days As V_110_StockBalance90DaysDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_110_StockBalance90Days = CType(Me.Table,V_110_StockBalance90DaysDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property caldate() As Date Get Try Return CType(Me(Me.tableV_110_StockBalance90Days.caldateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'caldate' in table 'V_110_StockBalance90Days' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_StockBalance90Days.caldateColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Try Return CType(Me(Me.tableV_110_StockBalance90Days.mmatnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatno' in table 'V_110_StockBalance90Days' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_StockBalance90Days.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ATP() As Double Get Try Return CType(Me(Me.tableV_110_StockBalance90Days.ATPColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ATP' in table 'V_110_StockBalance90Days' is DBNull.", e) End Try End Get Set Me(Me.tableV_110_StockBalance90Days.ATPColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IscaldateNull() As Boolean Return Me.IsNull(Me.tableV_110_StockBalance90Days.caldateColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetcaldateNull() Me(Me.tableV_110_StockBalance90Days.caldateColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatnoNull() As Boolean Return Me.IsNull(Me.tableV_110_StockBalance90Days.mmatnoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatnoNull() Me(Me.tableV_110_StockBalance90Days.mmatnoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsATPNull() As Boolean Return Me.IsNull(Me.tableV_110_StockBalance90Days.ATPColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetATPNull() Me(Me.tableV_110_StockBalance90Days.ATPColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_410_KSB1DetailCostRow Inherits Global.System.Data.DataRow Private tableV_410_KSB1DetailCost As V_410_KSB1DetailCostDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_410_KSB1DetailCost = CType(Me.Table,V_410_KSB1DetailCostDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Posting_Date() As Date Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.Posting_DateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Posting Date' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.Posting_DateColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Document_No() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.Document_NoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Document No' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.Document_NoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Account() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.AccountColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Account' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.AccountColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Cost_center() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.Cost_centerColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Cost center' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.Cost_centerColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Qty() As Decimal Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.QtyColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Qty' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.QtyColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Amount() As Decimal Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.AmountColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Amount' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.AmountColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Header_text() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.Header_textColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Header text' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.Header_textColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Material() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.MaterialColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Material' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.MaterialColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Mat_Name() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.Mat_NameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Mat Name' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.Mat_NameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property PO_Text() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.PO_TextColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PO Text' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.PO_TextColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Text() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.TextColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Text' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.TextColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property PO_No() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.PO_NoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PO No' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.PO_NoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property IO_No() As String Get Try Return CType(Me(Me.tableV_410_KSB1DetailCost.IO_NoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'IO No' in table 'V_410_KSB1DetailCost' is DBNull.", e) End Try End Get Set Me(Me.tableV_410_KSB1DetailCost.IO_NoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPosting_DateNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.Posting_DateColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPosting_DateNull() Me(Me.tableV_410_KSB1DetailCost.Posting_DateColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDocument_NoNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.Document_NoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDocument_NoNull() Me(Me.tableV_410_KSB1DetailCost.Document_NoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsAccountNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.AccountColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetAccountNull() Me(Me.tableV_410_KSB1DetailCost.AccountColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsCost_centerNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.Cost_centerColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetCost_centerNull() Me(Me.tableV_410_KSB1DetailCost.Cost_centerColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsQtyNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.QtyColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetQtyNull() Me(Me.tableV_410_KSB1DetailCost.QtyColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsAmountNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.AmountColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetAmountNull() Me(Me.tableV_410_KSB1DetailCost.AmountColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsHeader_textNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.Header_textColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetHeader_textNull() Me(Me.tableV_410_KSB1DetailCost.Header_textColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMaterialNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.MaterialColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMaterialNull() Me(Me.tableV_410_KSB1DetailCost.MaterialColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMat_NameNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.Mat_NameColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMat_NameNull() Me(Me.tableV_410_KSB1DetailCost.Mat_NameColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPO_TextNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.PO_TextColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPO_TextNull() Me(Me.tableV_410_KSB1DetailCost.PO_TextColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsTextNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.TextColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetTextNull() Me(Me.tableV_410_KSB1DetailCost.TextColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsPO_NoNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.PO_NoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetPO_NoNull() Me(Me.tableV_410_KSB1DetailCost.PO_NoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsIO_NoNull() As Boolean Return Me.IsNull(Me.tableV_410_KSB1DetailCost.IO_NoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetIO_NoNull() Me(Me.tableV_410_KSB1DetailCost.IO_NoColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_510_TransferPlantRow Inherits Global.System.Data.DataRow Private tableV_510_TransferPlant As V_510_TransferPlantDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_510_TransferPlant = CType(Me.Table,V_510_TransferPlantDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Try Return CType(Me(Me.tableV_510_TransferPlant.mmatnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatno' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmateng() As String Get Try Return CType(Me(Me.tableV_510_TransferPlant.mmatengColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmateng' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant.mmatengColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property RY() As Decimal Get Try Return CType(Me(Me.tableV_510_TransferPlant.RYColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'RY' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant.RYColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property SB() As Decimal Get Try Return CType(Me(Me.tableV_510_TransferPlant.SBColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SB' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant.SBColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale_Min() As Integer Get Try Return CType(Me(Me.tableV_510_TransferPlant.Days_Sale_MinColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale Min' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant.Days_Sale_MinColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Days_Sale_Max() As Integer Get Try Return CType(Me(Me.tableV_510_TransferPlant.Days_Sale_MaxColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Days Sale Max' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant.Days_Sale_MaxColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property _S_Day() As Decimal Get Try Return CType(Me(Me.tableV_510_TransferPlant._S_DayColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'S/Day' in table 'V_510_TransferPlant' is DBNull.", e) End Try End Get Set Me(Me.tableV_510_TransferPlant._S_DayColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatnoNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant.mmatnoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatnoNull() Me(Me.tableV_510_TransferPlant.mmatnoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatengNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant.mmatengColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatengNull() Me(Me.tableV_510_TransferPlant.mmatengColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsRYNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant.RYColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetRYNull() Me(Me.tableV_510_TransferPlant.RYColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsSBNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant.SBColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetSBNull() Me(Me.tableV_510_TransferPlant.SBColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_Sale_MinNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant.Days_Sale_MinColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_Sale_MinNull() Me(Me.tableV_510_TransferPlant.Days_Sale_MinColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsDays_Sale_MaxNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant.Days_Sale_MaxColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetDays_Sale_MaxNull() Me(Me.tableV_510_TransferPlant.Days_Sale_MaxColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Is_S_DayNull() As Boolean Return Me.IsNull(Me.tableV_510_TransferPlant._S_DayColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Set_S_DayNull() Me(Me.tableV_510_TransferPlant._S_DayColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_900_ManageStockRow Inherits Global.System.Data.DataRow Private tableV_900_ManageStock As V_900_ManageStockDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_900_ManageStock = CType(Me.Table,V_900_ManageStockDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property caldate() As Date Get Return CType(Me(Me.tableV_900_ManageStock.caldateColumn),Date) End Get Set Me(Me.tableV_900_ManageStock.caldateColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mplant_location() As String Get Return CType(Me(Me.tableV_900_ManageStock.mplant_locationColumn),String) End Get Set Me(Me.tableV_900_ManageStock.mplant_locationColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Mat() As String Get Try Return CType(Me(Me.tableV_900_ManageStock.MatColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Mat' in table 'V_900_ManageStock' is DBNull.", e) End Try End Get Set Me(Me.tableV_900_ManageStock.MatColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property We() As Decimal Get Try Return CType(Me(Me.tableV_900_ManageStock.WeColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'We' in table 'V_900_ManageStock' is DBNull.", e) End Try End Get Set Me(Me.tableV_900_ManageStock.WeColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsMatNull() As Boolean Return Me.IsNull(Me.tableV_900_ManageStock.MatColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetMatNull() Me(Me.tableV_900_ManageStock.MatColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsWeNull() As Boolean Return Me.IsNull(Me.tableV_900_ManageStock.WeColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetWeNull() Me(Me.tableV_900_ManageStock.WeColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_BOI_Split_CostRow Inherits Global.System.Data.DataRow Private tableV_BOI_Split_Cost As V_BOI_Split_CostDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_BOI_Split_Cost = CType(Me.Table,V_BOI_Split_CostDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mcompcode() As String Get Return CType(Me(Me.tableV_BOI_Split_Cost.mcompcodeColumn),String) End Get Set Me(Me.tableV_BOI_Split_Cost.mcompcodeColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmonth() As String Get Return CType(Me(Me.tableV_BOI_Split_Cost.mmonthColumn),String) End Get Set Me(Me.tableV_BOI_Split_Cost.mmonthColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property myear() As String Get Return CType(Me(Me.tableV_BOI_Split_Cost.myearColumn),String) End Get Set Me(Me.tableV_BOI_Split_Cost.myearColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mcostelement() As String Get Return CType(Me(Me.tableV_BOI_Split_Cost.mcostelementColumn),String) End Get Set Me(Me.tableV_BOI_Split_Cost.mcostelementColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Try Return CType(Me(Me.tableV_BOI_Split_Cost.mmatnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mmatno' in table 'V_BOI_Split_Cost' is DBNull.", e) End Try End Get Set Me(Me.tableV_BOI_Split_Cost.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property qty() As Decimal Get Try Return CType(Me(Me.tableV_BOI_Split_Cost.qtyColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'qty' in table 'V_BOI_Split_Cost' is DBNull.", e) End Try End Get Set Me(Me.tableV_BOI_Split_Cost.qtyColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property amount() As Decimal Get Try Return CType(Me(Me.tableV_BOI_Split_Cost.amountColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'amount' in table 'V_BOI_Split_Cost' is DBNull.", e) End Try End Get Set Me(Me.tableV_BOI_Split_Cost.amountColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property per_unit() As Decimal Get Try Return CType(Me(Me.tableV_BOI_Split_Cost.per_unitColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'per unit' in table 'V_BOI_Split_Cost' is DBNull.", e) End Try End Get Set Me(Me.tableV_BOI_Split_Cost.per_unitColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsmmatnoNull() As Boolean Return Me.IsNull(Me.tableV_BOI_Split_Cost.mmatnoColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetmmatnoNull() Me(Me.tableV_BOI_Split_Cost.mmatnoColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsqtyNull() As Boolean Return Me.IsNull(Me.tableV_BOI_Split_Cost.qtyColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetqtyNull() Me(Me.tableV_BOI_Split_Cost.qtyColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsamountNull() As Boolean Return Me.IsNull(Me.tableV_BOI_Split_Cost.amountColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetamountNull() Me(Me.tableV_BOI_Split_Cost.amountColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Isper_unitNull() As Boolean Return Me.IsNull(Me.tableV_BOI_Split_Cost.per_unitColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub Setper_unitNull() Me(Me.tableV_BOI_Split_Cost.per_unitColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Represents strongly named DataRow class. '''</summary> Partial Public Class V_Sales3MonthsDetailsRow Inherits Global.System.Data.DataRow Private tableV_Sales3MonthsDetails As V_Sales3MonthsDetailsDataTable <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableV_Sales3MonthsDetails = CType(Me.Table,V_Sales3MonthsDetailsDataTable) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property PlantName() As String Get Return CType(Me(Me.tableV_Sales3MonthsDetails.PlantNameColumn),String) End Get Set Me(Me.tableV_Sales3MonthsDetails.PlantNameColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property caldate() As Date Get Return CType(Me(Me.tableV_Sales3MonthsDetails.caldateColumn),Date) End Get Set Me(Me.tableV_Sales3MonthsDetails.caldateColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mmatno() As String Get Return CType(Me(Me.tableV_Sales3MonthsDetails.mmatnoColumn),String) End Get Set Me(Me.tableV_Sales3MonthsDetails.mmatnoColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ATP() As Decimal Get Try Return CType(Me(Me.tableV_Sales3MonthsDetails.ATPColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ATP' in table 'V_Sales3MonthsDetails' is DBNull.", e) End Try End Get Set Me(Me.tableV_Sales3MonthsDetails.ATPColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Weight() As Decimal Get Try Return CType(Me(Me.tableV_Sales3MonthsDetails.WeightColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Weight' in table 'V_Sales3MonthsDetails' is DBNull.", e) End Try End Get Set Me(Me.tableV_Sales3MonthsDetails.WeightColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property mplant_salezone() As String Get Return CType(Me(Me.tableV_Sales3MonthsDetails.mplant_salezoneColumn),String) End Get Set Me(Me.tableV_Sales3MonthsDetails.mplant_salezoneColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property Comp() As String Get Return CType(Me(Me.tableV_Sales3MonthsDetails.CompColumn),String) End Get Set Me(Me.tableV_Sales3MonthsDetails.CompColumn) = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsATPNull() As Boolean Return Me.IsNull(Me.tableV_Sales3MonthsDetails.ATPColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetATPNull() Me(Me.tableV_Sales3MonthsDetails.ATPColumn) = Global.System.Convert.DBNull End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function IsWeightNull() As Boolean Return Me.IsNull(Me.tableV_Sales3MonthsDetails.WeightColumn) End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub SetWeightNull() Me(Me.tableV_Sales3MonthsDetails.WeightColumn) = Global.System.Convert.DBNull End Sub End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class GI_Doc_printRowChangeEvent Inherits Global.System.EventArgs Private eventRow As GI_Doc_printRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As GI_Doc_printRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As GI_Doc_printRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class nameRowChangeEvent Inherits Global.System.EventArgs Private eventRow As nameRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As nameRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As nameRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class skillRowChangeEvent Inherits Global.System.EventArgs Private eventRow As skillRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As skillRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As skillRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class skill_sync_viewRowChangeEvent Inherits Global.System.EventArgs Private eventRow As skill_sync_viewRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As skill_sync_viewRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As skill_sync_viewRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_100_DataPlanningRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_100_DataPlanningRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_100_DataPlanningRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_100_DataPlanningRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_110_Master_Planning_AllPlantRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_110_Master_Planning_AllPlantRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_110_Master_Planning_AllPlantRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_110_Master_Planning_AllPlantRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_110_Master_Planning_byPlantRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_110_Master_Planning_byPlantRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_110_Master_Planning_byPlantRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_110_Master_Planning_byPlantRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_110_StockBalance90DaysRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_110_StockBalance90DaysRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_110_StockBalance90DaysRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_110_StockBalance90DaysRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_410_KSB1DetailCostRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_410_KSB1DetailCostRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_410_KSB1DetailCostRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_410_KSB1DetailCostRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_510_TransferPlantRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_510_TransferPlantRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_510_TransferPlantRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_510_TransferPlantRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_900_ManageStockRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_900_ManageStockRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_900_ManageStockRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_900_ManageStockRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_BOI_Split_CostRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_BOI_Split_CostRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_BOI_Split_CostRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_BOI_Split_CostRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class '''<summary> '''Row event argument class '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Class V_Sales3MonthsDetailsRowChangeEvent Inherits Global.System.EventArgs Private eventRow As V_Sales3MonthsDetailsRow Private eventAction As Global.System.Data.DataRowAction <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New(ByVal row As V_Sales3MonthsDetailsRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Row() As V_Sales3MonthsDetailsRow Get Return Me.eventRow End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class End Class Namespace PlanningS_ViewTableAdapters '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class GI_Doc_printTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "GI_Doc_print" tableMapping.ColumnMappings.Add("Uname", "Uname") tableMapping.ColumnMappings.Add("Headertext", "Headertext") tableMapping.ColumnMappings.Add("itemNo", "itemNo") tableMapping.ColumnMappings.Add("Productcode", "Productcode") tableMapping.ColumnMappings.Add("mmateng", "mmateng") tableMapping.ColumnMappings.Add("OrderQty", "OrderQty") tableMapping.ColumnMappings.Add("GLAccount", "GLAccount") tableMapping.ColumnMappings.Add("CostCenter", "CostCenter") tableMapping.ColumnMappings.Add("mmatthai", "mmatthai") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Uname, Headertext, itemNo, Productcode, mmateng, OrderQty, GLAccount, Cost"& _ "Center, mmatthai FROM dbo.GI_Doc_print" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.GI_Doc_printDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.GI_Doc_printDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.GI_Doc_printDataTable = New PlanningS_View.GI_Doc_printDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class nameTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "name" tableMapping.ColumnMappings.Add("Thai_name", "Thai_name") tableMapping.ColumnMappings.Add("Jap_name", "Jap_name") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Thai_name, Jap_name FROM warlord.name" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.nameDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.nameDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.nameDataTable = New PlanningS_View.nameDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class skillTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "skill" tableMapping.ColumnMappings.Add("Thai_skill", "Thai_skill") tableMapping.ColumnMappings.Add("Jap_skill", "Jap_skill") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Thai_skill, Jap_skill FROM warlord.skill" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.skillDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.skillDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.skillDataTable = New PlanningS_View.skillDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class skill_sync_viewTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "skill_sync_view" tableMapping.ColumnMappings.Add("skill", "skill") tableMapping.ColumnMappings.Add("Main_skill", "Main_skill") tableMapping.ColumnMappings.Add("Atk_skill", "Atk_skill") tableMapping.ColumnMappings.Add("Def_skill", "Def_skill") tableMapping.ColumnMappings.Add("Int_skill", "Int_skill") tableMapping.ColumnMappings.Add("Hide_skill", "Hide_skill") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT skill, Main_skill, Atk_skill, Def_skill, Int_skill, Hide_skill FROM warlor"& _ "d.skill_sync_view" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.skill_sync_viewDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.skill_sync_viewDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.skill_sync_viewDataTable = New PlanningS_View.skill_sync_viewDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_100_DataPlanningTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_100_DataPlanning" tableMapping.ColumnMappings.Add("PlantName", "PlantName") tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("UR", "UR") tableMapping.ColumnMappings.Add("ATP", "ATP") tableMapping.ColumnMappings.Add("AvgPast", "AvgPast") tableMapping.ColumnMappings.Add("AvgRolling", "AvgRolling") tableMapping.ColumnMappings.Add("SFPerDay", "SFPerDay") tableMapping.ColumnMappings.Add("RunDate", "RunDate") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT PlantName, mmatno, UR, ATP, AvgPast, AvgRolling, SFPerDay, RunDate FROM db"& _ "o.V_100_DataPlanning" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_100_DataPlanningDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_100_DataPlanningDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_100_DataPlanningDataTable = New PlanningS_View.V_100_DataPlanningDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_110_Master_Planning_AllPlantTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_110_Master_Planning_AllPlant" tableMapping.ColumnMappings.Add("Group", "Group") tableMapping.ColumnMappings.Add("Status", "Status") tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("mmateng", "mmateng") tableMapping.ColumnMappings.Add("mStandardCap", "mStandardCap") tableMapping.ColumnMappings.Add("S/Day", "S/Day") tableMapping.ColumnMappings.Add("Utilize", "Utilize") tableMapping.ColumnMappings.Add("UR", "UR") tableMapping.ColumnMappings.Add("ATP", "ATP") tableMapping.ColumnMappings.Add("QtyGIT", "QtyGIT") tableMapping.ColumnMappings.Add("MinStock", "MinStock") tableMapping.ColumnMappings.Add("MaxStock", "MaxStock") tableMapping.ColumnMappings.Add("Days Sale", "Days Sale") tableMapping.ColumnMappings.Add("Request", "Request") tableMapping.ColumnMappings.Add("OverMax", "OverMax") tableMapping.ColumnMappings.Add("P/Day", "P/Day") tableMapping.ColumnMappings.Add("AvgPast", "AvgPast") tableMapping.ColumnMappings.Add("AvgRolling", "AvgRolling") tableMapping.ColumnMappings.Add("SFPerDay", "SFPerDay") tableMapping.ColumnMappings.Add("Percent Min", "Percent Min") tableMapping.ColumnMappings.Add("Percent Max", "Percent Max") tableMapping.ColumnMappings.Add("Days Sale Min", "Days Sale Min") tableMapping.ColumnMappings.Add("Days Sale Max", "Days Sale Max") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT [Group], Status, mmatno, mmateng, mStandardCap, [S/Day], Utilize, UR, ATP,"& _ " QtyGIT, MinStock, MaxStock, [Days Sale], Request, OverMax, [P/Day], AvgPast, Av"& _ "gRolling, SFPerDay, [Percent Min], [Percent Max], [Days Sale Min], [Days Sale Ma"& _ "x] FROM dbo.V_110_Master_Planning_AllPlant" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_110_Master_Planning_AllPlantDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_110_Master_Planning_AllPlantDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_110_Master_Planning_AllPlantDataTable = New PlanningS_View.V_110_Master_Planning_AllPlantDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_110_Master_Planning_byPlantTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_110_Master_Planning_byPlant" tableMapping.ColumnMappings.Add("Group", "Group") tableMapping.ColumnMappings.Add("Status", "Status") tableMapping.ColumnMappings.Add("PlantName", "PlantName") tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("mmateng", "mmateng") tableMapping.ColumnMappings.Add("mStandardCap", "mStandardCap") tableMapping.ColumnMappings.Add("S/Day", "S/Day") tableMapping.ColumnMappings.Add("Utilize", "Utilize") tableMapping.ColumnMappings.Add("UR", "UR") tableMapping.ColumnMappings.Add("ATP", "ATP") tableMapping.ColumnMappings.Add("QtyGIT", "QtyGIT") tableMapping.ColumnMappings.Add("MinStock", "MinStock") tableMapping.ColumnMappings.Add("MaxStock", "MaxStock") tableMapping.ColumnMappings.Add("Days Sale", "Days Sale") tableMapping.ColumnMappings.Add("Request", "Request") tableMapping.ColumnMappings.Add("OverMax", "OverMax") tableMapping.ColumnMappings.Add("P/Day", "P/Day") tableMapping.ColumnMappings.Add("AvgPast", "AvgPast") tableMapping.ColumnMappings.Add("AvgRolling", "AvgRolling") tableMapping.ColumnMappings.Add("SFPerDay", "SFPerDay") tableMapping.ColumnMappings.Add("Percent Min", "Percent Min") tableMapping.ColumnMappings.Add("Percent Max", "Percent Max") tableMapping.ColumnMappings.Add("Days Sale Min", "Days Sale Min") tableMapping.ColumnMappings.Add("Days Sale Max", "Days Sale Max") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT [Group], Status, PlantName, mmatno, mmateng, mStandardCap, [S/Day], Utiliz"& _ "e, UR, ATP, QtyGIT, MinStock, MaxStock, [Days Sale], Request, OverMax, [P/Day], "& _ "AvgPast, AvgRolling, SFPerDay, [Percent Min], [Percent Max], [Days Sale Min], [D"& _ "ays Sale Max] FROM dbo.V_110_Master_Planning_byPlant" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_110_Master_Planning_byPlantDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_110_Master_Planning_byPlantDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_110_Master_Planning_byPlantDataTable = New PlanningS_View.V_110_Master_Planning_byPlantDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_110_StockBalance90DaysTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_110_StockBalance90Days" tableMapping.ColumnMappings.Add("caldate", "caldate") tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("ATP", "ATP") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT caldate, mmatno, ATP FROM dbo.V_110_StockBalance90Days" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_110_StockBalance90DaysDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_110_StockBalance90DaysDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_110_StockBalance90DaysDataTable = New PlanningS_View.V_110_StockBalance90DaysDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_410_KSB1DetailCostTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_410_KSB1DetailCost" tableMapping.ColumnMappings.Add("Posting Date", "Posting Date") tableMapping.ColumnMappings.Add("Document No", "Document No") tableMapping.ColumnMappings.Add("Account", "Account") tableMapping.ColumnMappings.Add("Cost center", "Cost center") tableMapping.ColumnMappings.Add("Qty", "Qty") tableMapping.ColumnMappings.Add("Amount", "Amount") tableMapping.ColumnMappings.Add("Header text", "Header text") tableMapping.ColumnMappings.Add("Material", "Material") tableMapping.ColumnMappings.Add("Mat Name", "Mat Name") tableMapping.ColumnMappings.Add("PO Text", "PO Text") tableMapping.ColumnMappings.Add("Text", "Text") tableMapping.ColumnMappings.Add("PO No", "PO No") tableMapping.ColumnMappings.Add("IO No", "IO No") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT [Posting Date], [Document No], Account, [Cost center], Qty, Amount, [Heade"& _ "r text], Material, [Mat Name], [PO Text], Text, [PO No], [IO No] FROM dbo.V_410_"& _ "KSB1DetailCost" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_410_KSB1DetailCostDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_410_KSB1DetailCostDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_410_KSB1DetailCostDataTable = New PlanningS_View.V_410_KSB1DetailCostDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_510_TransferPlantTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_510_TransferPlant" tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("mmateng", "mmateng") tableMapping.ColumnMappings.Add("RY", "RY") tableMapping.ColumnMappings.Add("SB", "SB") tableMapping.ColumnMappings.Add("Days Sale Min", "Days Sale Min") tableMapping.ColumnMappings.Add("Days Sale Max", "Days Sale Max") tableMapping.ColumnMappings.Add("S/Day", "S/Day") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT mmatno, mmateng, RY, SB, [Days Sale Min], [Days Sale Max], [S/Day] FROM db"& _ "o.V_510_TransferPlant" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_510_TransferPlantDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_510_TransferPlantDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_510_TransferPlantDataTable = New PlanningS_View.V_510_TransferPlantDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_900_ManageStockTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_900_ManageStock" tableMapping.ColumnMappings.Add("caldate", "caldate") tableMapping.ColumnMappings.Add("mplant_location", "mplant_location") tableMapping.ColumnMappings.Add("Mat", "Mat") tableMapping.ColumnMappings.Add("We", "We") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT caldate, mplant_location, Mat, We FROM dbo.V_900_ManageStock" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_900_ManageStockDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_900_ManageStockDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_900_ManageStockDataTable = New PlanningS_View.V_900_ManageStockDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_BOI_Split_CostTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_BOI_Split_Cost" tableMapping.ColumnMappings.Add("mcompcode", "mcompcode") tableMapping.ColumnMappings.Add("mmonth", "mmonth") tableMapping.ColumnMappings.Add("myear", "myear") tableMapping.ColumnMappings.Add("mcostelement", "mcostelement") tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("qty", "qty") tableMapping.ColumnMappings.Add("amount", "amount") tableMapping.ColumnMappings.Add("per unit", "per unit") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT mcompcode, mmonth, myear, mcostelement, mmatno, qty, amount, [per unit] FR"& _ "OM dbo.V_BOI_Split_Cost" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_BOI_Split_CostDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_BOI_Split_CostDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_BOI_Split_CostDataTable = New PlanningS_View.V_BOI_Split_CostDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''Represents the connection and commands used to retrieve and save data. '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DataObjectAttribute(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _ ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _ Partial Public Class V_Sales3MonthsDetailsTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "V_Sales3MonthsDetails" tableMapping.ColumnMappings.Add("PlantName", "PlantName") tableMapping.ColumnMappings.Add("caldate", "caldate") tableMapping.ColumnMappings.Add("mmatno", "mmatno") tableMapping.ColumnMappings.Add("ATP", "ATP") tableMapping.ColumnMappings.Add("Weight", "Weight") tableMapping.ColumnMappings.Add("mplant_salezone", "mplant_salezone") tableMapping.ColumnMappings.Add("Comp", "Comp") Me._adapter.TableMappings.Add(tableMapping) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.PlanningS.My.MySettings.Default.PlanningSConnectionString End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT PlantName, caldate, mmatno, ATP, Weight, mplant_salezone, Comp FROM dbo.V_"& _ "Sales3MonthsDetails" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill(ByVal dataTable As PlanningS_View.V_Sales3MonthsDetailsDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _ Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _ Public Overloads Overridable Function GetData() As PlanningS_View.V_Sales3MonthsDetailsDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As PlanningS_View.V_Sales3MonthsDetailsDataTable = New PlanningS_View.V_Sales3MonthsDetailsDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class '''<summary> '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios '''</summary> <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _ Global.System.ComponentModel.ToolboxItem(true), _ Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _ "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _ Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")> _ Partial Public Class TableAdapterManager Inherits Global.System.ComponentModel.Component Private _updateOrder As UpdateOrderOption Private _backupDataSetBeforeUpdate As Boolean Private _connection As Global.System.Data.IDbConnection <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property UpdateOrder() As UpdateOrderOption Get Return Me._updateOrder End Get Set Me._updateOrder = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Property BackupDataSetBeforeUpdate() As Boolean Get Return Me._backupDataSetBeforeUpdate End Get Set Me._backupDataSetBeforeUpdate = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public Property Connection() As Global.System.Data.IDbConnection Get If (Not (Me._connection) Is Nothing) Then Return Me._connection End If Return Nothing End Get Set Me._connection = value End Set End Property <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _ Global.System.ComponentModel.Browsable(false)> _ Public ReadOnly Property TableAdapterInstanceCount() As Integer Get Dim count As Integer = 0 Return count End Get End Property '''<summary> '''Update rows in top-down order. '''</summary> <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function UpdateUpdatedRows(ByVal dataSet As PlanningS_View, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 Return result End Function '''<summary> '''Insert rows in top-down order. '''</summary> <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function UpdateInsertedRows(ByVal dataSet As PlanningS_View, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 Return result End Function '''<summary> '''Delete rows in bottom-up order. '''</summary> <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function UpdateDeletedRows(ByVal dataSet As PlanningS_View, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 Return result End Function '''<summary> '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first '''</summary> <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow() If ((updatedRows Is Nothing) _ OrElse (updatedRows.Length < 1)) Then Return updatedRows End If If ((allAddedRows Is Nothing) _ OrElse (allAddedRows.Count < 1)) Then Return updatedRows End If Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim i As Integer = 0 Do While (i < updatedRows.Length) Dim row As Global.System.Data.DataRow = updatedRows(i) If (allAddedRows.Contains(row) = false) Then realUpdatedRows.Add(row) End If i = (i + 1) Loop Return realUpdatedRows.ToArray End Function '''<summary> '''Update all changes to the dataset. '''</summary> <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Overridable Function UpdateAll(ByVal dataSet As PlanningS_View) As Integer If (dataSet Is Nothing) Then Throw New Global.System.ArgumentNullException("dataSet") End If If (dataSet.HasChanges = false) Then Return 0 End If Dim workConnection As Global.System.Data.IDbConnection = Me.Connection If (workConnection Is Nothing) Then Throw New Global.System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana"& _ "ger TableAdapter property to a valid TableAdapter instance.") End If Dim workConnOpened As Boolean = false If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _ = Global.System.Data.ConnectionState.Broken) Then workConnection.Close End If If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then workConnection.Open workConnOpened = true End If Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction If (workTransaction Is Nothing) Then Throw New Global.System.ApplicationException("The transaction cannot begin. The current data connection does not support transa"& _ "ctions or the current state is not allowing the transaction to begin.") End If Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)() Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)() Dim result As Integer = 0 Dim backupDataSet As Global.System.Data.DataSet = Nothing If Me.BackupDataSetBeforeUpdate Then backupDataSet = New Global.System.Data.DataSet() backupDataSet.Merge(dataSet) End If Try '---- Prepare for update ----------- ' ' '---- Perform updates ----------- ' If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) Else result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) End If result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows)) ' '---- Commit updates ----------- ' workTransaction.Commit If (0 < allAddedRows.Count) Then Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow allAddedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges i = (i + 1) Loop End If If (0 < allChangedRows.Count) Then Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow allChangedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges i = (i + 1) Loop End If Catch ex As Global.System.Exception workTransaction.Rollback '---- Restore the dataset ----------- If Me.BackupDataSetBeforeUpdate Then Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing)) dataSet.Clear dataSet.Merge(backupDataSet) Else If (0 < allAddedRows.Count) Then Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow allAddedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges row.SetAdded i = (i + 1) Loop End If End If Throw ex Finally If workConnOpened Then workConnection.Close End If If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters) Dim i As Integer = 0 Do While (i < adapters.Length) Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i) adapter.AcceptChangesDuringUpdate = true i = (i + 1) Loop End If End Try Return result End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst)) End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean If (Not (Me._connection) Is Nothing) Then Return true End If If ((Me.Connection Is Nothing) _ OrElse (inputConnection Is Nothing)) Then Return true End If If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then Return true End If Return false End Function '''<summary> '''Update Order Option '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Enum UpdateOrderOption InsertUpdateDelete = 0 UpdateInsertDelete = 1 End Enum '''<summary> '''Used to sort self-referenced table's rows '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Class SelfReferenceComparer Inherits Object Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow) Private _relation As Global.System.Data.DataRelation Private _childFirst As Integer <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) MyBase.New Me._relation = relation If childFirst Then Me._childFirst = -1 Else Me._childFirst = 1 End If End Sub <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing)) Dim root As Global.System.Data.DataRow = row distance = 0 Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)() traversedRows(row) = row Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) Do While ((Not (parent) Is Nothing) _ AndAlso (traversedRows.ContainsKey(parent) = false)) distance = (distance + 1) root = parent traversedRows(parent) = parent parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) Loop If (distance = 0) Then traversedRows.Clear traversedRows(row) = row parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) Do While ((Not (parent) Is Nothing) _ AndAlso (traversedRows.ContainsKey(parent) = false)) distance = (distance + 1) root = parent traversedRows(parent) = parent parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) Loop End If Return root End Function <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _ Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare If Object.ReferenceEquals(row1, row2) Then Return 0 End If If (row1 Is Nothing) Then Return -1 End If If (row2 Is Nothing) Then Return 1 End If Dim distance1 As Integer = 0 Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1) Dim distance2 As Integer = 0 Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2) If Object.ReferenceEquals(root1, root2) Then Return (Me._childFirst * distance1.CompareTo(distance2)) Else Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _ AndAlso (Not (root2.Table) Is Nothing))) If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then Return -1 Else Return 1 End If End If End Function End Class End Class End Namespace
100dej/PlanningS
PlanningS_View.Designer.vb
Visual Basic
mit
635,342
Public Class NameAttribute ''' <param name="arg"></param> Public Sub Method(arg$) End Sub End Class
GeorgeAlexandria/CoCo
tests/Identifiers/VisualBasicIdentifiers/XmlDocComment/NameAttribute.vb
Visual Basic
mit
111
Imports Microsoft.VisualBasic Imports LiteDB Public Class UserUtils Public Shared Function CurrentLoggedInUser() As User If HttpContext.Current.Session("UserID") Is Nothing Then Return Nothing End If Using db As LiteDatabase = New LiteDatabase(HttpContext.Current.Server.MapPath("~/App_Data/Database.accdb")) Dim tblUsers As LiteCollection(Of User) = db.GetCollection(Of User)("Users") Return tblUsers.FindById(Integer.Parse(HttpContext.Current.Session("UserID"))) End Using End Function Public Shared Sub LoggedInOnly(Response As HttpResponse, Session As HttpSessionState) If Session("UserID") Is Nothing Then Response.Redirect("/Login.aspx") End If End Sub Public Shared Sub VerifiedOnly(Response As HttpResponse, Session As HttpSessionState, Server As HttpServerUtility) If Session("UserID") Is Nothing Then Response.Redirect("/Default.aspx") Else Using db As LiteDatabase = New LiteDatabase(Server.MapPath("~/App_Data/Database.accdb")) Dim tbl As LiteCollection(Of User) = db.GetCollection(Of User)("Users") Dim user As User = tbl.FindById(Integer.Parse(Session("UserID"))) If Not user.EmailVerified Then Response.Redirect("/EmailVerification.aspx") End If End Using End If End Sub Public Shared Sub AdminOnly(Response As HttpResponse, Session As HttpSessionState, Server As HttpServerUtility) If Session("UserID") Is Nothing Then Response.Redirect("/Default.aspx") Else Using db As LiteDatabase = New LiteDatabase(Server.MapPath("~/App_Data/Database.accdb")) Dim tbl As LiteCollection(Of User) = db.GetCollection(Of User)("Users") Dim user As User = tbl.FindById(Integer.Parse(Session("UserID"))) If user.UserLevel < 2 Then Response.Redirect("/Default.aspx") End If End Using End If End Sub Public Shared Sub EliteAdminOnly(Response As HttpResponse, Session As HttpSessionState, Server As HttpServerUtility) If Session("UserID") Is Nothing Then Response.Redirect("/Default.aspx") Else Using db As LiteDatabase = New LiteDatabase(Server.MapPath("~/App_Data/Database.accdb")) Dim tbl As LiteCollection(Of User) = db.GetCollection(Of User)("Users") Dim user As User = tbl.FindById(Integer.Parse(Session("UserID"))) If user.UserLevel < 3 Then Response.Redirect("/Default.aspx") End If End Using End If End Sub Public Shared Sub LoggedNotVerifiedOnly(Response As HttpResponse, Session As HttpSessionState, Server As HttpServerUtility) If Session("UserID") Is Nothing Then Response.Redirect("/Default.aspx") Else Using db As LiteDatabase = New LiteDatabase(Server.MapPath("~/App_Data/Database.accdb")) Dim tbl As LiteCollection(Of User) = db.GetCollection(Of User)("Users") Dim user As User = tbl.FindById(Integer.Parse(Session("UserID"))) If user.EmailVerified Then Response.Redirect("/Default.aspx") ' TODO: Redirect to user panel or something End If End Using End If End Sub Public Shared Sub LoggedOutOnly(Response As HttpResponse, Session As HttpSessionState) If Not Session("UserID") Is Nothing Then Response.Redirect("/MyZone.aspx") ' TODO: Redirect to user panel or something End If End Sub End Class Public Class LoggedInUsersOnly Inherits Page Public Overridable Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load UserUtils.LoggedInOnly(Response, Session) End Sub End Class Public Class AnonymousUsersOnly Inherits Page Public Overridable Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load UserUtils.LoggedOutOnly(Response, Session) End Sub End Class Public Class VerifiedUsersOnly Inherits Page Public Overridable Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load UserUtils.VerifiedOnly(Response, Session, Server) End Sub End Class Public Class LoggedNotVerifiedUsersOnly Inherits Page Public Overridable Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load UserUtils.LoggedNotVerifiedOnly(Response, Session, Server) End Sub End Class Public Class AdministratorOnly Inherits Page Public Overridable Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load UserUtils.AdminOnly(Response, Session, Server) End Sub End Class Public Class EliteAdministratorOnly Inherits Page Public Overridable Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load UserUtils.EliteAdminOnly(Response, Session, Server) End Sub End Class
yotam180/DeedCoin
App_Code/UserUtils.vb
Visual Basic
mit
5,084
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmNuevoPaciente Inherits System.Windows.Forms.Form 'Form reemplaza a Dispose para limpiar la lista de componentes. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer 'NOTA: el Diseñador de Windows Forms necesita el siguiente procedimiento 'Se puede modificar usando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmNuevoPaciente)) Me.LabelControl2 = New DevExpress.XtraEditors.LabelControl() Me.TextNombre = New DevExpress.XtraEditors.TextEdit() Me.LabelControl3 = New DevExpress.XtraEditors.LabelControl() Me.TxtApellido = New DevExpress.XtraEditors.TextEdit() Me.LabelControl4 = New DevExpress.XtraEditors.LabelControl() Me.CmbCargo = New System.Windows.Forms.ComboBox() Me.LabelControl5 = New DevExpress.XtraEditors.LabelControl() Me.LabelControl6 = New DevExpress.XtraEditors.LabelControl() Me.TextCuenta = New DevExpress.XtraEditors.TextEdit() Me.CmbGenero = New System.Windows.Forms.ComboBox() Me.LabelControl8 = New DevExpress.XtraEditors.LabelControl() Me.lblStatus = New DevExpress.XtraEditors.LabelControl() Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl() Me.BtnGuardarPaciente = New DevExpress.XtraEditors.SimpleButton() Me.BtnCancelarPaciente = New DevExpress.XtraEditors.SimpleButton() Me.DateNacimiento = New DevExpress.XtraEditors.DateEdit() Me.cmbDepto = New System.Windows.Forms.ComboBox() Me.btnAddDepto = New DevExpress.XtraEditors.SimpleButton() Me.btnAddCargo = New DevExpress.XtraEditors.SimpleButton() CType(Me.TextNombre.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TxtApellido.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TextCuenta.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DateNacimiento.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DateNacimiento.Properties, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'LabelControl2 ' Me.LabelControl2.Location = New System.Drawing.Point(33, 109) Me.LabelControl2.Name = "LabelControl2" Me.LabelControl2.Size = New System.Drawing.Size(37, 13) Me.LabelControl2.TabIndex = 3 Me.LabelControl2.Text = "Nombre" ' 'TextNombre ' Me.TextNombre.Location = New System.Drawing.Point(33, 128) Me.TextNombre.Name = "TextNombre" Me.TextNombre.Size = New System.Drawing.Size(264, 20) Me.TextNombre.TabIndex = 2 ' 'LabelControl3 ' Me.LabelControl3.Location = New System.Drawing.Point(33, 154) Me.LabelControl3.Name = "LabelControl3" Me.LabelControl3.Size = New System.Drawing.Size(37, 13) Me.LabelControl3.TabIndex = 5 Me.LabelControl3.Text = "Apellido" ' 'TxtApellido ' Me.TxtApellido.Location = New System.Drawing.Point(33, 173) Me.TxtApellido.Name = "TxtApellido" Me.TxtApellido.Size = New System.Drawing.Size(264, 20) Me.TxtApellido.TabIndex = 3 ' 'LabelControl4 ' Me.LabelControl4.Location = New System.Drawing.Point(33, 292) Me.LabelControl4.Name = "LabelControl4" Me.LabelControl4.Size = New System.Drawing.Size(69, 13) Me.LabelControl4.TabIndex = 6 Me.LabelControl4.Text = "Departamento" ' 'CmbCargo ' Me.CmbCargo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.CmbCargo.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.CmbCargo.FormattingEnabled = True Me.CmbCargo.Location = New System.Drawing.Point(33, 357) Me.CmbCargo.Name = "CmbCargo" Me.CmbCargo.Size = New System.Drawing.Size(173, 21) Me.CmbCargo.TabIndex = 7 ' 'LabelControl5 ' Me.LabelControl5.Location = New System.Drawing.Point(33, 338) Me.LabelControl5.Name = "LabelControl5" Me.LabelControl5.Size = New System.Drawing.Size(29, 13) Me.LabelControl5.TabIndex = 8 Me.LabelControl5.Text = "Cargo" ' 'LabelControl6 ' Me.LabelControl6.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.0!) Me.LabelControl6.Location = New System.Drawing.Point(31, 64) Me.LabelControl6.Name = "LabelControl6" Me.LabelControl6.Size = New System.Drawing.Size(38, 15) Me.LabelControl6.TabIndex = 11 Me.LabelControl6.Text = "Cuenta" ' 'TextCuenta ' Me.TextCuenta.Location = New System.Drawing.Point(33, 83) Me.TextCuenta.Name = "TextCuenta" Me.TextCuenta.Size = New System.Drawing.Size(142, 20) Me.TextCuenta.TabIndex = 1 ' 'CmbGenero ' Me.CmbGenero.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.CmbGenero.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.CmbGenero.FormattingEnabled = True Me.CmbGenero.Location = New System.Drawing.Point(33, 265) Me.CmbGenero.Name = "CmbGenero" Me.CmbGenero.Size = New System.Drawing.Size(130, 21) Me.CmbGenero.TabIndex = 5 ' 'LabelControl8 ' Me.LabelControl8.Location = New System.Drawing.Point(33, 246) Me.LabelControl8.Name = "LabelControl8" Me.LabelControl8.Size = New System.Drawing.Size(35, 13) Me.LabelControl8.TabIndex = 14 Me.LabelControl8.Text = "Genero" ' 'lblStatus ' Me.lblStatus.Appearance.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblStatus.Location = New System.Drawing.Point(31, 12) Me.lblStatus.Name = "lblStatus" Me.lblStatus.Size = New System.Drawing.Size(154, 30) Me.lblStatus.TabIndex = 18 Me.lblStatus.Text = "Nuevo Paciente" ' 'LabelControl1 ' Me.LabelControl1.Location = New System.Drawing.Point(33, 199) Me.LabelControl1.Name = "LabelControl1" Me.LabelControl1.Size = New System.Drawing.Size(84, 13) Me.LabelControl1.TabIndex = 20 Me.LabelControl1.Text = "Fecha Nacimiento" ' 'BtnGuardarPaciente ' Me.BtnGuardarPaciente.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat Me.BtnGuardarPaciente.Image = CType(resources.GetObject("BtnGuardarPaciente.Image"), System.Drawing.Image) Me.BtnGuardarPaciente.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleLeft Me.BtnGuardarPaciente.Location = New System.Drawing.Point(204, 405) Me.BtnGuardarPaciente.Name = "BtnGuardarPaciente" Me.BtnGuardarPaciente.Size = New System.Drawing.Size(78, 30) Me.BtnGuardarPaciente.TabIndex = 8 Me.BtnGuardarPaciente.Text = "Guardar" ' 'BtnCancelarPaciente ' Me.BtnCancelarPaciente.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat Me.BtnCancelarPaciente.Image = CType(resources.GetObject("BtnCancelarPaciente.Image"), System.Drawing.Image) Me.BtnCancelarPaciente.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleLeft Me.BtnCancelarPaciente.Location = New System.Drawing.Point(52, 405) Me.BtnCancelarPaciente.Name = "BtnCancelarPaciente" Me.BtnCancelarPaciente.Size = New System.Drawing.Size(78, 30) Me.BtnCancelarPaciente.TabIndex = 9 Me.BtnCancelarPaciente.Text = "Cancelar" ' 'DateNacimiento ' Me.DateNacimiento.EditValue = Nothing Me.DateNacimiento.Location = New System.Drawing.Point(33, 218) Me.DateNacimiento.Name = "DateNacimiento" Me.DateNacimiento.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.DateNacimiento.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.DateNacimiento.Size = New System.Drawing.Size(152, 20) Me.DateNacimiento.TabIndex = 4 ' 'cmbDepto ' Me.cmbDepto.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbDepto.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.cmbDepto.FormattingEnabled = True Me.cmbDepto.Location = New System.Drawing.Point(33, 309) Me.cmbDepto.Margin = New System.Windows.Forms.Padding(2) Me.cmbDepto.Name = "cmbDepto" Me.cmbDepto.Size = New System.Drawing.Size(174, 21) Me.cmbDepto.TabIndex = 21 ' 'btnAddDepto ' Me.btnAddDepto.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat Me.btnAddDepto.Image = CType(resources.GetObject("btnAddDepto.Image"), System.Drawing.Image) Me.btnAddDepto.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleCenter Me.btnAddDepto.Location = New System.Drawing.Point(212, 309) Me.btnAddDepto.Name = "btnAddDepto" Me.btnAddDepto.Size = New System.Drawing.Size(29, 23) Me.btnAddDepto.TabIndex = 22 ' 'btnAddCargo ' Me.btnAddCargo.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat Me.btnAddCargo.Image = CType(resources.GetObject("btnAddCargo.Image"), System.Drawing.Image) Me.btnAddCargo.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleCenter Me.btnAddCargo.Location = New System.Drawing.Point(212, 357) Me.btnAddCargo.Name = "btnAddCargo" Me.btnAddCargo.Size = New System.Drawing.Size(29, 23) Me.btnAddCargo.TabIndex = 23 ' 'frmNuevoPaciente ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(330, 451) Me.Controls.Add(Me.btnAddCargo) Me.Controls.Add(Me.btnAddDepto) Me.Controls.Add(Me.cmbDepto) Me.Controls.Add(Me.DateNacimiento) Me.Controls.Add(Me.BtnCancelarPaciente) Me.Controls.Add(Me.BtnGuardarPaciente) Me.Controls.Add(Me.LabelControl1) Me.Controls.Add(Me.lblStatus) Me.Controls.Add(Me.CmbGenero) Me.Controls.Add(Me.LabelControl8) Me.Controls.Add(Me.LabelControl6) Me.Controls.Add(Me.TextCuenta) Me.Controls.Add(Me.CmbCargo) Me.Controls.Add(Me.LabelControl5) Me.Controls.Add(Me.LabelControl4) Me.Controls.Add(Me.LabelControl3) Me.Controls.Add(Me.TxtApellido) Me.Controls.Add(Me.LabelControl2) Me.Controls.Add(Me.TextNombre) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "frmNuevoPaciente" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Ingresando nuevo pacientes" CType(Me.TextNombre.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TxtApellido.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TextCuenta.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DateNacimiento.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DateNacimiento.Properties, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents LabelControl2 As DevExpress.XtraEditors.LabelControl Friend WithEvents TextNombre As DevExpress.XtraEditors.TextEdit Friend WithEvents LabelControl3 As DevExpress.XtraEditors.LabelControl Friend WithEvents TxtApellido As DevExpress.XtraEditors.TextEdit Friend WithEvents LabelControl4 As DevExpress.XtraEditors.LabelControl Friend WithEvents CmbCargo As System.Windows.Forms.ComboBox Friend WithEvents LabelControl5 As DevExpress.XtraEditors.LabelControl Friend WithEvents LabelControl6 As DevExpress.XtraEditors.LabelControl Friend WithEvents TextCuenta As DevExpress.XtraEditors.TextEdit Friend WithEvents CmbGenero As System.Windows.Forms.ComboBox Friend WithEvents LabelControl8 As DevExpress.XtraEditors.LabelControl Private WithEvents lblStatus As DevExpress.XtraEditors.LabelControl Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl Friend WithEvents BtnGuardarPaciente As DevExpress.XtraEditors.SimpleButton Friend WithEvents BtnCancelarPaciente As DevExpress.XtraEditors.SimpleButton Friend WithEvents DateNacimiento As DevExpress.XtraEditors.DateEdit Friend WithEvents cmbDepto As System.Windows.Forms.ComboBox Friend WithEvents btnAddDepto As DevExpress.XtraEditors.SimpleButton Friend WithEvents btnAddCargo As DevExpress.XtraEditors.SimpleButton End Class
jdmg94/SL-Contabilidad
ClinicaSL/Pacientes/frmNuevoPaciente.Designer.vb
Visual Basic
mit
14,069
Module modInsteon ' IMMENSE amount of credit goes to Jonathan Dale at http://www.madreporite.com for the Insteon code ' When asked about licensing, he stated the code was free for anyone to use Structure InsteonDevice Dim Address As String Dim Name As String Dim Device_On As Boolean Dim Level As Short ' Note: I store this as 0-100, not 0-255 as it is truly represented Dim Checking As Boolean ' Issued a Status Request to the device, waiting for response Dim LastCommand As Byte ' Command1 most recently received (0 if none) Dim LastFlags As Byte ' Just the top three bits (ACK/NAK, group/direct/cleanup/broadcast) Dim LastTime As Date ' Time last command was received Dim LastGroup As Byte ' Group for last group command End Structure Public Insteon(200) As InsteonDevice Public NumInsteon As Short ' Number of assigned Insteon devices Public SerialPLM As System.IO.Ports.SerialPort Public AlarmMuted As Boolean = False Public PLM_Address As String Public PLM_LastX10Device As Byte Public PLM_X10_House() As Byte = New Byte(16) {0, 96, 224, 32, 160, 16, 144, 80, 208, 112, 240, 48, 176, 0, 128, 64, 192} 'House Codes A-P Public PLM_X10_Device() As Byte = New Byte(16) {0, 6, 14, 2, 10, 1, 9, 5, 13, 7, 15, 3, 11, 0, 8, 4, 12} 'Device Codes 1-16 Public x(1030) As Byte ' Serial data as it gets brought in Public x_LastWrite As Short ' Index of last byte in array updated with new data Public x_Start As Short ' Index of next byte of data to process in array Private serialLock As New Object Dim tmrIThermCheckTimer As System.Timers.Timer Function AddInsteonDeviceDb(ByVal strAddress As String, ByVal DevCat As Short, ByVal SubCat As Short, ByVal Firmware As Short) As String If CheckDbForInsteon(strAddress) = 0 Then Dim strModel As String = InsteonDeviceLookup(DevCat, SubCat) modDatabase.Execute("INSERT INTO INSTEON_DEVICES (Address, DevCat, SubCat, Firmware) VALUES('" & strAddress & "', '" & CStr(DevCat) & "', '" & CStr(SubCat) & "', '" & CStr(Firmware) & "')") modDatabase.Execute("INSERT INTO DEVICES (Name, Type, Model, Address) VALUES('Insteon " & strAddress & "', 'Insteon', '" & strModel & "', '" & strAddress & "')") Return "Device added" Else Return "Device already exists" End If End Function Function AddX10DeviceDb(ByVal strAddress As String) As String If CheckDbForX10(strAddress) = 0 Then modDatabase.Execute("INSERT INTO DEVICES (Name, Type, Address) VALUES('X10 Device', 'X10', '" & strAddress & "')") Return "Device added" Else Return "Device already exists" End If End Function Private Sub CheckInsteonThermostat() My.Application.Log.WriteEntry("Executing scheduled thermostat check") Dim response As String = "" InsteonThermostatControl(My.Settings.Insteon_ThermostatAddr, response, "read") End Sub Sub CreateInsteonDb() ' Mirroring the InsteonDevice structure for now modDatabase.Execute("CREATE TABLE IF NOT EXISTS INSTEON_DEVICES(Id INTEGER PRIMARY KEY, Address TEXT UNIQUE, DeviceOn INTEGER, Level INTEGER, Checking INTEGER, LastCommand INTEGER, LastFlags INTEGER, LastTime STRING, LastGroup INTEGER, DevCat INTEGER, SubCat INTEGER, Firmware INTEGER)") End Sub Function Disable() As String Unload() My.Settings.Insteon_Enable = False My.Application.Log.WriteEntry("Insteon module is disabled") Return "Insteon module disabled" End Function Function Enable() As String My.Settings.Insteon_Enable = True My.Application.Log.WriteEntry("Insteon module is enabled") Load() Return "Insteon module enabled" End Function Sub InsteonConnect(ByVal PortName As String, ByRef ResponseMsg As String) If My.Settings.Insteon_Enable = True Then If SerialPLM.IsOpen = True Then My.Application.Log.WriteEntry("Closing serial connection") SerialPLM.Close() End If SerialPLM.PortName = PortName SerialPLM.BaudRate = 19200 SerialPLM.DataBits = 8 SerialPLM.Handshake = IO.Ports.Handshake.None SerialPLM.Parity = IO.Ports.Parity.None SerialPLM.StopBits = 1 Try My.Application.Log.WriteEntry("Trying to connect on port " + PortName) SerialPLM.Open() Catch IOExcep As System.IO.IOException My.Application.Log.WriteException(IOExcep) ResponseMsg = "ERROR: " + IOExcep.Message If My.Settings.Global_SmartCOM = True And My.Settings.Insteon_COMPortDeviceName <> "" Then PortName = modComputer.GetCOMPortFromFriendlyName(My.Settings.Insteon_COMPortDeviceName) If PortName <> "" Then If My.Settings.Global_CarMode = True Then modSpeech.Say("Smart " & PortName, False) End If InsteonConnect(PortName, ResponseMsg) Exit Sub End If End If Catch UnauthExcep As System.UnauthorizedAccessException My.Application.Log.WriteException(UnauthExcep) ResponseMsg = "ERROR: " + UnauthExcep.Message End Try If SerialPLM.IsOpen = True Then My.Application.Log.WriteEntry("Serial connection opened on port " + PortName) My.Settings.Insteon_LastGoodCOMPort = PortName My.Settings.Insteon_COMPortDeviceName = modComputer.GetCOMPortFriendlyName(PortName) ResponseMsg = "Connected" End If If My.Settings.Insteon_ThermostatAddr <> "" Then My.Application.Log.WriteEntry("Scheduling automatic thermostat temperature checks") tmrIThermCheckTimer = New System.Timers.Timer AddHandler tmrIThermCheckTimer.Elapsed, AddressOf CheckInsteonThermostat tmrIThermCheckTimer.Interval = 1200000 ' 20min tmrIThermCheckTimer.Enabled = True End If End If End Sub Sub InsteonAlarmControl(ByVal strAddress As String, ByRef ResponseMsg As String, ByVal Command1 As String, Optional ByVal intSeconds As Integer = 0) Dim comm1 As Short Dim comm2 As Short Select Case Command1 Case "Off", "off" comm1 = 19 comm2 = 0 Case "On", "on" If AlarmMuted = False Then comm1 = 17 comm2 = 255 Else My.Application.Log.WriteEntry("Alarm is muted, will not sound", TraceEventType.Warning) Exit Sub 'TODO: Less janky logic here End If Case Else My.Application.Log.WriteEntry("InsteonAlarmControl received invalid request", TraceEventType.Warning) Exit Sub End Select InsteonSendStdCommand(strAddress, comm1, comm2) ' Shut it back off If (Command1 = "On" OrElse Command1 = "on") AndAlso intSeconds > 0 Then My.Application.Log.WriteEntry("Scheduling automatic shut off of " & strAddress & " in " & intSeconds.ToString & " seconds") Threading.Thread.Sleep(intSeconds * 1000) Dim response As String = "" InsteonAlarmControl(strAddress, response, "Off", 0) End If End Sub Sub InsteonGetEngineVersion(ByVal strAddress As String, ByRef ResponseMsg As String) InsteonSendStdCommand(strAddress, 13, 0) End Sub Sub InsteonLightControl(ByVal strAddress As String, ByRef ResponseMsg As String, ByVal Command1 As String, Optional ByVal intBrightness As Integer = 255) Dim comm1 As Short Dim comm2 As Short Dim needExtended As Boolean = False Select Case Command1 Case "Beep", "beep" comm1 = 48 comm2 = 0 Case "Off", "off" comm1 = 19 comm2 = 0 Case "On", "on" comm1 = 17 comm2 = intBrightness Case "Soft", "soft" comm1 = 17 comm2 = 190 Case "Dim", "dim" comm1 = 17 comm2 = 136 Case "Nite", "nite" comm1 = 17 comm2 = 68 'Below sets operating flags, which behave differently on different devices 'Currently intended only for bulbs, which tells them what state to enter when power resumes 'On a 2477S switch, these "resume dim" on (4) and off (5) respectively. Case "powerstatelast" comm1 = 32 comm2 = 4 needExtended = True Case "powerstateon" comm1 = 32 comm2 = 5 needExtended = True Case Else My.Application.Log.WriteEntry("InsteonLightControl received invalid request", TraceEventType.Warning) Exit Sub End Select If needExtended = True Then InsteonSendExtCommand(strAddress, comm1, comm2) Else InsteonSendStdCommand(strAddress, comm1, comm2) End If End Sub Sub InsteonLinkI2CSDevice(ByVal strAddress As String, ByRef ResponseMsg As String, ByVal intLinkType As Integer) SyncLock serialLock Dim data(4) As Byte data(0) = 2 data(1) = 100 '0x64 data(2) = intLinkType data(3) = 1 Try SerialPLM.Write(data, 0, 4) Catch Excep As System.InvalidOperationException My.Application.Log.WriteException(Excep) End Try End SyncLock Threading.Thread.Sleep(500) InsteonSendExtCommand(strAddress, 9, 1) End Sub Sub InsteonProductDataRequest(ByVal strAddress As String, ByRef ResponseMsg As String, ByVal EngineVersion As Short) Select Case EngineVersion Case 0, 1 InsteonSendStdCommand(strAddress, 3, 0) Case 2 InsteonSendStdCommand(strAddress, 16, 0) End Select End Sub Sub InsteonSendExtCommand(ByVal strAddress As String, ByVal comm1 As Short, ByVal comm2 As Short) SyncLock serialLock If My.Settings.Insteon_Enable = True Then If SerialPLM.IsOpen = True Then Dim data(21) As Byte strAddress = Replace(strAddress, ":", ".") 'Handle 00:00:00 format Dim arrAddress() As String = strAddress.Split(".") data(0) = 2 'all commands start with 2 data(1) = 98 '0x62 = the PLM command to send an Insteon standard or extended message data(2) = Convert.ToInt32(arrAddress(0), 16) 'three byte address of device data(3) = Convert.ToInt32(arrAddress(1), 16) data(4) = Convert.ToInt32(arrAddress(2), 16) data(5) = 31 'flags data(6) = comm1 data(7) = comm2 data(21) = CByte(((Not (CInt(data(6)) + CInt(data(7)))) + 1) And 255) Try SerialPLM.Write(data, 0, 22) Catch Excep As System.InvalidOperationException My.Application.Log.WriteException(Excep) End Try Threading.Thread.Sleep(100) Else My.Application.Log.WriteEntry("Command not sent, PLM is not connected", TraceEventType.Warning) End If Else My.Application.Log.WriteEntry("Insteon module is disabled, command not sent", TraceEventType.Warning) End If End SyncLock End Sub Sub InsteonSendStdCommand(ByVal strAddress As String, ByVal comm1 As Short, ByVal comm2 As Short) SyncLock serialLock If My.Settings.Insteon_Enable = True Then If SerialPLM.IsOpen = True Then Dim data(7) As Byte strAddress = Replace(strAddress, ":", ".") 'Handle 00:00:00 format Dim arrAddress() As String = strAddress.Split(".") data(0) = 2 'all commands start with 2 data(1) = 98 '0x62 = the PLM command to send an Insteon standard or extended message data(2) = Convert.ToInt32(arrAddress(0), 16) 'three byte address of device data(3) = Convert.ToInt32(arrAddress(1), 16) data(4) = Convert.ToInt32(arrAddress(2), 16) data(5) = 15 'flags data(6) = comm1 data(7) = comm2 Try SerialPLM.Write(data, 0, 8) Catch Excep As System.InvalidOperationException My.Application.Log.WriteException(Excep) End Try Threading.Thread.Sleep(100) Else My.Application.Log.WriteEntry("Command not sent, PLM is not connected", TraceEventType.Warning) End If Else My.Application.Log.WriteEntry("Insteon module is disabled, command not sent", TraceEventType.Warning) End If End SyncLock End Sub Sub InsteonThermostatControl(ByVal strAddress As String, ByRef ResponseMsg As String, ByVal Command1 As String, Optional ByVal intTemperature As Integer = 72) Dim comm1 As Short Dim comm2 As Short If strAddress = "" And My.Settings.Insteon_ThermostatAddr = "" Then My.Application.Log.WriteEntry("No thermostat set, asking for it") My.Settings.Insteon_ThermostatAddr = InputBox("Enter Thermostat Address", "Thermostat") End If If strAddress = "" And My.Settings.Insteon_ThermostatAddr <> "" Then strAddress = My.Settings.Insteon_ThermostatAddr End If Select Case Command1 Case "Auto", "auto" comm1 = 107 comm2 = 6 Case "Cool", "cool" comm1 = 107 comm2 = 5 Case "CoolSet", "coolset" comm1 = 108 comm2 = intTemperature * 2 Case "Down", "down" comm1 = 105 comm2 = 2 Case "FanOff", "fanoff" comm1 = 107 comm2 = 8 Case "FanOn", "fanon" comm1 = 107 comm2 = 7 Case "Heat", "heat" comm1 = 107 comm2 = 4 Case "HeatSet", "heatset" comm1 = 109 comm2 = intTemperature * 2 Case "Off", "off" comm1 = 107 comm2 = 9 Case "Read", "read" comm1 = 106 comm2 = 0 Case "Up", "up" comm1 = 104 comm2 = 2 Case Else My.Application.Log.WriteEntry("InsteonThermostatControl received invalid request", TraceEventType.Warning) Exit Sub End Select InsteonSendExtCommand(strAddress, comm1, comm2) End Sub Function Load() As String If My.Settings.Insteon_Enable = True Then My.Application.Log.WriteEntry("Loading Insteon module") SerialPLM = New System.IO.Ports.SerialPort AddHandler SerialPLM.DataReceived, AddressOf SerialPLM_DataReceived CreateInsteonDb() Return "Insteon module loaded" Else My.Application.Log.WriteEntry("Insteon module is disabled, module not loaded") Return "Insteon module is disabled, module not loaded" End If End Function Function NicknameInsteonDeviceDb(ByVal strAddress As String, ByVal strNickname As String) As String If CheckDbForInsteon(strAddress) = 0 Then My.Application.Log.WriteEntry("Cannot set nickname, Insteon address is unknown") Return "Cannot set nickname, Insteon address is unknown" Else modDatabase.Execute("UPDATE DEVICES SET Name = """ & strNickname & """ WHERE Type = ""Insteon"" AND Address = """ & strAddress.ToUpper & """") Return "I have saved this information" End If End Function Function NicknameX10DeviceDb(ByVal strAddress As String, ByVal strNickname As String) As String If CheckDbForX10(strAddress) = 0 Then My.Application.Log.WriteEntry("Cannot set nickname, X10 address is unknown") Return "Cannot set nickname, X10 address is unknown" Else modDatabase.Execute("UPDATE DEVICES SET Name = """ & strNickname & """ WHERE Type = ""X10"" AND Address = """ & strAddress.ToUpper & """") Return "I have saved this information" End If End Function Private Sub SerialPLM_DataReceived(sender As Object, e As IO.Ports.SerialDataReceivedEventArgs) ' this is the serial port data received event on a secondary thread Dim PLMThread As New Threading.Thread(AddressOf PLM) Do Until SerialPLM.BytesToRead = 0 x(x_LastWrite + 1) = SerialPLM.ReadByte x(x_LastWrite + 10) = 0 If x_LastWrite < 30 Then x(x_LastWrite + 1001) = x(x_LastWrite + 1) ' the ends overlap so no message breaks over the limit of the array x_LastWrite = x_LastWrite + 1 ' increment only after the data is written, in case PLM() is running at same time If x_LastWrite > 1000 Then x_LastWrite = 1 Loop PLMThread.Start() End Sub Public Sub PLM() ' This routine handles the serial data on the primary thread Dim i As Short Dim X10House As Byte Dim X10Code As Byte Dim X10Address As String Dim FromAddress As String Dim ToAddress As String Dim IAddress As Short ' Insteon index number Dim Flags As Byte Dim Command1 As Byte Dim Command2 As Byte Dim ms As Short ' Position of start of message ( = x_Start + 1) Dim MessageEnd As Short ' Position of expected end of message (start + length, - 1000 if it's looping) Dim DataAvailable As Short ' how many bytes of data available between x_Start and X_LastWrite? Dim data(2) As Byte Dim Group As Byte Dim FromName As String Dim DataString As String Dim strTemp As String Dim response As String = "" If x_Start = x_LastWrite Then Exit Sub ' reached end of data, get out of sub ' x_Start = the last byte that was read and processed here ' Each time this sub is executed, one command will be processed (if enough data has arrived) ' This sub may be called while it is still running, under some circumstances (e.g. if it calls a slow macro) ' Find the beginning of the next command (always starts with 0x02) Do Until (x(x_Start + 1) = 2) Or (x_Start = x_LastWrite) Or (x_Start + 1 = x_LastWrite) x_Start = x_Start + 1 If x_Start > 1000 Then x_Start = 1 ' Loop according to the same looping rule as x_LastWrite Loop ms = x_Start + 1 ' ms = the actual 1st byte of data (which must = 0x02), whereas x_Start is the byte before it If x(ms) <> 2 Then Exit Sub ' reached the end of usable data, reset starting position, get out of sub ' How many bytes of data are available to process? (not counting the leading 0x02 of each message) If x_Start <= x_LastWrite Then DataAvailable = x_LastWrite - ms Else DataAvailable = 1000 + x_LastWrite - ms End If If DataAvailable < 1 Then Exit Sub ' not enough for a full message of any type ' Interpret the message and handle it Select Case x(ms + 1) Case 96 ' 0x060 response to Get IM Info MessageEnd = ms + 8 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 8 Then x_Start = MessageEnd ' Display message PLM_Address = Hex(x(ms + 2)) & "." & Hex(x(ms + 3)) & "." & Hex(x(ms + 4)) My.Application.Log.WriteEntry("PLM response to Get IM Info: PLM ID: " & PLM_Address & ", Device Category: " & Hex(x(ms + 5)) & ", Subcategory: " & Hex(x(ms + 6)) & ", Firmware: " & Hex(x(ms + 7)) & ", ACK/NAK: " & Hex(x(ms + 8)), TraceEventType.Verbose) ' Set the PLM as the controller ' --> I use this to verify the PLM is connected, disable some menu options, enable others, etc End If Case 80 ' 0x050 Insteon Standard message received ' next three bytes = address of device sending message ' next three bytes = address of PLM ' next byte = flags ' next byte = command1 if status was requested, this = link delta (increments each time link database changes) ' if device level was changed, this = command that was sent ' next byte = command2 if status was requested, this = on level (00-FF) ' if device level was changed, this also = on level (00-FF) MessageEnd = ms + 10 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 10 Then x_Start = MessageEnd FromAddress = Hex(x(ms + 2)) & "." & Hex(x(ms + 3)) & "." & Hex(x(ms + 4)) ToAddress = Hex(x(ms + 5)) & "." & Hex(x(ms + 6)) & "." & Hex(x(ms + 7)) Flags = x(ms + 8) Command1 = x(ms + 9) Command2 = x(ms + 10) ' Check if FromAddress is in device database, if not request info (ToAddress will generally = PLM) 'If CheckDbForInsteon(FromAddress) = 0 And Command1 <> 3 And Command1 <> 13 And Command1 <> 16 Then ' Threading.Thread.Sleep(1000) ' InsteonGetEngineVersion(FromAddress, response) 'End If 'Always print the whole command strTemp = "PLM Raw In: " For i = 0 To DataAvailable strTemp = strTemp & Hex(x(ms + i)) & " " Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) strTemp = "PLM: Insteon Received: From: " & FromAddress & " To: " & ToAddress If ToAddress = PLM_Address Then strTemp = strTemp & " (PLM)" Else strTemp = strTemp & " (" & ToAddress & ")" ' TODO: Fix this redundancy later End If strTemp = strTemp & " Flags: " & Hex(Flags) Select Case Flags And 224 Case 0 ' 000 Direct message strTemp = strTemp & " (direct) " Case 32 ' 001 ACK direct message strTemp = strTemp & " (ACK direct) " Case 64 ' 010 Group cleanup direct message strTemp = strTemp & " (Group cleanup direct) " Case 96 ' 011 ACK group cleanup direct message strTemp = strTemp & " (ACK Group cleanup direct) " Case 128 ' 100 Broadcast message strTemp = strTemp & " (Broadcast) " Case 160 ' 101 NAK direct message strTemp = strTemp & " (NAK direct) " Case 192 ' 110 Group broadcast message strTemp = strTemp & " (Group broadcast) " Case 224 ' 111 NAK group cleanup direct message strTemp = strTemp & " (NAK Group cleanup direct) " End Select If (FromAddress = My.Settings.Insteon_ThermostatAddr OrElse FromAddress = My.Settings.Insteon_ThermostatSlaveAddr) AndAlso Command1 > 109 Then ' TODO: Detect this by device model strTemp = strTemp & InsteonThermostatResponse(Command1, Command2, FromAddress) ElseIf (FromAddress = My.Settings.Insteon_ThermostatAddr OrElse FromAddress = My.Settings.Insteon_ThermostatSlaveAddr) AndAlso Command1 = 106 Then ' TODO: Detect this by device model strTemp = strTemp & InsteonThermostatResponse(Command1, Command2, FromAddress) ElseIf (FromAddress = My.Settings.Insteon_DoorSensorAddr OrElse FromAddress = My.Settings.Insteon_BackDoorSensorAddr) AndAlso ToAddress = "0.0.1" Then ' TODO: Detect this by device model strTemp = strTemp & InsteonDoorSensorResponse(Command1, Command2) ElseIf FromAddress = My.Settings.Insteon_SmokeBridgeAddr AndAlso Flags = 203 AndAlso x(ms + 5) = 0 AndAlso x(ms + 6) = 0 Then ' TODO: Detect this by device model strTemp = strTemp & InsteonSmokeBridgeResponse(x(ms + 7)) Else strTemp = strTemp & " Command1: " & Hex(Command1) & " (" & modInsteon.InsteonCommandLookup(Command1) & ")" & " Command2: " & Hex(Command2) End If My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) If Flags = 139 AndAlso (Command1 = 1 OrElse Command1 = 2) Then ' This is a 0x01 or 0x02 Product Request Data response. The 'To' field is actually the DevCat, SubCat, and Firmware Rev. My.Application.Log.WriteEntry("ADD CASE 4", TraceEventType.Verbose) AddInsteonDeviceDb(FromAddress, x(ms + 5), x(ms + 6), x(ms + 7)) End If ' Update the status of the sending device IAddress = InsteonNum(FromAddress) ' already checked to make sure it was in list FromName = Insteon(IAddress).Name If FromName = "" Then FromName = Insteon(IAddress).Address If (Flags And 160) <> 160 Then ' Not a NAK response, could be an ACK or a new message coming in ' Either way, update the sending device Select Case Command1 Case 13 My.Application.Log.WriteEntry("Device " + FromAddress + " has engine version of " + Hex(Command2)) Threading.Thread.Sleep(1000) InsteonProductDataRequest(FromAddress, response, Command2) Case 17, 18 ' On, Fast On Insteon(IAddress).Device_On = True If (Flags And 64) = 64 Then ' Group message (broadcast or cleanup) Insteon(IAddress).Level = 100 ' the real level is the preset for the link, but... Else ' Direct message Insteon(IAddress).Level = Command2 / 2.55 ' change to scale of 0-100 End If Case 19, 20 ' Off, Fast Off Insteon(IAddress).Device_On = False Insteon(IAddress).Level = 0 Case 21 ' Bright Insteon(IAddress).Device_On = True If Insteon(IAddress).Level > 100 Then Insteon(IAddress).Level = 100 Insteon(IAddress).Level = Insteon(IAddress).Level + 3 Case 22 ' Dim Insteon(IAddress).Level = Insteon(IAddress).Level - 3 If Insteon(IAddress).Level < 0 Then Insteon(IAddress).Level = 0 If Insteon(IAddress).Level = 0 Then Insteon(IAddress).Device_On = False End Select ' Check whether this was a response to a Status Request If (Flags And 224) = 32 Then ' ACK Direct message If Insteon(IAddress).Checking = True Then Insteon(IAddress).Level = Command2 / 2.55 If Insteon(IAddress).Level > 0 Then Insteon(IAddress).Device_On = True Else Insteon(IAddress).Device_On = False End If End If End If ' --> At this point I update a grid display, but you can do whatever you want... End If ' Now actually respond to events... If Insteon(IAddress).Checking = True Then ' It was a Status Request response, don't treat it as an event Insteon(IAddress).Checking = False Insteon(IAddress).LastCommand = 0 Insteon(IAddress).LastFlags = Flags And 224 Insteon(IAddress).LastTime = Now Insteon(IAddress).LastGroup = 0 Else ' It wasn't a Status Request, process it Select Case Flags And 224 Case 128 ' 100 Broadcast message ' Button-press linking, etc. Just display a message. ' Message format: FromAddress, DevCat, SubCat, Firmware, Flags, Cmd1, Cmd2 (=Device Attributes) strTemp = Format(Now) & " " If Command1 = 1 Then strTemp = strTemp & FromName & " broadcast 'Set Button Pressed'" Else strTemp = strTemp & FromName & " broadcast command " & Hex(Command1) End If My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) Insteon(IAddress).LastCommand = Command1 Insteon(IAddress).LastFlags = Flags And 224 Insteon(IAddress).LastTime = Now Insteon(IAddress).LastGroup = 0 Case 0, 64, 192 ' 000 Direct, 010 Group cleanup direct, 110 Group broadcast message ' Message sent to PLM by another device - trigger sounds, macro, etc If Flags And 64 Then ' Group message If Flags And 128 Then ' Group broadcast - group number is third byte of ToAddress Group = x(ms + 7) If Command1 = Insteon(IAddress).LastCommand And (Group = Insteon(IAddress).LastGroup) Then ' This is the same command we last received from this device ' Is this a repeat? (Some devices, like the RemoteLinc, seem to double their group broadcasts) If (Flags And 224) = (Insteon(IAddress).LastFlags) Then If DateDiff(DateInterval.Second, Insteon(IAddress).LastTime, Now) < 1 Then ' Same command, same flags, within the last second.... Exit Select ' So skip out of here without doing anything else End If End If End If Else ' Group cleanup direct - group number is Command2 Group = Command2 If Command1 = Insteon(IAddress).LastCommand And (Group = Insteon(IAddress).LastGroup) Then ' This is the same command we last received from this device ' Is this a Group Cleanup Direct message we already got a Group Broadcast for? If (Insteon(IAddress).LastFlags And 224) = 192 Then ' Last message was, in fact, a Group Broadcast If DateDiff(DateInterval.Second, Insteon(IAddress).LastTime, Now) < 3 Then ' Within the last 3 seconds.... Exit Select ' So skip out of here without doing anything else End If End If End If End If Else ' Direct message Group = 0 End If Insteon(IAddress).LastCommand = Command1 Insteon(IAddress).LastFlags = Flags And 224 Insteon(IAddress).LastTime = Now Insteon(IAddress).LastGroup = Group strTemp = Format(Now) & " " ' Write command to event log If Group > 0 Then strTemp = strTemp & FromName & " " & modInsteon.InsteonCommandLookup(Command1) & " (Group " & Format(Group) & ")" Else strTemp = strTemp & FromName & " " & modInsteon.InsteonCommandLookup(Command1) End If If FromAddress = My.Settings.Insteon_SmokeBridgeAddr Then ' TODO: Detect this by device model strTemp = strTemp & " Smoke Bridge: " & InsteonSmokeBridgeResponse(Group) End If My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) ' Handle incoming event and play sounds ' --> at this point I play a WAV file and run any macro associated with the device Case 32, 96 ' 001 ACK direct message, 011 ACK group cleanup direct message ' Command received and acknowledged by another device - update device status is already done (above). ' Nothing left to do here. Insteon(IAddress).LastCommand = Command1 Insteon(IAddress).LastFlags = Flags And 224 Insteon(IAddress).LastTime = Now Insteon(IAddress).LastGroup = 0 Case 160, 224 ' 101 NAK direct message, 111 NAK group cleanup direct message ' Command received by another device but failed - display message in log strTemp = Format(Now) & " " & FromAddress & " NAK to command " & Hex(Command1) & " (" & modInsteon.InsteonCommandLookup(Command1) & ")" My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) Insteon(IAddress).LastCommand = Command1 Insteon(IAddress).LastFlags = Flags And 224 Insteon(IAddress).LastTime = Now Insteon(IAddress).LastGroup = 0 End Select End If End If Case 81 ' 0x051 Insteon Extended message received - 23 byte message MessageEnd = ms + 24 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 24 Then x_Start = MessageEnd FromAddress = Hex(x(ms + 2)) & "." & Hex(x(ms + 3)) & "." & Hex(x(ms + 4)) ToAddress = Hex(x(ms + 5)) & "." & Hex(x(ms + 6)) & "." & Hex(x(ms + 7)) Flags = x(ms + 8) Command1 = x(ms + 9) Command2 = x(ms + 10) strTemp = "PLM: Insteon Extended Received: From: " & FromAddress & " To: " & ToAddress If ToAddress = PLM_Address Then strTemp = strTemp & " (PLM)" Else strTemp = strTemp & " (" & ToAddress & ")" ' TODO: Fix this redundancy later End If strTemp = strTemp & " Flags: " & Hex(Flags) Select Case Flags And 224 Case 0 ' 000 Direct message strTemp = strTemp & " (direct) " Case 32 ' 001 ACK direct message strTemp = strTemp & " (ACK direct) " Case 64 ' 010 Group cleanup direct message strTemp = strTemp & " (Group cleanup direct) " Case 96 ' 011 ACK group cleanup direct message strTemp = strTemp & " (ACK Group cleanup direct) " Case 128 ' 100 Broadcast message strTemp = strTemp & " (Broadcast) " Case 160 ' 101 NAK direct message strTemp = strTemp & " (NAK direct) " Case 192 ' 110 Group broadcast message strTemp = strTemp & " (Group broadcast) " Case 224 ' 111 NAK group cleanup direct message strTemp = strTemp & " (NAK Group cleanup direct) " End Select strTemp = strTemp & " Command1: " & Hex(Command1) & " (" & Command1 & ")" & " Command2: " & Hex(Command2) If Command1 = 3 Then ' Product Data Response Select Case Command2 Case 0 ' Product Data Response strTemp = strTemp & " Product Data Response:" & " Data: " For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next strTemp = strTemp & "--> Product Key " & Hex(x(ms + 12)) & Hex(x(ms + 13)) & Hex(x(ms + 14)) & " DevCat: " & Hex(x(ms + 15)) & " SubCat: " & Hex(x(ms + 16)) & " Firmware: " & Hex(x(ms + 17)) My.Application.Log.WriteEntry("ADD CASE 1", TraceEventType.Verbose) AddInsteonDeviceDb(FromAddress, x(ms + 15), x(ms + 16), x(ms + 17)) Case 1 ' FX Username Response strTemp = strTemp & " FX Username Response:" & " D1-D8 FX Command Username: " For i = 11 To 18 strTemp = strTemp & Hex(x(ms + i)) & " " Next strTemp = strTemp & " D9-D14: " For i = 19 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next Case 2 ' Device Text String strTemp = strTemp & " Device Text String Response:" & " D1-D8 FX Command Username: " DataString = "" For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next For i = 11 To 24 If x(ms + i) = 0 Then Exit For DataString = DataString + Chr(x(ms + i)) Next strTemp = strTemp & """" & DataString & """" Case 3 ' Set Device Text String strTemp = strTemp & " Set Device Text String:" & " D1-D8 FX Command Username: " DataString = "" For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next For i = 11 To 24 If x(ms + i) = 0 Then Exit For DataString = DataString + Chr(x(ms + i)) Next strTemp = strTemp & """" & DataString & """" Case 4 ' Set ALL-Link Command Alias strTemp = strTemp & " Set ALL-Link Command Alias:" & " Data: " For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next Case 5 ' Set ALL-Link Command Alias Extended Data strTemp = strTemp & " Set ALL-Link Command Alias Extended Data:" & " Data: " For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next Case Else strTemp = strTemp & " (unrecognized product data response)" & " Data: " For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next End Select Else ' Anything other than a product data response strTemp = strTemp & " Data: " For i = 11 To 24 strTemp = strTemp & Hex(x(ms + i)) & " " Next End If My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If ' I’m not planning on actually doing anything with this data, just displayed Case 82 ' 0x052 X10 Received ' next byte: raw X10 x(MsStart + 2) ' next byte: x10 flag x(MsStart + 3) MessageEnd = ms + 3 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 3 Then x_Start = MessageEnd strTemp = "PLM: X10 Received: " X10House = X10House_from_PLM(x(ms + 2) And 240) Select Case x(ms + 3) Case 0 ' House + Device X10Code = X10Device_from_PLM(x(ms + 2) And 15) strTemp = strTemp & Chr(65 + X10House) & (X10Code + 1) PLM_LastX10Device = X10Code ' Device Code 0-15 Case 63, 128 ' 0x80 House + Command 63 = 0x3F - should be 0x80 but for some reason I keep getting 0x3F instead X10Code = (x(ms + 2) And 15) + 1 X10Address = Chr(65 + X10House) & (PLM_LastX10Device + 1) strTemp = strTemp & Chr(65 + X10House) & " " & X10Code ' Now actually process the event ' Does it have a name? 'If DeviceName(X10Address) = X10Address Then HasName = False Else HasName = True My.Application.Log.WriteEntry(Format(Now) & " " & X10Address & " " & X10Code, TraceEventType.Verbose) 'If LoggedIn And HasName Then frmHack.WriteWebtrix(Blue, VB6.Format(TimeOfDay) & " ") ' Write command to event log ' Handle incoming event Select Case X10Code Case 3 ' On ' --> at this point I play a WAV file and run any macro associated with the device Case 4 ' Off ' --> at this point I play a WAV file and run any macro associated with the device Case 5 ' Dim ' --> at this point I play a WAV file and run any macro associated with the device Case 6 ' Bright ' --> at this point I play a WAV file and run any macro associated with the device End Select Case Else ' invalid data strTemp = strTemp & "Unrecognized X10: " & Hex(x(ms + 2)) & " " & Hex(x(ms + 3)) End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 98 ' 0x062 Send Insteon standard OR extended message ' PLM is just echoing the last command sent, discard this: 7 or 21 bytes MessageEnd = ms + 8 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 8 Then If (x(ms + 5) And 16) = 16 Then ' Extended message MessageEnd = x_Start + 1 + 22 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 22 Then x_Start = MessageEnd strTemp = "PLM: Sent Insteon message (extended): " For i = 0 To 22 strTemp = strTemp & Hex(x(ms + i)) & " " Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Else ' Standard message x_Start = MessageEnd strTemp = "PLM: Sent Insteon message (standard): " For i = 0 To 8 strTemp = strTemp & Hex(x(ms + i)) & " " Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If End If Case 99 ' 0x063 Sent X10 ' PLM is just echoing the command we last sent, discard: 3 bytes --- although could error check this for NAKs... MessageEnd = ms + 4 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 4 Then x_Start = MessageEnd strTemp = "PLM: X10 Sent: " X10House = X10House_from_PLM(x(ms + 2) And 240) Select Case x(ms + 3) Case 0 ' House + Device X10Code = X10Device_from_PLM(x(ms + 2) And 15) strTemp = strTemp & Chr(65 + X10House) & (X10Code + 1) Case 63, 128 ' 0x80 House + Command 63 = 0x3F - should be 0x80 but for some reason I keep getting 0x3F instead X10Code = (x(ms + 2) And 15) + 1 If X10Code > -1 And X10Code < 17 Then strTemp = strTemp & Chr(65 + X10House) & " " & X10Code Else strTemp = strTemp & Chr(65 + X10House) & " unrecognized command " & Hex(x(ms + 2) And 15) End If Case Else ' invalid data strTemp = strTemp & "Unrecognized X10: " & Hex(x(ms + 2)) & " " & Hex(x(ms + 3)) End Select strTemp = strTemp & " ACK/NAK: " Select Case x(ms + 4) Case 6 strTemp = strTemp & "06 (sent)" Case 21 strTemp = strTemp & "15 (failed)" Case Else strTemp = strTemp & Hex(x(ms + 4)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 83 ' 0x053 ALL-Linking complete - 8 bytes of data MessageEnd = ms + 9 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 9 Then x_Start = MessageEnd strTemp = "PLM: ALL-Linking Complete: 0x53 Link Code: " & Hex(x(ms + 2)) Select Case x(ms + 2) Case 0 strTemp = strTemp & " (responder)" Case 1 strTemp = strTemp & " (controller)" Case 244 strTemp = strTemp & " (deleted)" End Select FromAddress = Hex(x(ms + 4)) & "." & Hex(x(ms + 5)) & "." & Hex(x(ms + 6)) strTemp = strTemp & " Group: " & Hex(x(ms + 3)) & " ID: " & FromAddress & " DevCat: " & Hex(x(ms + 7)) & " SubCat: " & Hex(x(ms + 8)) & " Firmware: " & Hex(x(ms + 9)) If x(ms + 9) = 255 Then strTemp = strTemp & " (all newer devices = FF)" My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) My.Application.Log.WriteEntry("ADD CASE 2", TraceEventType.Verbose) AddInsteonDeviceDb(FromAddress, x(ms + 7), x(ms + 8), x(ms + 9)) End If Case 87 ' 0x057 ALL-Link record response - 8 bytes of data MessageEnd = ms + 9 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 9 Then x_Start = MessageEnd FromAddress = Hex(x(ms + 4)) & "." & Hex(x(ms + 5)) & "." & Hex(x(ms + 6)) ' Check if FromAddress is in device database, if not add it If InsteonNum(FromAddress) = 0 Then My.Application.Log.WriteEntry("ADD CASE 3", TraceEventType.Verbose) ' TODO: Make this: AddInsteonDevice(FromAddress) ' TODO: Make this: SortInsteon() End If My.Application.Log.WriteEntry("PLM: ALL-Link Record response: 0x57 Flags: " & Hex(x(ms + 2)) & " Group: " & Hex(x(ms + 3)) & " Address: " & FromAddress & " Data: " & Hex(x(ms + 7)) & " " & Hex(x(ms + 8)) & " " & Hex(x(ms + 9)), TraceEventType.Verbose) ' --> I assume this happened because I requested the data, and want the rest of it. So now ' Send 02 6A to get next record (e.g. continue reading link database from PLM) data(0) = 2 ' all commands start with 2 data(1) = 106 ' 0x06A = Get Next ALL-Link Record SerialPLM.Write(data, 0, 2) End If Case 85 ' 0x055 User reset the PLM - 0 bytes of data, not possible for this to be a partial message MessageEnd = ms + 1 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 x_Start = MessageEnd My.Application.Log.WriteEntry("PLM: User Reset 0x55") Case 86 ' 0x056 ALL-Link cleanup failure report - 5 bytes of data MessageEnd = ms + 6 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 6 Then x_Start = MessageEnd ToAddress = Hex(x(ms + 4)) & "." & Hex(x(ms + 5)) & "." & Hex(x(ms + 6)) My.Application.Log.WriteEntry("PLM: ALL-Link (Group Broadcast) Cleanup Failure Report 0x56 Data: " & Hex(x(ms + 2)) & " Group: " & Hex(x(ms + 3)) & " Address: " & ToAddress, TraceEventType.Verbose) End If Case 97 ' 0x061 Sent ALL-Link (Group Broadcast) command - 4 bytes MessageEnd = ms + 5 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 5 Then x_Start = MessageEnd strTemp = "PLM: Sent Group Broadcast: 0x61 Group: " & Hex(x(ms + 2)) & " Command1: " & Hex(x(ms + 3)) & " Command2 (Group): " & Hex(x(ms + 4)) & " ACK/NAK: " Select Case x(ms + 5) Case 6 strTemp = strTemp & "06 (sent)" Case 21 strTemp = strTemp & "15 (failed)" Case Else strTemp = strTemp & Hex(x(ms + 5)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 102 ' 0x066 Set Host Device Category - 4 bytes MessageEnd = ms + 5 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 5 Then x_Start = MessageEnd strTemp = "PLM: Set Host Device Category: 0x66 DevCat: " & Hex(x(ms + 2)) & " SubCat: " & Hex(x(ms + 3)) & " Firmware: " & Hex(x(ms + 4)) If x(ms + 4) = 255 Then strTemp = strTemp & " (all newer devices = FF)" strTemp = strTemp & " ACK/NAK: " Select Case x(ms + 5) Case 6 strTemp = strTemp & "06 (executed correctly)" Case 21 strTemp = strTemp & "15 (failed)" Case Else strTemp = strTemp & Hex(x(ms + 5)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 115 ' 0x073 Get IM Configuration - 4 bytes MessageEnd = ms + 5 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 5 Then x_Start = MessageEnd strTemp = "PLM: Get IM Configuration: 0x73 Flags: " & Hex(x(ms + 2)) If x(ms + 2) And 128 Then strTemp = strTemp & " (no button linking)" If x(ms + 2) And 64 Then strTemp = strTemp & " (monitor mode)" If x(ms + 2) And 32 Then strTemp = strTemp & " (manual LED control)" If x(ms + 2) And 16 Then strTemp = strTemp & " (disable deadman comm feature)" If x(ms + 2) And (128 + 64 + 32 + 16) Then strTemp = strTemp & " (default)" strTemp = strTemp & " Data: " & Hex(x(ms + 3)) & " " & Hex(x(ms + 4)) & " ACK: " & Hex(x(ms + 5)) My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 100 ' 0x064 Start ALL-Linking, echoed - 3 bytes MessageEnd = ms + 4 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 4 Then x_Start = MessageEnd strTemp = "PLM: Start ALL-Linking 0x64 Code: " & Hex(x(ms + 2)) Select Case x(ms + 2) Case 0 strTemp = strTemp & " (PLM is responder)" Case 1 strTemp = strTemp & " (PLM is controller)" Case 3 strTemp = strTemp & " (initiator is controller)" Case 244 strTemp = strTemp & " (deleted)" End Select strTemp = strTemp & " Group: " & Hex(x(ms + 3)) & " ACK/NAK: " Select Case x(ms + 4) Case 6 strTemp = strTemp & "06 (executed correctly)" Case 21 strTemp = strTemp & "15 (failed)" Case Else strTemp = strTemp & Hex(x(ms + 4)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 113 ' 0x071 Set Insteon ACK message two bytes - 3 bytes MessageEnd = ms + 4 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 4 Then x_Start = MessageEnd strTemp = "PLM: Set Insteon ACK message 0x71 " For i = 2 To 4 strTemp = strTemp & Hex(x(ms + i)) & " " Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 104, 107, 112 ' 0x068 Set Insteon ACK message byte, 0x06B Set IM Configuration, 0x070 Set Insteon NAK message byte ' 2 bytes MessageEnd = ms + 3 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 3 Then x_Start = MessageEnd strTemp = "PLM: " For i = 0 To 3 strTemp = strTemp & Hex(x(ms + i)) & " " Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 88 ' 0x058 ALL-Link cleanup status report - 1 byte MessageEnd = ms + 2 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 2 Then x_Start = MessageEnd strTemp = "PLM: ALL-Link (Group Broadcast) Cleanup Status Report 0x58 ACK/NAK: " Select Case x(ms + 2) Case 6 strTemp = strTemp & "06 (completed)" Case 21 strTemp = strTemp & "15 (interrupted)" Case Else strTemp = strTemp & Hex(x(ms + 2)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 84, 103, 108, 109, 110, 114 ' 0x054 Button (on PLM) event, 0x067 Reset the IM, 0x06C Get ALL-Link record for sender, 0x06D LED On, 0x06E LED Off, 0x072 RF Sleep ' discard: 1 byte MessageEnd = ms + 2 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 2 Then x_Start = MessageEnd strTemp = "PLM: " For i = 0 To 2 strTemp = strTemp & Hex(x(ms + i)) & " " Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 101 ' 0x065 Cancel ALL-Linking - 1 byte MessageEnd = ms + 2 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 2 Then x_Start = MessageEnd strTemp = "PLM: Cancel ALL-Linking 0x65 ACK/NAK: " Select Case x(ms + 2) Case 6 strTemp = strTemp & "06 (success)" Case 21 strTemp = strTemp & "15 (failed)" Case Else strTemp = strTemp & Hex(x(ms + 2)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 105 ' 0x069 Get First ALL-Link record MessageEnd = ms + 2 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 2 Then x_Start = MessageEnd strTemp = "PLM: 0x69 Get First ALL-Link record: " & Hex(x(ms + 2)) Select Case x(ms + 2) Case 6 strTemp = strTemp & " (ACK)" Case 21 strTemp = strTemp & " (NAK - no links in database)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 106 ' 0x06A Get Next ALL-Link record MessageEnd = ms + 2 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 2 Then x_Start = MessageEnd strTemp = "PLM: 0x6A Get Next ALL-Link record: " & Hex(x(ms + 2)) Select Case x(ms + 2) Case 6 strTemp = strTemp & " (ACK)" Case 21 strTemp = strTemp & " (NAK - no more links in database)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case 111 ' 0x06F Manage ALL-Link record - 10 bytes MessageEnd = ms + 11 If MessageEnd > 1000 Then MessageEnd = MessageEnd - 1000 If DataAvailable >= 11 Then x_Start = MessageEnd ToAddress = Hex(x(ms + 5)) & "." & Hex(x(ms + 6)) & "." & Hex(x(ms + 7)) strTemp = "PLM: Manage ALL-Link Record 0x6F: Code: " & Hex(x(ms + 2)) Select Case x(ms + 2) Case 0 ' 0x00 strTemp = strTemp & " (Check for record)" Case 1 ' 0x01 strTemp = strTemp & " (Next record for...)" Case 32 ' 0x20 strTemp = strTemp & " (Update or add)" Case 64 ' 0x40 strTemp = strTemp & " (Update or add as controller)" Case 65 ' 0x41 strTemp = strTemp & " (Update or add as responder)" Case 128 ' 0x80 strTemp = strTemp & " (Delete)" Case Else ' ? strTemp = strTemp & " (?)" End Select strTemp = strTemp & " Link Flags: " & Hex(x(ms + 3)) & " Group: " & Hex(x(ms + 4)) & " Address: " & ToAddress & " Link Data: " & Hex(x(ms + 8)) & " " & Hex(x(ms + 9)) & " " & Hex(x(ms + 10)) & " ACK/NAK: " Select Case x(ms + 11) Case 6 strTemp = strTemp & "06 (executed correctly)" Case 21 strTemp = strTemp & "15 (failed)" Case Else strTemp = strTemp & Hex(x(ms + 11)) & " (?)" End Select My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) End If Case Else ' in principle this shouldn't happen... unless there are undocumented PLM messages (probably!) x_Start = x_Start + 1 ' just skip over this and hope to hit a real command next time through the loop If x_Start > 1000 Then x_Start = x_Start - 1000 strTemp = "PLM: Unrecognized command received: " For i = 0 To DataAvailable strTemp = strTemp & Hex(x(ms + DataAvailable)) Next My.Application.Log.WriteEntry(strTemp, TraceEventType.Verbose) Debug.WriteLine("Unrecognized command received " & Hex(x(ms)) & " " & Hex(x(ms + 1)) & " " & Hex(x(ms + 2))) End Select Debug.WriteLine("PLM finished: ms = " & ms & " MessageEnd = " & MessageEnd & " X_Start = " & x_Start) Exit Sub End Sub Function Unload() As String My.Application.Log.WriteEntry("Unloading Insteon module") If tmrIThermCheckTimer IsNot Nothing Then tmrIThermCheckTimer.Enabled = False End If If SerialPLM IsNot Nothing Then If SerialPLM.IsOpen = True Then My.Application.Log.WriteEntry("Closing serial connection") SerialPLM.Close() End If SerialPLM.Dispose() Threading.Thread.Sleep(200) End If Return "Insteon module unloaded" End Function Public Function InsteonNum(ByVal Address As String) As Short ' return the array index for this insteon device based on the address ' or 0 if address is not found Dim i As Short Address = UCase(Address) i = 1 Do Until UCase(Insteon(i).Address) = Address Or i >= NumInsteon i = i + 1 Loop If UCase(Insteon(i).Address) = Address Then InsteonNum = i Else InsteonNum = 0 End If End Function ''' <summary> ''' Returns true if input is a proper Insteon address. ''' </summary> ''' <param name="strAddress">Insteon address in XX.XX.XX format</param> ''' <returns>True if formatted correctly, false otherwise</returns> Public Function IsInsteonAddress(ByVal strAddress As String) As Boolean If strAddress.Length = 8 Then Dim arrAddress() As String = strAddress.Split(".") If Convert.ToInt32(arrAddress(0), 16) + Convert.ToInt32(arrAddress(1), 16) + Convert.ToInt32(arrAddress(2), 16) > 0 Then Return True End If End If Return False End Function ''' <summary> ''' Returns true if input is a proper X10 address. ''' </summary> ''' <param name="strAddress">X10 address in X0 format</param> ''' <returns>True if formatted correctly, false otherwise</returns> Public Function IsX10Address(ByVal strAddress As String) As Boolean If strAddress.Length = 2 OrElse strAddress.Length = 3 Then If IsNumeric(strAddress.Substring(1, strAddress.Length - 1)) Then Dim DeviceCode As Integer = CInt(strAddress.Substring(1, strAddress.Length - 1)) If DeviceCode > 0 AndAlso DeviceCode < 17 Then Dim HouseCode As Integer = Asc(strAddress.Substring(0, 1).ToUpper) If HouseCode > 64 AndAlso HouseCode < 81 Then Return True End If End If End If End If Return False End Function Public Function X10House_from_PLM(ByVal Index As Byte) As Short Dim i As Short ' Given the MSB from the PLM, return the House (0-15). If not found, return -1. i = 1 Do Until PLM_X10_House(i) = Index Or i = 16 i = i + 1 Loop If PLM_X10_House(i) = Index Then X10House_from_PLM = i - 1 Else X10House_from_PLM = -1 End If End Function Public Function X10Device_from_PLM(ByVal Index As Byte) As Short Dim i As Short ' Given the LSB from the PLM, return the Device (0-15). (Also works for commands.) If not found, return -1. i = 1 Do Until PLM_X10_Device(i) = Index Or i = 16 i = i + 1 Loop If PLM_X10_Device(i) = Index Then X10Device_from_PLM = i - 1 Else X10Device_from_PLM = -1 End If End Function Function X10SendCommand(ByVal strAddress As String, ByVal strCommand As String) As String Dim strOutcome As String = "" Dim bytCommand As Byte Dim HouseCode As Byte = Asc(strAddress.Substring(0, 1)) - 65 Dim DeviceCode As Byte = CInt(strAddress.Substring(1, strAddress.Length - 1)) Select Case strCommand Case "bright" bytCommand = 5 Case "dim" bytCommand = 4 Case "off" bytCommand = 3 Case "on" bytCommand = 2 Case Else bytCommand = 0 End Select SyncLock serialLock If My.Settings.Insteon_Enable = True Then If SerialPLM.IsOpen = True Then Dim data(3) As Byte data(0) = 2 'Start message data(1) = 99 '0x63 - Send X10 data(2) = PLM_X10_House(HouseCode + 1) + PLM_X10_Device(DeviceCode) 'X10 Address (house + device) data(3) = 0 'Flag - This is the address Try SerialPLM.Write(data, 0, 4) Catch Excep As System.InvalidOperationException My.Application.Log.WriteException(Excep) End Try Threading.Thread.Sleep(500) data(2) = PLM_X10_House(HouseCode + 1) + bytCommand 'X10 Address (house + command) data(3) = 128 'Flag - This is the command Try SerialPLM.Write(data, 0, 4) Catch Excep As System.InvalidOperationException My.Application.Log.WriteException(Excep) End Try strOutcome = "Command sent" Else strOutcome = "Command not sent, serial interface is not open" End If Else strOutcome = "Command not sent, module is disabled" End If End SyncLock Return strOutcome End Function ''' <summary> ''' This function returns the database ID of an Insteon device in the INSTEON_DEVICES table. ''' </summary> ''' <param name="strAddress">Insteon address in XX.XX.XX format</param> ''' <returns>Result index or 0 for no result</returns> Function CheckDbForInsteon(ByVal strAddress As String) As Integer Dim result As Integer = New Integer modDatabase.ExecuteScalar("SELECT Id FROM INSTEON_DEVICES WHERE Address = '" + strAddress + "'", result) If result <> 0 Then My.Application.Log.WriteEntry(strAddress + " database ID is " + result.ToString) Return result Else My.Application.Log.WriteEntry(strAddress + " is not in the device database") Return 0 End If End Function ''' <summary> ''' This function results the database ID of an X10 device in the DEVICES table. ''' </summary> ''' <param name="strAddress">X10 address in the X0 format</param> ''' <returns>Result index or 0 for no result</returns> Function CheckDbForX10(ByVal strAddress As String) As Integer Dim result As Integer = New Integer modDatabase.ExecuteScalar("SELECT Id FROM DEVICES WHERE Type = 'X10' AND Address = '" + strAddress + "'", result) If result <> 0 Then My.Application.Log.WriteEntry(strAddress + " database ID is " + result.ToString) Return result Else My.Application.Log.WriteEntry(strAddress & " is not in the device database") Return 0 End If End Function ''' <summary> ''' This function returns the Insteon address of a given device nickname. ''' </summary> ''' <param name="strNickname">Nickname of device to look for</param> ''' <returns>Insteon address in XX.XX.XX format</returns> Function GetInsteonAddressFromNickname(ByVal strNickname) As String Dim result As String = "" modDatabase.ExecuteReader("SELECT Address FROM DEVICES WHERE Name = '" + strNickname + "' AND Type = 'Insteon'", result) Return result End Function ''' <summary> ''' This function returns the X10 address of a given device nickname. ''' </summary> ''' <param name="strNickname">Nickname of device to look for</param> ''' <returns>X10 address in X0 format</returns> Function GetX10AddressFromNickname(ByVal strNickname) As String Dim result As String = "" modDatabase.ExecuteReader("SELECT Address FROM DEVICES WHERE Name = '" & strNickname & "' AND Type = 'X10'", result) Return result End Function ''' <summary> ''' This function returns the description of an Insteon command. ''' </summary> ''' <param name="ICmd">Integer or short of command</param> ''' <returns>Description of Insteon command</returns> Function InsteonCommandLookup(ByVal ICmd) As String Select Case ICmd Case 1 Return "Product Request Data" Case 2 Return "Product Request Data" Case 3 Return "Product Data Request" Case 6 Return "Success Report Broadcast" Case 9 Return "Enter Link Mode" Case 10 Return "Enter Unlink Mode" Case 13 Return "Get INSTEON Engine Version" Case 15 Return "Ping" Case 16 Return "ID Request" Case 17 Return "ON" Case 18 Return "Fast ON" Case 19 Return "OFF" Case 20 Return "Fast OFF" Case 21 Return "Bright" Case 22 Return "Dim" Case 23 Return "Start Manual Change" Case 24 Return "Stop Manual Change" Case 25 Return "Status Request" Case 31 Return "Get Operating Flags" Case 32 Return "Set Operating Flags" Case 33 Return "Light Instant Change" Case 34 Return "Light Manually Turned Off" Case 35 Return "Light Manually Turned On" Case 36 Return "Reread Init Values" Case 37 Return "Remote SET Button Tap" Case 39 Return "Light Set Status" Case 40 Return "Set MSB for Peek/Poke" Case 41 Return "Poke EE" Case 43 Return "Peek One Byte" Case 44 Return "Peek One Byte Internal" Case 45 Return "Peek One Byte Internal" Case 46 Return "Light ON at Ramp Rate" Case 47 Return "Light OFF at Ramp Rate" Case 48 Return "Beep" Case 60 Return "Sprinkler Valve On" Case 62 Return "Sprinkler Valve Off" Case 66 Return "Sprinkler Program ON" Case 67 Return "Sprinkler Program OFF" Case 68 Return "Sprinkler Control" Case 69 Return "Get Sprinkler Timers Request" Case 70 Return "I/O Output OFF" Case 71 Return "I/O Alarm Data Request" Case 72 Return "I/O Write Output Port" Case 73 Return "I/O Read Input Port" Case 74 Return "Get Sensor Value" Case 75 Return "Set Sensor 1 OFF->ON Alarm" Case 76 Return "Set Sensor 1 ON->OFF Alarm" Case 77 Return "Write Configuration Port" Case 78 Return "Read Configuration Port" Case 79 Return "EZIO Control" Case 80 Return "Pool Device ON" Case 81 Return "Pool Device OFF" Case 82 Return "Pool Temperature Up" Case 83 Return "Pool Temperature Down" Case 84 Return "Pool Control" Case 88 Return "Door Move" Case 89 Return "Door Status Report" Case 96 Return "Window Covering" Case 97 Return "Window Covering Position" Case 104 Return "Thermostat Temp Up" Case 105 Return "Thermostat Temp Down" Case 106 Return "Thermostat Get Zone Info" Case 107 Return "Thermostat Control" Case 108 Return "Thermostat Set Cool Setpoint" Case 109 Return "Thermostat Set Heat Setpoint" Case 110 Return "Set or Read Mode" Case 112 Return "Leak Detector Announce" Case 129 Return "Assign to Companion Group" Case 240 Return "EZSnsRF Control" Case 241 Return "Specific Code Record Read" Case Else Return "Unrecognized " + Hex(ICmd) End Select End Function ''' <summary> ''' This function returns the name of an Insteon module based on it's device identifiers. ''' </summary> ''' <param name="DevCat">Device category</param> ''' <param name="SubCat">Device subcategory</param> ''' <returns>Model and name of Insteon device</returns> Function InsteonDeviceLookup(ByVal DevCat As Short, ByVal SubCat As Short) As String Select Case DevCat Case 0 Select Case SubCat Case 4 Return "2430 ControLinc" Case 5 Return "2440 RemoteLinc" Case 6 Return "2830 Icon Tabletop Controller" Case 8 Return "EZBridge/EZServer" Case 9 Return "2442 SignaLinc RF Signal Enhancer" Case 10 Return "Poolux LCD Controller" Case 11 Return "2443 Access Point" Case 12 Return "IES Color Touchscreen" Case 18 Return "2342-222 Mini Remote - 8 Scene | 2444A2WH8 RemoteLinc 2" Case Else Return "Unrecognized Controller, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 1 Select Case SubCat Case 0 Return "2456D3 LampLinc 2" Case 1 Return "2476D SwitchLinc 2 Dimmer 600W" Case 2 Return "2475D In-LineLinc Dimmer" Case 3 Return "2876D Icon Switch Dimmer" Case 4 Return "2476DH SwitchLinc 2 Dimmer 1000W" Case 5 Return "2484DWH8 KeypadLinc Dimmer Countdown Timer" Case 6 Return "2456D2 LampLinc 2-Pin" Case 7 Return "2856D2 Icon LampLinc 2 2-Pin" Case 9 Return "2486D KeypadLinc Dimmer" Case 10 Return "2886D Icon In-Wall Controller" Case 12 Return "2486DWH8 KeypadLinc Dimmer - 8 Button" Case 13 Return "2454D SocketLinc" Case 14 Return "2457D3 Dual-Band LampLinc Dimmer" Case 19 Return "2676D-B Icon SwitchLinc Dimmer for Lixar/Bell Canada" Case 23 Return "2466D ToggleLinc Dimmer" Case 24 Return "2474D Icon SwitchLinc Dimmer In-Line Companion" Case 25 Return "SwitchLinc 800W" Case 26 Return "2475D2 In-LineLinc Dimmer with Sense" Case 27 Return "2486DWH6 KeypadLinc Dimmer - 6 Button" Case 28 Return "2486DWH8 KeypadLinc Dimmer - 8 Button" Case 29 Return "2476D SwitchLinc Dimmer 1200W" Case 32 Return "2477D Dual-Band Dimmer Switch" Case 33 Return "2472D Dual-Band OutletLinc Dimmer" Case 34 Return "2457D2X LampLinc" Case 35 Return "2457D2EZ Dual-Band LampLinc EZ" Case 36 Return "2474DWH SwitchLinc 2-Wire Dimmer" Case 37 Return "2475DA2 In-LineLinc 0-10VDC Dimmer/Dual-SwitchDB" Case 45 Return "2477DH Dual-Band SwitchLinc Dimmer Switch 1000W" Case 46 Return "2475F FanLinc" Case 48 Return "2476D SwitchLinc Dimmer" Case 49 Return "2478D Dual-Band SwitchLinc Dimmer 240V" Case 50 Return "2475DA1 Dual-Band In-LineLinc Dimmer" Case 52 Return "2452-222 DIN Rail Dimmer" Case 53 Return "2442-222 Micro Dimmer" Case 54 Return "2452-422 DIN Rail Dimmer (EU)" Case 55 Return "2452-522 DIN Rail Dimmer (AUS/NZ)" Case 56 Return "2442-422 Micro Dimmer (EU)" Case 57 Return "2442-522 Micro Dimmer (AUS/NZ)" Case 58 Return "2672-222 LED Bulb 240V Edison" Case 59 Return "2672-422 LED Bulb 240V Edison (EU)" Case 60 Return "2672-522 LED Bulb 240V Edison (AUS/NZ)" Case 73 Return "2674-222 LED Bulb PAR38 Edison" Case 74 Return "2674-422 LED Bulb PAR38 Edison (EU)" Case 75 Return "2674-522 LED Bulb PAR38 Edison (AUS/NZ)" Case 76 Return "2672-432 LED Bulb 240V Bayonet (EU)" Case 77 Return "2672-532 LED Bulb 240V Bayonet (AUS/NZ)" Case 78 Return "2674-432 LED Bulb PAR38 Bayonet (EU)" Case 79 Return "2674-532 LED Bulb PAR38 Bayonet (AUS/NZ)" Case Else Return "Unrecognized Dimmer, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 2 Select Case SubCat Case 5 Return "2486SWH8 KeypadLinc Relay - 8 Button" Case 7 Return "2456ST3 TimerLinc" Case 8 Return "2473S OutletLinc" Case 9 Return "2456S3 ApplianceLinc" Case 10 Return "2476S SwitchLinc Relay" Case 11 Return "2876S Icon On/Off Switch" Case 12 Return "2856S3 Icon Appliance Adapter" Case 13 Return "2466S ToggleLinc Relay" Case 14 Return "2476ST SwitchLinc Relay Countdown Timer" Case 15 Return "2486SWH6 KeypadLinc On/Off Switch" Case 16 Return "2475D In-LineLinc Relay" Case 17 Return "EZSwitch30" Case 18 Return "Icon SwitchLinc Relay In-Line Companion" Case 19 Return "2676R-B Icon SwitchLinc Relay for Lixar/Bell Canada" Case 42 Return "2477S Dual-Band On/Off Switch" Case 55 Return "2635-222 On/Off Module" Case 56 Return "2634-222 Dual-Band Outdoor On/Off Module" Case 57 Return "2663-222 On/Off Outlet" Case Else Return "Unrecognized Appliance Control, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 3 Select Case SubCat Case 1 Return "2414S Serial PLC" Case 2 Return "2414U Serial PLC USB" Case 3 Return "2814S Icon Serial PLC" Case 4 Return "2814U Icon Serial PLC USB" Case 5 Return "2412S Serial PLM" Case 6 Return "2411R IRLinc Receiver" Case 7 Return "2411T IRLinc Transmitter" Case 11 Return "2412U Serial PLM USB" Case 13 Return "EZX10RF X10 RF Wireless Sensor Receiver" Case 16 Return "2412N SmartLinc Central Controller" Case 17 Return "2413S Dual-Band Serial PLM" Case 19 Return "2412UH Serial PLM USB for HouseLinc" Case 20 Return "2412SH Serial PLM for HouseLinc" Case 21 Return "2413U Dual-Band Serial PLM USB" Case 25 Return "2413SH Dual-Band Serial PLM for HouseLinc" Case 26 Return "2413UH Dual-Band Serial PLM USB for HouseLinc" Case 31 Return "2448A7 USB Stick PLM" Case 49 Return "2242-222 Insteon Hub" Case 51 Return "2245-222 Insteon Hub (2014)" Case 58 Return "2243-222 Insteon Hub Pro" Case Else Return "Unrecognized Interface, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 4 Select Case SubCat Case 0 Return "EZRain Sprinkler Controller" Case Else Return "Unrecognized Irrigation Controller, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 5 Select Case SubCat Case 1 Return "EZTherm Thermostat" Case 3 Return "2441V Thermostat Adapter for Venstar" Case 10 Return "2441ZTH Wireless Thermostat" Case 11 Return "2441TH Thermostat" Case 15 Return "2732-422 Thermostat (EU)" Case 16 Return "2732-522 Thermostat (AUS/NZ)" Case 17 Return "2732-432 Wireless Thermostat (EU)" Case 18 Return "2732-532 Wireless Thermostat (AUS/NZ)" Case Else Return "Unrecognized Temperature Control, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 6 Return "Unrecognized Pool/Spa Control Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 7 Select Case SubCat Case 0 Return "2450 I/O Linc" Case 1 Return "EZSns1W Sensor Module" Case 2 Return "EZIO8T I/O Module" Case 3 Return "EZIO2x4 I/O Module" Case 4 Return "EZIO8SA I/O Module" Case 5 Return "EZSnsRF RF Receiver" Case 6 Return "EZSnsRF RF Interface" Case 7 Return "EZIO6I I/O Module" Case 8 Return "EZIO4O I/O Module" Case 26 Return "2867-222 Alert Module" Case 30 Return "2868-222 Siren" Case Else Return "Unrecognized Sensor/Actuator Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 8 Return "Unrecognized Home Entertainment Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 10 Return "Unrecognized Appliance Control Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 11 Return "Unrecognized Plumbing Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 12 Return "Unrecognized Communication Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 13 Return "Unrecognized Computer Control Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 14 Select Case SubCat Case 0 Return "318276I Somfy Drape Controller RF Bridge" Case 1 Return "2444-222 Micro Open/Close Motor Control Module" Case 2 Return "2444-422 Micro Open/Close Motor Control Module (EU)" Case 3 Return "2444-522 Micro Open/Close Motor Control Module (AUS/NZ)" Case Else Return "Unrecognized Window Covering Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 15 Select Case SubCat Case 0 Return "Weiland Doors Central Drive and Control" Case 1 Return "Weiland Doors Secondary Central Drive" Case 2 Return "Weiland Doors Assist Drive" Case 3 Return "Weiland Doors Elevation Drive" Case 4 Return "GarageHawk Garage Unit" Case 5 Return "GarageHawk Remote Unit" Case 6 Return "2458A1 MorningLinc" Case Else Return "Unrecognized Access Control Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 16 Select Case SubCat Case 0 Return "First Alert ONELink RF to Insteon Bridge" Case 1 Return "2842-222 Motion Sensor | 2420M Motion Sensor" Case 2 Return "2843-222 Wireless Open/Close Sensor | 2421 TriggerLinc" Case 4 Return "2842-422 Motion Sensor (EU)" Case 5 Return "2842-522 Motion Sensor (AUS/NZ)" Case 6 Return "2843-422 Wireless Open/Close Sensor (EU)" Case 7 Return "2843-522 Wireless Open/Close Sensor (AUS/NZ)" Case 8 Return "2852-222 Water Leak Sensor" Case 10 Return "2982-222 Smoke Bridge" Case 17 Return "2845-222 Hidden Door Sensor" Case 20 Return "2845-422 Hidden Door Sensor (EU)" Case 21 Return "2845-522 Hidden Door Sensor (AUS/NZ)" Case 22 Return "2844-222 Motion Sensor II" Case Else Return "Unrecognized Security/Safety Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select Case 17 Return "Unrecognized Surveillance Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 18 Return "Unrecognized Automotive Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 19 Return "Unrecognized Pet Care Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 20 Return "Unrecognized Toy, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 21 Return "Unrecognized Timekeeping Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case 22 Return "Unrecognized Holiday Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) Case Else Return "Unrecognized Device, DevCat: " + Hex(DevCat) + " SubCat: " + Hex(SubCat) End Select End Function ''' <summary> ''' This function takes notification actions regarding a door sensor sending a message. ''' </summary> ''' <param name="comm1"></param> ''' <param name="comm2"></param> ''' <returns>Text definition of what happened</returns> Function InsteonDoorSensorResponse(ByVal comm1 As Byte, ByVal comm2 As Byte) As String Select Case comm1 Case 17 My.Settings.Global_TimeDoorLastOpened = Now() If modGlobal.HomeStatus = "Away" OrElse modGlobal.HomeStatus = "Stay" Then My.Application.Log.WriteEntry("ALERT: Door opened during status: " & modGlobal.HomeStatus, TraceEventType.Warning) modSpeech.Say("Intruder alert!") modMail.Send("Intruder alert", "Intruder alert") Dim response As String = "" Threading.Thread.Sleep(5000) InsteonAlarmControl(GetInsteonAddressFromNickname("alarm"), response, "on", 30) InsteonAlarmControl(GetInsteonAddressFromNickname("siren"), response, "on", 30) End If Return "Door Opened" Case 19 My.Settings.Global_TimeDoorLastOpened = Now() Return "Door Closed" Case Else Return "(" & Hex(comm1) & ") Unrecognized (" & Hex(comm2) & ")" End Select End Function ''' <summary> ''' This function takes notification actions regarding the Smoke Bridge module sending a message. ''' </summary> ''' <param name="ToBit">Byte representing message received</param> ''' <returns>Text defintion of what happened</returns> Function InsteonSmokeBridgeResponse(ByVal ToBit As Byte) As String Select Case ToBit Case 1 My.Application.Log.WriteEntry("ALERT: Smoke Detected!", TraceEventType.Warning) modSpeech.Say("Smoke detected") modMail.Send("Smoke detected", "Smoke detected") Dim response As String = "" Threading.Thread.Sleep(3000) InsteonAlarmControl(GetInsteonAddressFromNickname("alarm"), response, "on", 180) Threading.Thread.Sleep(500) InsteonAlarmControl(GetInsteonAddressFromNickname("siren"), response, "on", 180) Return "Smoke Detected" Case 2 My.Application.Log.WriteEntry("ALERT: Carbon Monoxide Detected!", TraceEventType.Warning) modSpeech.Say("Carbon monoxide detected") modMail.Send("Carbon monoxide detected", "Carbon monoxide detected") Dim response As String = "" Threading.Thread.Sleep(3000) InsteonAlarmControl(GetInsteonAddressFromNickname("alarm"), response, "on", 180) Threading.Thread.Sleep(500) InsteonAlarmControl(GetInsteonAddressFromNickname("siren"), response, "on", 180) Return "Carbon Monoxide Detected" Case 3 modSpeech.Say("Test of Smoke Bridge successful") modMail.Send("Test of Smoke Bridge successful", "Test of Smoke Bridge successful") Return "Test Detected" Case 4 Return "New or Unknown Message Detected" Case 5 My.Application.Log.WriteEntry("CANCEL ALERT: All Clear Detected", TraceEventType.Information) modSpeech.Say("All clear. All clear") modMail.Send("All clear", "Smoke bridge reports all clear") Return "All Clear Detected" Case 6 My.Application.Log.WriteEntry("WARNING: Smoke Detector Low Battery", TraceEventType.Warning) modSpeech.Say("Change smoke detector battery") Return "Low Battery Detected" Case 7 My.Application.Log.WriteEntry("WARNING: Smoke Detector Sensor Malfunction", TraceEventType.Warning) Return "Sensor Malfunction Detected" Case 10 Return "Heartbeat Detected" Case Else Return "New or Unknown Message Detected" End Select End Function Function InsteonThermostatResponse(ByVal comm1 As Byte, ByVal comm2 As Byte, ByVal FromAddress As String) As String Select Case comm1 Case 106 ' TODO: Don't assume this info is temperature! It might not be! (But currently my code only requests it.) modDatabase.Execute("INSERT INTO ENVIRONMENT (Date, Source, Location, Temperature) VALUES('" + Now.ToUniversalTime.ToString("u") & "', 'Insteon " & FromAddress & "', 'Interior', " & CStr(Int(comm2 / 2)) & ")") If FromAddress = My.Settings.Insteon_ThermostatAddr Then My.Settings.Global_LastKnownInsideTemp = Int(comm2 / 2) My.Settings.Global_TimeThermostatLastUpdated = Now() ElseIf FromAddress = My.Settings.Insteon_ThermostatSlaveAddr Then My.Settings.Global_LastKnownInsideTemp2nd = Int(comm2 / 2) End If ' TODO: Probably should grab these temperature warnings from the second thermostat too someday. If My.Settings.Global_LastKnownInsideTemp >= My.Settings.Global_InsideTempHeatWarning Then My.Application.Log.WriteEntry("WARNING: Inside Temperature Heat Warning", TraceEventType.Warning) modMail.Send("Temperature Warning", "Last known inside temperature was " & My.Settings.Global_LastKnownInsideTemp & " F") End If If My.Settings.Global_LastKnownInsideTemp <= My.Settings.Global_InsideTempColdWarning Then My.Application.Log.WriteEntry("WARNING: Inside Temperature Cold Warning", TraceEventType.Warning) modMail.Send("Temperature Warning", "Last known inside temperature was " & My.Settings.Global_LastKnownInsideTemp & " F") End If Return "Temperature: " & Int(comm2 / 2) & " F" Case 110 modDatabase.Execute("INSERT INTO ENVIRONMENT (Date, Source, Location, Temperature) VALUES('" & Now.ToUniversalTime.ToString("u") & "', 'Insteon " & FromAddress & "', 'Interior', " & CStr(Int(comm2 / 2)) & ")") If FromAddress = My.Settings.Insteon_ThermostatAddr Then My.Settings.Global_LastKnownInsideTemp = Int(comm2 / 2) My.Settings.Global_TimeThermostatLastUpdated = Now() ElseIf FromAddress = My.Settings.Insteon_ThermostatSlaveAddr Then My.Settings.Global_LastKnownInsideTemp2nd = Int(comm2 / 2) End If Return "Temperature: " & CStr(Int(comm2 / 2)) & " F" Case 111 modDatabase.Execute("INSERT INTO ENVIRONMENT (Date, Source, Location, Humidity) VALUES('" & Now.ToUniversalTime.ToString("u") & "', 'Insteon " & FromAddress & "', 'Interior', " & CStr(comm2) & ")") Return "Humidity Level: " & comm2 & "%" Case 112 Select Case comm2 Case 0 Return "Mode: Off" Case 1 Return "Mode: Heat" Case 2 Return "Mode: Cool" Case 3 Return "Mode: Auto" Case 4 Return "Mode: Fan" Case 8 Return "Mode: Fan Always On" Case Else Return "Unrecognized" End Select Case 113 Return "Cool Set Point: " & comm2 & " F" Case 114 Return "Heat Set Point: " & comm2 & " F" Case Else Return "(" & Hex(comm1) & ") Unrecognized (" & Hex(comm2) & ")" End Select End Function Class HAInsteonDevice Inherits HADevice Public Property InsteonAddress As String Public Property EngineVer As Integer Public Property DevCat As Integer Public Property SubCat As Integer Public Property Firmware As Integer Public Sub Beep() 'Send beep command (not all devices can use it) End Sub Public Sub New(ByVal strAddress As String) 'Validate Insteon address meets 00:00:00 format or throw ArgumentException here Me.InsteonAddress = strAddress Me.DeviceUID = "insteon_" & strAddress End Sub Public Sub New(ByVal strInsteonAddress As String, ByVal intEngineVer As Integer, ByVal intDevCat As Integer, ByVal intSubCat As Integer, ByVal intFirmware As Integer) 'Validate Insteon address meets 00:00:00 format or throw ArgumentException here Me.InsteonAddress = strInsteonAddress Me.DeviceUID = "insteon_" & strInsteonAddress Me.EngineVer = intEngineVer Me.DevCat = intDevCat Me.SubCat = intSubCat Me.Firmware = intFirmware 'Do device lookup on DevCat and SubCat and assign Me.Model End Sub Public Sub RequestEngineVersion() 'Send get engine version command End Sub Public Sub RequestProductData() 'Send product data request command End Sub End Class 'Class HAInsteonAlarm ' Inherits HAInsteonDevice ' Public Property IsMuted As Boolean = False ' Public Sub Mute() ' Me.IsMuted = True ' End Sub ' Public Sub TurnOff() ' 'Send off command ' End Sub ' Public Sub TurnOn() ' 'Send on command ' End Sub ' Public Sub Unmute() ' Me.IsMuted = False ' End Sub 'End Class 'Class HAInsteonDimmer ' Inherits HAInsteonDevice ' Public Sub TurnOff() ' 'Send off command ' End Sub ' Public Sub TurnOn(Optional ByVal intBrightness As Integer = 255) ' 'Send on command ' End Sub 'End Class 'Class HAInsteonSwitch ' Inherits HAInsteonDevice ' Public Sub TurnOff() ' 'Send off command ' End Sub ' Public Sub TurnOn() ' 'Send on command ' End Sub 'End Class 'Class HAInsteonThermostat ' Inherits HAInsteonDevice ' Public Sub Auto() ' 'Send auto command ' End Sub ' Public Sub Cool() ' 'Send cool command ' End Sub ' Public Sub Down() ' 'Send down command ' End Sub ' Public Sub FanOff() ' 'Send fan off command ' End Sub ' Public Sub FanOn() ' 'Send fan on command ' End Sub ' Public Sub Heat() ' 'Send heat command ' End Sub ' Public Sub TurnOff() ' 'Send off command ' End Sub ' Public Sub Up() ' 'Send up command ' End Sub 'End Class End Module
ocdtrekkie/HAController
modInsteon.vb
Visual Basic
mit
107,096
#Region "License" ' The MIT License (MIT) ' ' Copyright (c) 2018 Richard L King (TradeWright Software Systems) ' ' Permission is hereby granted, free of charge, to any person obtaining a copy ' of this software and associated documentation files (the "Software"), to deal ' in the Software without restriction, including without limitation the rights ' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ' copies of the Software, and to permit persons to whom the Software is ' furnished to do so, subject to the following conditions: ' ' The above copyright notice and this permission notice shall be included in all ' copies or substantial portions of the Software. ' ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ' SOFTWARE. #End Region Friend Class RequestOpenOrdersGenerator Inherits GeneratorBase Implements IGenerator Private Delegate Sub ApiMethodDelegate() Private Const ModuleName As String = NameOf(RequestOpenOrdersGenerator) Friend Overrides ReadOnly Property GeneratorDelegate As [Delegate] Implements IGenerator.GeneratorDelegate Get Return New ApiMethodDelegate(AddressOf RequestOpenOrders) End Get End Property Friend Overrides ReadOnly Property MessageType As ApiSocketOutMsgType Get Return ApiSocketOutMsgType.RequestOpenOrders End Get End Property Private Sub RequestOpenOrders() Const VERSION As Integer = 1 If ConnectionState <> ApiConnectionState.Connected Then Throw New InvalidOperationException("Not connected") Dim lWriter = CreateOutputMessageGenerator() StartMessage(lWriter, ApiSocketOutMsgType.RequestOpenOrders) lWriter.AddInteger(VERSION, "Version") lWriter.SendMessage(_EventConsumers.SocketDataConsumer) End Sub End Class
tradewright/tradewright-twsapi
src/IBApi/Generators/RequestOpenOrdersGenerator.vb
Visual Basic
mit
2,258
Imports System.Text.RegularExpressions Public Class Syncer Private _SourceFolder As String = String.Empty Private _TargetFolder As String = String.Empty Private IsAnalyzed As Boolean = False Private SourceRegEx As Regex Private TargetRegEx As Regex Private DeletedEmptyDirectoryCount As Integer = 0 Private FileIndex As Integer = 0 Private FileCount As Integer = 0 Private CancelSync As Boolean = False Property SourceFolder As String Get Return _SourceFolder End Get Set(value As String) _SourceFolder = value IsAnalyzed = False End Set End Property Property TargetFolder As String Get Return _TargetFolder End Get Set(value As String) _TargetFolder = value IsAnalyzed = False End Set End Property Property NewFiles As New List(Of String) Property ChangedFiles As New List(Of String) Property DeletedFiles As New List(Of String) Property SameFiles As New List(Of String) Property Output As PS.ExeBase.Output.IOutputWriter = New PS.ExeBase.Output.DummyOutputWriter Property AnalysisUpdateInterval As Integer = 100 Property AnalysisFolderCount As Integer = 0 Property AnalysisFolderIndex As Integer = 0 ReadOnly Property HasChanges Get Return NewFiles.Count > 0 Or ChangedFiles.Count > 0 Or DeletedFiles.Count > 0 End Get End Property Public Sub Analyze() If IsAnalyzed = False Then Validate() NewFiles.Clear() ChangedFiles.Clear() DeletedFiles.Clear() SameFiles.Clear() SourceRegEx = New Regex(Regex.Escape(SourceFolder)) TargetRegEx = New Regex(Regex.Escape(TargetFolder)) AnalysisFolderCount = 0 AnalysisFolderIndex = 0 'get a count of the folders to analyze CountFolders(SourceFolder) CatalogFilesForChange(SourceFolder) CatalogFilesForDelete(TargetFolder) IsAnalyzed = True End If End Sub Public Sub Synchronize() CancelSync = False Analyze() FileIndex = 1 FileCount = NewFiles.Count + ChangedFiles.Count + DeletedFiles.Count If FileCount = 0 Then Output.WriteLine("There are no changes to synchronize") Exit Sub End If For Each f In NewFiles 'Threading.Thread.Sleep(2000) If CancelSync Then Output.WriteLine("Synchronization cancelled") Exit Sub End If CopyFileToTarget(f) Next For Each f In ChangedFiles 'Threading.Thread.Sleep(2000) If CancelSync Then Output.WriteLine("Synchronization cancelled") Exit Sub End If CopyFileToTarget(f) Next For Each f In DeletedFiles 'Threading.Thread.Sleep(2000) If CancelSync Then Output.WriteLine("Synchronization cancelled") Exit Sub End If DeleteFileFromTarget(f) Next DeleteEmptyDirectories() Output.WriteLine("Synchronization is complete") End Sub Public Sub Cancel() CancelSync = True End Sub Private Sub CatalogFilesForChange(Folder As String) AnalysisFolderIndex += 1 If AnalysisFolderIndex = 1 Then Output.WriteFormatLine("Analyzing folder 1 of {0}", AnalysisFolderCount) End If If AnalysisFolderIndex Mod AnalysisUpdateInterval = 0 Then Output.WriteFormatLine("Analyzing folder {0} of {1}", AnalysisFolderIndex, AnalysisFolderCount) End If For Each f In IO.Directory.GetFiles(Folder) Dim TargetFile As String = SourceRegEx.Replace(f, TargetFolder, 1) If IO.File.Exists(TargetFile) Then 'exists in both places. check size and modified date If AreFilesSame(f, TargetFile) Then SameFiles.Add(f) Else ChangedFiles.Add(f) End If Else NewFiles.Add(f) End If Next For Each f In IO.Directory.GetDirectories(Folder) CatalogFilesForChange(f) Next End Sub Private Sub CatalogFilesForDelete(Folder As String) For Each f In IO.Directory.GetFiles(Folder) Dim filepart As String = f.Replace(TargetFolder, "") Dim SourceFile As String = TargetRegEx.Replace(f, SourceFolder, 1) If IO.File.Exists(SourceFile) = False Then DeletedFiles.Add(f) End If Next For Each f In IO.Directory.GetDirectories(Folder) CatalogFilesForDelete(f) Next End Sub Private Sub CopyFileToTarget(SourceFile) Dim Directory As String = New IO.FileInfo(SourceFile).DirectoryName Directory = SourceRegEx.Replace(Directory, TargetFolder, 1) If IO.Directory.Exists(Directory) = False Then Output.WriteFormatLine("Creating directory: {0}", Directory) IO.Directory.CreateDirectory(Directory) End If Dim TargetFile As String = SourceRegEx.Replace(SourceFile, TargetFolder, 1) Output.WriteFormatLine("Copying file: {0} - ({1} of {2})", SourceFile, FileIndex, FileCount) Try IO.File.Delete(TargetFile) IO.File.Copy(SourceFile, TargetFile, True) Catch ex As Exception Output.WriteFormatLine("ERROR OCCURED:{0}{1}", vbCrLf, ex.ToString) End Try FileIndex += 1 End Sub Private Sub DeleteFileFromTarget(TargetFile) Output.WriteFormatLine("Deleting file: {0} - ({1} of {2})", TargetFile, FileIndex, FileCount) IO.File.Delete(TargetFile) FileIndex += 1 End Sub Private Sub DeleteEmptyDirectories() Dim StopDelete As Boolean = False While StopDelete = False DeletedEmptyDirectoryCount = 0 DeleteEmptyDirectories2(TargetFolder) If DeletedEmptyDirectoryCount = 0 Then StopDelete = True End If If CancelSync Then Output.WriteLine("Synchronization cancelled") Exit Sub End If End While End Sub Private Sub DeleteEmptyDirectories2(Folder As String) If CancelSync Then Output.WriteLine("Synchronization cancelled") Exit Sub End If If IO.Directory.GetFiles(Folder).Count = 0 AndAlso IO.Directory.GetDirectories(Folder).Count = 0 Then Output.WriteFormatLine("Deleting empty folder: {0}", Folder) IO.Directory.Delete(Folder) DeletedEmptyDirectoryCount += 1 Else For Each f In IO.Directory.GetDirectories(Folder) DeleteEmptyDirectories2(f) Next End If End Sub Private Sub Validate() If IO.Directory.Exists(SourceFolder) = False Then Throw New InvalidOperationException("A valid SourceFolder is required") End If If IO.Directory.Exists(TargetFolder) = False Then Throw New InvalidOperationException("A valid TargetFolder is required") End If End Sub Private Function AreFilesSame(File1 As String, File2 As String) As Boolean Dim Ret As Boolean = False 'If File1.Contains("PictureUploader.xml") Then ' Debug.Print("d") 'End If Dim f1 As New IO.FileInfo(File1) Dim f2 As New IO.FileInfo(File2) If f1.Length <> f2.Length OrElse (f1.LastWriteTime - f2.LastWriteTime).TotalMinutes > 1 Then Ret = False Else Ret = True End If Return Ret End Function Private Sub CountFolders(Folder) For Each f In IO.Directory.GetDirectories(Folder) AnalysisFolderCount += 1 CountFolders(f) Next End Sub End Class
jeffreypolk/folder-syncer
FolderSyncer/Syncer.vb
Visual Basic
mit
8,179
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Example07 Inherits System.Windows.Forms.UserControl 'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Wird vom Windows Form-Designer benötigt. Private components As System.ComponentModel.IContainer 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Example07)) Me.buttonQuitExample = New System.Windows.Forms.Button() Me.labelEventLogHeader = New System.Windows.Forms.Label() Me.textBoxEvents = New System.Windows.Forms.TextBox() Me.textBoxDescription = New System.Windows.Forms.TextBox() Me.buttonStartExample = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'buttonQuitExample ' Me.buttonQuitExample.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.buttonQuitExample.Enabled = False Me.buttonQuitExample.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.buttonQuitExample.Image = CType(resources.GetObject("buttonQuitExample.Image"), System.Drawing.Image) Me.buttonQuitExample.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.buttonQuitExample.Location = New System.Drawing.Point(36, 58) Me.buttonQuitExample.Name = "buttonQuitExample" Me.buttonQuitExample.Size = New System.Drawing.Size(665, 28) Me.buttonQuitExample.TabIndex = 36 Me.buttonQuitExample.Text = "Quit Outlook" Me.buttonQuitExample.UseVisualStyleBackColor = True ' 'labelEventLogHeader ' Me.labelEventLogHeader.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.labelEventLogHeader.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.labelEventLogHeader.Location = New System.Drawing.Point(36, 180) Me.labelEventLogHeader.Name = "labelEventLogHeader" Me.labelEventLogHeader.Size = New System.Drawing.Size(665, 22) Me.labelEventLogHeader.TabIndex = 35 Me.labelEventLogHeader.Text = "EventLog" ' 'textBoxEvents ' Me.textBoxEvents.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.textBoxEvents.BackColor = System.Drawing.SystemColors.InactiveBorder Me.textBoxEvents.Location = New System.Drawing.Point(36, 205) Me.textBoxEvents.Multiline = True Me.textBoxEvents.Name = "textBoxEvents" Me.textBoxEvents.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.textBoxEvents.Size = New System.Drawing.Size(665, 80) Me.textBoxEvents.TabIndex = 34 ' 'textBoxDescription ' Me.textBoxDescription.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.textBoxDescription.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.textBoxDescription.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.textBoxDescription.Location = New System.Drawing.Point(36, 94) Me.textBoxDescription.Multiline = True Me.textBoxDescription.Name = "textBoxDescription" Me.textBoxDescription.Size = New System.Drawing.Size(665, 67) Me.textBoxDescription.TabIndex = 33 Me.textBoxDescription.Text = resources.GetString("textBoxDescription.Text") ' 'buttonStartExample ' Me.buttonStartExample.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.buttonStartExample.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.buttonStartExample.Image = CType(resources.GetObject("buttonStartExample.Image"), System.Drawing.Image) Me.buttonStartExample.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.buttonStartExample.Location = New System.Drawing.Point(36, 22) Me.buttonStartExample.Name = "buttonStartExample" Me.buttonStartExample.Size = New System.Drawing.Size(665, 30) Me.buttonStartExample.TabIndex = 32 Me.buttonStartExample.Text = "Start Outlook" Me.buttonStartExample.UseVisualStyleBackColor = True ' 'Example07 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Controls.Add(Me.buttonQuitExample) Me.Controls.Add(Me.labelEventLogHeader) Me.Controls.Add(Me.textBoxEvents) Me.Controls.Add(Me.textBoxDescription) Me.Controls.Add(Me.buttonStartExample) Me.Name = "Example07" Me.Size = New System.Drawing.Size(739, 304) Me.ResumeLayout(False) Me.PerformLayout() End Sub Private WithEvents buttonQuitExample As System.Windows.Forms.Button Private WithEvents labelEventLogHeader As System.Windows.Forms.Label Private WithEvents textBoxEvents As System.Windows.Forms.TextBox Private WithEvents textBoxDescription As System.Windows.Forms.TextBox Private WithEvents buttonStartExample As System.Windows.Forms.Button End Class
NetOfficeFw/NetOffice
Examples/Outlook/VB/Standard Examples/OutlookExamples/Examples/Example07.Designer.vb
Visual Basic
mit
6,805
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18444 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default]() As MySettings Get #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject If Not addedHandler Then AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings addedHandler = True End If End SyncLock End If #End If Return defaultInstance End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.NHunspellExtender.My.MySettings Get Return Global.NHunspellExtender.My.MySettings.Default End Get End Property End Module End Namespace
cixonline/cixreader
NHunspellExtender/My Project/Settings.Designer.vb
Visual Basic
apache-2.0
2,924
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Threading.Tasks Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.VisualBasic.CodeFixes.IncorrectExitContinue Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics.ExitContinue Public Class ExitContinueCodeActionTests Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, CodeFixProvider) Return New Tuple(Of DiagnosticAnalyzer, CodeFixProvider)( Nothing, New IncorrectExitContinueCodeFixProvider()) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKind_Sub() As Task Dim code = <File> Class C Sub foo() [|Exit|] End Sub End Class </File> Dim expected = <File> Class C Sub foo() Exit Sub End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKind_While() As Task Dim code = <File> Class C Sub foo() While True [|Exit|] End While End Sub End Class </File> Dim expected = <File> Class C Sub foo() While True Exit While End While End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKind_For() As Task Dim code = <File> Class C Sub foo() For x as Integer = 1 to 10 [|Exit|] Next End Sub End Class </File> Dim expected = <File> Class C Sub foo() For x as Integer = 1 to 10 Exit For Next End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKind_Do() As Task Dim code = <File> Class C Sub foo() Do While True [|Exit|] Loop End Sub End Class </File> Dim expected = <File> Class C Sub foo() Do While True Exit Do Loop End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitPropNot() As Task Dim code = <File> Class C Property P as Integer Get [|Exit|] End Get Set End Set End Property Exit Class </File> Dim expected = <File> Class C Property P as Integer Get Exit Property End Get Set End Set End Property Exit Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKind_Try() As Task Dim code = <File> Class C Sub Foo() Try [|Exit|] Catch ex As Exception End Try End Sub End Class </File> Dim expected = <File> Class C Sub Foo() Try Exit Try Catch ex As Exception End Try End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKind_Function() As Task Dim code = <File> Class C Function x() as Integer [|Exit|] End Function End Class </File> Dim expected = <File> Class C Function x() as Integer Exit Function End Function End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitSubOfFunc() As Task Dim code = <File> Class C Function x() as Integer [|Exit Sub|] End Function End Class </File> Dim expected = <File> Class C Function x() as Integer Exit Function End Function End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitFuncOfSub() As Task Dim code = <File> Class C Sub Foo() [|Exit Function|] End Sub End Class </File> Dim expected = <File> Class C Sub Foo() Exit Sub End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitDoNotWithinDo() As Task Dim code = <File> Class C Sub Foo() While True [|Exit Do|] End While End Sub End Class </File> Dim expected = <File> Class C Sub Foo() While True Exit While End While End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitDoNotWithinDo_For() As Task Dim code = <File> Class C Sub Foo() For x as Integer = 1 to 10 [|Exit Do|] Next End Sub End Class </File> Dim expected = <File> Class C Sub Foo() For x as Integer = 1 to 10 Exit For Next End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False, index:=0) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitWhileNotWithinWhile() As Task Dim code = <File> Class C Sub Foo() Do While True [|Exit While|] Loop End Sub End Class </File> Dim expected = <File> Class C Sub Foo() Do While True Exit Do Loop End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitDoNotWithinDo_Try() As Task Dim code = <File> Imports System Class C Sub Foo() Try [|Exit Do|] Catch ex As Exception End Try End Sub End Class </File> Dim expected = <File> Imports System Class C Sub Foo() Try Exit Try Catch ex As Exception End Try End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitTryNotWithinTry() As Task Dim code = <File> Class C Sub Foo [|Exit Try|] End Sub End Class </File> Dim expected = <File> Class C Sub Foo Exit Sub End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExitChangeToSelect() As Task Dim code = <File> Class C Sub Foo() Dim i as Integer = 0 Select Case i Case 0 [|Exit Do|] End Select End Sub End Class </File> Dim expected = <File> Class C Sub Foo() Dim i as Integer = 0 Select Case i Case 0 Exit Select End Select End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestContinueDoNotWithinDo() As Task Dim code = <File> Class C Sub Foo() Dim i as Integer = 0 Select Case i Case 0 [|Continue Do|] End Select End Sub End Class </File> Dim expected = <File> Class C Sub Foo() Dim i as Integer = 0 Select Case i Case 0 End Select End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestContinueForNotWithinFor() As Task Dim code = <File> Class C Sub Foo Dim i as Integer = 0 Select Case i Case 0 [|Continue For|] End Select End Sub End Class </File> Dim expected = <File> Class C Sub Foo Dim i as Integer = 0 Select Case i Case 0 End Select End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestContinueWhileNotWithinWhile() As Task Dim code = <File> Class C Sub Foo() Dim i as Integer = 0 Select Case i Case 0 [|Continue While|] End Select End Sub End Class </File> Dim expected = <File> Class C Sub Foo() Dim i as Integer = 0 Select Case i Case 0 End Select End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedContinueKindWhile() As Task Dim code = <File> Class C Sub Foo() While True [|Continue|] End While End Sub End Class </File> Dim expected = <File> Class C Sub Foo() While True Continue While End While End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedContinueKindFor() As Task Dim code = <File> Class C Sub Foo For x as integer = 1 to 10 [|Continue|] Next End Sub End Class </File> Dim expected = <File> Class C Sub Foo For x as integer = 1 to 10 Continue For Next End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedContinueKindForEach() As Task Dim code = <File> Class C Sub Foo For Each x in {1} [|Continue|] Next End Sub End Class </File> Dim expected = <File> Class C Sub Foo For Each x in {1} Continue For Next End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedContinueKindDo() As Task Dim code = <File> Class C Sub Foo Do While True [|Continue|] Loop End Sub End Class </File> Dim expected = <File> Class C Sub Foo Do While True Continue Do Loop End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedContinueKindDo_ReplaceFor() As Task Dim code = <File> Class C Sub Foo Do While True [|Continue For|] Loop End Sub End Class </File> Dim expected = <File> Class C Sub Foo Do While True Continue Do Loop End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedExitKindDo_UseSub() As Task Dim code = <File> Class C Sub Foo Do While True [|Exit|] Loop End Sub End Class </File> Dim expected = <File> Class C Sub Foo Do While True Exit Sub Loop End Sub End Class </File> Await TestAsync(code, expected, compareTokens:=False, index:=1) End Function <WorkItem(547094)> <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestDoNotTryToExitFinally() As Task Dim code = <File> Imports System Class C Function Foo() As Integer Try Catch ex As Exception Finally [|Exit|] End Try End Function End Class </File> Dim expected = <File> Imports System Class C Function Foo() As Integer Try Catch ex As Exception Finally End Try End Function End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <WorkItem(547110)> <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestMissingExitTokenInNonExitableBlock() As Task Dim code = <File> Imports System Class C Function Foo() As Integer Try If True Then [|Exit|] End If Catch ex As Exception Finally End Try End Function End Class </File> Dim expected = <File> Imports System Class C Function Foo() As Integer Try If True Then Exit Try End If Catch ex As Exception Finally End Try End Function End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <WorkItem(547100)> <Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestNotInValidCaseElse() As Task Await TestMissingAsync( NewLines("Imports System \n Imports System.Collections.Generic \n Imports System.Linq \n Module Program \n Sub Main(args As String()) \n For Each a In args \n Select a \n Case Else \n [|Exit Select|] ' here \n End Select \n Next \n End Sub \n End Module")) End Function <WorkItem(547099)> <Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestCollapseDuplicateBlockKinds() As Task Await TestActionCountAsync( NewLines("Imports System \n Imports System.Collections.Generic \n Imports System.Linq \n Module Program \n Sub Main(args As String()) \n Do \n Do While True \n [|Exit Function|] ' here \n Loop \n Loop \n End Sub \n End Module"), 3) End Function <WorkItem(547092)> <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestReplaceInvalidTokenExit() As Task Dim code = <File> Imports System Class C Function Foo() As Integer Try If True Then [|Exit |]blah End If Catch ex As Exception Finally End Try End Function End Class </File> Dim expected = <File> Imports System Class C Function Foo() As Integer Try If True Then Exit Try End If Catch ex As Exception Finally End Try End Function End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <WorkItem(547092)> <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestReplaceInvalidTokenContinue() As Task Dim code = <File> Imports System Class C Function Foo() As Integer Do [|Continue |]blah Loop End Function End Class </File> Dim expected = <File> Imports System Class C Function Foo() As Integer Do Continue Do Loop End Function End Class </File> Await TestAsync(code, expected, compareTokens:=False) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedActionDescriptions1() As Task Dim code = <File> Class C Sub foo() [|Exit Function|] End Sub End Class </File> Await TestExactActionSetOfferedAsync(code.ConvertTestSourceTag(), {String.Format(FeaturesResources.ChangeTo, "Function", "Sub"), String.Format(VBFeaturesResources.DeleteTheStatement, "Exit Function")}) End Function <WorkItem(531354)> <Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsCorrectExitContinue)> Public Async Function TestExpectedActionDescriptions2() As Task Dim code = <File> Class C Sub foo() [|Exit |] End Sub End Class </File> Await TestExactActionSetOfferedAsync(code.ConvertTestSourceTag(), {String.Format(VBFeaturesResources.Insert, "Sub"), String.Format(VBFeaturesResources.DeleteTheStatement, "Exit")}) End Function End Class End Namespace
HellBrick/roslyn
src/EditorFeatures/VisualBasicTest/Diagnostics/ExitContinue/ExitContinueCodeActionTests.vb
Visual Basic
apache-2.0
19,037
Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("BoardCardReader")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("BoardCardReader")> <Assembly: AssemblyCopyright("Copyright © 2018")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("873646b3-e712-43d8-ab84-a3c1ef3f04a6")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
Cayan-LLC/developer-docs
examples/merchantware/Credit/vb/BoardCardReader/BoardCardReader/My Project/AssemblyInfo.vb
Visual Basic
apache-2.0
1,135
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Composition Imports System.Linq Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.VisualBasic Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Roslyn.Diagnostics.Analyzers ''' <summary> ''' RS0024: The contents of the public API files are invalid ''' </summary> <ExportCodeFixProvider(LanguageNames.VisualBasic), [Shared]> Public NotInheritable Class BasicTheContentsOfThePublicAPIFilesAreInvalidFixer Inherits TheContentsOfThePublicAPIFilesAreInvalidFixer End Class End Namespace
mattwar/roslyn-analyzers
src/Roslyn.Diagnostics.Analyzers/VisualBasic/BasicTheContentsOfThePublicAPIFilesAreInvalid.Fixer.vb
Visual Basic
apache-2.0
761
Imports System.Windows.Forms Imports Microsoft.VisualStudio.TestTools.UITesting.Keyboard Imports System.Runtime.Remoting Imports System.Runtime.Remoting.Channels Imports System.Runtime.Remoting.Channels.Tcp Imports System Imports System.CodeDom.Compiler Imports System.Configuration Imports System.Collections.Generic Imports System.Drawing Imports System.Text.RegularExpressions Imports System.IO Imports System.Windows.Input Imports Microsoft.VisualStudio.TestTools.UITest.Extension Imports Microsoft.VisualStudio.TestTools.UITesting Imports Microsoft.VisualStudio.TestTools.UITesting.WinControls Imports Microsoft.VisualStudio.TestTools.UnitTesting Imports Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard Imports Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse Imports MouseButtons = System.Windows.Forms.MouseButtons Imports AnimatTesting.Framework Imports System.Xml Namespace UITests Namespace ConversionTests Namespace BodyPartTests Namespace RigidBodyTests <CodedUITest()> Public Class StretchReceptorConversionUITest Inherits MuscleBaseConversionUITest #Region "Attributes" #End Region #Region "Properties" #End Region #Region "Methods" <TestMethod(), _ DataSource("System.Data.OleDb", _ "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=TestCases.accdb;Persist Security Info=False;", _ "PhysicsEngines", _ DataAccessMethod.Sequential), _ DeploymentItem("TestCases.accdb")> Public Sub Test_StretchReceptor() If Not SetPhysicsEngine(TestContext.DataRow) Then Return m_strProjectName = "StretchReceptorTest" MuscleTest() End Sub Protected Overrides Sub SpindleTest(ByVal aryMaxErrors As Hashtable) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Body Plan\Base\Joint_1\Arm\Muscle2", "IaDischargeConstant", "200 "}) RunSimulationWaitToEnd() CompareSimulation(m_strRootFolder & m_strTestDataPath, aryMaxErrors, "1A_200_") ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Body Plan\Base\Joint_1\Arm\Muscle2", "IaDischargeConstant", "100 "}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Body Plan\Base\Joint_1\Arm\Muscle2", "IbDischargeConstant", "200 "}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Behavioral System\Neural Subsystem\S2\B_A", "Gain.C", "0.01 n"}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Behavioral System\Neural Subsystem\S2\B_A", "SourceDataTypes", "AnimatGUI.DataObjects.Physical.Bodies.LinearHillStretchReceptor.DataTypes.Ib"}) RunSimulationWaitToEnd() CompareSimulation(m_strRootFolder & m_strTestDataPath, aryMaxErrors, "1B_200_") ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Body Plan\Base\Joint_1\Arm\Muscle2", "IbDischargeConstant", "100 "}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Body Plan\Base\Joint_1\Arm\Muscle2", "IIDischargeConstant", "200 "}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Stimuli\Stretch", "EndTime", "5.125"}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Behavioral System\Neural Subsystem\S2\B_A", "SourceDataTypes", "AnimatGUI.DataObjects.Physical.Bodies.LinearHillStretchReceptor.DataTypes.II"}) RunSimulationWaitToEnd() CompareSimulation(m_strRootFolder & m_strTestDataPath, aryMaxErrors, "II_200_") ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Body Plan\Base\Joint_1\Arm\Muscle2", "IIDischargeConstant", "100 "}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Stimuli\Stretch", "EndTime", "5.025"}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Behavioral System\Neural Subsystem\S2\B_A", "SourceDataTypes", "AnimatGUI.DataObjects.Physical.Bodies.LinearHillStretchReceptor.DataTypes.Ia"}) ExecuteIndirectMethod("SetObjectProperty", New Object() {"Simulation\Environment\Organisms\Organism_1\Behavioral System\Neural Subsystem\S2\B_A", "Gain.C", "1 n"}) End Sub #Region "Additional test attributes" ' ' You can use the following additional attributes as you write your tests: ' ' Use TestInitialize to run code before running each test <TestInitialize()> Public Overrides Sub MyTestInitialize() MyBase.MyTestInitialize() 'This test compares data to that generated from the old version. We never re-generate the data in V2, so this should always be false 'regardless of the setting in app.config. m_bGenerateTempates = False End Sub <TestCleanup()> Public Overrides Sub MyTestCleanup() MyBase.MyTestCleanup() End Sub #End Region #End Region End Class End Namespace End Namespace End Namespace End Namespace
NeuroRoboticTech/AnimatLabTesting
AnimatTesting/UITests/ConversionTests/BodyPartTests/RigidBodyTests/StretchReceptorConversionUITest.vb
Visual Basic
bsd-3-clause
6,075
#ExternalChecksum("..\..\..\Controls\CurrentWeatherControl.xaml","{406ea660-64cf-4c82-b6f0-42d48172a799}","149D7556B7AAD763F680F11925137D42") '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.42000 ' ' 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 OpenWeather Imports System Imports System.Diagnostics Imports System.Windows Imports System.Windows.Automation Imports System.Windows.Controls Imports System.Windows.Controls.Primitives Imports System.Windows.Data Imports System.Windows.Documents Imports System.Windows.Ink Imports System.Windows.Input Imports System.Windows.Markup Imports System.Windows.Media Imports System.Windows.Media.Animation Imports System.Windows.Media.Effects Imports System.Windows.Media.Imaging Imports System.Windows.Media.Media3D Imports System.Windows.Media.TextFormatting Imports System.Windows.Navigation Imports System.Windows.Shapes Imports System.Windows.Shell '''<summary> '''CurrentWeatherControl '''</summary> <Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Public Class CurrentWeatherControl Inherits System.Windows.Controls.UserControl Implements System.Windows.Markup.IComponentConnector Private _contentLoaded As Boolean '''<summary> '''InitializeComponent '''</summary> <System.Diagnostics.DebuggerNonUserCodeAttribute(), _ System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")> _ Public Sub InitializeComponent() Implements System.Windows.Markup.IComponentConnector.InitializeComponent If _contentLoaded Then Return End If _contentLoaded = true Dim resourceLocater As System.Uri = New System.Uri("/OpenWeather;component/controls/currentweathercontrol.xaml", System.UriKind.Relative) #ExternalSource("..\..\..\Controls\CurrentWeatherControl.xaml",1) System.Windows.Application.LoadComponent(Me, resourceLocater) #End ExternalSource End Sub <System.Diagnostics.DebuggerNonUserCodeAttribute(), _ System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0"), _ System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never), _ System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes"), _ System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity"), _ System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")> _ Sub System_Windows_Markup_IComponentConnector_Connect(ByVal connectionId As Integer, ByVal target As Object) Implements System.Windows.Markup.IComponentConnector.Connect Me._contentLoaded = true End Sub End Class
MeshackMusundi/OpenWeather
OpenWeather/obj/Debug/Controls/CurrentWeatherControl.g.vb
Visual Basic
mit
3,198
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.Completion Imports Microsoft.CodeAnalysis.Editor.UnitTests.Completion Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces Imports Microsoft.CodeAnalysis.Text Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion.CompletionProviders Public MustInherit Class AbstractVisualBasicCompletionProviderTests Inherits AbstractCompletionProviderTests(Of VisualBasicTestWorkspaceFixture) Public Sub New(workspaceFixture As VisualBasicTestWorkspaceFixture) MyBase.New(workspaceFixture) End Sub Protected Overrides Async Function VerifyWorkerAsync(code As String, position As Integer, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, experimental As Boolean, glyph As Integer?) As Threading.Tasks.Task ' Script/interactive support removed for now. ' TODO: Re-enable these when interactive is back in the product. If sourceCodeKind <> Microsoft.CodeAnalysis.SourceCodeKind.Regular Then Return End If Await VerifyAtPositionAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph, experimental) Await VerifyAtEndOfFileAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph, experimental) ' Items cannot be partially written if we're checking for their absence, ' or if we're verifying that the list will show up (without specifying an actual item) If Not checkForAbsence AndAlso expectedItemOrNull <> Nothing Then Await VerifyAtPosition_ItemPartiallyWrittenAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph, experimental) Await VerifyAtEndOfFile_ItemPartiallyWrittenAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph, experimental) End If End Function Protected Overridable Async Function BaseVerifyWorkerAsync(code As String, position As Integer, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task Await MyBase.VerifyWorkerAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, experimental:=experimental, glyph:=glyph) End Function Protected Overrides Async Function VerifyCustomCommitProviderWorkerAsync(codeBeforeCommit As String, position As Integer, itemToCommit As String, expectedCodeAfterCommit As String, sourceCodeKind As SourceCodeKind, Optional commitChar As Char? = Nothing) As Threading.Tasks.Task ' Script/interactive support removed for now. ' TODO: Re-enable these when interactive is back in the product. If sourceCodeKind <> Microsoft.CodeAnalysis.SourceCodeKind.Regular Then Return End If Await MyBase.VerifyCustomCommitProviderWorkerAsync(codeBeforeCommit, position, itemToCommit, expectedCodeAfterCommit, sourceCodeKind, commitChar) End Function Private Function VerifyAtPositionAsync(code As String, position As Integer, insertText As String, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task code = code.Substring(0, position) & insertText & code.Substring(position) position += insertText.Length Return MyBase.VerifyWorkerAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, experimental:=experimental, glyph:=glyph) End Function Protected Function VerifyAtPositionAsync(code As String, position As Integer, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task Return VerifyAtPositionAsync(code, position, String.Empty, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph:=glyph, experimental:=experimental) End Function Private Function VerifyAtPosition_ItemPartiallyWrittenAsync(code As String, position As Integer, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task Return VerifyAtPositionAsync(code, position, ItemPartiallyWritten(expectedItemOrNull), expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph:=glyph, experimental:=experimental) End Function Private Async Function VerifyAtEndOfFileAsync(code As String, position As Integer, insertText As String, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task ' only do this if the placeholder was at the end of the text. If code.Length <> position Then Return End If code = code.Substring(startIndex:=0, length:=position) & insertText position += insertText.Length Await MyBase.VerifyWorkerAsync(code, position, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, experimental:=experimental, glyph:=glyph) End Function Private Function VerifyAtEndOfFileAsync(code As String, position As Integer, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task Return VerifyAtEndOfFileAsync(code, position, String.Empty, expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph, experimental) End Function Private Function VerifyAtEndOfFile_ItemPartiallyWrittenAsync(code As String, position As Integer, expectedItemOrNull As String, expectedDescriptionOrNull As String, sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, checkForAbsence As Boolean, glyph As Integer?, experimental As Boolean) As Threading.Tasks.Task Return VerifyAtEndOfFileAsync(code, position, ItemPartiallyWritten(expectedItemOrNull), expectedItemOrNull, expectedDescriptionOrNull, sourceCodeKind, usePreviousCharAsTrigger, checkForAbsence, glyph, experimental) End Function Private Shared Function ItemPartiallyWritten(expectedItemOrNull As String) As String If expectedItemOrNull(0) = "[" Then Return expectedItemOrNull.Substring(1, 1) End If Return expectedItemOrNull.Substring(0, 1) End Function Protected Function AddInsideMethod(text As String) As String Return "Class C" & vbCrLf & " Function F()" & vbCrLf & " " & text & vbCrLf & " End Function" & vbCrLf & "End Class" End Function Protected Function CreateContent(ParamArray contents As String()) As String Return String.Join(vbCrLf, contents) End Function Protected Function AddImportsStatement(importsStatement As String, text As String) As String Return importsStatement & vbCrLf & vbCrLf & text End Function Protected Async Function VerifySendEnterThroughToEditorAsync(initialMarkup As String, textTypedSoFar As String, expected As Boolean) As Threading.Tasks.Task Using workspace = Await VisualBasicWorkspaceFactory.CreateWorkspaceFromFileAsync(initialMarkup) Dim hostDocument = workspace.DocumentWithCursor Dim documentId = workspace.GetDocumentId(hostDocument) Dim document = workspace.CurrentSolution.GetDocument(documentId) Dim position = hostDocument.CursorPosition.Value Dim completionList = GetCompletionList(document, position, CompletionTriggerInfo.CreateInvokeCompletionTriggerInfo()) Dim item = completionList.Items.First(Function(i) i.DisplayText.StartsWith(textTypedSoFar)) Dim completionService = document.Project.LanguageServices.GetService(Of ICompletionService)() Dim completionRules = completionService.GetCompletionRules() Assert.Equal(expected, completionRules.SendEnterThroughToEditor(item, textTypedSoFar, workspace.Options)) End Using End Function Protected Async Function VerifyCommonCommitCharactersAsync(initialMarkup As String, textTypedSoFar As String) As Threading.Tasks.Task Dim commitCharacters = {" "c, ";"c, "("c, ")"c, "["c, "]"c, "{"c, "}"c, "."c, ","c, ":"c, "+"c, "-"c, "*"c, "/"c, "\"c, "^"c, "<"c, ">"c, "'"c, "="c} Await VerifyCommitCharactersAsync(initialMarkup, textTypedSoFar, commitCharacters) End Function Protected Async Function VerifyCommitCharactersAsync(initialMarkup As String, textTypedSoFar As String, ParamArray chars As Char()) As Threading.Tasks.Task Using workspace = Await VisualBasicWorkspaceFactory.CreateWorkspaceFromFileAsync(initialMarkup) Dim hostDocument = workspace.DocumentWithCursor Dim documentId = workspace.GetDocumentId(hostDocument) Dim document = workspace.CurrentSolution.GetDocument(documentId) Dim position = hostDocument.CursorPosition.Value Dim completionList = GetCompletionList(document, position, CompletionTriggerInfo.CreateInvokeCompletionTriggerInfo()) Dim item = completionList.Items.First() Dim completionService = document.Project.LanguageServices.GetService(Of ICompletionService)() Dim completionRules = completionService.GetCompletionRules() For Each ch In chars Assert.True(completionRules.IsCommitCharacter(item, ch, textTypedSoFar), $"Expected '{ch}' to be a commit character") Next Dim chr = "x"c Assert.False(completionRules.IsCommitCharacter(item, chr, textTypedSoFar), $"Expected '{chr}' NOT to be a commit character") End Using End Function Protected Async Function TestCommonIsTextualTriggerCharacterAsync() As Threading.Tasks.Task Dim alwaysTriggerList = { "foo$$.", "foo$$[", "foo$$#", "foo$$ ", "foo$$=" } For Each markup In alwaysTriggerList Await VerifyTextualTriggerCharacterAsync(markup, shouldTriggerWithTriggerOnLettersEnabled:=True, shouldTriggerWithTriggerOnLettersDisabled:=True) Next Dim triggerOnlyWithLettersList = { "$$a", "$$_" } For Each markup In triggerOnlyWithLettersList Await VerifyTextualTriggerCharacterAsync(markup, shouldTriggerWithTriggerOnLettersEnabled:=True, shouldTriggerWithTriggerOnLettersDisabled:=False) Next Dim neverTriggerList = { "foo$$x", "foo$$_" } For Each markup In neverTriggerList Await VerifyTextualTriggerCharacterAsync(markup, shouldTriggerWithTriggerOnLettersEnabled:=False, shouldTriggerWithTriggerOnLettersDisabled:=False) Next End Function Protected Async Function VerifyTextualTriggerCharacterAsync(markup As String, shouldTriggerWithTriggerOnLettersEnabled As Boolean, shouldTriggerWithTriggerOnLettersDisabled As Boolean) As Threading.Tasks.Task Await VerifyTextualTriggerCharacterWorkerAsync(markup, expectedTriggerCharacter:=shouldTriggerWithTriggerOnLettersEnabled, triggerOnLetter:=True) Await VerifyTextualTriggerCharacterWorkerAsync(markup, expectedTriggerCharacter:=shouldTriggerWithTriggerOnLettersDisabled, triggerOnLetter:=False) End Function Private Async Function VerifyTextualTriggerCharacterWorkerAsync(markup As String, expectedTriggerCharacter As Boolean, triggerOnLetter As Boolean) As Threading.Tasks.Task Dim code As String = Nothing Dim position As Integer MarkupTestFile.GetPosition(markup, code, position) Using workspace = Await VisualBasicWorkspaceFactory.CreateWorkspaceFromFileAsync(code) Dim document = workspace.Documents.First() Dim text = document.TextBuffer.CurrentSnapshot.AsText() Dim options = workspace.Options.WithChangedOption(CompletionOptions.TriggerOnTypingLetters, LanguageNames.VisualBasic, triggerOnLetter) Dim isTextualTriggerCharacterResult = CompletionProvider.IsTriggerCharacter(text, position, options) If expectedTriggerCharacter Then Dim assertText = "'" & text.ToString(New TextSpan(position, 1)) & "' expected to be textual trigger character" Assert.True(isTextualTriggerCharacterResult, assertText) Else Dim assertText = "'" & text.ToString(New TextSpan(position, 1)) & "' expected to NOT be textual trigger character" Assert.False(isTextualTriggerCharacterResult, assertText) End If End Using End Function Protected Overrides Function CreateExperimentalParseOptions(parseOptions As ParseOptions) As ParseOptions ' There are no experimental parse options at this time. Return parseOptions End Function End Class End Namespace
mseamari/Stuff
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/AbstractVisualBasicCompletionProviderTests.vb
Visual Basic
apache-2.0
14,918
'*******************************************************************************************' ' ' ' Download Free Evaluation Version From: https://bytescout.com/download/web-installer ' ' ' ' Also available as Web API! Get free API Key https://app.pdf.co/signup ' ' ' ' Copyright © 2017-2020 ByteScout, Inc. All rights reserved. ' ' https://www.bytescout.com ' ' https://www.pdf.co ' '*******************************************************************************************' Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("MakeSearchablePDF")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("MakeSearchablePDF")> <Assembly: AssemblyCopyright("Copyright © 2015")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("55a79405-7fb0-423a-9536-90acf217d3dc")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
bytescout/ByteScout-SDK-SourceCode
Premium Suite/VB.NET/Make searchable pdf with pdf extractor sdk/My Project/AssemblyInfo.vb
Visual Basic
apache-2.0
2,127
Imports SistFoncreagro.BussinessEntities Imports System.Data.SqlClient Imports System.Data Public Class ActivarPresupuestoRepository : Inherits MasterDataAccess : Implements IActivarPresupuestoRepository Private Function SelectObjectFactory(ByVal command As SqlCommand) As List(Of ActivarPresupuesto) Dim lista As New List(Of ActivarPresupuesto) Using reader As SqlDataReader = MyBase.ExecuteReader(command) While reader.Read Dim _ActivarPresupuesto As New ActivarPresupuesto() With { .IdActPresup = reader.GetValue(reader.GetOrdinal("IdActPresup")) } If Not (reader.IsDBNull(reader.GetOrdinal("Activar"))) Then _ActivarPresupuesto.Activar = reader.GetValue(reader.GetOrdinal("Activar")) End If If Not (reader.IsDBNull(reader.GetOrdinal("IdEjerPresup"))) Then _ActivarPresupuesto.IdEjerPresup = reader.GetValue(reader.GetOrdinal("IdEjerPresup")) End If If Not (reader.IsDBNull(reader.GetOrdinal("IdProyecto"))) Then _ActivarPresupuesto.IdProyecto = reader.GetValue(reader.GetOrdinal("IdProyecto")) End If Dim _miProyecto As New ProyectoRepository _ActivarPresupuesto._Proyecto = _miProyecto.GetFromProyectoByIdProyecto(_ActivarPresupuesto.IdProyecto) lista.Add(_ActivarPresupuesto) End While End Using Return lista End Function Public Function GetACTIVARPRESUPByIdEjerPresup(ByVal _IdEjerPresup As Integer) As System.Collections.Generic.List(Of BussinessEntities.ActivarPresupuesto) Implements IActivarPresupuestoRepository.GetACTIVARPRESUPByIdEjerPresup Dim command As SqlCommand = MyBase.CreateSPCommand("GetACTIVARPRESUPByIdEjerPresup") command.Parameters.AddWithValue("IdEjerPresup", _IdEjerPresup) Return SelectObjectFactory(command) End Function Public Sub NueActivarPresup(ByVal _IdEjerPresup As Integer) Implements IActivarPresupuestoRepository.NueActivarPresup Dim command As SqlCommand = MyBase.CreateSPCommand("NueActivarPresup") command.Parameters.AddWithValue("IdEjerPresup", _IdEjerPresup) MyBase.ExecuteNonQuery(command) End Sub Public Sub UpdateActivarPresup(ByVal _ActivarPresup As BussinessEntities.ActivarPresupuesto) Implements IActivarPresupuestoRepository.UpdateActivarPresup Dim command As SqlCommand = MyBase.CreateSPCommand("UpdateACTIVARPRESUPUESTO") command.Parameters.AddWithValue("IdActPresup", _ActivarPresup.IdActPresup) command.Parameters.AddWithValue("Activar", _ActivarPresup.Activar) MyBase.ExecuteNonQuery(command) End Sub Public Sub UpdateActivarPresup1(ByVal _ActivarPresup As System.Collections.Generic.List(Of BussinessEntities.ActivarPresupuesto)) Implements IActivarPresupuestoRepository.UpdateActivarPresup1 For Each det As ActivarPresupuesto In _ActivarPresup UpdateActivarPresup(det) Next End Sub Public Function GetACTIVARPRESUPByIdProyAndIdEjerPresup(ByVal _IdEjerPresup As Integer, ByVal _IdProyecto As Integer) As BussinessEntities.ActivarPresupuesto Implements IActivarPresupuestoRepository.GetACTIVARPRESUPByIdProyAndIdEjerPresup Dim command As SqlCommand = MyBase.CreateSPCommand("GetACTIVARPRESUPByIdProyAndIdEjerPresup") command.Parameters.AddWithValue("IdEjerPresup", _IdEjerPresup) command.Parameters.AddWithValue("IdProyecto", _IdProyecto) Return SelectObjectFactory(command).SingleOrDefault End Function End Class
crackper/SistFoncreagro
SistFoncreagro.DataAccess/ActivarPresupuestoRepository.vb
Visual Basic
mit
3,715
'------------------------------------------------------------------------------ ' <auto-generated> ' Este código fue generado por una herramienta. ' Versión de runtime:4.0.30319.225 ' ' Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si ' se vuelve a generar el código. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Imports System Namespace My.Resources 'StronglyTypedResourceBuilder generó automáticamente esta clase 'a través de una herramienta como ResGen o Visual Studio. 'Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen 'con la opción /str o vuelva a generar su proyecto de VS. '''<summary> ''' Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc. '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ArtworkForms.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan End Get End Property '''<summary> ''' Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las ''' búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set resourceCulture = value End Set End Property End Module End Namespace
Izhido/bitsweeper
ArtworkForms/My Project/Resources.Designer.vb
Visual Basic
mit
2,972
Option Infer On Imports System Imports System.Runtime.InteropServices Namespace Examples Friend Class Program <STAThread> Shared Sub Main(ByVal args() As String) Dim application As SolidEdgeFramework.Application = Nothing Try ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic. OleMessageFilter.Register() ' Attempt to connect to a running instance of Solid Edge. application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application) Dim linksUpdateOptions = SolidEdgeFramework.LinksUpdateOption.igNoLinksUpdate Dim strAltLinkPath = String.Empty Dim documentAccess = SolidEdgeFramework.DocumentAccess.igReadOnly Dim notifyOption = SolidEdgeFramework.NotifyOption.igNoNotify Dim strFilter = "Solid Edge Files (*.asm; *.par; *.dft; *.psm; *.pwd), *.asm; *.par; *.dft; *.psm; *.pwd" strFilter &= ", Assembly Files (*.asm), *.asm" strFilter &= ", Part Files (*.par), *.par" strFilter &= ", Draft Files (*.dft), *.dft" strFilter &= ", Sheet Metal Files (*.psm), *.psm" strFilter &= ", Weldement Files (*.pwd), *.pwd" Dim docRelationAutoServer As Object = Nothing Dim strFilePath = application.GetOpenFileName(linksUpdateOptions, strAltLinkPath, documentAccess, notifyOption, docRelationAutoServer, strFilter) Console.WriteLine(strFilePath) Catch ex As System.Exception Console.WriteLine(ex) Finally OleMessageFilter.Unregister() End Try End Sub End Class End Namespace
SolidEdgeCommunity/docs
docfx_project/snippets/SolidEdgeFramework.Application.GetOpenFileName.vb
Visual Basic
mit
1,842
Imports System Imports System.Collections.Generic Imports System.Runtime.InteropServices Namespace Examples Friend Class Program <STAThread> Shared Sub Main(ByVal args() As String) Dim application As SolidEdgeFramework.Application = Nothing Dim documents As SolidEdgeFramework.Documents = Nothing Dim draftDocument As SolidEdgeDraft.DraftDocument = Nothing Dim sheet As SolidEdgeDraft.Sheet = Nothing Dim curves2d As SolidEdgeFrameworkSupport.Curves2d = Nothing Dim curve2d As SolidEdgeFrameworkSupport.Curve2d = Nothing Try ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic. OleMessageFilter.Register() ' Attempt to connect to a running instance of Solid Edge. application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application) documents = application.Documents draftDocument = CType(documents.Add("SolidEdge.DraftDocument"), SolidEdgeDraft.DraftDocument) sheet = draftDocument.ActiveSheet curves2d = sheet.Curves2d Dim Points = CType(New Double(), System.Array) { 0.1, 0.1, 0.2, 0.1, 0.2, 0.2, 0.1, 0.2 } curve2d = curves2d.AddByPoints(Points.Length \ 2, Points) Dim length = curve2d.Length Catch ex As System.Exception Console.WriteLine(ex) Finally OleMessageFilter.Unregister() End Try End Sub End Class End Namespace
SolidEdgeCommunity/docs
docfx_project/snippets/SolidEdgeFrameworkSupport.Curve2d.Length.vb
Visual Basic
mit
1,666
Public Class RemoteDesktop Dim shift As Boolean = False : Dim ctrl As Boolean = False : Dim alt As Boolean = False Sub New(ByVal c As Connection) InitializeComponent() : Me.Tag = c End Sub Private Sub EnableToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnableToolStripMenuItem.Click AddHandler Me.KeyDown, AddressOf RemoteDesktop_KeyDown : AddHandler Me.KeyUp, AddressOf RemoteDesktop_KeyUp : DisableToolStripMenuItem.Enabled = True : EnableToolStripMenuItem.Enabled = False End Sub Private Sub DisableToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisableToolStripMenuItem.Click RemoveHandler Me.KeyDown, AddressOf RemoteDesktop_KeyDown : RemoveHandler Me.KeyUp, AddressOf RemoteDesktop_KeyUp : DisableToolStripMenuItem.Enabled = False : EnableToolStripMenuItem.Enabled = True End Sub Sub RemoteDesktop_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) If ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower = "shiftkey" Then shift = True If ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower = "ctrl" Then ctrl = True If ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower = "menu" Then alt = True End Sub Private Sub RemoteDesktop_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) If ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower = "shiftkey" Then shift = False : Exit Sub If ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower = "ctrl" Then ctrl = False : Exit Sub If ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower = "menu" Then alt = False : Exit Sub Dim Code As String = ConvertKeycode(Convert.ToInt32(ChrW(e.KeyCode))).ToLower If Code = "capital" Then Exit Sub Select Case Code Case "d1" Code = "1" Case "d2" Code = "2" Case "d3" Code = "3" Case "d4" Code = "4" Case "d5" Code = "5" Case "d6" Code = "6" Case "d7" Code = "7" Case "d8" Code = "8" Case "d9" Code = "9" Case "d0" Code = "0" Case "d!" Code = "!" Case "d@" Code = "@" Case "d#" Code = "#" Case "d$" Code = "$" Case "d%" Code = "%" Case "d^" Code = "^" Case "d&" Code = "&" Case "d*" Code = "*" Case "d(" Code = "(" Case "d)" Code = ")" Case "oemminus" Code = "-" Case "oemplus" Code = "=" Case "oemopenbrackets" Code = "[" Case "oem6" Code = "]" Case "oem5" Code = "\" Case "oem1" Code = ";" Case "oem7" Code = "'" Case "oemcomma" Code = "," Case "oemperiod" Code = "." Case "oemquestion" Code = "/" Case "printscreen" Code = "prtsc" Case "pageup" Code = "pgup" Case "next" Code = "pgdn" Case "scroll" Code = "scrolllock" End Select If ctrl Then If alt Then If shift Then DirectCast(Me.Tag, Connection).Send("SendKeys|^(%(+(" & Code & ")))") Else DirectCast(Me.Tag, Connection).Send("SendKeys|^(%(" & Code & "))") End If Else If shift Then DirectCast(Me.Tag, Connection).Send("SendKeys|^(+(" & Code & "))") Else DirectCast(Me.Tag, Connection).Send("SendKeys|^(" & Code & ")") End If End If Else If alt Then If shift Then DirectCast(Me.Tag, Connection).Send("SendKeys|%(+(" & Code & "))") Else DirectCast(Me.Tag, Connection).Send("SendKeys|%(" & Code & ")") End If Else If shift Then DirectCast(Me.Tag, Connection).Send("SendKeys|+(" & Code & ")") Else DirectCast(Me.Tag, Connection).Send("SendKeys|" & Code) End If End If End If End Sub Private Sub EnableToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnableToolStripMenuItem1.Click AddHandler DesktopPictureBox.MouseMove, AddressOf RemoteDesktop_MouseMove : DisableToolStripMenuItem1.Enabled = True : EnableToolStripMenuItem1.Enabled = False End Sub Private Sub DisableToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisableToolStripMenuItem1.Click RemoveHandler DesktopPictureBox.MouseMove, AddressOf RemoteDesktop_MouseMove : DisableToolStripMenuItem1.Enabled = False : EnableToolStripMenuItem1.Enabled = True End Sub Private Sub RemoteDesktop_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Dim coordinates As String = DesktopPictureBox.Size.ToString Dim x As Double = e.X / CInt(coordinates.Substring(7, coordinates.IndexOf(",") - 7)) Dim y As Double = e.Y / CInt(coordinates.Substring(coordinates.IndexOf(",") + 9).Trim("}")) DirectCast(Me.Tag, Connection).Send("MoveMouse|" & x.ToString & "|" & y.ToString) End Sub Private Sub EnableToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnableToolStripMenuItem2.Click AddHandler DesktopPictureBox.MouseDown, AddressOf RemoteDesktop_MouseDown : AddHandler DesktopPictureBox.MouseUp, AddressOf RemoteDesktop_MouseUp : DisableToolStripMenuItem2.Enabled = True : EnableToolStripMenuItem2.Enabled = False End Sub Private Sub DisableToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisableToolStripMenuItem2.Click RemoveHandler DesktopPictureBox.MouseDown, AddressOf RemoteDesktop_MouseDown : RemoveHandler DesktopPictureBox.MouseUp, AddressOf RemoteDesktop_MouseUp : DisableToolStripMenuItem2.Enabled = False : EnableToolStripMenuItem2.Enabled = True End Sub Private Sub RemoteDesktop_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown Dim coordinates As String = DesktopPictureBox.Size.ToString Dim x As Double = e.X / CInt(coordinates.Substring(7, coordinates.IndexOf(",") - 7)) Dim y As Double = e.Y / CInt(coordinates.Substring(coordinates.IndexOf(",") + 9).Trim("}")) If e.Button = MouseButtons.Left Then DirectCast(Me.Tag, Connection).Send("LClickDown|" & x.ToString & "|" & y.ToString) ElseIf e.Button = MouseButtons.Right Then DirectCast(Me.Tag, Connection).Send("RClickDown|" & x.ToString & "|" & y.ToString) End If End Sub Private Sub RemoteDesktop_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp Dim coordinates As String = DesktopPictureBox.Size.ToString Dim x As Double = e.X / CInt(coordinates.Substring(7, coordinates.IndexOf(",") - 7)) Dim y As Double = e.Y / CInt(coordinates.Substring(coordinates.IndexOf(",") + 9).Trim("}")) If e.Button = MouseButtons.Left Then DirectCast(Me.Tag, Connection).Send("LClickUp|" & x.ToString & "|" & y.ToString) ElseIf e.Button = MouseButtons.Right Then DirectCast(Me.Tag, Connection).Send("RClickUp|" & x.ToString & "|" & y.ToString) End If End Sub Private Sub RemoteDesktop_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing DirectCast(Me.Tag, Connection).Send("StopDesktop|") End Sub Function ConvertKeycode(ByVal KeyCode As Integer) As String Dim Key As Keys = DirectCast(KeyCode, Keys) Select Case Key Case Keys.Back Return "back" Case Keys.ControlKey Return "ctrl" Case Keys.Alt Return "alt" Case Keys.Return Return "return" Case Keys.Space Return "space" Case Keys.Shift Return "shift" Case Else Return Key.ToString End Select End Function End Class
Retrobyte/StormRat
StormRat/RemoteDesktop.vb
Visual Basic
mit
9,009
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> Partial Class MQTTConnectForm Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() Me.Label9 = New System.Windows.Forms.Label() Me.TopicInput = New System.Windows.Forms.TextBox() Me.BoxKeepAlive = New System.Windows.Forms.NumericUpDown() Me.BoxReconnect = New System.Windows.Forms.NumericUpDown() Me.BoxTimeout = New System.Windows.Forms.NumericUpDown() Me.Label7 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label() Me.Label6 = New System.Windows.Forms.Label() Me.BoxPassword = New System.Windows.Forms.TextBox() Me.BoxUsername = New System.Windows.Forms.TextBox() Me.BoxHost = New System.Windows.Forms.TextBox() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.BoxClientID = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.BoxPort = New System.Windows.Forms.NumericUpDown() Me.ButtonConnect = New System.Windows.Forms.Button() Me.ButtonDisconnect = New System.Windows.Forms.Button() Me.TopicList = New System.Windows.Forms.ListBox() Me.CleanSessionBox = New System.Windows.Forms.CheckBox() Me.QOSBox = New System.Windows.Forms.ListBox() Me.TableLayoutPanel2 = New System.Windows.Forms.TableLayoutPanel() Me.OutputText = New System.Windows.Forms.Label() Me.TableLayoutPanel1.SuspendLayout() CType(Me.BoxKeepAlive, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BoxReconnect, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BoxTimeout, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BoxPort, System.ComponentModel.ISupportInitialize).BeginInit() Me.TableLayoutPanel2.SuspendLayout() Me.SuspendLayout() ' 'TableLayoutPanel1 ' Me.TableLayoutPanel1.ColumnCount = 2 Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333!)) Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 66.66667!)) Me.TableLayoutPanel1.Controls.Add(Me.Label9, 0, 8) Me.TableLayoutPanel1.Controls.Add(Me.TopicInput, 0, 10) Me.TableLayoutPanel1.Controls.Add(Me.BoxKeepAlive, 1, 7) Me.TableLayoutPanel1.Controls.Add(Me.BoxReconnect, 1, 5) Me.TableLayoutPanel1.Controls.Add(Me.BoxTimeout, 1, 6) Me.TableLayoutPanel1.Controls.Add(Me.Label7, 0, 7) Me.TableLayoutPanel1.Controls.Add(Me.Label8, 0, 6) Me.TableLayoutPanel1.Controls.Add(Me.Label6, 0, 5) Me.TableLayoutPanel1.Controls.Add(Me.BoxPassword, 1, 4) Me.TableLayoutPanel1.Controls.Add(Me.BoxUsername, 1, 3) Me.TableLayoutPanel1.Controls.Add(Me.BoxHost, 1, 1) Me.TableLayoutPanel1.Controls.Add(Me.Label1, 0, 0) Me.TableLayoutPanel1.Controls.Add(Me.Label2, 0, 1) Me.TableLayoutPanel1.Controls.Add(Me.BoxClientID, 1, 0) Me.TableLayoutPanel1.Controls.Add(Me.Label4, 0, 4) Me.TableLayoutPanel1.Controls.Add(Me.Label5, 0, 2) Me.TableLayoutPanel1.Controls.Add(Me.Label3, 0, 3) Me.TableLayoutPanel1.Controls.Add(Me.BoxPort, 1, 2) Me.TableLayoutPanel1.Controls.Add(Me.ButtonConnect, 1, 11) Me.TableLayoutPanel1.Controls.Add(Me.ButtonDisconnect, 0, 11) Me.TableLayoutPanel1.Controls.Add(Me.TopicList, 1, 10) Me.TableLayoutPanel1.Controls.Add(Me.CleanSessionBox, 1, 9) Me.TableLayoutPanel1.Controls.Add(Me.QOSBox, 1, 8) Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill Me.TableLayoutPanel1.Location = New System.Drawing.Point(3, 3) Me.TableLayoutPanel1.Name = "TableLayoutPanel1" Me.TableLayoutPanel1.RowCount = 12 Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.33333!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.666667!)) Me.TableLayoutPanel1.Size = New System.Drawing.Size(425, 560) Me.TableLayoutPanel1.TabIndex = 0 ' 'Label9 ' Me.Label9.AutoSize = True Me.Label9.Dock = System.Windows.Forms.DockStyle.Fill Me.Label9.Location = New System.Drawing.Point(3, 296) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(135, 74) Me.Label9.TabIndex = 18 Me.Label9.Text = "QoS" Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'TopicInput ' Me.TopicInput.Dock = System.Windows.Forms.DockStyle.Fill Me.TopicInput.Location = New System.Drawing.Point(3, 410) Me.TopicInput.Name = "TopicInput" Me.TopicInput.Size = New System.Drawing.Size(135, 20) Me.TopicInput.TabIndex = 9 ' 'BoxKeepAlive ' Me.BoxKeepAlive.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxKeepAlive.Location = New System.Drawing.Point(144, 262) Me.BoxKeepAlive.Maximum = New Decimal(New Integer() {100000, 0, 0, 0}) Me.BoxKeepAlive.Name = "BoxKeepAlive" Me.BoxKeepAlive.Size = New System.Drawing.Size(278, 20) Me.BoxKeepAlive.TabIndex = 7 Me.BoxKeepAlive.Value = New Decimal(New Integer() {10, 0, 0, 0}) ' 'BoxReconnect ' Me.BoxReconnect.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxReconnect.Location = New System.Drawing.Point(144, 188) Me.BoxReconnect.Maximum = New Decimal(New Integer() {100000, 0, 0, 0}) Me.BoxReconnect.Name = "BoxReconnect" Me.BoxReconnect.Size = New System.Drawing.Size(278, 20) Me.BoxReconnect.TabIndex = 5 Me.BoxReconnect.Value = New Decimal(New Integer() {1000, 0, 0, 0}) ' 'BoxTimeout ' Me.BoxTimeout.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxTimeout.Location = New System.Drawing.Point(144, 225) Me.BoxTimeout.Maximum = New Decimal(New Integer() {1000, 0, 0, 0}) Me.BoxTimeout.Name = "BoxTimeout" Me.BoxTimeout.Size = New System.Drawing.Size(278, 20) Me.BoxTimeout.TabIndex = 6 Me.BoxTimeout.Value = New Decimal(New Integer() {30, 0, 0, 0}) ' 'Label7 ' Me.Label7.AutoSize = True Me.Label7.Dock = System.Windows.Forms.DockStyle.Fill Me.Label7.Location = New System.Drawing.Point(3, 259) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(135, 37) Me.Label7.TabIndex = 16 Me.Label7.Text = "Keep Alive [s]" Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'Label8 ' Me.Label8.AutoSize = True Me.Label8.Dock = System.Windows.Forms.DockStyle.Fill Me.Label8.Location = New System.Drawing.Point(3, 222) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(135, 37) Me.Label8.TabIndex = 15 Me.Label8.Text = "Connection Timeout [s]" Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'Label6 ' Me.Label6.AutoSize = True Me.Label6.Dock = System.Windows.Forms.DockStyle.Fill Me.Label6.Location = New System.Drawing.Point(3, 185) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(135, 37) Me.Label6.TabIndex = 13 Me.Label6.Text = "Reconnect Period [ms]" Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'BoxPassword ' Me.BoxPassword.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxPassword.Location = New System.Drawing.Point(144, 151) Me.BoxPassword.Name = "BoxPassword" Me.BoxPassword.Size = New System.Drawing.Size(278, 20) Me.BoxPassword.TabIndex = 4 ' 'BoxUsername ' Me.BoxUsername.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxUsername.Location = New System.Drawing.Point(144, 114) Me.BoxUsername.Name = "BoxUsername" Me.BoxUsername.Size = New System.Drawing.Size(278, 20) Me.BoxUsername.TabIndex = 3 ' 'BoxHost ' Me.BoxHost.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxHost.Location = New System.Drawing.Point(144, 40) Me.BoxHost.Name = "BoxHost" Me.BoxHost.Size = New System.Drawing.Size(278, 20) Me.BoxHost.TabIndex = 1 Me.BoxHost.Text = "broker.hivemq.com" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Dock = System.Windows.Forms.DockStyle.Fill Me.Label1.Location = New System.Drawing.Point(3, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(135, 37) Me.Label1.TabIndex = 0 Me.Label1.Text = "Client ID" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Dock = System.Windows.Forms.DockStyle.Fill Me.Label2.Location = New System.Drawing.Point(3, 37) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(135, 37) Me.Label2.TabIndex = 1 Me.Label2.Text = "Host" Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'BoxClientID ' Me.BoxClientID.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxClientID.Location = New System.Drawing.Point(144, 3) Me.BoxClientID.Name = "BoxClientID" Me.BoxClientID.Size = New System.Drawing.Size(278, 20) Me.BoxClientID.TabIndex = 0 ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Dock = System.Windows.Forms.DockStyle.Fill Me.Label4.Location = New System.Drawing.Point(3, 148) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(135, 37) Me.Label4.TabIndex = 3 Me.Label4.Text = "Password" Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'Label5 ' Me.Label5.AutoSize = True Me.Label5.Dock = System.Windows.Forms.DockStyle.Fill Me.Label5.Location = New System.Drawing.Point(3, 74) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(135, 37) Me.Label5.TabIndex = 4 Me.Label5.Text = "Port" Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Dock = System.Windows.Forms.DockStyle.Fill Me.Label3.Location = New System.Drawing.Point(3, 111) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(135, 37) Me.Label3.TabIndex = 2 Me.Label3.Text = "Username" Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'BoxPort ' Me.BoxPort.Dock = System.Windows.Forms.DockStyle.Fill Me.BoxPort.Location = New System.Drawing.Point(144, 77) Me.BoxPort.Maximum = New Decimal(New Integer() {65535, 0, 0, 0}) Me.BoxPort.Name = "BoxPort" Me.BoxPort.Size = New System.Drawing.Size(278, 20) Me.BoxPort.TabIndex = 2 Me.BoxPort.Value = New Decimal(New Integer() {1883, 0, 0, 0}) ' 'ButtonConnect ' Me.ButtonConnect.Dock = System.Windows.Forms.DockStyle.Fill Me.ButtonConnect.Location = New System.Drawing.Point(144, 522) Me.ButtonConnect.Name = "ButtonConnect" Me.ButtonConnect.Size = New System.Drawing.Size(278, 35) Me.ButtonConnect.TabIndex = 11 Me.ButtonConnect.Text = "Connect" Me.ButtonConnect.UseVisualStyleBackColor = True ' 'ButtonDisconnect ' Me.ButtonDisconnect.Dock = System.Windows.Forms.DockStyle.Fill Me.ButtonDisconnect.Location = New System.Drawing.Point(3, 522) Me.ButtonDisconnect.Name = "ButtonDisconnect" Me.ButtonDisconnect.Size = New System.Drawing.Size(135, 35) Me.ButtonDisconnect.TabIndex = 12 Me.ButtonDisconnect.Text = "Disconnect" Me.ButtonDisconnect.UseVisualStyleBackColor = True ' 'TopicList ' Me.TopicList.Dock = System.Windows.Forms.DockStyle.Fill Me.TopicList.FormattingEnabled = True Me.TopicList.Location = New System.Drawing.Point(144, 410) Me.TopicList.Name = "TopicList" Me.TopicList.ScrollAlwaysVisible = True Me.TopicList.Size = New System.Drawing.Size(278, 106) Me.TopicList.TabIndex = 10 ' 'CleanSessionBox ' Me.CleanSessionBox.AutoSize = True Me.CleanSessionBox.Location = New System.Drawing.Point(144, 373) Me.CleanSessionBox.Name = "CleanSessionBox" Me.CleanSessionBox.Size = New System.Drawing.Size(93, 17) Me.CleanSessionBox.TabIndex = 20 Me.CleanSessionBox.Text = "Clean Session" Me.CleanSessionBox.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.CleanSessionBox.UseVisualStyleBackColor = True ' 'QOSBox ' Me.QOSBox.Dock = System.Windows.Forms.DockStyle.Fill Me.QOSBox.FormattingEnabled = True Me.QOSBox.Items.AddRange(New Object() {"At Most Once (0)", "At Least Once (1)", "Exactly Once (2)"}) Me.QOSBox.Location = New System.Drawing.Point(144, 299) Me.QOSBox.Name = "QOSBox" Me.QOSBox.Size = New System.Drawing.Size(278, 68) Me.QOSBox.TabIndex = 21 ' 'TableLayoutPanel2 ' Me.TableLayoutPanel2.ColumnCount = 1 Me.TableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) Me.TableLayoutPanel2.Controls.Add(Me.OutputText, 0, 1) Me.TableLayoutPanel2.Controls.Add(Me.TableLayoutPanel1, 0, 0) Me.TableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill Me.TableLayoutPanel2.Location = New System.Drawing.Point(0, 0) Me.TableLayoutPanel2.Name = "TableLayoutPanel2" Me.TableLayoutPanel2.RowCount = 2 Me.TableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 90.0!)) Me.TableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!)) Me.TableLayoutPanel2.Size = New System.Drawing.Size(431, 629) Me.TableLayoutPanel2.TabIndex = 1 ' 'OutputText ' Me.OutputText.AutoSize = True Me.OutputText.Dock = System.Windows.Forms.DockStyle.Fill Me.OutputText.Location = New System.Drawing.Point(3, 566) Me.OutputText.Name = "OutputText" Me.OutputText.Size = New System.Drawing.Size(425, 63) Me.OutputText.TabIndex = 17 Me.OutputText.Text = "Press Connect..." Me.OutputText.TextAlign = System.Drawing.ContentAlignment.TopCenter ' 'MQTTConnectForm ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(431, 629) Me.Controls.Add(Me.TableLayoutPanel2) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow Me.KeyPreview = True Me.Name = "MQTTConnectForm" Me.ShowIcon = False Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "MQTT_Connect" Me.TopMost = True Me.TableLayoutPanel1.ResumeLayout(False) Me.TableLayoutPanel1.PerformLayout() CType(Me.BoxKeepAlive, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BoxReconnect, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BoxTimeout, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BoxPort, System.ComponentModel.ISupportInitialize).EndInit() Me.TableLayoutPanel2.ResumeLayout(False) Me.TableLayoutPanel2.PerformLayout() Me.ResumeLayout(False) End Sub Friend WithEvents TableLayoutPanel1 As Windows.Forms.TableLayoutPanel Friend WithEvents BoxKeepAlive As Windows.Forms.NumericUpDown Friend WithEvents BoxReconnect As Windows.Forms.NumericUpDown Friend WithEvents Label7 As Windows.Forms.Label Friend WithEvents Label8 As Windows.Forms.Label Friend WithEvents Label6 As Windows.Forms.Label Friend WithEvents BoxPassword As Windows.Forms.TextBox Friend WithEvents BoxUsername As Windows.Forms.TextBox Friend WithEvents BoxHost As Windows.Forms.TextBox Friend WithEvents Label1 As Windows.Forms.Label Friend WithEvents Label2 As Windows.Forms.Label Friend WithEvents BoxClientID As Windows.Forms.TextBox Friend WithEvents Label4 As Windows.Forms.Label Friend WithEvents Label5 As Windows.Forms.Label Friend WithEvents Label3 As Windows.Forms.Label Friend WithEvents BoxPort As Windows.Forms.NumericUpDown Friend WithEvents BoxTimeout As Windows.Forms.NumericUpDown Friend WithEvents TopicInput As Windows.Forms.TextBox Friend WithEvents TopicList As Windows.Forms.ListBox Friend WithEvents TableLayoutPanel2 As Windows.Forms.TableLayoutPanel Friend WithEvents OutputText As Windows.Forms.Label Friend WithEvents Label9 As Windows.Forms.Label Friend WithEvents CleanSessionBox As Windows.Forms.CheckBox Friend WithEvents ButtonConnect As Windows.Forms.Button Friend WithEvents ButtonDisconnect As Windows.Forms.Button Friend WithEvents QOSBox As Windows.Forms.ListBox End Class
mateuszzwierzycki/Owl
Owl.GH.Networking/MQTTConnectForm.Designer.vb
Visual Basic
mit
17,916
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class IzvjestajORodjenju_Form Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim OpisLabel As System.Windows.Forms.Label Dim VrijemeLabel As System.Windows.Forms.Label Dim Doktor_idLabel As System.Windows.Forms.Label Dim Pacijent_idLabel As System.Windows.Forms.Label Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(IzvjestajORodjenju_Form)) Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabPage1 = New System.Windows.Forms.TabPage() Me.BtnUredi = New System.Windows.Forms.Button() Me.BtnIzbrisi = New System.Windows.Forms.Button() Me.Izvjestaj_o_rodjenjuDataGridView = New System.Windows.Forms.DataGridView() Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn3 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn4 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn5 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.Izvjestaj_o_rodjenjuBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.IbolnicaDataSet = New iBolnica.ibolnicaDataSet() Me.TabPage2 = New System.Windows.Forms.TabPage() Me.BtnNovIzvjestaj = New System.Windows.Forms.Button() Me.ComboBox2 = New System.Windows.Forms.ComboBox() Me.PacijentBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.BtnDodajIzvjestaj = New System.Windows.Forms.Button() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.DoktorBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.OpisTextEdit = New DevExpress.XtraEditors.TextEdit() Me.VrijemeDateEdit = New DevExpress.XtraEditors.DateEdit() Me.Izvjestaj_o_rodjenjuTableAdapter = New iBolnica.ibolnicaDataSetTableAdapters.izvjestaj_o_rodjenjuTableAdapter() Me.TableAdapterManager = New iBolnica.ibolnicaDataSetTableAdapters.TableAdapterManager() Me.DoktorTableAdapter = New iBolnica.ibolnicaDataSetTableAdapters.doktorTableAdapter() Me.PacijentTableAdapter = New iBolnica.ibolnicaDataSetTableAdapters.pacijentTableAdapter() Me.Izvjestaj_o_rodjenjuBindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components) Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel() Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator = New System.Windows.Forms.ToolStripSeparator() Me.BindingNavigatorPositionItem = New System.Windows.Forms.ToolStripTextBox() Me.BindingNavigatorSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton() Me.BtnZatvori = New System.Windows.Forms.Button() OpisLabel = New System.Windows.Forms.Label() VrijemeLabel = New System.Windows.Forms.Label() Doktor_idLabel = New System.Windows.Forms.Label() Pacijent_idLabel = New System.Windows.Forms.Label() Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() CType(Me.Izvjestaj_o_rodjenjuDataGridView, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.Izvjestaj_o_rodjenjuBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.IbolnicaDataSet, System.ComponentModel.ISupportInitialize).BeginInit() Me.TabPage2.SuspendLayout() CType(Me.PacijentBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DoktorBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.OpisTextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.VrijemeDateEdit.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.VrijemeDateEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.Izvjestaj_o_rodjenjuBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() Me.Izvjestaj_o_rodjenjuBindingNavigator.SuspendLayout() Me.SuspendLayout() ' 'OpisLabel ' OpisLabel.AutoSize = True OpisLabel.Location = New System.Drawing.Point(9, 43) OpisLabel.Name = "OpisLabel" OpisLabel.Size = New System.Drawing.Size(31, 13) OpisLabel.TabIndex = 2 OpisLabel.Text = "Opis:" ' 'VrijemeLabel ' VrijemeLabel.AutoSize = True VrijemeLabel.Location = New System.Drawing.Point(9, 69) VrijemeLabel.Name = "VrijemeLabel" VrijemeLabel.Size = New System.Drawing.Size(44, 13) VrijemeLabel.TabIndex = 4 VrijemeLabel.Text = "Vrijeme:" ' 'Doktor_idLabel ' Doktor_idLabel.AutoSize = True Doktor_idLabel.Location = New System.Drawing.Point(9, 95) Doktor_idLabel.Name = "Doktor_idLabel" Doktor_idLabel.Size = New System.Drawing.Size(42, 13) Doktor_idLabel.TabIndex = 6 Doktor_idLabel.Text = "Doktor:" ' 'Pacijent_idLabel ' Pacijent_idLabel.AutoSize = True Pacijent_idLabel.Location = New System.Drawing.Point(9, 121) Pacijent_idLabel.Name = "Pacijent_idLabel" Pacijent_idLabel.Size = New System.Drawing.Size(48, 13) Pacijent_idLabel.TabIndex = 8 Pacijent_idLabel.Text = "Pacijent:" ' 'TabControl1 ' Me.TabControl1.Controls.Add(Me.TabPage1) Me.TabControl1.Controls.Add(Me.TabPage2) Me.TabControl1.Location = New System.Drawing.Point(3, 7) Me.TabControl1.Name = "TabControl1" Me.TabControl1.SelectedIndex = 0 Me.TabControl1.Size = New System.Drawing.Size(655, 242) Me.TabControl1.TabIndex = 0 ' 'TabPage1 ' Me.TabPage1.Controls.Add(Me.BtnUredi) Me.TabPage1.Controls.Add(Me.BtnIzbrisi) Me.TabPage1.Controls.Add(Me.Izvjestaj_o_rodjenjuDataGridView) Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.TabPage1.Name = "TabPage1" Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) Me.TabPage1.Size = New System.Drawing.Size(647, 216) Me.TabPage1.TabIndex = 0 Me.TabPage1.Text = "= Lista Izvjestaja" Me.TabPage1.UseVisualStyleBackColor = True ' 'BtnUredi ' Me.BtnUredi.BackgroundImage = Global.iBolnica.My.Resources.Resources.edit Me.BtnUredi.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.BtnUredi.ForeColor = System.Drawing.Color.Transparent Me.BtnUredi.Location = New System.Drawing.Point(549, 6) Me.BtnUredi.Name = "BtnUredi" Me.BtnUredi.Size = New System.Drawing.Size(44, 28) Me.BtnUredi.TabIndex = 51 Me.BtnUredi.UseVisualStyleBackColor = True ' 'BtnIzbrisi ' Me.BtnIzbrisi.BackgroundImage = Global.iBolnica.My.Resources.Resources.izbrisi Me.BtnIzbrisi.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.BtnIzbrisi.ForeColor = System.Drawing.Color.Transparent Me.BtnIzbrisi.Location = New System.Drawing.Point(595, 6) Me.BtnIzbrisi.Name = "BtnIzbrisi" Me.BtnIzbrisi.Size = New System.Drawing.Size(45, 28) Me.BtnIzbrisi.TabIndex = 50 Me.BtnIzbrisi.UseVisualStyleBackColor = True ' 'Izvjestaj_o_rodjenjuDataGridView ' Me.Izvjestaj_o_rodjenjuDataGridView.AllowUserToAddRows = False Me.Izvjestaj_o_rodjenjuDataGridView.AutoGenerateColumns = False Me.Izvjestaj_o_rodjenjuDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.Izvjestaj_o_rodjenjuDataGridView.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.DataGridViewTextBoxColumn1, Me.DataGridViewTextBoxColumn2, Me.DataGridViewTextBoxColumn3, Me.DataGridViewTextBoxColumn4, Me.DataGridViewTextBoxColumn5}) Me.Izvjestaj_o_rodjenjuDataGridView.DataSource = Me.Izvjestaj_o_rodjenjuBindingSource Me.Izvjestaj_o_rodjenjuDataGridView.Dock = System.Windows.Forms.DockStyle.Fill Me.Izvjestaj_o_rodjenjuDataGridView.Location = New System.Drawing.Point(3, 3) Me.Izvjestaj_o_rodjenjuDataGridView.Name = "Izvjestaj_o_rodjenjuDataGridView" Me.Izvjestaj_o_rodjenjuDataGridView.Size = New System.Drawing.Size(641, 210) Me.Izvjestaj_o_rodjenjuDataGridView.TabIndex = 0 ' 'DataGridViewTextBoxColumn1 ' Me.DataGridViewTextBoxColumn1.DataPropertyName = "izvjestaj_o_rodjenju" Me.DataGridViewTextBoxColumn1.HeaderText = "izvjestaj_o_rodjenju" Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1" ' 'DataGridViewTextBoxColumn2 ' Me.DataGridViewTextBoxColumn2.DataPropertyName = "opis" Me.DataGridViewTextBoxColumn2.HeaderText = "Opis" Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2" ' 'DataGridViewTextBoxColumn3 ' Me.DataGridViewTextBoxColumn3.DataPropertyName = "vrijeme" Me.DataGridViewTextBoxColumn3.HeaderText = "Vrijeme Rodjenja" Me.DataGridViewTextBoxColumn3.Name = "DataGridViewTextBoxColumn3" ' 'DataGridViewTextBoxColumn4 ' Me.DataGridViewTextBoxColumn4.DataPropertyName = "doktor_id" Me.DataGridViewTextBoxColumn4.HeaderText = "ID Doktora" Me.DataGridViewTextBoxColumn4.Name = "DataGridViewTextBoxColumn4" ' 'DataGridViewTextBoxColumn5 ' Me.DataGridViewTextBoxColumn5.DataPropertyName = "pacijent_id" Me.DataGridViewTextBoxColumn5.HeaderText = "ID Pacijenta" Me.DataGridViewTextBoxColumn5.Name = "DataGridViewTextBoxColumn5" ' 'Izvjestaj_o_rodjenjuBindingSource ' Me.Izvjestaj_o_rodjenjuBindingSource.DataMember = "izvjestaj_o_rodjenju" Me.Izvjestaj_o_rodjenjuBindingSource.DataSource = Me.IbolnicaDataSet ' 'IbolnicaDataSet ' Me.IbolnicaDataSet.DataSetName = "ibolnicaDataSet" Me.IbolnicaDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema ' 'TabPage2 ' Me.TabPage2.Controls.Add(Me.BtnNovIzvjestaj) Me.TabPage2.Controls.Add(Me.ComboBox2) Me.TabPage2.Controls.Add(Me.BtnDodajIzvjestaj) Me.TabPage2.Controls.Add(Me.ComboBox1) Me.TabPage2.Controls.Add(OpisLabel) Me.TabPage2.Controls.Add(Me.OpisTextEdit) Me.TabPage2.Controls.Add(VrijemeLabel) Me.TabPage2.Controls.Add(Me.VrijemeDateEdit) Me.TabPage2.Controls.Add(Doktor_idLabel) Me.TabPage2.Controls.Add(Pacijent_idLabel) Me.TabPage2.Location = New System.Drawing.Point(4, 22) Me.TabPage2.Name = "TabPage2" Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) Me.TabPage2.Size = New System.Drawing.Size(647, 216) Me.TabPage2.TabIndex = 1 Me.TabPage2.Text = "+ Doda Izvjestaj" Me.TabPage2.UseVisualStyleBackColor = True ' 'BtnNovIzvjestaj ' Me.BtnNovIzvjestaj.BackColor = System.Drawing.Color.DeepSkyBlue Me.BtnNovIzvjestaj.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.BtnNovIzvjestaj.ForeColor = System.Drawing.Color.Transparent Me.BtnNovIzvjestaj.Location = New System.Drawing.Point(9, 6) Me.BtnNovIzvjestaj.Name = "BtnNovIzvjestaj" Me.BtnNovIzvjestaj.Size = New System.Drawing.Size(104, 23) Me.BtnNovIzvjestaj.TabIndex = 49 Me.BtnNovIzvjestaj.Text = "Novi Izvjestaj" Me.BtnNovIzvjestaj.UseVisualStyleBackColor = False ' 'ComboBox2 ' Me.ComboBox2.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.Izvjestaj_o_rodjenjuBindingSource, "pacijent_id", True)) Me.ComboBox2.DataSource = Me.PacijentBindingSource Me.ComboBox2.DisplayMember = "ime" Me.ComboBox2.FormattingEnabled = True Me.ComboBox2.Location = New System.Drawing.Point(111, 118) Me.ComboBox2.Name = "ComboBox2" Me.ComboBox2.Size = New System.Drawing.Size(100, 21) Me.ComboBox2.TabIndex = 10 Me.ComboBox2.ValueMember = "pacijent_id" ' 'PacijentBindingSource ' Me.PacijentBindingSource.DataMember = "pacijent" Me.PacijentBindingSource.DataSource = Me.IbolnicaDataSet ' 'BtnDodajIzvjestaj ' Me.BtnDodajIzvjestaj.BackColor = System.Drawing.Color.DeepSkyBlue Me.BtnDodajIzvjestaj.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.BtnDodajIzvjestaj.ForeColor = System.Drawing.Color.Transparent Me.BtnDodajIzvjestaj.Location = New System.Drawing.Point(111, 154) Me.BtnDodajIzvjestaj.Name = "BtnDodajIzvjestaj" Me.BtnDodajIzvjestaj.Size = New System.Drawing.Size(100, 23) Me.BtnDodajIzvjestaj.TabIndex = 48 Me.BtnDodajIzvjestaj.Text = "Dodaj Izvjestaj" Me.BtnDodajIzvjestaj.UseVisualStyleBackColor = False ' 'ComboBox1 ' Me.ComboBox1.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.Izvjestaj_o_rodjenjuBindingSource, "doktor_id", True)) Me.ComboBox1.DataSource = Me.DoktorBindingSource Me.ComboBox1.DisplayMember = "ime" Me.ComboBox1.FormattingEnabled = True Me.ComboBox1.Location = New System.Drawing.Point(111, 93) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(100, 21) Me.ComboBox1.TabIndex = 9 Me.ComboBox1.ValueMember = "doktor_id" ' 'DoktorBindingSource ' Me.DoktorBindingSource.DataMember = "doktor" Me.DoktorBindingSource.DataSource = Me.IbolnicaDataSet ' 'OpisTextEdit ' Me.OpisTextEdit.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.Izvjestaj_o_rodjenjuBindingSource, "opis", True)) Me.OpisTextEdit.Location = New System.Drawing.Point(111, 40) Me.OpisTextEdit.Name = "OpisTextEdit" Me.OpisTextEdit.Size = New System.Drawing.Size(100, 20) Me.OpisTextEdit.TabIndex = 3 ' 'VrijemeDateEdit ' Me.VrijemeDateEdit.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.Izvjestaj_o_rodjenjuBindingSource, "vrijeme", True)) Me.VrijemeDateEdit.EditValue = Nothing Me.VrijemeDateEdit.Location = New System.Drawing.Point(111, 66) Me.VrijemeDateEdit.Name = "VrijemeDateEdit" Me.VrijemeDateEdit.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.VrijemeDateEdit.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.VrijemeDateEdit.Properties.CalendarTimeProperties.CloseUpKey = New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.F4) Me.VrijemeDateEdit.Properties.CalendarTimeProperties.PopupBorderStyle = DevExpress.XtraEditors.Controls.PopupBorderStyles.[Default] Me.VrijemeDateEdit.Size = New System.Drawing.Size(100, 20) Me.VrijemeDateEdit.TabIndex = 5 ' 'Izvjestaj_o_rodjenjuTableAdapter ' Me.Izvjestaj_o_rodjenjuTableAdapter.ClearBeforeFill = True ' 'TableAdapterManager ' Me.TableAdapterManager.adminTableAdapter = Nothing Me.TableAdapterManager.BackupDataSetBeforeUpdate = False Me.TableAdapterManager.banka_krviTableAdapter = Nothing Me.TableAdapterManager.dijagnoza_izvjestajTableAdapter = Nothing Me.TableAdapterManager.dodjela_krevetaTableAdapter = Nothing Me.TableAdapterManager.doktorTableAdapter = Me.DoktorTableAdapter Me.TableAdapterManager.donator_krviTableAdapter = Nothing Me.TableAdapterManager.email_templateTableAdapter = Nothing Me.TableAdapterManager.fakturaTableAdapter = Nothing Me.TableAdapterManager.farmaceutTableAdapter = Nothing Me.TableAdapterManager.izvjestaj_o_rodjenjuTableAdapter = Me.Izvjestaj_o_rodjenjuTableAdapter Me.TableAdapterManager.izvjestaj_operacijaTableAdapter = Nothing Me.TableAdapterManager.izvjestaj_smrtTableAdapter = Nothing Me.TableAdapterManager.izvjestajTableAdapter = Nothing Me.TableAdapterManager.kategorije_lijekovaTableAdapter = Nothing Me.TableAdapterManager.krevetTableAdapter = Nothing Me.TableAdapterManager.laborantTableAdapter = Nothing Me.TableAdapterManager.lijekoviTableAdapter = Nothing Me.TableAdapterManager.menadzmentTableAdapter = Nothing Me.TableAdapterManager.obavjestenjaTableAdapter = Nothing Me.TableAdapterManager.odjeljenjeTableAdapter = Nothing Me.TableAdapterManager.pacijentTableAdapter = Me.PacijentTableAdapter Me.TableAdapterManager.placanjeTableAdapter = Nothing Me.TableAdapterManager.podesavanjaTableAdapter = Nothing Me.TableAdapterManager.porukaTableAdapter = Nothing Me.TableAdapterManager.receptTableAdapter = Nothing Me.TableAdapterManager.sastanciTableAdapter = Nothing Me.TableAdapterManager.sestraTableAdapter = Nothing Me.TableAdapterManager.UpdateOrder = iBolnica.ibolnicaDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete ' 'DoktorTableAdapter ' Me.DoktorTableAdapter.ClearBeforeFill = True ' 'PacijentTableAdapter ' Me.PacijentTableAdapter.ClearBeforeFill = True ' 'Izvjestaj_o_rodjenjuBindingNavigator ' Me.Izvjestaj_o_rodjenjuBindingNavigator.AddNewItem = Me.BindingNavigatorAddNewItem Me.Izvjestaj_o_rodjenjuBindingNavigator.BindingSource = Me.Izvjestaj_o_rodjenjuBindingSource Me.Izvjestaj_o_rodjenjuBindingNavigator.CountItem = Me.BindingNavigatorCountItem Me.Izvjestaj_o_rodjenjuBindingNavigator.DeleteItem = Me.BindingNavigatorDeleteItem Me.Izvjestaj_o_rodjenjuBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem}) Me.Izvjestaj_o_rodjenjuBindingNavigator.Location = New System.Drawing.Point(0, 0) Me.Izvjestaj_o_rodjenjuBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem Me.Izvjestaj_o_rodjenjuBindingNavigator.MoveLastItem = Me.BindingNavigatorMoveLastItem Me.Izvjestaj_o_rodjenjuBindingNavigator.MoveNextItem = Me.BindingNavigatorMoveNextItem Me.Izvjestaj_o_rodjenjuBindingNavigator.MovePreviousItem = Me.BindingNavigatorMovePreviousItem Me.Izvjestaj_o_rodjenjuBindingNavigator.Name = "Izvjestaj_o_rodjenjuBindingNavigator" Me.Izvjestaj_o_rodjenjuBindingNavigator.PositionItem = Me.BindingNavigatorPositionItem Me.Izvjestaj_o_rodjenjuBindingNavigator.Size = New System.Drawing.Size(659, 25) Me.Izvjestaj_o_rodjenjuBindingNavigator.TabIndex = 1 Me.Izvjestaj_o_rodjenjuBindingNavigator.Text = "BindingNavigator1" Me.Izvjestaj_o_rodjenjuBindingNavigator.Visible = False ' 'BindingNavigatorAddNewItem ' Me.BindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.BindingNavigatorAddNewItem.Image = CType(resources.GetObject("BindingNavigatorAddNewItem.Image"), System.Drawing.Image) Me.BindingNavigatorAddNewItem.Name = "BindingNavigatorAddNewItem" Me.BindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = True Me.BindingNavigatorAddNewItem.Size = New System.Drawing.Size(23, 22) Me.BindingNavigatorAddNewItem.Text = "Add new" ' 'BindingNavigatorCountItem ' Me.BindingNavigatorCountItem.Name = "BindingNavigatorCountItem" Me.BindingNavigatorCountItem.Size = New System.Drawing.Size(35, 22) Me.BindingNavigatorCountItem.Text = "of {0}" Me.BindingNavigatorCountItem.ToolTipText = "Total number of items" ' 'BindingNavigatorDeleteItem ' Me.BindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.BindingNavigatorDeleteItem.Image = CType(resources.GetObject("BindingNavigatorDeleteItem.Image"), System.Drawing.Image) Me.BindingNavigatorDeleteItem.Name = "BindingNavigatorDeleteItem" Me.BindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = True Me.BindingNavigatorDeleteItem.Size = New System.Drawing.Size(23, 22) Me.BindingNavigatorDeleteItem.Text = "Delete" ' 'BindingNavigatorMoveFirstItem ' Me.BindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.BindingNavigatorMoveFirstItem.Image = CType(resources.GetObject("BindingNavigatorMoveFirstItem.Image"), System.Drawing.Image) Me.BindingNavigatorMoveFirstItem.Name = "BindingNavigatorMoveFirstItem" Me.BindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = True Me.BindingNavigatorMoveFirstItem.Size = New System.Drawing.Size(23, 22) Me.BindingNavigatorMoveFirstItem.Text = "Move first" ' 'BindingNavigatorMovePreviousItem ' Me.BindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.BindingNavigatorMovePreviousItem.Image = CType(resources.GetObject("BindingNavigatorMovePreviousItem.Image"), System.Drawing.Image) Me.BindingNavigatorMovePreviousItem.Name = "BindingNavigatorMovePreviousItem" Me.BindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = True Me.BindingNavigatorMovePreviousItem.Size = New System.Drawing.Size(23, 22) Me.BindingNavigatorMovePreviousItem.Text = "Move previous" ' 'BindingNavigatorSeparator ' Me.BindingNavigatorSeparator.Name = "BindingNavigatorSeparator" Me.BindingNavigatorSeparator.Size = New System.Drawing.Size(6, 25) ' 'BindingNavigatorPositionItem ' Me.BindingNavigatorPositionItem.AccessibleName = "Position" Me.BindingNavigatorPositionItem.AutoSize = False Me.BindingNavigatorPositionItem.Name = "BindingNavigatorPositionItem" Me.BindingNavigatorPositionItem.Size = New System.Drawing.Size(50, 23) Me.BindingNavigatorPositionItem.Text = "0" Me.BindingNavigatorPositionItem.ToolTipText = "Current position" ' 'BindingNavigatorSeparator1 ' Me.BindingNavigatorSeparator1.Name = "BindingNavigatorSeparator1" Me.BindingNavigatorSeparator1.Size = New System.Drawing.Size(6, 25) ' 'BindingNavigatorMoveNextItem ' Me.BindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.BindingNavigatorMoveNextItem.Image = CType(resources.GetObject("BindingNavigatorMoveNextItem.Image"), System.Drawing.Image) Me.BindingNavigatorMoveNextItem.Name = "BindingNavigatorMoveNextItem" Me.BindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = True Me.BindingNavigatorMoveNextItem.Size = New System.Drawing.Size(23, 22) Me.BindingNavigatorMoveNextItem.Text = "Move next" ' 'BindingNavigatorMoveLastItem ' Me.BindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.BindingNavigatorMoveLastItem.Image = CType(resources.GetObject("BindingNavigatorMoveLastItem.Image"), System.Drawing.Image) Me.BindingNavigatorMoveLastItem.Name = "BindingNavigatorMoveLastItem" Me.BindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = True Me.BindingNavigatorMoveLastItem.Size = New System.Drawing.Size(23, 22) Me.BindingNavigatorMoveLastItem.Text = "Move last" ' 'BindingNavigatorSeparator2 ' Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2" Me.BindingNavigatorSeparator2.Size = New System.Drawing.Size(6, 25) ' 'Izvjestaj_o_rodjenjuBindingNavigatorSaveItem ' Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem.Image = CType(resources.GetObject("Izvjestaj_o_rodjenjuBindingNavigatorSaveItem.Image"), System.Drawing.Image) Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem.Name = "Izvjestaj_o_rodjenjuBindingNavigatorSaveItem" Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem.Size = New System.Drawing.Size(23, 22) Me.Izvjestaj_o_rodjenjuBindingNavigatorSaveItem.Text = "Save Data" ' 'BtnZatvori ' Me.BtnZatvori.BackgroundImage = Global.iBolnica.My.Resources.Resources.zatvori Me.BtnZatvori.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.BtnZatvori.ForeColor = System.Drawing.Color.Transparent Me.BtnZatvori.Location = New System.Drawing.Point(619, 0) Me.BtnZatvori.Name = "BtnZatvori" Me.BtnZatvori.Size = New System.Drawing.Size(39, 23) Me.BtnZatvori.TabIndex = 47 Me.BtnZatvori.UseVisualStyleBackColor = True ' 'IzvjestajORodjenju_Form ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(659, 249) Me.Controls.Add(Me.BtnZatvori) Me.Controls.Add(Me.Izvjestaj_o_rodjenjuBindingNavigator) Me.Controls.Add(Me.TabControl1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "IzvjestajORodjenju_Form" Me.Text = "IzvjestajORodjenju_Form" Me.TabControl1.ResumeLayout(False) Me.TabPage1.ResumeLayout(False) CType(Me.Izvjestaj_o_rodjenjuDataGridView, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.Izvjestaj_o_rodjenjuBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.IbolnicaDataSet, System.ComponentModel.ISupportInitialize).EndInit() Me.TabPage2.ResumeLayout(False) Me.TabPage2.PerformLayout() CType(Me.PacijentBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DoktorBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.OpisTextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.VrijemeDateEdit.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.VrijemeDateEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.Izvjestaj_o_rodjenjuBindingNavigator, System.ComponentModel.ISupportInitialize).EndInit() Me.Izvjestaj_o_rodjenjuBindingNavigator.ResumeLayout(False) Me.Izvjestaj_o_rodjenjuBindingNavigator.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents TabControl1 As System.Windows.Forms.TabControl Friend WithEvents TabPage1 As System.Windows.Forms.TabPage Friend WithEvents TabPage2 As System.Windows.Forms.TabPage Friend WithEvents IbolnicaDataSet As iBolnica.ibolnicaDataSet Friend WithEvents Izvjestaj_o_rodjenjuBindingSource As System.Windows.Forms.BindingSource Friend WithEvents Izvjestaj_o_rodjenjuTableAdapter As iBolnica.ibolnicaDataSetTableAdapters.izvjestaj_o_rodjenjuTableAdapter Friend WithEvents TableAdapterManager As iBolnica.ibolnicaDataSetTableAdapters.TableAdapterManager Friend WithEvents Izvjestaj_o_rodjenjuBindingNavigator As System.Windows.Forms.BindingNavigator Friend WithEvents BindingNavigatorAddNewItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorCountItem As System.Windows.Forms.ToolStripLabel Friend WithEvents BindingNavigatorDeleteItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorMoveFirstItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorMovePreviousItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorSeparator As System.Windows.Forms.ToolStripSeparator Friend WithEvents BindingNavigatorPositionItem As System.Windows.Forms.ToolStripTextBox Friend WithEvents BindingNavigatorSeparator1 As System.Windows.Forms.ToolStripSeparator Friend WithEvents BindingNavigatorMoveNextItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorMoveLastItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorSeparator2 As System.Windows.Forms.ToolStripSeparator Friend WithEvents Izvjestaj_o_rodjenjuBindingNavigatorSaveItem As System.Windows.Forms.ToolStripButton Friend WithEvents Izvjestaj_o_rodjenjuDataGridView As System.Windows.Forms.DataGridView Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents OpisTextEdit As DevExpress.XtraEditors.TextEdit Friend WithEvents VrijemeDateEdit As DevExpress.XtraEditors.DateEdit Friend WithEvents DoktorTableAdapter As iBolnica.ibolnicaDataSetTableAdapters.doktorTableAdapter Friend WithEvents DoktorBindingSource As System.Windows.Forms.BindingSource Friend WithEvents PacijentTableAdapter As iBolnica.ibolnicaDataSetTableAdapters.pacijentTableAdapter Friend WithEvents PacijentBindingSource As System.Windows.Forms.BindingSource Friend WithEvents BtnUredi As System.Windows.Forms.Button Friend WithEvents BtnIzbrisi As System.Windows.Forms.Button Friend WithEvents BtnZatvori As System.Windows.Forms.Button Friend WithEvents BtnNovIzvjestaj As System.Windows.Forms.Button Friend WithEvents BtnDodajIzvjestaj As System.Windows.Forms.Button Friend WithEvents DataGridViewTextBoxColumn1 As System.Windows.Forms.DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn2 As System.Windows.Forms.DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn3 As System.Windows.Forms.DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn4 As System.Windows.Forms.DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn5 As System.Windows.Forms.DataGridViewTextBoxColumn End Class
error505/iHospital
iBolnica/IzvjestajORodjenju_Form.Designer.vb
Visual Basic
mit
32,821
Namespace Inspection ''' <summary>Query Part for Return Type/Type Sub-Classed (e.g. Is or Inherited From etc).</summary> ''' <autogenerated>Generated from a T4 template. Modifications will be lost, if applicable use a partial class instead.</autogenerated> ''' <generator-date>10/02/2014 15:53:09</generator-date> ''' <generator-functions>1</generator-functions> ''' <generator-source>Leviathan\_Inspection\Querying\Generated\TypePart.tt</generator-source> ''' <generator-template>Text-Templates\Classes\VB_Object.tt</generator-template> ''' <generator-version>1</generator-version> <System.CodeDom.Compiler.GeneratedCode("Leviathan\_Inspection\Querying\Generated\TypePart.tt", "1")> _ Partial Public Class TypePart Inherits System.Object #Region " Public Constructors " ''' <summary>Default Constructor</summary> Public Sub New() MyBase.New() End Sub ''' <summary>Parametered Constructor (1 Parameters)</summary> Public Sub New( _ ByVal _SubTypeOf As System.Type _ ) MyBase.New() SubTypeOf = _SubTypeOf End Sub #End Region #Region " Class Plumbing/Interface Code " #Region " Hashable Implementation " #Region " Public Methods " ''' <summary>Method to Generate a HashCode</summary> ''' <remarks></remarks> Public Overrides Function GetHashCode() As System.Int32 Return Leviathan.Caching.Simple.CombineHashCodes(GetType(TypePart), SubTypeOf) End Function #End Region #End Region #Region " Settable Implementation " #Region " Public Methods " Public Function SetSubTypeOf(_SubTypeOf As System.Type) As TypePart SubTypeOf = _SubTypeOf Return Me End Function #End Region #End Region #End Region #Region " Public Constants " ''' <summary>Public Shared Reference to the Name of the Property: SubTypeOf</summary> ''' <remarks></remarks> Public Const PROPERTY_SUBTYPEOF As String = "SubTypeOf" #End Region #Region " Private Variables " ''' <summary>Private Data Storage Variable for Property: SubTypeOf</summary> ''' <remarks></remarks> Private m_SubTypeOf As System.Type #End Region #Region " Public Properties " ''' <summary>Provides Access to the Property: SubTypeOf</summary> ''' <remarks></remarks> Public Property SubTypeOf() As System.Type Get Return m_SubTypeOf End Get Set(value As System.Type) m_SubTypeOf = value End Set End Property #End Region End Class End Namespace
thiscouldbejd/Leviathan
_Inspection/Querying/Generated/TypePart.vb
Visual Basic
mit
2,508
Option Explicit On Option Infer On Option Strict On #Region " --------------->> Imports/ usings " #End Region Namespace EnumHandling Public Class EnumMethods #Region " --------------->> Enumerationen der Klasse " #End Region '{Enumerationen der Klasse} #Region " --------------->> Eigenschaften der Klasse " #End Region '{Eigenschaften der Klasse} #Region " --------------->> Konstruktor und Destruktor der Klasse " #End Region '{Konstruktor und Destruktor der Klasse} #Region " --------------->> Zugriffsmethoden der Klasse " #End Region '{Zugriffsmethoden der Klasse} #Region " --------------->> Ereignismethoden Methoden der Klasse " #End Region '{Ereignismethoden der Klasse} #Region " --------------->> Private Methoden der Klasse " #End Region '{Private Methoden der Klasse} #Region " --------------->> Öffentliche Methoden der Klasse " '''<summary> '''Liefert ein Array mit den einzelnen Enum-Werte eines aus mehreren Enum-Werten '''bestehenden Enum-Wertes, wenn die Enumeration mit dem Flag-Attribut '''versehen wurde. '''</summary> Public Shared Function GetEnumValuesFromFlaggedEnumValue _ (Of T As Structure)(ByVal flaggedValue As Int32) As T() Dim result = New List(Of T) If flaggedValue > 0 Then Dim values = New List(Of Int32) For Each value In System.Enum.GetValues(GetType(T)) values.Add(Convert.ToInt32(value)) Next value values = values.OrderByDescending(Function(x) x).Where(Function(x) x > 0).ToList For Each value In values If flaggedValue \ value > 0 Then Dim valueName = System.Enum.GetName(GetType(T), value).ToString result.Add(CType(System.Enum.Parse(GetType(T), valueName), T)) flaggedValue = flaggedValue Mod value End If Next value Else Dim valueName = System.Enum.GetName(GetType(T), flaggedValue).ToString result.Add(CType(System.Enum.Parse(GetType(T), valueName), T)) End If Return result.ToArray End Function #End Region '{Öffentliche Methoden der Klasse} End Class End Namespace
vanitas-mundi/Base
Base/EnumHandling/EnumMethods.vb
Visual Basic
mit
2,204
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmPhysicsCalculator Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.lblHeading = New System.Windows.Forms.Label Me.lblInstructions = New System.Windows.Forms.Label Me.radAcceleration = New System.Windows.Forms.RadioButton Me.radDisplacement = New System.Windows.Forms.RadioButton Me.lblValues = New System.Windows.Forms.Label Me.lblDistance = New System.Windows.Forms.Label Me.lblAcceleration = New System.Windows.Forms.Label Me.lblTime = New System.Windows.Forms.Label Me.txtDisplacement = New System.Windows.Forms.TextBox Me.txtAcceleration = New System.Windows.Forms.TextBox Me.txtTime = New System.Windows.Forms.TextBox Me.lblResult = New System.Windows.Forms.Label Me.lblResult2 = New System.Windows.Forms.Label Me.btnCalculate = New System.Windows.Forms.Button Me.btnClear = New System.Windows.Forms.Button Me.btnExit = New System.Windows.Forms.Button Me.radTime = New System.Windows.Forms.RadioButton Me.SuspendLayout() ' 'lblHeading ' Me.lblHeading.AutoSize = True Me.lblHeading.Font = New System.Drawing.Font("Calibri", 18.0!, CType(((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic) _ Or System.Drawing.FontStyle.Underline), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblHeading.Location = New System.Drawing.Point(35, 25) Me.lblHeading.Name = "lblHeading" Me.lblHeading.Size = New System.Drawing.Size(507, 29) Me.lblHeading.TabIndex = 0 Me.lblHeading.Text = "Physics Acceleration and Displacement Calculator" ' 'lblInstructions ' Me.lblInstructions.AutoSize = True Me.lblInstructions.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblInstructions.Location = New System.Drawing.Point(338, 101) Me.lblInstructions.Name = "lblInstructions" Me.lblInstructions.Size = New System.Drawing.Size(227, 20) Me.lblInstructions.TabIndex = 1 Me.lblInstructions.Text = "What do you wish to calculate?" ' 'radAcceleration ' Me.radAcceleration.AutoSize = True Me.radAcceleration.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.radAcceleration.Location = New System.Drawing.Point(393, 159) Me.radAcceleration.Name = "radAcceleration" Me.radAcceleration.Size = New System.Drawing.Size(107, 22) Me.radAcceleration.TabIndex = 2 Me.radAcceleration.Text = "Acceleration" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) Me.radAcceleration.UseVisualStyleBackColor = True ' 'radDisplacement ' Me.radDisplacement.AutoSize = True Me.radDisplacement.Checked = True Me.radDisplacement.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.radDisplacement.Location = New System.Drawing.Point(393, 126) Me.radDisplacement.Name = "radDisplacement" Me.radDisplacement.Size = New System.Drawing.Size(116, 22) Me.radDisplacement.TabIndex = 1 Me.radDisplacement.TabStop = True Me.radDisplacement.Text = "Displacement" Me.radDisplacement.UseVisualStyleBackColor = True ' 'lblValues ' Me.lblValues.AutoSize = True Me.lblValues.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblValues.Location = New System.Drawing.Point(212, 99) Me.lblValues.Name = "lblValues" Me.lblValues.Size = New System.Drawing.Size(62, 20) Me.lblValues.TabIndex = 4 Me.lblValues.Text = "Values:" ' 'lblDistance ' Me.lblDistance.AutoSize = True Me.lblDistance.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblDistance.Location = New System.Drawing.Point(11, 128) Me.lblDistance.Name = "lblDistance" Me.lblDistance.Size = New System.Drawing.Size(162, 18) Me.lblDistance.TabIndex = 5 Me.lblDistance.Text = "Displacement (meters):" ' 'lblAcceleration ' Me.lblAcceleration.AutoSize = True Me.lblAcceleration.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblAcceleration.Location = New System.Drawing.Point(11, 161) Me.lblAcceleration.Name = "lblAcceleration" Me.lblAcceleration.Size = New System.Drawing.Size(132, 18) Me.lblAcceleration.TabIndex = 6 Me.lblAcceleration.Text = "Acceleration (m/s):" ' 'lblTime ' Me.lblTime.AutoSize = True Me.lblTime.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblTime.Location = New System.Drawing.Point(11, 194) Me.lblTime.Name = "lblTime" Me.lblTime.Size = New System.Drawing.Size(116, 18) Me.lblTime.TabIndex = 7 Me.lblTime.Text = "Time (seconds):" ' 'txtDisplacement ' Me.txtDisplacement.Location = New System.Drawing.Point(193, 127) Me.txtDisplacement.Name = "txtDisplacement" Me.txtDisplacement.Size = New System.Drawing.Size(100, 20) Me.txtDisplacement.TabIndex = 4 Me.txtDisplacement.TextAlign = System.Windows.Forms.HorizontalAlignment.Center ' 'txtAcceleration ' Me.txtAcceleration.Location = New System.Drawing.Point(193, 160) Me.txtAcceleration.Name = "txtAcceleration" Me.txtAcceleration.Size = New System.Drawing.Size(100, 20) Me.txtAcceleration.TabIndex = 5 Me.txtAcceleration.TextAlign = System.Windows.Forms.HorizontalAlignment.Center ' 'txtTime ' Me.txtTime.Location = New System.Drawing.Point(193, 193) Me.txtTime.Name = "txtTime" Me.txtTime.Size = New System.Drawing.Size(100, 20) Me.txtTime.TabIndex = 6 Me.txtTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center ' 'lblResult ' Me.lblResult.AutoSize = True Me.lblResult.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblResult.Location = New System.Drawing.Point(200, 243) Me.lblResult.Name = "lblResult" Me.lblResult.Size = New System.Drawing.Size(176, 18) Me.lblResult.TabIndex = 11 Me.lblResult.Text = "The XXXXXXXXXXXX is:" Me.lblResult.Visible = False ' 'lblResult2 ' Me.lblResult2.AutoSize = True Me.lblResult2.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblResult2.Location = New System.Drawing.Point(224, 270) Me.lblResult2.Name = "lblResult2" Me.lblResult2.Size = New System.Drawing.Size(128, 18) Me.lblResult2.TabIndex = 12 Me.lblResult2.Text = "XXXXXXXXXXXX" Me.lblResult2.Visible = False ' 'btnCalculate ' Me.btnCalculate.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnCalculate.Location = New System.Drawing.Point(36, 307) Me.btnCalculate.Name = "btnCalculate" Me.btnCalculate.Size = New System.Drawing.Size(128, 50) Me.btnCalculate.TabIndex = 7 Me.btnCalculate.Text = "Calculate" Me.btnCalculate.UseVisualStyleBackColor = True ' 'btnClear ' Me.btnClear.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.btnClear.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnClear.Location = New System.Drawing.Point(224, 305) Me.btnClear.Name = "btnClear" Me.btnClear.Size = New System.Drawing.Size(128, 50) Me.btnClear.TabIndex = 8 Me.btnClear.Text = "Clear" Me.btnClear.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnExit.Location = New System.Drawing.Point(412, 307) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(128, 50) Me.btnExit.TabIndex = 9 Me.btnExit.Text = "Exit" Me.btnExit.UseVisualStyleBackColor = True ' 'radTime ' Me.radTime.AutoSize = True Me.radTime.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.radTime.Location = New System.Drawing.Point(393, 192) Me.radTime.Name = "radTime" Me.radTime.Size = New System.Drawing.Size(59, 22) Me.radTime.TabIndex = 3 Me.radTime.Text = "Time" Me.radTime.UseVisualStyleBackColor = True ' 'frmPhysicsCalculator ' Me.AcceptButton = Me.btnCalculate Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.Beige Me.CancelButton = Me.btnClear Me.ClientSize = New System.Drawing.Size(576, 382) Me.Controls.Add(Me.radTime) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnClear) Me.Controls.Add(Me.btnCalculate) Me.Controls.Add(Me.lblResult2) Me.Controls.Add(Me.lblResult) Me.Controls.Add(Me.txtTime) Me.Controls.Add(Me.txtAcceleration) Me.Controls.Add(Me.txtDisplacement) Me.Controls.Add(Me.lblTime) Me.Controls.Add(Me.lblAcceleration) Me.Controls.Add(Me.lblDistance) Me.Controls.Add(Me.lblValues) Me.Controls.Add(Me.radDisplacement) Me.Controls.Add(Me.radAcceleration) Me.Controls.Add(Me.lblInstructions) Me.Controls.Add(Me.lblHeading) Me.Name = "frmPhysicsCalculator" Me.Text = "Physics Acceleration and Displacement Calculator" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents lblHeading As System.Windows.Forms.Label Friend WithEvents lblInstructions As System.Windows.Forms.Label Friend WithEvents radAcceleration As System.Windows.Forms.RadioButton Friend WithEvents radDisplacement As System.Windows.Forms.RadioButton Friend WithEvents lblValues As System.Windows.Forms.Label Friend WithEvents lblDistance As System.Windows.Forms.Label Friend WithEvents lblAcceleration As System.Windows.Forms.Label Friend WithEvents lblTime As System.Windows.Forms.Label Friend WithEvents txtDisplacement As System.Windows.Forms.TextBox Friend WithEvents txtAcceleration As System.Windows.Forms.TextBox Friend WithEvents txtTime As System.Windows.Forms.TextBox Friend WithEvents lblResult As System.Windows.Forms.Label Friend WithEvents lblResult2 As System.Windows.Forms.Label Friend WithEvents btnCalculate As System.Windows.Forms.Button Friend WithEvents btnClear As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents radTime As System.Windows.Forms.RadioButton End Class
Anders02/Physics-Displacement-Acceleration-Calculator-First-Program
PhysicsAccelerationDisplacementCalculator/frmPhysicsCalculator.Designer.vb
Visual Basic
mit
13,074
Namespace Reports <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class DetteClients Inherits System.Windows.Forms.Form 'Form remplace la méthode Dispose pour nettoyer la liste des composants. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Requise par le Concepteur Windows Form Private components As System.ComponentModel.IContainer 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form 'Elle peut être modifiée à l'aide du Concepteur Windows Form. 'Ne la modifiez pas à l'aide de l'éditeur de code. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(DetteClients)) Me.PanelContainer = New System.Windows.Forms.Panel() Me.Button1 = New System.Windows.Forms.Button() Me.labelTotal = New System.Windows.Forms.Label() Me.labelPayer = New System.Windows.Forms.Label() Me.labelReste = New System.Windows.Forms.Label() Me.ListDette = New System.Windows.Forms.ListView() Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader7 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader8 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.btnClose = New System.Windows.Forms.Button() Me.RadialPanel1 = New HG.UI.RadialPanel() Me.btnToutCF = New System.Windows.Forms.Button() Me.cmbClient = New System.Windows.Forms.ComboBox() Me.TransparentLabel1 = New HG.UI.TransparentLabel() Me.Label1 = New System.Windows.Forms.Label() Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.PanelContainer.SuspendLayout() Me.RadialPanel1.SuspendLayout() Me.SuspendLayout() ' 'PanelContainer ' Me.PanelContainer.BackColor = System.Drawing.Color.Transparent Me.PanelContainer.BackgroundImage = Global.HG.My.Resources.Resources.bg_img Me.PanelContainer.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch Me.PanelContainer.Controls.Add(Me.Button1) Me.PanelContainer.Controls.Add(Me.labelTotal) Me.PanelContainer.Controls.Add(Me.labelPayer) Me.PanelContainer.Controls.Add(Me.labelReste) Me.PanelContainer.Controls.Add(Me.ListDette) Me.PanelContainer.Controls.Add(Me.btnClose) Me.PanelContainer.Controls.Add(Me.RadialPanel1) Me.PanelContainer.Location = New System.Drawing.Point(0, 0) Me.PanelContainer.Name = "PanelContainer" Me.PanelContainer.Size = New System.Drawing.Size(1137, 701) Me.PanelContainer.TabIndex = 0 ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.DeepSkyBlue Me.Button1.Cursor = System.Windows.Forms.Cursors.Hand Me.Button1.Font = New System.Drawing.Font("Open Sans", 11.25!) Me.Button1.Image = CType(resources.GetObject("Button1.Image"), System.Drawing.Image) Me.Button1.Location = New System.Drawing.Point(460, 607) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(114, 42) Me.Button1.TabIndex = 103 Me.Button1.Text = "Imprimer" Me.Button1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText Me.Button1.UseVisualStyleBackColor = False ' 'labelTotal ' Me.labelTotal.BackColor = System.Drawing.Color.Honeydew Me.labelTotal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelTotal.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Bold) Me.labelTotal.Location = New System.Drawing.Point(599, 566) Me.labelTotal.Name = "labelTotal" Me.labelTotal.Size = New System.Drawing.Size(168, 36) Me.labelTotal.TabIndex = 102 Me.labelTotal.Text = "0 Fcfa" Me.labelTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'labelPayer ' Me.labelPayer.BackColor = System.Drawing.Color.Honeydew Me.labelPayer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelPayer.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Bold) Me.labelPayer.Location = New System.Drawing.Point(768, 566) Me.labelPayer.Name = "labelPayer" Me.labelPayer.Size = New System.Drawing.Size(168, 36) Me.labelPayer.TabIndex = 101 Me.labelPayer.Text = "0 Fcfa" Me.labelPayer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'labelReste ' Me.labelReste.BackColor = System.Drawing.Color.Honeydew Me.labelReste.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelReste.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Bold) Me.labelReste.Location = New System.Drawing.Point(937, 566) Me.labelReste.Name = "labelReste" Me.labelReste.Size = New System.Drawing.Size(168, 36) Me.labelReste.TabIndex = 101 Me.labelReste.Text = "0 Fcfa" Me.labelReste.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'ListDette ' Me.ListDette.Activation = System.Windows.Forms.ItemActivation.TwoClick Me.ListDette.AllowColumnReorder = True Me.ListDette.BackColor = System.Drawing.Color.White Me.ListDette.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader7, Me.ColumnHeader8}) Me.ListDette.Font = New System.Drawing.Font("Open Sans", 12.0!) Me.ListDette.FullRowSelect = True Me.ListDette.GridLines = True Me.ListDette.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable Me.ListDette.Location = New System.Drawing.Point(39, 105) Me.ListDette.MultiSelect = False Me.ListDette.Name = "ListDette" Me.ListDette.Size = New System.Drawing.Size(1071, 458) Me.ListDette.TabIndex = 100 Me.ListDette.UseCompatibleStateImageBehavior = False Me.ListDette.View = System.Windows.Forms.View.Details ' 'ColumnHeader5 ' Me.ColumnHeader5.Text = "Client" Me.ColumnHeader5.Width = 559 ' 'ColumnHeader6 ' Me.ColumnHeader6.Text = "Total" Me.ColumnHeader6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center Me.ColumnHeader6.Width = 168 ' 'ColumnHeader7 ' Me.ColumnHeader7.Text = "Payer" Me.ColumnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center Me.ColumnHeader7.Width = 168 ' 'ColumnHeader8 ' Me.ColumnHeader8.Text = "Reste" Me.ColumnHeader8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center Me.ColumnHeader8.Width = 168 ' 'btnClose ' Me.btnClose.BackColor = System.Drawing.Color.DeepSkyBlue Me.btnClose.Cursor = System.Windows.Forms.Cursors.Hand Me.btnClose.Font = New System.Drawing.Font("Open Sans", 11.25!) Me.btnClose.Image = CType(resources.GetObject("btnClose.Image"), System.Drawing.Image) Me.btnClose.Location = New System.Drawing.Point(577, 607) Me.btnClose.Name = "btnClose" Me.btnClose.Size = New System.Drawing.Size(103, 42) Me.btnClose.TabIndex = 96 Me.btnClose.Text = "Fermer" Me.btnClose.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText Me.ToolTip1.SetToolTip(Me.btnClose, "Fermer cette fenetre") Me.btnClose.UseVisualStyleBackColor = False ' 'RadialPanel1 ' Me.RadialPanel1.Controls.Add(Me.btnToutCF) Me.RadialPanel1.Controls.Add(Me.cmbClient) Me.RadialPanel1.Controls.Add(Me.TransparentLabel1) Me.RadialPanel1.Controls.Add(Me.Label1) Me.RadialPanel1.Location = New System.Drawing.Point(10, 21) Me.RadialPanel1.Name = "RadialPanel1" Me.RadialPanel1.Size = New System.Drawing.Size(1122, 53) Me.RadialPanel1.TabIndex = 67 ' 'btnToutCF ' Me.btnToutCF.BackColor = System.Drawing.Color.FromArgb(CType(CType(120, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(171, Byte), Integer)) Me.btnToutCF.Cursor = System.Windows.Forms.Cursors.Hand Me.btnToutCF.Font = New System.Drawing.Font("Consolas", 11.0!) Me.btnToutCF.Image = Global.HG.My.Resources.Resources.icon_tout Me.btnToutCF.Location = New System.Drawing.Point(907, 4) Me.btnToutCF.Name = "btnToutCF" Me.btnToutCF.Size = New System.Drawing.Size(49, 43) Me.btnToutCF.TabIndex = 63 Me.ToolTip1.SetToolTip(Me.btnToutCF, "Tout afficher") Me.btnToutCF.UseVisualStyleBackColor = False ' 'cmbClient ' Me.cmbClient.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend Me.cmbClient.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems Me.cmbClient.Font = New System.Drawing.Font("Open Sans", 12.0!) Me.cmbClient.FormattingEnabled = True Me.cmbClient.Location = New System.Drawing.Point(427, 11) Me.cmbClient.Name = "cmbClient" Me.cmbClient.Size = New System.Drawing.Size(461, 30) Me.cmbClient.TabIndex = 62 ' 'TransparentLabel1 ' Me.TransparentLabel1.AutoSize = True Me.TransparentLabel1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(242, Byte), Integer), CType(CType(242, Byte), Integer), CType(CType(242, Byte), Integer)) Me.TransparentLabel1.Location = New System.Drawing.Point(363, 17) Me.TransparentLabel1.Name = "TransparentLabel1" Me.TransparentLabel1.Size = New System.Drawing.Size(56, 19) Me.TransparentLabel1.TabIndex = 61 Me.TransparentLabel1.Text = "Client :" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.BackColor = System.Drawing.Color.Transparent Me.Label1.Font = New System.Drawing.Font("Open Sans", 25.0!, System.Drawing.FontStyle.Bold) Me.Label1.ForeColor = System.Drawing.Color.White Me.Label1.Location = New System.Drawing.Point(13, 2) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(252, 46) Me.Label1.TabIndex = 60 Me.Label1.Text = "Dettes clients" ' 'ToolTip1 ' Me.ToolTip1.IsBalloon = True ' 'DetteClients ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 18.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.Control Me.BackgroundImage = Global.HG.My.Resources.Resources.background Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch Me.ClientSize = New System.Drawing.Size(1179, 713) Me.Controls.Add(Me.PanelContainer) Me.Font = New System.Drawing.Font("Open Sans", 10.0!) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.Name = "DetteClients" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Dette Clients" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.PanelContainer.ResumeLayout(False) Me.RadialPanel1.ResumeLayout(False) Me.RadialPanel1.PerformLayout() Me.ResumeLayout(False) End Sub Friend WithEvents PanelContainer As System.Windows.Forms.Panel Friend WithEvents RadialPanel1 As HG.UI.RadialPanel Friend WithEvents TransparentLabel1 As HG.UI.TransparentLabel Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbClient As System.Windows.Forms.ComboBox Friend WithEvents btnClose As System.Windows.Forms.Button Friend WithEvents labelReste As System.Windows.Forms.Label Friend WithEvents ListDette As System.Windows.Forms.ListView Friend WithEvents ColumnHeader5 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader6 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader7 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader8 As System.Windows.Forms.ColumnHeader Friend WithEvents labelTotal As System.Windows.Forms.Label Friend WithEvents labelPayer As System.Windows.Forms.Label Friend WithEvents btnToutCF As System.Windows.Forms.Button Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip Friend WithEvents Button1 As System.Windows.Forms.Button End Class End Namespace
lepresk/HG
HG/Reports/DetteClients.Designer.vb
Visual Basic
mit
14,618
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.Collections.Immutable Imports System.Composition Imports System.Threading Imports Microsoft.CodeAnalysis.Completion Imports Microsoft.CodeAnalysis.Completion.Providers Imports Microsoft.CodeAnalysis.Host.Mef Imports Microsoft.CodeAnalysis.Options Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Extensions.ContextQuery Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers <ExportCompletionProvider(NameOf(SymbolCompletionProvider), LanguageNames.VisualBasic)> <ExtensionOrder(After:=NameOf(AwaitCompletionProvider))> <[Shared]> Partial Friend Class SymbolCompletionProvider Inherits AbstractRecommendationServiceBasedCompletionProvider(Of VisualBasicSyntaxContext) Private Shared ReadOnly s_cachedRules As New Dictionary(Of (importDirective As Boolean, preselect As Boolean, tuple As Boolean), CompletionItemRules) Shared Sub New() For importDirective = 0 To 1 For preselect = 0 To 1 For tuple = 0 To 1 Dim context = (importDirective:=importDirective = 1, preselect:=preselect = 1, tuple:=tuple = 1) s_cachedRules(context) = MakeRule(context) Next Next Next End Sub Private Shared Function MakeRule(context As (importDirective As Boolean, preselect As Boolean, tuple As Boolean)) As CompletionItemRules ' '(' should not filter the completion list, even though it's in generic items like IList(Of...) Dim generalBaseline = CompletionItemRules.Default. WithFilterCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Remove, "("c)). WithCommitCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Add, "("c)) Dim importDirectBasline = CompletionItemRules.Create( commitCharacterRules:=ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, "."c))) Dim rule = If(context.importDirective, importDirectBasline, generalBaseline) If context.preselect Then rule = rule.WithSelectionBehavior(CompletionItemSelectionBehavior.SoftSelection) End If If context.tuple Then rule = rule.WithCommitCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Remove, ":"c)) End If Return rule End Function <ImportingConstructor> <Obsolete(MefConstruction.ImportingConstructorMessage, True)> Public Sub New() End Sub Protected Overrides ReadOnly Property PreselectedItemSelectionBehavior As CompletionItemSelectionBehavior = CompletionItemSelectionBehavior.SoftSelection Protected Overrides Function ShouldPreselectInferredTypesAsync(completionContext As CompletionContext, position As Integer, options As OptionSet, cancellationToken As CancellationToken) As Task(Of Boolean) Return SpecializedTasks.True End Function Protected Overrides Function GetInsertionText(item As CompletionItem, ch As Char) As String Return GetInsertionTextAtInsertionTime(item, ch) End Function Public Overrides Function IsInsertionTrigger(text As SourceText, characterPosition As Integer, options As OptionSet) As Boolean Return IsDefaultTriggerCharacterOrParen(text, characterPosition, options) End Function Public Overrides ReadOnly Property TriggerCharacters As ImmutableHashSet(Of Char) = CompletionUtilities.CommonTriggerCharsAndParen Protected Overrides Function IsTriggerOnDot(token As SyntaxToken, characterPositoin As Integer) As Boolean If token.Kind() <> SyntaxKind.DotToken Then Return False End If Dim previousToken = token.GetPreviousToken() If previousToken.Kind = SyntaxKind.IntegerLiteralToken Then Return token.Parent.Kind <> SyntaxKind.SimpleMemberAccessExpression OrElse Not DirectCast(token.Parent, MemberAccessExpressionSyntax).Expression.IsKind(SyntaxKind.NumericLiteralExpression) End If Return True End Function Protected Overrides Function GetDisplayAndSuffixAndInsertionText(symbol As ISymbol, context As VisualBasicSyntaxContext) As (displayText As String, suffix As String, insertionText As String) Return CompletionUtilities.GetDisplayAndSuffixAndInsertionText(symbol, context) End Function Protected Overrides Function GetFilterText(symbol As ISymbol, displayText As String, context As VisualBasicSyntaxContext) As String ' Filter on New if we have a ctor If symbol.IsConstructor() Then Return "New" End If Return MyBase.GetFilterText(symbol, displayText, context) End Function Protected Overrides Function GetCompletionItemRules(symbols As ImmutableArray(Of (symbol As ISymbol, preselect As Boolean)), context As VisualBasicSyntaxContext) As CompletionItemRules Dim preselect = symbols.Any(Function(s) s.preselect) Return If(s_cachedRules(ValueTuple.Create(context.IsInImportsDirective, preselect, context.IsPossibleTupleContext)), CompletionItemRules.Default) End Function Protected Overrides Function IsInstrinsic(s As ISymbol) As Boolean Return If(TryCast(s, ITypeSymbol)?.IsIntrinsicType(), False) End Function End Class End Namespace
eriawan/roslyn
src/Features/VisualBasic/Portable/Completion/CompletionProviders/SymbolCompletionProvider.vb
Visual Basic
apache-2.0
5,947
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.Diagnostics.QualifyMemberAccess Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.QualifyMemberAccess <DiagnosticAnalyzer(LanguageNames.VisualBasic)> Friend NotInheritable Class VisualBasicQualifyMemberAccessDiagnosticAnalyzer Inherits QualifyMemberAccessDiagnosticAnalyzerBase(Of SyntaxKind) Protected Overrides Function GetLanguageName() As String Return LanguageNames.VisualBasic End Function Protected Overrides Function IsAlreadyQualifiedMemberAccess(node As SyntaxNode) As Boolean Return node.IsKind(SyntaxKind.MeExpression) End Function End Class End Namespace
natidea/roslyn
src/Features/VisualBasic/Portable/Diagnostics/Analyzers/VisualBasicQualifyMemberAccessDiagnosticAnalyzer.vb
Visual Basic
apache-2.0
892
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.NetFramework.Analyzers Imports Microsoft.NetFramework.Analyzers.Helpers Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.VisualBasic Namespace Microsoft.NetFramework.VisualBasic.Analyzers <DiagnosticAnalyzer(LanguageNames.VisualBasic)> Public Class BasicDoNotUseInsecureCryptographicAlgorithmsAnalyzer Inherits DoNotUseInsecureCryptographicAlgorithmsAnalyzer Protected Overrides Function GetAnalyzer(context As CompilationStartAnalysisContext, cryptTypes As CompilationSecurityTypes) As SyntaxNodeAnalyzer Dim analyzer As SyntaxNodeAnalyzer = New SyntaxNodeAnalyzer(cryptTypes) context.RegisterSyntaxNodeAction(AddressOf analyzer.AnalyzeNode, SyntaxKind.InvocationExpression, SyntaxKind.ObjectCreationExpression) Return analyzer End Function End Class End Namespace
heejaechang/roslyn-analyzers
src/Microsoft.NetFramework.Analyzers/VisualBasic/BasicDoNotUseInsecureCryptographicAlgorithms.vb
Visual Basic
apache-2.0
1,169
'*******************************************************************************************' ' ' ' Download Free Evaluation Version From: https://bytescout.com/download/web-installer ' ' ' ' Also available as Web API! Get free API Key https://app.pdf.co/signup ' ' ' ' Copyright © 2017-2020 ByteScout, Inc. All rights reserved. ' ' https://www.bytescout.com ' ' https://www.pdf.co ' '*******************************************************************************************' Imports System.IO Imports Bytescout.BarCodeReader Module Module1 Sub Main() Const imageFile As String = "RoyalMailKIX.png" Console.WriteLine("Reading barcode(s) from image {0}", Path.GetFullPath(imageFile)) Dim reader As New Reader() reader.RegistrationName = "demo" reader.RegistrationKey = "demo" ' Set barcode type to find reader.BarcodeTypesToFind.RoyalMailKIX = True ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- ' Read barcodes Dim barcodes As FoundBarcode() = reader.ReadFrom(imageFile) For Each barcode As FoundBarcode In barcodes Console.WriteLine("Found barcode with type '{0}' and value '{1}'", barcode.Type, barcode.Value) Next ' Cleanup reader.Dispose() Console.WriteLine("Press any key to exit..") Console.ReadKey() End Sub End Module
bytescout/ByteScout-SDK-SourceCode
Premium Suite/VB.NET/Decode royal mail kix barcode with barcode reader sdk/Module1.vb
Visual Basic
apache-2.0
2,164
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.IO Imports System.Xml.Linq Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.SpecialType Imports Microsoft.CodeAnalysis.Test.Utilities Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Microsoft.CodeAnalysis.VisualBasic.UnitTests.Emit Imports Microsoft.CodeAnalysis.VisualBasic.UnitTests.Semantics.ConversionsTests.Parameters Imports Roslyn.Test.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests.Semantics Public Class ConversionsTests Inherits BasicTestBase Private Const s_noConversion As ConversionKind = Nothing <Fact()> Public Sub TryCastDirectCastConversions() Dim dummyCode = <file> Class C1 Shared Sub MethodDecl() End Sub End Class </file> Dim dummyTree = VisualBasicSyntaxTree.ParseText(dummyCode.Value) ' Tests are based on the source code used to compile VBConversions.dll, VBConversions.vb is ' checked in next to the DLL. Dim vbConversionsRef = TestReferences.SymbolsTests.VBConversions Dim modifiersRef = TestReferences.SymbolsTests.CustomModifiers.Modifiers.dll Dim c1 = VisualBasicCompilation.Create("Test", syntaxTrees:={dummyTree}, references:={TestReferences.NetFx.v4_0_21006.mscorlib, vbConversionsRef, modifiersRef}) Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) Dim methodDeclSymbol = DirectCast(sourceModule.GlobalNamespace.GetTypeMembers("C1").Single().GetMembers("MethodDecl").Single(), SourceMethodSymbol) Dim methodBodyBinder = BinderBuilder.CreateBinderForMethodBody(sourceModule, dummyTree, methodDeclSymbol) Dim asmVBConversions = c1.GetReferencedAssemblySymbol(vbConversionsRef) Dim asmModifiers = c1.GetReferencedAssemblySymbol(modifiersRef) Dim test = asmVBConversions.Modules(0).GlobalNamespace.GetTypeMembers("Test").Single() Dim m13 = DirectCast(test.GetMembers("M13").Single(), MethodSymbol) Dim m13p = m13.Parameters.Select(Function(p) p.Type).ToArray() Assert.Equal(ConversionKind.WideningReference, ClassifyDirectCastAssignment(m13p(a), m13p(b), methodBodyBinder)) ' Object) Assert.Equal(ConversionKind.WideningValue, ClassifyDirectCastAssignment(m13p(a), m13p(c), methodBodyBinder)) ' Object) Assert.Equal(ConversionKind.NarrowingReference, ClassifyDirectCastAssignment(m13p(b), m13p(a), methodBodyBinder)) ' ValueType) Assert.Equal(ConversionKind.WideningValue, ClassifyDirectCastAssignment(m13p(b), m13p(c), methodBodyBinder)) ' ValueType) Assert.Equal(ConversionKind.NarrowingValue, ClassifyDirectCastAssignment(m13p(c), m13p(a), methodBodyBinder)) ' Integer) Assert.Equal(ConversionKind.NarrowingValue, ClassifyDirectCastAssignment(m13p(c), m13p(b), methodBodyBinder)) ' Integer) Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(c), m13p(c), methodBodyBinder))) ' Integer) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(c), m13p(d), methodBodyBinder)) ' Integer) 'error BC30311: Value of type 'Long' cannot be converted to 'Integer'. Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyDirectCastAssignment(m13p(c), m13p(e), methodBodyBinder)) ' Integer) Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(d), m13p(d), methodBodyBinder))) ' Long) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(d), m13p(c), methodBodyBinder)) ' Long) 'error BC30311: Value of type 'Integer' cannot be converted to 'Long'. Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(e), m13p(e), methodBodyBinder))) ' Enum1) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(e), m13p(f), methodBodyBinder)) ' Enum1) 'error BC30311: Value of type 'Enum2' cannot be converted to 'Enum1'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyDirectCastAssignment(m13p(e), m13p(g), methodBodyBinder)) ' Enum1) Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(f), m13p(f), methodBodyBinder))) ' Enum2) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(f), m13p(g), methodBodyBinder)) ' Enum2) ' error BC30311: Value of type 'Enum4' cannot be converted to 'Enum2'. Assert.Equal(ConversionKind.WideningArray, ClassifyDirectCastAssignment(m13p(h), m13p(i), methodBodyBinder)) ' Class8()) Assert.Equal(ConversionKind.NarrowingArray, ClassifyDirectCastAssignment(m13p(i), m13p(h), methodBodyBinder)) ' Class9()) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(i), m13p(j), methodBodyBinder)) ' Class9()) ' error BC30332: Value of type '1-dimensional array of Class11' cannot be converted to '1-dimensional array of Class9' because 'Class11' is not derived from 'Class9'. Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(k), m13p(k), methodBodyBinder))) ' MT1) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(k), m13p(l), methodBodyBinder)) ' MT1) ' error BC30311: Value of type 'MT2' cannot be converted to 'MT1'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyDirectCastAssignment(m13p(k), m13p(m), methodBodyBinder)) ' MT1) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(k), m13p(q), methodBodyBinder)) ' MT1) ' error BC30311: Value of type 'MT4' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(l), m13p(k), methodBodyBinder)) ' MT2) ' Value of type 'MT1' cannot be converted to 'MT2'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyDirectCastAssignment(m13p(m), m13p(k), methodBodyBinder)) ' MT3) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(n), m13p(o), methodBodyBinder)) ' MT1()) ' Value of type '1-dimensional array of MT2' cannot be converted to '1-dimensional array of MT1' because 'MT2' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(n), m13p(p), methodBodyBinder)) ' MT1()) ' error BC30332: Value of type '2-dimensional array of MT2' cannot be converted to '1-dimensional array of MT1' because 'MT2' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(n), m13p(u), methodBodyBinder)) ' MT1()) ' error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of MT1' because 'Integer' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(q), m13p(k), methodBodyBinder)) ' MT4) ' error BC30311: Value of type 'MT1' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(q), m13p(b), methodBodyBinder)) ' MT4) ' error BC30311: Value of type 'System.ValueType' cannot be converted Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(q), m13p(c), methodBodyBinder)) ' MT4) ' error BC30311: Value of type 'Integer' cannot be converted to 'MT4' Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(r), m13p(s), methodBodyBinder)) ' MT5) ' error BC30311: Value of type 'MT6' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(r), m13p(t), methodBodyBinder)) ' MT5) ' error BC30311: Value of type 'MT7' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(r), m13p(w), methodBodyBinder)) ' MT5) ' error BC30311: Value of type 'MT8' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(s), m13p(r), methodBodyBinder)) ' MT6) ' error BC30311: Value of type 'MT5' cannot be converted to 'MT6'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(s), m13p(t), methodBodyBinder)) ' MT6) ' error BC30311: Value of type 'MT7' cannot be converted to 'MT6'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyDirectCastAssignment(m13p(s), m13p(w), methodBodyBinder)) ' MT6) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(t), m13p(r), methodBodyBinder)) ' MT7) ' error BC30311: Value of type 'MT5' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(t), m13p(s), methodBodyBinder)) ' MT7) ' error BC30311: Value of type 'MT6' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(t), m13p(w), methodBodyBinder)) ' MT7) ' error BC30311: Value of type 'MT8' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(u), m13p(n), methodBodyBinder)) ' Integer()) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of Integer' because 'MT1' is not derived from 'Integer'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(u), m13p(v), methodBodyBinder)) ' Integer()) 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of Integer' because 'MT4' is not derived from 'Integer'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(v), m13p(u), methodBodyBinder)) ' MT4()) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of MT4' because 'Integer' is not derived from 'MT4'. Dim [nothing] = New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), ConstantValue.Nothing, Nothing) Dim intZero = New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), ConstantValue.Create(0I), m13p(c)) Dim longZero = New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), ConstantValue.Create(0L), m13p(d)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyDirectCastAssignment(m13p(a), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyDirectCastAssignment(m13p(b), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyDirectCastAssignment(m13p(c), [nothing], methodBodyBinder)) Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(c), intZero, methodBodyBinder))) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(c), longZero, methodBodyBinder)) 'error BC30311: Value of type 'Long' cannot be converted to 'Integer'. Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(d), intZero, methodBodyBinder)) ' error BC30311: Value of type 'Integer' cannot be converted to 'Long'. Assert.True(Conversions.IsIdentityConversion(ClassifyDirectCastAssignment(m13p(d), longZero, methodBodyBinder))) Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyDirectCastAssignment(m13p(e), intZero, methodBodyBinder)) Assert.Equal(s_noConversion, ClassifyDirectCastAssignment(m13p(e), longZero, methodBodyBinder)) ' error BC30311: Value of type 'Long' cannot be converted to 'Enum1'. Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyDirectCastAssignment(m13p(e), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyDirectCastAssignment(m13p(k), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyDirectCastAssignment(m13p(q), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningReference, ClassifyTryCastAssignment(m13p(a), m13p(b), methodBodyBinder)) ' Object) Assert.Equal(ConversionKind.WideningValue, ClassifyTryCastAssignment(m13p(a), m13p(c), methodBodyBinder)) ' Object) Assert.Equal(ConversionKind.NarrowingReference, ClassifyTryCastAssignment(m13p(b), m13p(a), methodBodyBinder)) ' ValueType) Assert.Equal(ConversionKind.WideningValue, ClassifyTryCastAssignment(m13p(b), m13p(c), methodBodyBinder)) ' ValueType) Assert.Equal(ConversionKind.NarrowingValue, ClassifyTryCastAssignment(m13p(c), m13p(a), methodBodyBinder)) ' Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(ConversionKind.NarrowingValue, ClassifyTryCastAssignment(m13p(c), m13p(b), methodBodyBinder)) ' Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(c), m13p(c), methodBodyBinder)) ' Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(c), m13p(d), methodBodyBinder)) ' Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyTryCastAssignment(m13p(c), m13p(e), methodBodyBinder)) ' Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(d), m13p(d), methodBodyBinder)) ' Long) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(d), m13p(c), methodBodyBinder)) ' Long) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(e), m13p(e), methodBodyBinder)) ' Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(e), m13p(f), methodBodyBinder)) ' Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyTryCastAssignment(m13p(e), m13p(g), methodBodyBinder)) ' Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(f), m13p(f), methodBodyBinder)) ' Enum2) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum2' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(f), m13p(g), methodBodyBinder)) ' Enum2) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum2' is a value type. Assert.Equal(ConversionKind.WideningArray, ClassifyTryCastAssignment(m13p(h), m13p(i), methodBodyBinder)) ' Class8()) Assert.Equal(ConversionKind.NarrowingArray, ClassifyTryCastAssignment(m13p(i), m13p(h), methodBodyBinder)) ' Class9()) Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(i), m13p(j), methodBodyBinder)) ' Class9()) ' error BC30332: Value of type '1-dimensional array of Class11' cannot be converted to '1-dimensional array of Class9' because 'Class11' is not derived from 'Class9'. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(k), m13p(k), methodBodyBinder)) ' MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(k), m13p(l), methodBodyBinder)) ' MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyTryCastAssignment(m13p(k), m13p(m), methodBodyBinder)) ' MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(k), m13p(q), methodBodyBinder)) ' MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(l), m13p(k), methodBodyBinder)) ' MT2) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT2' has no class constraint. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyTryCastAssignment(m13p(m), m13p(k), methodBodyBinder)) ' MT3) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT3' has no class constraint. Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(n), m13p(o), methodBodyBinder)) ' MT1()) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(n), m13p(p), methodBodyBinder)) ' MT1()) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(n), m13p(u), methodBodyBinder)) ' MT1()) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(q), m13p(k), methodBodyBinder)) ' MT4) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(q), m13p(b), methodBodyBinder)) ' MT4) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(q), m13p(c), methodBodyBinder)) ' MT4) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(r), m13p(s), methodBodyBinder)) ' MT5) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(r), m13p(t), methodBodyBinder)) ' MT5) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(r), m13p(w), methodBodyBinder)) ' MT5) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(s), m13p(r), methodBodyBinder)) ' MT6) Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(s), m13p(t), methodBodyBinder)) ' MT6) ' error BC30311: Value of type 'MT7' cannot be converted to 'MT6'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyTryCastAssignment(m13p(s), m13p(w), methodBodyBinder)) ' MT6) Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(t), m13p(r), methodBodyBinder)) ' MT7) Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(t), m13p(s), methodBodyBinder)) ' MT7) ' error BC30311: Value of type 'MT6' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(t), m13p(w), methodBodyBinder)) ' MT7) ' error BC30311: Value of type 'MT8' cannot be converted to 'MT7'. Assert.Equal(ConversionKind.Narrowing, ClassifyTryCastAssignment(m13p(u), m13p(n), methodBodyBinder)) ' Integer()) Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(u), m13p(v), methodBodyBinder)) ' Integer()) 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of Integer' because 'MT4' is not derived from 'Integer'. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(v), m13p(u), methodBodyBinder)) ' MT4()) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of MT4' because 'Integer' is not derived from 'MT4'. Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyTryCastAssignment(m13p(a), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningValue, ClassifyTryCastAssignment(m13p(a), intZero, methodBodyBinder)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyTryCastAssignment(m13p(b), [nothing], methodBodyBinder)) Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyTryCastAssignment(m13p(c), [nothing], methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(c), intZero, methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(c), longZero, methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(d), intZero, methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. Assert.Equal(ConversionKind.Identity, ClassifyTryCastAssignment(m13p(d), longZero, methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyTryCastAssignment(m13p(e), intZero, methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. Assert.Equal(s_noConversion, ClassifyTryCastAssignment(m13p(e), longZero, methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyTryCastAssignment(m13p(e), [nothing], methodBodyBinder)) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyTryCastAssignment(m13p(k), [nothing], methodBodyBinder)) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyTryCastAssignment(m13p(q), [nothing], methodBodyBinder)) End Sub Private Shared Function ClassifyDirectCastAssignment([to] As TypeSymbol, [from] As TypeSymbol, binder As Binder) As ConversionKind Dim result As ConversionKind = Conversions.ClassifyDirectCastConversion([from], [to], Nothing) And Not ConversionKind.MightSucceedAtRuntime Return result End Function Private Shared Function ClassifyDirectCastAssignment([to] As TypeSymbol, [from] As BoundLiteral, binder As Binder) As ConversionKind Dim result As ConversionKind = Conversions.ClassifyDirectCastConversion([from], [to], binder, Nothing) Return result End Function Private Shared Function ClassifyTryCastAssignment([to] As TypeSymbol, [from] As TypeSymbol, binder As Binder) As ConversionKind Dim result As ConversionKind = Conversions.ClassifyTryCastConversion([from], [to], Nothing) Return result End Function Private Shared Function ClassifyTryCastAssignment([to] As TypeSymbol, [from] As BoundLiteral, binder As Binder) As ConversionKind Dim result As ConversionKind = Conversions.ClassifyTryCastConversion([from], [to], binder, Nothing) Return result End Function Private Shared Function ClassifyConversion(source As TypeSymbol, destination As TypeSymbol) As ConversionKind Dim result As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(source, destination, Nothing) Assert.Null(result.Value) Return result.Key End Function Private Shared Function ClassifyConversion(source As BoundExpression, destination As TypeSymbol, binder As Binder) As ConversionKind Dim result As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(source, destination, binder, Nothing) Assert.Null(result.Value) Return result.Key End Function <Fact()> Public Sub ConstantExpressionConversions() Dim dummyCode = <file> Class C1 Shared Sub MethodDecl() End Sub End Class </file> Dim dummyTree = VisualBasicSyntaxTree.ParseText(dummyCode.Value) Dim c1 = VisualBasicCompilation.Create("Test", syntaxTrees:={dummyTree}, references:={TestReferences.NetFx.v4_0_21006.mscorlib}) Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) Dim methodDeclSymbol = DirectCast(sourceModule.GlobalNamespace.GetTypeMembers("C1").Single().GetMembers("MethodDecl").Single(), SourceMethodSymbol) Dim methodBodyBinder = BinderBuilder.CreateBinderForMethodBody(sourceModule, dummyTree, methodDeclSymbol) Assert.True(c1.Options.CheckOverflow) Dim objectType = c1.GetSpecialType(System_Object) Dim booleanType = c1.GetSpecialType(System_Boolean) Dim byteType = c1.GetSpecialType(System_Byte) Dim sbyteType = c1.GetSpecialType(System_SByte) Dim int16Type = c1.GetSpecialType(System_Int16) Dim uint16Type = c1.GetSpecialType(System_UInt16) Dim int32Type = c1.GetSpecialType(System_Int32) Dim uint32Type = c1.GetSpecialType(System_UInt32) Dim int64Type = c1.GetSpecialType(System_Int64) Dim uint64Type = c1.GetSpecialType(System_UInt64) Dim doubleType = c1.GetSpecialType(System_Double) Dim singleType = c1.GetSpecialType(System_Single) Dim decimalType = c1.GetSpecialType(System_Decimal) Dim dateType = c1.GetSpecialType(System_DateTime) Dim stringType = c1.GetSpecialType(System_String) Dim charType = c1.GetSpecialType(System_Char) Dim intPtrType = c1.GetSpecialType(System_IntPtr) Dim typeCodeType = c1.GlobalNamespace.GetMembers("System").OfType(Of NamespaceSymbol)().Single().GetTypeMembers("TypeCode").Single() Dim allTestTypes = New TypeSymbol() { objectType, booleanType, byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, doubleType, singleType, decimalType, dateType, stringType, charType, intPtrType, typeCodeType} Dim convertibleTypes = New HashSet(Of TypeSymbol)({ booleanType, byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, doubleType, singleType, decimalType, dateType, stringType, charType, typeCodeType}) Dim integralTypes = New HashSet(Of TypeSymbol)({ byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, typeCodeType}) Dim unsignedTypes = New HashSet(Of TypeSymbol)({ byteType, uint16Type, uint32Type, uint64Type}) Dim numericTypes = New HashSet(Of TypeSymbol)({ byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, doubleType, singleType, decimalType, typeCodeType}) Dim floatingTypes = New HashSet(Of TypeSymbol)({doubleType, singleType}) ' -------------- NOTHING literal conversions Dim _nothing = New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), ConstantValue.Nothing, Nothing) Dim resultValue As ConstantValue Dim integerOverflow As Boolean Dim literal As BoundExpression Dim constant As BoundConversion For Each testType In allTestTypes Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyConversion(_nothing, testType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(_nothing, testType, integerOverflow) If convertibleTypes.Contains(testType) Then Assert.NotNull(resultValue) Assert.Equal(If(testType.IsStringType(), ConstantValueTypeDiscriminator.Nothing, testType.GetConstantValueTypeDiscriminator()), resultValue.Discriminator) If testType IsNot dateType Then Assert.Equal(0, Convert.ToInt64(resultValue.Value)) If testType Is stringType Then Assert.Null(resultValue.StringValue) End If Else Assert.Equal(New DateTime(), resultValue.DateTimeValue) End If Else Assert.Null(resultValue) End If Assert.False(integerOverflow) If resultValue IsNot Nothing Then Assert.False(resultValue.IsBad) End If Next ' -------------- integer literal zero to enum conversions For Each integralType In integralTypes Dim zero = ConstantValue.Default(integralType.GetConstantValueTypeDiscriminator()) literal = New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), zero, integralType) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), literal, ConversionKind.Widening, True, True, zero, integralType, Nothing) Assert.Equal(If(integralType Is int32Type, ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, If(integralType Is typeCodeType, ConversionKind.Identity, ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions)), ClassifyConversion(literal, typeCodeType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, typeCodeType, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.Equal(ConstantValueTypeDiscriminator.Int32, resultValue.Discriminator) Assert.Equal(0, resultValue.Int32Value) Assert.Equal(If(integralType Is typeCodeType, ConversionKind.Identity, ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions), ClassifyConversion(constant, typeCodeType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(constant, typeCodeType, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.Equal(ConstantValueTypeDiscriminator.Int32, resultValue.Discriminator) Assert.Equal(0, resultValue.Int32Value) Next For Each convertibleType In convertibleTypes If Not integralTypes.Contains(convertibleType) Then Dim zero = ConstantValue.Default(If(convertibleType.IsStringType(), ConstantValueTypeDiscriminator.Nothing, convertibleType.GetConstantValueTypeDiscriminator())) If convertibleType.IsStringType() Then literal = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), ConstantValue.Null, Nothing), ConversionKind.WideningNothingLiteral, False, True, zero, convertibleType, Nothing) Else literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), zero, convertibleType) End If Assert.Equal(ClassifyConversion(convertibleType, typeCodeType), ClassifyConversion(literal, typeCodeType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, typeCodeType, integerOverflow) If Not numericTypes.Contains(convertibleType) AndAlso convertibleType IsNot booleanType Then Assert.Null(resultValue) Assert.False(integerOverflow) Else Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.Equal(ConstantValueTypeDiscriminator.Int32, resultValue.Discriminator) Assert.Equal(0, resultValue.Int32Value) End If End If Next ' -------------- Numeric conversions Dim nullableType = c1.GetSpecialType(System_Nullable_T) ' Zero For Each type1 In convertibleTypes Dim zero = ConstantValue.Default(If(type1.IsStringType(), ConstantValueTypeDiscriminator.Nothing, type1.GetConstantValueTypeDiscriminator())) If type1.IsStringType() Then literal = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), ConstantValue.Null, Nothing), ConversionKind.WideningNothingLiteral, False, True, zero, type1, Nothing) Else literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), zero, type1) End If constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Default(ConstantValueTypeDiscriminator.Int32), int32Type), ConversionKind.Widening, True, True, zero, type1, Nothing) For Each type2 In allTestTypes Dim expectedConv As ConversionKind If numericTypes.Contains(type1) AndAlso numericTypes.Contains(type2) Then If type1 Is type2 Then expectedConv = ConversionKind.Identity ElseIf type1.IsEnumType() Then expectedConv = ClassifyConversion(type1.GetEnumUnderlyingTypeOrSelf(), type2) If Conversions.IsWideningConversion(expectedConv) Then expectedConv = expectedConv Or ConversionKind.InvolvesEnumTypeConversions If (expectedConv And ConversionKind.Identity) <> 0 Then expectedConv = (expectedConv And Not ConversionKind.Identity) Or ConversionKind.Widening Or ConversionKind.Numeric End If ElseIf Conversions.IsNarrowingConversion(expectedConv) Then expectedConv = expectedConv Or ConversionKind.InvolvesEnumTypeConversions End If ElseIf type2.IsEnumType() Then expectedConv = ClassifyConversion(type1, type2.GetEnumUnderlyingTypeOrSelf()) If Not Conversions.NoConversion(expectedConv) Then expectedConv = (expectedConv And Not ConversionKind.Widening) Or ConversionKind.Narrowing Or ConversionKind.InvolvesEnumTypeConversions If (expectedConv And ConversionKind.Identity) <> 0 Then expectedConv = (expectedConv And Not ConversionKind.Identity) Or ConversionKind.Numeric End If End If ElseIf integralTypes.Contains(type2) Then If integralTypes.Contains(type1) Then If Conversions.IsNarrowingConversion(ClassifyConversion(type1, type2)) Then expectedConv = ConversionKind.WideningNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant Else expectedConv = ConversionKind.WideningNumeric End If Else expectedConv = ConversionKind.NarrowingNumeric End If ElseIf floatingTypes.Contains(type2) Then If Conversions.IsNarrowingConversion(ClassifyConversion(type1, type2)) Then expectedConv = ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant Else expectedConv = ConversionKind.WideningNumeric End If Else Assert.Same(decimalType, type2) expectedConv = ClassifyConversion(type1, type2) End If Assert.Equal(If(type2.IsEnumType() AndAlso type1 Is int32Type, ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, expectedConv), ClassifyConversion(literal, type2, methodBodyBinder)) Assert.Equal(expectedConv, ClassifyConversion(constant, type2, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, type2, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(type2.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal(0, Convert.ToDouble(resultValue.Value)) resultValue = Conversions.TryFoldConstantConversion(constant, type2, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(type2.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal(0, Convert.ToDouble(resultValue.Value)) Dim nullableType2 = nullableType.Construct(type2) expectedConv = ClassifyConversion(type1, nullableType2) Or (expectedConv And ConversionKind.InvolvesNarrowingFromNumericConstant) If type2.IsEnumType() AndAlso type1.SpecialType = SpecialType.System_Int32 Then Assert.Equal(expectedConv Or ConversionKind.InvolvesNarrowingFromNumericConstant, ClassifyConversion(literal, nullableType2, methodBodyBinder)) Else Assert.Equal(expectedConv, ClassifyConversion(literal, nullableType2, methodBodyBinder)) End If Assert.Equal(expectedConv, ClassifyConversion(constant, nullableType2, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) resultValue = Conversions.TryFoldConstantConversion(constant, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) ElseIf type1 Is booleanType AndAlso numericTypes.Contains(type2) Then ' Will test separately Continue For ElseIf type2 Is booleanType AndAlso numericTypes.Contains(type1) Then Assert.Equal(If(type1 Is typeCodeType, ConversionKind.NarrowingBoolean Or ConversionKind.InvolvesEnumTypeConversions, ConversionKind.NarrowingBoolean), ClassifyConversion(literal, type2, methodBodyBinder)) Assert.Equal(If(type1 Is typeCodeType, ConversionKind.NarrowingBoolean Or ConversionKind.InvolvesEnumTypeConversions, ConversionKind.NarrowingBoolean), ClassifyConversion(constant, type2, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, type2, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(type2.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.False(DirectCast(resultValue.Value, Boolean)) resultValue = Conversions.TryFoldConstantConversion(constant, type2, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(type2.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.False(DirectCast(resultValue.Value, Boolean)) ElseIf type1 Is stringType AndAlso type2 Is charType Then ' Will test separately Continue For ElseIf type1 Is charType AndAlso type2 Is stringType Then ' Will test separately Continue For ElseIf type2 Is typeCodeType AndAlso integralTypes.Contains(type1) Then ' Already tested Continue For ElseIf (type1 Is dateType AndAlso type2 Is dateType) OrElse (type1 Is booleanType AndAlso type2 Is booleanType) OrElse (type1 Is stringType AndAlso type2 Is stringType) OrElse (type1 Is charType AndAlso type2 Is charType) Then Assert.True(Conversions.IsIdentityConversion(ClassifyConversion(literal, type2, methodBodyBinder))) Assert.True(Conversions.IsIdentityConversion(ClassifyConversion(constant, type2, methodBodyBinder))) resultValue = Conversions.TryFoldConstantConversion(literal, type2, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.True(type2.IsValidForConstantValue(resultValue)) Assert.Equal(literal.ConstantValueOpt, resultValue) resultValue = Conversions.TryFoldConstantConversion(constant, type2, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.True(type2.IsValidForConstantValue(resultValue)) Assert.Equal(constant.ConstantValueOpt, resultValue) Else Dim expectedConv1 As KeyValuePair(Of ConversionKind, MethodSymbol) = Conversions.ClassifyConversion(type1, type2, Nothing) Assert.Equal(expectedConv1, Conversions.ClassifyConversion(literal, type2, methodBodyBinder, Nothing)) Assert.Equal(expectedConv1, Conversions.ClassifyConversion(constant, type2, methodBodyBinder, Nothing)) resultValue = Conversions.TryFoldConstantConversion(literal, type2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) resultValue = Conversions.TryFoldConstantConversion(constant, type2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) If type2.IsValueType Then Dim nullableType2 = nullableType.Construct(type2) expectedConv1 = Conversions.ClassifyConversion(type1, nullableType2, Nothing) Assert.Equal(expectedConv1, Conversions.ClassifyConversion(literal, nullableType2, methodBodyBinder, Nothing)) Assert.Equal(expectedConv1, Conversions.ClassifyConversion(constant, nullableType2, methodBodyBinder, Nothing)) resultValue = Conversions.TryFoldConstantConversion(literal, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) resultValue = Conversions.TryFoldConstantConversion(constant, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) End If End If Next Next ' -------- Numeric non-zero values Dim nonZeroValues = New TypeAndValue() { New TypeAndValue(sbyteType, SByte.MinValue), New TypeAndValue(int16Type, Int16.MinValue), New TypeAndValue(int32Type, Int32.MinValue), New TypeAndValue(int64Type, Int64.MinValue), New TypeAndValue(doubleType, Double.MinValue), New TypeAndValue(singleType, Single.MinValue), New TypeAndValue(decimalType, Decimal.MinValue), New TypeAndValue(sbyteType, SByte.MaxValue), New TypeAndValue(int16Type, Int16.MaxValue), New TypeAndValue(int32Type, Int32.MaxValue), New TypeAndValue(int64Type, Int64.MaxValue), New TypeAndValue(byteType, Byte.MaxValue), New TypeAndValue(uint16Type, UInt16.MaxValue), New TypeAndValue(uint32Type, UInt32.MaxValue), New TypeAndValue(uint64Type, UInt64.MaxValue), New TypeAndValue(doubleType, Double.MaxValue), New TypeAndValue(singleType, Single.MaxValue), New TypeAndValue(decimalType, Decimal.MaxValue), New TypeAndValue(sbyteType, CSByte(-1)), New TypeAndValue(int16Type, CShort(-2)), New TypeAndValue(int32Type, CInt(-3)), New TypeAndValue(int64Type, CLng(-4)), New TypeAndValue(sbyteType, CSByte(5)), New TypeAndValue(int16Type, CShort(6)), New TypeAndValue(int32Type, CInt(7)), New TypeAndValue(int64Type, CLng(8)), New TypeAndValue(doubleType, CDbl(-9)), New TypeAndValue(singleType, CSng(-10)), New TypeAndValue(decimalType, CDec(-11)), New TypeAndValue(doubleType, CDbl(12)), New TypeAndValue(singleType, CSng(13)), New TypeAndValue(decimalType, CDec(14)), New TypeAndValue(byteType, CByte(15)), New TypeAndValue(uint16Type, CUShort(16)), New TypeAndValue(uint32Type, CUInt(17)), New TypeAndValue(uint64Type, CULng(18)), New TypeAndValue(decimalType, CDec(-11.3)), New TypeAndValue(doubleType, CDbl(&HF000000000000000UL)), New TypeAndValue(doubleType, CDbl(&H70000000000000F0L)), New TypeAndValue(typeCodeType, Int32.MinValue), New TypeAndValue(typeCodeType, Int32.MaxValue), New TypeAndValue(typeCodeType, CInt(-3)), New TypeAndValue(typeCodeType, CInt(7)) } Dim resultValue2 As ConstantValue Dim integerOverflow2 As Boolean For Each mv In nonZeroValues Dim v = ConstantValue.Create(mv.Value, mv.Type.GetConstantValueTypeDiscriminator()) Assert.Equal(v.Discriminator, mv.Type.GetConstantValueTypeDiscriminator()) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), v, mv.Type) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, v, mv.Type, Nothing) For Each numericType In numericTypes Dim typeConv = ClassifyConversion(mv.Type, numericType) Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder) Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder) Assert.Equal(conv, conv2) resultValue = Conversions.TryFoldConstantConversion(literal, numericType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, numericType, integerOverflow2) Assert.Equal(resultValue Is Nothing, resultValue2 Is Nothing) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue IsNot Nothing AndAlso resultValue.IsBad, resultValue2 IsNot Nothing AndAlso resultValue2.IsBad) If resultValue IsNot Nothing Then Assert.Equal(resultValue2, resultValue) If Not resultValue.IsBad Then Assert.Equal(numericType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) End If End If Dim resultValueAsObject As Object = Nothing Dim overflow As Boolean = False Try resultValueAsObject = CheckedConvert(v.Value, numericType) Catch ex As OverflowException overflow = True End Try If Not overflow Then If Conversions.IsIdentityConversion(typeConv) Then Assert.True(Conversions.IsIdentityConversion(conv)) ElseIf Conversions.IsNarrowingConversion(typeConv) Then If mv.Type Is doubleType AndAlso numericType Is singleType Then Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant, conv) ElseIf integralTypes.Contains(mv.Type) AndAlso integralTypes.Contains(numericType) AndAlso Not mv.Type.IsEnumType() AndAlso Not numericType.IsEnumType() Then Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant, conv) Else Assert.Equal(typeConv, conv) End If ElseIf mv.Type.IsEnumType() Then Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, conv) Else Assert.Equal(ConversionKind.WideningNumeric, conv) End If Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(resultValueAsObject, resultValue.Value) If mv.Type Is doubleType AndAlso numericType Is singleType Then If v.DoubleValue = Double.MinValue Then Dim min As Single = Double.MinValue Assert.True(Single.IsNegativeInfinity(min)) Assert.Equal(resultValue.SingleValue, min) ElseIf v.DoubleValue = Double.MaxValue Then Dim max As Single = Double.MaxValue Assert.Equal(Double.MaxValue, v.DoubleValue) Assert.True(Single.IsPositiveInfinity(max)) Assert.Equal(resultValue.SingleValue, max) End If End If ElseIf Not integralTypes.Contains(mv.Type) OrElse Not integralTypes.Contains(numericType) Then 'Assert.Equal(typeConv, conv) If integralTypes.Contains(numericType) Then Assert.NotNull(resultValue) If resultValue.IsBad Then Assert.False(integerOverflow) Assert.Equal(ConversionKind.FailedDueToNumericOverflow, conv) Else Assert.True(integerOverflow) Assert.Equal(ConversionKind.FailedDueToIntegerOverflow, conv) Dim intermediate As Object If unsignedTypes.Contains(numericType) Then intermediate = Convert.ToUInt64(mv.Value) Else intermediate = Convert.ToInt64(mv.Value) End If Dim gotException As Boolean Try gotException = False CheckedConvert(intermediate, numericType) ' Should get an overflow Catch x As Exception gotException = True End Try Assert.True(gotException) Assert.Equal(UncheckedConvert(intermediate, numericType), resultValue.Value) End If Else Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.True(resultValue.IsBad) Assert.Equal(ConversionKind.FailedDueToNumericOverflow, conv) End If Else ' An integer overflow case Assert.Equal(ConversionKind.FailedDueToIntegerOverflow, conv) Assert.NotNull(resultValue) Assert.True(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(UncheckedConvert(v.Value, numericType), resultValue.Value) End If Dim nullableType2 = nullableType.Construct(numericType) Dim zero = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Default(mv.Type.GetConstantValueTypeDiscriminator()), mv.Type, Nothing) conv = ClassifyConversion(literal, numericType, methodBodyBinder) If (conv And ConversionKind.FailedDueToNumericOverflowMask) = 0 Then conv = ClassifyConversion(mv.Type, nullableType2) Or (ClassifyConversion(zero, nullableType2, methodBodyBinder) And ConversionKind.InvolvesNarrowingFromNumericConstant) End If Assert.Equal(conv, ClassifyConversion(literal, nullableType2, methodBodyBinder)) Assert.Equal(conv, ClassifyConversion(constant, nullableType2, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) resultValue = Conversions.TryFoldConstantConversion(constant, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) Next Next Dim dbl As Double = -1.5 Dim doubleValue = ConstantValue.Create(dbl) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, doubleValue, doubleType, Nothing) resultValue = Conversions.TryFoldConstantConversion(constant, int32Type, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(-2, CInt(dbl)) Assert.Equal(-2, DirectCast(resultValue.Value, Int32)) dbl = -2.5 doubleValue = ConstantValue.Create(dbl) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, doubleValue, doubleType, Nothing) resultValue = Conversions.TryFoldConstantConversion(constant, int32Type, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(-2, CInt(dbl)) Assert.Equal(-2, DirectCast(resultValue.Value, Int32)) dbl = 1.5 doubleValue = ConstantValue.Create(dbl) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, doubleValue, doubleType, Nothing) resultValue = Conversions.TryFoldConstantConversion(constant, uint32Type, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(2UI, CUInt(dbl)) Assert.Equal(2UI, DirectCast(resultValue.Value, UInt32)) dbl = 2.5 doubleValue = ConstantValue.Create(dbl) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, doubleValue, doubleType, Nothing) resultValue = Conversions.TryFoldConstantConversion(constant, uint32Type, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(2UI, CUInt(dbl)) Assert.Equal(2UI, DirectCast(resultValue.Value, UInt32)) dbl = 2147483648.0 * 4294967296.0 + 10 doubleValue = ConstantValue.Create(dbl) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, doubleValue, doubleType, Nothing) resultValue = Conversions.TryFoldConstantConversion(constant, uint64Type, integerOverflow) Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(Convert.ToUInt64(dbl), DirectCast(resultValue.Value, UInt64)) ' ------- Boolean Dim falseValue = ConstantValue.Create(False) Assert.Equal(falseValue.Discriminator, booleanType.GetConstantValueTypeDiscriminator()) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), falseValue, booleanType) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, falseValue, booleanType, Nothing) For Each numericType In numericTypes Dim typeConv = ClassifyConversion(booleanType, numericType) Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder) Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder) Assert.Equal(conv, conv2) Assert.Equal(typeConv, conv) resultValue = Conversions.TryFoldConstantConversion(literal, numericType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, numericType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue.IsBad, resultValue2.IsBad) Assert.Equal(resultValue2, resultValue) Assert.Equal(numericType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal(0, Convert.ToInt64(resultValue.Value)) Next Dim trueValue = ConstantValue.Create(True) Assert.Equal(falseValue.Discriminator, booleanType.GetConstantValueTypeDiscriminator()) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), trueValue, booleanType) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, trueValue, booleanType, Nothing) For Each numericType In numericTypes Dim typeConv = ClassifyConversion(booleanType, numericType) Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder) Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder) Assert.Equal(conv, conv2) Assert.Equal(typeConv, conv) resultValue = Conversions.TryFoldConstantConversion(literal, numericType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, numericType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue.IsBad, resultValue2.IsBad) Assert.Equal(resultValue2, resultValue) Assert.Equal(numericType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) 'The literal True converts to the literal 255 for Byte, 65535 for UShort, 4294967295 for UInteger, 18446744073709551615 for ULong, 'and to the expression -1 for SByte, Short, Integer, Long, Decimal, Single, and Double If numericType Is byteType Then Assert.Equal(255, DirectCast(resultValue.Value, Byte)) ElseIf numericType Is uint16Type Then Assert.Equal(65535, DirectCast(resultValue.Value, UInt16)) ElseIf numericType Is uint32Type Then Assert.Equal(4294967295, DirectCast(resultValue.Value, UInt32)) ElseIf numericType Is uint64Type Then Assert.Equal(18446744073709551615UL, DirectCast(resultValue.Value, UInt64)) Else Assert.Equal(-1, Convert.ToInt64(resultValue.Value)) End If Next resultValue = Conversions.TryFoldConstantConversion(literal, booleanType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, booleanType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue.IsBad, resultValue2.IsBad) Assert.Equal(resultValue2, resultValue) Assert.Equal(booleanType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.True(DirectCast(resultValue.Value, Boolean)) For Each mv In nonZeroValues Dim v = ConstantValue.Create(mv.Value, mv.Type.GetConstantValueTypeDiscriminator()) Assert.Equal(v.Discriminator, mv.Type.GetConstantValueTypeDiscriminator()) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), v, mv.Type) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, v, mv.Type, Nothing) Dim typeConv = ClassifyConversion(mv.Type, booleanType) Dim conv = ClassifyConversion(literal, booleanType, methodBodyBinder) Dim conv2 = ClassifyConversion(constant, booleanType, methodBodyBinder) Assert.Equal(conv, conv2) Assert.Equal(typeConv, conv) resultValue = Conversions.TryFoldConstantConversion(literal, booleanType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, booleanType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue2, resultValue) Assert.Equal(booleanType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.True(DirectCast(resultValue.Value, Boolean)) Next ' ------- String <-> Char Dim stringValue = ConstantValue.Nothing Assert.Null(stringValue.StringValue) literal = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), stringValue, Nothing), ConversionKind.WideningNothingLiteral, False, True, stringValue, stringType, Nothing) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, stringValue, stringType, Nothing) Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(literal, charType, methodBodyBinder)) Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(constant, charType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, charType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, charType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue2, resultValue) Assert.Equal(charType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal(ChrW(0), CChar(stringValue.StringValue)) Assert.Equal(ChrW(0), DirectCast(resultValue.Value, Char)) stringValue = ConstantValue.Create("") Assert.Equal(0, stringValue.StringValue.Length) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), stringValue, stringType) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, stringValue, stringType, Nothing) Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(literal, charType, methodBodyBinder)) Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(constant, charType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, charType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, charType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue2, resultValue) Assert.Equal(charType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal(ChrW(0), CChar("")) Assert.Equal(ChrW(0), DirectCast(resultValue.Value, Char)) stringValue = ConstantValue.Create("abc") literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), stringValue, stringType) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, stringValue, stringType, Nothing) Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(literal, charType, methodBodyBinder)) Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(constant, charType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, charType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, charType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue2, resultValue) Assert.Equal(charType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal("a"c, DirectCast(resultValue.Value, Char)) Dim charValue = ConstantValue.Create("b"c) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), charValue, charType) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, charValue, charType, Nothing) Assert.Equal(ConversionKind.WideningString, ClassifyConversion(literal, stringType, methodBodyBinder)) Assert.Equal(ConversionKind.WideningString, ClassifyConversion(constant, stringType, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, stringType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, stringType, integerOverflow2) Assert.NotNull(resultValue) Assert.NotNull(resultValue2) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(integerOverflow, integerOverflow2) Assert.Equal(resultValue2, resultValue) Assert.Equal(stringType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) Assert.Equal("b", DirectCast(resultValue.Value, String)) End Sub <Fact()> Public Sub ConstantExpressionConversions2() Dim dummyCode = <file> Class C1 Shared Sub MethodDecl() End Sub End Class </file> Dim dummyTree = VisualBasicSyntaxTree.ParseText(dummyCode.Value) Dim c1 = VisualBasicCompilation.Create("Test", syntaxTrees:={dummyTree}, references:={TestReferences.NetFx.v4_0_21006.mscorlib}, options:=TestOptions.ReleaseExe.WithOverflowChecks(False)) Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) Dim methodDeclSymbol = DirectCast(sourceModule.GlobalNamespace.GetTypeMembers("C1").Single().GetMembers("MethodDecl").Single(), SourceMethodSymbol) Dim methodBodyBinder = BinderBuilder.CreateBinderForMethodBody(sourceModule, dummyTree, methodDeclSymbol) Assert.False(c1.Options.CheckOverflow) Dim objectType = c1.GetSpecialType(System_Object) Dim booleanType = c1.GetSpecialType(System_Boolean) Dim byteType = c1.GetSpecialType(System_Byte) Dim sbyteType = c1.GetSpecialType(System_SByte) Dim int16Type = c1.GetSpecialType(System_Int16) Dim uint16Type = c1.GetSpecialType(System_UInt16) Dim int32Type = c1.GetSpecialType(System_Int32) Dim uint32Type = c1.GetSpecialType(System_UInt32) Dim int64Type = c1.GetSpecialType(System_Int64) Dim uint64Type = c1.GetSpecialType(System_UInt64) Dim doubleType = c1.GetSpecialType(System_Double) Dim singleType = c1.GetSpecialType(System_Single) Dim decimalType = c1.GetSpecialType(System_Decimal) Dim dateType = c1.GetSpecialType(System_DateTime) Dim stringType = c1.GetSpecialType(System_String) Dim charType = c1.GetSpecialType(System_Char) Dim intPtrType = c1.GetSpecialType(System_IntPtr) Dim typeCodeType = c1.GlobalNamespace.GetMembers("System").OfType(Of NamespaceSymbol)().Single().GetTypeMembers("TypeCode").Single() Dim allTestTypes = New TypeSymbol() { objectType, booleanType, byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, doubleType, singleType, decimalType, dateType, stringType, charType, intPtrType, typeCodeType} Dim convertibleTypes = New HashSet(Of TypeSymbol)({ booleanType, byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, doubleType, singleType, decimalType, dateType, stringType, charType, typeCodeType}) Dim integralTypes = New HashSet(Of TypeSymbol)({ byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, typeCodeType}) Dim unsignedTypes = New HashSet(Of TypeSymbol)({ byteType, uint16Type, uint32Type, uint64Type}) Dim numericTypes = New HashSet(Of TypeSymbol)({ byteType, sbyteType, int16Type, uint16Type, int32Type, uint32Type, int64Type, uint64Type, doubleType, singleType, decimalType, typeCodeType}) Dim floatingTypes = New HashSet(Of TypeSymbol)({doubleType, singleType}) Dim _nothing = New BoundLiteral(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), ConstantValue.Nothing, Nothing) Dim resultValue As ConstantValue Dim integerOverflow As Boolean Dim literal As BoundLiteral Dim constant As BoundConversion Dim nullableType = c1.GetSpecialType(System_Nullable_T) ' -------- Numeric non-zero values Dim nonZeroValues = New TypeAndValue() { New TypeAndValue(sbyteType, SByte.MinValue), New TypeAndValue(int16Type, Int16.MinValue), New TypeAndValue(int32Type, Int32.MinValue), New TypeAndValue(int64Type, Int64.MinValue), New TypeAndValue(doubleType, Double.MinValue), New TypeAndValue(singleType, Single.MinValue), New TypeAndValue(decimalType, Decimal.MinValue), New TypeAndValue(sbyteType, SByte.MaxValue), New TypeAndValue(int16Type, Int16.MaxValue), New TypeAndValue(int32Type, Int32.MaxValue), New TypeAndValue(int64Type, Int64.MaxValue), New TypeAndValue(byteType, Byte.MaxValue), New TypeAndValue(uint16Type, UInt16.MaxValue), New TypeAndValue(uint32Type, UInt32.MaxValue), New TypeAndValue(uint64Type, UInt64.MaxValue), New TypeAndValue(doubleType, Double.MaxValue), New TypeAndValue(singleType, Single.MaxValue), New TypeAndValue(decimalType, Decimal.MaxValue), New TypeAndValue(sbyteType, CSByte(-1)), New TypeAndValue(int16Type, CShort(-2)), New TypeAndValue(int32Type, CInt(-3)), New TypeAndValue(int64Type, CLng(-4)), New TypeAndValue(sbyteType, CSByte(5)), New TypeAndValue(int16Type, CShort(6)), New TypeAndValue(int32Type, CInt(7)), New TypeAndValue(int64Type, CLng(8)), New TypeAndValue(doubleType, CDbl(-9)), New TypeAndValue(singleType, CSng(-10)), New TypeAndValue(decimalType, CDec(-11)), New TypeAndValue(doubleType, CDbl(12)), New TypeAndValue(singleType, CSng(13)), New TypeAndValue(decimalType, CDec(14)), New TypeAndValue(byteType, CByte(15)), New TypeAndValue(uint16Type, CUShort(16)), New TypeAndValue(uint32Type, CUInt(17)), New TypeAndValue(uint64Type, CULng(18)), New TypeAndValue(decimalType, CDec(-11.3)), New TypeAndValue(doubleType, CDbl(&HF000000000000000UL)), New TypeAndValue(doubleType, CDbl(&H70000000000000F0L)), New TypeAndValue(typeCodeType, Int32.MinValue), New TypeAndValue(typeCodeType, Int32.MaxValue), New TypeAndValue(typeCodeType, CInt(-3)), New TypeAndValue(typeCodeType, CInt(7)) } Dim resultValue2 As ConstantValue Dim integerOverflow2 As Boolean For Each mv In nonZeroValues Dim v = ConstantValue.Create(mv.Value, mv.Type.GetConstantValueTypeDiscriminator()) Assert.Equal(v.Discriminator, mv.Type.GetConstantValueTypeDiscriminator()) literal = New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), v, mv.Type) constant = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, v, mv.Type, Nothing) For Each numericType In numericTypes Dim typeConv = ClassifyConversion(mv.Type, numericType) Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder) Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder) Assert.Equal(conv, conv2) resultValue = Conversions.TryFoldConstantConversion(literal, numericType, integerOverflow) resultValue2 = Conversions.TryFoldConstantConversion(constant, numericType, integerOverflow2) Assert.Equal(resultValue Is Nothing, resultValue2 Is Nothing) Assert.Equal(integerOverflow, integerOverflow2) If resultValue IsNot Nothing Then Assert.Equal(resultValue2, resultValue) If Not resultValue.IsBad Then Assert.Equal(numericType.GetConstantValueTypeDiscriminator(), resultValue.Discriminator) End If End If Dim resultValueAsObject As Object = Nothing Dim overflow As Boolean = False Try resultValueAsObject = CheckedConvert(v.Value, numericType) Catch ex As OverflowException overflow = True End Try If Not overflow Then If Conversions.IsIdentityConversion(typeConv) Then Assert.True(Conversions.IsIdentityConversion(conv)) ElseIf Conversions.IsNarrowingConversion(typeConv) Then If mv.Type Is doubleType AndAlso numericType Is singleType Then Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant, conv) ElseIf integralTypes.Contains(mv.Type) AndAlso numericType.IsEnumType() Then Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, conv) ElseIf integralTypes.Contains(mv.Type) AndAlso integralTypes.Contains(numericType) AndAlso Not mv.Type.IsEnumType() AndAlso Not numericType.IsEnumType() Then Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant, conv) Else Assert.Equal(typeConv, conv) End If ElseIf mv.Type.IsEnumType() Then Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, conv) Else Assert.Equal(ConversionKind.WideningNumeric, conv) End If Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(resultValueAsObject, resultValue.Value) If mv.Type Is doubleType AndAlso numericType Is singleType Then If v.DoubleValue = Double.MinValue Then Dim min As Single = Double.MinValue Assert.True(Single.IsNegativeInfinity(min)) Assert.Equal(resultValue.SingleValue, min) ElseIf v.DoubleValue = Double.MaxValue Then Dim max As Single = Double.MaxValue Assert.Equal(Double.MaxValue, v.DoubleValue) Assert.True(Single.IsPositiveInfinity(max)) Assert.Equal(resultValue.SingleValue, max) End If End If ElseIf Not integralTypes.Contains(mv.Type) OrElse Not integralTypes.Contains(numericType) Then 'Assert.Equal(typeConv, conv) If integralTypes.Contains(numericType) Then Assert.NotNull(resultValue) If resultValue.IsBad Then Assert.False(integerOverflow) Assert.Equal(ConversionKind.FailedDueToNumericOverflow, conv) Else Assert.True(integerOverflow) Assert.Equal(typeConv, conv) Dim intermediate As Object If unsignedTypes.Contains(numericType) Then intermediate = Convert.ToUInt64(mv.Value) Else intermediate = Convert.ToInt64(mv.Value) End If Dim gotException As Boolean Try gotException = False CheckedConvert(intermediate, numericType) ' Should get an overflow Catch x As Exception gotException = True End Try Assert.True(gotException) Assert.Equal(UncheckedConvert(intermediate, numericType), resultValue.Value) End If Else Assert.NotNull(resultValue) Assert.False(integerOverflow) Assert.True(resultValue.IsBad) Assert.Equal(ConversionKind.FailedDueToNumericOverflow, conv) End If Else ' An integer overflow case If numericType.IsEnumType() OrElse mv.Type.IsEnumType() Then Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, conv) Else Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesNarrowingFromNumericConstant, conv) End If Assert.NotNull(resultValue) Assert.True(integerOverflow) Assert.False(resultValue.IsBad) Assert.Equal(UncheckedConvert(v.Value, numericType), resultValue.Value) End If Dim nullableType2 = nullableType.Construct(numericType) Dim zero = New BoundConversion(dummyTree.GetVisualBasicRoot(Nothing), New BoundLiteral(dummyTree.GetVisualBasicRoot(Nothing), ConstantValue.Default(ConstantValueTypeDiscriminator.Int32), int32Type), ConversionKind.Widening, True, True, ConstantValue.Default(mv.Type.GetConstantValueTypeDiscriminator()), mv.Type, Nothing) conv = ClassifyConversion(literal, numericType, methodBodyBinder) If (conv And ConversionKind.FailedDueToNumericOverflowMask) = 0 Then conv = ClassifyConversion(mv.Type, nullableType2) Or (ClassifyConversion(zero, nullableType2, methodBodyBinder) And ConversionKind.InvolvesNarrowingFromNumericConstant) End If Assert.Equal(conv, ClassifyConversion(literal, nullableType2, methodBodyBinder)) Assert.Equal(conv, ClassifyConversion(constant, nullableType2, methodBodyBinder)) resultValue = Conversions.TryFoldConstantConversion(literal, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) resultValue = Conversions.TryFoldConstantConversion(constant, nullableType2, integerOverflow) Assert.Null(resultValue) Assert.False(integerOverflow) Next Next End Sub Private Function CheckedConvert(value As Object, type As TypeSymbol) As Object type = type.GetEnumUnderlyingTypeOrSelf() Dim c = CType(value, IConvertible) Select Case type.SpecialType Case System_Byte : Return c.ToByte(Nothing) Case System_SByte : Return c.ToSByte(Nothing) Case System_Int16 : Return c.ToInt16(Nothing) Case System_UInt16 : Return c.ToUInt16(Nothing) Case System_Int32 : Return c.ToInt32(Nothing) Case System_UInt32 : Return c.ToUInt32(Nothing) Case System_Int64 : Return c.ToInt64(Nothing) Case System_UInt64 : Return c.ToUInt64(Nothing) Case System_Single : Return c.ToSingle(Nothing) Case System_Double : Return c.ToDouble(Nothing) Case System_Decimal : Return c.ToDecimal(Nothing) Case Else Throw New NotSupportedException() End Select End Function Private Function UncheckedConvert(value As Object, type As TypeSymbol) As Object type = type.GetEnumUnderlyingTypeOrSelf() Select Case System.Type.GetTypeCode(value.GetType()) Case TypeCode.Byte, TypeCode.UInt16, TypeCode.UInt32, TypeCode.UInt64 Dim val As UInt64 = Convert.ToUInt64(value) Select Case type.SpecialType Case System_Byte : Return UncheckedCByte(UncheckedCLng(val)) Case System_SByte : Return UncheckedCSByte(UncheckedCLng(val)) Case System_Int16 : Return UncheckedCShort(val) Case System_UInt16 : Return UncheckedCUShort(UncheckedCLng(val)) Case System_Int32 : Return UncheckedCInt(val) Case System_UInt32 : Return UncheckedCUInt(val) Case System_Int64 : Return UncheckedCLng(val) Case System_UInt64 : Return UncheckedCULng(val) Case Else Throw New NotSupportedException() End Select Case TypeCode.SByte, TypeCode.Int16, TypeCode.Int32, TypeCode.Int64 Dim val As Int64 = Convert.ToInt64(value) Select Case type.SpecialType Case System_Byte : Return UncheckedCByte(val) Case System_SByte : Return UncheckedCSByte(val) Case System_Int16 : Return UncheckedCShort(val) Case System_UInt16 : Return UncheckedCUShort(val) Case System_Int32 : Return UncheckedCInt(val) Case System_UInt32 : Return UncheckedCUInt(val) Case System_Int64 : Return UncheckedCLng(val) Case System_UInt64 : Return UncheckedCULng(val) Case Else Throw New NotSupportedException() End Select Case Else Throw New NotSupportedException() End Select Select Case type.SpecialType Case System_Byte : Return CByte(value) Case System_SByte : Return CSByte(value) Case System_Int16 : Return CShort(value) Case System_UInt16 : Return CUShort(value) Case System_Int32 : Return CInt(value) Case System_UInt32 : Return CUInt(value) Case System_Int64 : Return CLng(value) Case System_UInt64 : Return CULng(value) Case System_Single : Return CSng(value) Case System_Double : Return CDbl(value) Case System_Decimal : Return CDec(value) Case Else Throw New NotSupportedException() End Select End Function Friend Structure TypeAndValue Public ReadOnly Type As TypeSymbol Public ReadOnly Value As Object Public Sub New(type As TypeSymbol, value As Object) Me.Type = type Me.Value = value End Sub End Structure <Fact()> Public Sub PredefinedNotBuiltIn() ' Tests are based on the source code used to compile VBConversions.dll, VBConversions.vb is ' checked in next to the DLL. Dim vbConversionsRef = TestReferences.SymbolsTests.VBConversions Dim modifiersRef = TestReferences.SymbolsTests.CustomModifiers.Modifiers.dll Dim c1 = VisualBasicCompilation.Create("Test", references:={TestReferences.NetFx.v4_0_21006.mscorlib, vbConversionsRef, modifiersRef}) Dim asmVBConversions = c1.GetReferencedAssemblySymbol(vbConversionsRef) Dim asmModifiers = c1.GetReferencedAssemblySymbol(modifiersRef) Dim test = asmVBConversions.Modules(0).GlobalNamespace.GetTypeMembers("Test").Single() '--------------- Identity Dim m1 = DirectCast(test.GetMembers("M1").Single(), MethodSymbol) Dim m1p = m1.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(a), m1p(b)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(a), m1p(c))) 'error BC30311: Value of type 'Class2' cannot be converted to 'Class1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(a), m1p(d))) 'error BC30311: Value of type '1-dimensional array of Class1' cannot be converted to 'Class1'. Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(d), m1p(e)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(d), m1p(f))) 'error BC30332: Value of type '1-dimensional array of Class2' cannot be converted to '1-dimensional array of Class1' because 'Class2' is not derived from 'Class1'. Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(g), m1p(h)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(g), m1p(i))) 'error BC30311: Value of type 'Class2.Class3(Of Byte)' cannot be converted to 'Class2.Class3(Of Integer)'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(g), m1p(j))) 'error BC30311: Value of type 'Class4(Of Integer)' cannot be converted to 'Class2.Class3(Of Integer)'. Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(j), m1p(k)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(j), m1p(l))) 'error BC30311: Value of type 'Class4(Of Byte)' cannot be converted to 'Class4(Of Integer)'. Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(m), m1p(n)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(m), m1p(o))) 'error BC30311: Value of type 'Class4(Of Byte).Class5(Of Integer)' cannot be converted to 'Class4(Of Integer).Class5(Of Integer)'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(m), m1p(p))) 'error BC30311: Value of type 'Class4(Of Integer).Class5(Of Byte)' cannot be converted to 'Class4(Of Integer).Class5(Of Integer)'. Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(q), m1p(r)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(q), m1p(s))) 'error BC30311: Value of type 'Class4(Of Byte).Class6' cannot be converted to 'Class4(Of Integer).Class6'. Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m1p(t), m1p(u)))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(t), m1p(v))) 'error BC30311: Value of type 'Class4(Of Byte).Class6.Class7(Of Integer)' cannot be converted to 'Class4(Of Integer).Class6.Class7(Of Integer)'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m1p(t), m1p(w))) 'error BC30311: Value of type 'Class4(Of Integer).Class6.Class7(Of Byte)' cannot be converted to 'Class4(Of Integer).Class6.Class7(Of Integer)'. Dim modifiers = asmModifiers.Modules(0).GlobalNamespace.GetTypeMembers("Modifiers").Single() Dim modifiedArrayInt32 = modifiers.GetMembers("F5").OfType(Of MethodSymbol)().Single().Parameters(0).Type Dim arrayInt32 = c1.CreateArrayTypeSymbol(c1.GetSpecialType(System_Int32)) Assert.NotEqual(modifiedArrayInt32, arrayInt32) Assert.NotEqual(arrayInt32, modifiedArrayInt32) Assert.True(arrayInt32.IsSameTypeIgnoringAll(modifiedArrayInt32)) Assert.True(modifiedArrayInt32.IsSameTypeIgnoringAll(arrayInt32)) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(arrayInt32, modifiedArrayInt32))) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(modifiedArrayInt32, arrayInt32))) Dim enumerable = c1.GetSpecialType(System_Collections_Generic_IEnumerable_T) Dim enumerableOfModifiedArrayInt32 = enumerable.Construct(modifiedArrayInt32) Dim enumerableOfArrayInt32 = enumerable.Construct(arrayInt32) Assert.NotEqual(enumerableOfModifiedArrayInt32, enumerableOfArrayInt32) Assert.NotEqual(enumerableOfArrayInt32, enumerableOfModifiedArrayInt32) Assert.True(enumerableOfArrayInt32.IsSameTypeIgnoringAll(enumerableOfModifiedArrayInt32)) Assert.True(enumerableOfModifiedArrayInt32.IsSameTypeIgnoringAll(enumerableOfArrayInt32)) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(enumerableOfArrayInt32, enumerableOfModifiedArrayInt32))) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(enumerableOfModifiedArrayInt32, enumerableOfArrayInt32))) '--------------- Numeric Dim m2 = DirectCast(test.GetMembers("M2").Single(), MethodSymbol) Dim m2p = m2.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m2p(a), m2p(b)))) Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(a), m2p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum2' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(a), m2p(d))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum3' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(a), m2p(e))) 'error BC30512: Option Strict On disallows implicit conversions from 'Integer' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(a), m2p(f))) 'error BC30512: Option Strict On disallows implicit conversions from 'Long' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(a), m2p(g))) 'error BC30512: Option Strict On disallows implicit conversions from 'Short' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(a), m2p(h))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum4' to 'Enum1'. Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(e), m2p(a))) Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(e), m2p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum2' to 'Integer'. Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(e), m2p(d))) Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(f), m2p(a))) Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(f), m2p(c))) Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(f), m2p(d))) Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(g), m2p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum1' to 'Short'. Assert.Equal(ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(g), m2p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum2' to 'Short'. Assert.Equal(ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m2p(g), m2p(d))) '--------------- Reference Dim m3 = DirectCast(test.GetMembers("M3").Single(), MethodSymbol) Dim m3p = m3.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m3p(a), m3p(a)))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(a), m3p(d))) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m3p(b), m3p(b)))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(b), m3p(c))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(b), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(c), m3p(d))) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(d), m3p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Class10'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(c), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Class9'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(d), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Class10'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(d), m3p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Class10'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(c), m3p(e))) 'error BC30311: Value of type 'Class11' cannot be converted to 'Class9'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(e), m3p(c))) 'error BC30311: Value of type 'Class9' cannot be converted to 'Class11'. Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(a), m3p(g))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(f), m3p(g))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(a), m3p(h))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(f), m3p(h))) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(g), m3p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to '1-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(g), m3p(f))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Array' to '1-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(h), m3p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to '2-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(h), m3p(f))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Array' to '2-dimensional array of Integer'. Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(i), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(j), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(k), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(l), m3p(c))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(l), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(m), m3p(b))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(m), m3p(c))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(m), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(n), m3p(d))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(p), m3p(g))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(p), m3p(h))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(q), m3p(g))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(r), m3p(g))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(s), m3p(g))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(v), m3p(u))) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m3p(i), m3p(i)))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(i), m3p(j))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(i), m3p(k))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(i), m3p(o))) Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(n), m3p(o))) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(i), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface1'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(i), m3p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface1'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(i), m3p(e))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class11' to 'Interface1'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(j), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface2'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(j), m3p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface2'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(k), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface3'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(k), m3p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface3'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(l), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface4'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(n), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface6'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(n), m3p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface6'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(o), m3p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface7'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(o), m3p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface7'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(o), m3p(d))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class10' to 'Interface7'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(q), m3p(h))) 'error BC30311: Value of type '2-dimensional array of Integer' cannot be converted to 'System.Collections.Generic.IList(Of Integer)'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(r), m3p(h))) 'error BC30311: Value of type '2-dimensional array of Integer' cannot be converted to 'System.Collections.Generic.ICollection(Of Integer)'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(s), m3p(h))) 'error BC30311: Value of type '2-dimensional array of Integer' cannot be converted to 'System.Collections.Generic.IEnumerable(Of Integer)'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(t), m3p(g))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to 'System.Collections.Generic.IList(Of Long)'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(w), m3p(u))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class9' to 'System.Collections.Generic.IList(Of Class11)'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(i), m3p(l))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface4' to 'Interface1'. Assert.Equal(ConversionKind.NarrowingReference Or ConversionKind.DelegateRelaxationLevelNarrowing, ClassifyPredefinedAssignment(m3p(o), m3p(x))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Action' to 'Interface7'. Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment(m3p(a), m3p(o))) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(x), m3p(o))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'System.Action'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(e), m3p(o))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'Class11'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(g), m3p(o))) 'error BC30311: Value of type 'Interface7' cannot be converted to '1-dimensional array of Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(h), m3p(o))) 'error BC30311: Value of type 'Interface7' cannot be converted to '2-dimensional array of Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(u), m3p(o))) 'error BC30311: Value of type 'Interface7' cannot be converted to '1-dimensional array of Class9'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(g), m3p(p))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.IEnumerable' to '1-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(h), m3p(p))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.IEnumerable' to '2-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(g), m3p(q))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Integer)' to '1-dimensional array of Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(h), m3p(q))) 'error BC30311: Value of type 'System.Collections.Generic.IList(Of Integer)' cannot be converted to '2-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(g), m3p(t))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Long)' to '1-dimensional array of Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(h), m3p(t))) 'error BC30311: Value of type 'System.Collections.Generic.IList(Of Long)' cannot be converted to '2-dimensional array of Integer'. Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(g), m3p(w))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class11)' to '1-dimensional array of Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m3p(h), m3p(w))) 'error BC30311: Value of type 'System.Collections.Generic.IList(Of Class11)' cannot be converted to '2-dimensional array of Integer'. Dim [object] = c1.GetSpecialType(System_Object) Dim module2 = asmVBConversions.Modules(0).GlobalNamespace.GetTypeMembers("Module2").Single() Assert.Equal(ConversionKind.WideningReference, ClassifyPredefinedAssignment([object], module2)) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(module2, [object])) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(m3p(i), module2)) Assert.Equal(ConversionKind.NarrowingReference, ClassifyPredefinedAssignment(module2, m3p(i))) ' ------------- Type Parameter Dim m6 = DirectCast(test.GetMembers("M6").Single(), MethodSymbol) Dim m6p = m6.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m6p(b), m6p(b)))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(a), m6p(b))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(a), m6p(c))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(a), m6p(d))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(b), m6p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT1'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(c), m6p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT2'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(d), m6p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT3'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(e), m6p(f))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(e), m6p(h))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(f), m6p(e))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'MT4'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(h), m6p(e))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(f), m6p(g))) 'error BC30311: Value of type 'MT5' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(g), m6p(f))) 'error BC30311: Value of type 'MT4' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(h), m6p(i))) 'error BC30311: Value of type 'MT7' cannot be converted to 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(i), m6p(h))) 'error BC30311: Value of type 'MT6' cannot be converted to 'MT7'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(e), m6p(k))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(j), m6p(k))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(j), m6p(f))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(k), m6p(e))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'MT8'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(k), m6p(j))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT8'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(f), m6p(j))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT4'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(l), m6p(k))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(m), m6p(k))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(p), m6p(c))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(k), m6p(l))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class10' to 'MT8'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(k), m6p(m))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'MT8'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(c), m6p(p))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(n), m6p(k))) 'error BC30311: Value of type 'MT8' cannot be converted to 'Class12'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(k), m6p(n))) 'error BC30311: Value of type 'Class12' cannot be converted to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(k), m6p(o))) 'error BC30311: Value of type 'MT9' cannot be converted to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(o), m6p(k))) 'error BC30311: Value of type 'MT8' cannot be converted to 'MT9'. Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(b), m6p(q))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(b), m6p(r))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(t), m6p(s))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m6p(m), m6p(s))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(q), m6p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT10'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(r), m6p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT11'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(s), m6p(t))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'MT13'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(s), m6p(m))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'MT13'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(l), m6p(s))) 'error BC30311: Value of type 'MT13' cannot be converted to 'Class10'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(s), m6p(l))) 'error BC30311: Value of type 'Class10' cannot be converted to 'MT13'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(u), m6p(k))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT8' to 'Interface7'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(k), m6p(u))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT8'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(u), m6p(f))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT4' to 'Interface7'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(f), m6p(u))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT4'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(u), m6p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'Interface7'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(b), m6p(u))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT1'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(u), m6p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT2' to 'Interface7'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m6p(c), m6p(u))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(v), m6p(q))) 'error BC30311: Value of type 'MT10' cannot be converted to 'MT14'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m6p(q), m6p(v))) 'error BC30311: Value of type 'MT14' cannot be converted to 'MT10'. Dim m7 = DirectCast(test.GetMembers("M7").Single(), MethodSymbol) Dim m7p = m7.Parameters.Select(Function(p) p.Type).ToArray() Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(p), m7p(a))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(p), m7p(b))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(q), m7p(c))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(q), m7p(d))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(r), m7p(d))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(t), m7p(g))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(v), m7p(j))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(v), m7p(k))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(w), m7p(n))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(x), m7p(i))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(y), m7p(j))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m7p(y), m7p(k))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(a), m7p(p))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT1'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(b), m7p(p))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT2'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(c), m7p(q))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Enum' to 'MT3'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(d), m7p(q))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Enum' to 'MT4'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(d), m7p(r))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum1' to 'MT4'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(g), m7p(t))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to 'MT7'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(j), m7p(v))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class9' to 'MT10'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(k), m7p(v))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class9' to 'MT11'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(n), m7p(w))) 'error BC30512: Option Strict On disallows implicit conversions from 'Structure1' to 'MT14'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(i), m7p(x))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.IEnumerable' to 'MT9'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(y), m7p(i))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT9' to 'System.Collections.Generic.IList(Of Class9)'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(i), m7p(y))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT9'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(j), m7p(y))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT10' Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(k), m7p(y))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT11' Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(y), m7p(z))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT15' to 'System.Collections.Generic.IList(Of Class9)' Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(z), m7p(y))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT15' Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(n), m7p(o))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT14'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(o), m7p(n))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT14' to 'Interface1'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(m), m7p(o))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT13'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(o), m7p(m))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT13' to 'Interface1'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(d), m7p(o))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT4'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m7p(o), m7p(d))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT4' to 'Interface1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(r), m7p(e))) 'error BC30311: Value of type 'MT5' cannot be converted to 'Enum1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(e), m7p(r))) 'error BC30311: Value of type 'Enum1' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(s), m7p(d))) 'error BC30311: Value of type 'MT4' cannot be converted to 'Enum2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(d), m7p(s))) 'error BC30311: Value of type 'Enum2' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(r), m7p(f))) 'error BC30311: Value of type 'MT6' cannot be converted to 'Enum1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(f), m7p(r))) 'error BC30311: Value of type 'Enum1' cannot be converted to 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(t), m7p(h))) 'error BC30311: Value of type 'MT8' cannot be converted to '1-dimensional array of Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(h), m7p(t))) 'error BC30311: Value of type '1-dimensional array of Integer' cannot be converted to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(v), m7p(i))) 'error BC30311: Value of type 'MT9' cannot be converted to '1-dimensional array of Class9'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(i), m7p(v))) 'error BC30311: Value of type '1-dimensional array of Class9' cannot be converted to 'MT9'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(a), m7p(b))) 'error BC30311: Value of type 'MT2' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(b), m7p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(g), m7p(h))) 'error BC30311: Value of type 'MT8' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(h), m7p(g))) 'error BC30311: Value of type 'MT7' cannot be converted to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(g), m7p(l))) 'error BC30311: Value of type 'MT12' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(l), m7p(g))) 'error BC30311: Value of type 'MT7' cannot be converted to 'MT12'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(c), m7p(d))) 'error BC30311: Value of type 'MT4' cannot be converted to 'MT3'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(d), m7p(c))) 'error BC30311: Value of type 'MT3' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(i), m7p(j))) 'error BC30311: Value of type 'MT10' cannot be converted to 'MT9'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(j), m7p(i))) 'error BC30311: Value of type 'MT9' cannot be converted to 'MT10'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(a), m7p(n))) 'error BC30311: Value of type 'MT14' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(n), m7p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT14'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(d), m7p(f))) 'error BC30311: Value of type 'MT6' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m7p(f), m7p(d))) 'error BC30311: Value of type 'MT4' cannot be converted to 'MT6'. Dim m8 = DirectCast(test.GetMembers("M8").Single(), MethodSymbol) Dim m8p = m8.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m8p(a), m8p(a)))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m8p(a), m8p(d))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m8p(b), m8p(f))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m8p(a), m8p(c))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m8p(b), m8p(e))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m8p(g), m8p(h))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m8p(c), m8p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT3'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m8p(d), m8p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT4'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m8p(e), m8p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT2' to 'MT5'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m8p(f), m8p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT2' to 'MT6'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m8p(h), m8p(g))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT7' to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m8p(a), m8p(b))) 'error BC30311: Value of type 'MT2' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m8p(b), m8p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m8p(b), m8p(d))) 'error BC30311: Value of type 'MT4' cannot be converted to 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m8p(d), m8p(b))) 'error BC30311: Value of type 'MT2' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m8p(a), m8p(g))) 'error BC30311: Value of type 'MT7' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m8p(g), m8p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT7'. Dim m9 = DirectCast(test.GetMembers("M9").Single(), MethodSymbol) Dim m9p = m9.Parameters.Select(Function(p) p.Type).ToArray() Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(a), m9p(b))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(j), m9p(a))) Assert.Equal(ConversionKind.WideningTypeParameter Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m9p(j), m9p(e))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(l), m9p(e))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(m), m9p(n))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(p), m9p(q))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(s), m9p(u))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(t), m9p(u))) Assert.Equal(ConversionKind.WideningTypeParameter, ClassifyPredefinedAssignment(m9p(s), m9p(v))) Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(b), m9p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT2'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(a), m9p(j))) 'error BC30512: Option Strict On disallows implicit conversions from 'Integer' to 'MT1'. Assert.Equal(ConversionKind.NarrowingTypeParameter Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m9p(e), m9p(j))) 'error BC30512: Option Strict On disallows implicit conversions from 'Integer' to 'MT5'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(e), m9p(l))) 'error BC30512: Option Strict On disallows implicit conversions from 'Enum1' to 'MT5'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(n), m9p(m))) 'error BC30512: Option Strict On disallows implicit conversions from 'Structure1' to 'MT10'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(q), m9p(p))) 'error BC30512: Option Strict On disallows implicit conversions from 'Class1' to 'MT12'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(u), m9p(s))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'MT15'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(u), m9p(t))) 'error BC30512: Option Strict On disallows implicit conversions from 'MT14' to 'MT15'. Assert.Equal(ConversionKind.NarrowingTypeParameter, ClassifyPredefinedAssignment(m9p(v), m9p(s))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'MT16'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(e))) 'error BC30311: Value of type 'MT5' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(e), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(e), m9p(g))) 'error BC30311: Value of type 'MT7' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(g), m9p(e))) 'error BC30311: Value of type 'MT5' cannot be converted to 'MT7'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(l))) 'error BC30311: Value of type 'Enum1' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(l), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'Enum1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(i))) 'error BC30311: Value of type 'MT9' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(c))) 'error BC30311: Value of type 'MT3' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(c), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT3'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(d))) 'error BC30311: Value of type 'MT4' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(d), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(f))) 'error BC30311: Value of type 'MT6' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(f), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(h))) 'error BC30311: Value of type 'MT8' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(h), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(e), m9p(f))) 'error BC30311: Value of type 'MT6' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(f), m9p(e))) 'error BC30311: Value of type 'MT5' cannot be converted to 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(e), m9p(h))) 'error BC30311: Value of type 'MT8' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(h), m9p(e))) 'error BC30311: Value of type 'MT5' cannot be converted to 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(a), m9p(k))) 'error BC30311: Value of type 'UInteger' cannot be converted to 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(k), m9p(a))) 'error BC30311: Value of type 'MT1' cannot be converted to 'UInteger'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(e), m9p(k))) 'error BC30311: Value of type 'UInteger' cannot be converted to 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(k), m9p(e))) 'error BC30311: Value of type 'MT5' cannot be converted to 'UInteger'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(n), m9p(o))) 'error BC30311: Value of type 'MT11' cannot be converted to 'MT10'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(o), m9p(n))) 'error BC30311: Value of type 'MT10' cannot be converted to 'MT11'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(q), m9p(r))) 'error BC30311: Value of type 'MT13' cannot be converted to 'MT12'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(r), m9p(q))) 'error BC30311: Value of type 'MT12' cannot be converted to 'MT13'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(v), m9p(w))) 'error BC30311: Value of type 'MT17' cannot be converted to 'MT16'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m9p(w), m9p(v))) 'error BC30311: Value of type 'MT16' cannot be converted to 'MT17'. ' ------------- Array conversions Dim m4 = DirectCast(test.GetMembers("M4").Single(), MethodSymbol) Dim m4p = m4.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m4p(a), m4p(a)))) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m4p(l), m4p(l)))) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m4p(n), m4p(n)))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(a), m4p(d))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(b), m4p(f))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(i), m4p(j))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(i), m4p(k))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(l), m4p(m))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(n), m4p(o))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(p), m4p(i))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(x), m4p(i))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m4p(x), m4p(w))) Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(a), m4p(c))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT3' to '1-dimensional array of MT1'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(c), m4p(a))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT3'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(d), m4p(a))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT4'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(b), m4p(e))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT5' to '1-dimensional array of MT2'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(e), m4p(b))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT2' to '1-dimensional array of MT5'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(f), m4p(b))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT2' to '1-dimensional array of MT6'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(g), m4p(h))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT8' to '1-dimensional array of MT7'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(h), m4p(g))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT7' to '1-dimensional array of MT8'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(j), m4p(i))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class8' to '1-dimensional array of Class9'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(k), m4p(i))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class8' to '1-dimensional array of Class11'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(m), m4p(l))) 'error BC30512: Option Strict On disallows implicit conversions from '2-dimensional array of Class8' to '2-dimensional array of Class9'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(o), m4p(n))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of 1-dimensional array of Class8' to '1-dimensional array of 1-dimensional array of Class9'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(i), m4p(p))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Interface5' to '1-dimensional array of Class8'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(i), m4p(x))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Object' to '1-dimensional array of Class8'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m4p(w), m4p(x))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Object' to '1-dimensional array of System.ValueType'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(a), m4p(b))) 'error BC30332: Value of type '1-dimensional array of MT2' cannot be converted to '1-dimensional array of MT1' because 'MT2' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(b), m4p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT2' because 'MT1' is not derived from 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(b), m4p(d))) 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of MT2' because 'MT4' is not derived from 'MT2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(d), m4p(b))) 'error BC30332: Value of type '1-dimensional array of MT2' cannot be converted to '1-dimensional array of MT4' because 'MT2' is not derived from 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(a), m4p(g))) 'error BC30332: Value of type '1-dimensional array of MT7' cannot be converted to '1-dimensional array of MT1' because 'MT7' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(g), m4p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT7' because 'MT1' is not derived from 'MT7'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(j), m4p(k))) 'error BC30332: Value of type '1-dimensional array of Class11' cannot be converted to '1-dimensional array of Class9' because 'Class11' is not derived from 'Class9'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(i), m4p(l))) 'error BC30414: Value of type '2-dimensional array of Class8' cannot be converted to '1-dimensional array of Class8' because the array types have different numbers of dimensions. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(l), m4p(i))) 'error BC30414: Value of type '1-dimensional array of Class8' cannot be converted to '2-dimensional array of Class8' because the array types have different numbers of dimensions. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(l), m4p(n))) 'error BC30332: Value of type '1-dimensional array of 1-dimensional array of Class8' cannot be converted to '2-dimensional array of Class8' because '1-dimensional array of Class8' is not derived from 'Class8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(n), m4p(l))) 'error BC30332: Value of type '2-dimensional array of Class8' cannot be converted to '1-dimensional array of 1-dimensional array of Class8' because 'Class8' is not derived from '1-dimensional array of Class8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(p), m4p(q))) 'error BC30332: Value of type '1-dimensional array of Structure1' cannot be converted to '1-dimensional array of Interface5' because 'Structure1' is not derived from 'Interface5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(q), m4p(p))) 'error BC30332: Value of type '1-dimensional array of Interface5' cannot be converted to '1-dimensional array of Structure1' because 'Interface5' is not derived from 'Structure1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(q), m4p(w))) 'error BC30332: Value of type '1-dimensional array of System.ValueType' cannot be converted to '1-dimensional array of Structure1' because 'System.ValueType' is not derived from 'Structure1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(w), m4p(q))) 'error BC30333: Value of type '1-dimensional array of Structure1' cannot be converted to '1-dimensional array of System.ValueType' because 'Structure1' is not a reference type. Assert.Equal(ConversionKind.WideningArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m4p(r), m4p(t))) Assert.Equal(ConversionKind.WideningArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m4p(s), m4p(u))) Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m4p(t), m4p(r))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to '1-dimensional array of Enum1'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m4p(u), m4p(s))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Long' to '1-dimensional array of Enum2'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m4p(t), m4p(v))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum4' to '1-dimensional array of Enum1'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m4p(v), m4p(t))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum1' to '1-dimensional array of Enum4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(r), m4p(s))) 'error BC30332: Value of type '1-dimensional array of Long' cannot be converted to '1-dimensional array of Integer' because 'Long' is not derived from 'Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(s), m4p(r))) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of Long' because 'Integer' is not derived from 'Long'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(r), m4p(u))) 'error BC30332: Value of type '1-dimensional array of Enum2' cannot be converted to '1-dimensional array of Integer' because 'Enum2' is not derived from 'Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(u), m4p(r))) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of Enum2' because 'Integer' is not derived from 'Enum2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(t), m4p(u))) 'error BC30332: Value of type '1-dimensional array of Enum2' cannot be converted to '1-dimensional array of Enum1' because 'Enum2' is not derived from 'Enum1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m4p(u), m4p(t))) 'error BC30332: Value of type '1-dimensional array of Enum1' cannot be converted to '1-dimensional array of Enum2' because 'Enum1' is not derived from 'Enum2'. Dim m5 = DirectCast(test.GetMembers("M5").Single(), MethodSymbol) Dim m5p = m5.Parameters.Select(Function(p) p.Type).ToArray() Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m5p(a), m5p(b))) Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(b), m5p(a))) ' error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT2'. Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m5p(j), m5p(a))) Assert.Equal(ConversionKind.WideningArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(j), m5p(e))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m5p(l), m5p(e))) Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(a), m5p(e))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT5' to '1-dimensional array of MT1'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(e), m5p(a))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT5'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(e), m5p(g))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT7' to '1-dimensional array of MT5'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(g), m5p(e))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT5' to '1-dimensional array of MT7'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(a), m5p(j))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to '1-dimensional array of MT1'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(a), m5p(l))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum1' to '1-dimensional array of MT1'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(l), m5p(a))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of Enum1'. Assert.Equal(ConversionKind.NarrowingArray Or ConversionKind.InvolvesEnumTypeConversions, ClassifyPredefinedAssignment(m5p(e), m5p(j))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to '1-dimensional array of MT5'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(e), m5p(l))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum1' to '1-dimensional array of MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(a), m5p(i))) 'error BC30332: Value of type '1-dimensional array of MT9' cannot be converted to '1-dimensional array of MT1' because 'MT9' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(a), m5p(c))) 'error BC30332: Value of type '1-dimensional array of MT3' cannot be converted to '1-dimensional array of MT1' because 'MT3' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(c), m5p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT3' because 'MT1' is not derived from 'MT3'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(a), m5p(d))) 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of MT1' because 'MT4' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(d), m5p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT4' because 'MT1' is not derived from 'MT4'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(a), m5p(f))) 'error BC30332: Value of type '1-dimensional array of MT6' cannot be converted to '1-dimensional array of MT1' because 'MT6' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(f), m5p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT6' because 'MT1' is not derived from 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(a), m5p(h))) 'error BC30332: Value of type '1-dimensional array of MT8' cannot be converted to '1-dimensional array of MT1' because 'MT8' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(h), m5p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT8' because 'MT1' is not derived from 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(e), m5p(f))) 'error BC30332: Value of type '1-dimensional array of MT6' cannot be converted to '1-dimensional array of MT5' because 'MT6' is not derived from 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(f), m5p(e))) 'error BC30332: Value of type '1-dimensional array of MT5' cannot be converted to '1-dimensional array of MT6' because 'MT5' is not derived from 'MT6'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(e), m5p(h))) 'error BC30332: Value of type '1-dimensional array of MT8' cannot be converted to '1-dimensional array of MT5' because 'MT8' is not derived from 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(h), m5p(e))) 'error BC30332: Value of type '1-dimensional array of MT5' cannot be converted to '1-dimensional array of MT8' because 'MT5' is not derived from 'MT8'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(a), m5p(k))) 'error BC30332: Value of type '1-dimensional array of UInteger' cannot be converted to '1-dimensional array of MT1' because 'UInteger' is not derived from 'MT1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(k), m5p(a))) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of UInteger' because 'MT1' is not derived from 'UInteger'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(e), m5p(k))) 'error BC30332: Value of type '1-dimensional array of UInteger' cannot be converted to '1-dimensional array of MT5' because 'UInteger' is not derived from 'MT5'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(k), m5p(e))) 'error BC30332: Value of type '1-dimensional array of MT5' cannot be converted to '1-dimensional array of UInteger' because 'MT5' is not derived from 'UInteger'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(j), m5p(k))) 'error BC30332: Value of type '1-dimensional array of UInteger' cannot be converted to '1-dimensional array of Integer' because 'UInteger' is not derived from 'Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(k), m5p(j))) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of UInteger' because 'Integer' is not derived from 'UInteger'. Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m5p(m), m5p(n))) Assert.Equal(ConversionKind.WideningArray, ClassifyPredefinedAssignment(m5p(p), m5p(q))) Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(n), m5p(m))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Structure1' to '1-dimensional array of MT10'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(q), m5p(p))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class1' to '1-dimensional array of MT12'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(s), m5p(u))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT15' to '1-dimensional array of System.ValueType'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(u), m5p(s))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of System.ValueType' to '1-dimensional array of MT15'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(t), m5p(u))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT15' to '1-dimensional array of MT14'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(u), m5p(t))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT14' to '1-dimensional array of MT15'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(s), m5p(v))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT16' to '1-dimensional array of System.ValueType'. Assert.Equal(ConversionKind.NarrowingArray, ClassifyPredefinedAssignment(m5p(v), m5p(s))) 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of System.ValueType' to '1-dimensional array of MT16'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(n), m5p(o))) 'error BC30332: Value of type '1-dimensional array of MT11' cannot be converted to '1-dimensional array of MT10' because 'MT11' is not derived from 'MT10'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(o), m5p(n))) 'error BC30332: Value of type '1-dimensional array of MT10' cannot be converted to '1-dimensional array of MT11' because 'MT10' is not derived from 'MT11'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(q), m5p(r))) 'error BC30332: Value of type '1-dimensional array of MT13' cannot be converted to '1-dimensional array of MT12' because 'MT13' is not derived from 'MT12'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(r), m5p(q))) 'error BC30332: Value of type '1-dimensional array of MT12' cannot be converted to '1-dimensional array of MT13' because 'MT12' is not derived from 'MT13'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(v), m5p(w))) 'error BC30332: Value of type '1-dimensional array of MT17' cannot be converted to '1-dimensional array of MT16' because 'MT17' is not derived from 'MT16'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m5p(w), m5p(v))) 'error BC30332: Value of type '1-dimensional array of MT16' cannot be converted to '1-dimensional array of MT17' because 'MT16' is not derived from 'MT17'. ' ------------- Value Type Dim void = c1.GetSpecialType(System_Void) Dim valueType = c1.GetSpecialType(System_ValueType) Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(void, void))) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment([object], void)) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(void, [object])) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(valueType, void)) Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(void, valueType)) Dim m10 = DirectCast(test.GetMembers("M10").Single(), MethodSymbol) Dim m10p = m10.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m10p(f), m10p(f)))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(a), m10p(f))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(b), m10p(f))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(a), m10p(h))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(b), m10p(h))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(c), m10p(h))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(d), m10p(f))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m10p(i), m10p(f))) Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(f), m10p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Structure2'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(f), m10p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'Structure2'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(h), m10p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(h), m10p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(h), m10p(c))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.Enum' to 'Enum1'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(f), m10p(d))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'Structure2'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m10p(f), m10p(i))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'Structure2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(c), m10p(f))) 'error BC30311: Value of type 'Structure2' cannot be converted to 'System.Enum'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(f), m10p(c))) 'error BC30311: Value of type 'System.Enum' cannot be converted to 'Structure2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(d), m10p(h))) 'error BC30311: Value of type 'Enum1' cannot be converted to 'Interface1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(h), m10p(d))) 'error BC30311: Value of type 'Interface1' cannot be converted to 'Enum1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(e), m10p(f))) 'error BC30311: Value of type 'Structure2' cannot be converted to 'Interface7'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(f), m10p(e))) 'error BC30311: Value of type 'Interface7' cannot be converted to 'Structure2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(f), m10p(g))) 'error BC30311: Value of type 'Structure1' cannot be converted to 'Structure2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(g), m10p(f))) 'error BC30311: Value of type 'Structure2' cannot be converted to 'Structure1'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(f), m10p(h))) 'error BC30311: Value of type 'Enum1' cannot be converted to 'Structure2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m10p(h), m10p(f))) 'error BC30311: Value of type 'Structure2' cannot be converted to 'Enum1'. ' ------------ Nullable Dim m11 = DirectCast(test.GetMembers("M11").Single(), MethodSymbol) Dim m11p = m11.Parameters.Select(Function(p) p.Type).ToArray() Assert.True(Conversions.IsIdentityConversion(ClassifyPredefinedAssignment(m11p(d), m11p(d)))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m11p(a), m11p(d))) Assert.Equal(ConversionKind.WideningValue, ClassifyPredefinedAssignment(m11p(b), m11p(d))) Assert.Equal(ConversionKind.WideningNullable, ClassifyPredefinedAssignment(m11p(d), m11p(c))) Assert.Equal(ConversionKind.WideningNullable, ClassifyPredefinedAssignment(m11p(e), m11p(d))) Assert.Equal(ConversionKind.WideningNullable, ClassifyPredefinedAssignment(m11p(f), m11p(d))) Assert.Equal(ConversionKind.WideningNullable, ClassifyPredefinedAssignment(m11p(i), m11p(h))) Assert.Equal(ConversionKind.WideningNullable, ClassifyPredefinedAssignment(m11p(k), m11p(i))) Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m11p(d), m11p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Structure2?'. Assert.Equal(ConversionKind.NarrowingValue, ClassifyPredefinedAssignment(m11p(d), m11p(b))) 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'Structure2?'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(c), m11p(d))) 'error BC30512: Option Strict On disallows implicit conversions from 'Structure2?' to 'Structure2'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(d), m11p(e))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'Structure2?'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(d), m11p(f))) 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'Structure2?'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(h), m11p(i))) 'error BC30512: Option Strict On disallows implicit conversions from 'Integer?' to 'Integer'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(i), m11p(k))) 'error BC30512: Option Strict On disallows implicit conversions from 'Long?' to 'Integer?'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(i), m11p(j))) 'error BC30512: Option Strict On disallows implicit conversions from 'Long' to 'Integer?'. Assert.Equal(ConversionKind.NarrowingNullable, ClassifyPredefinedAssignment(m11p(j), m11p(i))) 'error BC30512: Option Strict On disallows implicit conversions from 'Integer?' to 'Long'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m11p(c), m11p(i))) 'error BC30311: Value of type 'Integer?' cannot be converted to 'Structure2'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m11p(i), m11p(c))) 'error BC30311: Value of type 'Structure2' cannot be converted to 'Integer?'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m11p(d), m11p(h))) 'error BC30311: Value of type 'Integer' cannot be converted to 'Structure2?'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m11p(h), m11p(d))) 'error BC30311: Value of type 'Structure2?' cannot be converted to 'Integer'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m11p(d), m11p(i))) 'error BC30311: Value of type 'Integer?' cannot be converted to 'Structure2?'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m11p(i), m11p(d))) 'error BC30311: Value of type 'Structure2?' cannot be converted to 'Integer?'. ' ------------ String Dim m12 = DirectCast(test.GetMembers("M12").Single(), MethodSymbol) Dim m12p = m12.Parameters.Select(Function(p) p.Type).ToArray() Assert.Equal(ConversionKind.WideningString, ClassifyPredefinedAssignment(m12p(a), m12p(b))) Assert.Equal(ConversionKind.WideningString, ClassifyPredefinedAssignment(m12p(a), m12p(c))) Assert.Equal(ConversionKind.NarrowingString, ClassifyPredefinedAssignment(m12p(b), m12p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'String' to 'Char'. Assert.Equal(ConversionKind.NarrowingString, ClassifyPredefinedAssignment(m12p(c), m12p(a))) 'error BC30512: Option Strict On disallows implicit conversions from 'String' to '1-dimensional array of Char'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m12p(b), m12p(c))) 'error BC30311: Value of type '1-dimensional array of Char' cannot be converted to 'Char'. Assert.Equal(s_noConversion, ClassifyPredefinedAssignment(m12p(c), m12p(b))) 'error BC30311: Value of type 'Char' cannot be converted to '1-dimensional array of Char'. End Sub Private Shared Function ClassifyPredefinedAssignment([to] As TypeSymbol, [from] As TypeSymbol) As ConversionKind Dim result As ConversionKind = Conversions.ClassifyPredefinedConversion([from], [to], Nothing) And Not ConversionKind.MightSucceedAtRuntime Assert.Equal(result, ClassifyConversion([from], [to])) Return result End Function Public Enum Parameters a b c d e f g h i j k l m n o p q r s t u v w x y z End Enum <Fact()> Public Sub BuiltIn() Dim c1 = VisualBasicCompilation.Create("Test", references:={TestReferences.NetFx.v4_0_21006.mscorlib}) Dim nullable = c1.GetSpecialType(System_Nullable_T) Dim types As NamedTypeSymbol() = { c1.GetSpecialType(System_Byte), c1.GetSpecialType(System_SByte), c1.GetSpecialType(System_UInt16), c1.GetSpecialType(System_Int16), c1.GetSpecialType(System_UInt32), c1.GetSpecialType(System_Int32), c1.GetSpecialType(System_UInt64), c1.GetSpecialType(System_Int64), c1.GetSpecialType(System_Decimal), c1.GetSpecialType(System_Single), c1.GetSpecialType(System_Double), c1.GetSpecialType(System_String), c1.GetSpecialType(System_Char), c1.GetSpecialType(System_Boolean), c1.GetSpecialType(System_DateTime), c1.GetSpecialType(System_Object), nullable.Construct(c1.GetSpecialType(System_Byte)), nullable.Construct(c1.GetSpecialType(System_SByte)), nullable.Construct(c1.GetSpecialType(System_UInt16)), nullable.Construct(c1.GetSpecialType(System_Int16)), nullable.Construct(c1.GetSpecialType(System_UInt32)), nullable.Construct(c1.GetSpecialType(System_Int32)), nullable.Construct(c1.GetSpecialType(System_UInt64)), nullable.Construct(c1.GetSpecialType(System_Int64)), nullable.Construct(c1.GetSpecialType(System_Decimal)), nullable.Construct(c1.GetSpecialType(System_Single)), nullable.Construct(c1.GetSpecialType(System_Double)), nullable.Construct(c1.GetSpecialType(System_Char)), nullable.Construct(c1.GetSpecialType(System_Boolean)), nullable.Construct(c1.GetSpecialType(System_DateTime)) } For i As Integer = 0 To types.Length - 1 Step 1 For j As Integer = 0 To types.Length - 1 Step 1 Dim convClass = Conversions.ClassifyPredefinedConversion(types(i), types(j), Nothing) Assert.Equal(convClass, Conversions.ConversionEasyOut.ClassifyPredefinedConversion(types(i), types(j))) Assert.Equal(convClass, ClassifyConversion(types(i), types(j))) If (i = j) Then Assert.True(Conversions.IsIdentityConversion(convClass)) Else Dim baseline = HasBuiltInWideningConversions(types(i), types(j)) If baseline = s_noConversion Then baseline = HasBuiltInNarrowingConversions(types(i), types(j)) End If Assert.Equal(baseline, convClass) End If Next Next End Sub Private Function HasBuiltInWideningConversions(from As TypeSymbol, [to] As TypeSymbol) As ConversionKind Dim result = HasBuiltInWideningConversions(from.SpecialType, [to].SpecialType) If result = s_noConversion Then Dim fromIsNullable = from.IsNullableType() Dim fromElement = If(fromIsNullable, from.GetNullableUnderlyingType(), Nothing) If fromIsNullable AndAlso [to].SpecialType = System_Object Then Return ConversionKind.WideningValue End If Dim toIsNullable = [to].IsNullableType() Dim toElement = If(toIsNullable, [to].GetNullableUnderlyingType(), Nothing) 'Nullable Value Type conversions '• From a type T? to a type S?, where there is a widening conversion from the type T to the type S. If (fromIsNullable AndAlso toIsNullable) Then If (HasBuiltInWideningConversions(fromElement, toElement) And ConversionKind.Widening) <> 0 Then Return ConversionKind.WideningNullable End If End If If (Not fromIsNullable AndAlso toIsNullable) Then '• From a type T to the type T?. If from.Equals(toElement) Then Return ConversionKind.WideningNullable End If '• From a type T to a type S?, where there is a widening conversion from the type T to the type S. If (HasBuiltInWideningConversions(from, toElement) And ConversionKind.Widening) <> 0 Then Return ConversionKind.WideningNullable End If End If End If Return result End Function Private Function HasBuiltInNarrowingConversions(from As TypeSymbol, [to] As TypeSymbol) As ConversionKind Dim result = HasBuiltInNarrowingConversions(from.SpecialType, [to].SpecialType) If result = s_noConversion Then Dim toIsNullable = [to].IsNullableType() Dim toElement = If(toIsNullable, [to].GetNullableUnderlyingType(), Nothing) If from.SpecialType = System_Object AndAlso toIsNullable Then Return ConversionKind.NarrowingValue End If Dim fromIsNullable = from.IsNullableType() Dim fromElement = If(fromIsNullable, from.GetNullableUnderlyingType(), Nothing) 'Nullable Value Type conversions If (fromIsNullable AndAlso Not toIsNullable) Then '• From a type T? to a type T. If fromElement.Equals([to]) Then Return ConversionKind.NarrowingNullable End If '• From a type S? to a type T, where there is a conversion from the type S to the type T. If HasBuiltInWideningConversions(fromElement, [to]) <> s_noConversion OrElse HasBuiltInNarrowingConversions(fromElement, [to]) <> s_noConversion Then Return ConversionKind.NarrowingNullable End If End If '• From a type T? to a type S?, where there is a narrowing conversion from the type T to the type S. If (fromIsNullable AndAlso toIsNullable) Then If (HasBuiltInNarrowingConversions(fromElement, toElement) And ConversionKind.Narrowing) <> 0 Then Return ConversionKind.NarrowingNullable End If End If '• From a type T to a type S?, where there is a narrowing conversion from the type T to the type S. If (Not fromIsNullable AndAlso toIsNullable) Then If (HasBuiltInNarrowingConversions(from, toElement) And ConversionKind.Narrowing) <> 0 Then Return ConversionKind.NarrowingNullable End If End If End If Return result End Function Private Const s_byte = System_Byte Private Const s_SByte = System_SByte Private Const s_UShort = System_UInt16 Private Const s_short = System_Int16 Private Const s_UInteger = System_UInt32 Private Const s_integer = System_Int32 Private Const s_ULong = System_UInt64 Private Const s_long = System_Int64 Private Const s_decimal = System_Decimal Private Const s_single = System_Single Private Const s_double = System_Double Private Const s_string = System_String Private Const s_char = System_Char Private Const s_boolean = System_Boolean Private Const s_date = System_DateTime Private Const s_object = System_Object Private Function HasBuiltInWideningConversions(from As SpecialType, [to] As SpecialType) As ConversionKind Select Case CInt(from) 'Numeric conversions '• From Byte to UShort, Short, UInteger, Integer, ULong, Long, Decimal, Single, or Double. Case s_byte Select Case CInt([to]) Case s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From SByte to Short, Integer, Long, Decimal, Single, or Double. Case s_SByte Select Case CInt([to]) Case s_short, s_integer, s_long, s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From UShort to UInteger, Integer, ULong, Long, Decimal, Single, or Double. Case s_UShort Select Case CInt([to]) Case s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From Short to Integer, Long, Decimal, Single or Double. Case s_short Select Case CInt([to]) Case s_integer, s_long, s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From UInteger to ULong, Long, Decimal, Single, or Double. Case s_UInteger Select Case CInt([to]) Case s_ULong, s_long, s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From Integer to Long, Decimal, Single or Double. Case s_integer Select Case CInt([to]) Case s_long, s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From ULong to Decimal, Single, or Double. Case s_ULong Select Case CInt([to]) Case s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From Long to Decimal, Single or Double. Case s_long Select Case CInt([to]) Case s_decimal, s_single, s_double Return ConversionKind.WideningNumeric End Select '• From Decimal to Single or Double. Case s_decimal Select Case CInt([to]) Case s_single, s_double Return ConversionKind.WideningNumeric End Select '• From Single to Double. Case s_single Select Case CInt([to]) Case s_double Return ConversionKind.WideningNumeric End Select 'Reference conversions '• From a reference type to a base type. Case s_string Select Case CInt([to]) Case s_object Return ConversionKind.WideningReference End Select 'String conversions '• From Char to String. Case s_char Select Case CInt([to]) Case s_string Return ConversionKind.WideningString End Select End Select Select Case CInt([to]) 'Value Type conversions '• From a value type to a base type. Case s_object Select Case CInt([from]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double, s_char, s_boolean, s_date Return ConversionKind.WideningValue End Select End Select Return s_noConversion End Function Private Function HasBuiltInNarrowingConversions(from As SpecialType, [to] As SpecialType) As ConversionKind Select Case CInt(from) 'Boolean conversions '• From Boolean to Byte, SByte, UShort, Short, UInteger, Integer, ULong, Long, Decimal, Single, or Double. Case s_boolean Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double Return ConversionKind.NarrowingBoolean End Select 'Numeric conversions '• From Byte to SByte. Case s_byte Select Case CInt([to]) Case s_SByte Return ConversionKind.NarrowingNumeric End Select '• From SByte to Byte, UShort, UInteger, or ULong. Case s_SByte Select Case CInt([to]) Case s_byte, s_UShort, s_UInteger, s_ULong Return ConversionKind.NarrowingNumeric End Select '• From UShort to Byte, SByte, or Short. Case s_UShort Select Case CInt([to]) Case s_byte, s_SByte, s_short Return ConversionKind.NarrowingNumeric End Select '• From Short to Byte, SByte, UShort, UInteger, or ULong. Case s_short Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_UInteger, s_ULong Return ConversionKind.NarrowingNumeric End Select '• From UInteger to Byte, SByte, UShort, Short, or Integer. Case s_UInteger Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_integer Return ConversionKind.NarrowingNumeric End Select '• From Integer to Byte, SByte, UShort, Short, UInteger, or ULong. Case s_integer Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_ULong Return ConversionKind.NarrowingNumeric End Select '• From ULong to Byte, SByte, UShort, Short, UInteger, Integer, or Long. Case s_ULong Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_long Return ConversionKind.NarrowingNumeric End Select '• From Long to Byte, SByte, UShort, Short, UInteger, Integer, or ULong. Case s_long Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong Return ConversionKind.NarrowingNumeric End Select '• From Decimal to Byte, SByte, UShort, Short, UInteger, Integer, ULong, or Long. Case s_decimal Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long Return ConversionKind.NarrowingNumeric End Select '• From Single to Byte, SByte, UShort, Short, UInteger, Integer, ULong, Long, or Decimal. Case s_single Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal Return ConversionKind.NarrowingNumeric End Select '• From Double to Byte, SByte, UShort, Short, UInteger, Integer, ULong, Long, Decimal, or Single. Case s_double Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single Return ConversionKind.NarrowingNumeric End Select 'String conversions '• From String to Char. '• From String to Boolean and from Boolean to String. '• Conversions between String and Byte, SByte, UShort, Short, UInteger, Integer, ULong, Long, Decimal, Single, or Double. '• From String to Date and from Date to String. Case s_string Select Case CInt([to]) Case s_char, s_boolean, s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double, s_date Return ConversionKind.NarrowingString End Select 'VB Runtime Conversions Case s_object Select Case CInt([to]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double, s_char, s_boolean, s_date Return ConversionKind.NarrowingValue Case s_string Return ConversionKind.NarrowingReference End Select End Select Select Case CInt([to]) 'Boolean conversions '• From Byte, SByte, UShort, Short, UInteger, Integer, ULong, Long, Decimal, Single, or Double to Boolean. Case s_boolean Select Case CInt([from]) Case s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double Return ConversionKind.NarrowingBoolean End Select 'String conversions '• From String to Boolean and from Boolean to String. '• Conversions between String and Byte, SByte, UShort, Short, UInteger, Integer, ULong, Long, Decimal, Single, or Double. '• From String to Date and from Date to String. Case s_string Select Case CInt([from]) Case s_boolean, s_byte, s_SByte, s_UShort, s_short, s_UInteger, s_integer, s_ULong, s_long, s_decimal, s_single, s_double, s_date Return ConversionKind.NarrowingString End Select End Select Return s_noConversion End Function <Fact()> Public Sub EnumConversions() CompileAndVerify( <compilation name="VBEnumConversions"> <file name="a.vb"> Option Strict Off Imports System Imports System.Globalization Imports System.Collections.Generic Module Module1 Sub Main() Dim BoFalse As Boolean Dim BoTrue As Boolean Dim SB As SByte Dim By As Byte Dim Sh As Short Dim US As UShort Dim [In] As Integer Dim UI As UInteger Dim Lo As Long Dim UL As ULong Dim De As Decimal Dim Si As Single Dim [Do] As Double Dim St As String Dim Ob As Object Dim Tc As TypeCode Dim TcAsVT As ValueType BoFalse = False BoTrue = True SB = 1 By = 2 Sh = 3 US = 4 [In] = 5 UI = 6 Lo = 7 UL = 8 Si = 10 [Do] = 11 De = 9D St = "12" Ob = 13 Tc = TypeCode.Decimal TcAsVT = Tc System.Console.WriteLine("Conversions to enum:") PrintResultTc(BoFalse) PrintResultTc(BoTrue) PrintResultTc(SB) PrintResultTc(By) PrintResultTc(Sh) PrintResultTc(US) PrintResultTc([In]) PrintResultTc(UI) PrintResultTc(Lo) PrintResultTc(UL) PrintResultTc(Si) PrintResultTc([Do]) PrintResultTc(De) PrintResultTc(Ob) PrintResultTc(St) PrintResultTc(TcAsVT) System.Console.WriteLine() System.Console.WriteLine("Conversions from enum:") PrintResultBo(Tc) PrintResultSB(Tc) PrintResultBy(Tc) PrintResultSh(Tc) PrintResultUs(Tc) PrintResultIn(Tc) PrintResultUI(Tc) PrintResultLo(Tc) PrintResultUL(Tc) PrintResultSi(Tc) PrintResultDo(Tc) PrintResultDe(Tc) PrintResultOb(Tc) PrintResultSt(Tc) PrintResultValueType(Tc) End Sub Sub PrintResultTc(val As TypeCode) System.Console.WriteLine("TypeCode: {0}", val) End Sub Sub PrintResultBo(val As Boolean) System.Console.WriteLine("Boolean: {0}", val) End Sub Sub PrintResultSB(val As SByte) System.Console.WriteLine("SByte: {0}", val) End Sub Sub PrintResultBy(val As Byte) System.Console.WriteLine("Byte: {0}", val) End Sub Sub PrintResultSh(val As Short) System.Console.WriteLine("Short: {0}", val) End Sub Sub PrintResultUs(val As UShort) System.Console.WriteLine("UShort: {0}", val) End Sub Sub PrintResultIn(val As Integer) System.Console.WriteLine("Integer: {0}", val) End Sub Sub PrintResultUI(val As UInteger) System.Console.WriteLine("UInteger: {0}", val) End Sub Sub PrintResultLo(val As Long) System.Console.WriteLine("Long: {0}", val) End Sub Sub PrintResultUL(val As ULong) System.Console.WriteLine("ULong: {0}", val) End Sub Sub PrintResultDe(val As Decimal) System.Console.WriteLine("Decimal: {0}", val) End Sub Sub PrintResultSi(val As Single) System.Console.WriteLine("Single: {0}", val) End Sub Sub PrintResultDo(val As Double) System.Console.WriteLine("Double: {0}", val) End Sub Sub PrintResultSt(val As String) System.Console.WriteLine("String: {0}", val) End Sub Sub PrintResultOb(val As Object) System.Console.WriteLine("Object: {0}", val) End Sub Sub PrintResultValueType(val As ValueType) System.Console.WriteLine("ValueType: {0}", val) End Sub End Module </file> </compilation>, expectedOutput:=<![CDATA[ Conversions to enum: TypeCode: Empty TypeCode: -1 TypeCode: Object TypeCode: DBNull TypeCode: Boolean TypeCode: Char TypeCode: SByte TypeCode: Byte TypeCode: Int16 TypeCode: UInt16 TypeCode: UInt32 TypeCode: Int64 TypeCode: Int32 TypeCode: Single TypeCode: UInt64 TypeCode: Decimal Conversions from enum: Boolean: True SByte: 15 Byte: 15 Short: 15 UShort: 15 Integer: 15 UInteger: 15 Long: 15 ULong: 15 Single: 15 Double: 15 Decimal: 15 Object: Decimal String: 15 ValueType: Decimal ]]>) End Sub <Fact()> Public Sub ConversionDiagnostic1() Dim compilationDef = <compilation name="VBConversionsDiagnostic1"> <file name="a.vb"> Imports System Module Module1 Sub Main() Dim [In] As Integer [In] = Console.WriteLine() [In] = CType(Console.WriteLine(), Integer) [In] = CType(1, UnknownType) [In] = CType(unknownValue, Integer) [In] = CType(unknownValue, UnknownType) Dim tr As System.TypedReference = Nothing Dim ai As System.ArgIterator = Nothing Dim ra As System.RuntimeArgumentHandle = Nothing Dim Ob As Object Ob = tr Ob = ai Ob = ra Ob = CType(tr, Object) Ob = CType(ai, Object) Ob = CType(ra, Object) Dim vt As ValueType vt = tr vt = ai vt = ra vt = CType(tr, ValueType) vt = CType(ai, ValueType) vt = CType(ra, ValueType) Dim collection As Microsoft.VisualBasic.Collection = Nothing Dim _collection As _Collection = Nothing collection = _collection _collection = collection collection = CType(_collection, Microsoft.VisualBasic.Collection) _collection = CType(collection, _Collection) Dim Si As Single Dim De As Decimal [In] = Int64.MaxValue [In] = CInt(Int64.MaxValue) Si = System.Double.MaxValue Si = CSng(System.Double.MaxValue) De = System.Double.MaxValue De = CDec(System.Double.MaxValue) De = 10.0F De = CDec(10.0F) Dim Da As DateTime = Nothing [In] = Da [In] = CInt(Da) Da = [In] Da = CDate([In]) Dim [Do] As Double = Nothing Dim Ch As Char = Nothing [Do] = Da [Do] = CDbl(Da) Da = [Do] Da = CDate([Do]) [In] = Ch [In] = CInt(Ch) Ch = [In] Ch = CChar([In]) Dim InArray As Integer() = Nothing Dim ObArray As Object() = Nothing Dim VtArray As ValueType() = Nothing ObArray = InArray ObArray = CType(InArray, Object()) VtArray = InArray VtArray = CType(InArray, ValueType()) Dim TC1Array As TestClass1() = Nothing Dim TC2Array As TestClass2() = Nothing TC1Array = TC2Array TC2Array = CType(TC1Array, TestClass2()) Dim InArray2 As Integer(,) = Nothing InArray = InArray2 InArray2 = CType(InArray, Integer(,)) Dim TI1Array As TestInterface1() = Nothing InArray = TI1Array TI1Array = CType(InArray, TestInterface1()) End Sub End Module Interface TestInterface1 End Interface Interface _Collection End Interface Class TestClass1 End Class Class TestClass2 End Class </file> </compilation> Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.On)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.ERR_NarrowingConversionCollection2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_NarrowingConversionCollection2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "Int64.MaxValue").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "Int64.MaxValue").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "System.Double.MaxValue").WithArguments("Decimal"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "System.Double.MaxValue").WithArguments("Decimal"), Diagnostic(ERRID.ERR_NarrowingConversionDisallowed2, "10.0F").WithArguments("Single", "Decimal"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC2Array").WithArguments("TestClass2()", "TestClass1()", "TestClass2", "TestClass1"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray2").WithArguments("Integer(*,*)", "Integer()"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TI1Array").WithArguments("TestInterface1()", "Integer()", "TestInterface1", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1")) compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.Off)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "Int64.MaxValue").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "Int64.MaxValue").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "System.Double.MaxValue").WithArguments("Decimal"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "System.Double.MaxValue").WithArguments("Decimal"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC2Array").WithArguments("TestClass2()", "TestClass1()", "TestClass2", "TestClass1"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray2").WithArguments("Integer(*,*)", "Integer()"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TI1Array").WithArguments("TestInterface1()", "Integer()", "TestInterface1", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1")) compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.Custom)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_ImplicitConversionSubst1, "_collection").WithArguments("Implicit conversion from '_Collection' to 'Collection'."), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.WRN_ImplicitConversionSubst1, "collection").WithArguments("Implicit conversion from 'Collection' to '_Collection'."), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "Int64.MaxValue").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "Int64.MaxValue").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "System.Double.MaxValue").WithArguments("Decimal"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "System.Double.MaxValue").WithArguments("Decimal"), Diagnostic(ERRID.WRN_ImplicitConversionSubst1, "10.0F").WithArguments("Implicit conversion from 'Single' to 'Decimal'."), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC2Array").WithArguments("TestClass2()", "TestClass1()", "TestClass2", "TestClass1"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray2").WithArguments("Integer(*,*)", "Integer()"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TI1Array").WithArguments("TestInterface1()", "Integer()", "TestInterface1", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1")) End Sub <Fact()> Public Sub DirectCastDiagnostic1() Dim compilationDef = <compilation name="DirectCastDiagnostic1"> <file name="a.vb"> Imports System Module Module1 Sub Main() Dim [In] As Integer [In] = DirectCast(Console.WriteLine(), Integer) [In] = DirectCast(1, UnknownType) [In] = DirectCast(unknownValue, Integer) [In] = DirectCast(unknownValue, UnknownType) Dim tr As System.TypedReference = Nothing Dim ai As System.ArgIterator = Nothing Dim ra As System.RuntimeArgumentHandle = Nothing Dim Ob As Object Ob = DirectCast(tr, Object) Ob = DirectCast(ai, Object) Ob = DirectCast(ra, Object) Dim vt As ValueType vt = DirectCast(tr, ValueType) vt = DirectCast(ai, ValueType) vt = DirectCast(ra, ValueType) Dim collection As Microsoft.VisualBasic.Collection = Nothing Dim _collection As _Collection = Nothing collection = DirectCast(_collection, Microsoft.VisualBasic.Collection) _collection = DirectCast(collection, _Collection) Dim Si As Single Dim De As Decimal [In] = DirectCast(Int64.MaxValue, Int32) De = DirectCast(System.Double.MaxValue, System.Decimal) Dim Da As DateTime = Nothing [In] = DirectCast(Da, Int32) Da = DirectCast([In], DateTime) Dim [Do] As Double = Nothing Dim Ch As Char = Nothing [Do] = DirectCast(Da, System.Double) Da = DirectCast([Do], DateTime) [In] = DirectCast(Ch, Int32) Ch = DirectCast([In], System.Char) Dim InArray As Integer() = Nothing Dim ObArray As Object() = Nothing Dim VtArray As ValueType() = Nothing ObArray = DirectCast(InArray, Object()) VtArray = DirectCast(InArray, ValueType()) Dim TC1Array As TestClass1() = Nothing Dim TC2Array As TestClass2() = Nothing TC2Array = DirectCast(TC1Array, TestClass2()) Dim InArray2 As Integer(,) = Nothing InArray2 = DirectCast(InArray, Integer(,)) Dim TI1Array As TestInterface1() = Nothing TI1Array = DirectCast(InArray, TestInterface1()) Dim St As String = Nothing Dim ChArray As Char() = Nothing Ch = DirectCast(St, System.Char) St = DirectCast(Ch, System.String) St = DirectCast(ChArray, System.String) ChArray = DirectCast(St, System.Char()) [In] = DirectCast([In], System.Int32) Si = DirectCast(Si, System.Single) [Do] = DirectCast([Do], System.Double) [Do] = DirectCast(Si, System.Double) End Sub End Module Interface TestInterface1 End Interface Interface _Collection End Interface Class TestClass1 End Class Class TestClass2 End Class </file> </compilation> Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.On)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_TypeMismatch2, "Int64.MaxValue").WithArguments("Long", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "System.Double.MaxValue").WithArguments("Double", "Decimal"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1"), Diagnostic(ERRID.ERR_TypeMismatch2, "St").WithArguments("String", "Char"), Diagnostic(ERRID.ERR_TypeMismatch2, "Ch").WithArguments("Char", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "ChArray").WithArguments("Char()", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "St").WithArguments("String", "Char()"), Diagnostic(ERRID.WRN_ObsoleteIdentityDirectCastForValueType, "[In]"), Diagnostic(ERRID.ERR_IdentityDirectCastForFloat, "Si"), Diagnostic(ERRID.ERR_IdentityDirectCastForFloat, "[Do]"), Diagnostic(ERRID.ERR_TypeMismatch2, "Si").WithArguments("Single", "Double")) compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.Off)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_TypeMismatch2, "Int64.MaxValue").WithArguments("Long", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "System.Double.MaxValue").WithArguments("Double", "Decimal"), Diagnostic(ERRID.ERR_TypeMismatch2, "Da").WithArguments("Date", "Integer"), Diagnostic(ERRID.ERR_TypeMismatch2, "[In]").WithArguments("Integer", "Date"), Diagnostic(ERRID.ERR_DateToDoubleConversion, "Da"), Diagnostic(ERRID.ERR_DoubleToDateConversion, "[Do]"), Diagnostic(ERRID.ERR_CharToIntegralTypeMismatch1, "Ch").WithArguments("Integer"), Diagnostic(ERRID.ERR_IntegralToCharTypeMismatch1, "[In]").WithArguments("Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1"), Diagnostic(ERRID.ERR_TypeMismatch2, "St").WithArguments("String", "Char"), Diagnostic(ERRID.ERR_TypeMismatch2, "Ch").WithArguments("Char", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "ChArray").WithArguments("Char()", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "St").WithArguments("String", "Char()"), Diagnostic(ERRID.WRN_ObsoleteIdentityDirectCastForValueType, "[In]"), Diagnostic(ERRID.ERR_IdentityDirectCastForFloat, "Si"), Diagnostic(ERRID.ERR_IdentityDirectCastForFloat, "[Do]"), Diagnostic(ERRID.ERR_TypeMismatch2, "Si").WithArguments("Single", "Double")) End Sub <Fact()> Public Sub TryCastDiagnostic1() Dim compilationDef = <compilation name="TryCastDiagnostic1"> <file name="a.vb"> Imports System Module Module1 Sub Main() Dim [In] As Integer [In] = TryCast(Console.WriteLine(), Integer) [In] = TryCast(1, UnknownType) [In] = TryCast(unknownValue, Integer) [In] = TryCast(unknownValue, UnknownType) Dim tr As System.TypedReference = Nothing Dim ai As System.ArgIterator = Nothing Dim ra As System.RuntimeArgumentHandle = Nothing Dim Ob As Object Ob = TryCast(tr, Object) Ob = TryCast(ai, Object) Ob = TryCast(ra, Object) Dim vt As ValueType vt = TryCast(tr, ValueType) vt = TryCast(ai, ValueType) vt = TryCast(ra, ValueType) Dim collection As Microsoft.VisualBasic.Collection = Nothing Dim _collection As _Collection = Nothing collection = TryCast(_collection, Microsoft.VisualBasic.Collection) _collection = TryCast(collection, _Collection) Dim De As Decimal [In] = TryCast(Int64.MaxValue, Int32) De = TryCast(System.Double.MaxValue, System.Decimal) Dim Ch As Char = Nothing Dim InArray As Integer() = Nothing Dim ObArray As Object() = Nothing Dim VtArray As ValueType() = Nothing ObArray = TryCast(InArray, Object()) VtArray = TryCast(InArray, ValueType()) Dim TC1Array As TestClass1() = Nothing Dim TC2Array As TestClass2() = Nothing TC2Array = TryCast(TC1Array, TestClass2()) Dim InArray2 As Integer(,) = Nothing InArray2 = TryCast(InArray, Integer(,)) Dim TI1Array As TestInterface1() = Nothing TI1Array = TryCast(InArray, TestInterface1()) Dim St As String = Nothing Dim ChArray As Char() = Nothing Ch = TryCast(St, System.Char) St = TryCast(Ch, System.String) St = TryCast(ChArray, System.String) ChArray = TryCast(St, System.Char()) End Sub End Module Interface TestInterface1 End Interface Interface _Collection End Interface Class TestClass1 End Class Class TestClass2 End Class Class TestClass3(Of T) Sub Test(val As Object) Dim x As T = TryCast(val, T) End Sub End Class </file> </compilation> Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.On)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_TryCastOfValueType1, "Int32").WithArguments("Integer"), Diagnostic(ERRID.ERR_TryCastOfValueType1, "System.Decimal").WithArguments("Decimal"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1"), Diagnostic(ERRID.ERR_TryCastOfValueType1, "System.Char").WithArguments("Char"), Diagnostic(ERRID.ERR_TypeMismatch2, "Ch").WithArguments("Char", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "ChArray").WithArguments("Char()", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "St").WithArguments("String", "Char()"), Diagnostic(ERRID.ERR_TryCastOfUnconstrainedTypeParam1, "T").WithArguments("T")) compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithOptionStrict(OptionStrict.Off)) compilation.VerifyDiagnostics( Diagnostic(ERRID.ERR_VoidValue, "Console.WriteLine()"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_NameNotDeclared1, "unknownValue").WithArguments("unknownValue"), Diagnostic(ERRID.ERR_UndefinedType1, "UnknownType").WithArguments("UnknownType"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.ERR_RestrictedConversion1, "tr").WithArguments("System.TypedReference"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ai").WithArguments("System.ArgIterator"), Diagnostic(ERRID.ERR_RestrictedConversion1, "ra").WithArguments("System.RuntimeArgumentHandle"), Diagnostic(ERRID.WRN_InterfaceConversion2, "_collection").WithArguments("_Collection", "Microsoft.VisualBasic.Collection"), Diagnostic(ERRID.WRN_InterfaceConversion2, "collection").WithArguments("Microsoft.VisualBasic.Collection", "_Collection"), Diagnostic(ERRID.ERR_TryCastOfValueType1, "Int32").WithArguments("Integer"), Diagnostic(ERRID.ERR_TryCastOfValueType1, "System.Decimal").WithArguments("Decimal"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "Object()", "Integer"), Diagnostic(ERRID.ERR_ConvertObjectArrayMismatch3, "InArray").WithArguments("Integer()", "System.ValueType()", "Integer"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "TC1Array").WithArguments("TestClass1()", "TestClass2()", "TestClass1", "TestClass2"), Diagnostic(ERRID.ERR_ConvertArrayRankMismatch2, "InArray").WithArguments("Integer()", "Integer(*,*)"), Diagnostic(ERRID.ERR_ConvertArrayMismatch4, "InArray").WithArguments("Integer()", "TestInterface1()", "Integer", "TestInterface1"), Diagnostic(ERRID.ERR_TryCastOfValueType1, "System.Char").WithArguments("Char"), Diagnostic(ERRID.ERR_TypeMismatch2, "Ch").WithArguments("Char", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "ChArray").WithArguments("Char()", "String"), Diagnostic(ERRID.ERR_TypeMismatch2, "St").WithArguments("String", "Char()"), Diagnostic(ERRID.ERR_TryCastOfUnconstrainedTypeParam1, "T").WithArguments("T")) End Sub <Fact()> Public Sub ExplicitConversions1() ' the argument past to CDate("") is following system setting, ' so "1/2/2012" could be Jan 2nd OR Feb 1st Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US") Try Dim compilationDef = <compilation name="VBExplicitConversions1"> <file name="lib.vb"> <%= My.Resources.Resource.PrintResultTestSource %> </file> <file name="a.vb"> Option Strict Off Imports System Imports System.Collections.Generic Module Module1 Sub Main() PrintResult(CObj(Nothing)) PrintResult(CBool(Nothing)) PrintResult(CByte(Nothing)) 'PrintResult(CChar(Nothing)) PrintResult(CDate(Nothing)) PrintResult(CDec(Nothing)) PrintResult(CDbl(Nothing)) PrintResult(CInt(Nothing)) PrintResult(CLng(Nothing)) PrintResult(CSByte(Nothing)) PrintResult(CShort(Nothing)) PrintResult(CSng(Nothing)) PrintResult(CStr(Nothing)) PrintResult(CUInt(Nothing)) PrintResult(CULng(Nothing)) PrintResult(CUShort(Nothing)) PrintResult(CType(Nothing, System.Object)) PrintResult(CType(Nothing, System.Boolean)) PrintResult(CType(Nothing, System.Byte)) 'PrintResult(CType(Nothing, System.Char)) PrintResult(CType(Nothing, System.DateTime)) PrintResult(CType(Nothing, System.Decimal)) PrintResult(CType(Nothing, System.Double)) PrintResult(CType(Nothing, System.Int32)) PrintResult(CType(Nothing, System.Int64)) PrintResult(CType(Nothing, System.SByte)) PrintResult(CType(Nothing, System.Int16)) PrintResult(CType(Nothing, System.Single)) PrintResult(CType(Nothing, System.String)) PrintResult(CType(Nothing, System.UInt32)) PrintResult(CType(Nothing, System.UInt64)) PrintResult(CType(Nothing, System.UInt16)) PrintResult(CType(Nothing, System.Guid)) PrintResult(CType(Nothing, System.ValueType)) PrintResult(CByte(300)) PrintResult(CObj("String")) PrintResult(CBool("False")) PrintResult(CByte("1")) PrintResult(CChar("a")) PrintResult(CDate("11/12/2001 12:00:00 AM")) PrintResult(CDec("-2")) PrintResult(CDbl("3")) PrintResult(CInt("-4")) PrintResult(CLng("5")) PrintResult(CSByte("-6")) PrintResult(CShort("7")) PrintResult(CSng("-8")) PrintResult(CStr(9)) PrintResult(CUInt("10")) PrintResult(CULng("11")) PrintResult(CUShort("12")) End Sub Function Int32ToInt32(val As System.Int32) As Int32 Return CInt(val) End Function Function SingleToSingle(val As System.Single) As Single Return CSng(val) End Function Function DoubleToDouble(val As System.Double) As Double Return CDbl(val) End Function End Module </file> </compilation> CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOverflowChecks(False), expectedOutput:=<![CDATA[ Object: [] Boolean: False Byte: 0 Date: 1/1/0001 12:00:00 AM Decimal: 0 Double: 0 Integer: 0 Long: 0 SByte: 0 Short: 0 Single: 0 String: [] UInteger: 0 ULong: 0 UShort: 0 Object: [] Boolean: False Byte: 0 Date: 1/1/0001 12:00:00 AM Decimal: 0 Double: 0 Integer: 0 Long: 0 SByte: 0 Short: 0 Single: 0 String: [] UInteger: 0 ULong: 0 UShort: 0 Guid: 00000000-0000-0000-0000-000000000000 ValueType: [] Byte: 44 Object: [String] Boolean: False Byte: 1 Char: [a] Date: 11/12/2001 12:00:00 AM Decimal: -2 Double: 3 Integer: -4 Long: 5 SByte: -6 Short: 7 Single: -8 String: [9] UInteger: 10 ULong: 11 UShort: 12 ]]>). VerifyIL("Module1.Int32ToInt32", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldarg.0 IL_0001: ret } ]]>). VerifyIL("Module1.SingleToSingle", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldarg.0 IL_0001: ret } ]]>). VerifyIL("Module1.DoubleToDouble", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldarg.0 IL_0001: ret } ]]>) Catch ex As Exception Finally System.Threading.Thread.CurrentThread.CurrentCulture = currCulture End Try End Sub <Fact()> Public Sub DirectCast1() Dim compilationDef = <compilation name="DirectCast1"> <file name="helper.vb"><%= My.Resources.Resource.PrintResultTestSource %></file> <file name="a.vb"> Option Strict Off Imports System Imports System.Globalization Imports System.Collections.Generic Module Module1 Sub Main() PrintResult(DirectCast(Nothing, System.Object)) PrintResult(DirectCast(Nothing, System.Boolean)) PrintResult(DirectCast(Nothing, System.Byte)) PrintResult(DirectCast(Nothing, System.DateTime)) PrintResult(DirectCast(Nothing, System.Decimal)) PrintResult(DirectCast(Nothing, System.Double)) PrintResult(DirectCast(Nothing, System.Int32)) PrintResult(DirectCast(Nothing, System.Int64)) PrintResult(DirectCast(Nothing, System.SByte)) PrintResult(DirectCast(Nothing, System.Int16)) PrintResult(DirectCast(Nothing, System.Single)) PrintResult(DirectCast(Nothing, System.String)) PrintResult(DirectCast(Nothing, System.UInt32)) PrintResult(DirectCast(Nothing, System.UInt64)) PrintResult(DirectCast(Nothing, System.UInt16)) PrintResult(DirectCast(Nothing, System.ValueType)) PrintResult(DirectCast(1, System.Object)) PrintResult(DirectCast(3.5R, System.ValueType)) Dim guid As Guid = New Guid("8c5dffd5-1778-4dd3-a9f5-6a9708146a7c") Dim guidObject As Object = guid PrintResult(DirectCast(guid, System.Object)) PrintResult(DirectCast(guidObject, System.Guid)) PrintResult(DirectCast("abc", System.IComparable)) PrintResult(GenericParamTestHelperOfString.NothingToT()) 'PrintResult(DirectCast(Nothing, System.Guid)) PrintResult(GenericParamTestHelperOfGuid.NothingToT()) PrintResult(GenericParamTestHelperOfString.TToObject("abcd")) PrintResult(GenericParamTestHelperOfString.TToObject(Nothing)) PrintResult(GenericParamTestHelperOfGuid.TToObject(guid)) PrintResult(GenericParamTestHelperOfString.TToIComparable("abcde")) PrintResult(GenericParamTestHelperOfString.TToIComparable(Nothing)) PrintResult(GenericParamTestHelperOfGuid.TToIComparable(guid)) PrintResult(GenericParamTestHelperOfGuid.ObjectToT(guidObject)) 'PrintResult(GenericParamTestHelperOfGuid.ObjectToT(Nothing)) PrintResult(GenericParamTestHelperOfString.ObjectToT("ObString")) PrintResult(GenericParamTestHelperOfString.ObjectToT(Nothing)) 'PrintResult(GenericParamTestHelper(Of System.Int32).ObjectToT(Nothing)) PrintResult(GenericParamTestHelperOfString.IComparableToT("abcde")) PrintResult(GenericParamTestHelperOfString.IComparableToT(Nothing)) PrintResult(GenericParamTestHelperOfGuid.IComparableToT(guid)) 'PrintResult(GenericParamTestHelperOfGuid.IComparableToT(Nothing)) 'PrintResult(GenericParamTestHelper(Of System.Double).IComparableToT(Nothing)) Dim [In] As Integer = 23 Dim De As Decimal = 24 PrintResult(DirectCast([In], System.Int32)) PrintResult(DirectCast(De, System.Decimal)) End Sub Function NothingToGuid() As Guid Return DirectCast(Nothing, System.Guid) End Function Function NothingToInt32() As Int32 Return DirectCast(Nothing, System.Int32) End Function Function Int32ToInt32(val As System.Int32) As Int32 Return DirectCast(val, System.Int32) End Function Class GenericParamTestHelper(Of T) Public Shared Function ObjectToT(val As Object) As T Return DirectCast(val, T) End Function Public Shared Function TToObject(val As T) As Object Return DirectCast(val, Object) End Function Public Shared Function TToIComparable(val As T) As IComparable Return DirectCast(val, IComparable) End Function Public Shared Function IComparableToT(val As IComparable) As T Return DirectCast(val, T) End Function Public Shared Function NothingToT() As T Return DirectCast(Nothing, T) End Function End Class Class GenericParamTestHelperOfString Inherits GenericParamTestHelper(Of String) End Class Class GenericParamTestHelperOfGuid Inherits GenericParamTestHelper(Of Guid) End Class End Module </file> </compilation> CompileAndVerify(compilationDef, expectedOutput:=<![CDATA[ Object: [] Boolean: False Byte: 0 Date: 1/1/0001 12:00:00 AM Decimal: 0 Double: 0 Integer: 0 Long: 0 SByte: 0 Short: 0 Single: 0 String: [] UInteger: 0 ULong: 0 UShort: 0 ValueType: [] Object: [1] ValueType: [3.5] Object: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] Guid: 8c5dffd5-1778-4dd3-a9f5-6a9708146a7c IComparable: [abc] String: [] Guid: 00000000-0000-0000-0000-000000000000 Object: [abcd] Object: [] Object: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] IComparable: [abcde] IComparable: [] IComparable: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] Guid: 8c5dffd5-1778-4dd3-a9f5-6a9708146a7c String: [ObString] String: [] String: [abcde] String: [] Guid: 8c5dffd5-1778-4dd3-a9f5-6a9708146a7c Integer: 23 Decimal: 24 ]]>). VerifyIL("Module1.NothingToGuid", <![CDATA[ { // Code size 7 (0x7) .maxstack 1 IL_0000: ldnull IL_0001: unbox.any "System.Guid" IL_0006: ret } ]]>). VerifyIL("Module1.NothingToInt32", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldc.i4.0 IL_0001: ret } ]]>). VerifyIL("Module1.Int32ToInt32", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldarg.0 IL_0001: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper(Of T).ObjectToT", <![CDATA[ { // Code size 7 (0x7) .maxstack 1 IL_0000: ldarg.0 IL_0001: unbox.any "T" IL_0006: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper(Of T).TToObject", <![CDATA[ { // Code size 7 (0x7) .maxstack 1 IL_0000: ldarg.0 IL_0001: box "T" IL_0006: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper(Of T).TToIComparable", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: box "T" IL_0006: castclass "System.IComparable" IL_000b: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper(Of T).IComparableToT", <![CDATA[ { // Code size 7 (0x7) .maxstack 1 IL_0000: ldarg.0 IL_0001: unbox.any "T" IL_0006: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper(Of T).NothingToT", <![CDATA[ { // Code size 10 (0xa) .maxstack 1 .locals init (T V_0) IL_0000: ldloca.s V_0 IL_0002: initobj "T" IL_0008: ldloc.0 IL_0009: ret } ]]>) End Sub <Fact()> Public Sub TryCast1() Dim compilationDef = <compilation name="TryCast1"> <file name="helper.vb"><%= My.Resources.Resource.PrintResultTestSource %></file> <file name="a.vb"> Option Strict Off Imports System Imports System.Globalization Imports System.Collections.Generic Module Module1 Sub Main() PrintResult(TryCast(Nothing, System.Object)) PrintResult(TryCast(Nothing, System.String)) PrintResult(TryCast(Nothing, System.ValueType)) PrintResult(TryCast(1, System.Object)) PrintResult(TryCast(3.5R, System.ValueType)) PrintResult(TryCast(CObj("sdf"), System.String)) PrintResult(TryCast(New Object(), System.String)) Dim guid As Guid = New Guid("8c5dffd5-1778-4dd3-a9f5-6a9708146a7c") Dim guidObject As Object = guid PrintResult(TryCast(guid, System.Object)) PrintResult(TryCast("abc", System.IComparable)) PrintResult(TryCast(guid, System.IComparable)) PrintResult(GenericParamTestHelperOfString2.NothingToT()) PrintResult(GenericParamTestHelperOfString1.TToObject("abcd")) PrintResult(GenericParamTestHelperOfString1.TToObject(Nothing)) PrintResult(GenericParamTestHelperOfGuid1.TToObject(guid)) PrintResult(GenericParamTestHelperOfString1.TToIComparable("abcde")) PrintResult(GenericParamTestHelperOfString1.TToIComparable(Nothing)) PrintResult(GenericParamTestHelperOfGuid1.TToIComparable(guid)) PrintResult(GenericParamTestHelperOfString2.ObjectToT("ObString")) PrintResult(GenericParamTestHelperOfString2.ObjectToT(Nothing)) PrintResult(GenericParamTestHelperOfString2.IComparableToT("abcde")) PrintResult(GenericParamTestHelperOfString2.IComparableToT(Nothing)) End Sub Function NothingToString() As String Return DirectCast(Nothing, System.String) End Function Function StringToString(val As String) As String Return DirectCast(val, System.String) End Function Class GenericParamTestHelper1(Of T) Public Shared Function TToObject(val As T) As Object Return TryCast(val, Object) End Function Public Shared Function TToIComparable(val As T) As IComparable Return TryCast(val, IComparable) End Function End Class Class GenericParamTestHelper2(Of T As Class) Public Shared Function ObjectToT(val As Object) As T Return TryCast(val, T) End Function Public Shared Function IComparableToT(val As IComparable) As T Return TryCast(val, T) End Function Public Shared Function NothingToT() As T Return TryCast(Nothing, T) End Function End Class Class GenericParamTestHelperOfString1 Inherits GenericParamTestHelper1(Of String) End Class Class GenericParamTestHelperOfString2 Inherits GenericParamTestHelper2(Of String) End Class Class GenericParamTestHelperOfGuid1 Inherits GenericParamTestHelper1(Of Guid) End Class End Module </file> </compilation> CompileAndVerify(compilationDef, expectedOutput:=<![CDATA[ Object: [] String: [] ValueType: [] Object: [1] ValueType: [3.5] String: [sdf] String: [] Object: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] IComparable: [abc] IComparable: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] String: [] Object: [abcd] Object: [] Object: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] IComparable: [abcde] IComparable: [] IComparable: [8c5dffd5-1778-4dd3-a9f5-6a9708146a7c] String: [ObString] String: [] String: [abcde] String: [] ]]>). VerifyIL("Module1.NothingToString", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldnull IL_0001: ret } ]]>). VerifyIL("Module1.StringToString", <![CDATA[ { // Code size 2 (0x2) .maxstack 1 IL_0000: ldarg.0 IL_0001: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper2(Of T).ObjectToT", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: isinst "T" IL_0006: unbox.any "T" IL_000b: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper1(Of T).TToObject", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: box "T" IL_0006: isinst "Object" IL_000b: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper1(Of T).TToIComparable", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: box "T" IL_0006: isinst "System.IComparable" IL_000b: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper2(Of T).IComparableToT", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: isinst "T" IL_0006: unbox.any "T" IL_000b: ret } ]]>). VerifyIL("Module1.GenericParamTestHelper2(Of T).NothingToT", <![CDATA[ { // Code size 10 (0xa) .maxstack 1 .locals init (T V_0) IL_0000: ldloca.s V_0 IL_0002: initobj "T" IL_0008: ldloc.0 IL_0009: ret } ]]>) End Sub <Fact()> Public Sub Bug4281_1() Dim compilationDef = <compilation name="Bug4281_1"> <file name="a.vb"> Imports System Module M Sub Main() Dim x As Object= DirectCast(1, DayOfWeek) System.Console.WriteLine(x.GetType()) System.Console.WriteLine(x) Dim y As Integer = 2 x = DirectCast(y, DayOfWeek) System.Console.WriteLine(x.GetType()) System.Console.WriteLine(x) End Sub End Module </file> </compilation> CompileAndVerify(compilationDef, expectedOutput:=<![CDATA[ System.DayOfWeek Monday System.DayOfWeek Tuesday ]]>). VerifyIL("M.Main", <![CDATA[ { // Code size 55 (0x37) .maxstack 2 IL_0000: ldc.i4.1 IL_0001: box "System.DayOfWeek" IL_0006: dup IL_0007: callvirt "Function Object.GetType() As System.Type" IL_000c: call "Sub System.Console.WriteLine(Object)" IL_0011: call "Function System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Object) As Object" IL_0016: call "Sub System.Console.WriteLine(Object)" IL_001b: ldc.i4.2 IL_001c: box "System.DayOfWeek" IL_0021: dup IL_0022: callvirt "Function Object.GetType() As System.Type" IL_0027: call "Sub System.Console.WriteLine(Object)" IL_002c: call "Function System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Object) As Object" IL_0031: call "Sub System.Console.WriteLine(Object)" IL_0036: ret } ]]>) End Sub <Fact()> Public Sub Bug4281_2() Dim compilationDef = <compilation name="Bug4281_2"> <file name="a.vb"> Imports System Module M Sub Main() Dim x As DayOfWeek= DirectCast(1, DayOfWeek) System.Console.WriteLine(x.GetType()) System.Console.WriteLine(x) Dim y As Integer = 2 x = DirectCast(y, DayOfWeek) System.Console.WriteLine(x.GetType()) System.Console.WriteLine(x) End Sub End Module </file> </compilation> CompileAndVerify(compilationDef, expectedOutput:=<![CDATA[ System.DayOfWeek 1 System.DayOfWeek 2 ]]>) End Sub <Fact()> Public Sub Bug4256() Dim compilationDef = <compilation name="Bug4256"> <file name="a.vb"> Option Strict On Module M Sub Main() Dim x As Object = 1 Dim y As Long = CLng(x) System.Console.WriteLine(y.GetType()) System.Console.WriteLine(y) End Sub End Module </file> </compilation> CompileAndVerify(compilationDef, expectedOutput:=<![CDATA[ System.Int64 1 ]]>) End Sub <WorkItem(11515, "DevDiv_Projects/Roslyn")> <Fact()> Public Sub TestIdentityConversionForGenericNested() Dim vbCompilation = CreateVisualBasicCompilation("TestIdentityConversionForGenericNested", <![CDATA[Option Strict On Imports System Public Module Program Class C1(Of T) Public EnumField As E1 Structure S1 Public EnumField As E1 End Structure Enum E1 A End Enum End Class Sub Main() Dim outer As New C1(Of Integer) Dim inner As New C1(Of Integer).S1 outer.EnumField = C1(Of Integer).E1.A inner.EnumField = C1(Of Integer).E1.A Goo(inner.EnumField) End Sub Sub Goo(x As Object) Console.WriteLine(x.ToString) End Sub End Module]]>, compilationOptions:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication)) CompileAndVerify(vbCompilation, expectedOutput:="A").VerifyDiagnostics() End Sub <WorkItem(544919, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544919")> <Fact> Public Sub TestClassifyConversion() Dim source = <text> Imports System Module Program Sub M() End Sub Sub M(l As Long) End Sub Sub M(s As Short) End Sub Sub M(i As Integer) End Sub Sub Main() Dim ii As Integer = 0 Console.WriteLine(ii) Dim jj As Short = 1 Console.WriteLine(jj) Dim ss As String = String.Empty Console.WriteLine(ss) ' Perform conversion classification here. End Sub End Module </text>.Value Dim tree = Parse(source) Dim c As VisualBasicCompilation = VisualBasicCompilation.Create("MyCompilation").AddReferences(MscorlibRef).AddSyntaxTrees(tree) Dim model = c.GetSemanticModel(tree) ' Get VariableDeclaratorSyntax corresponding to variable 'ii' above. Dim variableDeclarator = CType(tree.GetCompilationUnitRoot().FindToken(source.IndexOf("ii", StringComparison.Ordinal)).Parent.Parent, VariableDeclaratorSyntax) ' Get TypeSymbol corresponding to above VariableDeclaratorSyntax. Dim targetType As TypeSymbol = CType(model.GetDeclaredSymbol(variableDeclarator.Names.Single), LocalSymbol).Type Dim local As LocalSymbol = CType(model.GetDeclaredSymbol(variableDeclarator.Names.Single), LocalSymbol) Assert.Equal(1, local.Locations.Length) ' Perform ClassifyConversion for expressions from within the above SyntaxTree. Dim sourceExpression1 = CType(tree.GetCompilationUnitRoot().FindToken(source.IndexOf("jj)", StringComparison.Ordinal)).Parent, ExpressionSyntax) Dim conversion As Conversion = model.ClassifyConversion(sourceExpression1, targetType) Assert.True(conversion.IsWidening) Assert.True(conversion.IsNumeric) Dim sourceExpression2 = CType(tree.GetCompilationUnitRoot().FindToken(source.IndexOf("ss)", StringComparison.Ordinal)).Parent, ExpressionSyntax) conversion = model.ClassifyConversion(sourceExpression2, targetType) Assert.True(conversion.IsNarrowing) Assert.True(conversion.IsString) ' Perform ClassifyConversion for constructed expressions ' at the position identified by the comment "' Perform ..." above. Dim sourceExpression3 As ExpressionSyntax = SyntaxFactory.IdentifierName("jj") Dim position = source.IndexOf("' ", StringComparison.Ordinal) conversion = model.ClassifyConversion(position, sourceExpression3, targetType) Assert.True(conversion.IsWidening) Assert.True(conversion.IsNumeric) Dim sourceExpression4 As ExpressionSyntax = SyntaxFactory.IdentifierName("ss") conversion = model.ClassifyConversion(position, sourceExpression4, targetType) Assert.True(conversion.IsNarrowing) Assert.True(conversion.IsString) Dim sourceExpression5 As ExpressionSyntax = SyntaxFactory.ParseExpression("100L") conversion = model.ClassifyConversion(position, sourceExpression5, targetType) ' This is Widening because the numeric literal constant 100L can be converted to Integer ' without any data loss. Note: This is special for literal constants. Assert.True(conversion.IsWidening) Assert.True(conversion.IsNumeric) End Sub <WorkItem(15925, "DevDiv_Projects/Roslyn")> <WorkItem(544919, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544919")> <Fact> Public Sub TestClassifyConversionStaticLocal() Dim source = <text> Imports System Module Program Sub M() End Sub Sub M(l As Long) End Sub Sub M(s As Short) End Sub Sub M(i As Integer) End Sub Sub Main() Static ii As Integer = 0 Console.WriteLine(ii) Static jj As Short = 1 Console.WriteLine(jj) Static ss As String = String.Empty Console.WriteLine(ss) ' Perform conversion classification here. End Sub End Module </text>.Value Dim tree = Parse(source) Dim c As VisualBasicCompilation = VisualBasicCompilation.Create("MyCompilation").AddReferences(MscorlibRef).AddSyntaxTrees(tree) Dim model = c.GetSemanticModel(tree) ' Get VariableDeclaratorSyntax corresponding to variable 'ii' above. Dim variableDeclarator = CType(tree.GetCompilationUnitRoot().FindToken(source.IndexOf("ii", StringComparison.Ordinal)).Parent.Parent, VariableDeclaratorSyntax) ' Get TypeSymbol corresponding to above VariableDeclaratorSyntax. Dim targetType As TypeSymbol = CType(model.GetDeclaredSymbol(variableDeclarator.Names.Single), LocalSymbol).Type Dim local As LocalSymbol = CType(model.GetDeclaredSymbol(variableDeclarator.Names.Single), LocalSymbol) Assert.Equal(1, local.Locations.Length) ' Perform ClassifyConversion for expressions from within the above SyntaxTree. Dim sourceExpression1 = CType(tree.GetCompilationUnitRoot().FindToken(source.IndexOf("jj)", StringComparison.Ordinal)).Parent, ExpressionSyntax) Dim conversion As Conversion = model.ClassifyConversion(sourceExpression1, targetType) Assert.True(conversion.IsWidening) Assert.True(conversion.IsNumeric) Dim sourceExpression2 = CType(tree.GetCompilationUnitRoot().FindToken(source.IndexOf("ss)", StringComparison.Ordinal)).Parent, ExpressionSyntax) conversion = model.ClassifyConversion(sourceExpression2, targetType) Assert.True(conversion.IsNarrowing) Assert.True(conversion.IsString) ' Perform ClassifyConversion for constructed expressions ' at the position identified by the comment "' Perform ..." above. Dim sourceExpression3 As ExpressionSyntax = SyntaxFactory.IdentifierName("jj") Dim position = source.IndexOf("' ", StringComparison.Ordinal) conversion = model.ClassifyConversion(position, sourceExpression3, targetType) Assert.True(conversion.IsWidening) Assert.True(conversion.IsNumeric) Dim sourceExpression4 As ExpressionSyntax = SyntaxFactory.IdentifierName("ss") conversion = model.ClassifyConversion(position, sourceExpression4, targetType) Assert.True(conversion.IsNarrowing) Assert.True(conversion.IsString) Dim sourceExpression5 As ExpressionSyntax = SyntaxFactory.ParseExpression("100L") conversion = model.ClassifyConversion(position, sourceExpression5, targetType) ' This is Widening because the numeric literal constant 100L can be converted to Integer ' without any data loss. Note: This is special for literal constants. Assert.True(conversion.IsWidening) Assert.True(conversion.IsNumeric) End Sub <WorkItem(544620, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544620")> <Fact()> Public Sub Bug13088() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Public Const Z1 As Integer = 300 Public Const Z2 As Byte = Z1 Public Const Z3 As Byte = CByte(300) Public Const Z4 As Byte = DirectCast(300, Byte) Sub Main() End Sub End Module ]]></file> </compilation>) VerifyDiagnostics(compilation, Diagnostic(ERRID.ERR_ExpressionOverflow1, "Z1").WithArguments("Byte"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "300").WithArguments("Byte"), Diagnostic(ERRID.ERR_TypeMismatch2, "300").WithArguments("Integer", "Byte")) Dim symbol = compilation.GlobalNamespace.GetTypeMembers("Program").Single.GetMembers("Z2").Single Assert.False(DirectCast(symbol, FieldSymbol).HasConstantValue) symbol = compilation.GlobalNamespace.GetTypeMembers("Program").Single.GetMembers("Z3").Single Assert.False(DirectCast(symbol, FieldSymbol).HasConstantValue) symbol = compilation.GlobalNamespace.GetTypeMembers("Program").Single.GetMembers("Z4").Single Assert.False(DirectCast(symbol, FieldSymbol).HasConstantValue) End Sub <WorkItem(545760, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545760")> <Fact()> Public Sub Bug14409() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Option Strict On Module M1 Sub Main() Dim x As System.DayOfWeek? = 0 Test(0) End Sub Sub Test(x As System.DayOfWeek?) End Sub End Module ]]></file> </compilation>, TestOptions.ReleaseExe) CompileAndVerify(compilation) End Sub <WorkItem(545760, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545760")> <Fact()> Public Sub Bug14409_2() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Option Strict On Module M1 Sub Main() Test(0) End Sub Sub Test(x As System.DayOfWeek?) End Sub Sub Test(x As System.TypeCode?) End Sub End Module ]]></file> </compilation>, TestOptions.ReleaseExe) CompilationUtils.AssertTheseDiagnostics(compilation, <expected> BC30519: Overload resolution failed because no accessible 'Test' can be called without a narrowing conversion: 'Public Sub Test(x As DayOfWeek?)': Argument matching parameter 'x' narrows from 'Integer' to 'DayOfWeek?'. 'Public Sub Test(x As TypeCode?)': Argument matching parameter 'x' narrows from 'Integer' to 'TypeCode?'. Test(0) ~~~~ </expected>) End Sub <WorkItem(571095, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/571095")> <Fact()> Public Sub Bug571095() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ imports System Module Module1 Sub Main() Dim Y(10, 10) As Integer 'COMPILEERROR: BC30311, "Y" For Each x As string() In Y Console.WriteLine(x) Next x 'COMPILEERROR: BC30311, "Y" For Each x As Integer(,) In Y Console.WriteLine(x) Next x End Sub End Module ]]></file> </compilation>, TestOptions.ReleaseExe) CompilationUtils.AssertTheseDiagnostics(compilation, <expected> BC30311: Value of type 'Integer' cannot be converted to 'String()'. For Each x As string() In Y ~ BC30311: Value of type 'Integer' cannot be converted to 'Integer(*,*)'. For Each x As Integer(,) In Y ~ </expected>) End Sub <WorkItem(31, "https://roslyn.codeplex.com/workitem/31")> <Fact()> Public Sub BugCodePlex_31() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Option Strict On Module Module1 Property Value As BooleanEx? Sub Main() If Value Then End If System.Console.WriteLine("---") Value = true System.Console.WriteLine("---") Dim x as Boolean? = Value System.Console.WriteLine("---") If Value Then End If End Sub End Module Structure BooleanEx Private b As Boolean Public Sub New(value As Boolean) b = value End Sub Public Shared Widening Operator CType(value As Boolean) As BooleanEx System.Console.WriteLine("CType(value As Boolean) As BooleanEx") Return New BooleanEx(value) End Operator Public Shared Widening Operator CType(value As BooleanEx) As Boolean System.Console.WriteLine("CType(value As BooleanEx) As Boolean") Return value.b End Operator Public Shared Widening Operator CType(value As Integer) As BooleanEx System.Console.WriteLine("CType(value As Integer) As BooleanEx") Return New BooleanEx(CBool(value)) End Operator Public Shared Widening Operator CType(value As BooleanEx) As Integer System.Console.WriteLine("CType(value As BooleanEx) As Integer") Return CInt(value.b) End Operator Public Shared Widening Operator CType(value As String) As BooleanEx System.Console.WriteLine("CType(value As String) As BooleanEx") Return New BooleanEx(CBool(value)) End Operator Public Shared Widening Operator CType(value As BooleanEx) As String System.Console.WriteLine("CType(value As BooleanEx) As String") Return CStr(value.b) End Operator Public Shared Operator =(value1 As BooleanEx, value2 As Boolean) As Boolean System.Console.WriteLine("=(value1 As BooleanEx, value2 As Boolean) As Boolean") Return False End Operator Public Shared Operator <>(value1 As BooleanEx, value2 As Boolean) As Boolean System.Console.WriteLine("<>(value1 As BooleanEx, value2 As Boolean) As Boolean") Return False End Operator End Structure ]]></file> </compilation>, TestOptions.ReleaseExe) CompileAndVerify(compilation, expectedOutput:= "--- CType(value As Boolean) As BooleanEx --- CType(value As BooleanEx) As Boolean --- CType(value As BooleanEx) As Boolean") End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_01() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x As Integer = Double.MaxValue End Sub End Module ]]></file> </compilation>) Dim expectedErr = <expected> BC30439: Constant expression not representable in type 'Integer'. Dim x As Integer = Double.MaxValue ~~~~~~~~~~~~~~~ </expected> compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedErr) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedErr) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedErr) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedErr) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedErr) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedErr) End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_02() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x As Integer? = Double.MaxValue End Sub End Module ]]></file> </compilation>) Dim expectedError = <expected> BC30439: Constant expression not representable in type 'Integer?'. Dim x As Integer? = Double.MaxValue ~~~~~~~~~~~~~~~ </expected> compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_03() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x As Short = Integer.MaxValue System.Console.WriteLine(x) End Sub End Module ]]></file> </compilation>) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="-1").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="-1").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="-1").VerifyDiagnostics() Dim expectedError = <expected> BC30439: Constant expression not representable in type 'Short'. Dim x As Short = Integer.MaxValue ~~~~~~~~~~~~~~~~ </expected> compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_04() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x As Short? = Integer.MaxValue System.Console.WriteLine(x) End Sub End Module ]]></file> </compilation>) Dim expectedIL = <![CDATA[ { // Code size 22 (0x16) .maxstack 2 .locals init (Short? V_0) //x IL_0000: nop IL_0001: ldloca.s V_0 IL_0003: ldc.i4.m1 IL_0004: call "Sub Short?..ctor(Short)" IL_0009: ldloc.0 IL_000a: box "Short?" IL_000f: call "Sub System.Console.WriteLine(Object)" IL_0014: nop IL_0015: ret } ]]> compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) Dim verifier = CompileAndVerify(compilation, expectedOutput:="-1").VerifyDiagnostics() verifier.VerifyIL("Program.Main", expectedIL) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False)) verifier = CompileAndVerify(compilation, expectedOutput:="-1").VerifyDiagnostics() verifier.VerifyIL("Program.Main", expectedIL) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(False)) verifier = CompileAndVerify(compilation, expectedOutput:="-1").VerifyDiagnostics() verifier.VerifyIL("Program.Main", expectedIL) Dim expectedError = <expected> BC30439: Constant expression not representable in type 'Short?'. Dim x As Short? = Integer.MaxValue ~~~~~~~~~~~~~~~~ </expected> compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(True)) AssertTheseDiagnostics(compilation, expectedError) End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_05() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x As Short = CInt(Short.MaxValue) System.Console.WriteLine(x) End Sub End Module ]]></file> </compilation>) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(True)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(True)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_06() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x As Short? = CInt(Short.MaxValue) System.Console.WriteLine(x) End Sub End Module ]]></file> </compilation>) compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(False)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(True)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.On).WithOverflowChecks(True)) CompileAndVerify(compilation, expectedOutput:="32767").VerifyDiagnostics() End Sub <WorkItem(1099862, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1099862")> <Fact()> Public Sub Bug1099862_07() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Sub Main(args As String()) Dim x = CType(Double.MaxValue, System.Nullable(Of Integer)) End Sub End Module ]]></file> </compilation>) Dim expectedError = <expected> BC30439: Constant expression not representable in type 'Integer?'. Dim x = CType(Double.MaxValue, System.Nullable(Of Integer)) ~~~~~~~~~~~~~~~ </expected> compilation = compilation.WithOptions(TestOptions.DebugExe.WithOptionStrict(OptionStrict.Off).WithOverflowChecks(False)) AssertTheseDiagnostics(compilation, expectedError) End Sub <WorkItem(2094, "https://github.com/dotnet/roslyn/issues/2094")> <Fact()> Public Sub DirectCastNothingToAStructure() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Class Program Shared Sub Main() Try Dim val = DirectCast(Nothing, S) System.Console.WriteLine("Unexpected - 1 !!!") Catch e as System.NullReferenceException System.Console.WriteLine("Expected - 1") End Try Try M(DirectCast(Nothing, S)) System.Console.WriteLine("Unexpected - 2 !!!") Catch e as System.NullReferenceException System.Console.WriteLine("Expected - 2") End Try End Sub Shared Sub M(val as S) End Sub End Class Structure S End Structure ]]></file> </compilation>, options:=TestOptions.ReleaseExe) Dim expectedOutput = <![CDATA[ Expected - 1 Expected - 2 ]]> CompileAndVerify(compilation, expectedOutput:=expectedOutput).VerifyDiagnostics() compilation = compilation.WithOptions(TestOptions.DebugExe) CompileAndVerify(compilation, expectedOutput:=expectedOutput).VerifyDiagnostics() End Sub <WorkItem(8475, "https://github.com/dotnet/roslyn/issues/8475")> <Fact()> Public Sub ConvertConstantBeforeItsDeclaration() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Class Program Shared Sub Main() Dim x as Integer = STR Const STR As String = "" End Sub End Class ]]></file> </compilation>, options:=TestOptions.ReleaseExe) compilation.AssertTheseDiagnostics( <expected> BC32000: Local variable 'STR' cannot be referred to before it is declared. Dim x as Integer = STR ~~~ </expected>) End Sub <WorkItem(9887, "https://github.com/dotnet/roslyn/issues/9887")> <Fact()> Public Sub ConvertReferenceTypeToIntrinsicValueType() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Imports System Module Module1 Sub Main() Dim value As System.IComparable = 1.0R TestBoolean(value) TestByte(value) TestSByte(value) TestShort(value) TestUShort(value) TestInt(value) TestUInt(value) TestLng(value) TestULng(value) TestDec(value) Dim value2 As System.IComparable = 1 TestSng(value2) TestDbl(value) Dim value3 As System.IComparable = "2016-5-23" TestDate(value3) TestChar(value3) End Sub Private Sub TestArray(value2 As System.Collections.IEnumerable) System.Console.WriteLine(CType(value2, Integer())) End Sub Private Sub TestString(value2 As IComparable) System.Console.WriteLine(CStr(value2)) End Sub Private Sub TestChar(value3 As IComparable) System.Console.WriteLine(CChar(value3)) End Sub Private Sub TestDate(value3 As IComparable) System.Console.WriteLine(CDate(value3).Day) End Sub Private Sub TestDbl(value As IComparable) System.Console.WriteLine(CDbl(value)) End Sub Private Sub TestSng(value2 As IComparable) System.Console.WriteLine(CSng(value2)) End Sub Private Sub TestDec(value As IComparable) System.Console.WriteLine(CDec(value)) End Sub Private Sub TestULng(value As IComparable) System.Console.WriteLine(CULng(value)) End Sub Private Sub TestLng(value As IComparable) System.Console.WriteLine(CLng(value)) End Sub Private Sub TestUInt(value As IComparable) System.Console.WriteLine(CUInt(value)) End Sub Private Sub TestInt(value As IComparable) System.Console.WriteLine(CInt(value)) End Sub Private Sub TestUShort(value As IComparable) System.Console.WriteLine(CUShort(value)) End Sub Private Sub TestShort(value As IComparable) System.Console.WriteLine(CShort(value)) End Sub Private Sub TestSByte(value As IComparable) System.Console.WriteLine(CSByte(value)) End Sub Private Sub TestByte(value As IComparable) System.Console.WriteLine(CByte(value)) End Sub Private Sub TestBoolean(value As IComparable) System.Console.WriteLine(CBool(value)) End Sub Sub TestTypeParameter(Of T)(value As IComparable) System.Console.WriteLine(CType(value, T)) End Sub End Module ]]></file> </compilation>, options:=TestOptions.ReleaseExe) Dim verifier = CompileAndVerify(compilation, expectedOutput:= "True 1 1 1 1 1 1 1 1 1 1 1 23 2") verifier.VerifyIL("Module1.TestArray", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: castclass "Integer()" IL_0006: call "Sub System.Console.WriteLine(Object)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestString", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: castclass "String" IL_0006: call "Sub System.Console.WriteLine(String)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestChar", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToChar(Object) As Char" IL_0006: call "Sub System.Console.WriteLine(Char)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestDate", <![CDATA[ { // Code size 20 (0x14) .maxstack 1 .locals init (Date V_0) IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(Object) As Date" IL_0006: stloc.0 IL_0007: ldloca.s V_0 IL_0009: call "Function Date.get_Day() As Integer" IL_000e: call "Sub System.Console.WriteLine(Integer)" IL_0013: ret } ]]>) verifier.VerifyIL("Module1.TestDbl", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object) As Double" IL_0006: call "Sub System.Console.WriteLine(Double)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestSng", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToSingle(Object) As Single" IL_0006: call "Sub System.Console.WriteLine(Single)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestDec", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(Object) As Decimal" IL_0006: call "Sub System.Console.WriteLine(Decimal)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestULng", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(Object) As ULong" IL_0006: call "Sub System.Console.WriteLine(ULong)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestLng", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(Object) As Long" IL_0006: call "Sub System.Console.WriteLine(Long)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestUInt", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToUInteger(Object) As UInteger" IL_0006: call "Sub System.Console.WriteLine(UInteger)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestInt", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object) As Integer" IL_0006: call "Sub System.Console.WriteLine(Integer)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestUShort", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToUShort(Object) As UShort" IL_0006: call "Sub System.Console.WriteLine(Integer)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestShort", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(Object) As Short" IL_0006: call "Sub System.Console.WriteLine(Integer)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestSByte", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToSByte(Object) As SByte" IL_0006: call "Sub System.Console.WriteLine(Integer)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestByte", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToByte(Object) As Byte" IL_0006: call "Sub System.Console.WriteLine(Integer)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestBoolean", <![CDATA[ { // Code size 12 (0xc) .maxstack 1 IL_0000: ldarg.0 IL_0001: call "Function Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(Object) As Boolean" IL_0006: call "Sub System.Console.WriteLine(Boolean)" IL_000b: ret } ]]>) verifier.VerifyIL("Module1.TestTypeParameter", <![CDATA[ { // Code size 17 (0x11) .maxstack 1 IL_0000: ldarg.0 IL_0001: unbox.any "T" IL_0006: box "T" IL_000b: call "Sub System.Console.WriteLine(Object)" IL_0010: ret } ]]>) End Sub End Class End Namespace
lorcanmooney/roslyn
src/Compilers/VisualBasic/Test/Semantic/Semantics/Conversions.vb
Visual Basic
apache-2.0
297,363
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Xml.Linq Imports Microsoft.CodeAnalysis.Editor.UnitTests.AutomaticCompletion Imports Microsoft.CodeAnalysis.Editor.UnitTests.Extensions Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces Imports Microsoft.CodeAnalysis.Editor.Implementation.AutomaticCompletion Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.AutomaticCompletion Public Class AutomaticInterpolationCompletionTests Inherits AbstractAutomaticBraceCompletionTests <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestCreation() Using session = CreateSession("$$") Assert.NotNull(session) End Using End Sub <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestInvalidLocation_String() Dim code = <code>Class C Dim s As String = "$$ End Class</code> Using session = CreateSession(code) Assert.Null(session) End Using End Sub <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestInvalidLocation_Comment() Dim code = <code>Class C ' $$ End Class</code> Using session = CreateSession(code) Assert.Null(session) End Using End Sub <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestInvalidLocation_DocComment() Dim code = <code>Class C ''' $$ End Class</code> Using session = CreateSession(code) Assert.Null(session) End Using End Sub <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestStartOfInterpolatedStringExpression() Dim code = <code>Class C Sub M() Dim s = $"$$" End Sub End Class</code> Using session = CreateSession(code) Assert.NotNull(session) CheckStart(session.Session) End Using End Sub <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestAfterInterpolatedStringExpressionText() Dim code = <code>Class C Sub M() Dim s = $"Jenny I got your number: $$" End Sub End Class</code> Using session = CreateSession(code) Assert.NotNull(session) CheckStart(session.Session) End Using End Sub <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)> Public Sub TestAfterInterpolation() Dim code = <code>Class C Sub M() Dim s = $"Result = {prefix}$$" End Sub End Class</code> Using session = CreateSession(code) Assert.NotNull(session) CheckStart(session.Session) End Using End Sub Friend Overloads Function CreateSession(code As XElement) As Holder Return CreateSession(code.NormalizedValue()) End Function Friend Overloads Function CreateSession(code As String) As Holder Return CreateSession( TestWorkspace.CreateVisualBasic(code), BraceCompletionSessionProvider.CurlyBrace.OpenCharacter, BraceCompletionSessionProvider.CurlyBrace.CloseCharacter) End Function End Class End Namespace
weltkante/roslyn
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticInterpolationCompletionTests.vb
Visual Basic
apache-2.0
3,569
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics Imports Microsoft.CodeAnalysis.VisualBasic.ConvertTypeOfToNameOf Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.ConvertGetTypeToNameOf Partial Public Class ConvertGetTypeToNameOfTests Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider) Return (New VisualBasicConvertTypeOfToNameOfDiagnosticAnalyzer(), New VisualBasicConvertGetTypeToNameOfCodeFixProvider()) End Function <Fact, Trait(Traits.Feature, Traits.Features.ConvertTypeOfToNameOf)> Public Async Function BasicType() As Task Dim text = " class Test sub Method() dim typeName = [||]GetType(Test).Name end sub end class " Dim expected = " class Test sub Method() dim typeName = [||]NameOf(Test) end sub end class " Await TestInRegularAndScriptAsync(text, expected) End Function <Fact, Trait(Traits.Feature, Traits.Features.ConvertTypeOfToNameOf)> Public Async Function ClassLibraryType() As Task Dim text = " class Test sub Method() dim typeName = [||]GetType(System.String).Name end sub end class " Dim expected = " class Test sub Method() dim typeName = [||]NameOf(System.String) end sub end class " Await TestInRegularAndScriptAsync(text, expected) End Function <Fact, Trait(Traits.Feature, Traits.Features.ConvertTypeOfToNameOf)> Public Async Function ClassLibraryTypeWithImport() As Task Dim text = " Imports System class Test sub Method() dim typeName = [||]GetType(String).Name end sub end class " Dim expected = " Imports System class Test sub Method() dim typeName = [||]NameOf([String]) end sub end class " Await TestInRegularAndScriptAsync(text, expected) End Function <Fact, Trait(Traits.Feature, Traits.Features.ConvertTypeOfToNameOf)> Public Async Function NestedCall() As Task Dim text = " Imports System class Test sub Method() dim typeName = Foo([||]GetType(String).Name) end sub sub Foo(ByVal typeName As String) end sub end class " Dim expected = " Imports System class Test sub Method() dim typeName = Foo([||]NameOf([String])) end sub sub Foo(ByVal typeName As String) end sub end class " Await TestInRegularAndScriptAsync(text, expected) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsConvertAnonymousTypeToTuple)> Public Async Function NotOnVariableContainingType() As Task Await TestMissingInRegularAndScriptAsync(" import System class Test sub Method() dim typeVar = [||]GetType(String) dim typeName = typeVar.Name end sub end class ") End Function End Class End Namespace
AmadeusW/roslyn
src/Analyzers/VisualBasic/Tests/ConvertGetTypeToNameOf/ConvertGetTypeToNameOfTests.vb
Visual Basic
apache-2.0
3,396
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.CodeAnalysis.Rename.ConflictEngine Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename.VisualBasic <[UseExportProvider]> Public Class CallSiteConflictResolutionTests Private ReadOnly _outputHelper As Abstractions.ITestOutputHelper Public Sub New(outputHelper As Abstractions.ITestOutputHelper) _outputHelper = outputHelper End Sub <WpfFact> <Trait(Traits.Feature, Traits.Features.Rename)> <WorkItem(542103, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542103")> <WorkItem(535068, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/535068")> Public Sub RewriteConflictingExtensionMethodCallSite() Using result = RenameEngineResult.Create(_outputHelper, <Workspace> <Project Language="Visual Basic" CommonReferences="true"> <Document><![CDATA[ Imports System.Runtime.CompilerServices Class C Function Bar(tag As Integer) As C Return {|Replacement:Me.{|Resolved:Goo|}(1).{|Resolved:Goo|}(2)|} End Function End Class Module M <Extension()> Function [|$$Goo|](x As C, tag As Integer) As C Return New C() End Function End Module ]]></Document> </Project> </Workspace>, renameTo:="Bar") result.AssertLabeledSpansAre("Resolved", type:=RelatedLocationType.ResolvedReferenceConflict) result.AssertLabeledSpansAre("Replacement", "M.Bar(M.Bar(Me, 1), 2)") End Using End Sub <WpfFact> <Trait(Traits.Feature, Traits.Features.Rename)> <WorkItem(542821, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542821")> <WorkItem(535068, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/535068")> Public Sub RewriteConflictingExtensionMethodCallSiteRequiringTypeArguments() Using result = RenameEngineResult.Create(_outputHelper, <Workspace> <Project Language="Visual Basic" CommonReferences="true"> <Document><![CDATA[ Imports System.Runtime.CompilerServices Class C Function Bar(Of T)() As C Return {|Replacement:Me.{|Resolved:Goo|}(Of Integer)()|} End Function End Class Module M <Extension()> Function [|$$Goo|](Of T)(x As C) As C Return New C() End Function End Module ]]></Document> </Project> </Workspace>, renameTo:="Bar") result.AssertLabeledSpansAre("Resolved", type:=RelatedLocationType.ResolvedReferenceConflict) result.AssertLabeledSpansAre("Replacement", "M.Bar(Of Integer)(Me)") End Using End Sub <WpfFact> <Trait(Traits.Feature, Traits.Features.Rename)> <WorkItem(542821, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542821")> <WorkItem(535068, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/535068")> Public Sub RewriteConflictingExtensionMethodCallSiteInferredTypeArguments() Using result = RenameEngineResult.Create(_outputHelper, <Workspace> <Project Language="Visual Basic" CommonReferences="true"> <Document><![CDATA[ Imports System.Runtime.CompilerServices Class C Function Bar(Of T)(y As T) As C Return {|Replacement:Me.{|Resolved:Goo|}(42)|} End Function End Class Module M <Extension()> Function [|$$Goo|](Of T)(x As C, y As T) As C Return New C() End Function End Module ]]></Document> </Project> </Workspace>, renameTo:="Bar") result.AssertLabeledSpansAre("Resolved", type:=RelatedLocationType.ResolvedReferenceConflict) result.AssertLabeledSpansAre("Replacement", "M.Bar(Me, 42)") End Using End Sub <Fact> <WorkItem(539636, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539636")> <Trait(Traits.Feature, Traits.Features.Rename)> Public Sub QualifyConflictingMethodInvocation() Using result = RenameEngineResult.Create(_outputHelper, <Workspace> <Project Language="Visual Basic" CommonReferences="true"> <Document> Module Program Sub F() End Sub End Module Public Class C Sub [|$$M|]() {|stmt1:F|}() End Sub End Class </Document> </Project> </Workspace>, renameTo:="F") result.AssertLabeledSpansAre("stmt1", "Program.F()", RelatedLocationType.ResolvedNonReferenceConflict) End Using End Sub End Class End Namespace
aelij/roslyn
src/EditorFeatures/Test2/Rename/VisualBasic/CallSiteConflictResolutionTests.vb
Visual Basic
apache-2.0
5,050
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Collections.Immutable Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.EditAndContinue Imports Microsoft.CodeAnalysis.Test.Utilities Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.EditAndContinue <[UseExportProvider]> Public Class EditAndContinueWorkspaceServiceTests <Fact> Public Sub ReadOnlyDocumentTest() Dim diagnosticService As IDiagnosticAnalyzerService = New EditAndContinueTestHelper.TestDiagnosticAnalyzerService() Dim encService As IEditAndContinueService = New EditAndContinueService(diagnosticService, New TestActiveStatementProvider()) Dim workspace = EditAndContinueTestHelper.CreateTestWorkspace() Dim currentSolution = workspace.CurrentSolution Dim project = currentSolution.Projects(0) Dim sessionReason As SessionReadOnlyReason Dim projectReason As ProjectReadOnlyReason Dim isReadOnly As Boolean ' not yet start isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.None, projectReason) Assert.Equal(SessionReadOnlyReason.None, sessionReason) Assert.Equal(False, isReadOnly) ' run mode encService.StartDebuggingSession(workspace.CurrentSolution) isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.None, projectReason) Assert.Equal(SessionReadOnlyReason.Running, sessionReason) Assert.Equal(True, isReadOnly) ' edit mode Dim projectStates = ImmutableArray.Create(New KeyValuePair(Of ProjectId, ProjectReadOnlyReason)(project.Id, ProjectReadOnlyReason.None)) encService.StartEditSession(currentSolution, projectStates.ToImmutableDictionary(), stoppedAtException:=False) isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.None, projectReason) Assert.Equal(SessionReadOnlyReason.None, sessionReason) Assert.Equal(False, isReadOnly) ' end edit session encService.EndEditSession(ImmutableDictionary(Of ActiveMethodId, ImmutableArray(Of NonRemappableRegion)).Empty) isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.None, projectReason) Assert.Equal(SessionReadOnlyReason.Running, sessionReason) Assert.Equal(True, isReadOnly) ' break mode and stop at exception encService.StartEditSession(currentSolution, projectStates.ToImmutableDictionary(), stoppedAtException:=True) isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.None, projectReason) Assert.Equal(SessionReadOnlyReason.StoppedAtException, sessionReason) Assert.Equal(True, isReadOnly) End Sub <Fact> Public Sub NotLoadedTest() Dim diagnosticService As IDiagnosticAnalyzerService = New EditAndContinueTestHelper.TestDiagnosticAnalyzerService() Dim encService As IEditAndContinueService = New EditAndContinueService(diagnosticService, New TestActiveStatementProvider()) Dim workspace = EditAndContinueTestHelper.CreateTestWorkspace() Dim currentSolution = workspace.CurrentSolution Dim project = currentSolution.Projects(0) Dim sessionReason As SessionReadOnlyReason Dim projectReason As ProjectReadOnlyReason Dim isReadOnly As Boolean ' run mode encService.StartDebuggingSession(workspace.CurrentSolution) ' edit mode Dim projectStates = ImmutableArray.Create(New KeyValuePair(Of ProjectId, ProjectReadOnlyReason)(project.Id, ProjectReadOnlyReason.NotLoaded)) encService.StartEditSession(currentSolution, projectStates.ToImmutableDictionary(), stoppedAtException:=False) isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.NotLoaded, projectReason) Assert.Equal(SessionReadOnlyReason.None, sessionReason) Assert.Equal(True, isReadOnly) End Sub <Fact> Public Sub MetaDataNotAvailableTest() Dim diagnosticService As IDiagnosticAnalyzerService = New EditAndContinueTestHelper.TestDiagnosticAnalyzerService() Dim encService As IEditAndContinueService = New EditAndContinueService(diagnosticService, New TestActiveStatementProvider()) Dim workspace = EditAndContinueTestHelper.CreateTestWorkspace() Dim currentSolution = workspace.CurrentSolution Dim project = currentSolution.Projects(0) Dim sessionReason As SessionReadOnlyReason Dim projectReason As ProjectReadOnlyReason Dim isReadOnly As Boolean ' run mode encService.StartDebuggingSession(workspace.CurrentSolution) ' edit mode with empty project Dim projectStates = ImmutableDictionary.Create(Of ProjectId, ProjectReadOnlyReason) encService.StartEditSession(currentSolution, projectStates, stoppedAtException:=False) isReadOnly = encService.IsProjectReadOnly(project.Id, sessionReason, projectReason) Assert.Equal(ProjectReadOnlyReason.MetadataNotAvailable, projectReason) Assert.Equal(SessionReadOnlyReason.None, sessionReason) Assert.Equal(True, isReadOnly) End Sub End Class End Namespace
MichalStrehovsky/roslyn
src/VisualStudio/Core/Test/EditAndContinue/EditAndContinueWorkspaceServiceTests.vb
Visual Basic
apache-2.0
6,041
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Threading Imports Microsoft.CodeAnalysis.LanguageServices Imports Microsoft.CodeAnalysis.Shared.Extensions.ContextQuery Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Microsoft.CodeAnalysis.VisualBasic.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions.ContextQuery ''' <summary> ''' Helper structure to store some context about a position for keyword completion ''' </summary> Friend NotInheritable Class VisualBasicSyntaxContext Inherits SyntaxContext ''' <summary> ''' True if position is after a colon, or an ''' EOL that was not preceded by an explicit line continuation ''' </summary> Public ReadOnly FollowsEndOfStatement As Boolean ''' <summary> ''' True if position is definitely the beginning of a new statement (after a colon ''' or two line breaks). ''' ''' Dim q = From a In args ''' $1 ''' $2 ''' ''' $1 may continue the previous statement, but $2 definitely starts a ''' new statement since there are two line breaks before it. ''' </summary> Public ReadOnly MustBeginNewStatement As Boolean Public ReadOnly IsSingleLineStatementContext As Boolean Public ReadOnly IsMultiLineStatementContext As Boolean Public ReadOnly IsGlobalStatementContext As Boolean Public ReadOnly IsTypeDeclarationKeywordContext As Boolean Public ReadOnly IsTypeMemberDeclarationKeywordContext As Boolean Public ReadOnly IsInterfaceMemberDeclarationKeywordContext As Boolean Public ReadOnly ModifierCollectionFacts As ModifierCollectionFacts Public ReadOnly IsPreprocessorStartContext As Boolean Public ReadOnly TouchingToken As SyntaxToken Public ReadOnly IsInLambda As Boolean Public ReadOnly IsQueryOperatorContext As Boolean Public ReadOnly EnclosingNamedType As CancellableLazy(Of INamedTypeSymbol) Public ReadOnly IsCustomEventContext As Boolean Public ReadOnly IsPreprocessorEndDirectiveKeywordContext As Boolean Public ReadOnly IsWithinPreprocessorContext As Boolean Private Sub New( workspace As Workspace, semanticModel As SemanticModel, position As Integer, leftToken As SyntaxToken, targetToken As SyntaxToken, touchingToken As SyntaxToken, isTypeContext As Boolean, isNamespaceContext As Boolean, isNamespaceDeclarationNameContext As Boolean, isPreProcessorDirectiveContext As Boolean, isRightOfNameSeparator As Boolean, isSingleLineStatementContext As Boolean, isExpressionContext As Boolean, isAttributeNameContext As Boolean, isEnumTypeMemberAccessContext As Boolean, isNameOfContext As Boolean, isInLambda As Boolean, isInQuery As Boolean, isInImportsDirective As Boolean, isCustomEventContext As Boolean, isPossibleTupleContext As Boolean, cancellationToken As CancellationToken ) MyBase.New( workspace, semanticModel, position, leftToken, targetToken, isTypeContext, isNamespaceContext, isNamespaceDeclarationNameContext, isPreProcessorDirectiveContext, isRightOfNameSeparator, isStatementContext:=isSingleLineStatementContext, isAnyExpressionContext:=isExpressionContext, isAttributeNameContext:=isAttributeNameContext, isEnumTypeMemberAccessContext:=isEnumTypeMemberAccessContext, isNameOfContext:=isNameOfContext, isInQuery:=isInQuery, isInImportsDirective:=isInImportsDirective, isWithinAsyncMethod:=IsWithinAsyncMethod(targetToken, cancellationToken), isPossibleTupleContext:=isPossibleTupleContext, isPatternContext:=False, cancellationToken:=cancellationToken) Dim syntaxTree = semanticModel.SyntaxTree Me.FollowsEndOfStatement = targetToken.FollowsEndOfStatement(position) Me.MustBeginNewStatement = targetToken.MustBeginNewStatement(position) Me.IsSingleLineStatementContext = isSingleLineStatementContext Me.IsMultiLineStatementContext = syntaxTree.IsMultiLineStatementStartContext(position, targetToken, cancellationToken) Me.IsGlobalStatementContext = syntaxTree.IsGlobalStatementContext(position, cancellationToken) Me.IsTypeDeclarationKeywordContext = syntaxTree.IsTypeDeclarationKeywordContext(position, targetToken, cancellationToken) Me.IsTypeMemberDeclarationKeywordContext = syntaxTree.IsTypeMemberDeclarationKeywordContext(position, targetToken, cancellationToken) Me.IsInterfaceMemberDeclarationKeywordContext = syntaxTree.IsInterfaceMemberDeclarationKeywordContext(position, targetToken, cancellationToken) Me.ModifierCollectionFacts = New ModifierCollectionFacts(syntaxTree, position, targetToken, cancellationToken) Me.TouchingToken = touchingToken Me.IsInLambda = isInLambda Me.IsPreprocessorStartContext = ComputeIsPreprocessorStartContext(position, targetToken) Me.IsWithinPreprocessorContext = ComputeIsWithinPreprocessorContext(position, targetToken) Me.IsQueryOperatorContext = syntaxTree.IsFollowingCompleteExpression(Of QueryExpressionSyntax)(position, targetToken, Function(query) query, cancellationToken) Me.EnclosingNamedType = CancellableLazy.Create(AddressOf ComputeEnclosingNamedType) Me.IsCustomEventContext = isCustomEventContext Me.IsPreprocessorEndDirectiveKeywordContext = targetToken.FollowsBadEndDirective(position) End Sub Private Shared Shadows Function IsWithinAsyncMethod(targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean Dim enclosingMethod = targetToken.GetAncestor(Of MethodBlockBaseSyntax)() Return enclosingMethod IsNot Nothing AndAlso enclosingMethod.BlockStatement.Modifiers.Any(SyntaxKind.AsyncKeyword) End Function Public Shared Async Function CreateContextAsync(workspace As Workspace, semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Tasks.Task(Of VisualBasicSyntaxContext) Dim syntaxTree = semanticModel.SyntaxTree Dim leftToken = syntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken, includeDirectives:=True, includeDocumentationComments:=True) Dim targetToken = syntaxTree.GetTargetToken(position, cancellationToken) Dim touchingToken = Await syntaxTree.GetTouchingTokenAsync(position, cancellationToken).ConfigureAwait(False) Return New VisualBasicSyntaxContext( workspace, semanticModel, position, leftToken, targetToken, touchingToken, isTypeContext:=syntaxTree.IsTypeContext(position, targetToken, cancellationToken, semanticModel), isNamespaceContext:=syntaxTree.IsNamespaceContext(position, targetToken, cancellationToken, semanticModel), isNamespaceDeclarationNameContext:=syntaxTree.IsNamespaceDeclarationNameContext(position, cancellationToken), isPreProcessorDirectiveContext:=syntaxTree.IsInPreprocessorDirectiveContext(position, cancellationToken), isRightOfNameSeparator:=syntaxTree.IsRightOfDot(position, cancellationToken), isSingleLineStatementContext:=syntaxTree.IsSingleLineStatementContext(position, targetToken, cancellationToken), isExpressionContext:=syntaxTree.IsExpressionContext(position, targetToken, cancellationToken, semanticModel), isAttributeNameContext:=syntaxTree.IsAttributeNameContext(position, targetToken, cancellationToken), isEnumTypeMemberAccessContext:=syntaxTree.IsEnumTypeMemberAccessContext(position, targetToken, semanticModel, cancellationToken), isNameOfContext:=syntaxTree.IsNameOfContext(position, cancellationToken), isInLambda:=leftToken.GetAncestor(Of LambdaExpressionSyntax)() IsNot Nothing, isInQuery:=leftToken.GetAncestor(Of QueryExpressionSyntax)() IsNot Nothing, isInImportsDirective:=leftToken.GetAncestor(Of ImportsStatementSyntax)() IsNot Nothing, isCustomEventContext:=targetToken.GetAncestor(Of EventBlockSyntax)() IsNot Nothing, isPossibleTupleContext:=syntaxTree.IsPossibleTupleContext(targetToken, position), cancellationToken:=cancellationToken) End Function Public Shared Function CreateContextAsync_Test(semanticModel As SemanticModel, position As Integer, cancellationToken As CancellationToken) As Tasks.Task(Of VisualBasicSyntaxContext) Return CreateContextAsync(Nothing, semanticModel, position, cancellationToken) End Function Private Function ComputeEnclosingNamedType(cancellationToken As CancellationToken) As INamedTypeSymbol Dim enclosingSymbol = Me.SemanticModel.GetEnclosingSymbol(Me.TargetToken.SpanStart, cancellationToken) Dim container = TryCast(enclosingSymbol, INamedTypeSymbol) If container Is Nothing Then container = enclosingSymbol.ContainingType End If Return container End Function Private Shared Function ComputeIsWithinPreprocessorContext(position As Integer, targetToken As SyntaxToken) As Boolean ' If we're touching it, then we can just look past it If targetToken.IsKind(SyntaxKind.HashToken) AndAlso targetToken.Span.End = position Then targetToken = targetToken.GetPreviousToken() End If Return targetToken.Kind = SyntaxKind.None OrElse targetToken.Kind = SyntaxKind.EndOfFileToken OrElse (targetToken.HasNonContinuableEndOfLineBeforePosition(position) AndAlso Not targetToken.FollowsBadEndDirective(position)) End Function Private Shared Function ComputeIsPreprocessorStartContext(position As Integer, targetToken As SyntaxToken) As Boolean ' The triggering hash token must be part of a directive (not trivia within it) If targetToken.Kind = SyntaxKind.HashToken Then Return TypeOf targetToken.Parent Is DirectiveTriviaSyntax End If Return targetToken.Kind = SyntaxKind.None OrElse targetToken.Kind = SyntaxKind.EndOfFileToken OrElse (targetToken.HasNonContinuableEndOfLineBeforePosition(position) AndAlso Not targetToken.FollowsBadEndDirective(position)) End Function Public Function IsFollowingParameterListOrAsClauseOfMethodDeclaration() As Boolean If TargetToken.FollowsEndOfStatement(Position) Then Return False End If Dim methodDeclaration = TargetToken.GetAncestor(Of MethodStatementSyntax)() If methodDeclaration Is Nothing Then Return False End If ' We will trigger if either (a) we are after the ) of the parameter list, or (b) we are ' after the method name itself if the user is omitting the parenthesis, or (c) we are ' after the return type of the AsClause. Return (TargetToken.IsKind(SyntaxKind.CloseParenToken) AndAlso methodDeclaration.ParameterList IsNot Nothing AndAlso TargetToken = methodDeclaration.ParameterList.CloseParenToken) _ OrElse (methodDeclaration.AsClause IsNot Nothing AndAlso TargetToken = methodDeclaration.AsClause.GetLastToken(includeZeroWidth:=True)) _ OrElse (TargetToken.IsKind(SyntaxKind.IdentifierToken) AndAlso methodDeclaration.ParameterList Is Nothing AndAlso TargetToken = methodDeclaration.Identifier) End Function Public Function IsFollowingCompleteEventDeclaration() As Boolean Dim eventDeclaration = TargetToken.GetAncestor(Of EventStatementSyntax)() If eventDeclaration Is Nothing Then Return False End If If eventDeclaration.AsClause IsNot Nothing Then Return TargetToken = eventDeclaration.AsClause.GetLastToken(includeZeroWidth:=True) End If If eventDeclaration.ParameterList IsNot Nothing AndAlso Not eventDeclaration.ParameterList.CloseParenToken.IsMissing AndAlso TargetToken = eventDeclaration.ParameterList.CloseParenToken Then Return True End If Return TargetToken = eventDeclaration.Identifier End Function Public Function IsFollowingCompletePropertyDeclaration(cancellationToken As CancellationToken) As Boolean Dim propertyDeclaration = TargetToken.GetAncestor(Of PropertyStatementSyntax)() If propertyDeclaration Is Nothing Then Return False End If If propertyDeclaration.Initializer IsNot Nothing Then Return SyntaxTree.IsFollowingCompleteExpression( Position, TargetToken, Function(p As PropertyStatementSyntax) p.Initializer.Value, cancellationToken, allowImplicitLineContinuation:=False) End If If propertyDeclaration.AsClause IsNot Nothing Then Return TargetToken = propertyDeclaration.AsClause.GetLastToken(includeZeroWidth:=True) End If If propertyDeclaration.ParameterList IsNot Nothing AndAlso Not propertyDeclaration.ParameterList.CloseParenToken.IsMissing AndAlso TargetToken = propertyDeclaration.ParameterList.CloseParenToken Then Return True End If Return TargetToken = propertyDeclaration.Identifier End Function Public Function IsAdditionalJoinOperatorContext(cancellationToken As CancellationToken) As Boolean 'This specifies if we're in a position where an additional "Join" operator may be present after a first Join 'operator. Return SyntaxTree.IsFollowingCompleteExpression(Of JoinClauseSyntax)( Position, TargetToken, Function(joinOperator) joinOperator.JoinedVariables.LastCollectionExpression(), cancellationToken) End Function Friend Overrides Function GetTypeInferenceServiceWithoutWorkspace() As ITypeInferenceService Return New VisualBasicTypeInferenceService() End Function End Class End Namespace
mmitche/roslyn
src/Workspaces/VisualBasic/Portable/Extensions/ContextQuery/VisualBasicSyntaxContext.vb
Visual Basic
apache-2.0
15,326
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Runtime.CompilerServices Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.Utilities Friend Module NamedTypeSymbolExtensions ''' <summary> ''' Determines if the default constructor emitted by the compiler would contain an InitializeComponent() call. ''' </summary> <Extension> Public Function IsDesignerGeneratedTypeWithInitializeComponent(type As INamedTypeSymbol, compilation As Compilation) As Boolean Dim designerGeneratedAttribute = compilation.DesignerGeneratedAttributeType() If designerGeneratedAttribute Is Nothing Then Return False End If If Not type.GetAttributes().Where(Function(a) Equals(a.AttributeClass, designerGeneratedAttribute)).Any() Then Return False End If ' We now need to see if we have an InitializeComponent that matches the pattern. This is ' the same check as in Semantics::IsInitializeComponent in the old compiler. For Each baseType In type.GetBaseTypesAndThis() Dim possibleInitializeComponent = baseType.GetMembers("InitializeComponent").OfType(Of IMethodSymbol).FirstOrDefault() If possibleInitializeComponent IsNot Nothing AndAlso possibleInitializeComponent.IsAccessibleWithin(type) AndAlso Not possibleInitializeComponent.Parameters.Any() AndAlso possibleInitializeComponent.ReturnsVoid AndAlso Not possibleInitializeComponent.IsStatic Then Return True End If Next Return False End Function End Module End Namespace
droyad/roslyn
src/EditorFeatures/VisualBasic/Utilities/NamedTypeSymbolExtensions.vb
Visual Basic
apache-2.0
1,972
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.34003 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default]() As MySettings Get #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject If Not addedHandler Then AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings addedHandler = True End If End SyncLock End If #End If Return defaultInstance End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> Friend ReadOnly Property Settings() As Global.VBTestDummy.My.MySettings Get Return Global.VBTestDummy.My.MySettings.Default End Get End Property End Module End Namespace
ThatShawGuy/VBSharper
PluginTestDummies/VBTestDummy/My Project/Settings.Designer.vb
Visual Basic
mit
2,898
Public Class frmAddition Private Sub frmMenu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtWelcome.Text = "Hello " + General.Name + " please answer the addition questions" If Type = 1 Then General.Answer = General.Number1 + General.Number2 txtNum1.Text = General.Number1 txtNum2.Text = General.Number2 txtNum3.Text = Nothing txtNum1.Enabled = False txtNum2.Enabled = False txtNum3.Enabled = True txtNum3.Focus() ElseIf Type = 2 Then General.Answer = General.Number1 + General.Number2 txtNum1.Text = General.Number1 txtNum2.Text = Nothing txtNum3.Text = General.Answer txtNum1.Enabled = False txtNum2.Enabled = True txtNum3.Enabled = False txtNum2.Focus() ElseIf Type = 3 Then General.Answer = General.Number1 + General.Number2 txtNum1.Text = Nothing txtNum2.Text = General.Number2 txtNum3.Text = General.Answer txtNum1.Enabled = True txtNum2.Enabled = False txtNum3.Enabled = False txtNum1.Focus() End If txtCount.Text = General.Answered + 1 & " of " & General.MaxQuestion + 1 'General.Answered = General.Answered + 1 End Sub Private Sub btnMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMenu.Click General.ClearResults() General.MenuAction(Me, frmMenu) End Sub Private Sub btnCheck_Click2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheck.Click CheckAns() End Sub Private Sub btnCheck_Click(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtNum1.KeyDown, txtNum2.KeyDown, txtNum3.KeyDown If e.KeyCode = Keys.Return Then CheckAns() End If End Sub Private Sub CheckAns() If (IsEmptyNullOrWhitespaceOnly(txtNum1.Text) Or IsEmptyNullOrWhitespaceOnly(txtNum2.Text) Or IsEmptyNullOrWhitespaceOnly(txtNum3.Text)) = False Then Try If Type = 1 Then If Convert.ToInt32(txtNum3.Text) = General.Answer Then imgDetails.Visible = True txtDetails.Visible = True txtDetails.Text = "Well Done" imgDetails.Image = My.Resources.accept btnCheck.Visible = False 'General.Answered = ++1 General.Correct = General.Correct + 1 btnNext.Focus() Else imgDetails.Visible = True txtDetails.Visible = True txtDetails.Text = "Try Again" imgDetails.Image = My.Resources.delete btnCheck.Visible = False 'General.Answered = ++1 txtNum3.Focus() End If ElseIf Type = 2 Then If Convert.ToInt32(txtNum2.Text) = General.Answer - General.Number1 Then imgDetails.Visible = True txtDetails.Visible = True txtDetails.Text = "Well Done" imgDetails.Image = My.Resources.accept btnCheck.Visible = False 'General.Answered = ++1 General.Correct = General.Correct + 1 btnNext.Focus() Else imgDetails.Visible = True txtDetails.Visible = True txtDetails.Text = "Try Again" imgDetails.Image = My.Resources.delete btnCheck.Visible = False 'General.Answered = ++1 txtNum2.Focus() End If ElseIf Type = 3 Then If Convert.ToInt32(txtNum1.Text) = General.Answer - General.Number2 Then imgDetails.Visible = True txtDetails.Visible = True txtDetails.Text = "Well Done" imgDetails.Image = My.Resources.accept btnCheck.Visible = False 'General.Answered = ++1 General.Correct = General.Correct + 1 btnNext.Focus() Else imgDetails.Visible = True txtDetails.Visible = True txtDetails.Text = "Try Again" imgDetails.Image = My.Resources.delete btnCheck.Visible = False 'General.Answered = ++1 txtNum1.Focus() End If End If Catch FormatException As Exception MessageBox.Show("Please enter only numbers") End Try Else MessageBox.Show("Please enter you answer") End If End Sub Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click General.Generate() If General.Answered <> General.MaxQuestion Then If Type = 1 Then General.Answer = General.Number1 + General.Number2 txtNum1.Text = General.Number1 txtNum2.Text = General.Number2 txtNum3.Text = Nothing txtNum1.Enabled = False txtNum2.Enabled = False txtNum3.Enabled = True txtNum3.Focus() General.Answered = General.Answered + 1 ElseIf Type = 2 Then General.Answer = General.Number1 + General.Number2 txtNum1.Text = General.Number1 txtNum2.Text = Nothing txtNum3.Text = General.Answer txtNum1.Enabled = False txtNum2.Enabled = True txtNum3.Enabled = False txtNum2.Focus() General.Answered = General.Answered + 1 ElseIf Type = 3 Then General.Answer = General.Number1 + General.Number2 txtNum1.Text = Nothing txtNum2.Text = General.Number2 txtNum3.Text = General.Answer txtNum1.Enabled = True txtNum2.Enabled = False txtNum3.Enabled = False txtNum1.Focus() General.Answered = General.Answered + 1 End If btnCheck.Visible = True imgDetails.Visible = False txtDetails.Visible = False txtCount.Text = General.Answered + 1 & " of " & General.MaxQuestion + 1 Else General.Topic = "Addition" General.MenuAction(Me, frmAward) End If End Sub Private Sub txtNum_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtNum1.TextChanged, txtNum2.TextChanged, txtNum3.TextChanged btnCheck.Visible = True imgDetails.Visible = False txtDetails.Visible = False End Sub End Class
meamod/Maths123
Maths123/frmAddition.vb
Visual Basic
mit
7,444
Imports Microsoft.VisualBasic Imports System.IO Imports Aspose.Cells Namespace RowsColumns.Hiding Public Class HidingRowsAndColumns Public Shared Sub Run() ' ExStart:1 ' The path to the documents directory. Dim dataDir As String = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType) ' Creating a file stream containing the Excel file to be opened Dim fstream As New FileStream(dataDir & "book1.xls", FileMode.Open) ' Instantiating a Workbook object ' Opening the Excel file through the file stream Dim workbook As New Workbook(fstream) ' Accessing the first worksheet in the Excel file Dim worksheet As Worksheet = workbook.Worksheets(0) ' Hiding the 3rd row of the worksheet worksheet.Cells.HideRow(2) ' Hiding the 2nd column of the worksheet worksheet.Cells.HideColumn(1) ' Saving the modified Excel file workbook.Save(dataDir & "output.xls") ' Closing the file stream to free all resources fstream.Close() ' ExEnd:1 End Sub End Class End Namespace
maria-shahid-aspose/Aspose.Cells-for-.NET
Examples/VisualBasic/RowsColumns/Hiding/HidingRowsAndColumns.vb
Visual Basic
mit
1,247
'------------------------------------------------------------------------------ ' <auto-generated> ' このコードはツールによって生成されました。 ' ランタイム バージョン:4.0.30319.42000 ' ' このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 ' コードが再生成されるときに損失したりします。 ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) #Region "My.Settings 自動保存機能" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default]() As MySettings Get #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject If Not addedHandler Then AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings addedHandler = True End If End SyncLock End If #End If Return defaultInstance End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.WindowsApplication1.My.MySettings Get Return Global.WindowsApplication1.My.MySettings.Default End Get End Property End Module End Namespace
sutefu7/NotificationAndMessageSample
WindowsApplication1/My Project/Settings.Designer.vb
Visual Basic
mit
3,040
Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Linq Imports System.Text Imports System.Windows.Forms Imports Aspose.Cells.GridDesktop Namespace WorkingWithRowsandColumns Public Partial Class RemovingColumn Inherits Form Public Sub New() InitializeComponent() End Sub Private Sub button1_Click(sender As Object, e As EventArgs) ' ExStart:1 ' Accessing first worksheet of the Grid Dim sheet As Worksheet = gridDesktop1.Worksheets(0) ' Removing the first column of the worksheet sheet.RemoveColumn(0) ' ExEnd:1 MessageBox.Show("Column has been removed.") End Sub End Class End Namespace
maria-shahid-aspose/Aspose.Cells-for-.NET
Examples.GridDesktop/VisualBasic/GridDesktop.Examples/WorkingWithRowsandColumns/RemovingColumn.vb
Visual Basic
mit
708
#Region "License" ' The MIT License (MIT) ' ' Copyright (c) 2017 Richard L King (TradeWright Software Systems) ' ' Permission is hereby granted, free of charge, to any person obtaining a copy ' of this software and associated documentation files (the "Software"), to deal ' in the Software without restriction, including without limitation the rights ' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ' copies of the Software, and to permit persons to whom the Software is ' furnished to do so, subject to the following conditions: ' ' The above copyright notice and this permission notice shall be included in all ' copies or substantial portions of the Software. ' ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ' SOFTWARE. #End Region Imports System.Text Imports Microsoft.VisualStudio.TestTools.UnitTesting Imports TradeWright.Trading.Utils.Sessions Imports TradeWright.Utilities.Time <TestClass()> Public Class SessionUtilsTests #Region "Setup Functions" #End Region #Region "Test Methods" <TestClass()> Public Class TestGetOffsetSessionTimes <TestMethod()> Public Sub GetOffsetSessionTimes_0100() Assert.AreEqual("2016-01-18 08:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("15/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0110() Assert.AreEqual("2016-01-18 17:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("15/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0200() Assert.AreEqual("2016-01-18 08:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("16/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0210() Assert.AreEqual("2016-01-18 17:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("16/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0300() Assert.AreEqual("2016-01-19 08:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("18/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0310() Assert.AreEqual("2016-01-19 17:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("18/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0400() Assert.AreEqual("2016-01-22 08:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("21/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0410() Assert.AreEqual("2016-01-22 17:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("21/1/16 08:00:00"), 1, New TimeSpan(8, 0, 0), New TimeSpan(17, 30, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0500() Assert.AreEqual("2016-01-17 16:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("15/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0510() Assert.AreEqual("2016-01-18 16:15:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("15/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0600() Assert.AreEqual("2016-01-17 16:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("16/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0610() Assert.AreEqual("2016-01-18 16:15:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("16/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0700() Assert.AreEqual("2016-01-18 16:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("18/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0710() Assert.AreEqual("2016-01-19 16:15:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("18/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0800() Assert.AreEqual("2016-01-21 16:30:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("21/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_0810() Assert.AreEqual("2016-01-22 16:15:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("21/1/16 08:00:00"), 1, New TimeSpan(16, 30, 0), New TimeSpan(16, 15, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1100() Assert.AreEqual("2016-01-18 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("15/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1110() Assert.AreEqual("2016-01-19 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("15/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1200() Assert.AreEqual("2016-01-18 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("16/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1210() Assert.AreEqual("2016-01-19 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("16/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1300() Assert.AreEqual("2016-01-19 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("18/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1310() Assert.AreEqual("2016-01-20 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("18/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1400() Assert.AreEqual("2016-01-22 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("21/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).StartTime, TimestampFormats.DateAndTimeISO8601)) End Sub <TestMethod()> Public Sub GetOffsetSessionTimes_1410() Assert.AreEqual("2016-01-23 00:00:00.000", FormatTimestamp( GetOffsetSessionTimes(CDate("21/1/16 08:00:00"), 1, New TimeSpan(0, 0, 0), New TimeSpan(0, 0, 0)).EndTime, TimestampFormats.DateAndTimeISO8601)) End Sub #End Region End Class <TestClass()> Public Class TestFromCOM Private WithEvents comSession As SessionUtils27.Session Private comSessionEnded As Boolean Private comSessionStarted As Boolean <TestMethod()> Public Sub FromCom() Dim SU As New SessionUtils27.SessionUtils Dim builder = SU.CreateSessionBuilder(StartOfDayAsDate + New TimeSpan(8, 0, 0), StartOfDayAsDate + New TimeSpan(17, 30, 0)) comSession = builder.Session Dim sess = Trading.Utils.Sessions.Session.FromCOM(comSession) Dim sessionEnded As Boolean Dim sessionStarted As Boolean AddHandler sess.Ended, Sub(s, e) sessionEnded = True AddHandler sess.Started, Sub(s, e) sessionStarted = True builder.SetSessionCurrentTime(#2017/09/21 08:10:00#) Assert.IsTrue(comSessionStarted, "Session started") Assert.IsTrue(comSession.SessionCurrentTime = #2017/09/21 08:10:00#) Assert.IsTrue(comSession.CurrentSessionStartTime = #2017/09/21 08:00:00#) Assert.IsTrue(comSession.CurrentSessionEndTime = #2017/09/21 17:30:00#) End Sub Private Sub comSession_SessionStarted(ByRef ev As SessionUtils27.SessionEventData) Handles comSession.SessionStarted comSessionStarted = True End Sub Private Sub comSession_SessionEnded(ByRef ev As SessionUtils27.SessionEventData) Handles comSession.SessionEnded comSessionEnded = True End Sub End Class #Region "Helper Functions" #End Region End Class
tradewright/tradebuild-platform.net
src/SessionUtilsTests/SessionUtilsTests.vb
Visual Basic
mit
14,024
Imports System.Data.SqlClient Public Class Muestra_Articulo Inherits System.Web.UI.Page Private Sub Carga_Articulos() Dim lcOpcion, lcFolio As String Dim lnCuantos As Integer lcFolio = Request.QueryString("lcFolio") lnCuantos = AInt(Request.QueryString("lnCuantos")) If lnCuantos = 3 Then lcOpcion = "familia" ElseIf lnCuantos = 2 Then lcOpcion = "sublinea" Else lcOpcion = "linea" End If Dim loComando As SqlCommand Dim Articulos As New DataTable loComando = Crea_SP("Consulta_Articulos_Web") Agrega_Parametro(loComando, "nCliente", "I", AInt(Session("nCliente")), 0) Agrega_Parametro(loComando, "lCliente_Web", "L", ABol(Session("lCliente_Web")), 0) Agrega_Parametro(loComando, "cOpcion", "C", lcOpcion, 20) Agrega_Parametro(loComando, "cFolio", "C", lcFolio, 7) Carga_Tabla(loComando, Articulos) Me.Lista_Articulos.DataSource = Articulos Me.Lista_Articulos.DataBind() End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Me.IsPostBack Then Me.Carga_Articulos() End If 'Session("lcRegresar") = Request.Path + "?lcFolio=" + lcFolio + "&lnCuantos=" + lnCuantos.ToString End Sub Protected Sub Lista_Articulos_PagePropertiesChanging(sender As Object, e As System.Web.UI.WebControls.PagePropertiesChangingEventArgs) Handles Lista_Articulos.PagePropertiesChanging Dim loPaginas As DataPager = Lista_Articulos.FindControl("PaginasDatos") If (Lista_Articulos.Items.Count <> loPaginas.TotalRowCount) Then loPaginas.SetPageProperties(e.StartRowIndex, e.MaximumRows, False) Lista_Articulos.DataBind() End If End Sub Protected Sub Lista_Articulos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Lista_Articulos.SelectedIndexChanged End Sub End Class
cesarmanzano/Indelek
Indelek_2015/Indelek_2015/Formularios/Muestra_Articulo.aspx.vb
Visual Basic
mit
2,050
Imports System.Drawing.Printing Public Class ImpresionJV Public valid As Boolean = False Private Sub ImpresionJV_Load(sender As Object, e As EventArgs) Handles MyBase.Load Util.PopulateCombo(cmbPoint, "SELECT id, nom FROM point_ventes", "id", "nom") PopulatePrinter() cmbDu.MaxDate = Today cmbAu.MaxDate = Today End Sub Sub PopulatePrinter() Try Dim i As Integer Dim pkInstalledPrinter As String For i = 0 To PrinterSettings.InstalledPrinters.Count - 1 pkInstalledPrinter = PrinterSettings.InstalledPrinters.Item(i) cmbPrinter.Items.Add(pkInstalledPrinter) Next Catch ex As Exception If My.Settings.app_debug_mode Then Util.ShowMessage(ex.ToString, 2) Else Util.ShowMessage("Impossible de recuperer la liste des imprimantes installer", 2) End If Finally Dim pp As New PrinterSettings cmbPrinter.Text = pp.PrinterName End Try End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Close() End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If cmbPoint.Text.Length = 0 Then Util.ShowMessage("Selectioner le poit de vente svp!", 1) ElseIf cmbPrinter.SelectedIndex = -1 Then Util.ShowMessage("Veuilez selectioner une imprimante valide", 1) Else valid = True Close() End If End Sub Private Sub cmbAu_ValueChanged(sender As Object, e As EventArgs) Handles cmbAu.ValueChanged cmbDu.MaxDate = cmbAu.Value cmbAu.MinDate = cmbDu.Value End Sub Private Sub cmbDu_ValueChanged(sender As Object, e As EventArgs) Handles cmbDu.ValueChanged cmbDu.MaxDate = cmbAu.Value cmbAu.MinDate = cmbDu.Value End Sub End Class
lepresk/HG
HG/ImpresionJV.vb
Visual Basic
mit
1,993
Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("RobixLib")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("RobixLib")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("25704da4-3964-490c-8666-848101a3236f")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
MrMilan/RoboticArm
RobixLib/My Project/AssemblyInfo.vb
Visual Basic
mit
1,134
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Xunit Public MustInherit Class SemanticModelTestBase : Inherits BasicTestBase Protected Function GetNode(compilation As VisualBasicCompilation, treeName As String, textToFind As String) As VisualBasicSyntaxNode Dim tree = CompilationUtils.GetTree(compilation, treeName) Dim node = DirectCast(CompilationUtils.FindTokenFromText(tree, textToFind).Parent, VisualBasicSyntaxNode) Return node End Function Protected Function GetPosition(compilation As VisualBasicCompilation, treeName As String, textToFind As String) As Integer Dim tree = CompilationUtils.GetTree(compilation, treeName) Dim text As String = tree.GetText().ToString() Dim position As Integer = text.IndexOf(textToFind, StringComparison.Ordinal) Return position End Function Private Function GetAncestor(Of T As VisualBasicSyntaxNode)(node As VisualBasicSyntaxNode) As T If node Is Nothing Then Throw New ArgumentNullException("node") End If Dim parent = node.Parent While parent IsNot Nothing Dim result = TryCast(parent, T) If result IsNot Nothing Then Return result End If parent = parent.Parent End While Return Nothing End Function Protected Function FindBindingText(Of TNode As SyntaxNode)(compilation As Compilation, fileName As String, Optional which As Integer = 0) As TNode Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = fileName).Single() Dim bindText As String = Nothing Dim bindPoint = FindBindingTextPosition(compilation, fileName, bindText, which) Dim token As SyntaxToken = tree.GetRoot().FindToken(bindPoint) Dim node = token.Parent While (node IsNot Nothing AndAlso node.ToString <> bindText) node = node.Parent End While Assert.NotNull(node) ' If this trips, then node wasn't found Assert.IsAssignableFrom(GetType(TNode), node) Assert.Equal(bindText, node.ToString()) Return DirectCast(node, TNode) End Function Private Function FindBindingTextPosition(compilation As Compilation, fileName As String, ByRef bindText As String, Optional which As Integer = 0) As Integer Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = fileName).Single() Dim bindMarker As String If which > 0 Then bindMarker = "'BIND" & which.ToString() & ":""" Else bindMarker = "'BIND:""" End If Dim text As String = tree.GetRoot().ToFullString() Dim bindCommentIndex As Integer = text.IndexOf(bindMarker, StringComparison.Ordinal) + bindMarker.Length bindText = text.Substring(bindCommentIndex, text.IndexOf(""""c, bindCommentIndex) - bindCommentIndex) Dim bindPoint = text.LastIndexOf(bindText, bindCommentIndex - bindMarker.Length, StringComparison.Ordinal) Return bindPoint End Function Protected Function FindBindingTextPosition(compilation As Compilation, fileName As String) As Integer Dim bindText As String = Nothing Return FindBindingTextPosition(compilation, fileName, bindText) End Function Protected Function FindBindingStartText(Of TNode As SyntaxNode)(compilation As Compilation, fileName As String, Optional which As Integer = 0) As TNode Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = fileName).Single() Dim bindText As String = Nothing Dim bindPoint = FindBindingTextPosition(compilation, fileName, bindText, which) Dim token As SyntaxToken = tree.GetRoot().FindToken(bindPoint) Dim node = token.Parent While (node IsNot Nothing AndAlso node.ToString.StartsWith(bindText, StringComparison.Ordinal) AndAlso Not (TypeOf node Is TNode)) node = node.Parent End While Assert.NotNull(node) ' If this trips, then node wasn't found Assert.IsAssignableFrom(GetType(TNode), node) Assert.Contains(bindText, node.ToString()) Return DirectCast(node, TNode) End Function Protected Function GetStartSpanErrorMessage(syntax As SyntaxNode, tpSymbol As ISymbol) As String Return " Syntax.SpanStart : " & syntax.SpanStart & " Location1.SourceSpan.Start : " & tpSymbol.Locations.Item(0).SourceSpan.Start & " Location2.SourceSpan.Start : " & tpSymbol.Locations.Item(0).SourceSpan.Start End Function Friend Function GetAliasInfoForTest(compilation As Compilation, fileName As String, Optional which As Integer = 0) As AliasSymbol Dim node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(compilation, fileName, which) Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = fileName).Single() Dim semanticModel = DirectCast(compilation.GetSemanticModel(tree), VBSemanticModel) Return DirectCast(semanticModel.GetAliasInfo(node), AliasSymbol) End Function Protected Function GetBlockOrStatementInfoForTest(Of StmtSyntax As SyntaxNode, ISM As SemanticModel)(compilation As Compilation, fileName As String, Optional which As Integer = 0, Optional useParent As Boolean = False) As Object Dim node As SyntaxNode = CompilationUtils.FindBindingText(Of StmtSyntax)(compilation, fileName, which) Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = fileName).Single() Dim semanticModel = CType(compilation.GetSemanticModel(tree), VBSemanticModel) If useParent Then node = node.Parent End If If TypeOf node Is ForEachStatementSyntax Then Return semanticModel.GetForEachStatementInfo(DirectCast(node, ForEachStatementSyntax)) ElseIf TypeOf node Is ForEachBlockSyntax Then Return semanticModel.GetForEachStatementInfo(DirectCast(node, ForEachBlockSyntax).ForEachStatement) End If Throw New NotSupportedException("Type of syntax node is not supported by GetExtendedSemanticInfoForTest") End Function Friend Function GetLookupNames(compilation As Compilation, filename As String, Optional container As NamespaceOrTypeSymbol = Nothing) As List(Of String) Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = filename).Single() Dim binding = DirectCast(compilation.GetSemanticModel(tree), VBSemanticModel) Return binding.LookupNames(FindBindingTextPosition(compilation, "a.vb"), container).ToList() End Function Friend Function GetLookupSymbols(compilation As Compilation, filename As String, Optional container As NamespaceOrTypeSymbol = Nothing, Optional name As String = Nothing, Optional arity As Integer? = Nothing, Optional includeReducedExtensionMethods As Boolean = False, Optional mustBeStatic As Boolean = False) As List(Of ISymbol) Debug.Assert(Not includeReducedExtensionMethods OrElse Not mustBeStatic) Dim tree = (From t In compilation.SyntaxTrees Where t.FilePath = filename).Single() Dim binding = DirectCast(compilation.GetSemanticModel(tree), VBSemanticModel) Dim anyArity = Not arity.HasValue Dim position = FindBindingTextPosition(compilation, "a.vb") Return If( mustBeStatic, binding.LookupStaticMembers(position, container, name), binding.LookupSymbols(position, container, name, includeReducedExtensionMethods) ).Where(Function(s) anyArity OrElse DirectCast(s, Symbol).GetArity() = arity.Value).ToList() End Function End Class
ManishJayaswal/roslyn
src/Compilers/Test/Utilities/VisualBasic/SemanticModelTestBase.vb
Visual Basic
apache-2.0
7,947
Imports System.IO Public Class iOSWinSigner Private Sub cbCreate_Click(sender As Object, e As EventArgs) Handles cbCreate.Click Dim key As String key = tbKey.Text Shell(System.Environment.GetEnvironmentVariable("systemdrive") + "\OpenSSL-Win32\bin\openssl genrsa -out " + System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" + key + ".key 2048") tbciOS.SelectedIndex = 1 End Sub Private Sub tbKey_Leave(sender As Object, e As EventArgs) Handles tbKey.Leave lblRequest.Text = tbKey.Text End Sub Private Sub cbSign_Click(sender As Object, e As EventArgs) Handles cbSign.Click Dim key As String Dim fname As String Dim email As String Dim country As String Dim signreq As String key = tbKey.Text fname = tbFName.Text email = tbEMail.Text country = cbxCountry.Text signreq = lblRequest.Text If email.Contains("@") And email.Contains(".") Then Shell(System.Environment.GetEnvironmentVariable("systemdrive") + "\OpenSSL-Win32\bin\openssl req -new -key " + System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" + key + ".key -out " + signreq + ".certSigningRequest -subj " + Chr(34) + "/emailAddress=" + email + ",CN=" + fname + ",C=" + country + Chr(34)) Upload.Show() tbciOS.SelectedIndex = 2 Else : MessageBox.Show("Invalid E-Mail. Your E-Mail should look like name@example.com") End If End Sub Private Sub cbConvert_Click(sender As Object, e As EventArgs) Handles cbConvert.Click OpenCert.InitialDirectory = System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" OpenCert.Filter = "cer files (*.cer)|*.cer" If OpenCert.ShowDialog() = System.Windows.Forms.DialogResult.OK Then lblFileName.Text = OpenCert.FileName End If Dim certname As String certname = lblFileName.Text Shell(System.Environment.GetEnvironmentVariable("systemdrive") + "\OpenSSL-Win32\bin\openssl x509 -in " + certname + "-inform DER -out " + System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" + "developer_identity.pem -outform PEM") tbciOS.SelectedIndex = 3 End Sub Private Sub cbKeyFile_Click(sender As Object, e As EventArgs) Handles cbKeyFile.Click OpenKey.InitialDirectory = System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" OpenKey.Filter = "key files (*.key)|*.key" If OpenKey.ShowDialog() = System.Windows.Forms.DialogResult.OK Then lblKeyer.Text = OpenKey.FileName End If End Sub Private Sub cbPEM_Click(sender As Object, e As EventArgs) Handles cbPEM.Click OpenPEM.InitialDirectory = System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" OpenPEM.Filter = "pem files (*.pem)|*.pem" If OpenPEM.ShowDialog() = System.Windows.Forms.DialogResult.OK Then lblPEMer.Text = OpenPEM.FileName End If End Sub Private Sub cbP12_Click(sender As Object, e As EventArgs) Handles cbP12.Click Dim key As String Dim pem As String Dim p12 As String Dim password As String Dim password1 As String key = lblKeyer.Text pem = lblPEMer.Text p12 = tbP12.Text password = tbPW.Text password1 = tbConfirm.Text If password = password1 Then If key = "" Or pem = "" Or p12 = "" Then MessageBox.Show("You need to select your Key & Pem files") Else Shell(System.Environment.GetEnvironmentVariable("systemdrive") + "\OpenSSL-Win32\bin\openssl pkcs12 -export -inkey " + key + " -in " + pem + " -out " + System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys\" + p12 + ".p12 -password pass:" + password) MessageBox.Show("Great You Can Now Upload to Phone Gap") End If Else MessageBox.Show("Password Doesn't Match") End If End Sub Private Sub iOSWinSigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load If Not Directory.Exists(System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys") Then Directory.CreateDirectory(System.Environment.GetEnvironmentVariable("userprofile") + "\iOS-Keys") End If End Sub End Class
LinuxPhreak/iOS-Win-Signer
iOSWinSigner2/iOSWinSigner2/iOSWinSigner.vb
Visual Basic
apache-2.0
4,561
Public Class InternetExplorer7test End Class
Histacom/Histacom
windows 95/InternetExplorer7test.vb
Visual Basic
apache-2.0
48
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My.Resources 'This class was auto-generated by the StronglyTypedResourceBuilder 'class via a tool like ResGen or Visual Studio. 'To add or remove a member, edit your .ResX file then rerun ResGen 'with the /str option, or rebuild your VS project. '''<summary> ''' A strongly-typed resource class, for looking up localized strings, etc. '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("u1p5e1.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan End Get End Property '''<summary> ''' Overrides the current thread's CurrentUICulture property for all ''' resource lookups using this strongly typed resource class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace
ikerlorente11/Egibide
DAM/2-Desarrollo-de-aplicaciones-multiplataforma-master/DI/Ejercicios/Tema1/Unidad1/u1p5e1/My Project/Resources.Designer.vb
Visual Basic
apache-2.0
2,711
Imports AuthorizeKeyed.MWCredit45 Module Module1 Sub Main() 'Create Soap Client Dim creditSoapClient As New CreditSoapClient 'Create Credentials Object Dim merchantCredentials As New MerchantCredentials With { .MerchantName = "TEST MERCHANT", .MerchantSiteId = "XXXXXXXX", .MerchantKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" } 'Create PaymentData Object Dim paymentData As New PaymentData With { .Source = "KEYED", .CardNumber = "4012000033330026", .ExpirationDate = "1221", .CardHolder = "John Doe", .AvsStreetAddress = "1 Federal St", .AvsZipCode = "02110", .CardVerificationValue = "123" } 'Create Request Object Dim authorizationRequest As New AuthorizationRequest With { .Amount = "1.01", .TaxAmount = "0.10", .InvoiceNumber = "INV1234", .CardAcceptorTerminalId = "01", .CustomerCode = "1234", .PurchaseOrderNumber = "PO1234", .EnablePartialAuthorization = "true" } 'Process Request Dim transactionResponse45 As TransactionResponse45 transactionResponse45 = creditSoapClient.Authorize(merchantCredentials, paymentData, authorizationRequest) 'Display Results Console.WriteLine(" Authorization Response: {0} Token: {1} Amount: ${2}", transactionResponse45.ApprovalStatus + vbNewLine, transactionResponse45.Token + vbNewLine, transactionResponse45.Amount + vbNewLine) Console.WriteLine("Press Any Key to Close") Console.ReadKey() End Sub End Module
Cayan-LLC/developer-docs
examples/merchantware/Credit/vb/AuthorizeKeyed/AuthorizeKeyed/Module1.vb
Visual Basic
apache-2.0
1,709
Imports CodeCracker.VisualBasic.Style Imports Microsoft.CodeAnalysis.Testing Imports Xunit Namespace Style Public Class InterfaceNameTests Inherits CodeFixVerifier(Of InterfaceNameAnalyzer, InterfaceNameCodeFixProvider) <Fact> Public Async Function InterfaceNameStartsWithLetterI() As Task Const source = "Namespace ConsoleApplication1 Public Interface IFoo Sub Test() End Interface End Namespace" Await VerifyBasicHasNoDiagnosticsAsync(source) End Function <Fact> Public Async Function InterfaceNameNotStartsWithLetterI() As Task Const source = "Namespace ConsoleApplication1 Public Interface Foo Sub Test() End Interface End Namespace" Dim expected = New DiagnosticResult(DiagnosticId.InterfaceName.ToDiagnosticId(), Microsoft.CodeAnalysis.DiagnosticSeverity.Info) _ .WithLocation(2, 5) _ .WithMessage(InterfaceNameAnalyzer.MessageFormat) Await VerifyBasicDiagnosticAsync(source, expected) End Function <Fact> Public Async Function ChangeInterfaceNameWithoutI() As Task Const source = "Namespace ConsoleApplication1 Public Interface Foo Sub Test() End Interface End Namespace" Const fix = "Namespace ConsoleApplication1 Public Interface IFoo Sub Test() End Interface End Namespace" Await VerifyBasicFixAsync(source, fix) End Function <Fact> Public Async Function ChangeInterfaceNameWithoutIAndClassImplementation() As Task Const source = "Namespace ConsoleApplication1 Public Interface Foo Sub Test() End Interface Public Class Test Implements Foo Public Sub Test() Implements Foo.Test End Sub End Class End Namespace" Const fix = "Namespace ConsoleApplication1 Public Interface IFoo Sub Test() End Interface Public Class Test Implements IFoo Public Sub Test() Implements IFoo.Test End Sub End Class End Namespace" Await VerifyBasicFixAsync(source, fix) End Function <Fact> Public Async Function ChangeAllInterfaceNamesWithoutI() As Task Const source1 = "Namespace ConsoleApplication1 Public Interface Foo1 Sub Test() End Interface End Namespace" Const source2 = "Namespace ConsoleApplication2 Public Interface Foo2 Sub Test() End Interface End Namespace" Const fix1 = "Namespace ConsoleApplication1 Public Interface IFoo1 Sub Test() End Interface End Namespace" Const fix2 = "Namespace ConsoleApplication2 Public Interface IFoo2 Sub Test() End Interface End Namespace" Await VerifyBasicFixAllAsync(New String() {source1, source2}, New String() {fix1, fix2}) End Function <Fact> Public Async Function ChangeAllInterfaceNamesWithoutIAndClassImplementation() As Task Const source1 = "Namespace ConsoleApplication1 Public Interface Foo1 Sub Test() End Interface Public Class Test1 Implements Foo1 Public Sub Test() Implements Foo1.Test End Sub End Class End Namespace" Const source2 = "Namespace ConsoleApplication2 Public Interface Foo2 Sub Test() End Interface Public Class Test2 Implements Foo2 Public Sub Test() Implements Foo2.Test End Sub End Class End Namespace" Const fix1 = "Namespace ConsoleApplication1 Public Interface IFoo1 Sub Test() End Interface Public Class Test1 Implements IFoo1 Public Sub Test() Implements IFoo1.Test End Sub End Class End Namespace" Const fix2 = "Namespace ConsoleApplication2 Public Interface IFoo2 Sub Test() End Interface Public Class Test2 Implements IFoo2 Public Sub Test() Implements IFoo2.Test End Sub End Class End Namespace" Await VerifyBasicFixAllAsync(New String() {source1, source2}, New String() {fix1, fix2}) End Function End Class End Namespace
jwooley/code-cracker
test/VisualBasic/CodeCracker.Test/Style/InterfaceNameTests.vb
Visual Basic
apache-2.0
4,278
'*******************************************************************************************' ' ' ' Download Free Evaluation Version From: https://bytescout.com/download/web-installer ' ' ' ' Also available as Web API! Get free API Key https://app.pdf.co/signup ' ' ' ' Copyright © 2017-2020 ByteScout, Inc. All rights reserved. ' ' https://www.bytescout.com ' ' https://www.pdf.co ' '*******************************************************************************************' Imports System.IO Imports Bytescout.BarCodeReader Module Module1 Sub Main() Const imageFile As String = "UPCE.png" Console.WriteLine("Reading barcode(s) from image {0}", Path.GetFullPath(imageFile)) Dim reader As New Reader() reader.RegistrationName = "demo" reader.RegistrationKey = "demo" ' Set barcode type to find reader.BarcodeTypesToFind.UPCE = True ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- ' Read barcodes Dim barcodes As FoundBarcode() = reader.ReadFrom(imageFile) For Each barcode As FoundBarcode In barcodes Console.WriteLine("Found barcode with type '{0}' and value '{1}'", barcode.Type, barcode.Value) Next ' Cleanup reader.Dispose() Console.WriteLine("Press any key to exit..") Console.ReadKey() End Sub End Module
bytescout/ByteScout-SDK-SourceCode
Premium Suite/VB.NET/Decode upc-e barcode with barcode reader sdk/Module1.vb
Visual Basic
apache-2.0
2,148
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.QualifyMemberAccess Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeAnalysis.VisualBasic.QualifyMemberAccess <DiagnosticAnalyzer(LanguageNames.VisualBasic)> Friend NotInheritable Class VisualBasicQualifyMemberAccessDiagnosticAnalyzer Inherits AbstractQualifyMemberAccessDiagnosticAnalyzer(Of SyntaxKind, ExpressionSyntax, SimpleNameSyntax) Protected Overrides Function GetLanguageName() As String Return LanguageNames.VisualBasic End Function Protected Overrides Function IsAlreadyQualifiedMemberAccess(node As ExpressionSyntax) As Boolean Return node.IsKind(SyntaxKind.MeExpression) End Function Protected Overrides Function CanMemberAccessBeQualified(containingSymbol As ISymbol, node As SyntaxNode) As Boolean ' If the member is already qualified with `MyBase.`, or `MyClass.`, ' or member is in object initialization context, it cannot be qualified. Return Not (node.IsKind(SyntaxKind.MyBaseExpression) OrElse node.IsKind(SyntaxKind.MyClassExpression) OrElse node.IsKind(SyntaxKind.ObjectCreationExpression)) End Function Protected Overrides Function GetLocation(operation As IOperation) As Location Dim unaryExpressionSyntax As UnaryExpressionSyntax = TryCast(operation.Syntax, UnaryExpressionSyntax) If unaryExpressionSyntax IsNot Nothing AndAlso unaryExpressionSyntax.OperatorToken.Kind() = SyntaxKind.AddressOfKeyword Then Return unaryExpressionSyntax.Operand.GetLocation() End If Return operation.Syntax.GetLocation() End Function End Class End Namespace
tmeschter/roslyn
src/Features/VisualBasic/Portable/Diagnostics/Analyzers/VisualBasicQualifyMemberAccessDiagnosticAnalyzer.vb
Visual Basic
apache-2.0
1,943
' CodeContracts ' ' Copyright (c) Microsoft Corporation ' ' All rights reserved. ' ' MIT License ' ' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: ' ' The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ' ' THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #If Not SILVERLIGHT Then Imports System Imports System.Diagnostics Imports System.Diagnostics.Contracts Namespace Microsoft.VisualBasic.Logging Public Class Log Public Sub New(ByVal name As String) Contract.Requires(name IsNot Nothing) End Sub ''/ Properties Public ReadOnly Property DefaultFileLogWriter() As FileLogTraceListener Get Contract.Ensures(Contract.Result(Of FileLogTraceListener)() IsNot Nothing) Return Nothing End Get End Property Public ReadOnly Property TraceSource() As TraceSource Get Contract.Ensures(Contract.Result(Of TraceSource)() IsNot Nothing) Return Nothing End Get End Property End Class End Namespace #End If
ndykman/CodeContracts
Microsoft.Research/Contracts/Microsoft.VisualBasic.Contracts/Microsoft.VisualBasic.Logging.Log.vb
Visual Basic
mit
1,889
'********************************************************* ' ' Copyright (c) Microsoft. All rights reserved. ' This code is licensed under the MIT License (MIT). ' THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ' ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY ' IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR ' PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. ' '********************************************************* Imports System Imports Windows.Devices.Enumeration Imports Windows.Devices.Sensors Imports Windows.Globalization Imports Windows.UI.Xaml Imports Windows.UI.Xaml.Controls Namespace Global.SDKTemplate Public NotInheritable Partial Class Scenario2_History Inherits Page Dim rootPage As MainPage = MainPage.Current Dim ActivitySensorClassId As Guid = New Guid("9D9E0118-1807-4F2E-96E4-2CE57142E196") Public Sub New() Me.InitializeComponent() End Sub ''' <summary> ''' This is the click handler for the 'Get Activity History' button. ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> Async Private Sub ScenarioGetActivityHistory(sender As Object, e As RoutedEventArgs) ScenarioOutput_Count.Text = "No data" ScenarioOutput_Activity1.Text = "No data" ScenarioOutput_Confidence1.Text = "No data" ScenarioOutput_Timestamp1.Text = "No data" ScenarioOutput_ActivityN.Text = "No data" ScenarioOutput_ConfidenceN.Text = "No data" ScenarioOutput_TimestampN.Text = "No data" rootPage.NotifyUser("", NotifyType.StatusMessage) ' Determine if we can access activity sensors Dim deviceAccessInfo = DeviceAccessInformation.CreateFromDeviceClassId(ActivitySensorClassId) If deviceAccessInfo.CurrentStatus = DeviceAccessStatus.Allowed Then ' Determine if an activity sensor is present ' This can also be done using Windows::Devices::Enumeration::DeviceInformation::FindAllAsync Dim activitySensor As ActivitySensor = Await ActivitySensor.GetDefaultAsync() If activitySensor IsNot Nothing Then Dim calendar = New Calendar() calendar.SetToNow() calendar.AddDays(-1) Dim yesterday = calendar.GetDateTime() ' Get history from yesterday onwards Dim history = Await ActivitySensor.GetSystemHistoryAsync(yesterday) ScenarioOutput_Count.Text = history.Count.ToString() If history.Count > 0 Then Dim reading1 = history(0) ScenarioOutput_Activity1.Text = reading1.Activity.ToString() ScenarioOutput_Confidence1.Text = reading1.Confidence.ToString() ScenarioOutput_Timestamp1.Text = reading1.Timestamp.ToString("u") Dim readingN = history(history.Count - 1) ScenarioOutput_ActivityN.Text = readingN.Activity.ToString() ScenarioOutput_ConfidenceN.Text = readingN.Confidence.ToString() ScenarioOutput_TimestampN.Text = readingN.Timestamp.ToString("u") End If Else rootPage.NotifyUser("No activity sensors found", NotifyType.ErrorMessage) End If Else rootPage.NotifyUser("Access to activity sensors is denied", NotifyType.ErrorMessage) End If End Sub End Class End Namespace
oldnewthing/Windows-universal-samples
Samples/ActivitySensor/vb/Scenario2_History.xaml.vb
Visual Basic
mit
3,675
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Composition Imports Microsoft.CodeAnalysis.CommentSelection Imports Microsoft.CodeAnalysis.Host.Mef Namespace Microsoft.CodeAnalysis.VisualBasic.CommentSelection <ExportLanguageService(GetType(ICommentSelectionService), LanguageNames.VisualBasic), [Shared]> Friend Class VisualBasicCommentSelectionService Inherits AbstractCommentSelectionService Public Overrides ReadOnly Property SingleLineCommentString As String = "'" Public Overrides ReadOnly Property SupportsBlockComment As Boolean = False Public Overrides ReadOnly Property BlockCommentEndString As String Get Throw New NotSupportedException() End Get End Property Public Overrides ReadOnly Property BlockCommentStartString As String Get Throw New NotSupportedException() End Get End Property End Class End Namespace
OmarTawfik/roslyn
src/Features/VisualBasic/Portable/CommentSelection/VisualBasicCommentSelectionService.vb
Visual Basic
apache-2.0
1,107
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.239 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My.Resources 'This class was auto-generated by the StronglyTypedResourceBuilder 'class via a tool like ResGen or Visual Studio. 'To add or remove a member, edit your .ResX file then rerun ResGen 'with the /str option, or rebuild your VS project. '''<summary> ''' A strongly-typed resource class, for looking up localized strings, etc. '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("TestVb.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan End Get End Property '''<summary> ''' Overrides the current thread's CurrentUICulture property for all ''' resource lookups using this strongly typed resource class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace
tmyroadctfig/twaindotnet
src/TestVb/My Project/Resources.Designer.vb
Visual Basic
mit
2,775
'-------------------------------------------------------------------------------------------' ' Inicio del codigo '-------------------------------------------------------------------------------------------' ' Importando librerias '-------------------------------------------------------------------------------------------' Imports System.Data Imports cusAplicacion '-------------------------------------------------------------------------------------------' ' Inicio de clase "rLibro_Compras_2013" '-------------------------------------------------------------------------------------------' Partial Class rLibro_Compras_2013 Inherits vis2formularios.frmReporte Dim loObjetoReporte As CrystalDecisions.CrystalReports.Engine.ReportDocument Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim lcParametro0Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(0), goServicios.enuOpcionesRedondeo.KN_FechaInicioDelDia) Dim lcParametro0Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(0), goServicios.enuOpcionesRedondeo.KN_FechaFinDelDia) Dim lcParametro1Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(1)) Dim lcParametro1Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(1)) Dim lcParametro2Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(2)) Dim lcParametro2Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(2)) Dim lcParametro3Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(3)) Dim lcParametro3Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(3)) Dim lcParametro4Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(4)) Dim lcParametro4Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(4)) Dim lcParametro5Desde As String = cusAplicacion.goReportes.paParametrosFinales(5) Dim lcParametro6Desde As String = cusAplicacion.goReportes.paParametrosFinales(6) Dim lcParametro7Desde As String = cusAplicacion.goReportes.paParametrosFinales(7) Dim lcParametro8Desde As String = goServicios.mObtenerListaFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(8)) Dim lcParametro9Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(9)) Dim lcParametro9Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(9)) Dim lcOrdenamiento As String = cusAplicacion.goReportes.pcOrden Dim loComandoSeleccionar As New StringBuilder() loComandoSeleccionar.AppendLine("DECLARE @lnCero AS DECIMAL(28, 10);") loComandoSeleccionar.AppendLine("SET @lnCero = CAST(0 AS DECIMAL(28, 10));") loComandoSeleccionar.AppendLine("DECLARE @lcVacio AS NVARCHAR(30);") loComandoSeleccionar.AppendLine("SET @lcVacio = N'';") loComandoSeleccionar.AppendLine("CREATE TABLE #tmpLibroCompras( Tabla VARCHAR(20) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Cod_Tip VARCHAR(30) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Codigo_Tipo VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Documento VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Control VARCHAR(20) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Referencia VARCHAR(30) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Factura VARCHAR(20) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Status VARCHAR(15) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Doc_Ori VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Documento_Afectado VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Cod_Pro VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Fec_Ini DATETIME,") loComandoSeleccionar.AppendLine(" Tip_Doc VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Mon_Bru DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Mon_Net DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Dis_Imp VARCHAR(MAX),") loComandoSeleccionar.AppendLine(" Mon_Des DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Mon_Rec DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Por_Des DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Por_Rec DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Mon_Otr1 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Mon_Otr2 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Mon_Otr3 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Cod_Imp1 VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Cod_Imp2 VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Cod_Imp3 VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Com_Ret VARCHAR(30) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Fec_Ret DATETIME,") loComandoSeleccionar.AppendLine(" mon_ret DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_imp1 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_bas1 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" por_imp1 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_exe1 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_imp2 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_bas2 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" por_imp2 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_exe2 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_imp3 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_bas3 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" por_imp3 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" mon_exe3 DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" subt_exe DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" subt_bas DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" subt_imp DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Exonerado DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" No_Sujeto DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Sin_Derecho_CF DECIMAL(28,10),") loComandoSeleccionar.AppendLine(" Nom_Pro VARCHAR(100) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Rif VARCHAR(20) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Tip_Pro VARCHAR(10) COLLATE DATABASE_DEFAULT,") loComandoSeleccionar.AppendLine(" Transaccion VARCHAR(10) COLLATE DATABASE_DEFAULT)") loComandoSeleccionar.AppendLine(" ") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("INSERT INTO #tmpLibroCompras( Tabla, Cod_Tip, Codigo_Tipo, Documento, Control, Referencia, Factura, Status,") loComandoSeleccionar.AppendLine(" Doc_Ori, Documento_Afectado, Cod_Pro, Fec_Ini, Tip_Doc, Mon_Bru, Mon_Net,") loComandoSeleccionar.AppendLine(" Dis_Imp, Mon_Des, Mon_Rec, Por_Des, Por_Rec, Mon_Otr1, Mon_Otr2, Mon_Otr3,") loComandoSeleccionar.AppendLine(" Cod_Imp1, Cod_Imp2, Cod_Imp3, mon_ret, mon_imp1, mon_bas1, por_imp1,") loComandoSeleccionar.AppendLine(" mon_exe1, mon_imp2, mon_bas2, por_imp2, mon_exe2, mon_imp3, mon_bas3,") loComandoSeleccionar.AppendLine(" por_imp3, mon_exe3, subt_exe, subt_bas, subt_imp, Exonerado, No_Sujeto,") loComandoSeleccionar.AppendLine(" Sin_Derecho_CF, Nom_Pro, Rif, Tip_Pro, Transaccion)") loComandoSeleccionar.AppendLine("SELECT ") loComandoSeleccionar.AppendLine(" 'Compras' AS Tabla, ") loComandoSeleccionar.AppendLine(" CASE Cuentas_Pagar.Cod_Tip ") loComandoSeleccionar.AppendLine(" WHEN 'FACT' THEN 'Factura' ") loComandoSeleccionar.AppendLine(" WHEN 'N/CR' THEN 'Nota de Credito' ") loComandoSeleccionar.AppendLine(" WHEN 'N/DB' THEN 'Nota de Debito' ") loComandoSeleccionar.AppendLine(" END AS Cod_Tip, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Cod_Tip AS Codigo_Tipo, ") loComandoSeleccionar.AppendLine(" CAST(Cuentas_Pagar.Documento AS CHAR(30)) AS Documento, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Control AS Control, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Referencia AS Referencia, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Factura AS Factura, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Status AS Status, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Doc_Ori AS Doc_Ori, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Documento_Afectado, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Cod_Pro AS Cod_Pro, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Fec_Ini AS Fec_Ini, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Tip_Doc AS Tip_Doc, ") loComandoSeleccionar.AppendLine(" CASE WHEN Cuentas_Pagar.Tip_Doc = 'Credito' ") loComandoSeleccionar.AppendLine(" THEN Cuentas_Pagar.Mon_Bru * -1 ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Mon_Bru ") loComandoSeleccionar.AppendLine(" END AS Mon_Bru, ") loComandoSeleccionar.AppendLine(" CASE WHEN Cuentas_Pagar.Tip_Doc = 'Credito' ") loComandoSeleccionar.AppendLine(" THEN Cuentas_Pagar.Mon_Net * -1 ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Mon_Net ") loComandoSeleccionar.AppendLine(" END AS Mon_Net, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Dis_Imp AS Dis_Imp, ") loComandoSeleccionar.AppendLine(" CASE WHEN Cuentas_Pagar.Tip_Doc = 'Credito' ") loComandoSeleccionar.AppendLine(" THEN Cuentas_Pagar.Mon_Des * -1 ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Mon_Des ") loComandoSeleccionar.AppendLine(" END AS Mon_Des, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Mon_Rec AS Mon_Rec, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Por_Des AS Por_Des, ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Por_Rec AS Por_Rec, ") loComandoSeleccionar.AppendLine(" CASE WHEN Cuentas_Pagar.Tip_Doc = 'Credito' ") loComandoSeleccionar.AppendLine(" THEN Cuentas_Pagar.Mon_Otr1 * -1 ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Mon_Otr1 ") loComandoSeleccionar.AppendLine(" END AS Mon_Otr1, ") loComandoSeleccionar.AppendLine(" CASE WHEN Cuentas_Pagar.Tip_Doc = 'Credito' ") loComandoSeleccionar.AppendLine(" THEN Cuentas_Pagar.Mon_Otr2 * -1 ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Mon_Otr2 ") loComandoSeleccionar.AppendLine(" END AS Mon_Otr2, ") loComandoSeleccionar.AppendLine(" CASE WHEN Cuentas_Pagar.Tip_Doc = 'Credito' ") loComandoSeleccionar.AppendLine(" THEN Cuentas_Pagar.Mon_Otr3 * -1 ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Mon_Otr3 ") loComandoSeleccionar.AppendLine(" END AS Mon_Otr3, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp1, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp2, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_ret, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas1, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas2, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas3, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe3, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_exe, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_bas, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_imp, ") loComandoSeleccionar.AppendLine(" @lnCero AS Exonerado, ") loComandoSeleccionar.AppendLine(" @lnCero AS No_Sujeto, ") loComandoSeleccionar.AppendLine(" @lnCero AS Sin_Derecho_CF, ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Cuentas_Pagar.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Nom_Pro ") loComandoSeleccionar.AppendLine(" ELSE (CASE WHEN (Cuentas_Pagar.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Nom_Pro ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Nom_Pro ") loComandoSeleccionar.AppendLine(" END) ") loComandoSeleccionar.AppendLine(" END) AS Nom_Pro, ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Cuentas_Pagar.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Rif ELSE ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Cuentas_Pagar.Rif = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Rif ") loComandoSeleccionar.AppendLine(" ELSE Cuentas_Pagar.Rif ") loComandoSeleccionar.AppendLine(" END) ") loComandoSeleccionar.AppendLine(" END) AS Rif, ") loComandoSeleccionar.AppendLine(" Proveedores.Tip_Pro AS Tip_Pro, ") loComandoSeleccionar.AppendLine(" (CASE WHEN Cuentas_Pagar.Status = 'Anulado' ") loComandoSeleccionar.AppendLine(" THEN '03-ANU' ") loComandoSeleccionar.AppendLine(" ELSE '01-REG' ") loComandoSeleccionar.AppendLine(" END) AS Transaccion ") loComandoSeleccionar.AppendLine("FROM Cuentas_Pagar ") loComandoSeleccionar.AppendLine(" JOIN Proveedores ON Cuentas_Pagar.Cod_Pro = Proveedores.Cod_Pro") loComandoSeleccionar.AppendLine("WHERE Cuentas_Pagar.Fec_Ini BETWEEN " & lcParametro0Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro0Hasta) loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.Documento BETWEEN " & lcParametro1Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro1Hasta) loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.cod_pro BETWEEN " & lcParametro2Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro2Hasta) loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.Cod_Suc BETWEEN " & lcParametro3Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro3Hasta) loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.Status IN ( " & lcParametro8Desde & " ) ") If lcParametro5Desde = "Igual" Then loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.Cod_Rev BETWEEN " & lcParametro4Desde) Else loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.Cod_Rev NOT BETWEEN " & lcParametro4Desde) End If loComandoSeleccionar.AppendLine(" AND " & lcParametro4Hasta) loComandoSeleccionar.AppendLine(" AND ( ") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.Cod_Tip IN ('FACT', 'N/DB')") loComandoSeleccionar.AppendLine(" OR (Cuentas_Pagar.Cod_Tip = 'N/CR' AND Cuentas_Pagar.Automatico = 1 AND Cuentas_Pagar.Tip_Ori = 'Devoluciones_Proveedores')") loComandoSeleccionar.AppendLine(" OR (Cuentas_Pagar.Cod_Tip = 'N/CR' AND Cuentas_Pagar.Automatico = 0 AND Cuentas_Pagar.Cod_Rev IN ('DEVCOM', 'REBAJA') )") loComandoSeleccionar.AppendLine(" ) ") loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.cod_tip IN ('FACT', 'N/CR', 'N/DB')") loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.Cod_Tip BETWEEN " & lcParametro9Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro9Hasta) loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") Dim lcStatus As String = "Pendiente,Confirmado,Procesado,Pagado,Cerrado,Afectado,Serializado,Contabilizado,Iniciado,Conciliado,Otro,Anulado" If (cusAplicacion.goReportes.paParametrosIniciales(8).Equals(lcStatus)) OrElse _ (cusAplicacion.goReportes.paParametrosIniciales(8).Equals("Anulado")) Then loComandoSeleccionar.AppendLine("UNION ALL") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''Obtencion de las Facturas de Compra Anuladas ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' loComandoSeleccionar.AppendLine("SELECT ") loComandoSeleccionar.AppendLine(" 'Facturas' AS Tabla, ") loComandoSeleccionar.AppendLine(" 'Factura' AS cod_tip, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Codigo_Tipo, ") loComandoSeleccionar.AppendLine(" CAST(Compras.Documento AS CHAR(30)) AS Documento, ") loComandoSeleccionar.AppendLine(" Compras.Control AS Control, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Referencia, ") loComandoSeleccionar.AppendLine(" Compras.Factura AS Factura, ") loComandoSeleccionar.AppendLine(" Compras.Status AS Status, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Doc_Ori, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Documento_Afectado, ") loComandoSeleccionar.AppendLine(" Compras.Cod_Pro AS Cod_Pro, ") loComandoSeleccionar.AppendLine(" Compras.Fec_Ini AS Fec_Ini, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Tip_Doc, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Bru AS Mon_Bru, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Net AS Mon_Net, ") loComandoSeleccionar.AppendLine(" Compras.Dis_imp AS Dis_imp, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Des1 AS Mon_Des, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Rec1 AS Mon_Rec, ") loComandoSeleccionar.AppendLine(" Compras.Por_Des1 AS Por_Des, ") loComandoSeleccionar.AppendLine(" Compras.Por_Rec1 AS Por_Rec, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Otr1 AS Mon_Otr1, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Otr2 AS Mon_Otr2, ") loComandoSeleccionar.AppendLine(" Compras.Mon_Otr3 AS Mon_Otr3, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp1, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp2, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_ret, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas1, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas2, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas3, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe3, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_exe, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_bas, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_imp, ") loComandoSeleccionar.AppendLine(" @lnCero AS Exonerado, ") loComandoSeleccionar.AppendLine(" @lnCero AS No_Sujeto, ") loComandoSeleccionar.AppendLine(" @lnCero AS Sin_Derecho_CF, ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Compras.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Nom_Pro ") loComandoSeleccionar.AppendLine(" ELSE (CASE WHEN (Compras.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Nom_Pro ") loComandoSeleccionar.AppendLine(" ELSE Compras.Nom_Pro ") loComandoSeleccionar.AppendLine(" END) ") loComandoSeleccionar.AppendLine(" END) AS Nom_Pro, ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Compras.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Rif ") loComandoSeleccionar.AppendLine(" ELSE (CASE WHEN (Compras.Rif = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Rif ") loComandoSeleccionar.AppendLine(" ELSE Compras.Rif ") loComandoSeleccionar.AppendLine(" END) ") loComandoSeleccionar.AppendLine(" END) AS Rif, ") loComandoSeleccionar.AppendLine(" Proveedores.Tip_Pro AS Tip_Pro, ") loComandoSeleccionar.AppendLine(" (CASE WHEN Compras.Status = 'Anulado' ") loComandoSeleccionar.AppendLine(" THEN '03-ANU' ") loComandoSeleccionar.AppendLine(" ELSE '01-REG' ") loComandoSeleccionar.AppendLine(" END) AS Transaccion ") loComandoSeleccionar.AppendLine("FROM Compras ") loComandoSeleccionar.AppendLine(" JOIN Proveedores ON Compras.Cod_Pro = Proveedores.Cod_Pro ") loComandoSeleccionar.AppendLine("WHERE Compras.Fec_Ini BETWEEN " & lcParametro0Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro0Hasta) loComandoSeleccionar.AppendLine(" AND Compras.Documento BETWEEN " & lcParametro1Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro1Hasta) loComandoSeleccionar.AppendLine(" AND Compras.cod_pro BETWEEN " & lcParametro2Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro2Hasta) loComandoSeleccionar.AppendLine(" AND Compras.Cod_Suc BETWEEN " & lcParametro3Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro3Hasta) loComandoSeleccionar.AppendLine(" AND Compras.Status = 'Anulado'") If lcParametro5Desde = "Igual" Then loComandoSeleccionar.AppendLine(" AND Compras.Cod_Rev BETWEEN " & lcParametro4Desde) Else loComandoSeleccionar.AppendLine(" AND Compras.Cod_Rev NOT BETWEEN " & lcParametro4Desde) End If loComandoSeleccionar.AppendLine(" AND " & lcParametro4Hasta) loComandoSeleccionar.AppendLine("") End If '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''Obtencion de las Ordenes de pago ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If lcParametro6Desde.ToUpper() = "SI" Then loComandoSeleccionar.AppendLine(" UNION ALL") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine(" SELECT ") loComandoSeleccionar.AppendLine(" 'Orden_Pago' AS Tabla, ") loComandoSeleccionar.AppendLine(" 'Orden de Pago' AS cod_tip, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Codigo_Tipo, ") loComandoSeleccionar.AppendLine(" CAST(Ordenes_Pagos.Documento AS CHAR(30)) AS Documento, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Control AS Control, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Referencia, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Factura AS Factura, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Status AS Status, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Doc_Ori, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Documento_Afectado, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Cod_Pro AS Cod_Pro, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Fec_Ini AS Fec_Ini, ") loComandoSeleccionar.AppendLine(" 'debito' As Tip_Doc, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Mon_Bru AS Mon_Bru, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Mon_Net AS Mon_Net, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Dis_Imp AS Dis_Imp, ") loComandoSeleccionar.AppendLine(" @lnCero AS Mon_Des, ") loComandoSeleccionar.AppendLine(" @lnCero AS Mon_Rec, ") loComandoSeleccionar.AppendLine(" @lnCero AS Por_Des, ") loComandoSeleccionar.AppendLine(" @lnCero AS Por_Rec, ") loComandoSeleccionar.AppendLine(" @lnCero AS Mon_Otr1, ") loComandoSeleccionar.AppendLine(" @lnCero AS Mon_Otr2, ") loComandoSeleccionar.AppendLine(" @lnCero AS Mon_Otr3, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp1, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp2, ") loComandoSeleccionar.AppendLine(" @lcVacio AS Cod_Imp3, ") loComandoSeleccionar.AppendLine(" Ordenes_Pagos.Mon_Ret AS Mon_Ret, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas1, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe1, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas2, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe2, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_bas3, ") loComandoSeleccionar.AppendLine(" @lnCero AS por_imp3, ") loComandoSeleccionar.AppendLine(" @lnCero AS mon_exe3, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_exe, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_bas, ") loComandoSeleccionar.AppendLine(" @lnCero AS subt_imp, ") loComandoSeleccionar.AppendLine(" @lnCero AS Exonerado, ") loComandoSeleccionar.AppendLine(" @lnCero AS No_Sujeto, ") loComandoSeleccionar.AppendLine(" @lnCero AS Sin_Derecho_CF, ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Ordenes_Pagos.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Nom_Pro ") loComandoSeleccionar.AppendLine(" ELSE (CASE WHEN (Ordenes_Pagos.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Nom_Pro ") loComandoSeleccionar.AppendLine(" ELSE Ordenes_Pagos.Nom_Pro ") loComandoSeleccionar.AppendLine(" END) ") loComandoSeleccionar.AppendLine(" END) AS Nom_Pro, ") loComandoSeleccionar.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Ordenes_Pagos.Nom_Pro = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Rif ") loComandoSeleccionar.AppendLine(" ELSE (CASE WHEN (Ordenes_Pagos.Rif = '') ") loComandoSeleccionar.AppendLine(" THEN Proveedores.Rif ") loComandoSeleccionar.AppendLine(" ELSE Ordenes_Pagos.Rif ") loComandoSeleccionar.AppendLine(" END) ") loComandoSeleccionar.AppendLine(" END) AS Rif, ") loComandoSeleccionar.AppendLine(" Proveedores.Tip_Pro AS Tip_Pro, ") loComandoSeleccionar.AppendLine(" (CASE WHEN Ordenes_Pagos.Status = 'Anulado' ") loComandoSeleccionar.AppendLine(" THEN '03-ANU' ") loComandoSeleccionar.AppendLine(" ELSE '01-REG' ") loComandoSeleccionar.AppendLine(" END) AS Transaccion ") loComandoSeleccionar.AppendLine("FROM Ordenes_Pagos ") loComandoSeleccionar.AppendLine(" JOIN Proveedores ON Ordenes_Pagos.Cod_Pro = Proveedores.Cod_Pro") loComandoSeleccionar.AppendLine("WHERE Ordenes_Pagos.Ipos = 0") loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Fec_Ini BETWEEN " & lcParametro0Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro0Hasta) loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Documento BETWEEN " & lcParametro1Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro1Hasta) loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.cod_pro BETWEEN " & lcParametro2Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro2Hasta) loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Cod_Suc BETWEEN " & lcParametro3Desde) loComandoSeleccionar.AppendLine(" AND " & lcParametro3Hasta) loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Status = 'Confirmado'") If lcParametro7Desde.ToUpper = "NO" Then loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Mon_Imp <> 0") End If If lcParametro5Desde = "Igual" Then loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Cod_Rev BETWEEN " & lcParametro4Desde) Else loComandoSeleccionar.AppendLine(" AND Ordenes_Pagos.Cod_Rev NOT BETWEEN " & lcParametro4Desde) End If loComandoSeleccionar.AppendLine(" AND " & lcParametro4Hasta) loComandoSeleccionar.AppendLine("") End If '***************** Retenciones de IVA, si aplican ************************************* loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("UPDATE #tmpLibroCompras ") loComandoSeleccionar.AppendLine("SET Com_Ret = Retenciones.Com_Ret, ") loComandoSeleccionar.AppendLine(" Fec_Ret = Retenciones.Fec_Ret, ") loComandoSeleccionar.AppendLine(" Mon_Ret = Retenciones.Mon_Ret") loComandoSeleccionar.AppendLine("FROM ( SELECT #tmpLibroCompras.Documento AS Documento,") loComandoSeleccionar.AppendLine(" #tmpLibroCompras.Cod_Tip AS Cod_Tip,") loComandoSeleccionar.AppendLine(" retenciones_documentos.num_com AS Com_Ret,") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.fec_ini AS Fec_Ret,") loComandoSeleccionar.AppendLine(" Cuentas_Pagar.mon_net AS Mon_Ret") loComandoSeleccionar.AppendLine(" FROM retenciones_documentos ") loComandoSeleccionar.AppendLine(" JOIN #tmpLibroCompras") loComandoSeleccionar.AppendLine(" ON #tmpLibroCompras.Documento = retenciones_documentos.doc_ori") loComandoSeleccionar.AppendLine(" AND #tmpLibroCompras.Codigo_Tipo = retenciones_documentos.cla_ori") loComandoSeleccionar.AppendLine(" AND retenciones_documentos.tip_ori = 'Cuentas_Pagar'") loComandoSeleccionar.AppendLine(" AND retenciones_documentos.Clase = 'IMPUESTO'") loComandoSeleccionar.AppendLine(" JOIN Cuentas_Pagar ") loComandoSeleccionar.AppendLine(" ON Cuentas_Pagar.documento = retenciones_documentos.doc_des") loComandoSeleccionar.AppendLine(" AND Cuentas_Pagar.cod_tip = retenciones_documentos.cla_des") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine(" ) AS Retenciones") loComandoSeleccionar.AppendLine("WHERE Retenciones.Documento = #tmpLibroCompras.documento") loComandoSeleccionar.AppendLine(" AND Retenciones.Cod_Tip = #tmpLibroCompras.Cod_Tip") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("SELECT * FROM #tmpLibroCompras ") loComandoSeleccionar.AppendLine("ORDER BY " & lcOrdenamiento) 'Me.mEscribirConsulta(loComandoSeleccionar.ToString()) Dim loServicios As New cusDatos.goDatos Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loComandoSeleccionar.ToString(), "curReportes") Dim loDistribucion As System.Xml.XmlDocument Dim laImpuestos As System.Xml.XmlNodeList Dim loTabla As New DataTable() loTabla = laDatosReporte.Tables(0) 'If lcParametro6Desde.ToUpper() = "SI" Then ' If (cusAplicacion.goReportes.paParametrosIniciales(8).Equals(lcStatus)) Or _ ' (cusAplicacion.goReportes.paParametrosIniciales(8).Equals("Anulado")) Then ' loTabla = laDatosReporte.Tables(0) ' Else ' loTabla = laDatosReporte.Tables(1) ' End If 'Else ' If (cusAplicacion.goReportes.paParametrosIniciales(8).Equals(lcStatus)) Or _ ' (cusAplicacion.goReportes.paParametrosIniciales(8).Equals("Anulado")) Then ' loTabla = laDatosReporte.Tables(0) ' Else ' loTabla = laDatosReporte.Tables(1) ' End If 'End If For Each loFila As DataRow In loTabla.Rows If Not String.IsNullOrEmpty(Trim(loFila.Item("dis_imp"))) Then loDistribucion = New System.Xml.XmlDocument() Try loDistribucion.LoadXml(Trim(loFila.Item("dis_imp"))) Catch ex As Exception Continue For End Try laImpuestos = loDistribucion.SelectNodes("impuestos/impuesto") If (loFila.Item("Cod_Tip").Equals("Orden de Pago")) Then If laImpuestos.Count >= 1 Then If Trim(loFila.Item("Tip_Doc")).ToLower = "credito" Then loFila.Item("por_imp1") = CDec(laImpuestos(0).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp1") = Trim(laImpuestos(0).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas1") = CDec(laImpuestos(0).SelectSingleNode("base").InnerText) * -1 loFila.Item("mon_exe1") = CDec(laImpuestos(0).SelectSingleNode("exento").InnerText) * -1 loFila.Item("mon_imp1") = CDec(laImpuestos(0).SelectSingleNode("monto").InnerText) * -1 Else loFila.Item("por_imp1") = CDec(laImpuestos(0).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp1") = Trim(laImpuestos(0).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas1") = CDec(laImpuestos(0).SelectSingleNode("base").InnerText) loFila.Item("mon_exe1") = CDec(laImpuestos(0).SelectSingleNode("exento").InnerText) loFila.Item("mon_imp1") = CDec(laImpuestos(0).SelectSingleNode("monto").InnerText) End If End If If laImpuestos.Count >= 2 Then If Trim(loFila.Item("Tip_Doc")).ToLower = "credito" Then loFila.Item("por_imp2") = CDec(laImpuestos(1).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp2") = Trim(laImpuestos(1).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas2") = CDec(laImpuestos(1).SelectSingleNode("base").InnerText) * -1 loFila.Item("mon_exe2") = CDec(laImpuestos(1).SelectSingleNode("exento").InnerText) * -1 loFila.Item("mon_imp2") = CDec(laImpuestos(1).SelectSingleNode("monto").InnerText) * -1 Else loFila.Item("por_imp2") = CDec(laImpuestos(1).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp2") = Trim(laImpuestos(1).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas2") = CDec(laImpuestos(1).SelectSingleNode("base").InnerText) loFila.Item("mon_exe2") = CDec(laImpuestos(1).SelectSingleNode("exento").InnerText) loFila.Item("mon_imp2") = CDec(laImpuestos(1).SelectSingleNode("monto").InnerText) End If End If If laImpuestos.Count >= 3 Then If Trim(loFila.Item("Tip_Doc")).ToLower = "credito" Then loFila.Item("por_imp3") = CDec(laImpuestos(2).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp3") = Trim(laImpuestos(2).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas3") = CDec(laImpuestos(2).SelectSingleNode("base").InnerText) * -1 loFila.Item("mon_exe3") = CDec(laImpuestos(2).SelectSingleNode("exento").InnerText) * -1 loFila.Item("mon_imp3") = CDec(laImpuestos(2).SelectSingleNode("monto").InnerText) * -1 Else loFila.Item("por_imp3") = CDec(laImpuestos(2).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp3") = Trim(laImpuestos(2).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas3") = CDec(laImpuestos(2).SelectSingleNode("base").InnerText) loFila.Item("mon_exe3") = CDec(laImpuestos(2).SelectSingleNode("exento").InnerText) loFila.Item("mon_imp3") = CDec(laImpuestos(2).SelectSingleNode("monto").InnerText) End If End If Else If laImpuestos.Count >= 1 Then If Trim(loFila.Item("Tip_Doc")).ToLower = "credito" Then loFila.Item("por_imp1") = CDec(laImpuestos(0).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp1") = Trim(laImpuestos(0).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas1") = CDec(laImpuestos(0).SelectSingleNode("base").InnerText) * -1 loFila.Item("mon_exe1") = CDec(laImpuestos(0).SelectSingleNode("exento").InnerText) * -1 loFila.Item("mon_imp1") = CDec(laImpuestos(0).SelectSingleNode("monto").InnerText) * -1 Else loFila.Item("por_imp1") = CDec(laImpuestos(0).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp1") = Trim(laImpuestos(0).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas1") = CDec(laImpuestos(0).SelectSingleNode("base").InnerText) loFila.Item("mon_exe1") = CDec(laImpuestos(0).SelectSingleNode("exento").InnerText) loFila.Item("mon_imp1") = CDec(laImpuestos(0).SelectSingleNode("monto").InnerText) End If End If If laImpuestos.Count >= 2 Then If Trim(loFila.Item("Tip_Doc")).ToLower = "credito" Then loFila.Item("por_imp2") = CDec(laImpuestos(1).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp2") = Trim(laImpuestos(1).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas2") = CDec(laImpuestos(1).SelectSingleNode("base").InnerText) * -1 loFila.Item("mon_exe2") = CDec(laImpuestos(1).SelectSingleNode("exento").InnerText) * -1 loFila.Item("mon_imp2") = CDec(laImpuestos(1).SelectSingleNode("monto").InnerText) * -1 Else loFila.Item("por_imp2") = CDec(laImpuestos(1).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp2") = Trim(laImpuestos(1).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas2") = CDec(laImpuestos(1).SelectSingleNode("base").InnerText) loFila.Item("mon_exe2") = CDec(laImpuestos(1).SelectSingleNode("exento").InnerText) loFila.Item("mon_imp2") = CDec(laImpuestos(1).SelectSingleNode("monto").InnerText) End If End If If laImpuestos.Count >= 3 Then If Trim(loFila.Item("Tip_Doc")).ToLower = "credito" Then loFila.Item("por_imp3") = CDec(laImpuestos(2).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp3") = Trim(laImpuestos(2).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas3") = CDec(laImpuestos(2).SelectSingleNode("base").InnerText) * -1 loFila.Item("mon_exe3") = CDec(laImpuestos(2).SelectSingleNode("exento").InnerText) * -1 loFila.Item("mon_imp3") = CDec(laImpuestos(2).SelectSingleNode("monto").InnerText) * -1 Else loFila.Item("por_imp3") = CDec(laImpuestos(2).SelectSingleNode("porcentaje").InnerText) loFila.Item("cod_imp3") = Trim(laImpuestos(2).SelectSingleNode("codigo").InnerText) loFila.Item("mon_bas3") = CDec(laImpuestos(2).SelectSingleNode("base").InnerText) loFila.Item("mon_exe3") = CDec(laImpuestos(2).SelectSingleNode("exento").InnerText) loFila.Item("mon_imp3") = CDec(laImpuestos(2).SelectSingleNode("monto").InnerText) End If End If End If loFila.Item("subt_imp") = CDec(loFila.Item("mon_imp3")) + CDec(loFila.Item("mon_imp2")) + CDec(loFila.Item("mon_imp1")) loFila.Item("subt_exe") = CDec(loFila.Item("mon_exe1")) + CDec(loFila.Item("mon_exe2")) + CDec(loFila.Item("mon_exe3")) loFila.Item("subt_bas") = CDec(loFila.Item("mon_bas1")) + CDec(loFila.Item("mon_bas2")) + CDec(loFila.Item("mon_bas3")) End If Next loFila loTabla.AcceptChanges() '------------------------------------------------------------------------------------------------------- ' Verificando si el select (tabla nº0) trae registros '------------------------------------------------------------------------------------------------------- If (loTabla.Rows.Count <= 0) Then Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Información", _ "No se Encontraron Registros para los Parámetros Especificados. ", _ vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Informacion, _ "350px", _ "200px") End If Dim laDatosReporte2 As New DataSet() Dim loTabla2 As New DataTable() loTabla2 = loTabla.Copy() loTabla.Dispose() loTabla = Nothing laDatosReporte.Dispose() laDatosReporte = Nothing laDatosReporte2.Tables.Add(loTabla2) laDatosReporte2.AcceptChanges() '--------------------------------------------------' ' Carga la imagen del logo en cusReportes ' '--------------------------------------------------' Me.mCargarLogoEmpresa(laDatosReporte2.Tables(0), "LogoEmpresa") loObjetoReporte = cusAplicacion.goReportes.mCargarReporte("rLibro_Compras_2013", laDatosReporte2) Me.mTraducirReporte(loObjetoReporte) Me.mFormatearCamposReporte(loObjetoReporte) Me.crvrLibro_Compras2_Alegria.ReportSource = loObjetoReporte Catch loExcepcion As Exception Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Error", _ "No se pudo Completar el Proceso: " & loExcepcion.Message, _ vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Error, _ "auto", _ "auto") End Try End Sub Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload Try loObjetoReporte.Close() Catch loExcepcion As Exception End Try End Sub End Class '-------------------------------------------------------------------------------------------' ' Fin del codigo ' '-------------------------------------------------------------------------------------------' ' RJG: 15/04/13: Codigo inicial, a partir de rLibro_Compras_GrupoAlegria ' '-------------------------------------------------------------------------------------------' ' RJG: 16/04/13: Agregado filtro para incluir solo retenciones de IVA (no ISLR ni Patente). ' '-------------------------------------------------------------------------------------------' ' RJG: 03/06/13: Se cambió la columna "Subtotal Factura" (Monto Bruto) por "Compras sin ' ' Impuesto". ' '-------------------------------------------------------------------------------------------' ' RJG: 30/08/13: Se ajustó el cálculo de totales para descargar los montos de documentos ' ' anulados. ' '-------------------------------------------------------------------------------------------'
kodeitsolutions/ef-reports
rLibro_Compras_2013.aspx.vb
Visual Basic
mit
54,254
Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Quest Game Browser")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("Alex Warren")> <Assembly: AssemblyProduct("Quest")> <Assembly: AssemblyCopyright("Copyright © 2017/2018 Andy Joel - full copyright and license information at https://github.com/textadventures/quest/blob/master/LICENSE. All Icons by https://de.icons8.com/ are licensed under CC BY-ND 3.0.")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("fb1c4625-618b-4b51-b8eb-2fdc53f93b05")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: <Assembly: AssemblyVersion("5.8.*")>
textadventures/quest
Menus/My Project/AssemblyInfo.vb
Visual Basic
mit
1,280
'------------------------------------------------------------------------------ ' <generado automáticamente> ' Este código fue generado por una herramienta. ' ' Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si ' se vuelve a generar el código. ' </generado automáticamente> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Partial Public Class FrmProyectoAmbito '''<summary> '''Control LblProyecto. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents LblProyecto As Global.System.Web.UI.WebControls.Label '''<summary> '''Control Menu1. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents Menu1 As Global.System.Web.UI.WebControls.Menu '''<summary> '''Control HFIdProyecto. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents HFIdProyecto As Global.System.Web.UI.WebControls.HiddenField '''<summary> '''Control ImgActualizar. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents ImgActualizar As Global.System.Web.UI.WebControls.ImageButton '''<summary> '''Control RadGrid1. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents RadGrid1 As Global.Telerik.Web.UI.RadGrid '''<summary> '''Control OdsAmbitoProyecto. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents OdsAmbitoProyecto As Global.System.Web.UI.WebControls.ObjectDataSource '''<summary> '''Control RdbDistrito. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents RdbDistrito As Global.System.Web.UI.WebControls.RadioButton '''<summary> '''Control RdbCP. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents RdbCP As Global.System.Web.UI.WebControls.RadioButton '''<summary> '''Control RdbCas. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents RdbCas As Global.System.Web.UI.WebControls.RadioButton '''<summary> '''Control HFNivel. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents HFNivel As Global.System.Web.UI.WebControls.HiddenField '''<summary> '''Control RadGrid2. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents RadGrid2 As Global.Telerik.Web.UI.RadGrid '''<summary> '''Control OdsDatosUbigeo. '''</summary> '''<remarks> '''Campo generado automáticamente. '''Para modificarlo, mueva la declaración del campo del archivo del diseñador al archivo de código subyacente. '''</remarks> Protected WithEvents OdsDatosUbigeo As Global.System.Web.UI.WebControls.ObjectDataSource End Class
crackper/SistFoncreagro
SistFoncreagro.WebSite/Monitoreo/Formularios/FrmProyectoAmbito.aspx.designer.vb
Visual Basic
mit
4,544
Namespace Security.SystemOptions_DocumentControl Public Class Open Inherits SecurityItemBase Public Sub New() _ConceptItemName = "Open" _ConceptName = "System Options_Document Control" _Description = "Allow access to 'Document Control' Tab" _IsEnterprise = True _IsSmallBusiness = True _IsViewer = False _IsWeb = False _IsWebPlus = False End Sub End Class End Namespace
nublet/DMS
DMS.Forms.Shared/Security/Items/SystemOptions/DocumentControl/Open.vb
Visual Basic
mit
507
'Copyright 2019 Esri 'Licensed under the Apache License, Version 2.0 (the "License"); 'you may not use this file except in compliance with the License. 'You may obtain a copy of the License at ' http://www.apache.org/licenses/LICENSE-2.0 'Unless required by applicable law or agreed to in writing, software 'distributed under the License is distributed on an "AS IS" BASIS, 'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 'See the License for the specific language governing permissions and 'limitations under the License. Imports ESRI.ArcGIS.ADF.CATIDs Imports System Imports System.IO Imports System.Drawing Imports System.Runtime.InteropServices Imports ESRI.ArcGIS.Catalog Imports ESRI.ArcGIS.CatalogUI Imports ESRI.ArcGIS.esriSystem ' This sample code demonstrates how to create a custom object factory ' for use in ArcCatalog. The object factory allows you to browse files ' with the *.PY extension. ' ' Guid attribute for the GxPYObject class. ' ProgID attribute - otherwise the ProgID will appear as <Namespace>.<Class>. ' InterfaceType attribute to indicate custom interface. <ComClass(GxPyObjectVBNET.ClassId, GxPyObjectVBNET.InterfaceId, GxPyObjectVBNET.EventsId)> _ Public NotInheritable Class GxPyObjectVBNET Implements IGxObject Implements IGxObjectUI Implements IGxObjectEdit Implements IGxObjectProperties #Region "COM Registration Function(s)" <ComRegisterFunction(), ComVisibleAttribute(False)> _ Public Shared Sub RegisterFunction(ByVal registerType As Type) ' Required for ArcGIS Component Category Registrar support ArcGISCategoryRegistration(registerType) 'Add any COM registration code after the ArcGISCategoryRegistration() call End Sub <ComUnregisterFunction(), ComVisibleAttribute(False)> _ Public Shared Sub UnregisterFunction(ByVal registerType As Type) ' Required for ArcGIS Component Category Registrar support ArcGISCategoryUnregistration(registerType) 'Add any COM unregistration code after the ArcGISCategoryUnregistration() call End Sub #Region "ArcGIS Component Category Registrar generated code" ''' <summary> ''' Required method for ArcGIS Component Category registration - ''' Do not modify the contents of this method with the code editor. ''' </summary> Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type) Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID) GxRootObjects.Register(regKey) End Sub ''' <summary> ''' Required method for ArcGIS Component Category unregistration - ''' Do not modify the contents of this method with the code editor. ''' </summary> Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type) Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID) GxRootObjects.Unregister(regKey) End Sub #End Region #End Region <DllImport("gdi32.dll")> _ Private Shared Function DeleteObject(ByVal hObject As IntPtr) As Boolean End Function #Region " Member Variables" Private m_gxParent As IGxObject = Nothing Private m_gxCatalog As IGxCatalog = Nothing Private m_names() As String = {"", "", ""} '0:FullName; 1:Name; 2:BaseName Private m_bitmaps(2) As System.Drawing.Bitmap ' = New System.Drawing.Bitmap(2) Private m_hBitmap(2) As IntPtr Private m_sCategory As String = "PY File" #End Region #Region " COM GUIDs" ' These GUIDs provide the COM identity for this class ' and its COM interfaces. If you change them, existing ' clients will no longer be able to access the class. Public Const ClassId As String = "EDBAE284-F590-4FE3-9FA9-5025EBE284AC" Public Const InterfaceId As String = "23693B53-6F0C-469B-AADD-BC8DF20F9DE3" Public Const EventsId As String = "C8226E4C-6F6D-4927-9408-BA5AA318F60C" #End Region #Region " Constructor/Destructor code" Public Sub New() Me.SetBitmaps() End Sub Public Sub New(ByVal name As String) Me.SetBitmaps() Me.SetNames(name) End Sub Private Sub SetNames(ByVal newName As String) If (Not newName Is Nothing) Then ' Set the FullName, Name, and BaseName, based on the specified string. m_names(0) = newName Dim indx As Integer = newName.LastIndexOf("\") If (indx > -1) Then m_names(1) = newName.Substring(indx + 1) Else m_names(1) = newName End If indx = m_names(1).LastIndexOf(".") If (indx > -1) Then m_names(2) = m_names(1).Remove(indx, m_names(1).Length - indx) Else m_names(1) = newName End If End If End Sub Private Sub SetBitmaps() Try Dim myRes As String() = Me.GetType().Assembly.GetManifestResourceNames() Dim i As Integer Dim count As Integer = myRes.GetUpperBound(0) For i = 0 To count System.Diagnostics.Debug.WriteLine(myRes(i)) Next i ' Initialize the icons to use. m_bitmaps(0) = New System.Drawing.Bitmap(GetType(GxPyObjectVBNET).Assembly.GetManifestResourceStream("GxObjectVBNET.LargeIcon.bmp")) m_bitmaps(1) = New System.Drawing.Bitmap(GetType(GxPyObjectVBNET).Assembly.GetManifestResourceStream("GxObjectVBNET.SmallIcon.bmp")) If (Not m_bitmaps(0) Is Nothing) Then m_bitmaps(0).MakeTransparent(m_bitmaps(0).GetPixel(1, 1)) m_hBitmap(0) = m_bitmaps(0).GetHbitmap() End If If (Not m_bitmaps(1) Is Nothing) Then m_bitmaps(1).MakeTransparent(m_bitmaps(1).GetPixel(1, 1)) m_hBitmap(1) = m_bitmaps(1).GetHbitmap() End If Catch Ex As System.ArgumentException If (Ex.TargetSite.ToString() = "Void .ctor(System.IO.Stream)") Then System.Diagnostics.Debug.WriteLine(Ex.Message) ' Error accessing the bitmap embedded resource. m_bitmaps(0) = Nothing m_bitmaps(1) = Nothing End If End Try End Sub Protected Overrides Sub Finalize() If Not (m_hBitmap(0).ToInt32() = 0) Then DeleteObject(m_hBitmap(0)) End If If Not (m_hBitmap(1).ToInt32() = 0) Then DeleteObject(m_hBitmap(1)) End If End Sub #End Region #Region " Implementation of IGxObject" Private Sub Attach(ByVal Parent As IGxObject, ByVal pCatalog As IGxCatalog) Implements IGxObject.Attach m_gxParent = Parent m_gxCatalog = pCatalog End Sub Private Sub Detach() Implements IGxObject.Detach m_gxParent = Nothing m_gxCatalog = Nothing End Sub Private Sub Refresh() Implements IGxObject.Refresh ' No impl. End Sub Private ReadOnly Property InternalObjectName() As IName Implements IGxObject.InternalObjectName Get Dim fileName As IFileName = CType(New FileName, IFileName) fileName.Path = m_names(0) Return CType(fileName, IName) End Get End Property Private ReadOnly Property IsValid() As Boolean Implements IGxObject.IsValid Get Dim Info As New FileInfo(m_names(0)) Return Info.Exists End Get End Property Private ReadOnly Property FullName() As String Implements IGxObject.FullName Get Return m_names(0) End Get End Property Private ReadOnly Property BaseName() As String Implements IGxObject.BaseName Get Return m_names(2) End Get End Property Private ReadOnly Property Name() As String Implements IGxObject.Name Get Return m_names(1) End Get End Property Private ReadOnly Property GxClassID() As UID Implements IGxObject.ClassID Get Dim clsID As UID = New UIDClass clsID.Value = "{0E63CDC4-7E13-422f-8B2D-F5DF853F9CA1}" Return clsID End Get End Property Private ReadOnly Property Parent() As IGxObject Implements IGxObject.Parent Get Return m_gxParent End Get End Property Private ReadOnly Property Category() As String Implements IGxObject.Category Get Return Me.m_sCategory End Get End Property #End Region #Region " Implementation of IGxObjectUI" Public ReadOnly Property NewMenu() As UID Implements IGxObjectUI.NewMenu Get ' If you have created a class of New Menu for this object, you can implement it here Return Nothing End Get End Property Public ReadOnly Property SmallImage() As Integer Implements IGxObjectUI.SmallImage Get If (Not m_bitmaps(1) Is Nothing) Then Return m_bitmaps(1).GetHbitmap().ToInt32() Else Return 0 End If End Get End Property Public ReadOnly Property LargeSelectedImage() As Integer Implements IGxObjectUI.LargeSelectedImage Get If (Not m_bitmaps(0) Is Nothing) Then Return m_bitmaps(0).GetHbitmap().ToInt32() Else Return 0 End If End Get End Property Public ReadOnly Property SmallSelectedImage() As Integer Implements IGxObjectUI.SmallSelectedImage Get If (Not m_bitmaps(1) Is Nothing) Then Return m_bitmaps(1).GetHbitmap().ToInt32() Else Return 0 End If End Get End Property Public ReadOnly Property ContextMenu() As UID Implements IGxObjectUI.ContextMenu Get ' If you have created a class of context menu of this object, you can implement it here Return Nothing End Get End Property Public ReadOnly Property LargeImage() As Integer Implements IGxObjectUI.LargeImage Get If (Not m_bitmaps(0) Is Nothing) Then Return m_bitmaps(0).GetHbitmap().ToInt32() Else Return 0 End If End Get End Property #End Region #Region " Implementation of IGxObjectEdit" Public Function CanCopy() As Boolean Implements ESRI.ArcGIS.Catalog.IGxObjectEdit.CanCopy Return True End Function Public Function CanDelete() As Boolean Implements ESRI.ArcGIS.Catalog.IGxObjectEdit.CanDelete 'This file should exist and not readonly Dim Info As New FileInfo(m_names(0)) Return Info.Exists And (Info.Attributes <> 1) End Function Public Function CanRename() As Boolean Implements ESRI.ArcGIS.Catalog.IGxObjectEdit.CanRename Return True End Function Public Sub Delete() Implements ESRI.ArcGIS.Catalog.IGxObjectEdit.Delete 'Delete File.Delete(m_names(0)) 'Tell parent the object is gone Dim pGxObjectContainer As IGxObjectContainer = CType(m_gxParent, IGxObjectContainer) pGxObjectContainer.DeleteChild(Me) End Sub Public Sub EditProperties(ByVal hParent As Integer) Implements ESRI.ArcGIS.Catalog.IGxObjectEdit.EditProperties 'Add implementation if you have defined property page End Sub Public Sub Rename(ByVal newShortName As String) Implements ESRI.ArcGIS.Catalog.IGxObjectEdit.Rename 'Trim PY extension If UCase(Right(newShortName, 3)) = ".PY" Then newShortName = Left(newShortName, Len(newShortName) - 3) End If 'Construct new name Dim pos As Integer = InStrRev(m_names(0), "\") Dim newName As String = Left(m_names(0), pos) & newShortName & ".PY" 'Rename File.Move(m_names(0), newName) 'Tell parent that name is changed m_gxParent.Refresh() End Sub #End Region #Region " Implementation of IGxObjectProperties" Public Function GetProperty(ByVal Name As String) As Object Implements IGxObjectProperties.GetProperty If (Not Name Is Nothing) Then Select Case (Name) Case "ESRI_GxObject_Name" Return Me.Name Case "ESRI_GxObject_Type" Return Me.Category End Select End If Return Nothing End Function Public Sub GetPropByIndex(ByVal Index As Integer, ByRef pName As String, ByRef pValue As Object) Implements IGxObjectProperties.GetPropByIndex Select Case (Index) Case 0 pName = "ESRI_GxObject_Name" pValue = CType(Me.Name, System.Object) Return Case 1 pName = "ESRI_GxObject_Type" pValue = CType(Me.Category, System.Object) Return Case Else pName = Nothing pValue = Nothing Return End Select End Sub Public Sub SetProperty(ByVal Name As String, ByVal Value As Object) Implements IGxObjectProperties.SetProperty 'No implementation End Sub Public ReadOnly Property PropertyCount() As Integer Implements IGxObjectProperties.PropertyCount Get Return 2 End Get End Property #End Region End Class
Esri/arcobjects-sdk-community-samples
Net/Catalog/CustomGxObject/VBNET/GxPyObject.vb
Visual Basic
apache-2.0
13,435
Imports System.Globalization Imports ServicesPlus.BLL Namespace Utils Friend Module Util Public Sub OpenFileLocation(fullPathWithArguments As String, systemName As String) Dim pathParser As New PathParser(fullPathWithArguments) Dim fullPath = pathParser.FullPath If Not (systemName.ToUpperInvariant = Environment.MachineName.ToUpperInvariant) Then fullPath = String.Format(CultureInfo.InvariantCulture, "\\{0}\{1}", systemName, fullPath.Replace(":", "$")) End If If fullPath.Contains(" ") Then fullPath = String.Format(CultureInfo.InvariantCulture, """{0}""", fullPath) End If Process.Start("explorer.exe", "/select," & fullPath) End Sub Public Function SizeToReadable(size As ULong) As String Dim sizes As String() = {"B", "KB", "MB", "GB"} Dim order As Integer = 0 While Size >= 1024 AndAlso order + 1 < sizes.Length order += 1 Size = Convert.ToUInt64(Size / 1024) End While Dim result As String = [String].Format(CultureInfo.InvariantCulture, "{0:0.##} {1}", Size, sizes(order)) Return result End Function Public Function WmiDateToDate(wmiDate As String) As String Dim year = wmiDate.Substring(0, 4) Dim month = wmiDate.Substring(4, 2) Dim day = wmiDate.Substring(6, 2) Return String.Format(CultureInfo.InvariantCulture, "{0}-{1}-{2}", year, month, day) End Function Function ColorByState(service As OM.Service) As Color 'Trace() If service.StartMode.ToUpperInvariant = "disabled".ToUpperInvariant Then Return Color.Gray End If Select Case service.State.ToUpperInvariant Case "running".ToUpperInvariant Return Color.Black Case "stopped".ToUpperInvariant Return Color.Red Case "paused".ToUpperInvariant Return Color.Green Case Else Return Color.Blue End Select End Function Friend Function ImageByState(service As OM.Service) As Integer 'Trace() Dim shift = If(service.IsSystem, 4, 0) If service.StartMode.ToUpperInvariant = "disabled".ToUpperInvariant Then Return 3 + shift End If Select Case service.State.ToUpperInvariant Case "running".ToUpperInvariant Return 0 + shift Case "stopped".ToUpperInvariant Return 2 + shift Case "paused".ToUpperInvariant Return 1 + shift Case Else Return 3 + shift End Select End Function ''' <summary> ''' Due to WMI inconsistancy, ErrorControl is String during read but integer during change operation ''' </summary> ''' <param name="errorControl">ErrorControl String: Ignore, Normal, Severe and Critical</param> ''' <returns>0 to 3</returns> ''' <remarks>You best convert it to Enum</remarks> Public Function ErrorControlToNumber(errorControl As String) As UInt16 Dim lstError = {New With {.ErrorControl = "Ignore", .Index = 0}, New With {.ErrorControl = "Normal", .Index = 1}, New With {.ErrorControl = "Severe", .Index = 2}, New With {.ErrorControl = "Critical", .Index = 3}}.ToList Return lstError.Where(Function(p) p.ErrorControl = errorControl).Single.Index End Function End Module End Namespace
fakoua/ServicesPlus
ServicesPlus/Utils/Util.vb
Visual Basic
bsd-3-clause
3,830
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Collections.Immutable Imports System.Composition Imports System.Runtime.InteropServices Imports System.Threading Imports Microsoft.CodeAnalysis.Differencing Imports Microsoft.CodeAnalysis.EditAndContinue Imports Microsoft.CodeAnalysis.Host Imports Microsoft.CodeAnalysis.Host.Mef Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue <ExportLanguageService(GetType(IEditAndContinueAnalyzer), LanguageNames.VisualBasic), [Shared]> Friend NotInheritable Class VisualBasicEditAndContinueAnalyzer Inherits AbstractEditAndContinueAnalyzer #Region "Syntax Analysis" ''' <returns> ''' <see cref="MethodBlockBaseSyntax"/> for methods, constructors, operators and accessors. ''' <see cref="PropertyStatementSyntax"/> for auto-properties. ''' <see cref="VariableDeclaratorSyntax"/> for fields with simple initialization "Dim a = 1", or "Dim a As New C" ''' <see cref="ModifiedIdentifierSyntax"/> for fields with shared AsNew initialization "Dim a, b As New C" or array initializer "Dim a(n), b(n)". ''' A null reference otherwise. ''' </returns> Friend Overrides Function FindMemberDeclaration(root As SyntaxNode, node As SyntaxNode) As SyntaxNode While node IsNot root Select Case node.Kind Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.ConstructorBlock, SyntaxKind.OperatorBlock, SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock Return node Case SyntaxKind.PropertyStatement ' Property [|a As Integer = 1|] ' Property [|a As New C()|] If Not node.Parent.IsKind(SyntaxKind.PropertyBlock) Then Return node End If Case SyntaxKind.VariableDeclarator If node.Parent.IsKind(SyntaxKind.FieldDeclaration) Then ' Dim [|a = 0|] ' Dim [|a = 0|], [|b = 0|] ' Dim [|b as Integer = 0|] ' Dim [|v1 As New C|] ' Dim v1, v2 As New C(Sub [|Foo()|]) Return node End If Case SyntaxKind.ModifiedIdentifier ' Dim [|a(n)|], [|b(n)|] As Integer ' Dim [|v1|], [|v2|] As New C If Not node.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration) Then Exit Select End If If DirectCast(node, ModifiedIdentifierSyntax).ArrayBounds IsNot Nothing OrElse DirectCast(node.Parent, VariableDeclaratorSyntax).Names.Count > 1 Then Return node End If End Select node = node.Parent End While Return Nothing End Function ''' <returns> ''' Given a node representing a declaration (<paramref name="isMember"/> = true) or a top-level edit node (<paramref name="isMember"/> = false) returns: ''' - <see cref="MethodBlockBaseSyntax"/> for methods, constructors, operators and accessors. ''' - <see cref="ExpressionSyntax"/> for auto-properties and fields with initializer or AsNew clause. ''' - <see cref="ArgumentListSyntax"/> for fields with array initializer, e.g. "Dim a(1) As Integer". ''' A null reference otherwise. ''' </returns> Friend Overrides Function TryGetDeclarationBody(node As SyntaxNode, isMember As Boolean) As SyntaxNode Select Case node.Kind Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.ConstructorBlock, SyntaxKind.OperatorBlock, SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock ' the body is the Statements list of the block Return node Case SyntaxKind.PropertyStatement ' the body is the initializer expression/new expression (if any) Dim propertyStatement = DirectCast(node, PropertyStatementSyntax) If propertyStatement.Initializer IsNot Nothing Then Return propertyStatement.Initializer.Value End If If HasAsNewClause(propertyStatement) Then Return DirectCast(propertyStatement.AsClause, AsNewClauseSyntax).NewExpression End If Return Nothing Case SyntaxKind.VariableDeclarator If Not node.Parent.IsKind(SyntaxKind.FieldDeclaration) Then Return Nothing End If ' Dim a = initializer Dim variableDeclarator = DirectCast(node, VariableDeclaratorSyntax) If variableDeclarator.Initializer IsNot Nothing Then Return variableDeclarator.Initializer.Value End If If HasAsNewClause(variableDeclarator) Then ' Dim a As New C() ' Dim a, b As New C(), but only if the specified node isn't already a member declaration representative. ' -- This is to handle an edit in AsNew clause because such an edit doesn't affect the modified identifier that would otherwise represent the member. If variableDeclarator.Names.Count = 1 OrElse Not isMember Then Return DirectCast(variableDeclarator.AsClause, AsNewClauseSyntax).NewExpression End If End If Return Nothing Case SyntaxKind.ModifiedIdentifier If Not node.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration) Then Return Nothing End If ' Dim a, b As New C() Dim variableDeclarator = DirectCast(node.Parent, VariableDeclaratorSyntax) If HasMultiAsNewInitializer(variableDeclarator) Then Return DirectCast(variableDeclarator.AsClause, AsNewClauseSyntax).NewExpression End If ' Dim a(n) ' Dim a(n), b(n) As Integer ' Dim a(n1, n2, n3) As Integer Dim modifiedIdentifier = DirectCast(node, ModifiedIdentifierSyntax) If modifiedIdentifier.ArrayBounds IsNot Nothing Then Return modifiedIdentifier.ArrayBounds End If Return Nothing Case Else ' Note: A method without body is represented by a SubStatement. Return Nothing End Select End Function Protected Overrides Function GetCapturedVariables(model As SemanticModel, memberBody As SyntaxNode) As ImmutableArray(Of ISymbol) Dim methodBlock = TryCast(memberBody, MethodBlockBaseSyntax) If methodBlock IsNot Nothing Then If methodBlock.Statements.IsEmpty Then Return ImmutableArray(Of ISymbol).Empty End If Return model.AnalyzeDataFlow(methodBlock.Statements.First, methodBlock.Statements.Last).Captured End If Dim expression = TryCast(memberBody, ExpressionSyntax) If expression IsNot Nothing Then Return model.AnalyzeDataFlow(expression).Captured End If ' Edge case, no need to be efficient, currently there can either be no captured variables or just "Me". ' Dim a((Function(n) n + 1).Invoke(1), (Function(n) n + 2).Invoke(2)) As Integer Dim arrayBounds = TryCast(memberBody, ArgumentListSyntax) If arrayBounds IsNot Nothing Then Return ImmutableArray.CreateRange( arrayBounds.Arguments.SelectMany(Function(argument) model.AnalyzeDataFlow(argument).Captured).Distinct()) End If Throw ExceptionUtilities.UnexpectedValue(memberBody) End Function Friend Overrides Function HasParameterClosureScope(member As ISymbol) As Boolean Return False End Function Protected Overrides Function GetVariableUseSites(roots As IEnumerable(Of SyntaxNode), localOrParameter As ISymbol, model As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of SyntaxNode) Debug.Assert(TypeOf localOrParameter Is IParameterSymbol OrElse TypeOf localOrParameter Is ILocalSymbol OrElse TypeOf localOrParameter Is IRangeVariableSymbol) ' Not supported (it's non trivial to find all places where "this" is used): Debug.Assert(Not localOrParameter.IsThisParameter()) Return From root In roots From node In root.DescendantNodesAndSelf() Where node.IsKind(SyntaxKind.IdentifierName) Let identifier = DirectCast(node, IdentifierNameSyntax) Where String.Equals(DirectCast(identifier.Identifier.Value, String), localOrParameter.Name, StringComparison.OrdinalIgnoreCase) AndAlso If(model.GetSymbolInfo(identifier, cancellationToken).Symbol?.Equals(localOrParameter), False) Select node End Function Private Shared Function HasSimpleAsNewInitializer(variableDeclarator As VariableDeclaratorSyntax) As Boolean Return variableDeclarator.Names.Count = 1 AndAlso HasAsNewClause(variableDeclarator) End Function Private Shared Function HasMultiAsNewInitializer(variableDeclarator As VariableDeclaratorSyntax) As Boolean Return variableDeclarator.Names.Count > 1 AndAlso HasAsNewClause(variableDeclarator) End Function Private Shared Function HasAsNewClause(variableDeclarator As VariableDeclaratorSyntax) As Boolean Return variableDeclarator.AsClause IsNot Nothing AndAlso variableDeclarator.AsClause.IsKind(SyntaxKind.AsNewClause) End Function Private Shared Function HasAsNewClause(propertyStatement As PropertyStatementSyntax) As Boolean Return propertyStatement.AsClause IsNot Nothing AndAlso propertyStatement.AsClause.IsKind(SyntaxKind.AsNewClause) End Function ''' <returns> ''' Methods, operators, constructors, property and event accessors: ''' - We need to return the entire block declaration since the Begin and End statements are covered by breakpoint spans. ''' Field declarations in form of "Dim a, b, c As New C()" ''' - Breakpoint spans cover "a", "b" and "c" and also "New C()" since the expression may contain lambdas. ''' For simplicity we don't allow moving the new expression independently of the field name. ''' Field declarations with array initializers "Dim a(n), b(n) As Integer" ''' - Breakpoint spans cover "a(n)" and "b(n)". ''' </returns> Friend Overrides Function TryGetActiveTokens(node As SyntaxNode) As IEnumerable(Of SyntaxToken) Select Case node.Kind Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.ConstructorBlock, SyntaxKind.OperatorBlock, SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock ' the body is the Statements list of the block Return node.DescendantTokens() Case SyntaxKind.PropertyStatement ' Property: Attributes Modifiers [|Identifier AsClause Initializer|] ImplementsClause Dim propertyStatement = DirectCast(node, PropertyStatementSyntax) If propertyStatement.Initializer IsNot Nothing Then Return {propertyStatement.Identifier}.Concat(propertyStatement.AsClause.DescendantTokens()).Concat(propertyStatement.Initializer.DescendantTokens()) End If If HasAsNewClause(propertyStatement) Then Return {propertyStatement.Identifier}.Concat(propertyStatement.AsClause.DescendantTokens()) End If Return Nothing Case SyntaxKind.VariableDeclarator If Not node.Parent.IsKind(SyntaxKind.FieldDeclaration) Then Return Nothing End If ' Field: Attributes Modifiers Declarators Dim fieldDeclaration = DirectCast(node.Parent, FieldDeclarationSyntax) If fieldDeclaration.Modifiers.Any(SyntaxKind.ConstKeyword) Then Return Nothing End If ' Dim a = initializer Dim variableDeclarator = DirectCast(node, VariableDeclaratorSyntax) If variableDeclarator.Initializer IsNot Nothing Then Return variableDeclarator.DescendantTokens() End If ' Dim a As New C() If HasSimpleAsNewInitializer(variableDeclarator) Then Return variableDeclarator.DescendantTokens() End If Return Nothing Case SyntaxKind.ModifiedIdentifier If Not node.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration) Then Return Nothing End If ' Dim a, b As New C() Dim variableDeclarator = DirectCast(node.Parent, VariableDeclaratorSyntax) If HasMultiAsNewInitializer(variableDeclarator) Then Return node.DescendantTokens().Concat(DirectCast(variableDeclarator.AsClause, AsNewClauseSyntax).NewExpression.DescendantTokens()) End If ' Dim a(n) ' Dim a(n), b(n) As Integer Dim modifiedIdentifier = DirectCast(node, ModifiedIdentifierSyntax) If modifiedIdentifier.ArrayBounds IsNot Nothing Then Return node.DescendantTokens() End If Return Nothing Case Else Return Nothing End Select End Function Protected Overrides Function GetEncompassingAncestorImpl(bodyOrMatchRoot As SyntaxNode) As SyntaxNode ' AsNewClause is a match root for field/property As New initializer ' EqualsClause is a match root for field/property initializer If bodyOrMatchRoot.IsKind(SyntaxKind.AsNewClause) OrElse bodyOrMatchRoot.IsKind(SyntaxKind.EqualsValue) Then Debug.Assert(bodyOrMatchRoot.Parent.IsKind(SyntaxKind.VariableDeclarator) OrElse bodyOrMatchRoot.Parent.IsKind(SyntaxKind.PropertyStatement)) Return bodyOrMatchRoot.Parent End If ' ArgumentList is a match root for an array initialized field If bodyOrMatchRoot.IsKind(SyntaxKind.ArgumentList) Then Debug.Assert(bodyOrMatchRoot.Parent.IsKind(SyntaxKind.ModifiedIdentifier)) Return bodyOrMatchRoot.Parent End If ' The following active nodes are outside of the initializer body, ' we need to return a node that encompasses them. ' Dim [|a = <<Body>>|] ' Dim [|a As Integer = <<Body>>|] ' Dim [|a As <<Body>>|] ' Dim [|a|], [|b|], [|c|] As <<Body>> ' Property [|P As Integer = <<Body>>|] ' Property [|P As <<Body>>|] If bodyOrMatchRoot.Parent.IsKind(SyntaxKind.AsNewClause) OrElse bodyOrMatchRoot.Parent.IsKind(SyntaxKind.EqualsValue) Then Return bodyOrMatchRoot.Parent.Parent End If Return bodyOrMatchRoot End Function Protected Overrides Function FindStatementAndPartner(declarationBody As SyntaxNode, position As Integer, partnerDeclarationBodyOpt As SyntaxNode, <Out> ByRef partnerOpt As SyntaxNode, <Out> ByRef statementPart As Integer) As SyntaxNode SyntaxUtilities.AssertIsBody(declarationBody, allowLambda:=False) Debug.Assert(partnerDeclarationBodyOpt Is Nothing OrElse partnerDeclarationBodyOpt.RawKind = declarationBody.RawKind) ' Only field and property initializers may have an [|active statement|] starting outside of the <<body>>. ' Simple field initializers: Dim [|a = <<expr>>|] ' Dim [|a As Integer = <<expr>>|] ' Dim [|a = <<expr>>|], [|b = <<expr>>|], [|c As Integer = <<expr>>|] ' Dim [|a As <<New C>>|] ' Array initialized fields: Dim [|a<<(array bounds)>>|] As Integer ' Shared initializers: Dim [|a|], [|b|] As <<New C(Function() [|...|])>> ' Property initializers: Property [|p As Integer = <<body>>|] ' Property [|p As <<New C()>>|] If position < declarationBody.SpanStart Then If declarationBody.Parent.Parent.IsKind(SyntaxKind.PropertyStatement) Then ' Property [|p As Integer = <<body>>|] ' Property [|p As <<New C()>>|] If partnerDeclarationBodyOpt IsNot Nothing Then partnerOpt = partnerDeclarationBodyOpt.Parent.Parent End If Debug.Assert(declarationBody.Parent.Parent.IsKind(SyntaxKind.PropertyStatement)) Return declarationBody.Parent.Parent End If If declarationBody.IsKind(SyntaxKind.ArgumentList) Then ' Dim a<<ArgumentList>> As Integer If partnerDeclarationBodyOpt IsNot Nothing Then partnerOpt = partnerDeclarationBodyOpt.Parent End If Debug.Assert(declarationBody.Parent.IsKind(SyntaxKind.ModifiedIdentifier)) Return declarationBody.Parent End If If declarationBody.Parent.IsKind(SyntaxKind.AsNewClause) Then Dim variableDeclarator = DirectCast(declarationBody.Parent.Parent, VariableDeclaratorSyntax) If variableDeclarator.Names.Count > 1 Then ' Dim a, b, c As <<NewExpression>> Dim nameIndex = GetItemIndexByPosition(variableDeclarator.Names, position) If partnerDeclarationBodyOpt IsNot Nothing Then partnerOpt = DirectCast(partnerDeclarationBodyOpt.Parent.Parent, VariableDeclaratorSyntax).Names(nameIndex) End If Return variableDeclarator.Names(nameIndex) Else If partnerDeclarationBodyOpt IsNot Nothing Then partnerOpt = partnerDeclarationBodyOpt.Parent.Parent End If ' Dim a As <<NewExpression>> Return variableDeclarator End If End If Debug.Assert(declarationBody.Parent.IsKind(SyntaxKind.EqualsValue)) Debug.Assert(declarationBody.Parent.Parent.IsKind(SyntaxKind.VariableDeclarator) AndAlso declarationBody.Parent.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration)) If partnerDeclarationBodyOpt IsNot Nothing Then partnerOpt = partnerDeclarationBodyOpt.Parent.Parent End If Return declarationBody.Parent.Parent End If Debug.Assert(declarationBody.FullSpan.Contains(position)) Dim node As SyntaxNode = Nothing If partnerDeclarationBodyOpt IsNot Nothing Then SyntaxUtilities.FindLeafNodeAndPartner(declarationBody, position, partnerDeclarationBodyOpt, node, partnerOpt) Else node = declarationBody.FindToken(position).Parent partnerOpt = Nothing End If Debug.Assert(node IsNot Nothing) While node IsNot declarationBody AndAlso Not StatementSyntaxComparer.HasLabel(node) AndAlso Not LambdaUtilities.IsLambdaBodyStatementOrExpression(node) node = node.Parent If partnerOpt IsNot Nothing Then partnerOpt = partnerOpt.Parent End If End While ' In case of local variable declaration an active statement may start with a modified identifier. ' If it is a declaration with a simple initializer we want the resulting statement to be the declaration, ' not the identifier. If node.IsKind(SyntaxKind.ModifiedIdentifier) AndAlso node.Parent.IsKind(SyntaxKind.VariableDeclarator) AndAlso DirectCast(node.Parent, VariableDeclaratorSyntax).Names.Count = 1 Then node = node.Parent End If Return node End Function Friend Overrides Function CreateSyntaxMapForEquivalentNodes(oldRoot As SyntaxNode, newRoot As SyntaxNode) As Func(Of SyntaxNode, SyntaxNode) Debug.Assert(SyntaxFactory.AreEquivalent(oldRoot, newRoot)) Return Function(newNode) SyntaxUtilities.FindPartner(newRoot, oldRoot, newNode) End Function Friend Overrides Function IsClosureScope(node As SyntaxNode) As Boolean Return LambdaUtilities.IsClosureScope(node) End Function Protected Overrides Function FindEnclosingLambdaBody(containerOpt As SyntaxNode, node As SyntaxNode) As SyntaxNode Dim root As SyntaxNode = GetEncompassingAncestor(containerOpt) While node IsNot root Dim body As SyntaxNode = Nothing If LambdaUtilities.IsLambdaBodyStatementOrExpression(node, body) Then Return body End If node = node.Parent End While Return Nothing End Function Protected Overrides Function GetPartnerLambdaBody(oldBody As SyntaxNode, newLambda As SyntaxNode) As SyntaxNode Return LambdaUtilities.GetCorrespondingLambdaBody(oldBody, newLambda) End Function Protected Overrides Function ComputeTopLevelMatch(oldCompilationUnit As SyntaxNode, newCompilationUnit As SyntaxNode) As Match(Of SyntaxNode) Return TopSyntaxComparer.Instance.ComputeMatch(oldCompilationUnit, newCompilationUnit) End Function Protected Overrides Function ComputeBodyMatch(oldBody As SyntaxNode, newBody As SyntaxNode, knownMatches As IEnumerable(Of KeyValuePair(Of SyntaxNode, SyntaxNode))) As Match(Of SyntaxNode) SyntaxUtilities.AssertIsBody(oldBody, allowLambda:=True) SyntaxUtilities.AssertIsBody(newBody, allowLambda:=True) Debug.Assert((TypeOf oldBody.Parent Is LambdaExpressionSyntax) = (TypeOf oldBody.Parent Is LambdaExpressionSyntax)) Debug.Assert((TypeOf oldBody Is ExpressionSyntax) = (TypeOf newBody Is ExpressionSyntax)) Debug.Assert((TypeOf oldBody Is ArgumentListSyntax) = (TypeOf newBody Is ArgumentListSyntax)) If TypeOf oldBody.Parent Is LambdaExpressionSyntax Then ' The root is a single/multi line sub/function lambda. Return New StatementSyntaxComparer(oldBody.Parent, oldBody.Parent.ChildNodes(), newBody.Parent, newBody.Parent.ChildNodes(), matchingLambdas:=True). ComputeMatch(oldBody.Parent, newBody.Parent, knownMatches) End If If TypeOf oldBody Is ExpressionSyntax Then ' Dim a = <Expression> ' Dim a As <NewExpression> ' Dim a, b, c As <NewExpression> ' Queries: The root is a query clause, the body is the expression. Return New StatementSyntaxComparer(oldBody.Parent, {oldBody}, newBody.Parent, {newBody}, matchingLambdas:=False). ComputeMatch(oldBody.Parent, newBody.Parent, knownMatches) End If ' Method, accessor, operator, etc. bodies are represented by the declaring block, which is also the root. ' The body of an array initialized fields is an ArgumentListSyntax, which is the match root. Return StatementSyntaxComparer.Default.ComputeMatch(oldBody, newBody, knownMatches) End Function Protected Overrides Function TryMatchActiveStatement(oldStatement As SyntaxNode, statementPart As Integer, oldBody As SyntaxNode, newBody As SyntaxNode, <Out> ByRef newStatement As SyntaxNode) As Boolean SyntaxUtilities.AssertIsBody(oldBody, allowLambda:=True) SyntaxUtilities.AssertIsBody(newBody, allowLambda:=True) ' only statements in bodies of the same kind can be matched Debug.Assert((TypeOf oldBody Is MethodBlockBaseSyntax) = (TypeOf newBody Is MethodBlockBaseSyntax)) Debug.Assert((TypeOf oldBody Is ExpressionSyntax) = (TypeOf newBody Is ExpressionSyntax)) Debug.Assert((TypeOf oldBody Is ArgumentListSyntax) = (TypeOf newBody Is ArgumentListSyntax)) Debug.Assert((TypeOf oldBody Is LambdaHeaderSyntax) = (TypeOf newBody Is LambdaHeaderSyntax)) Debug.Assert(oldBody.Parent.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration) = newBody.Parent.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration)) Debug.Assert(oldBody.Parent.Parent.IsKind(SyntaxKind.PropertyStatement) = newBody.Parent.Parent.IsKind(SyntaxKind.PropertyStatement)) ' methods If TypeOf oldBody Is MethodBlockBaseSyntax Then newStatement = Nothing Return False End If ' lambdas If oldBody.IsKind(SyntaxKind.FunctionLambdaHeader) OrElse oldBody.IsKind(SyntaxKind.SubLambdaHeader) Then Dim oldSingleLineLambda = TryCast(oldBody.Parent, SingleLineLambdaExpressionSyntax) Dim newSingleLineLambda = TryCast(newBody.Parent, SingleLineLambdaExpressionSyntax) If oldSingleLineLambda IsNot Nothing AndAlso newSingleLineLambda IsNot Nothing AndAlso oldStatement Is oldSingleLineLambda.Body Then newStatement = newSingleLineLambda.Body Return True End If newStatement = Nothing Return False End If ' array initialized fields If newBody.IsKind(SyntaxKind.ArgumentList) Then ' the parent ModifiedIdentifier is the active statement If oldStatement Is oldBody.Parent Then newStatement = newBody.Parent Return True End If newStatement = Nothing Return False End If ' field and property initializers If TypeOf newBody Is ExpressionSyntax Then If newBody.Parent.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration) Then ' field Dim newDeclarator = DirectCast(newBody.Parent.Parent, VariableDeclaratorSyntax) Dim oldName As SyntaxToken If oldStatement.IsKind(SyntaxKind.VariableDeclarator) Then oldName = DirectCast(oldStatement, VariableDeclaratorSyntax).Names.Single.Identifier Else oldName = DirectCast(oldStatement, ModifiedIdentifierSyntax).Identifier End If For Each newName In newDeclarator.Names If SyntaxFactory.AreEquivalent(newName.Identifier, oldName) Then newStatement = newName Return True End If Next newStatement = Nothing Return False ElseIf newBody.Parent.Parent.IsKind(SyntaxKind.PropertyStatement) Then ' property If oldStatement Is oldBody.Parent.Parent Then newStatement = newBody.Parent.Parent Return True End If newStatement = newBody Return True End If End If ' queries If oldStatement Is oldBody Then newStatement = newBody Return True End If newStatement = Nothing Return False End Function #End Region #Region "Syntax And Semantic Utils" Protected Overrides Function GetSyntaxSequenceEdits(oldNodes As ImmutableArray(Of SyntaxNode), newNodes As ImmutableArray(Of SyntaxNode)) As IEnumerable(Of SequenceEdit) Return SyntaxComparer.GetSequenceEdits(oldNodes, newNodes) End Function Friend Overrides ReadOnly Property EmptyCompilationUnit As SyntaxNode Get Return SyntaxFactory.CompilationUnit() End Get End Property Friend Overrides Function ExperimentalFeaturesEnabled(tree As SyntaxTree) As Boolean ' There are no experimental features at this time. Return False End Function Protected Overrides Function StatementLabelEquals(node1 As SyntaxNode, node2 As SyntaxNode) As Boolean Return StatementSyntaxComparer.GetLabelImpl(node1) = StatementSyntaxComparer.GetLabelImpl(node2) End Function Private Shared Function GetItemIndexByPosition(Of TNode As SyntaxNode)(list As SeparatedSyntaxList(Of TNode), position As Integer) As Integer For i = list.SeparatorCount - 1 To 0 Step -1 If position > list.GetSeparator(i).SpanStart Then Return i + 1 End If Next Return 0 End Function Private Shared Function ChildrenCompiledInBody(node As SyntaxNode) As Boolean Return Not node.IsKind(SyntaxKind.MultiLineFunctionLambdaExpression) AndAlso Not node.IsKind(SyntaxKind.SingleLineFunctionLambdaExpression) AndAlso Not node.IsKind(SyntaxKind.MultiLineSubLambdaExpression) AndAlso Not node.IsKind(SyntaxKind.SingleLineSubLambdaExpression) End Function Protected Overrides Function TryGetEnclosingBreakpointSpan(root As SyntaxNode, position As Integer, <Out> ByRef span As TextSpan) As Boolean Return root.TryGetEnclosingBreakpointSpan(position, span) End Function Protected Overrides Function TryGetActiveSpan(node As SyntaxNode, statementPart As Integer, <Out> ByRef span As TextSpan) As Boolean Return node.TryGetEnclosingBreakpointSpan(node.SpanStart, span) End Function Protected Overrides Iterator Function EnumerateNearStatements(statement As SyntaxNode) As IEnumerable(Of KeyValuePair(Of SyntaxNode, Integer)) Dim direction As Integer = +1 Dim nodeOrToken As SyntaxNodeOrToken = statement Dim propertyOrFieldModifiers As SyntaxTokenList? = GetFieldOrPropertyModifiers(statement) While True ' If the current statement is the last statement of if-block or try-block statements ' pretend there are no siblings following it. Dim lastBlockStatement As SyntaxNode = Nothing If nodeOrToken.Parent IsNot Nothing Then If nodeOrToken.Parent.IsKind(SyntaxKind.MultiLineIfBlock) Then lastBlockStatement = DirectCast(nodeOrToken.Parent, MultiLineIfBlockSyntax).Statements.LastOrDefault() ElseIf nodeOrToken.Parent.IsKind(SyntaxKind.SingleLineIfStatement) Then lastBlockStatement = DirectCast(nodeOrToken.Parent, SingleLineIfStatementSyntax).Statements.LastOrDefault() ElseIf nodeOrToken.Parent.IsKind(SyntaxKind.TryBlock) Then lastBlockStatement = DirectCast(nodeOrToken.Parent, TryBlockSyntax).Statements.LastOrDefault() End If End If If direction > 0 Then If lastBlockStatement IsNot Nothing AndAlso nodeOrToken.AsNode() Is lastBlockStatement Then nodeOrToken = Nothing Else nodeOrToken = nodeOrToken.GetNextSibling() End If Else nodeOrToken = nodeOrToken.GetPreviousSibling() If lastBlockStatement IsNot Nothing AndAlso nodeOrToken.AsNode() Is lastBlockStatement Then nodeOrToken = Nothing End If End If If nodeOrToken.RawKind = 0 Then Dim parent = statement.Parent If parent Is Nothing Then Return End If If direction > 0 Then nodeOrToken = statement direction = -1 Continue While End If If propertyOrFieldModifiers.HasValue Then Yield KeyValuePair.Create(statement, -1) End If nodeOrToken = parent statement = parent propertyOrFieldModifiers = GetFieldOrPropertyModifiers(statement) direction = +1 End If Dim node = nodeOrToken.AsNode() If node Is Nothing Then Continue While End If If propertyOrFieldModifiers.HasValue Then Dim nodeModifiers = GetFieldOrPropertyModifiers(node) If Not nodeModifiers.HasValue OrElse propertyOrFieldModifiers.Value.Any(SyntaxKind.SharedKeyword) <> nodeModifiers.Value.Any(SyntaxKind.SharedKeyword) Then Continue While End If End If Yield KeyValuePair.Create(node, 0) End While End Function Private Shared Function GetFieldOrPropertyModifiers(node As SyntaxNode) As SyntaxTokenList? If node.IsKind(SyntaxKind.FieldDeclaration) Then Return DirectCast(node, FieldDeclarationSyntax).Modifiers ElseIf node.IsKind(SyntaxKind.PropertyStatement) Then Return DirectCast(node, PropertyStatementSyntax).Modifiers Else Return Nothing End If End Function Protected Overrides Function AreEquivalentActiveStatements(oldStatement As SyntaxNode, newStatement As SyntaxNode, statementPart As Integer) As Boolean If oldStatement.RawKind <> newStatement.RawKind Then Return False End If ' Dim a,b,c As <NewExpression> ' We need to check the actual initializer expression in addition to the identifier. If HasMultiInitializer(oldStatement) Then Return SyntaxFactory.AreEquivalent(oldStatement, newStatement) AndAlso SyntaxFactory.AreEquivalent(DirectCast(oldStatement.Parent, VariableDeclaratorSyntax).AsClause, DirectCast(newStatement.Parent, VariableDeclaratorSyntax).AsClause) End If Select Case oldStatement.Kind Case SyntaxKind.SubNewStatement, SyntaxKind.SubStatement, SyntaxKind.SubNewStatement, SyntaxKind.FunctionStatement, SyntaxKind.OperatorStatement, SyntaxKind.GetAccessorStatement, SyntaxKind.SetAccessorStatement, SyntaxKind.AddHandlerAccessorStatement, SyntaxKind.RemoveHandlerAccessorStatement, SyntaxKind.RaiseEventAccessorStatement ' Header statements are nops. Changes in the header statements are changes in top-level surface ' which should not be reported as active statement rude edits. Return True Case Else Return SyntaxFactory.AreEquivalent(oldStatement, newStatement) End Select End Function Private Shared Function HasMultiInitializer(modifiedIdentifier As SyntaxNode) As Boolean Return modifiedIdentifier.Parent.IsKind(SyntaxKind.VariableDeclarator) AndAlso DirectCast(modifiedIdentifier.Parent, VariableDeclaratorSyntax).Names.Count > 1 End Function Friend Overrides Function IsMethod(declaration As SyntaxNode) As Boolean Return SyntaxUtilities.IsMethod(declaration) End Function Friend Overrides Function TryGetContainingTypeDeclaration(memberDeclaration As SyntaxNode) As SyntaxNode Return memberDeclaration.Parent.FirstAncestorOrSelf(Of TypeBlockSyntax)() End Function Friend Overrides Function HasBackingField(propertyDeclaration As SyntaxNode) As Boolean Return SyntaxUtilities.HasBackingField(propertyDeclaration) End Function Friend Overrides Function HasInitializer(declaration As SyntaxNode, <Out> ByRef isStatic As Boolean) As Boolean Select Case declaration.Kind Case SyntaxKind.VariableDeclarator Dim declarator = DirectCast(declaration, VariableDeclaratorSyntax) isStatic = IsDeclarationStatic(declarator) Return GetInitializerExpression(declarator.Initializer, declarator.AsClause) IsNot Nothing Case SyntaxKind.ModifiedIdentifier Debug.Assert(declaration.Parent.IsKind(SyntaxKind.VariableDeclarator) OrElse declaration.Parent.IsKind(SyntaxKind.Parameter)) If Not declaration.Parent.IsKind(SyntaxKind.VariableDeclarator) Then isStatic = False Return False End If Dim declarator = DirectCast(declaration.Parent, VariableDeclaratorSyntax) isStatic = IsDeclarationStatic(declarator) Dim identitifer = DirectCast(declaration, ModifiedIdentifierSyntax) Return identitifer.ArrayBounds IsNot Nothing OrElse GetInitializerExpression(declarator.Initializer, declarator.AsClause) IsNot Nothing Case SyntaxKind.PropertyStatement Dim propertyStatement = DirectCast(declaration, PropertyStatementSyntax) isStatic = IsDeclarationStatic(propertyStatement.Modifiers, propertyStatement) Return GetInitializerExpression(propertyStatement.Initializer, propertyStatement.AsClause) IsNot Nothing Case Else isStatic = False Return False End Select End Function Private Shared Function IsDeclarationStatic(declarator As VariableDeclaratorSyntax) As Boolean Dim fieldDeclaration = DirectCast(declarator.Parent, FieldDeclarationSyntax) Return IsDeclarationStatic(fieldDeclaration.Modifiers, fieldDeclaration) End Function Private Shared Function IsDeclarationStatic(modifiers As SyntaxTokenList, declaration As DeclarationStatementSyntax) As Boolean Return modifiers.Any(SyntaxKind.SharedKeyword) OrElse declaration.Parent.IsKind(SyntaxKind.ModuleBlock) End Function Private Shared Function GetInitializerExpression(equalsValue As EqualsValueSyntax, asClause As AsClauseSyntax) As ExpressionSyntax If equalsValue IsNot Nothing Then Return equalsValue.Value End If If asClause IsNot Nothing AndAlso asClause.IsKind(SyntaxKind.AsNewClause) Then Return DirectCast(asClause, AsNewClauseSyntax).NewExpression End If Return Nothing End Function Friend Overrides Function IncludesInitializers(constructorDeclaration As SyntaxNode) As Boolean ' Constructor includes field initializers if the first statement ' isn 't a call to another constructor of the declaring class. Debug.Assert(constructorDeclaration.IsKind(SyntaxKind.SubNewStatement)) Dim ctor = DirectCast(constructorDeclaration.Parent, ConstructorBlockSyntax) If ctor.Statements.Count = 0 Then Return True End If Dim firstStatement = ctor.Statements.First If Not firstStatement.IsKind(SyntaxKind.ExpressionStatement) Then Return True End If Dim expressionStatement = DirectCast(firstStatement, ExpressionStatementSyntax) If Not expressionStatement.Expression.IsKind(SyntaxKind.InvocationExpression) Then Return True End If Dim invocation = DirectCast(expressionStatement.Expression, InvocationExpressionSyntax) If Not invocation.Expression.IsKind(SyntaxKind.SimpleMemberAccessExpression) Then Return True End If Dim memberAccess = DirectCast(invocation.Expression, MemberAccessExpressionSyntax) If Not memberAccess.Name.IsKind(SyntaxKind.IdentifierName) OrElse Not memberAccess.Name.Identifier.IsKind(SyntaxKind.IdentifierToken) Then Return True End If ' Note that ValueText returns "New" for both New and [New] If Not String.Equals(memberAccess.Name.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) Then Return True End If Return memberAccess.Expression.IsKind(SyntaxKind.MyBaseKeyword) End Function Friend Overrides Function IsPartial(type As INamedTypeSymbol) As Boolean Dim syntaxRefs = type.DeclaringSyntaxReferences Return syntaxRefs.Length > 1 OrElse DirectCast(syntaxRefs.Single().GetSyntax(), TypeStatementSyntax).Modifiers.Any(SyntaxKind.PartialKeyword) End Function Protected Overrides Function GetSymbolForEdit(model As SemanticModel, node As SyntaxNode, editKind As EditKind, editMap As Dictionary(Of SyntaxNode, EditKind), cancellationToken As CancellationToken) As ISymbol ' Avoid duplicate semantic edits - don't return symbols for statements within blocks. Select Case node.Kind() Case SyntaxKind.OperatorStatement, SyntaxKind.SubNewStatement, SyntaxKind.SetAccessorStatement, SyntaxKind.GetAccessorStatement, SyntaxKind.AddHandlerAccessorStatement, SyntaxKind.RemoveHandlerAccessorStatement, SyntaxKind.RaiseEventAccessorStatement, SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement, SyntaxKind.ClassStatement, SyntaxKind.StructureStatement, SyntaxKind.InterfaceStatement, SyntaxKind.ModuleStatement, SyntaxKind.EnumStatement, SyntaxKind.NamespaceStatement Return Nothing Case SyntaxKind.EventStatement If node.Parent.IsKind(SyntaxKind.EventBlock) Then Return Nothing End If Case SyntaxKind.PropertyStatement ' autoprop or interface property If node.Parent.IsKind(SyntaxKind.PropertyBlock) Then Return Nothing End If Case SyntaxKind.SubStatement ' interface method If node.Parent.IsKind(SyntaxKind.SubBlock) Then Return Nothing End If Case SyntaxKind.FunctionStatement ' interface method If node.Parent.IsKind(SyntaxKind.FunctionBlock) Then Return Nothing End If Case SyntaxKind.Parameter Return Nothing Case SyntaxKind.ModifiedIdentifier If node.Parent.IsKind(SyntaxKind.Parameter) Then Return Nothing End If End Select Return model.GetDeclaredSymbol(node, cancellationToken) End Function Friend Overrides Function ContainsLambda(declaration As SyntaxNode) As Boolean Return declaration.DescendantNodes().Any(AddressOf LambdaUtilities.IsLambda) End Function Friend Overrides Function IsLambda(node As SyntaxNode) As Boolean Return LambdaUtilities.IsLambda(node) End Function Friend Overrides Function IsLambdaExpression(node As SyntaxNode) As Boolean Return TypeOf node Is LambdaExpressionSyntax End Function Friend Overrides Function TryGetLambdaBodies(node As SyntaxNode, ByRef body1 As SyntaxNode, ByRef body2 As SyntaxNode) As Boolean Return LambdaUtilities.TryGetLambdaBodies(node, body1, body2) End Function Friend Overrides Function GetLambda(lambdaBody As SyntaxNode) As SyntaxNode Return LambdaUtilities.GetLambda(lambdaBody) End Function Protected Overrides Function GetLambdaBodyExpressionsAndStatements(lambdaBody As SyntaxNode) As IEnumerable(Of SyntaxNode) Return LambdaUtilities.GetLambdaBodyExpressionsAndStatements(lambdaBody) End Function Friend Overrides Function GetLambdaExpressionSymbol(model As SemanticModel, lambdaExpression As SyntaxNode, cancellationToken As CancellationToken) As IMethodSymbol Dim lambdaExpressionSyntax = DirectCast(lambdaExpression, LambdaExpressionSyntax) ' The semantic model only returns the lambda symbol for positions that are within the body of the lambda (not the header) Return DirectCast(model.GetEnclosingSymbol(lambdaExpressionSyntax.SubOrFunctionHeader.Span.End, cancellationToken), IMethodSymbol) End Function Friend Overrides Function GetContainingQueryExpression(node As SyntaxNode) As SyntaxNode Return node.FirstAncestorOrSelf(Of QueryExpressionSyntax) End Function Friend Overrides Function QueryClauseLambdasTypeEquivalent(oldModel As SemanticModel, oldNode As SyntaxNode, newModel As SemanticModel, newNode As SyntaxNode, cancellationToken As CancellationToken) As Boolean Select Case oldNode.Kind Case SyntaxKind.AggregateClause Dim oldInfo = oldModel.GetAggregateClauseSymbolInfo(DirectCast(oldNode, AggregateClauseSyntax), cancellationToken) Dim newInfo = newModel.GetAggregateClauseSymbolInfo(DirectCast(newNode, AggregateClauseSyntax), cancellationToken) Return MemberSignaturesEquivalent(oldInfo.Select1.Symbol, newInfo.Select1.Symbol) AndAlso MemberSignaturesEquivalent(oldInfo.Select2.Symbol, newInfo.Select2.Symbol) Case SyntaxKind.CollectionRangeVariable Dim oldInfo = oldModel.GetCollectionRangeVariableSymbolInfo(DirectCast(oldNode, CollectionRangeVariableSyntax), cancellationToken) Dim newInfo = newModel.GetCollectionRangeVariableSymbolInfo(DirectCast(newNode, CollectionRangeVariableSyntax), cancellationToken) Return MemberSignaturesEquivalent(oldInfo.AsClauseConversion.Symbol, newInfo.AsClauseConversion.Symbol) AndAlso MemberSignaturesEquivalent(oldInfo.SelectMany.Symbol, newInfo.SelectMany.Symbol) AndAlso MemberSignaturesEquivalent(oldInfo.ToQueryableCollectionConversion.Symbol, newInfo.ToQueryableCollectionConversion.Symbol) Case SyntaxKind.FunctionAggregation Dim oldInfo = oldModel.GetSymbolInfo(DirectCast(oldNode, FunctionAggregationSyntax), cancellationToken) Dim newInfo = newModel.GetSymbolInfo(DirectCast(newNode, FunctionAggregationSyntax), cancellationToken) Return MemberSignaturesEquivalent(oldInfo.Symbol, newInfo.Symbol) Case SyntaxKind.ExpressionRangeVariable Dim oldInfo = oldModel.GetSymbolInfo(DirectCast(oldNode, ExpressionRangeVariableSyntax), cancellationToken) Dim newInfo = newModel.GetSymbolInfo(DirectCast(newNode, ExpressionRangeVariableSyntax), cancellationToken) Return MemberSignaturesEquivalent(oldInfo.Symbol, newInfo.Symbol) Case SyntaxKind.AscendingOrdering, SyntaxKind.DescendingOrdering Dim oldInfo = oldModel.GetSymbolInfo(DirectCast(oldNode, OrderingSyntax), cancellationToken) Dim newInfo = newModel.GetSymbolInfo(DirectCast(newNode, OrderingSyntax), cancellationToken) Return MemberSignaturesEquivalent(oldInfo.Symbol, newInfo.Symbol) Case SyntaxKind.FromClause, SyntaxKind.WhereClause, SyntaxKind.SkipClause, SyntaxKind.TakeClause, SyntaxKind.SkipWhileClause, SyntaxKind.TakeWhileClause, SyntaxKind.GroupByClause, SyntaxKind.SimpleJoinClause, SyntaxKind.GroupJoinClause, SyntaxKind.SelectClause Dim oldInfo = oldModel.GetSymbolInfo(DirectCast(oldNode, QueryClauseSyntax), cancellationToken) Dim newInfo = newModel.GetSymbolInfo(DirectCast(newNode, QueryClauseSyntax), cancellationToken) Return MemberSignaturesEquivalent(oldInfo.Symbol, newInfo.Symbol) Case Else Return True End Select End Function #End Region #Region "Diagnostic Info" Protected Overrides ReadOnly Property ErrorDisplayFormat As SymbolDisplayFormat Get Return SymbolDisplayFormat.VisualBasicShortErrorMessageFormat End Get End Property Protected Overrides Function GetDiagnosticSpan(node As SyntaxNode, editKind As EditKind) As TextSpan Return GetDiagnosticSpanImpl(node, editKind) End Function Private Shared Function GetDiagnosticSpanImpl(node As SyntaxNode, editKind As EditKind) As TextSpan Return GetDiagnosticSpanImpl(node.Kind, node, editKind) End Function ' internal for testing; kind is passed explicitly for testing as well Friend Shared Function GetDiagnosticSpanImpl(kind As SyntaxKind, node As SyntaxNode, editKind As EditKind) As TextSpan Select Case kind Case SyntaxKind.CompilationUnit Return Nothing Case SyntaxKind.OptionStatement, SyntaxKind.ImportsStatement Return node.Span Case SyntaxKind.NamespaceBlock Return GetDiagnosticSpan(DirectCast(node, NamespaceBlockSyntax).NamespaceStatement) Case SyntaxKind.NamespaceStatement Return GetDiagnosticSpan(DirectCast(node, NamespaceStatementSyntax)) Case SyntaxKind.ClassBlock, SyntaxKind.StructureBlock, SyntaxKind.InterfaceBlock, SyntaxKind.ModuleBlock Return GetDiagnosticSpan(DirectCast(node, TypeBlockSyntax).BlockStatement) Case SyntaxKind.ClassStatement, SyntaxKind.StructureStatement, SyntaxKind.InterfaceStatement, SyntaxKind.ModuleStatement Return GetDiagnosticSpan(DirectCast(node, TypeStatementSyntax)) Case SyntaxKind.EnumBlock Return GetDiagnosticSpanImpl(DirectCast(node, EnumBlockSyntax).EnumStatement, editKind) Case SyntaxKind.EnumStatement Dim enumStatement = DirectCast(node, EnumStatementSyntax) Return GetDiagnosticSpan(enumStatement.Modifiers, enumStatement.EnumKeyword, enumStatement.Identifier) Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.OperatorBlock, SyntaxKind.ConstructorBlock, SyntaxKind.EventBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.GetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock Return GetDiagnosticSpan(DirectCast(node, MethodBlockBaseSyntax).BlockStatement) Case SyntaxKind.SubStatement, SyntaxKind.FunctionStatement, SyntaxKind.OperatorStatement, SyntaxKind.SubNewStatement, SyntaxKind.EventStatement, SyntaxKind.SetAccessorStatement, SyntaxKind.GetAccessorStatement, SyntaxKind.AddHandlerAccessorStatement, SyntaxKind.RemoveHandlerAccessorStatement, SyntaxKind.RaiseEventAccessorStatement, SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement, SyntaxKind.DelegateSubStatement, SyntaxKind.DelegateFunctionStatement Return GetDiagnosticSpan(DirectCast(node, MethodBaseSyntax)) Case SyntaxKind.PropertyBlock Return GetDiagnosticSpan(DirectCast(node, PropertyBlockSyntax).PropertyStatement) Case SyntaxKind.PropertyStatement Return GetDiagnosticSpan(DirectCast(node, PropertyStatementSyntax)) Case SyntaxKind.FieldDeclaration Dim fieldDeclaration = DirectCast(node, FieldDeclarationSyntax) Return GetDiagnosticSpan(fieldDeclaration.Modifiers, fieldDeclaration.Declarators.First, fieldDeclaration.Declarators.Last) Case SyntaxKind.VariableDeclarator, SyntaxKind.ModifiedIdentifier, SyntaxKind.EnumMemberDeclaration, SyntaxKind.TypeParameterSingleConstraintClause, SyntaxKind.TypeParameterMultipleConstraintClause, SyntaxKind.ClassConstraint, SyntaxKind.StructureConstraint, SyntaxKind.NewConstraint, SyntaxKind.TypeConstraint Return node.Span Case SyntaxKind.TypeParameter Return DirectCast(node, TypeParameterSyntax).Identifier.Span Case SyntaxKind.TypeParameterList, SyntaxKind.ParameterList, SyntaxKind.AttributeList, SyntaxKind.SimpleAsClause If editKind = EditKind.Delete Then Return GetDiagnosticSpanImpl(node.Parent, editKind) Else Return node.Span End If Case SyntaxKind.AttributesStatement, SyntaxKind.Attribute Return node.Span Case SyntaxKind.Parameter Dim parameter = DirectCast(node, ParameterSyntax) Return GetDiagnosticSpan(parameter.Modifiers, parameter.Identifier, parameter) Case SyntaxKind.MultiLineFunctionLambdaExpression, SyntaxKind.SingleLineFunctionLambdaExpression, SyntaxKind.MultiLineSubLambdaExpression, SyntaxKind.SingleLineSubLambdaExpression Return GetDiagnosticSpan(DirectCast(node, LambdaExpressionSyntax).SubOrFunctionHeader) Case SyntaxKind.MultiLineIfBlock Dim ifStatement = DirectCast(node, MultiLineIfBlockSyntax).IfStatement Return GetDiagnosticSpan(ifStatement.IfKeyword, ifStatement.Condition, ifStatement.ThenKeyword) Case SyntaxKind.ElseIfBlock Dim elseIfStatement = DirectCast(node, ElseIfBlockSyntax).ElseIfStatement Return GetDiagnosticSpan(elseIfStatement.ElseIfKeyword, elseIfStatement.Condition, elseIfStatement.ThenKeyword) Case SyntaxKind.SingleLineIfStatement Dim ifStatement = DirectCast(node, SingleLineIfStatementSyntax) Return GetDiagnosticSpan(ifStatement.IfKeyword, ifStatement.Condition, ifStatement.ThenKeyword) Case SyntaxKind.SingleLineElseClause Return DirectCast(node, SingleLineElseClauseSyntax).ElseKeyword.Span Case SyntaxKind.TryBlock Return DirectCast(node, TryBlockSyntax).TryStatement.TryKeyword.Span Case SyntaxKind.CatchBlock Return DirectCast(node, CatchBlockSyntax).CatchStatement.CatchKeyword.Span Case SyntaxKind.FinallyBlock Return DirectCast(node, FinallyBlockSyntax).FinallyStatement.FinallyKeyword.Span Case SyntaxKind.SyncLockBlock Return DirectCast(node, SyncLockBlockSyntax).SyncLockStatement.Span Case SyntaxKind.WithBlock Return DirectCast(node, WithBlockSyntax).WithStatement.Span Case SyntaxKind.UsingBlock Return DirectCast(node, UsingBlockSyntax).UsingStatement.Span Case SyntaxKind.SimpleDoLoopBlock, SyntaxKind.DoWhileLoopBlock, SyntaxKind.DoUntilLoopBlock, SyntaxKind.DoLoopWhileBlock, SyntaxKind.DoLoopUntilBlock Return DirectCast(node, DoLoopBlockSyntax).DoStatement.Span Case SyntaxKind.WhileBlock Return DirectCast(node, WhileBlockSyntax).WhileStatement.Span Case SyntaxKind.ForEachBlock, SyntaxKind.ForBlock Return DirectCast(node, ForOrForEachBlockSyntax).ForOrForEachStatement.Span Case SyntaxKind.AwaitExpression Return DirectCast(node, AwaitExpressionSyntax).AwaitKeyword.Span Case SyntaxKind.AnonymousObjectCreationExpression Dim newWith = DirectCast(node, AnonymousObjectCreationExpressionSyntax) Return TextSpan.FromBounds(newWith.NewKeyword.Span.Start, newWith.Initializer.WithKeyword.Span.End) Case SyntaxKind.SingleLineFunctionLambdaExpression, SyntaxKind.SingleLineSubLambdaExpression, SyntaxKind.MultiLineFunctionLambdaExpression, SyntaxKind.MultiLineSubLambdaExpression Return DirectCast(node, LambdaExpressionSyntax).SubOrFunctionHeader.Span Case SyntaxKind.QueryExpression Return GetDiagnosticSpanImpl(DirectCast(node, QueryExpressionSyntax).Clauses.First(), editKind) Case SyntaxKind.WhereClause Return DirectCast(node, WhereClauseSyntax).WhereKeyword.Span Case SyntaxKind.SelectClause Return DirectCast(node, SelectClauseSyntax).SelectKeyword.Span Case SyntaxKind.FromClause Return DirectCast(node, FromClauseSyntax).FromKeyword.Span Case SyntaxKind.AggregateClause Return DirectCast(node, AggregateClauseSyntax).AggregateKeyword.Span Case SyntaxKind.LetClause Return DirectCast(node, LetClauseSyntax).LetKeyword.Span Case SyntaxKind.SimpleJoinClause Return DirectCast(node, SimpleJoinClauseSyntax).JoinKeyword.Span Case SyntaxKind.GroupJoinClause Dim groupJoin = DirectCast(node, GroupJoinClauseSyntax) Return TextSpan.FromBounds(groupJoin.GroupKeyword.SpanStart, groupJoin.JoinKeyword.Span.End) Case SyntaxKind.GroupByClause Return DirectCast(node, GroupByClauseSyntax).GroupKeyword.Span Case SyntaxKind.FunctionAggregation Return node.Span Case SyntaxKind.CollectionRangeVariable, SyntaxKind.ExpressionRangeVariable Return GetDiagnosticSpanImpl(node.Parent, editKind) Case SyntaxKind.TakeWhileClause, SyntaxKind.SkipWhileClause Dim partition = DirectCast(node, PartitionWhileClauseSyntax) Return TextSpan.FromBounds(partition.SkipOrTakeKeyword.SpanStart, partition.WhileKeyword.Span.End) Case SyntaxKind.AscendingOrdering, SyntaxKind.DescendingOrdering Return node.Span Case SyntaxKind.JoinCondition Return DirectCast(node, JoinConditionSyntax).EqualsKeyword.Span Case Else Return node.Span End Select End Function Private Overloads Shared Function GetDiagnosticSpan(ifKeyword As SyntaxToken, condition As SyntaxNode, thenKeywordOpt As SyntaxToken) As TextSpan Return TextSpan.FromBounds(ifKeyword.Span.Start, If(thenKeywordOpt.RawKind <> 0, thenKeywordOpt.Span.End, condition.Span.End)) End Function Private Overloads Shared Function GetDiagnosticSpan(node As NamespaceStatementSyntax) As TextSpan Return TextSpan.FromBounds(node.NamespaceKeyword.SpanStart, node.Name.Span.End) End Function Private Overloads Shared Function GetDiagnosticSpan(node As TypeStatementSyntax) As TextSpan Return GetDiagnosticSpan(node.Modifiers, node.DeclarationKeyword, If(node.TypeParameterList, CType(node.Identifier, SyntaxNodeOrToken))) End Function Private Overloads Shared Function GetDiagnosticSpan(modifiers As SyntaxTokenList, start As SyntaxNodeOrToken, endNode As SyntaxNodeOrToken) As TextSpan Return TextSpan.FromBounds(If(modifiers.Count <> 0, modifiers.First.SpanStart, start.SpanStart), endNode.Span.End) End Function Private Overloads Shared Function GetDiagnosticSpan(header As MethodBaseSyntax) As TextSpan Dim startToken As SyntaxToken Dim endToken As SyntaxToken If header.Modifiers.Count > 0 Then startToken = header.Modifiers.First Else Select Case header.Kind Case SyntaxKind.DelegateFunctionStatement, SyntaxKind.DelegateSubStatement startToken = DirectCast(header, DelegateStatementSyntax).DelegateKeyword Case SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement startToken = DirectCast(header, DeclareStatementSyntax).DeclareKeyword Case Else startToken = header.DeclarationKeyword End Select End If If header.ParameterList IsNot Nothing Then endToken = header.ParameterList.CloseParenToken Else Select Case header.Kind Case SyntaxKind.SubStatement, SyntaxKind.FunctionStatement endToken = DirectCast(header, MethodStatementSyntax).Identifier Case SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement endToken = DirectCast(header, DeclareStatementSyntax).LibraryName.Token Case SyntaxKind.OperatorStatement endToken = DirectCast(header, OperatorStatementSyntax).OperatorToken Case SyntaxKind.SubNewStatement endToken = DirectCast(header, SubNewStatementSyntax).NewKeyword Case SyntaxKind.PropertyStatement endToken = DirectCast(header, PropertyStatementSyntax).Identifier Case SyntaxKind.EventStatement endToken = DirectCast(header, EventStatementSyntax).Identifier Case SyntaxKind.DelegateFunctionStatement, SyntaxKind.DelegateSubStatement endToken = DirectCast(header, DelegateStatementSyntax).Identifier Case SyntaxKind.SetAccessorStatement, SyntaxKind.GetAccessorStatement, SyntaxKind.AddHandlerAccessorStatement, SyntaxKind.RemoveHandlerAccessorStatement, SyntaxKind.RaiseEventAccessorStatement endToken = header.DeclarationKeyword Case Else Throw ExceptionUtilities.Unreachable End Select End If Return TextSpan.FromBounds(startToken.SpanStart, endToken.Span.End) End Function Private Overloads Shared Function GetDiagnosticSpan(lambda As LambdaHeaderSyntax) As TextSpan Dim startToken = If(lambda.Modifiers.Count <> 0, lambda.Modifiers.First, lambda.DeclarationKeyword) Dim endToken As SyntaxToken If lambda.ParameterList IsNot Nothing Then endToken = lambda.ParameterList.CloseParenToken Else endToken = lambda.DeclarationKeyword End If Return TextSpan.FromBounds(startToken.SpanStart, endToken.Span.End) End Function Protected Overrides Function GetTopLevelDisplayName(node As SyntaxNode, editKind As EditKind) As String Return GetTopLevelDisplayNameImpl(node) End Function Protected Overrides Function GetStatementDisplayName(node As SyntaxNode, editKind As EditKind) As String Return GetStatementDisplayNameImpl(node, editKind) End Function Protected Overrides Function GetLambdaDisplayName(lambda As SyntaxNode) As String Return GetStatementDisplayNameImpl(lambda, EditKind.Update) End Function ' internal for testing Friend Shared Function GetTopLevelDisplayNameImpl(node As SyntaxNode) As String Select Case node.Kind Case SyntaxKind.OptionStatement Return VBFeaturesResources.OptionStatement Case SyntaxKind.ImportsStatement Return VBFeaturesResources.ImportStatement Case SyntaxKind.NamespaceBlock, SyntaxKind.NamespaceStatement Return FeaturesResources.Namespace Case SyntaxKind.ClassBlock, SyntaxKind.ClassStatement Return FeaturesResources.Class Case SyntaxKind.StructureBlock, SyntaxKind.StructureStatement Return VBFeaturesResources.StructureStatement Case SyntaxKind.InterfaceBlock, SyntaxKind.InterfaceStatement Return FeaturesResources.Interface Case SyntaxKind.ModuleBlock, SyntaxKind.ModuleStatement Return VBFeaturesResources.ModuleStatement Case SyntaxKind.EnumBlock, SyntaxKind.EnumStatement Return FeaturesResources.Enum Case SyntaxKind.DelegateSubStatement, SyntaxKind.DelegateFunctionStatement Return FeaturesResources.Delegate Case SyntaxKind.FieldDeclaration Dim declaration = DirectCast(node, FieldDeclarationSyntax) Return If(declaration.Modifiers.Any(SyntaxKind.WithEventsKeyword), VBFeaturesResources.WithEventsFieldStatement, If(declaration.Modifiers.Any(SyntaxKind.ConstKeyword), FeaturesResources.ConstField, FeaturesResources.Field)) Case SyntaxKind.VariableDeclarator, SyntaxKind.ModifiedIdentifier Return GetTopLevelDisplayNameImpl(node.Parent) Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.SubStatement, SyntaxKind.FunctionStatement, SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement Return FeaturesResources.Method Case SyntaxKind.OperatorBlock, SyntaxKind.OperatorStatement Return FeaturesResources.Operator Case SyntaxKind.ConstructorBlock, SyntaxKind.SubNewStatement Return FeaturesResources.Constructor Case SyntaxKind.PropertyBlock Return FeaturesResources.Property Case SyntaxKind.PropertyStatement Return FeaturesResources.AutoProperty Case SyntaxKind.EventBlock, SyntaxKind.EventStatement Return FeaturesResources.Event Case SyntaxKind.EnumMemberDeclaration Return FeaturesResources.EnumValue Case SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.GetAccessorStatement, SyntaxKind.SetAccessorStatement Return VBFeaturesResources.PropertyAccessor Case SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock, SyntaxKind.AddHandlerAccessorStatement, SyntaxKind.RemoveHandlerAccessorStatement, SyntaxKind.RaiseEventAccessorStatement Return FeaturesResources.EventAccessor Case SyntaxKind.TypeParameterSingleConstraintClause, SyntaxKind.TypeParameterMultipleConstraintClause, SyntaxKind.ClassConstraint, SyntaxKind.StructureConstraint, SyntaxKind.NewConstraint, SyntaxKind.TypeConstraint Return FeaturesResources.TypeConstraint Case SyntaxKind.SimpleAsClause Return VBFeaturesResources.AsClause Case SyntaxKind.TypeParameterList Return VBFeaturesResources.TypeParameterList Case SyntaxKind.TypeParameter Return FeaturesResources.TypeParameter Case SyntaxKind.ParameterList Return VBFeaturesResources.ParameterList Case SyntaxKind.Parameter Return FeaturesResources.Parameter Case SyntaxKind.AttributeList, SyntaxKind.AttributesStatement Return VBFeaturesResources.AttributeList Case SyntaxKind.Attribute Return FeaturesResources.Attribute Case Else Throw ExceptionUtilities.UnexpectedValue(node.Kind()) End Select End Function ' internal for testing Friend Shared Function GetStatementDisplayNameImpl(node As SyntaxNode, kind As EditKind) As String Select Case node.Kind Case SyntaxKind.TryBlock Return VBFeaturesResources.TryBlock Case SyntaxKind.CatchBlock Return VBFeaturesResources.CatchClause Case SyntaxKind.FinallyBlock Return VBFeaturesResources.FinallyClause Case SyntaxKind.UsingBlock Return If(kind = EditKind.Update, VBFeaturesResources.UsingStatement, VBFeaturesResources.UsingBlock) Case SyntaxKind.WithBlock Return If(kind = EditKind.Update, VBFeaturesResources.WithStatement, VBFeaturesResources.WithBlock) Case SyntaxKind.SyncLockBlock Return If(kind = EditKind.Update, VBFeaturesResources.SyncLockStatement, VBFeaturesResources.SyncLockBlock) Case SyntaxKind.ForEachBlock Return If(kind = EditKind.Update, VBFeaturesResources.ForEachStatement, VBFeaturesResources.ForEachBlock) Case SyntaxKind.OnErrorGoToMinusOneStatement, SyntaxKind.OnErrorGoToZeroStatement, SyntaxKind.OnErrorResumeNextStatement, SyntaxKind.OnErrorGoToLabelStatement Return VBFeaturesResources.OnErrorStatement Case SyntaxKind.ResumeStatement, SyntaxKind.ResumeNextStatement, SyntaxKind.ResumeLabelStatement Return VBFeaturesResources.ResumeStatement Case SyntaxKind.YieldStatement Return VBFeaturesResources.YieldStatement Case SyntaxKind.AwaitExpression Return VBFeaturesResources.AwaitExpression Case SyntaxKind.MultiLineFunctionLambdaExpression, SyntaxKind.SingleLineFunctionLambdaExpression, SyntaxKind.MultiLineSubLambdaExpression, SyntaxKind.SingleLineSubLambdaExpression Return VBFeaturesResources.LambdaExpression Case SyntaxKind.WhereClause Return VBFeaturesResources.WhereClause Case SyntaxKind.SelectClause Return VBFeaturesResources.SelectClause Case SyntaxKind.FromClause Return VBFeaturesResources.FromClause Case SyntaxKind.AggregateClause Return VBFeaturesResources.AggregateClause Case SyntaxKind.LetClause Return VBFeaturesResources.LetClause Case SyntaxKind.SimpleJoinClause Return VBFeaturesResources.SimpleJoinClause Case SyntaxKind.GroupJoinClause Return VBFeaturesResources.GroupJoinClause Case SyntaxKind.GroupByClause Return VBFeaturesResources.GroupByClause Case SyntaxKind.FunctionAggregation Return VBFeaturesResources.FunctionAggregation Case SyntaxKind.CollectionRangeVariable, SyntaxKind.ExpressionRangeVariable Return GetStatementDisplayNameImpl(node.Parent, kind) Case SyntaxKind.TakeWhileClause Return VBFeaturesResources.TakeWhileClause Case SyntaxKind.SkipWhileClause Return VBFeaturesResources.SkipWhileClause Case SyntaxKind.AscendingOrdering, SyntaxKind.DescendingOrdering Return VBFeaturesResources.OrderingClause Case SyntaxKind.JoinCondition Return VBFeaturesResources.JoinCondition Case Else Throw ExceptionUtilities.UnexpectedValue(node.Kind()) End Select End Function #End Region #Region "Top-level Syntaxtic Rude Edits" Private Structure EditClassifier Private ReadOnly _analyzer As VisualBasicEditAndContinueAnalyzer Private ReadOnly _diagnostics As List(Of RudeEditDiagnostic) Private ReadOnly _match As Match(Of SyntaxNode) Private ReadOnly _oldNode As SyntaxNode Private ReadOnly _newNode As SyntaxNode Private ReadOnly _kind As EditKind Private ReadOnly _span As TextSpan? Public Sub New(analyzer As VisualBasicEditAndContinueAnalyzer, diagnostics As List(Of RudeEditDiagnostic), oldNode As SyntaxNode, newNode As SyntaxNode, kind As EditKind, Optional match As Match(Of SyntaxNode) = Nothing, Optional span As TextSpan? = Nothing) Me._analyzer = analyzer Me._diagnostics = diagnostics Me._oldNode = oldNode Me._newNode = newNode Me._kind = kind Me._span = span Me._match = match End Sub Private Sub ReportError(kind As RudeEditKind) ReportError(kind, {GetDisplayName()}) End Sub Private Sub ReportError(kind As RudeEditKind, args As String()) _diagnostics.Add(New RudeEditDiagnostic(kind, GetSpan(), If(_newNode, _oldNode), args)) End Sub Private Sub ReportError(kind As RudeEditKind, spanNode As SyntaxNode, displayNode As SyntaxNode) _diagnostics.Add(New RudeEditDiagnostic(kind, GetDiagnosticSpanImpl(spanNode, Me._kind), displayNode, {GetTopLevelDisplayNameImpl(displayNode)})) End Sub Private Function GetSpan() As TextSpan If _span.HasValue Then Return _span.Value End If If _newNode Is Nothing Then Return _analyzer.GetDeletedNodeDiagnosticSpan(_match.Matches, _oldNode) Else Return GetDiagnosticSpanImpl(_newNode, _kind) End If End Function Private Function GetDisplayName() As String Return GetTopLevelDisplayNameImpl(If(_newNode, _oldNode)) End Function Public Sub ClassifyEdit() Select Case _kind Case EditKind.Delete ClassifyDelete(_oldNode) Return Case EditKind.Update ClassifyUpdate(_oldNode, _newNode) Return Case EditKind.Move ClassifyMove(_oldNode, _newNode) Return Case EditKind.Insert ClassifyInsert(_newNode) Return Case EditKind.Reorder ClassifyReorder(_oldNode, _newNode) Return Case Else Throw ExceptionUtilities.Unreachable End Select End Sub #Region "Move and Reorder" Private Sub ClassifyMove(oldNode As SyntaxNode, newNode As SyntaxNode) ReportError(RudeEditKind.Move) End Sub Private Sub ClassifyReorder(oldNode As SyntaxNode, newNode As SyntaxNode) Select Case newNode.Kind Case SyntaxKind.OptionStatement, SyntaxKind.ImportsStatement, SyntaxKind.AttributesStatement, SyntaxKind.NamespaceBlock, SyntaxKind.ClassBlock, SyntaxKind.StructureBlock, SyntaxKind.InterfaceBlock, SyntaxKind.ModuleBlock, SyntaxKind.EnumBlock, SyntaxKind.DelegateFunctionStatement, SyntaxKind.DelegateSubStatement, SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement, SyntaxKind.ConstructorBlock, SyntaxKind.OperatorBlock, SyntaxKind.PropertyBlock, SyntaxKind.EventBlock, SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock, SyntaxKind.ClassConstraint, SyntaxKind.StructureConstraint, SyntaxKind.NewConstraint, SyntaxKind.TypeConstraint, SyntaxKind.AttributeList, SyntaxKind.Attribute ' We'll ignore these edits. A general policy is to ignore edits that are only discoverable via reflection. Return Case SyntaxKind.SubStatement, SyntaxKind.FunctionStatement ' Interface methods. We could allow reordering of non-COM interface methods. Debug.Assert(oldNode.Parent.IsKind(SyntaxKind.InterfaceBlock) AndAlso newNode.Parent.IsKind(SyntaxKind.InterfaceBlock)) ReportError(RudeEditKind.Move) Return Case SyntaxKind.PropertyStatement, SyntaxKind.FieldDeclaration, SyntaxKind.EventStatement, SyntaxKind.VariableDeclarator ' Maybe we could allow changing order of field declarations unless the containing type layout is sequential, ' and it's not a COM interface. ReportError(RudeEditKind.Move) Return Case SyntaxKind.EnumMemberDeclaration ' To allow this change we would need to check that values of all fields of the enum ' are preserved, or make sure we can update all method bodies that accessed those that changed. ReportError(RudeEditKind.Move) Return Case SyntaxKind.TypeParameter, SyntaxKind.Parameter ReportError(RudeEditKind.Move) Return Case SyntaxKind.ModifiedIdentifier ' Identifier can only moved from one VariableDeclarator to another if both are part of ' the same declaration. We could allow these moves if the order and types of variables ' didn't change. ReportError(RudeEditKind.Move) Return Case Else Throw ExceptionUtilities.Unreachable End Select End Sub #End Region #Region "Insert" Private Sub ClassifyInsert(node As SyntaxNode) Select Case node.Kind Case SyntaxKind.OptionStatement, SyntaxKind.ImportsStatement, SyntaxKind.NamespaceBlock ReportError(RudeEditKind.Insert) Return Case SyntaxKind.ClassBlock, SyntaxKind.StructureBlock ClassifyTypeWithPossibleExternMembersInsert(DirectCast(node, TypeBlockSyntax)) Return Case SyntaxKind.InterfaceBlock ClassifyTypeInsert(DirectCast(node, TypeBlockSyntax).BlockStatement.Modifiers) Return Case SyntaxKind.EnumBlock ClassifyTypeInsert(DirectCast(node, EnumBlockSyntax).EnumStatement.Modifiers) Return Case SyntaxKind.ModuleBlock ' Modules can't be nested or private ReportError(RudeEditKind.Insert) Return Case SyntaxKind.DelegateSubStatement, SyntaxKind.DelegateFunctionStatement ClassifyTypeInsert(DirectCast(node, DelegateStatementSyntax).Modifiers) Return Case SyntaxKind.SubStatement, ' interface method SyntaxKind.FunctionStatement ' interface method ReportError(RudeEditKind.Insert) Return Case SyntaxKind.PropertyBlock ClassifyModifiedMemberInsert(DirectCast(node, PropertyBlockSyntax).PropertyStatement.Modifiers) Return Case SyntaxKind.PropertyStatement ' autoprop or interface property ' We don't need to check whether the container is an interface, since we disallow ' adding public methods And all methods in interface declarations are public. ClassifyModifiedMemberInsert(DirectCast(node, PropertyStatementSyntax).Modifiers) Return Case SyntaxKind.EventBlock ClassifyModifiedMemberInsert(DirectCast(node, EventBlockSyntax).EventStatement.Modifiers) Return Case SyntaxKind.EventStatement ClassifyModifiedMemberInsert(DirectCast(node, EventStatementSyntax).Modifiers) Return Case SyntaxKind.OperatorBlock ReportError(RudeEditKind.InsertOperator) Return Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock ClassifyMethodInsert(DirectCast(node, MethodBlockSyntax).SubOrFunctionStatement) Return Case SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement ' CLR doesn't support adding P/Invokes ReportError(RudeEditKind.Insert) Return Case SyntaxKind.ConstructorBlock If SyntaxUtilities.IsParameterlessConstructor(node) Then Return End If ClassifyModifiedMemberInsert(DirectCast(node, MethodBlockBaseSyntax).BlockStatement.Modifiers) Return Case SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock Return Case SyntaxKind.FieldDeclaration ClassifyFieldInsert(DirectCast(node, FieldDeclarationSyntax)) Return Case SyntaxKind.VariableDeclarator ' Ignore, errors will be reported for children (ModifiedIdentifier, AsClause) Return Case SyntaxKind.ModifiedIdentifier ClassifyFieldInsert(DirectCast(node, ModifiedIdentifierSyntax)) Return Case SyntaxKind.EnumMemberDeclaration, SyntaxKind.TypeParameter, SyntaxKind.StructureConstraint, SyntaxKind.TypeParameterSingleConstraintClause, SyntaxKind.TypeParameterMultipleConstraintClause, SyntaxKind.ClassConstraint, SyntaxKind.StructureConstraint, SyntaxKind.NewConstraint, SyntaxKind.TypeConstraint, SyntaxKind.TypeParameterList, SyntaxKind.Parameter, SyntaxKind.Attribute, SyntaxKind.AttributeList, SyntaxKind.AttributesStatement, SyntaxKind.SimpleAsClause ReportError(RudeEditKind.Insert) Return Case SyntaxKind.ParameterList ClassifyParameterInsert(DirectCast(node, ParameterListSyntax)) Return Case Else Throw ExceptionUtilities.UnexpectedValue(node.Kind()) End Select End Sub Private Function ClassifyModifiedMemberInsert(modifiers As SyntaxTokenList) As Boolean If modifiers.Any(SyntaxKind.OverridableKeyword) OrElse modifiers.Any(SyntaxKind.MustOverrideKeyword) OrElse modifiers.Any(SyntaxKind.OverridesKeyword) Then ReportError(RudeEditKind.InsertVirtual) Return False End If Return True End Function Private Function ClassifyTypeInsert(modifiers As SyntaxTokenList) As Boolean Return ClassifyModifiedMemberInsert(modifiers) End Function Private Sub ClassifyTypeWithPossibleExternMembersInsert(type As TypeBlockSyntax) If Not ClassifyTypeInsert(type.BlockStatement.Modifiers) Then Return End If For Each member In type.Members Dim modifiers As SyntaxTokenList = Nothing Select Case member.Kind Case SyntaxKind.DeclareFunctionStatement, SyntaxKind.DeclareSubStatement ReportError(RudeEditKind.Insert, member, member) Case SyntaxKind.PropertyStatement modifiers = DirectCast(member, PropertyStatementSyntax).Modifiers Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock modifiers = DirectCast(member, MethodBlockBaseSyntax).BlockStatement.Modifiers End Select ' TODO: DllImport/Declare? 'If (modifiers.Any(SyntaxKind.MustOverrideKeyword)) Then ' ReportError(RudeEditKind.InsertMustOverride, member, member) 'End If Next End Sub Private Sub ClassifyMethodInsert(method As MethodStatementSyntax) If method.TypeParameterList IsNot Nothing Then ReportError(RudeEditKind.InsertGenericMethod) End If If method.HandlesClause IsNot Nothing Then ReportError(RudeEditKind.InsertHandlesClause) End If ClassifyModifiedMemberInsert(method.Modifiers) End Sub Private Sub ClassifyFieldInsert(field As FieldDeclarationSyntax) ' Can't insert WithEvents field since it is effectively a virtual property. If field.Modifiers.Any(SyntaxKind.WithEventsKeyword) Then ReportError(RudeEditKind.Insert) Return End If Dim containingType = field.Parent If containingType.IsKind(SyntaxKind.ModuleBlock) Then ReportError(RudeEditKind.Insert) Return End If End Sub Private Sub ClassifyFieldInsert(fieldVariableName As ModifiedIdentifierSyntax) ClassifyFieldInsert(DirectCast(fieldVariableName.Parent.Parent, FieldDeclarationSyntax)) End Sub Private Sub ClassifyParameterInsert(parameterList As ParameterListSyntax) ' Sub M -> Sub M() is ok If parameterList.Parameters.Count = 0 Then Return End If ReportError(RudeEditKind.Insert) End Sub #End Region #Region "Delete" Private Sub ClassifyDelete(oldNode As SyntaxNode) Select Case oldNode.Kind Case SyntaxKind.OptionStatement, SyntaxKind.ImportsStatement, SyntaxKind.AttributesStatement, SyntaxKind.NamespaceBlock, SyntaxKind.ClassBlock, SyntaxKind.StructureBlock, SyntaxKind.InterfaceBlock, SyntaxKind.ModuleBlock, SyntaxKind.DelegateFunctionStatement, SyntaxKind.DelegateSubStatement, SyntaxKind.EnumBlock, SyntaxKind.FieldDeclaration, SyntaxKind.ModifiedIdentifier, SyntaxKind.SubBlock, SyntaxKind.FunctionBlock, SyntaxKind.SubStatement, SyntaxKind.FunctionStatement, SyntaxKind.OperatorBlock, SyntaxKind.PropertyBlock, SyntaxKind.PropertyStatement, SyntaxKind.EventBlock, SyntaxKind.EventStatement, SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement ' To allow removal of declarations we would need to update method bodies that ' were previously binding to them but now are binding to another symbol that was previously hidden. ReportError(RudeEditKind.Delete) Return Case SyntaxKind.ConstructorBlock ' Allow deletion of a parameterless constructor. ' Semantic analysis reports an error if the parameterless ctor isn't replaced by a default ctor. If Not SyntaxUtilities.IsParameterlessConstructor(oldNode) Then ReportError(RudeEditKind.Delete) End If Return Case SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock ' An accessor can be removed. Accessors are not hiding other symbols. ' If the new compilation still uses the removed accessor a semantic error will be reported. ' For simplicity though we disallow deletion of accessors for now. ReportError(RudeEditKind.Delete) Return Case SyntaxKind.AttributeList, SyntaxKind.Attribute ' To allow removal of attributes we would need to check if the removed attribute ' is a pseudo-custom attribute that CLR allows us to change, or if it is a compiler well-know attribute ' that affects the generated IL. ReportError(RudeEditKind.Delete) Return Case SyntaxKind.EnumMemberDeclaration ' We could allow removing enum member if it didn't affect the values of other enum members. ' If the updated compilation binds without errors it means that the enum value wasn't used. ReportError(RudeEditKind.Delete) Return Case SyntaxKind.TypeParameter, SyntaxKind.TypeParameterList, SyntaxKind.Parameter, SyntaxKind.TypeParameterSingleConstraintClause, SyntaxKind.TypeParameterMultipleConstraintClause, SyntaxKind.ClassConstraint, SyntaxKind.StructureConstraint, SyntaxKind.NewConstraint, SyntaxKind.TypeConstraint, SyntaxKind.SimpleAsClause ReportError(RudeEditKind.Delete) Return Case SyntaxKind.ParameterList ClassifyDelete(DirectCast(oldNode, ParameterListSyntax)) Case SyntaxKind.VariableDeclarator ' Ignore, errors will be reported for children (ModifiedIdentifier, AsClause) Return Case Else Throw ExceptionUtilities.Unreachable End Select End Sub Private Sub ClassifyDelete(oldNode As ParameterListSyntax) ' Sub Foo() -> Sub Foo is ok If oldNode.Parameters.Count = 0 Then Return End If ReportError(RudeEditKind.Delete) End Sub #End Region #Region "Update" Private Sub ClassifyUpdate(oldNode As SyntaxNode, newNode As SyntaxNode) Select Case newNode.Kind Case SyntaxKind.OptionStatement ReportError(RudeEditKind.Update) Return Case SyntaxKind.ImportsStatement ReportError(RudeEditKind.Update) Return Case SyntaxKind.NamespaceBlock Return Case SyntaxKind.NamespaceStatement ClassifyUpdate(DirectCast(oldNode, NamespaceStatementSyntax), DirectCast(newNode, NamespaceStatementSyntax)) Return Case SyntaxKind.ClassBlock, SyntaxKind.StructureBlock, SyntaxKind.InterfaceBlock, SyntaxKind.ModuleBlock ClassifyUpdate(DirectCast(oldNode, TypeBlockSyntax), DirectCast(newNode, TypeBlockSyntax)) Return Case SyntaxKind.ClassStatement, SyntaxKind.StructureStatement, SyntaxKind.InterfaceStatement, SyntaxKind.ModuleStatement ClassifyUpdate(DirectCast(oldNode, TypeStatementSyntax), DirectCast(newNode, TypeStatementSyntax)) Return Case SyntaxKind.EnumBlock Return Case SyntaxKind.EnumStatement ClassifyUpdate(DirectCast(oldNode, EnumStatementSyntax), DirectCast(newNode, EnumStatementSyntax)) Return Case SyntaxKind.DelegateSubStatement, SyntaxKind.DelegateFunctionStatement ClassifyUpdate(DirectCast(oldNode, DelegateStatementSyntax), DirectCast(newNode, DelegateStatementSyntax)) Return Case SyntaxKind.FieldDeclaration ClassifyUpdate(DirectCast(oldNode, FieldDeclarationSyntax), DirectCast(newNode, FieldDeclarationSyntax)) Return Case SyntaxKind.VariableDeclarator ClassifyUpdate(DirectCast(oldNode, VariableDeclaratorSyntax), DirectCast(newNode, VariableDeclaratorSyntax)) Return Case SyntaxKind.ModifiedIdentifier ClassifyUpdate(DirectCast(oldNode, ModifiedIdentifierSyntax), DirectCast(newNode, ModifiedIdentifierSyntax)) Return Case SyntaxKind.SubBlock, SyntaxKind.FunctionBlock ClassifyUpdate(DirectCast(oldNode, MethodBlockSyntax), DirectCast(newNode, MethodBlockSyntax)) Return Case SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement ClassifyUpdate(DirectCast(oldNode, DeclareStatementSyntax), DirectCast(newNode, DeclareStatementSyntax)) Return Case SyntaxKind.SubStatement, SyntaxKind.FunctionStatement ClassifyUpdate(DirectCast(oldNode, MethodStatementSyntax), DirectCast(newNode, MethodStatementSyntax)) Return Case SyntaxKind.SimpleAsClause ClassifyUpdate(DirectCast(oldNode, SimpleAsClauseSyntax), DirectCast(newNode, SimpleAsClauseSyntax)) Return Case SyntaxKind.OperatorBlock ClassifyUpdate(DirectCast(oldNode, OperatorBlockSyntax), DirectCast(newNode, OperatorBlockSyntax)) Return Case SyntaxKind.OperatorStatement ClassifyUpdate(DirectCast(oldNode, OperatorStatementSyntax), DirectCast(newNode, OperatorStatementSyntax)) Return Case SyntaxKind.ConstructorBlock ClassifyUpdate(DirectCast(oldNode, ConstructorBlockSyntax), DirectCast(newNode, ConstructorBlockSyntax)) Return Case SyntaxKind.SubNewStatement ClassifyUpdate(DirectCast(oldNode, SubNewStatementSyntax), DirectCast(newNode, SubNewStatementSyntax)) Return Case SyntaxKind.PropertyBlock Return Case SyntaxKind.PropertyStatement ClassifyUpdate(DirectCast(oldNode, PropertyStatementSyntax), DirectCast(newNode, PropertyStatementSyntax)) Return Case SyntaxKind.EventBlock Return Case SyntaxKind.EventStatement ClassifyUpdate(DirectCast(oldNode, EventStatementSyntax), DirectCast(newNode, EventStatementSyntax)) Return Case SyntaxKind.GetAccessorStatement, SyntaxKind.SetAccessorStatement, SyntaxKind.AddHandlerAccessorStatement, SyntaxKind.RemoveHandlerAccessorStatement, SyntaxKind.RaiseEventAccessorStatement Return Case SyntaxKind.GetAccessorBlock, SyntaxKind.SetAccessorBlock, SyntaxKind.AddHandlerAccessorBlock, SyntaxKind.RemoveHandlerAccessorBlock, SyntaxKind.RaiseEventAccessorBlock ClassifyUpdate(DirectCast(oldNode, AccessorBlockSyntax), DirectCast(newNode, AccessorBlockSyntax)) Return Case SyntaxKind.EnumMemberDeclaration ClassifyUpdate(DirectCast(oldNode, EnumMemberDeclarationSyntax), DirectCast(newNode, EnumMemberDeclarationSyntax)) Return Case SyntaxKind.StructureConstraint, SyntaxKind.ClassConstraint, SyntaxKind.NewConstraint ReportError(RudeEditKind.ConstraintKindUpdate, {DirectCast(oldNode, SpecialConstraintSyntax).ConstraintKeyword.ValueText, DirectCast(newNode, SpecialConstraintSyntax).ConstraintKeyword.ValueText}) Return Case SyntaxKind.TypeConstraint ReportError(RudeEditKind.TypeUpdate) Return Case SyntaxKind.TypeParameterMultipleConstraintClause, SyntaxKind.TypeParameterSingleConstraintClause Return Case SyntaxKind.TypeParameter ClassifyUpdate(DirectCast(oldNode, TypeParameterSyntax), DirectCast(newNode, TypeParameterSyntax)) Return Case SyntaxKind.Parameter ClassifyUpdate(DirectCast(oldNode, ParameterSyntax), DirectCast(newNode, ParameterSyntax)) Return Case SyntaxKind.Attribute ReportError(RudeEditKind.Update) Return Case SyntaxKind.TypeParameterList, SyntaxKind.ParameterList, SyntaxKind.AttributeList Return Case Else Throw ExceptionUtilities.Unreachable End Select End Sub Private Sub ClassifyUpdate(oldNode As NamespaceStatementSyntax, newNode As NamespaceStatementSyntax) Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.Name, newNode.Name)) ReportError(RudeEditKind.Renamed) End Sub Private Sub ClassifyUpdate(oldNode As TypeStatementSyntax, newNode As TypeStatementSyntax) If oldNode.RawKind <> newNode.RawKind Then ReportError(RudeEditKind.TypeKindUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier)) ReportError(RudeEditKind.Renamed) End Sub Private Sub ClassifyUpdate(oldNode As TypeBlockSyntax, newNode As TypeBlockSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Inherits, newNode.Inherits) OrElse Not SyntaxFactory.AreEquivalent(oldNode.Implements, newNode.Implements) Then ReportError(RudeEditKind.BaseTypeOrInterfaceUpdate) End If ' type member list separators End Sub Private Sub ClassifyUpdate(oldNode As EnumStatementSyntax, newNode As EnumStatementSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.UnderlyingType, newNode.UnderlyingType)) ReportError(RudeEditKind.EnumUnderlyingTypeUpdate) End Sub Private Sub ClassifyUpdate(oldNode As DelegateStatementSyntax, newNode As DelegateStatementSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If ' Function changed to Sub or vice versa. Note that Function doesn't need to have AsClause. If oldNode.RawKind <> newNode.RawKind Then ReportError(RudeEditKind.TypeUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.AsClause, newNode.AsClause) Then ReportError(RudeEditKind.TypeUpdate) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier)) ReportError(RudeEditKind.Renamed) End Sub Private Sub ClassifyUpdate(oldNode As FieldDeclarationSyntax, newNode As FieldDeclarationSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) End If ' VariableDeclarator separators were modified End Sub Private Sub ClassifyUpdate(oldNode As ModifiedIdentifierSyntax, newNode As ModifiedIdentifierSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If ' TODO (tomat): We could be smarter and consider the following syntax changes to be legal: ' Dim a? As Integer <-> Dim a As Integer? ' Dim a() As Integer <-> Dim a As Integer() If Not SyntaxFactory.AreEquivalent(oldNode.ArrayRankSpecifiers, newNode.ArrayRankSpecifiers) OrElse Not SyntaxFactory.AreEquivalent(oldNode.Nullable, newNode.Nullable) Then ReportError(RudeEditKind.TypeUpdate) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.ArrayBounds, newNode.ArrayBounds)) If oldNode.ArrayBounds Is Nothing OrElse newNode.ArrayBounds Is Nothing OrElse oldNode.ArrayBounds.Arguments.Count <> newNode.ArrayBounds.Arguments.Count Then ReportError(RudeEditKind.TypeUpdate) Return End If ' Otherwise only the size of the array changed, which is a legal initializer update ' unless it contains lambdas, queries etc. ClassifyDeclarationBodyRudeUpdates(newNode, allowLambdas:=False) End Sub Private Sub ClassifyUpdate(oldNode As VariableDeclaratorSyntax, newNode As VariableDeclaratorSyntax) Dim typeDeclaration = DirectCast(oldNode.Parent.Parent, TypeBlockSyntax) If typeDeclaration.BlockStatement.Arity > 0 Then ReportError(RudeEditKind.GenericTypeInitializerUpdate) Return End If If ClassifyTypeAndInitializerUpdates(oldNode.Initializer, oldNode.AsClause, newNode.Initializer, newNode.AsClause) Then ' Check if a constant field is updated: Dim fieldDeclaration = DirectCast(oldNode.Parent, FieldDeclarationSyntax) If fieldDeclaration.Modifiers.Any(SyntaxKind.ConstKeyword) Then ReportError(RudeEditKind.Update) Return End If End If End Sub Private Sub ClassifyUpdate(oldNode As PropertyStatementSyntax, newNode As PropertyStatementSyntax) If Not IncludesSignificantPropertyModifiers(oldNode.Modifiers, newNode.Modifiers) OrElse Not IncludesSignificantPropertyModifiers(newNode.Modifiers, oldNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.ImplementsClause, newNode.ImplementsClause) Then ReportError(RudeEditKind.ImplementsClauseUpdate) Return End If If ClassifyTypeAndInitializerUpdates(oldNode.Initializer, oldNode.AsClause, newNode.Initializer, newNode.AsClause) Then ' change in an initializer of an auto-property Dim typeDeclaration = DirectCast(oldNode.Parent, TypeBlockSyntax) If typeDeclaration.BlockStatement.Arity > 0 Then ReportError(RudeEditKind.GenericTypeInitializerUpdate) Return End If End If End Sub Private Shared Function IncludesSignificantPropertyModifiers(subset As SyntaxTokenList, superset As SyntaxTokenList) As Boolean For Each modifier In subset ' ReadOnly and WriteOnly keywords are redundant, it would be a semantic error if they Then didn't match the present accessors. ' We want to allow adding an accessor to a property, which requires change in the RO/WO modifiers. If modifier.IsKind(SyntaxKind.ReadOnlyKeyword) OrElse modifier.IsKind(SyntaxKind.WriteOnlyKeyword) Then Continue For End If If Not superset.Any(modifier.Kind) Then Return False End If Next Return True End Function ' Returns true if the initializer has changed. Private Function ClassifyTypeAndInitializerUpdates(oldEqualsValue As EqualsValueSyntax, oldClause As AsClauseSyntax, newEqualsValue As EqualsValueSyntax, newClause As AsClauseSyntax) As Boolean Dim oldInitializer = GetInitializerExpression(oldEqualsValue, oldClause) Dim newInitializer = GetInitializerExpression(newEqualsValue, newClause) If newInitializer IsNot Nothing AndAlso Not SyntaxFactory.AreEquivalent(oldInitializer, newInitializer) Then ClassifyDeclarationBodyRudeUpdates(newInitializer, allowLambdas:=False) Return True End If Return False End Function Private Sub ClassifyUpdate(oldNode As EventStatementSyntax, newNode As EventStatementSyntax) ' A custom event can't be matched with a field event and vice versa: Debug.Assert(SyntaxFactory.AreEquivalent(oldNode.CustomKeyword, newNode.CustomKeyword)) If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) End If If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.ImplementsClause, newNode.ImplementsClause) Then ReportError(RudeEditKind.ImplementsClauseUpdate) Return End If Dim oldHasGeneratedType = oldNode.ParameterList IsNot Nothing Dim newHasGeneratedType = newNode.ParameterList IsNot Nothing Debug.Assert(oldHasGeneratedType <> newHasGeneratedType) ReportError(RudeEditKind.TypeUpdate) End Sub Private Sub ClassifyUpdate(oldNode As MethodBlockSyntax, newNode As MethodBlockSyntax) ClassifyMethodBodyRudeUpdate(oldNode, newNode, containingMethod:=newNode, containingType:=DirectCast(newNode.Parent, TypeBlockSyntax), allowLambdas:=True) End Sub Private Sub ClassifyUpdate(oldNode As MethodStatementSyntax, newNode As MethodStatementSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.DeclarationKeyword, newNode.DeclarationKeyword) Then ReportError(RudeEditKind.MethodKindUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If If Not ClassifyMethodModifierUpdate(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If ' TODO (tomat): We can support this If Not SyntaxFactory.AreEquivalent(oldNode.HandlesClause, newNode.HandlesClause) Then ReportError(RudeEditKind.HandlesClauseUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.ImplementsClause, newNode.ImplementsClause) Then ReportError(RudeEditKind.ImplementsClauseUpdate) Return End If End Sub Private Function ClassifyMethodModifierUpdate(oldModifiers As SyntaxTokenList, newModifiers As SyntaxTokenList) As Boolean Dim oldAsyncIndex = oldModifiers.IndexOf(SyntaxKind.AsyncKeyword) Dim newAsyncIndex = newModifiers.IndexOf(SyntaxKind.AsyncKeyword) If oldAsyncIndex >= 0 Then oldModifiers = oldModifiers.RemoveAt(oldAsyncIndex) End If If newAsyncIndex >= 0 Then newModifiers = newModifiers.RemoveAt(newAsyncIndex) End If Dim oldIteratorIndex = oldModifiers.IndexOf(SyntaxKind.IteratorKeyword) Dim newIteratorIndex = newModifiers.IndexOf(SyntaxKind.IteratorKeyword) If oldIteratorIndex >= 0 Then oldModifiers = oldModifiers.RemoveAt(oldIteratorIndex) End If If newIteratorIndex >= 0 Then newModifiers = newModifiers.RemoveAt(newIteratorIndex) End If Return SyntaxFactory.AreEquivalent(oldModifiers, newModifiers) End Function Private Sub ClassifyUpdate(oldNode As DeclareStatementSyntax, newNode As DeclareStatementSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.CharsetKeyword, newNode.CharsetKeyword) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.LibraryName, newNode.LibraryName) Then ReportError(RudeEditKind.DeclareLibraryUpdate) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.AliasName, newNode.AliasName)) ReportError(RudeEditKind.DeclareAliasUpdate) End Sub Private Sub ClassifyUpdate(oldNode As OperatorBlockSyntax, newNode As OperatorBlockSyntax) ClassifyMethodBodyRudeUpdate(oldNode, newNode, containingMethod:=Nothing, containingType:=DirectCast(newNode.Parent, TypeBlockSyntax), allowLambdas:=True) End Sub Private Sub ClassifyUpdate(oldNode As OperatorStatementSyntax, newNode As OperatorStatementSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.OperatorToken, newNode.OperatorToken)) ReportError(RudeEditKind.Renamed) End Sub Private Sub ClassifyUpdate(oldNode As AccessorBlockSyntax, newNode As AccessorBlockSyntax) Debug.Assert(newNode.Parent.IsKind(SyntaxKind.EventBlock) OrElse newNode.Parent.IsKind(SyntaxKind.PropertyBlock)) ClassifyMethodBodyRudeUpdate(oldNode, newNode, containingMethod:=Nothing, containingType:=DirectCast(newNode.Parent.Parent, TypeBlockSyntax), allowLambdas:=True) End Sub Private Sub ClassifyUpdate(oldNode As AccessorStatementSyntax, newNode As AccessorStatementSyntax) If oldNode.RawKind <> newNode.RawKind Then ReportError(RudeEditKind.AccessorKindUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If End Sub Private Sub ClassifyUpdate(oldNode As EnumMemberDeclarationSyntax, newNode As EnumMemberDeclarationSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.Initializer, newNode.Initializer)) ReportError(RudeEditKind.InitializerUpdate) End Sub Private Sub ClassifyUpdate(oldNode As ConstructorBlockSyntax, newNode As ConstructorBlockSyntax) ClassifyMethodBodyRudeUpdate(oldNode, newNode, containingMethod:=Nothing, containingType:=DirectCast(newNode.Parent, TypeBlockSyntax), allowLambdas:=False) End Sub Private Sub ClassifyUpdate(oldNode As SubNewStatementSyntax, newNode As SubNewStatementSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If End Sub Private Sub ClassifyUpdate(oldNode As SimpleAsClauseSyntax, newNode As SimpleAsClauseSyntax) Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.Type, newNode.Type)) ReportError(RudeEditKind.TypeUpdate, newNode.Parent, newNode.Parent) End Sub Private Sub ClassifyUpdate(oldNode As TypeParameterSyntax, newNode As TypeParameterSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If Debug.Assert(Not SyntaxFactory.AreEquivalent(oldNode.VarianceKeyword, newNode.VarianceKeyword)) ReportError(RudeEditKind.VarianceUpdate) End Sub Private Sub ClassifyUpdate(oldNode As ParameterSyntax, newNode As ParameterSyntax) If Not SyntaxFactory.AreEquivalent(oldNode.Identifier, newNode.Identifier) Then ReportError(RudeEditKind.Renamed) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Modifiers, newNode.Modifiers) Then ReportError(RudeEditKind.ModifiersUpdate) Return End If If Not SyntaxFactory.AreEquivalent(oldNode.Default, newNode.Default) Then ReportError(RudeEditKind.InitializerUpdate) Return End If If ClassifyTypeAndInitializerUpdates(oldNode.Default, oldNode.AsClause, newNode.Default, newNode.AsClause) Then Return End If ClassifyUpdate(oldNode.Identifier, newNode.Identifier) End Sub Private Sub ClassifyMethodBodyRudeUpdate(oldBody As MethodBlockBaseSyntax, newBody As MethodBlockBaseSyntax, containingMethod As MethodBlockSyntax, containingType As TypeBlockSyntax, allowLambdas As Boolean) If (oldBody.EndBlockStatement Is Nothing) <> (newBody.EndBlockStatement Is Nothing) Then If oldBody.EndBlockStatement Is Nothing Then ReportError(RudeEditKind.MethodBodyAdd) Return Else ReportError(RudeEditKind.MethodBodyDelete) Return End If End If ' The method only gets called if there are no other changes to the method declaration. ' Since we got the update edit something has to be different in the body. Debug.Assert(newBody.EndBlockStatement IsNot Nothing) ClassifyMemberBodyRudeUpdate(containingMethod, containingType, isTriviaUpdate:=False) ClassifyDeclarationBodyRudeUpdates(newBody, allowLambdas) End Sub Public Sub ClassifyMemberBodyRudeUpdate(containingMethodOpt As MethodBlockSyntax, containingTypeOpt As TypeBlockSyntax, isTriviaUpdate As Boolean) If containingMethodOpt?.SubOrFunctionStatement.TypeParameterList IsNot Nothing Then ReportError(If(isTriviaUpdate, RudeEditKind.GenericMethodTriviaUpdate, RudeEditKind.GenericMethodUpdate)) Return End If If containingTypeOpt?.BlockStatement.Arity > 0 Then ReportError(If(isTriviaUpdate, RudeEditKind.GenericTypeTriviaUpdate, RudeEditKind.GenericTypeUpdate)) Return End If End Sub Public Sub ClassifyDeclarationBodyRudeUpdates(newDeclarationOrBody As SyntaxNode, allowLambdas As Boolean) For Each node In newDeclarationOrBody.DescendantNodesAndSelf() Select Case node.Kind Case SyntaxKind.MultiLineFunctionLambdaExpression, SyntaxKind.SingleLineFunctionLambdaExpression, SyntaxKind.MultiLineSubLambdaExpression, SyntaxKind.SingleLineSubLambdaExpression ' TODO: If Not allowLambdas Then ReportError(RudeEditKind.RUDE_EDIT_LAMBDA_EXPRESSION, node, Me._newNode) Return End If Case SyntaxKind.QueryExpression ' TODO: If Not allowLambdas Then ReportError(RudeEditKind.RUDE_EDIT_QUERY_EXPRESSION, node, Me._newNode) Return End If Case SyntaxKind.AggregateClause, SyntaxKind.GroupByClause, SyntaxKind.SimpleJoinClause, SyntaxKind.GroupJoinClause ReportError(RudeEditKind.RUDE_EDIT_COMPLEX_QUERY_EXPRESSION, node, Me._newNode) Return Case SyntaxKind.LocalDeclarationStatement Dim declaration = DirectCast(node, LocalDeclarationStatementSyntax) If declaration.Modifiers.Any(SyntaxKind.StaticKeyword) Then ReportError(RudeEditKind.UpdateStaticLocal) End If End Select Next End Sub #End Region End Structure Friend Overrides Sub ReportSyntacticRudeEdits(diagnostics As List(Of RudeEditDiagnostic), match As Match(Of SyntaxNode), edit As Edit(Of SyntaxNode), editMap As Dictionary(Of SyntaxNode, EditKind)) ' For most nodes we ignore Insert and Delete edits if their parent was also inserted or deleted, respectively. ' For ModifiedIdentifiers though we check the grandparent instead because variables can move accross ' VariableDeclarators. Moving a variable from a VariableDeclarator that only has a single variable results in ' deletion of that declarator. We don't want to report that delete. Similarly for moving to a new VariableDeclarator. If edit.Kind = EditKind.Delete AndAlso edit.OldNode.IsKind(SyntaxKind.ModifiedIdentifier) AndAlso edit.OldNode.Parent.IsKind(SyntaxKind.VariableDeclarator) Then If HasEdit(editMap, edit.OldNode.Parent.Parent, EditKind.Delete) Then Return End If ElseIf edit.Kind = EditKind.Insert AndAlso edit.NewNode.IsKind(SyntaxKind.ModifiedIdentifier) AndAlso edit.NewNode.Parent.IsKind(SyntaxKind.VariableDeclarator) Then If HasEdit(editMap, edit.NewNode.Parent.Parent, EditKind.Insert) Then Return End If ElseIf HasParentEdit(editMap, edit) Then Return End If Dim classifier = New EditClassifier(Me, diagnostics, edit.OldNode, edit.NewNode, edit.Kind, match) classifier.ClassifyEdit() End Sub Friend Overrides Sub ReportMemberUpdateRudeEdits(diagnostics As List(Of RudeEditDiagnostic), newMember As SyntaxNode, span As TextSpan?) Dim classifier = New EditClassifier(Me, diagnostics, Nothing, newMember, EditKind.Update, span:=span) classifier.ClassifyMemberBodyRudeUpdate( TryCast(newMember, MethodBlockSyntax), newMember.FirstAncestorOrSelf(Of TypeBlockSyntax)(), isTriviaUpdate:=True) classifier.ClassifyDeclarationBodyRudeUpdates(newMember, allowLambdas:=Not newMember.IsKind(SyntaxKind.ConstructorBlock) AndAlso Not newMember.IsKind(SyntaxKind.ModifiedIdentifier) AndAlso Not newMember.IsKind(SyntaxKind.VariableDeclarator) AndAlso Not newMember.IsKind(SyntaxKind.PropertyStatement)) End Sub #End Region #Region "Semantic Rude Edits" Friend Overrides Sub ReportInsertedMemberSymbolRudeEdits(diagnostics As List(Of RudeEditDiagnostic), newSymbol As ISymbol) ' CLR doesn't support adding P/Invokes. ' VB needs to check if the type doesn't contain methods with DllImport attribute. If newSymbol.IsKind(SymbolKind.NamedType) Then For Each member In DirectCast(newSymbol, INamedTypeSymbol).GetMembers() ReportDllImportInsertRudeEdit(diagnostics, member) Next Else ReportDllImportInsertRudeEdit(diagnostics, newSymbol) End If End Sub Private Shared Sub ReportDllImportInsertRudeEdit(diagnostics As List(Of RudeEditDiagnostic), member As ISymbol) If member.IsKind(SymbolKind.Method) AndAlso DirectCast(member, IMethodSymbol).GetDllImportData() IsNot Nothing Then diagnostics.Add(New RudeEditDiagnostic(RudeEditKind.InsertDllImport, member.Locations.First().SourceSpan)) End If End Sub #End Region #Region "Exception Handling Rude Edits" Protected Overrides Function GetExceptionHandlingAncestors(node As SyntaxNode, isLeaf As Boolean) As List(Of SyntaxNode) Dim result = New List(Of SyntaxNode)() Dim initialNode = node While node IsNot Nothing Dim kind = node.Kind Select Case kind Case SyntaxKind.TryBlock If Not isLeaf Then result.Add(node) End If Case SyntaxKind.CatchBlock, SyntaxKind.FinallyBlock result.Add(node) Debug.Assert(node.Parent.Kind = SyntaxKind.TryBlock) node = node.Parent Case SyntaxKind.ClassBlock, SyntaxKind.StructureBlock ' stop at type declaration Exit While End Select ' stop at lambda If LambdaUtilities.IsLambda(node) Then Exit While End If node = node.Parent End While Return result End Function Friend Overrides Sub ReportEnclosingExceptionHandlingRudeEdits(diagnostics As List(Of RudeEditDiagnostic), exceptionHandlingEdits As IEnumerable(Of Edit(Of SyntaxNode)), oldStatement As SyntaxNode, newStatement As SyntaxNode) For Each edit In exceptionHandlingEdits Debug.Assert(edit.Kind <> EditKind.Update OrElse edit.OldNode.RawKind = edit.NewNode.RawKind) If edit.Kind <> EditKind.Update OrElse Not AreExceptionHandlingPartsEquivalent(edit.OldNode, edit.NewNode) Then AddRudeDiagnostic(diagnostics, edit.OldNode, edit.NewNode, newStatement) End If Next End Sub Private Shared Function AreExceptionHandlingPartsEquivalent(oldNode As SyntaxNode, newNode As SyntaxNode) As Boolean Select Case oldNode.Kind Case SyntaxKind.TryBlock Dim oldTryBlock = DirectCast(oldNode, TryBlockSyntax) Dim newTryBlock = DirectCast(newNode, TryBlockSyntax) Return SyntaxFactory.AreEquivalent(oldTryBlock.FinallyBlock, newTryBlock.FinallyBlock) AndAlso SyntaxFactory.AreEquivalent(oldTryBlock.CatchBlocks, newTryBlock.CatchBlocks) Case SyntaxKind.CatchBlock, SyntaxKind.FinallyBlock Return SyntaxFactory.AreEquivalent(oldNode, newNode) Case Else Throw ExceptionUtilities.UnexpectedValue(oldNode.Kind) End Select End Function ''' <summary> ''' An active statement (leaf or not) inside a "Catch" makes the Catch part readonly. ''' An active statement (leaf or not) inside a "Finally" makes the whole Try/Catch/Finally part read-only. ''' An active statement (non leaf) inside a "Try" makes the Catch/Finally part read-only. ''' </summary> Protected Overrides Function GetExceptionHandlingRegion(node As SyntaxNode, <Out> ByRef coversAllChildren As Boolean) As TextSpan Select Case node.Kind Case SyntaxKind.TryBlock Dim tryBlock = DirectCast(node, TryBlockSyntax) coversAllChildren = False If tryBlock.CatchBlocks.Count = 0 Then Debug.Assert(tryBlock.FinallyBlock IsNot Nothing) Return TextSpan.FromBounds(tryBlock.FinallyBlock.SpanStart, tryBlock.EndTryStatement.Span.End) End If Return TextSpan.FromBounds(tryBlock.CatchBlocks.First().SpanStart, tryBlock.EndTryStatement.Span.End) Case SyntaxKind.CatchBlock coversAllChildren = True Return node.Span Case SyntaxKind.FinallyBlock coversAllChildren = True Return DirectCast(node.Parent, TryBlockSyntax).Span Case Else Throw ExceptionUtilities.UnexpectedValue(node.Kind) End Select End Function #End Region #Region "State Machines" Friend Overrides Function IsStateMachineMethod(declaration As SyntaxNode) As Boolean Return SyntaxUtilities.IsAsyncMethodOrLambda(declaration) OrElse SyntaxUtilities.IsIteratorMethodOrLambda(declaration) End Function Protected Overrides Function GetStateMachineSuspensionPoints(body As SyntaxNode) As ImmutableArray(Of SyntaxNode) ' In VB declaration and body are reprsented by teh same node for both lambdas and methods (unlike C#) If SyntaxUtilities.IsAsyncMethodOrLambda(body) Then Return SyntaxUtilities.GetAwaitExpressions(body) Else Return SyntaxUtilities.GetYieldStatements(body) End If End Function Friend Overrides Sub ReportStateMachineSuspensionPointRudeEdits(diagnostics As List(Of RudeEditDiagnostic), oldNode As SyntaxNode, newNode As SyntaxNode) ' TODO: changes around suspension points (foreach, lock, using, etc.) If newNode.IsKind(SyntaxKind.AwaitExpression) Then Dim oldContainingStatementPart = FindContainingStatementPart(oldNode) Dim newContainingStatementPart = FindContainingStatementPart(newNode) ' If the old statement has spilled state and the new doesn't, the edit is ok. We'll just not use the spilled state. If Not SyntaxFactory.AreEquivalent(oldContainingStatementPart, newContainingStatementPart) AndAlso Not HasNoSpilledState(newNode, newContainingStatementPart) Then diagnostics.Add(New RudeEditDiagnostic(RudeEditKind.AwaitStatementUpdate, newContainingStatementPart.Span)) End If End If End Sub Private Shared Function FindContainingStatementPart(node As SyntaxNode) As SyntaxNode Dim statement = TryCast(node, StatementSyntax) While statement Is Nothing Select Case node.Parent.Kind() Case SyntaxKind.ForStatement, SyntaxKind.ForEachStatement, SyntaxKind.IfStatement, SyntaxKind.WhileStatement, SyntaxKind.SimpleDoStatement, SyntaxKind.SelectStatement, SyntaxKind.UsingStatement Return node End Select If LambdaUtilities.IsLambdaBodyStatementOrExpression(node) Then Return node End If node = node.Parent statement = TryCast(node, StatementSyntax) End While Return statement End Function Private Shared Function HasNoSpilledState(awaitExpression As SyntaxNode, containingStatementPart As SyntaxNode) As Boolean Debug.Assert(awaitExpression.IsKind(SyntaxKind.AwaitExpression)) ' There is nothing within the statement part surrouding the await expression. If containingStatementPart Is awaitExpression Then Return True End If Select Case containingStatementPart.Kind() Case SyntaxKind.ExpressionStatement, SyntaxKind.ReturnStatement Dim expression = GetExpressionFromStatementPart(containingStatementPart) ' Await <expr> ' Return Await <expr> If expression Is awaitExpression Then Return True End If ' <ident> = Await <expr> ' Return <ident> = Await <expr> Return IsSimpleAwaitAssignment(expression, awaitExpression) Case SyntaxKind.VariableDeclarator ' <ident> = Await <expr> in using, for, etc ' EqualsValue -> VariableDeclarator Return awaitExpression.Parent.Parent Is containingStatementPart Case SyntaxKind.LoopUntilStatement, SyntaxKind.LoopWhileStatement, SyntaxKind.DoUntilStatement, SyntaxKind.DoWhileStatement ' Until Await <expr> ' UntilClause -> LoopUntilStatement Return awaitExpression.Parent.Parent Is containingStatementPart Case SyntaxKind.LocalDeclarationStatement ' Dim <ident> = Await <expr> ' EqualsValue -> VariableDeclarator -> LocalDeclarationStatement Return awaitExpression.Parent.Parent.Parent Is containingStatementPart End Select Return IsSimpleAwaitAssignment(containingStatementPart, awaitExpression) End Function Private Shared Function GetExpressionFromStatementPart(statement As SyntaxNode) As ExpressionSyntax Select Case statement.Kind() Case SyntaxKind.ExpressionStatement Return DirectCast(statement, ExpressionStatementSyntax).Expression Case SyntaxKind.ReturnStatement Return DirectCast(statement, ReturnStatementSyntax).Expression Case Else Throw ExceptionUtilities.Unreachable End Select End Function Private Shared Function IsSimpleAwaitAssignment(node As SyntaxNode, awaitExpression As SyntaxNode) As Boolean If node.IsKind(SyntaxKind.SimpleAssignmentStatement) Then Dim assignment = DirectCast(node, AssignmentStatementSyntax) Return assignment.Left.IsKind(SyntaxKind.IdentifierName) AndAlso assignment.Right Is awaitExpression End If Return False End Function #End Region #Region "Rude Edits around Active Statement" Friend Overrides Sub ReportOtherRudeEditsAroundActiveStatement(diagnostics As List(Of RudeEditDiagnostic), match As Match(Of SyntaxNode), oldActiveStatement As SyntaxNode, newActiveStatement As SyntaxNode, isLeaf As Boolean) Dim onErrorOrResumeStatement = FindOnErrorOrResumeStatement(match.NewRoot) If onErrorOrResumeStatement IsNot Nothing Then AddRudeDiagnostic(diagnostics, oldActiveStatement, onErrorOrResumeStatement, newActiveStatement) End If ReportRudeEditsForAncestorsDeclaringInterStatementTemps(diagnostics, match, oldActiveStatement, newActiveStatement, isLeaf) End Sub Private Shared Function FindOnErrorOrResumeStatement(newDeclarationOrBody As SyntaxNode) As SyntaxNode For Each node In newDeclarationOrBody.DescendantNodes(AddressOf ChildrenCompiledInBody) Select Case node.Kind Case SyntaxKind.OnErrorGoToLabelStatement, SyntaxKind.OnErrorGoToMinusOneStatement, SyntaxKind.OnErrorGoToZeroStatement, SyntaxKind.OnErrorResumeNextStatement, SyntaxKind.ResumeStatement, SyntaxKind.ResumeNextStatement, SyntaxKind.ResumeLabelStatement Return node End Select Next Return Nothing End Function Private Sub ReportRudeEditsForAncestorsDeclaringInterStatementTemps(diagnostics As List(Of RudeEditDiagnostic), match As Match(Of SyntaxNode), oldActiveStatement As SyntaxNode, newActiveStatement As SyntaxNode, isLeaf As Boolean) ' Rude Edits for Using/SyncLock/With/ForEach statements that are added/updated around an active statement. ' Although such changes are technically possible, they might lead to confusion since ' the temporary variables these statements generate won't be properly initialized. ' ' We use a simple algorithm to match each New node with its old counterpart. ' If all nodes match this algorithm Is linear, otherwise it's quadratic. ' ' Unlike exception regions matching where we use LCS, we allow reordering of the statements. ReportUnmatchedStatements(Of SyncLockBlockSyntax)(diagnostics, match, SyntaxKind.SyncLockBlock, oldActiveStatement, newActiveStatement, areEquivalent:=Function(n1, n2) SyntaxFactory.AreEquivalent(n1.SyncLockStatement.Expression, n2.SyncLockStatement.Expression), areSimilar:=Nothing) ReportUnmatchedStatements(Of WithBlockSyntax)(diagnostics, match, SyntaxKind.WithBlock, oldActiveStatement, newActiveStatement, areEquivalent:=Function(n1, n2) SyntaxFactory.AreEquivalent(n1.WithStatement.Expression, n2.WithStatement.Expression), areSimilar:=Nothing) ReportUnmatchedStatements(Of UsingBlockSyntax)(diagnostics, match, SyntaxKind.UsingBlock, oldActiveStatement, newActiveStatement, areEquivalent:=Function(n1, n2) SyntaxFactory.AreEquivalent(n1.UsingStatement.Expression, n2.UsingStatement.Expression), areSimilar:=Nothing) ReportUnmatchedStatements(Of ForOrForEachBlockSyntax)(diagnostics, match, SyntaxKind.ForEachBlock, oldActiveStatement, newActiveStatement, areEquivalent:=Function(n1, n2) SyntaxFactory.AreEquivalent(n1.ForOrForEachStatement, n2.ForOrForEachStatement), areSimilar:=Function(n1, n2) SyntaxFactory.AreEquivalent(DirectCast(n1.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable, DirectCast(n2.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable)) End Sub #End Region End Class End Namespace
marksantos/roslyn
src/Features/VisualBasic/EditAndContinue/VisualBasicEditAndContinueAnalyzer.vb
Visual Basic
apache-2.0
151,101
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Composition Imports System.Linq Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.VisualBasic Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.ApiDesignGuidelines.Analyzers ''' <summary> ''' Async001: Avoid Async Void ''' </summary> <ExportCodeFixProvider(LanguageNames.VisualBasic), [Shared]> Public NotInheritable Class BasicAvoidAsyncVoidFixer Inherits AvoidAsyncVoidFixer End Class End Namespace
Anniepoh/roslyn-analyzers
src/Microsoft.ApiDesignGuidelines.Analyzers/VisualBasic/BasicAvoidAsyncVoid.Fixer.vb
Visual Basic
apache-2.0
684
' Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. Imports EnvDTE Imports Microsoft.VisualStudio.Shell.Interop Imports System Imports System.Collections.Generic Imports System.Diagnostics Imports System.Drawing Imports System.IO Namespace Microsoft.VisualStudio.Editors.Common ''' <summary> ''' Utilities related to DTE projects and project items ''' </summary> ''' <remarks></remarks> Friend NotInheritable Class DTEUtils 'The relevant project property names Public Const PROJECTPROPERTY_CUSTOMTOOL As String = "CustomTool" Public Const PROJECTPROPERTY_CUSTOMTOOLNAMESPACE As String = "CustomToolNamespace" Private Const PROJECTPROPERTY_MSBUILD_ITEMTYPE As String = "ItemType" Private Const PROJECTPROPERTY_BUILDACTION As String = "BuildAction" ''' <summary> ''' This is a shared class - disallow instantation. ''' </summary> ''' <remarks></remarks> Private Sub New() End Sub ''' <summary> ''' Given a DTE project, return the directory on disk where templates for that project system ''' are stored. ''' </summary> ''' <param name="Project">The project.</param> ''' <returns>The full path of the templates directory for that project.</returns> ''' <remarks></remarks> Public Shared Function GetProjectTemplateDirectory(ByVal Project As Project) As String Return Project.DTE.Solution.ProjectItemsTemplatePath(Project.Kind) End Function '@ <summary> '@ Get the current EndDTE.Project instance for the project containing the .settings '@ file '@ </summary> '@ <remarks></remarks> Friend Shared Function EnvDTEProject(ByVal VsHierarchy As IVsHierarchy) As EnvDTE.Project Dim ProjectObj As Object = Nothing VSErrorHandler.ThrowOnFailure(VsHierarchy.GetProperty(VSITEMID.ROOT, __VSHPROPID.VSHPROPID_ExtObject, ProjectObj)) Return CType(ProjectObj, EnvDTE.Project) End Function ''' <summary> ''' Get EnvDTE.ProjectItem from hierarchy and itemid ''' </summary> ''' <param name="VsHierarchy"></param> ''' <param name="ItemId"></param> ''' <returns></returns> ''' <remarks></remarks> Public Shared Function ProjectItemFromItemId(ByVal VsHierarchy As IVsHierarchy, ByVal ItemId As UInteger) As ProjectItem Dim ExtensibilityObject As Object = Nothing VSErrorHandler.ThrowOnFailure(VsHierarchy.GetProperty(CUInt(ItemId), CInt(__VSHPROPID.VSHPROPID_ExtObject), ExtensibilityObject)) Debug.Assert(ExtensibilityObject IsNot Nothing AndAlso TypeOf ExtensibilityObject Is ProjectItem) Return DirectCast(ExtensibilityObject, ProjectItem) End Function ''' <summary> ''' Finds all files within a given ProjectItem that contain the given extension ''' </summary> ''' <param name="ProjectItems">The ProjectItems node to search through</param> ''' <param name="Extension">The extension to search for, including the period. E.g. ".resx"</param> ''' <param name="SearchChildren">If True, the search will continue to children.</param> ''' <returns></returns> ''' <remarks></remarks> Public Shared Function FindAllFilesWithExtension(ByVal ProjectItems As ProjectItems, ByVal Extension As String, ByVal SearchChildren As Boolean) As List(Of ProjectItem) Dim ResXFiles As New List(Of ProjectItem) For Each Item As ProjectItem In ProjectItems If IO.Path.GetExtension(Item.FileNames(1)).Equals(Extension, StringComparison.OrdinalIgnoreCase) Then ResXFiles.Add(Item) End If If SearchChildren AndAlso Item.ProjectItems.Count > 0 Then ResXFiles.AddRange(FindAllFilesWithExtension(Item.ProjectItems, Extension, SearchChildren)) End If Next Return ResXFiles End Function ''' <summary> ''' Get the file name from a project item. ''' </summary> ''' <param name="ProjectItem"></param> ''' <returns></returns> ''' <remarks>If the item contains of multiple files, the first one is returned</remarks> Public Shared Function FileNameFromProjectItem(ByVal ProjectItem As EnvDTE.ProjectItem) As String If ProjectItem Is Nothing Then System.Diagnostics.Debug.Fail("Can't get file name for NULL project item!") Throw New System.ArgumentNullException() End If If ProjectItem.FileCount <= 0 Then Debug.Fail("No file associated with ProjectItem (filecount <= 0)") Return Nothing End If ' The ProjectItem.FileNames collection is 1 based... Return ProjectItem.FileNames(1) End Function ''' <summary> ''' Retrieves the given project item's property, if it exists, else Nothing ''' </summary> ''' <param name="PropertyName">The name of the property to retrieve.</param> ''' <returns></returns> ''' <remarks></remarks> Public Shared Function GetProjectItemProperty(ByVal ProjectItem As ProjectItem, ByVal PropertyName As String) As [Property] If ProjectItem.Properties Is Nothing Then Return Nothing End If For Each Prop As [Property] In ProjectItem.Properties If Prop.Name.Equals(PropertyName, StringComparison.OrdinalIgnoreCase) Then Return Prop End If Next Return Nothing End Function ''' <summary> ''' Retrieves the given project's property, if it exists, else Nothing ''' </summary> ''' <param name="PropertyName">The name of the property to retrieve.</param> ''' <returns></returns> ''' <remarks></remarks> Public Shared Function GetProjectProperty(ByVal Project As Project, ByVal PropertyName As String) As [Property] If Project.Properties Is Nothing Then Return Nothing End If For Each Prop As [Property] In Project.Properties If Prop.Name.Equals(PropertyName, StringComparison.OrdinalIgnoreCase) Then Return Prop End If Next Return Nothing End Function ''' <summary> ''' Given a DTE project, returns the active IVsCfg configuration for it ''' </summary> ''' <param name="Project">The DTE project</param> ''' <param name="VsCfgProvider">The IVsCfgProvider2 interface instance to look up the active configuration from</param> ''' <returns></returns> ''' <remarks></remarks> Public Shared Function GetActiveConfiguration(ByVal Project As Project, ByVal VsCfgProvider As IVsCfgProvider2) As IVsCfg Dim VsCfg As IVsCfg = Nothing With GetActiveDTEConfiguration(Project) VSErrorHandler.ThrowOnFailure(VsCfgProvider.GetCfgOfName(.ConfigurationName, .PlatformName, VsCfg)) End With Return VsCfg End Function ''' <summary> ''' Given a DTE project, returns the active DTE configuration object for it ''' </summary> ''' <param name="Project">The DTE project</param> ''' <returns></returns> ''' <remarks></remarks> Public Shared Function GetActiveDTEConfiguration(ByVal Project As Project) As EnvDTE.Configuration Try Return Project.ConfigurationManager.ActiveConfiguration Catch ex As ArgumentException 'If there are no configurations defined in the project, this call can fail. In that case, just return ' the first config (there should be a single Debug configuration automatically defined and available). Return Project.ConfigurationManager.Item(1) '1-indexed Catch ex As Exception Common.RethrowIfUnrecoverable(ex) Debug.Fail("Unexpected exception trying to get the active configuration") Return Project.ConfigurationManager.Item(1) '1-indexed End Try End Function ''' <summary> ''' Tries to set the Build Action property of the given project item to the given build action (enumation). ''' If this project system doesn't have that property, this call is a NOP. ''' </summary> ''' <param name="Item">The ProjectItem on which to set the property</param> ''' <remarks></remarks> Public Shared Sub SetBuildAction(ByVal Item As ProjectItem, ByVal BuildAction As VSLangProj.prjBuildAction) Dim BuildActionProperty As [Property] = GetProjectItemProperty(Item, PROJECTPROPERTY_BUILDACTION) If BuildActionProperty IsNot Nothing Then BuildActionProperty.Value = BuildAction End If End Sub ''' <summary> ''' Tries to get the Build Action property of the given project item to the given build action (enumation). ''' If this project system doesn't have that property, returns prjBuildActionNone. ''' </summary> ''' <param name="Item">The ProjectItem on which to set the property</param> ''' <remarks></remarks> Public Shared Function GetBuildAction(ByVal Item As ProjectItem) As VSLangProj.prjBuildAction Dim BuildActionProperty As [Property] = GetProjectItemProperty(Item, PROJECTPROPERTY_BUILDACTION) If BuildActionProperty IsNot Nothing Then Return CType(BuildActionProperty.Value, VSLangProj.prjBuildAction) End If Return VSLangProj.prjBuildAction.prjBuildActionNone End Function ''' <summary> ''' Tries to set the Build Action property of the given project item to the given build action (string). ''' If this project system doesn't have that property, this call is a NOP. ''' </summary> ''' <param name="Item">The ProjectItem on which to set the property</param> ''' <remarks> ''' This version of the function uses newer functionality in Visual Studio, and is necessary for more ''' recent build actions, such as the WPF build actions, that weren't available in the original enumeration. ''' </remarks> Public Shared Sub SetBuildActionAsString(ByVal item As ProjectItem, ByVal buildAction As String) Dim BuildActionProperty As [Property] = GetProjectItemProperty(item, PROJECTPROPERTY_MSBUILD_ITEMTYPE) If BuildActionProperty IsNot Nothing Then BuildActionProperty.Value = buildAction End If End Sub ''' <summary> ''' Tries to get the Build Action property of the given project item to the given build action (enumation). ''' If this project system doesn't have that property, returns "". ''' </summary> ''' <param name="Item">The ProjectItem on which to set the property</param> ''' <remarks></remarks> Public Shared Function GetBuildActionAsString(ByVal Item As ProjectItem) As String Dim BuildActionProperty As [Property] = GetProjectItemProperty(Item, PROJECTPROPERTY_MSBUILD_ITEMTYPE) If BuildActionProperty IsNot Nothing Then Return CType(BuildActionProperty.Value, String) End If Return String.Empty End Function ''' ;FindProjectItem ''' <summary> ''' Given ProjectItems and a file name, find and return a ProjectItem in this ProjectItems ''' with the same file name. If none is found, return NULL. ''' </summary> Public Shared Function FindProjectItem(ByVal projectItems As ProjectItems, ByVal fileName As String) As ProjectItem For Each projectItem As ProjectItem In projectItems If projectItem.Kind.Equals( _ EnvDTE.Constants.vsProjectItemKindPhysicalFile, StringComparison.OrdinalIgnoreCase) AndAlso _ projectItem.FileCount > 0 Then Dim itemFileName As String = Path.GetFileName(projectItem.FileNames(1)) If String.Compare(fileName, itemFileName, StringComparison.OrdinalIgnoreCase) = 0 Then Return projectItem End If End If Next Return Nothing End Function ''' ;ItemIdOfProjectItem ''' <summary> ''' From a hierarchy and projectitem, return the item id ''' </summary> Public Shared Function ItemIdOfProjectItem(ByVal Hierarchy As IVsHierarchy, ByVal ProjectItem As EnvDTE.ProjectItem) As UInteger Dim FoundItemId As UInteger VSErrorHandler.ThrowOnFailure(Hierarchy.ParseCanonicalName(ProjectItem.FileNames(1), FoundItemId)) Return FoundItemId End Function End Class End Namespace
syeerzy/visualfsharp
vsintegration/src/FSharp.ProjectSystem.PropertyPages/Common/DTEUtils.vb
Visual Basic
mit
13,304
'*******************************************************************************************' ' ' ' Download Free Evaluation Version From: https://bytescout.com/download/web-installer ' ' ' ' Also available as Web API! Get free API Key https://app.pdf.co/signup ' ' ' ' Copyright © 2017-2020 ByteScout, Inc. All rights reserved. ' ' https://www.bytescout.com ' ' https://www.pdf.co ' '*******************************************************************************************' Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' Open Spreadsheet Dim document As New Spreadsheet() document.LoadFromFile("AdvancedReport.xls") ' Get Worksheet Dim worksheet As Worksheet = document.Workbook.Worksheets(0) ' Remove row worksheet.Rows.Delete(5, 5) ' remove output file if already exists If File.Exists("Output.xls") Then File.Delete("Output.xls") End If ' Save document document.SaveAs("Output.xls") ' Close Spreadsheet document.Close() ' open in default spreadsheets viewer/editor Process.Start("Output.xls") End Sub End Module
bytescout/ByteScout-SDK-SourceCode
Spreadsheet SDK/VB.NET/Remove Rows from Existing Spreadsheet/Module1.vb
Visual Basic
apache-2.0
1,697
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem Imports Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim.Interop Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim Friend Class TempPECompilerFactory Implements IVbTempPECompilerFactory Private ReadOnly workspace As VisualStudioWorkspaceImpl Public Sub New(workspace As VisualStudioWorkspaceImpl) Me.workspace = workspace End Sub Public Function CreateCompiler() As IVbCompiler Implements IVbTempPECompilerFactory.CreateCompiler Return New TempPECompiler(workspace) End Function End Class End Namespace
DavidKarlas/roslyn
src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/TempPECompilerFactory.vb
Visual Basic
apache-2.0
876
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System Imports System.Collections.Generic Imports System.Diagnostics Imports System.Threading Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeAnalysis.VisualBasic Partial Class DataFlowPass Inherits AbstractFlowPass(Of LocalState) ''' <summary> Represents variable symbol combined with the containing variable slot </summary> Protected Structure VariableIdentifier Implements IEquatable(Of VariableIdentifier) Public Shared None As VariableIdentifier = New VariableIdentifier() Public Sub New(symbol As Symbol, containingSlot As Integer) Debug.Assert(symbol IsNot Nothing) Me.Symbol = symbol Me.ContainingSlot = containingSlot End Sub Public ReadOnly Symbol As Symbol Public ReadOnly ContainingSlot As Integer Public ReadOnly Property Exists As Boolean Get Return Symbol IsNot Nothing End Get End Property Public Overrides Function GetHashCode() As Integer Return Hash.Combine(Me.Symbol.GetHashCode, Me.ContainingSlot.GetHashCode) End Function Public Overloads Function Equals(obj As VariableIdentifier) As Boolean Implements IEquatable(Of VariableIdentifier).Equals Return Me.Symbol.Equals(obj.Symbol) AndAlso Me.ContainingSlot = obj.ContainingSlot End Function Public Overrides Function Equals(obj As Object) As Boolean Debug.Assert(obj IsNot Nothing) Dim other = DirectCast(obj, VariableIdentifier?) Return Equals(other.Value) End Function Public Shared Operator =(left As VariableIdentifier, right As VariableIdentifier) As Boolean Return left.Equals(right) End Operator Public Shared Operator <>(left As VariableIdentifier, right As VariableIdentifier) As Boolean Return Not left.Equals(right) End Operator End Structure End Class End Namespace
DavidKarlas/roslyn
src/Compilers/VisualBasic/Portable/Analysis/FlowAnalysis/DataFlowPass.VariableIdentifier.vb
Visual Basic
apache-2.0
2,418
Imports NETGeographicLib Module example_OSGB Sub Main() Try ' Sample forward calculation from ' A guide to coordinate systems in Great Britain Dim lat As Double = DMS.Decode(52, 39, 27.2531) Dim lon As Double = DMS.Decode(1, 43, 4.5177) Dim x, y As Double OSGB.Forward(lat, lon, x, y) Dim gridref As String = "" OSGB.GridReference(x, y, 2, gridref) Console.WriteLine(String.Format("{0} {1} {2}", x, y, gridref)) ' Sample reverse calculation gridref = "TG5113" Dim prec As Integer OSGB.GridReference(gridref, x, y, prec, True) OSGB.Reverse(x, y, lat, lon) Console.WriteLine(String.Format("{0} {1} {2}", prec, lat, lon)) Catch ex As GeographicErr Console.WriteLine(String.Format("Caught exception: {0}", ex.Message)) End Try End Sub End Module
JanEicken/MA
libs/GeographicLib-1.43/dotnet/examples/VB/example-OSGB.vb
Visual Basic
mit
967
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Option Strict Off Imports System Module Module1 Sub Main() PrintResult("False + False", False + False) PrintResult("False + True", False + True) PrintResult("False + System.SByte.MinValue", False + System.SByte.MinValue) PrintResult("False + System.Byte.MaxValue", False + System.Byte.MaxValue) PrintResult("False + -3S", False + -3S) PrintResult("False + 24US", False + 24US) PrintResult("False + -5I", False + -5I) PrintResult("False + 26UI", False + 26UI) PrintResult("False + -7L", False + -7L) PrintResult("False + 28UL", False + 28UL) PrintResult("False + -9D", False + -9D) PrintResult("False + 10.0F", False + 10.0F) PrintResult("False + -11.0R", False + -11.0R) PrintResult("False + ""12""", False + "12") PrintResult("False + TypeCode.Double", False + TypeCode.Double) PrintResult("True + False", True + False) PrintResult("True + True", True + True) PrintResult("True + System.SByte.MaxValue", True + System.SByte.MaxValue) PrintResult("True + System.Byte.MaxValue", True + System.Byte.MaxValue) PrintResult("True + -3S", True + -3S) PrintResult("True + 24US", True + 24US) PrintResult("True + -5I", True + -5I) PrintResult("True + 26UI", True + 26UI) PrintResult("True + -7L", True + -7L) PrintResult("True + 28UL", True + 28UL) PrintResult("True + -9D", True + -9D) PrintResult("True + 10.0F", True + 10.0F) PrintResult("True + -11.0R", True + -11.0R) PrintResult("True + ""12""", True + "12") PrintResult("True + TypeCode.Double", True + TypeCode.Double) PrintResult("System.SByte.MinValue + False", System.SByte.MinValue + False) PrintResult("System.SByte.MaxValue + True", System.SByte.MaxValue + True) PrintResult("System.SByte.MinValue + System.SByte.MaxValue", System.SByte.MinValue + System.SByte.MaxValue) PrintResult("System.SByte.MinValue + System.Byte.MaxValue", System.SByte.MinValue + System.Byte.MaxValue) PrintResult("System.SByte.MinValue + -3S", System.SByte.MinValue + -3S) PrintResult("System.SByte.MinValue + 24US", System.SByte.MinValue + 24US) PrintResult("System.SByte.MinValue + -5I", System.SByte.MinValue + -5I) PrintResult("System.SByte.MinValue + 26UI", System.SByte.MinValue + 26UI) PrintResult("System.SByte.MinValue + -7L", System.SByte.MinValue + -7L) PrintResult("System.SByte.MinValue + 28UL", System.SByte.MinValue + 28UL) PrintResult("System.SByte.MinValue + -9D", System.SByte.MinValue + -9D) PrintResult("System.SByte.MinValue + 10.0F", System.SByte.MinValue + 10.0F) PrintResult("System.SByte.MinValue + -11.0R", System.SByte.MinValue + -11.0R) PrintResult("System.SByte.MinValue + ""12""", System.SByte.MinValue + "12") PrintResult("System.SByte.MinValue + TypeCode.Double", System.SByte.MinValue + TypeCode.Double) PrintResult("System.Byte.MaxValue + False", System.Byte.MaxValue + False) PrintResult("System.Byte.MaxValue + True", System.Byte.MaxValue + True) PrintResult("System.Byte.MaxValue + System.SByte.MinValue", System.Byte.MaxValue + System.SByte.MinValue) PrintResult("System.Byte.MaxValue + System.Byte.MinValue", System.Byte.MaxValue + System.Byte.MinValue) PrintResult("System.Byte.MaxValue + -3S", System.Byte.MaxValue + -3S) PrintResult("System.Byte.MaxValue + 24US", System.Byte.MaxValue + 24US) PrintResult("System.Byte.MaxValue + -5I", System.Byte.MaxValue + -5I) PrintResult("System.Byte.MaxValue + 26UI", System.Byte.MaxValue + 26UI) PrintResult("System.Byte.MaxValue + -7L", System.Byte.MaxValue + -7L) PrintResult("System.Byte.MaxValue + 28UL", System.Byte.MaxValue + 28UL) PrintResult("System.Byte.MaxValue + -9D", System.Byte.MaxValue + -9D) PrintResult("System.Byte.MaxValue + 10.0F", System.Byte.MaxValue + 10.0F) PrintResult("System.Byte.MaxValue + -11.0R", System.Byte.MaxValue + -11.0R) PrintResult("System.Byte.MaxValue + ""12""", System.Byte.MaxValue + "12") PrintResult("System.Byte.MaxValue + TypeCode.Double", System.Byte.MaxValue + TypeCode.Double) PrintResult("-3S + False", -3S + False) PrintResult("-3S + True", -3S + True) PrintResult("-3S + System.SByte.MinValue", -3S + System.SByte.MinValue) PrintResult("-3S + System.Byte.MaxValue", -3S + System.Byte.MaxValue) PrintResult("-3S + -3S", -3S + -3S) PrintResult("-3S + 24US", -3S + 24US) PrintResult("-3S + -5I", -3S + -5I) PrintResult("-3S + 26UI", -3S + 26UI) PrintResult("-3S + -7L", -3S + -7L) PrintResult("-3S + 28UL", -3S + 28UL) PrintResult("-3S + -9D", -3S + -9D) PrintResult("-3S + 10.0F", -3S + 10.0F) PrintResult("-3S + -11.0R", -3S + -11.0R) PrintResult("-3S + ""12""", -3S + "12") PrintResult("-3S + TypeCode.Double", -3S + TypeCode.Double) PrintResult("24US + False", 24US + False) PrintResult("24US + True", 24US + True) PrintResult("24US + System.SByte.MinValue", 24US + System.SByte.MinValue) PrintResult("24US + System.Byte.MaxValue", 24US + System.Byte.MaxValue) PrintResult("24US + -3S", 24US + -3S) PrintResult("24US + 24US", 24US + 24US) PrintResult("24US + -5I", 24US + -5I) PrintResult("24US + 26UI", 24US + 26UI) PrintResult("24US + -7L", 24US + -7L) PrintResult("24US + 28UL", 24US + 28UL) PrintResult("24US + -9D", 24US + -9D) PrintResult("24US + 10.0F", 24US + 10.0F) PrintResult("24US + -11.0R", 24US + -11.0R) PrintResult("24US + ""12""", 24US + "12") PrintResult("24US + TypeCode.Double", 24US + TypeCode.Double) PrintResult("-5I + False", -5I + False) PrintResult("-5I + True", -5I + True) PrintResult("-5I + System.SByte.MinValue", -5I + System.SByte.MinValue) PrintResult("-5I + System.Byte.MaxValue", -5I + System.Byte.MaxValue) PrintResult("-5I + -3S", -5I + -3S) PrintResult("-5I + 24US", -5I + 24US) PrintResult("-5I + -5I", -5I + -5I) PrintResult("-5I + 26UI", -5I + 26UI) PrintResult("-5I + -7L", -5I + -7L) PrintResult("-5I + 28UL", -5I + 28UL) PrintResult("-5I + -9D", -5I + -9D) PrintResult("-5I + 10.0F", -5I + 10.0F) PrintResult("-5I + -11.0R", -5I + -11.0R) PrintResult("-5I + ""12""", -5I + "12") PrintResult("-5I + TypeCode.Double", -5I + TypeCode.Double) PrintResult("26UI + False", 26UI + False) PrintResult("26UI + True", 26UI + True) PrintResult("26UI + System.SByte.MinValue", 26UI + System.SByte.MinValue) PrintResult("26UI + System.Byte.MaxValue", 26UI + System.Byte.MaxValue) PrintResult("26UI + -3S", 26UI + -3S) PrintResult("26UI + 24US", 26UI + 24US) PrintResult("26UI + -5I", 26UI + -5I) PrintResult("26UI + 26UI", 26UI + 26UI) PrintResult("26UI + -7L", 26UI + -7L) PrintResult("26UI + 28UL", 26UI + 28UL) PrintResult("26UI + -9D", 26UI + -9D) PrintResult("26UI + 10.0F", 26UI + 10.0F) PrintResult("26UI + -11.0R", 26UI + -11.0R) PrintResult("26UI + ""12""", 26UI + "12") PrintResult("26UI + TypeCode.Double", 26UI + TypeCode.Double) PrintResult("-7L + False", -7L + False) PrintResult("-7L + True", -7L + True) PrintResult("-7L + System.SByte.MinValue", -7L + System.SByte.MinValue) PrintResult("-7L + System.Byte.MaxValue", -7L + System.Byte.MaxValue) PrintResult("-7L + -3S", -7L + -3S) PrintResult("-7L + 24US", -7L + 24US) PrintResult("-7L + -5I", -7L + -5I) PrintResult("-7L + 26UI", -7L + 26UI) PrintResult("-7L + -7L", -7L + -7L) PrintResult("-7L + 28UL", -7L + 28UL) PrintResult("-7L + -9D", -7L + -9D) PrintResult("-7L + 10.0F", -7L + 10.0F) PrintResult("-7L + -11.0R", -7L + -11.0R) PrintResult("-7L + ""12""", -7L + "12") PrintResult("-7L + TypeCode.Double", -7L + TypeCode.Double) PrintResult("28UL + False", 28UL + False) PrintResult("28UL + True", 28UL + True) PrintResult("28UL + System.SByte.MinValue", 28UL + System.SByte.MinValue) PrintResult("28UL + System.Byte.MaxValue", 28UL + System.Byte.MaxValue) PrintResult("28UL + -3S", 28UL + -3S) PrintResult("28UL + 24US", 28UL + 24US) PrintResult("28UL + -5I", 28UL + -5I) PrintResult("28UL + 26UI", 28UL + 26UI) PrintResult("28UL + -7L", 28UL + -7L) PrintResult("28UL + 28UL", 28UL + 28UL) PrintResult("28UL + -9D", 28UL + -9D) PrintResult("28UL + 10.0F", 28UL + 10.0F) PrintResult("28UL + -11.0R", 28UL + -11.0R) PrintResult("28UL + ""12""", 28UL + "12") PrintResult("28UL + TypeCode.Double", 28UL + TypeCode.Double) PrintResult("-9D + False", -9D + False) PrintResult("-9D + True", -9D + True) PrintResult("-9D + System.SByte.MinValue", -9D + System.SByte.MinValue) PrintResult("-9D + System.Byte.MaxValue", -9D + System.Byte.MaxValue) PrintResult("-9D + -3S", -9D + -3S) PrintResult("-9D + 24US", -9D + 24US) PrintResult("-9D + -5I", -9D + -5I) PrintResult("-9D + 26UI", -9D + 26UI) PrintResult("-9D + -7L", -9D + -7L) PrintResult("-9D + 28UL", -9D + 28UL) PrintResult("-9D + -9D", -9D + -9D) PrintResult("-9D + 10.0F", -9D + 10.0F) PrintResult("-9D + -11.0R", -9D + -11.0R) PrintResult("-9D + ""12""", -9D + "12") PrintResult("-9D + TypeCode.Double", -9D + TypeCode.Double) PrintResult("10.0F + False", 10.0F + False) PrintResult("10.0F + True", 10.0F + True) PrintResult("10.0F + System.SByte.MinValue", 10.0F + System.SByte.MinValue) PrintResult("10.0F + System.Byte.MaxValue", 10.0F + System.Byte.MaxValue) PrintResult("10.0F + -3S", 10.0F + -3S) PrintResult("10.0F + 24US", 10.0F + 24US) PrintResult("10.0F + -5I", 10.0F + -5I) PrintResult("10.0F + 26UI", 10.0F + 26UI) PrintResult("10.0F + -7L", 10.0F + -7L) PrintResult("10.0F + 28UL", 10.0F + 28UL) PrintResult("10.0F + -9D", 10.0F + -9D) PrintResult("10.0F + 10.0F", 10.0F + 10.0F) PrintResult("10.0F + -11.0R", 10.0F + -11.0R) PrintResult("10.0F + ""12""", 10.0F + "12") PrintResult("10.0F + TypeCode.Double", 10.0F + TypeCode.Double) PrintResult("-11.0R + False", -11.0R + False) PrintResult("-11.0R + True", -11.0R + True) PrintResult("-11.0R + System.SByte.MinValue", -11.0R + System.SByte.MinValue) PrintResult("-11.0R + System.Byte.MaxValue", -11.0R + System.Byte.MaxValue) PrintResult("-11.0R + -3S", -11.0R + -3S) PrintResult("-11.0R + 24US", -11.0R + 24US) PrintResult("-11.0R + -5I", -11.0R + -5I) PrintResult("-11.0R + 26UI", -11.0R + 26UI) PrintResult("-11.0R + -7L", -11.0R + -7L) PrintResult("-11.0R + 28UL", -11.0R + 28UL) PrintResult("-11.0R + -9D", -11.0R + -9D) PrintResult("-11.0R + 10.0F", -11.0R + 10.0F) PrintResult("-11.0R + -11.0R", -11.0R + -11.0R) PrintResult("-11.0R + ""12""", -11.0R + "12") PrintResult("-11.0R + TypeCode.Double", -11.0R + TypeCode.Double) PrintResult("""12"" + False", "12" + False) PrintResult("""12"" + True", "12" + True) PrintResult("""12"" + System.SByte.MinValue", "12" + System.SByte.MinValue) PrintResult("""12"" + System.Byte.MaxValue", "12" + System.Byte.MaxValue) PrintResult("""12"" + -3S", "12" + -3S) PrintResult("""12"" + 24US", "12" + 24US) PrintResult("""12"" + -5I", "12" + -5I) PrintResult("""12"" + 26UI", "12" + 26UI) PrintResult("""12"" + -7L", "12" + -7L) PrintResult("""12"" + 28UL", "12" + 28UL) PrintResult("""12"" + -9D", "12" + -9D) PrintResult("""12"" + 10.0F", "12" + 10.0F) PrintResult("""12"" + -11.0R", "12" + -11.0R) PrintResult("""12"" + ""12""", "12" + "12") PrintResult("""12"" + TypeCode.Double", "12" + TypeCode.Double) PrintResult("TypeCode.Double + False", TypeCode.Double + False) PrintResult("TypeCode.Double + True", TypeCode.Double + True) PrintResult("TypeCode.Double + System.SByte.MinValue", TypeCode.Double + System.SByte.MinValue) PrintResult("TypeCode.Double + System.Byte.MaxValue", TypeCode.Double + System.Byte.MaxValue) PrintResult("TypeCode.Double + -3S", TypeCode.Double + -3S) PrintResult("TypeCode.Double + 24US", TypeCode.Double + 24US) PrintResult("TypeCode.Double + -5I", TypeCode.Double + -5I) PrintResult("TypeCode.Double + 26UI", TypeCode.Double + 26UI) PrintResult("TypeCode.Double + -7L", TypeCode.Double + -7L) PrintResult("TypeCode.Double + 28UL", TypeCode.Double + 28UL) PrintResult("TypeCode.Double + -9D", TypeCode.Double + -9D) PrintResult("TypeCode.Double + 10.0F", TypeCode.Double + 10.0F) PrintResult("TypeCode.Double + -11.0R", TypeCode.Double + -11.0R) PrintResult("TypeCode.Double + ""12""", TypeCode.Double + "12") PrintResult("TypeCode.Double + TypeCode.Double", TypeCode.Double + TypeCode.Double) PrintResult("False - False", False - False) PrintResult("False - True", False - True) PrintResult("False - System.SByte.MaxValue", False - System.SByte.MaxValue) PrintResult("False - System.Byte.MaxValue", False - System.Byte.MaxValue) PrintResult("False - -3S", False - -3S) PrintResult("False - 24US", False - 24US) PrintResult("False - -5I", False - -5I) PrintResult("False - 26UI", False - 26UI) PrintResult("False - -7L", False - -7L) PrintResult("False - 28UL", False - 28UL) PrintResult("False - -9D", False - -9D) PrintResult("False - 10.0F", False - 10.0F) PrintResult("False - -11.0R", False - -11.0R) PrintResult("False - ""12""", False - "12") PrintResult("False - TypeCode.Double", False - TypeCode.Double) PrintResult("True - False", True - False) PrintResult("True - True", True - True) PrintResult("True - System.SByte.MinValue", True - System.SByte.MinValue) PrintResult("True - System.Byte.MaxValue", True - System.Byte.MaxValue) PrintResult("True - -3S", True - -3S) PrintResult("True - 24US", True - 24US) PrintResult("True - -5I", True - -5I) PrintResult("True - 26UI", True - 26UI) PrintResult("True - -7L", True - -7L) PrintResult("True - 28UL", True - 28UL) PrintResult("True - -9D", True - -9D) PrintResult("True - 10.0F", True - 10.0F) PrintResult("True - -11.0R", True - -11.0R) PrintResult("True - ""12""", True - "12") PrintResult("True - TypeCode.Double", True - TypeCode.Double) PrintResult("System.SByte.MinValue - False", System.SByte.MinValue - False) PrintResult("System.SByte.MinValue - True", System.SByte.MinValue - True) PrintResult("System.SByte.MinValue - System.SByte.MinValue", System.SByte.MinValue - System.SByte.MinValue) PrintResult("System.SByte.MinValue - System.Byte.MaxValue", System.SByte.MinValue - System.Byte.MaxValue) PrintResult("System.SByte.MinValue - -3S", System.SByte.MinValue - -3S) PrintResult("System.SByte.MinValue - 24US", System.SByte.MinValue - 24US) PrintResult("System.SByte.MinValue - -5I", System.SByte.MinValue - -5I) PrintResult("System.SByte.MinValue - 26UI", System.SByte.MinValue - 26UI) PrintResult("System.SByte.MinValue - -7L", System.SByte.MinValue - -7L) PrintResult("System.SByte.MinValue - 28UL", System.SByte.MinValue - 28UL) PrintResult("System.SByte.MinValue - -9D", System.SByte.MinValue - -9D) PrintResult("System.SByte.MinValue - 10.0F", System.SByte.MinValue - 10.0F) PrintResult("System.SByte.MinValue - -11.0R", System.SByte.MinValue - -11.0R) PrintResult("System.SByte.MinValue - ""12""", System.SByte.MinValue - "12") PrintResult("System.SByte.MinValue - TypeCode.Double", System.SByte.MinValue - TypeCode.Double) PrintResult("System.Byte.MaxValue - False", System.Byte.MaxValue - False) PrintResult("System.Byte.MaxValue - True", System.Byte.MaxValue - True) PrintResult("System.Byte.MaxValue - System.SByte.MinValue", System.Byte.MaxValue - System.SByte.MinValue) PrintResult("System.Byte.MaxValue - System.Byte.MaxValue", System.Byte.MaxValue - System.Byte.MaxValue) PrintResult("System.Byte.MaxValue - -3S", System.Byte.MaxValue - -3S) PrintResult("System.Byte.MaxValue - -5I", System.Byte.MaxValue - -5I) PrintResult("System.Byte.MaxValue - -7L", System.Byte.MaxValue - -7L) PrintResult("System.Byte.MaxValue - -9D", System.Byte.MaxValue - -9D) PrintResult("System.Byte.MaxValue - 10.0F", System.Byte.MaxValue - 10.0F) PrintResult("System.Byte.MaxValue - -11.0R", System.Byte.MaxValue - -11.0R) PrintResult("System.Byte.MaxValue - ""12""", System.Byte.MaxValue - "12") PrintResult("System.Byte.MaxValue - TypeCode.Double", System.Byte.MaxValue - TypeCode.Double) PrintResult("-3S - False", -3S - False) PrintResult("-3S - True", -3S - True) PrintResult("-3S - System.SByte.MinValue", -3S - System.SByte.MinValue) PrintResult("-3S - System.Byte.MaxValue", -3S - System.Byte.MaxValue) PrintResult("-3S - -3S", -3S - -3S) PrintResult("-3S - 24US", -3S - 24US) PrintResult("-3S - -5I", -3S - -5I) PrintResult("-3S - 26UI", -3S - 26UI) PrintResult("-3S - -7L", -3S - -7L) PrintResult("-3S - 28UL", -3S - 28UL) PrintResult("-3S - -9D", -3S - -9D) PrintResult("-3S - 10.0F", -3S - 10.0F) PrintResult("-3S - -11.0R", -3S - -11.0R) PrintResult("-3S - ""12""", -3S - "12") PrintResult("-3S - TypeCode.Double", -3S - TypeCode.Double) PrintResult("24US - False", 24US - False) PrintResult("24US - True", 24US - True) PrintResult("24US - System.SByte.MinValue", 24US - System.SByte.MinValue) PrintResult("System.UInt16.MaxValue - System.Byte.MaxValue", System.UInt16.MaxValue - System.Byte.MaxValue) PrintResult("24US - -3S", 24US - -3S) PrintResult("24US - 24US", 24US - 24US) PrintResult("24US - -5I", 24US - -5I) PrintResult("24US - -7L", 24US - -7L) PrintResult("24US - -9D", 24US - -9D) PrintResult("24US - 10.0F", 24US - 10.0F) PrintResult("24US - -11.0R", 24US - -11.0R) PrintResult("24US - ""12""", 24US - "12") PrintResult("24US - TypeCode.Double", 24US - TypeCode.Double) PrintResult("-5I - False", -5I - False) PrintResult("-5I - True", -5I - True) PrintResult("-5I - System.SByte.MinValue", -5I - System.SByte.MinValue) PrintResult("-5I - System.Byte.MaxValue", -5I - System.Byte.MaxValue) PrintResult("-5I - -3S", -5I - -3S) PrintResult("-5I - 24US", -5I - 24US) PrintResult("-5I - -5I", -5I - -5I) PrintResult("-5I - 26UI", -5I - 26UI) PrintResult("-5I - -7L", -5I - -7L) PrintResult("-5I - 28UL", -5I - 28UL) PrintResult("-5I - -9D", -5I - -9D) PrintResult("-5I - 10.0F", -5I - 10.0F) PrintResult("-5I - -11.0R", -5I - -11.0R) PrintResult("-5I - ""12""", -5I - "12") PrintResult("-5I - TypeCode.Double", -5I - TypeCode.Double) PrintResult("26UI - False", 26UI - False) PrintResult("26UI - True", 26UI - True) PrintResult("26UI - System.SByte.MinValue", 26UI - System.SByte.MinValue) PrintResult("System.UInt32.MaxValue - System.Byte.MaxValue", System.UInt32.MaxValue - System.Byte.MaxValue) PrintResult("26UI - -3S", 26UI - -3S) PrintResult("26UI - 24US", 26UI - 24US) PrintResult("26UI - -5I", 26UI - -5I) PrintResult("26UI - 26UI", 26UI - 26UI) PrintResult("26UI - -7L", 26UI - -7L) PrintResult("26UI - -9D", 26UI - -9D) PrintResult("26UI - 10.0F", 26UI - 10.0F) PrintResult("26UI - -11.0R", 26UI - -11.0R) PrintResult("26UI - ""12""", 26UI - "12") PrintResult("26UI - TypeCode.Double", 26UI - TypeCode.Double) PrintResult("-7L - False", -7L - False) PrintResult("-7L - True", -7L - True) PrintResult("-7L - System.SByte.MinValue", -7L - System.SByte.MinValue) PrintResult("-7L - System.Byte.MaxValue", -7L - System.Byte.MaxValue) PrintResult("-7L - -3S", -7L - -3S) PrintResult("-7L - 24US", -7L - 24US) PrintResult("-7L - -5I", -7L - -5I) PrintResult("-7L - 26UI", -7L - 26UI) PrintResult("-7L - -7L", -7L - -7L) PrintResult("-7L - 28UL", -7L - 28UL) PrintResult("-7L - -9D", -7L - -9D) PrintResult("-7L - 10.0F", -7L - 10.0F) PrintResult("-7L - -11.0R", -7L - -11.0R) PrintResult("-7L - ""12""", -7L - "12") PrintResult("-7L - TypeCode.Double", -7L - TypeCode.Double) PrintResult("28UL - False", 28UL - False) PrintResult("28UL - True", 28UL - True) PrintResult("28UL - System.SByte.MinValue", 28UL - System.SByte.MinValue) PrintResult("System.UInt64.MaxValue - System.Byte.MaxValue", System.UInt64.MaxValue - System.Byte.MaxValue) PrintResult("28UL - -3S", 28UL - -3S) PrintResult("28UL - 24US", 28UL - 24US) PrintResult("28UL - -5I", 28UL - -5I) PrintResult("28UL - 26UI", 28UL - 26UI) PrintResult("28UL - -7L", 28UL - -7L) PrintResult("28UL - 28UL", 28UL - 28UL) PrintResult("28UL - -9D", 28UL - -9D) PrintResult("28UL - 10.0F", 28UL - 10.0F) PrintResult("28UL - -11.0R", 28UL - -11.0R) PrintResult("28UL - ""12""", 28UL - "12") PrintResult("28UL - TypeCode.Double", 28UL - TypeCode.Double) PrintResult("-9D - False", -9D - False) PrintResult("-9D - True", -9D - True) PrintResult("-9D - System.SByte.MinValue", -9D - System.SByte.MinValue) PrintResult("-9D - System.Byte.MaxValue", -9D - System.Byte.MaxValue) PrintResult("-9D - -3S", -9D - -3S) PrintResult("-9D - 24US", -9D - 24US) PrintResult("-9D - -5I", -9D - -5I) PrintResult("-9D - 26UI", -9D - 26UI) PrintResult("-9D - -7L", -9D - -7L) PrintResult("-9D - 28UL", -9D - 28UL) PrintResult("-9D - -9D", -9D - -9D) PrintResult("-9D - 10.0F", -9D - 10.0F) PrintResult("-9D - -11.0R", -9D - -11.0R) PrintResult("-9D - ""12""", -9D - "12") PrintResult("-9D - TypeCode.Double", -9D - TypeCode.Double) PrintResult("10.0F - False", 10.0F - False) PrintResult("10.0F - True", 10.0F - True) PrintResult("10.0F - System.SByte.MinValue", 10.0F - System.SByte.MinValue) PrintResult("10.0F - System.Byte.MaxValue", 10.0F - System.Byte.MaxValue) PrintResult("10.0F - -3S", 10.0F - -3S) PrintResult("10.0F - 24US", 10.0F - 24US) PrintResult("10.0F - -5I", 10.0F - -5I) PrintResult("10.0F - 26UI", 10.0F - 26UI) PrintResult("10.0F - -7L", 10.0F - -7L) PrintResult("10.0F - 28UL", 10.0F - 28UL) PrintResult("10.0F - -9D", 10.0F - -9D) PrintResult("10.0F - 10.0F", 10.0F - 10.0F) PrintResult("10.0F - -11.0R", 10.0F - -11.0R) PrintResult("10.0F - ""12""", 10.0F - "12") PrintResult("10.0F - TypeCode.Double", 10.0F - TypeCode.Double) PrintResult("-11.0R - False", -11.0R - False) PrintResult("-11.0R - True", -11.0R - True) PrintResult("-11.0R - System.SByte.MinValue", -11.0R - System.SByte.MinValue) PrintResult("-11.0R - System.Byte.MaxValue", -11.0R - System.Byte.MaxValue) PrintResult("-11.0R - -3S", -11.0R - -3S) PrintResult("-11.0R - 24US", -11.0R - 24US) PrintResult("-11.0R - -5I", -11.0R - -5I) PrintResult("-11.0R - 26UI", -11.0R - 26UI) PrintResult("-11.0R - -7L", -11.0R - -7L) PrintResult("-11.0R - 28UL", -11.0R - 28UL) PrintResult("-11.0R - -9D", -11.0R - -9D) PrintResult("-11.0R - 10.0F", -11.0R - 10.0F) PrintResult("-11.0R - -11.0R", -11.0R - -11.0R) PrintResult("-11.0R - ""12""", -11.0R - "12") PrintResult("-11.0R - TypeCode.Double", -11.0R - TypeCode.Double) PrintResult("""12"" - False", "12" - False) PrintResult("""12"" - True", "12" - True) PrintResult("""12"" - System.SByte.MinValue", "12" - System.SByte.MinValue) PrintResult("""12"" - System.Byte.MaxValue", "12" - System.Byte.MaxValue) PrintResult("""12"" - -3S", "12" - -3S) PrintResult("""12"" - 24US", "12" - 24US) PrintResult("""12"" - -5I", "12" - -5I) PrintResult("""12"" - 26UI", "12" - 26UI) PrintResult("""12"" - -7L", "12" - -7L) PrintResult("""12"" - 28UL", "12" - 28UL) PrintResult("""12"" - -9D", "12" - -9D) PrintResult("""12"" - 10.0F", "12" - 10.0F) PrintResult("""12"" - -11.0R", "12" - -11.0R) PrintResult("""12"" - ""12""", "12" - "12") PrintResult("""12"" - TypeCode.Double", "12" - TypeCode.Double) PrintResult("TypeCode.Double - False", TypeCode.Double - False) PrintResult("TypeCode.Double - True", TypeCode.Double - True) PrintResult("TypeCode.Double - System.SByte.MinValue", TypeCode.Double - System.SByte.MinValue) PrintResult("TypeCode.Double - System.Byte.MaxValue", TypeCode.Double - System.Byte.MaxValue) PrintResult("TypeCode.Double - -3S", TypeCode.Double - -3S) PrintResult("TypeCode.Double - 24US", TypeCode.Double - 24US) PrintResult("TypeCode.Double - -5I", TypeCode.Double - -5I) PrintResult("TypeCode.Double - 26UI", TypeCode.Double - 26UI) PrintResult("TypeCode.Double - -7L", TypeCode.Double - -7L) PrintResult("TypeCode.Double - 28UL", TypeCode.Double - 28UL) PrintResult("TypeCode.Double - -9D", TypeCode.Double - -9D) PrintResult("TypeCode.Double - 10.0F", TypeCode.Double - 10.0F) PrintResult("TypeCode.Double - -11.0R", TypeCode.Double - -11.0R) PrintResult("TypeCode.Double - ""12""", TypeCode.Double - "12") PrintResult("TypeCode.Double - TypeCode.Double", TypeCode.Double - TypeCode.Double) PrintResult("False * False", False * False) PrintResult("False * True", False * True) PrintResult("False * System.SByte.MinValue", False * System.SByte.MinValue) PrintResult("False * System.Byte.MaxValue", False * System.Byte.MaxValue) PrintResult("False * -3S", False * -3S) PrintResult("False * 24US", False * 24US) PrintResult("False * -5I", False * -5I) PrintResult("False * 26UI", False * 26UI) PrintResult("False * -7L", False * -7L) PrintResult("False * 28UL", False * 28UL) PrintResult("False * -9D", False * -9D) PrintResult("False * 10.0F", False * 10.0F) PrintResult("False * -11.0R", False * -11.0R) PrintResult("False * ""12""", False * "12") PrintResult("False * TypeCode.Double", False * TypeCode.Double) PrintResult("True * False", True * False) PrintResult("True * True", True * True) PrintResult("True * System.SByte.MaxValue", True * System.SByte.MaxValue) PrintResult("True * System.Byte.MaxValue", True * System.Byte.MaxValue) PrintResult("True * -3S", True * -3S) PrintResult("True * 24US", True * 24US) PrintResult("True * -5I", True * -5I) PrintResult("True * 26UI", True * 26UI) PrintResult("True * -7L", True * -7L) PrintResult("True * 28UL", True * 28UL) PrintResult("True * -9D", True * -9D) PrintResult("True * 10.0F", True * 10.0F) PrintResult("True * -11.0R", True * -11.0R) PrintResult("True * ""12""", True * "12") PrintResult("True * TypeCode.Double", True * TypeCode.Double) PrintResult("System.SByte.MinValue * False", System.SByte.MinValue * False) PrintResult("System.SByte.MaxValue * True", System.SByte.MaxValue * True) PrintResult("System.SByte.MinValue * (-(System.SByte.MinValue + System.SByte.MaxValue))", System.SByte.MinValue * (-(System.SByte.MinValue + System.SByte.MaxValue))) PrintResult("System.SByte.MinValue * System.Byte.MaxValue", System.SByte.MinValue * System.Byte.MaxValue) PrintResult("System.SByte.MinValue * -3S", System.SByte.MinValue * -3S) PrintResult("System.SByte.MinValue * 24US", System.SByte.MinValue * 24US) PrintResult("System.SByte.MinValue * -5I", System.SByte.MinValue * -5I) PrintResult("System.SByte.MinValue * 26UI", System.SByte.MinValue * 26UI) PrintResult("System.SByte.MinValue * -7L", System.SByte.MinValue * -7L) PrintResult("System.SByte.MinValue * 28UL", System.SByte.MinValue * 28UL) PrintResult("System.SByte.MinValue * -9D", System.SByte.MinValue * -9D) PrintResult("System.SByte.MinValue * 10.0F", System.SByte.MinValue * 10.0F) PrintResult("System.SByte.MinValue * -11.0R", System.SByte.MinValue * -11.0R) PrintResult("System.SByte.MinValue * ""12""", System.SByte.MinValue * "12") PrintResult("System.SByte.MinValue * TypeCode.Double", System.SByte.MinValue * TypeCode.Double) PrintResult("System.Byte.MaxValue * False", System.Byte.MaxValue * False) PrintResult("System.Byte.MaxValue * True", System.Byte.MaxValue * True) PrintResult("System.Byte.MaxValue * System.SByte.MinValue", System.Byte.MaxValue * System.SByte.MinValue) PrintResult("System.Byte.MaxValue * -3S", System.Byte.MaxValue * -3S) PrintResult("System.Byte.MaxValue * 24US", System.Byte.MaxValue * 24US) PrintResult("System.Byte.MaxValue * -5I", System.Byte.MaxValue * -5I) PrintResult("System.Byte.MaxValue * 26UI", System.Byte.MaxValue * 26UI) PrintResult("System.Byte.MaxValue * -7L", System.Byte.MaxValue * -7L) PrintResult("System.Byte.MaxValue * 28UL", System.Byte.MaxValue * 28UL) PrintResult("System.Byte.MaxValue * -9D", System.Byte.MaxValue * -9D) PrintResult("System.Byte.MaxValue * 10.0F", System.Byte.MaxValue * 10.0F) PrintResult("System.Byte.MaxValue * -11.0R", System.Byte.MaxValue * -11.0R) PrintResult("System.Byte.MaxValue * ""12""", System.Byte.MaxValue * "12") PrintResult("System.Byte.MaxValue * TypeCode.Double", System.Byte.MaxValue * TypeCode.Double) PrintResult("-3S * False", -3S * False) PrintResult("-3S * True", -3S * True) PrintResult("-3S * System.SByte.MinValue", -3S * System.SByte.MinValue) PrintResult("-3S * System.Byte.MaxValue", -3S * System.Byte.MaxValue) PrintResult("-3S * -3S", -3S * -3S) PrintResult("-3S * 24US", -3S * 24US) PrintResult("-3S * -5I", -3S * -5I) PrintResult("-3S * 26UI", -3S * 26UI) PrintResult("-3S * -7L", -3S * -7L) PrintResult("-3S * 28UL", -3S * 28UL) PrintResult("-3S * -9D", -3S * -9D) PrintResult("-3S * 10.0F", -3S * 10.0F) PrintResult("-3S * -11.0R", -3S * -11.0R) PrintResult("-3S * ""12""", -3S * "12") PrintResult("-3S * TypeCode.Double", -3S * TypeCode.Double) PrintResult("24US * False", 24US * False) PrintResult("24US * True", 24US * True) PrintResult("24US * System.SByte.MinValue", 24US * System.SByte.MinValue) PrintResult("24US * System.Byte.MaxValue", 24US * System.Byte.MaxValue) PrintResult("24US * -3S", 24US * -3S) PrintResult("24US * 24US", 24US * 24US) PrintResult("24US * -5I", 24US * -5I) PrintResult("24US * 26UI", 24US * 26UI) PrintResult("24US * -7L", 24US * -7L) PrintResult("24US * 28UL", 24US * 28UL) PrintResult("24US * -9D", 24US * -9D) PrintResult("24US * 10.0F", 24US * 10.0F) PrintResult("24US * -11.0R", 24US * -11.0R) PrintResult("24US * ""12""", 24US * "12") PrintResult("24US * TypeCode.Double", 24US * TypeCode.Double) PrintResult("-5I * False", -5I * False) PrintResult("-5I * True", -5I * True) PrintResult("-5I * System.SByte.MinValue", -5I * System.SByte.MinValue) PrintResult("-5I * System.Byte.MaxValue", -5I * System.Byte.MaxValue) PrintResult("-5I * -3S", -5I * -3S) PrintResult("-5I * 24US", -5I * 24US) PrintResult("-5I * -5I", -5I * -5I) PrintResult("-5I * 26UI", -5I * 26UI) PrintResult("-5I * -7L", -5I * -7L) PrintResult("-5I * 28UL", -5I * 28UL) PrintResult("-5I * -9D", -5I * -9D) PrintResult("-5I * 10.0F", -5I * 10.0F) PrintResult("-5I * -11.0R", -5I * -11.0R) PrintResult("-5I * ""12""", -5I * "12") PrintResult("-5I * TypeCode.Double", -5I * TypeCode.Double) PrintResult("26UI * False", 26UI * False) PrintResult("26UI * True", 26UI * True) PrintResult("26UI * System.SByte.MinValue", 26UI * System.SByte.MinValue) PrintResult("26UI * System.Byte.MaxValue", 26UI * System.Byte.MaxValue) PrintResult("26UI * -3S", 26UI * -3S) PrintResult("26UI * 24US", 26UI * 24US) PrintResult("26UI * -5I", 26UI * -5I) PrintResult("26UI * 26UI", 26UI * 26UI) PrintResult("26UI * -7L", 26UI * -7L) PrintResult("26UI * 28UL", 26UI * 28UL) PrintResult("26UI * -9D", 26UI * -9D) PrintResult("26UI * 10.0F", 26UI * 10.0F) PrintResult("26UI * -11.0R", 26UI * -11.0R) PrintResult("26UI * ""12""", 26UI * "12") PrintResult("26UI * TypeCode.Double", 26UI * TypeCode.Double) PrintResult("-7L * False", -7L * False) PrintResult("-7L * True", -7L * True) PrintResult("-7L * System.SByte.MinValue", -7L * System.SByte.MinValue) PrintResult("-7L * System.Byte.MaxValue", -7L * System.Byte.MaxValue) PrintResult("-7L * -3S", -7L * -3S) PrintResult("-7L * 24US", -7L * 24US) PrintResult("-7L * -5I", -7L * -5I) PrintResult("-7L * 26UI", -7L * 26UI) PrintResult("-7L * -7L", -7L * -7L) PrintResult("-7L * 28UL", -7L * 28UL) PrintResult("-7L * -9D", -7L * -9D) PrintResult("-7L * 10.0F", -7L * 10.0F) PrintResult("-7L * -11.0R", -7L * -11.0R) PrintResult("-7L * ""12""", -7L * "12") PrintResult("-7L * TypeCode.Double", -7L * TypeCode.Double) PrintResult("28UL * False", 28UL * False) PrintResult("28UL * True", 28UL * True) PrintResult("28UL * System.SByte.MinValue", 28UL * System.SByte.MinValue) PrintResult("28UL * System.Byte.MaxValue", 28UL * System.Byte.MaxValue) PrintResult("28UL * -3S", 28UL * -3S) PrintResult("28UL * 24US", 28UL * 24US) PrintResult("28UL * -5I", 28UL * -5I) PrintResult("28UL * 26UI", 28UL * 26UI) PrintResult("28UL * -7L", 28UL * -7L) PrintResult("28UL * 28UL", 28UL * 28UL) PrintResult("28UL * -9D", 28UL * -9D) PrintResult("28UL * 10.0F", 28UL * 10.0F) PrintResult("28UL * -11.0R", 28UL * -11.0R) PrintResult("28UL * ""12""", 28UL * "12") PrintResult("28UL * TypeCode.Double", 28UL * TypeCode.Double) PrintResult("-9D * False", -9D * False) PrintResult("-9D * True", -9D * True) PrintResult("-9D * System.SByte.MinValue", -9D * System.SByte.MinValue) PrintResult("-9D * System.Byte.MaxValue", -9D * System.Byte.MaxValue) PrintResult("-9D * -3S", -9D * -3S) PrintResult("-9D * 24US", -9D * 24US) PrintResult("-9D * -5I", -9D * -5I) PrintResult("-9D * 26UI", -9D * 26UI) PrintResult("-9D * -7L", -9D * -7L) PrintResult("-9D * 28UL", -9D * 28UL) PrintResult("-9D * -9D", -9D * -9D) PrintResult("-9D * 10.0F", -9D * 10.0F) PrintResult("-9D * -11.0R", -9D * -11.0R) PrintResult("-9D * ""12""", -9D * "12") PrintResult("-9D * TypeCode.Double", -9D * TypeCode.Double) PrintResult("10.0F * False", 10.0F * False) PrintResult("10.0F * True", 10.0F * True) PrintResult("10.0F * System.SByte.MinValue", 10.0F * System.SByte.MinValue) PrintResult("10.0F * System.Byte.MaxValue", 10.0F * System.Byte.MaxValue) PrintResult("10.0F * -3S", 10.0F * -3S) PrintResult("10.0F * 24US", 10.0F * 24US) PrintResult("10.0F * -5I", 10.0F * -5I) PrintResult("10.0F * 26UI", 10.0F * 26UI) PrintResult("10.0F * -7L", 10.0F * -7L) PrintResult("10.0F * 28UL", 10.0F * 28UL) PrintResult("10.0F * -9D", 10.0F * -9D) PrintResult("10.0F * 10.0F", 10.0F * 10.0F) PrintResult("10.0F * -11.0R", 10.0F * -11.0R) PrintResult("10.0F * ""12""", 10.0F * "12") PrintResult("10.0F * TypeCode.Double", 10.0F * TypeCode.Double) PrintResult("-11.0R * False", -11.0R * False) PrintResult("-11.0R * True", -11.0R * True) PrintResult("-11.0R * System.SByte.MinValue", -11.0R * System.SByte.MinValue) PrintResult("-11.0R * System.Byte.MaxValue", -11.0R * System.Byte.MaxValue) PrintResult("-11.0R * -3S", -11.0R * -3S) PrintResult("-11.0R * 24US", -11.0R * 24US) PrintResult("-11.0R * -5I", -11.0R * -5I) PrintResult("-11.0R * 26UI", -11.0R * 26UI) PrintResult("-11.0R * -7L", -11.0R * -7L) PrintResult("-11.0R * 28UL", -11.0R * 28UL) PrintResult("-11.0R * -9D", -11.0R * -9D) PrintResult("-11.0R * 10.0F", -11.0R * 10.0F) PrintResult("-11.0R * -11.0R", -11.0R * -11.0R) PrintResult("-11.0R * ""12""", -11.0R * "12") PrintResult("-11.0R * TypeCode.Double", -11.0R * TypeCode.Double) PrintResult("""12"" * False", "12" * False) PrintResult("""12"" * True", "12" * True) PrintResult("""12"" * System.SByte.MinValue", "12" * System.SByte.MinValue) PrintResult("""12"" * System.Byte.MaxValue", "12" * System.Byte.MaxValue) PrintResult("""12"" * -3S", "12" * -3S) PrintResult("""12"" * 24US", "12" * 24US) PrintResult("""12"" * -5I", "12" * -5I) PrintResult("""12"" * 26UI", "12" * 26UI) PrintResult("""12"" * -7L", "12" * -7L) PrintResult("""12"" * 28UL", "12" * 28UL) PrintResult("""12"" * -9D", "12" * -9D) PrintResult("""12"" * 10.0F", "12" * 10.0F) PrintResult("""12"" * -11.0R", "12" * -11.0R) PrintResult("""12"" * ""12""", "12" * "12") PrintResult("""12"" * TypeCode.Double", "12" * TypeCode.Double) PrintResult("TypeCode.Double * False", TypeCode.Double * False) PrintResult("TypeCode.Double * True", TypeCode.Double * True) PrintResult("TypeCode.Double * System.SByte.MinValue", TypeCode.Double * System.SByte.MinValue) PrintResult("TypeCode.Double * System.Byte.MaxValue", TypeCode.Double * System.Byte.MaxValue) PrintResult("TypeCode.Double * -3S", TypeCode.Double * -3S) PrintResult("TypeCode.Double * 24US", TypeCode.Double * 24US) PrintResult("TypeCode.Double * -5I", TypeCode.Double * -5I) PrintResult("TypeCode.Double * 26UI", TypeCode.Double * 26UI) PrintResult("TypeCode.Double * -7L", TypeCode.Double * -7L) PrintResult("TypeCode.Double * 28UL", TypeCode.Double * 28UL) PrintResult("TypeCode.Double * -9D", TypeCode.Double * -9D) PrintResult("TypeCode.Double * 10.0F", TypeCode.Double * 10.0F) PrintResult("TypeCode.Double * -11.0R", TypeCode.Double * -11.0R) PrintResult("TypeCode.Double * ""12""", TypeCode.Double * "12") PrintResult("TypeCode.Double * TypeCode.Double", TypeCode.Double * TypeCode.Double) PrintResult("False / False", False / False) PrintResult("False / True", False / True) PrintResult("False / System.SByte.MinValue", False / System.SByte.MinValue) PrintResult("False / System.Byte.MaxValue", False / System.Byte.MaxValue) PrintResult("False / -3S", False / -3S) PrintResult("False / 24US", False / 24US) PrintResult("False / -5I", False / -5I) PrintResult("False / 26UI", False / 26UI) PrintResult("False / -7L", False / -7L) PrintResult("False / 28UL", False / 28UL) PrintResult("False / -9D", False / -9D) PrintResult("False / 10.0F", False / 10.0F) PrintResult("False / -11.0R", False / -11.0R) PrintResult("False / ""12""", False / "12") PrintResult("False / TypeCode.Double", False / TypeCode.Double) PrintResult("True / False", True / False) PrintResult("True / True", True / True) PrintResult("True / System.SByte.MinValue", True / System.SByte.MinValue) PrintResult("True / System.Byte.MaxValue", True / System.Byte.MaxValue) PrintResult("True / -3S", True / -3S) PrintResult("True / 24US", True / 24US) PrintResult("True / -5I", True / -5I) PrintResult("True / 26UI", True / 26UI) PrintResult("True / -7L", True / -7L) PrintResult("True / 28UL", True / 28UL) PrintResult("True / -9D", True / -9D) PrintResult("True / 10.0F", True / 10.0F) PrintResult("True / -11.0R", True / -11.0R) PrintResult("True / ""12""", True / "12") PrintResult("True / TypeCode.Double", True / TypeCode.Double) PrintResult("System.SByte.MinValue / False", System.SByte.MinValue / False) PrintResult("System.SByte.MinValue / True", System.SByte.MinValue / True) PrintResult("System.SByte.MinValue / System.SByte.MinValue", System.SByte.MinValue / System.SByte.MinValue) PrintResult("System.SByte.MinValue / System.Byte.MaxValue", System.SByte.MinValue / System.Byte.MaxValue) PrintResult("System.SByte.MinValue / -3S", System.SByte.MinValue / -3S) PrintResult("System.SByte.MinValue / 24US", System.SByte.MinValue / 24US) PrintResult("System.SByte.MinValue / -5I", System.SByte.MinValue / -5I) PrintResult("System.SByte.MinValue / 26UI", System.SByte.MinValue / 26UI) PrintResult("System.SByte.MinValue / -7L", System.SByte.MinValue / -7L) PrintResult("System.SByte.MinValue / 28UL", System.SByte.MinValue / 28UL) PrintResult("System.SByte.MinValue / -9D", System.SByte.MinValue / -9D) PrintResult("System.SByte.MinValue / 10.0F", System.SByte.MinValue / 10.0F) PrintResult("System.SByte.MinValue / -11.0R", System.SByte.MinValue / -11.0R) PrintResult("System.SByte.MinValue / ""12""", System.SByte.MinValue / "12") PrintResult("System.SByte.MinValue / TypeCode.Double", System.SByte.MinValue / TypeCode.Double) PrintResult("System.Byte.MaxValue / False", System.Byte.MaxValue / False) PrintResult("System.Byte.MaxValue / True", System.Byte.MaxValue / True) PrintResult("System.Byte.MaxValue / System.SByte.MinValue", System.Byte.MaxValue / System.SByte.MinValue) PrintResult("System.Byte.MaxValue / System.Byte.MaxValue", System.Byte.MaxValue / System.Byte.MaxValue) PrintResult("System.Byte.MaxValue / -3S", System.Byte.MaxValue / -3S) PrintResult("System.Byte.MaxValue / 24US", System.Byte.MaxValue / 24US) PrintResult("System.Byte.MaxValue / -5I", System.Byte.MaxValue / -5I) PrintResult("System.Byte.MaxValue / 26UI", System.Byte.MaxValue / 26UI) PrintResult("System.Byte.MaxValue / -7L", System.Byte.MaxValue / -7L) PrintResult("System.Byte.MaxValue / 28UL", System.Byte.MaxValue / 28UL) PrintResult("System.Byte.MaxValue / -9D", System.Byte.MaxValue / -9D) PrintResult("System.Byte.MaxValue / 10.0F", System.Byte.MaxValue / 10.0F) PrintResult("System.Byte.MaxValue / -11.0R", System.Byte.MaxValue / -11.0R) PrintResult("System.Byte.MaxValue / ""12""", System.Byte.MaxValue / "12") PrintResult("System.Byte.MaxValue / TypeCode.Double", System.Byte.MaxValue / TypeCode.Double) PrintResult("-3S / False", -3S / False) PrintResult("-3S / True", -3S / True) PrintResult("-3S / System.SByte.MinValue", -3S / System.SByte.MinValue) PrintResult("-3S / System.Byte.MaxValue", -3S / System.Byte.MaxValue) PrintResult("-3S / -3S", -3S / -3S) PrintResult("-3S / 24US", -3S / 24US) PrintResult("-3S / -5I", -3S / -5I) PrintResult("-3S / 26UI", -3S / 26UI) PrintResult("-3S / -7L", -3S / -7L) PrintResult("-3S / 28UL", -3S / 28UL) PrintResult("-3S / -9D", -3S / -9D) PrintResult("-3S / 10.0F", -3S / 10.0F) PrintResult("-3S / -11.0R", -3S / -11.0R) PrintResult("-3S / ""12""", -3S / "12") PrintResult("-3S / TypeCode.Double", -3S / TypeCode.Double) PrintResult("24US / False", 24US / False) PrintResult("24US / True", 24US / True) PrintResult("24US / System.SByte.MinValue", 24US / System.SByte.MinValue) PrintResult("24US / System.Byte.MaxValue", 24US / System.Byte.MaxValue) PrintResult("24US / -3S", 24US / -3S) PrintResult("24US / 24US", 24US / 24US) PrintResult("24US / -5I", 24US / -5I) PrintResult("24US / 26UI", 24US / 26UI) PrintResult("24US / -7L", 24US / -7L) PrintResult("24US / 28UL", 24US / 28UL) PrintResult("24US / -9D", 24US / -9D) PrintResult("24US / 10.0F", 24US / 10.0F) PrintResult("24US / -11.0R", 24US / -11.0R) PrintResult("24US / ""12""", 24US / "12") PrintResult("24US / TypeCode.Double", 24US / TypeCode.Double) PrintResult("-5I / False", -5I / False) PrintResult("-5I / True", -5I / True) PrintResult("-5I / System.SByte.MinValue", -5I / System.SByte.MinValue) PrintResult("-5I / System.Byte.MaxValue", -5I / System.Byte.MaxValue) PrintResult("-5I / -3S", -5I / -3S) PrintResult("-5I / 24US", -5I / 24US) PrintResult("-5I / -5I", -5I / -5I) PrintResult("-5I / 26UI", -5I / 26UI) PrintResult("-5I / -7L", -5I / -7L) PrintResult("-5I / 28UL", -5I / 28UL) PrintResult("-5I / -9D", -5I / -9D) PrintResult("-5I / 10.0F", -5I / 10.0F) PrintResult("-5I / -11.0R", -5I / -11.0R) PrintResult("-5I / ""12""", -5I / "12") PrintResult("-5I / TypeCode.Double", -5I / TypeCode.Double) PrintResult("26UI / False", 26UI / False) PrintResult("26UI / True", 26UI / True) PrintResult("26UI / System.SByte.MinValue", 26UI / System.SByte.MinValue) PrintResult("26UI / System.Byte.MaxValue", 26UI / System.Byte.MaxValue) PrintResult("26UI / -3S", 26UI / -3S) PrintResult("26UI / 24US", 26UI / 24US) PrintResult("26UI / -5I", 26UI / -5I) PrintResult("26UI / 26UI", 26UI / 26UI) PrintResult("26UI / -7L", 26UI / -7L) PrintResult("26UI / 28UL", 26UI / 28UL) PrintResult("26UI / -9D", 26UI / -9D) PrintResult("26UI / 10.0F", 26UI / 10.0F) PrintResult("26UI / -11.0R", 26UI / -11.0R) PrintResult("26UI / ""12""", 26UI / "12") PrintResult("26UI / TypeCode.Double", 26UI / TypeCode.Double) PrintResult("-7L / False", -7L / False) PrintResult("-7L / True", -7L / True) PrintResult("-7L / System.SByte.MinValue", -7L / System.SByte.MinValue) PrintResult("-7L / System.Byte.MaxValue", -7L / System.Byte.MaxValue) PrintResult("-7L / -3S", -7L / -3S) PrintResult("-7L / 24US", -7L / 24US) PrintResult("-7L / -5I", -7L / -5I) PrintResult("-7L / 26UI", -7L / 26UI) PrintResult("-7L / -7L", -7L / -7L) PrintResult("-7L / 28UL", -7L / 28UL) PrintResult("-7L / -9D", -7L / -9D) PrintResult("-7L / 10.0F", -7L / 10.0F) PrintResult("-7L / -11.0R", -7L / -11.0R) PrintResult("-7L / ""12""", -7L / "12") PrintResult("-7L / TypeCode.Double", -7L / TypeCode.Double) PrintResult("28UL / False", 28UL / False) PrintResult("28UL / True", 28UL / True) PrintResult("28UL / System.SByte.MinValue", 28UL / System.SByte.MinValue) PrintResult("28UL / System.Byte.MaxValue", 28UL / System.Byte.MaxValue) PrintResult("28UL / -3S", 28UL / -3S) PrintResult("28UL / 24US", 28UL / 24US) PrintResult("28UL / -5I", 28UL / -5I) PrintResult("28UL / 26UI", 28UL / 26UI) PrintResult("28UL / -7L", 28UL / -7L) PrintResult("28UL / 28UL", 28UL / 28UL) PrintResult("28UL / -9D", 28UL / -9D) PrintResult("28UL / 10.0F", 28UL / 10.0F) PrintResult("28UL / -11.0R", 28UL / -11.0R) PrintResult("28UL / ""12""", 28UL / "12") PrintResult("28UL / TypeCode.Double", 28UL / TypeCode.Double) PrintResult("-9D / True", -9D / True) PrintResult("-9D / System.SByte.MinValue", -9D / System.SByte.MinValue) PrintResult("-9D / System.Byte.MaxValue", -9D / System.Byte.MaxValue) PrintResult("-9D / -3S", -9D / -3S) PrintResult("-9D / 24US", -9D / 24US) PrintResult("-9D / -5I", -9D / -5I) PrintResult("-9D / 26UI", -9D / 26UI) PrintResult("-9D / -7L", -9D / -7L) PrintResult("-9D / 28UL", -9D / 28UL) PrintResult("-9D / -9D", -9D / -9D) PrintResult("-9D / 10.0F", -9D / 10.0F) PrintResult("-9D / -11.0R", -9D / -11.0R) PrintResult("-9D / ""12""", -9D / "12") PrintResult("-9D / TypeCode.Double", -9D / TypeCode.Double) PrintResult("10.0F / False", 10.0F / False) PrintResult("10.0F / True", 10.0F / True) PrintResult("10.0F / System.SByte.MinValue", 10.0F / System.SByte.MinValue) PrintResult("10.0F / System.Byte.MaxValue", 10.0F / System.Byte.MaxValue) PrintResult("10.0F / -3S", 10.0F / -3S) PrintResult("10.0F / 24US", 10.0F / 24US) PrintResult("10.0F / -5I", 10.0F / -5I) PrintResult("10.0F / 26UI", 10.0F / 26UI) PrintResult("10.0F / -7L", 10.0F / -7L) PrintResult("10.0F / 28UL", 10.0F / 28UL) PrintResult("10.0F / -9D", 10.0F / -9D) PrintResult("10.0F / 10.0F", 10.0F / 10.0F) PrintResult("10.0F / -11.0R", 10.0F / -11.0R) PrintResult("10.0F / ""12""", 10.0F / "12") PrintResult("10.0F / TypeCode.Double", 10.0F / TypeCode.Double) PrintResult("-11.0R / False", -11.0R / False) PrintResult("-11.0R / True", -11.0R / True) PrintResult("-11.0R / System.SByte.MinValue", -11.0R / System.SByte.MinValue) PrintResult("-11.0R / System.Byte.MaxValue", -11.0R / System.Byte.MaxValue) PrintResult("-11.0R / -3S", -11.0R / -3S) PrintResult("-11.0R / 24US", -11.0R / 24US) PrintResult("-11.0R / -5I", -11.0R / -5I) PrintResult("-11.0R / 26UI", -11.0R / 26UI) PrintResult("-11.0R / -7L", -11.0R / -7L) PrintResult("-11.0R / 28UL", -11.0R / 28UL) PrintResult("-11.0R / -9D", -11.0R / -9D) PrintResult("-11.0R / 10.0F", -11.0R / 10.0F) PrintResult("-11.0R / -11.0R", -11.0R / -11.0R) PrintResult("-11.0R / ""12""", -11.0R / "12") PrintResult("-11.0R / TypeCode.Double", -11.0R / TypeCode.Double) PrintResult("""12"" / False", "12" / False) PrintResult("""12"" / True", "12" / True) PrintResult("""12"" / System.SByte.MinValue", "12" / System.SByte.MinValue) PrintResult("""12"" / System.Byte.MaxValue", "12" / System.Byte.MaxValue) PrintResult("""12"" / -3S", "12" / -3S) PrintResult("""12"" / 24US", "12" / 24US) PrintResult("""12"" / -5I", "12" / -5I) PrintResult("""12"" / 26UI", "12" / 26UI) PrintResult("""12"" / -7L", "12" / -7L) PrintResult("""12"" / 28UL", "12" / 28UL) PrintResult("""12"" / -9D", "12" / -9D) PrintResult("""12"" / 10.0F", "12" / 10.0F) PrintResult("""12"" / -11.0R", "12" / -11.0R) PrintResult("""12"" / ""12""", "12" / "12") PrintResult("""12"" / TypeCode.Double", "12" / TypeCode.Double) PrintResult("TypeCode.Double / False", TypeCode.Double / False) PrintResult("TypeCode.Double / True", TypeCode.Double / True) PrintResult("TypeCode.Double / System.SByte.MinValue", TypeCode.Double / System.SByte.MinValue) PrintResult("TypeCode.Double / System.Byte.MaxValue", TypeCode.Double / System.Byte.MaxValue) PrintResult("TypeCode.Double / -3S", TypeCode.Double / -3S) PrintResult("TypeCode.Double / 24US", TypeCode.Double / 24US) PrintResult("TypeCode.Double / -5I", TypeCode.Double / -5I) PrintResult("TypeCode.Double / 26UI", TypeCode.Double / 26UI) PrintResult("TypeCode.Double / -7L", TypeCode.Double / -7L) PrintResult("TypeCode.Double / 28UL", TypeCode.Double / 28UL) PrintResult("TypeCode.Double / -9D", TypeCode.Double / -9D) PrintResult("TypeCode.Double / 10.0F", TypeCode.Double / 10.0F) PrintResult("TypeCode.Double / -11.0R", TypeCode.Double / -11.0R) PrintResult("TypeCode.Double / ""12""", TypeCode.Double / "12") PrintResult("TypeCode.Double / TypeCode.Double", TypeCode.Double / TypeCode.Double) PrintResult("False \ True", False \ True) PrintResult("False \ System.SByte.MinValue", False \ System.SByte.MinValue) PrintResult("False \ System.Byte.MaxValue", False \ System.Byte.MaxValue) PrintResult("False \ -3S", False \ -3S) PrintResult("False \ 24US", False \ 24US) PrintResult("False \ -5I", False \ -5I) PrintResult("False \ 26UI", False \ 26UI) PrintResult("False \ -7L", False \ -7L) PrintResult("False \ 28UL", False \ 28UL) PrintResult("False \ -9D", False \ -9D) PrintResult("False \ 10.0F", False \ 10.0F) PrintResult("False \ -11.0R", False \ -11.0R) PrintResult("False \ ""12""", False \ "12") PrintResult("False \ TypeCode.Double", False \ TypeCode.Double) PrintResult("True \ True", True \ True) PrintResult("True \ System.SByte.MinValue", True \ System.SByte.MinValue) PrintResult("True \ System.Byte.MaxValue", True \ System.Byte.MaxValue) PrintResult("True \ -3S", True \ -3S) PrintResult("True \ 24US", True \ 24US) PrintResult("True \ -5I", True \ -5I) PrintResult("True \ 26UI", True \ 26UI) PrintResult("True \ -7L", True \ -7L) PrintResult("True \ 28UL", True \ 28UL) PrintResult("True \ -9D", True \ -9D) PrintResult("True \ 10.0F", True \ 10.0F) PrintResult("True \ -11.0R", True \ -11.0R) PrintResult("True \ ""12""", True \ "12") PrintResult("True \ TypeCode.Double", True \ TypeCode.Double) PrintResult("System.SByte.MaxValue \ True", System.SByte.MaxValue \ True) PrintResult("System.SByte.MinValue \ System.SByte.MinValue", System.SByte.MinValue \ System.SByte.MinValue) PrintResult("System.SByte.MinValue \ System.Byte.MaxValue", System.SByte.MinValue \ System.Byte.MaxValue) PrintResult("System.SByte.MinValue \ -3S", System.SByte.MinValue \ -3S) PrintResult("System.SByte.MinValue \ 24US", System.SByte.MinValue \ 24US) PrintResult("System.SByte.MinValue \ -5I", System.SByte.MinValue \ -5I) PrintResult("System.SByte.MinValue \ 26UI", System.SByte.MinValue \ 26UI) PrintResult("System.SByte.MinValue \ -7L", System.SByte.MinValue \ -7L) PrintResult("System.SByte.MinValue \ 28UL", System.SByte.MinValue \ 28UL) PrintResult("System.SByte.MinValue \ -9D", System.SByte.MinValue \ -9D) PrintResult("System.SByte.MinValue \ 10.0F", System.SByte.MinValue \ 10.0F) PrintResult("System.SByte.MinValue \ -11.0R", System.SByte.MinValue \ -11.0R) PrintResult("System.SByte.MinValue \ ""12""", System.SByte.MinValue \ "12") PrintResult("System.SByte.MinValue \ TypeCode.Double", System.SByte.MinValue \ TypeCode.Double) PrintResult("System.Byte.MaxValue \ True", System.Byte.MaxValue \ True) PrintResult("System.Byte.MaxValue \ System.SByte.MinValue", System.Byte.MaxValue \ System.SByte.MinValue) PrintResult("System.Byte.MaxValue \ System.Byte.MaxValue", System.Byte.MaxValue \ System.Byte.MaxValue) PrintResult("System.Byte.MaxValue \ -3S", System.Byte.MaxValue \ -3S) PrintResult("System.Byte.MaxValue \ 24US", System.Byte.MaxValue \ 24US) PrintResult("System.Byte.MaxValue \ -5I", System.Byte.MaxValue \ -5I) PrintResult("System.Byte.MaxValue \ 26UI", System.Byte.MaxValue \ 26UI) PrintResult("System.Byte.MaxValue \ -7L", System.Byte.MaxValue \ -7L) PrintResult("System.Byte.MaxValue \ 28UL", System.Byte.MaxValue \ 28UL) PrintResult("System.Byte.MaxValue \ -9D", System.Byte.MaxValue \ -9D) PrintResult("System.Byte.MaxValue \ 10.0F", System.Byte.MaxValue \ 10.0F) PrintResult("System.Byte.MaxValue \ -11.0R", System.Byte.MaxValue \ -11.0R) PrintResult("System.Byte.MaxValue \ ""12""", System.Byte.MaxValue \ "12") PrintResult("System.Byte.MaxValue \ TypeCode.Double", System.Byte.MaxValue \ TypeCode.Double) PrintResult("-3S \ True", -3S \ True) PrintResult("-3S \ System.SByte.MinValue", -3S \ System.SByte.MinValue) PrintResult("-3S \ System.Byte.MaxValue", -3S \ System.Byte.MaxValue) PrintResult("-3S \ -3S", -3S \ -3S) PrintResult("-3S \ 24US", -3S \ 24US) PrintResult("-3S \ -5I", -3S \ -5I) PrintResult("-3S \ 26UI", -3S \ 26UI) PrintResult("-3S \ -7L", -3S \ -7L) PrintResult("-3S \ 28UL", -3S \ 28UL) PrintResult("-3S \ -9D", -3S \ -9D) PrintResult("-3S \ 10.0F", -3S \ 10.0F) PrintResult("-3S \ -11.0R", -3S \ -11.0R) PrintResult("-3S \ ""12""", -3S \ "12") PrintResult("-3S \ TypeCode.Double", -3S \ TypeCode.Double) PrintResult("24US \ True", 24US \ True) PrintResult("24US \ System.SByte.MinValue", 24US \ System.SByte.MinValue) PrintResult("24US \ System.Byte.MaxValue", 24US \ System.Byte.MaxValue) PrintResult("24US \ -3S", 24US \ -3S) PrintResult("24US \ 24US", 24US \ 24US) PrintResult("24US \ -5I", 24US \ -5I) PrintResult("24US \ 26UI", 24US \ 26UI) PrintResult("24US \ -7L", 24US \ -7L) PrintResult("24US \ 28UL", 24US \ 28UL) PrintResult("24US \ -9D", 24US \ -9D) PrintResult("24US \ 10.0F", 24US \ 10.0F) PrintResult("24US \ -11.0R", 24US \ -11.0R) PrintResult("24US \ ""12""", 24US \ "12") PrintResult("24US \ TypeCode.Double", 24US \ TypeCode.Double) PrintResult("-5I \ True", -5I \ True) PrintResult("-5I \ System.SByte.MinValue", -5I \ System.SByte.MinValue) PrintResult("-5I \ System.Byte.MaxValue", -5I \ System.Byte.MaxValue) PrintResult("-5I \ -3S", -5I \ -3S) PrintResult("-5I \ 24US", -5I \ 24US) PrintResult("-5I \ -5I", -5I \ -5I) PrintResult("-5I \ 26UI", -5I \ 26UI) PrintResult("-5I \ -7L", -5I \ -7L) PrintResult("-5I \ 28UL", -5I \ 28UL) PrintResult("-5I \ -9D", -5I \ -9D) PrintResult("-5I \ 10.0F", -5I \ 10.0F) PrintResult("-5I \ -11.0R", -5I \ -11.0R) PrintResult("-5I \ ""12""", -5I \ "12") PrintResult("-5I \ TypeCode.Double", -5I \ TypeCode.Double) PrintResult("26UI \ True", 26UI \ True) PrintResult("26UI \ System.SByte.MinValue", 26UI \ System.SByte.MinValue) PrintResult("26UI \ System.Byte.MaxValue", 26UI \ System.Byte.MaxValue) PrintResult("26UI \ -3S", 26UI \ -3S) PrintResult("26UI \ 24US", 26UI \ 24US) PrintResult("26UI \ -5I", 26UI \ -5I) PrintResult("26UI \ 26UI", 26UI \ 26UI) PrintResult("26UI \ -7L", 26UI \ -7L) PrintResult("26UI \ 28UL", 26UI \ 28UL) PrintResult("26UI \ -9D", 26UI \ -9D) PrintResult("26UI \ 10.0F", 26UI \ 10.0F) PrintResult("26UI \ -11.0R", 26UI \ -11.0R) PrintResult("26UI \ ""12""", 26UI \ "12") PrintResult("26UI \ TypeCode.Double", 26UI \ TypeCode.Double) PrintResult("-7L \ True", -7L \ True) PrintResult("-7L \ System.SByte.MinValue", -7L \ System.SByte.MinValue) PrintResult("-7L \ System.Byte.MaxValue", -7L \ System.Byte.MaxValue) PrintResult("-7L \ -3S", -7L \ -3S) PrintResult("-7L \ 24US", -7L \ 24US) PrintResult("-7L \ -5I", -7L \ -5I) PrintResult("-7L \ 26UI", -7L \ 26UI) PrintResult("-7L \ -7L", -7L \ -7L) PrintResult("-7L \ 28UL", -7L \ 28UL) PrintResult("-7L \ -9D", -7L \ -9D) PrintResult("-7L \ 10.0F", -7L \ 10.0F) PrintResult("-7L \ -11.0R", -7L \ -11.0R) PrintResult("-7L \ ""12""", -7L \ "12") PrintResult("-7L \ TypeCode.Double", -7L \ TypeCode.Double) PrintResult("28UL \ True", 28UL \ True) PrintResult("28UL \ System.SByte.MinValue", 28UL \ System.SByte.MinValue) PrintResult("28UL \ System.Byte.MaxValue", 28UL \ System.Byte.MaxValue) PrintResult("28UL \ -3S", 28UL \ -3S) PrintResult("28UL \ 24US", 28UL \ 24US) PrintResult("28UL \ -5I", 28UL \ -5I) PrintResult("28UL \ 26UI", 28UL \ 26UI) PrintResult("28UL \ -7L", 28UL \ -7L) PrintResult("28UL \ 28UL", 28UL \ 28UL) PrintResult("28UL \ -9D", 28UL \ -9D) PrintResult("28UL \ 10.0F", 28UL \ 10.0F) PrintResult("28UL \ -11.0R", 28UL \ -11.0R) PrintResult("28UL \ ""12""", 28UL \ "12") PrintResult("28UL \ TypeCode.Double", 28UL \ TypeCode.Double) PrintResult("-9D \ True", -9D \ True) PrintResult("-9D \ System.SByte.MinValue", -9D \ System.SByte.MinValue) PrintResult("-9D \ System.Byte.MaxValue", -9D \ System.Byte.MaxValue) PrintResult("-9D \ -3S", -9D \ -3S) PrintResult("-9D \ 24US", -9D \ 24US) PrintResult("-9D \ -5I", -9D \ -5I) PrintResult("-9D \ 26UI", -9D \ 26UI) PrintResult("-9D \ -7L", -9D \ -7L) PrintResult("-9D \ 28UL", -9D \ 28UL) PrintResult("-9D \ -9D", -9D \ -9D) PrintResult("-9D \ 10.0F", -9D \ 10.0F) PrintResult("-9D \ -11.0R", -9D \ -11.0R) PrintResult("-9D \ ""12""", -9D \ "12") PrintResult("-9D \ TypeCode.Double", -9D \ TypeCode.Double) PrintResult("10.0F \ True", 10.0F \ True) PrintResult("10.0F \ System.SByte.MinValue", 10.0F \ System.SByte.MinValue) PrintResult("10.0F \ System.Byte.MaxValue", 10.0F \ System.Byte.MaxValue) PrintResult("10.0F \ -3S", 10.0F \ -3S) PrintResult("10.0F \ 24US", 10.0F \ 24US) PrintResult("10.0F \ -5I", 10.0F \ -5I) PrintResult("10.0F \ 26UI", 10.0F \ 26UI) PrintResult("10.0F \ -7L", 10.0F \ -7L) PrintResult("10.0F \ 28UL", 10.0F \ 28UL) PrintResult("10.0F \ -9D", 10.0F \ -9D) PrintResult("10.0F \ 10.0F", 10.0F \ 10.0F) PrintResult("10.0F \ -11.0R", 10.0F \ -11.0R) PrintResult("10.0F \ ""12""", 10.0F \ "12") PrintResult("10.0F \ TypeCode.Double", 10.0F \ TypeCode.Double) PrintResult("-11.0R \ True", -11.0R \ True) PrintResult("-11.0R \ System.SByte.MinValue", -11.0R \ System.SByte.MinValue) PrintResult("-11.0R \ System.Byte.MaxValue", -11.0R \ System.Byte.MaxValue) PrintResult("-11.0R \ -3S", -11.0R \ -3S) PrintResult("-11.0R \ 24US", -11.0R \ 24US) PrintResult("-11.0R \ -5I", -11.0R \ -5I) PrintResult("-11.0R \ 26UI", -11.0R \ 26UI) PrintResult("-11.0R \ -7L", -11.0R \ -7L) PrintResult("-11.0R \ 28UL", -11.0R \ 28UL) PrintResult("-11.0R \ -9D", -11.0R \ -9D) PrintResult("-11.0R \ 10.0F", -11.0R \ 10.0F) PrintResult("-11.0R \ -11.0R", -11.0R \ -11.0R) PrintResult("-11.0R \ ""12""", -11.0R \ "12") PrintResult("-11.0R \ TypeCode.Double", -11.0R \ TypeCode.Double) PrintResult("""12"" \ True", "12" \ True) PrintResult("""12"" \ System.SByte.MinValue", "12" \ System.SByte.MinValue) PrintResult("""12"" \ System.Byte.MaxValue", "12" \ System.Byte.MaxValue) PrintResult("""12"" \ -3S", "12" \ -3S) PrintResult("""12"" \ 24US", "12" \ 24US) PrintResult("""12"" \ -5I", "12" \ -5I) PrintResult("""12"" \ 26UI", "12" \ 26UI) PrintResult("""12"" \ -7L", "12" \ -7L) PrintResult("""12"" \ 28UL", "12" \ 28UL) PrintResult("""12"" \ -9D", "12" \ -9D) PrintResult("""12"" \ 10.0F", "12" \ 10.0F) PrintResult("""12"" \ -11.0R", "12" \ -11.0R) PrintResult("""12"" \ ""12""", "12" \ "12") PrintResult("""12"" \ TypeCode.Double", "12" \ TypeCode.Double) PrintResult("TypeCode.Double \ True", TypeCode.Double \ True) PrintResult("TypeCode.Double \ System.SByte.MinValue", TypeCode.Double \ System.SByte.MinValue) PrintResult("TypeCode.Double \ System.Byte.MaxValue", TypeCode.Double \ System.Byte.MaxValue) PrintResult("TypeCode.Double \ -3S", TypeCode.Double \ -3S) PrintResult("TypeCode.Double \ 24US", TypeCode.Double \ 24US) PrintResult("TypeCode.Double \ -5I", TypeCode.Double \ -5I) PrintResult("TypeCode.Double \ 26UI", TypeCode.Double \ 26UI) PrintResult("TypeCode.Double \ -7L", TypeCode.Double \ -7L) PrintResult("TypeCode.Double \ 28UL", TypeCode.Double \ 28UL) PrintResult("TypeCode.Double \ -9D", TypeCode.Double \ -9D) PrintResult("TypeCode.Double \ 10.0F", TypeCode.Double \ 10.0F) PrintResult("TypeCode.Double \ -11.0R", TypeCode.Double \ -11.0R) PrintResult("TypeCode.Double \ ""12""", TypeCode.Double \ "12") PrintResult("TypeCode.Double \ TypeCode.Double", TypeCode.Double \ TypeCode.Double) PrintResult("False Mod True", False Mod True) PrintResult("False Mod System.SByte.MinValue", False Mod System.SByte.MinValue) PrintResult("False Mod System.Byte.MaxValue", False Mod System.Byte.MaxValue) PrintResult("False Mod -3S", False Mod -3S) PrintResult("False Mod 24US", False Mod 24US) PrintResult("False Mod -5I", False Mod -5I) PrintResult("False Mod 26UI", False Mod 26UI) PrintResult("False Mod -7L", False Mod -7L) PrintResult("False Mod 28UL", False Mod 28UL) PrintResult("False Mod -9D", False Mod -9D) PrintResult("False Mod 10.0F", False Mod 10.0F) PrintResult("False Mod -11.0R", False Mod -11.0R) PrintResult("False Mod ""12""", False Mod "12") PrintResult("False Mod TypeCode.Double", False Mod TypeCode.Double) PrintResult("True Mod True", True Mod True) PrintResult("True Mod System.SByte.MinValue", True Mod System.SByte.MinValue) PrintResult("True Mod System.Byte.MaxValue", True Mod System.Byte.MaxValue) PrintResult("True Mod -3S", True Mod -3S) PrintResult("True Mod 24US", True Mod 24US) PrintResult("True Mod -5I", True Mod -5I) PrintResult("True Mod 26UI", True Mod 26UI) PrintResult("True Mod -7L", True Mod -7L) PrintResult("True Mod 28UL", True Mod 28UL) PrintResult("True Mod -9D", True Mod -9D) PrintResult("True Mod 10.0F", True Mod 10.0F) PrintResult("True Mod -11.0R", True Mod -11.0R) PrintResult("True Mod ""12""", True Mod "12") PrintResult("True Mod TypeCode.Double", True Mod TypeCode.Double) PrintResult("System.SByte.MinValue Mod True", System.SByte.MinValue Mod True) PrintResult("System.SByte.MinValue Mod System.SByte.MinValue", System.SByte.MinValue Mod System.SByte.MinValue) PrintResult("System.SByte.MinValue Mod System.Byte.MaxValue", System.SByte.MinValue Mod System.Byte.MaxValue) PrintResult("System.SByte.MinValue Mod -3S", System.SByte.MinValue Mod -3S) PrintResult("System.SByte.MinValue Mod 24US", System.SByte.MinValue Mod 24US) PrintResult("System.SByte.MinValue Mod -5I", System.SByte.MinValue Mod -5I) PrintResult("System.SByte.MinValue Mod 26UI", System.SByte.MinValue Mod 26UI) PrintResult("System.SByte.MinValue Mod -7L", System.SByte.MinValue Mod -7L) PrintResult("System.SByte.MinValue Mod 28UL", System.SByte.MinValue Mod 28UL) PrintResult("System.SByte.MinValue Mod -9D", System.SByte.MinValue Mod -9D) PrintResult("System.SByte.MinValue Mod 10.0F", System.SByte.MinValue Mod 10.0F) PrintResult("System.SByte.MinValue Mod -11.0R", System.SByte.MinValue Mod -11.0R) PrintResult("System.SByte.MinValue Mod ""12""", System.SByte.MinValue Mod "12") PrintResult("System.SByte.MinValue Mod TypeCode.Double", System.SByte.MinValue Mod TypeCode.Double) PrintResult("System.Byte.MaxValue Mod True", System.Byte.MaxValue Mod True) PrintResult("System.Byte.MaxValue Mod System.SByte.MinValue", System.Byte.MaxValue Mod System.SByte.MinValue) PrintResult("System.Byte.MaxValue Mod System.Byte.MaxValue", System.Byte.MaxValue Mod System.Byte.MaxValue) PrintResult("System.Byte.MaxValue Mod -3S", System.Byte.MaxValue Mod -3S) PrintResult("System.Byte.MaxValue Mod 24US", System.Byte.MaxValue Mod 24US) PrintResult("System.Byte.MaxValue Mod -5I", System.Byte.MaxValue Mod -5I) PrintResult("System.Byte.MaxValue Mod 26UI", System.Byte.MaxValue Mod 26UI) PrintResult("System.Byte.MaxValue Mod -7L", System.Byte.MaxValue Mod -7L) PrintResult("System.Byte.MaxValue Mod 28UL", System.Byte.MaxValue Mod 28UL) PrintResult("System.Byte.MaxValue Mod -9D", System.Byte.MaxValue Mod -9D) PrintResult("System.Byte.MaxValue Mod 10.0F", System.Byte.MaxValue Mod 10.0F) PrintResult("System.Byte.MaxValue Mod -11.0R", System.Byte.MaxValue Mod -11.0R) PrintResult("System.Byte.MaxValue Mod ""12""", System.Byte.MaxValue Mod "12") PrintResult("System.Byte.MaxValue Mod TypeCode.Double", System.Byte.MaxValue Mod TypeCode.Double) PrintResult("-3S Mod True", -3S Mod True) PrintResult("-3S Mod System.SByte.MinValue", -3S Mod System.SByte.MinValue) PrintResult("-3S Mod System.Byte.MaxValue", -3S Mod System.Byte.MaxValue) PrintResult("-3S Mod -3S", -3S Mod -3S) PrintResult("-3S Mod 24US", -3S Mod 24US) PrintResult("-3S Mod -5I", -3S Mod -5I) PrintResult("-3S Mod 26UI", -3S Mod 26UI) PrintResult("-3S Mod -7L", -3S Mod -7L) PrintResult("-3S Mod 28UL", -3S Mod 28UL) PrintResult("-3S Mod -9D", -3S Mod -9D) PrintResult("-3S Mod 10.0F", -3S Mod 10.0F) PrintResult("-3S Mod -11.0R", -3S Mod -11.0R) PrintResult("-3S Mod ""12""", -3S Mod "12") PrintResult("-3S Mod TypeCode.Double", -3S Mod TypeCode.Double) PrintResult("24US Mod True", 24US Mod True) PrintResult("24US Mod System.SByte.MinValue", 24US Mod System.SByte.MinValue) PrintResult("24US Mod System.Byte.MaxValue", 24US Mod System.Byte.MaxValue) PrintResult("24US Mod -3S", 24US Mod -3S) PrintResult("24US Mod 24US", 24US Mod 24US) PrintResult("24US Mod -5I", 24US Mod -5I) PrintResult("24US Mod 26UI", 24US Mod 26UI) PrintResult("24US Mod -7L", 24US Mod -7L) PrintResult("24US Mod 28UL", 24US Mod 28UL) PrintResult("24US Mod -9D", 24US Mod -9D) PrintResult("24US Mod 10.0F", 24US Mod 10.0F) PrintResult("24US Mod -11.0R", 24US Mod -11.0R) PrintResult("24US Mod ""12""", 24US Mod "12") PrintResult("24US Mod TypeCode.Double", 24US Mod TypeCode.Double) PrintResult("-5I Mod True", -5I Mod True) PrintResult("-5I Mod System.SByte.MinValue", -5I Mod System.SByte.MinValue) PrintResult("-5I Mod System.Byte.MaxValue", -5I Mod System.Byte.MaxValue) PrintResult("-5I Mod -3S", -5I Mod -3S) PrintResult("-5I Mod 24US", -5I Mod 24US) PrintResult("-5I Mod -5I", -5I Mod -5I) PrintResult("-5I Mod 26UI", -5I Mod 26UI) PrintResult("-5I Mod -7L", -5I Mod -7L) PrintResult("-5I Mod 28UL", -5I Mod 28UL) PrintResult("-5I Mod -9D", -5I Mod -9D) PrintResult("-5I Mod 10.0F", -5I Mod 10.0F) PrintResult("-5I Mod -11.0R", -5I Mod -11.0R) PrintResult("-5I Mod ""12""", -5I Mod "12") PrintResult("-5I Mod TypeCode.Double", -5I Mod TypeCode.Double) PrintResult("26UI Mod True", 26UI Mod True) PrintResult("26UI Mod System.SByte.MinValue", 26UI Mod System.SByte.MinValue) PrintResult("26UI Mod System.Byte.MaxValue", 26UI Mod System.Byte.MaxValue) PrintResult("26UI Mod -3S", 26UI Mod -3S) PrintResult("26UI Mod 24US", 26UI Mod 24US) PrintResult("26UI Mod -5I", 26UI Mod -5I) PrintResult("26UI Mod 26UI", 26UI Mod 26UI) PrintResult("26UI Mod -7L", 26UI Mod -7L) PrintResult("26UI Mod 28UL", 26UI Mod 28UL) PrintResult("26UI Mod -9D", 26UI Mod -9D) PrintResult("26UI Mod 10.0F", 26UI Mod 10.0F) PrintResult("26UI Mod -11.0R", 26UI Mod -11.0R) PrintResult("26UI Mod ""12""", 26UI Mod "12") PrintResult("26UI Mod TypeCode.Double", 26UI Mod TypeCode.Double) PrintResult("-7L Mod True", -7L Mod True) PrintResult("-7L Mod System.SByte.MinValue", -7L Mod System.SByte.MinValue) PrintResult("-7L Mod System.Byte.MaxValue", -7L Mod System.Byte.MaxValue) PrintResult("-7L Mod -3S", -7L Mod -3S) PrintResult("-7L Mod 24US", -7L Mod 24US) PrintResult("-7L Mod -5I", -7L Mod -5I) PrintResult("-7L Mod 26UI", -7L Mod 26UI) PrintResult("-7L Mod -7L", -7L Mod -7L) PrintResult("-7L Mod 28UL", -7L Mod 28UL) PrintResult("-7L Mod -9D", -7L Mod -9D) PrintResult("-7L Mod 10.0F", -7L Mod 10.0F) PrintResult("-7L Mod -11.0R", -7L Mod -11.0R) PrintResult("-7L Mod ""12""", -7L Mod "12") PrintResult("-7L Mod TypeCode.Double", -7L Mod TypeCode.Double) PrintResult("28UL Mod True", 28UL Mod True) PrintResult("28UL Mod System.SByte.MinValue", 28UL Mod System.SByte.MinValue) PrintResult("28UL Mod System.Byte.MaxValue", 28UL Mod System.Byte.MaxValue) PrintResult("28UL Mod -3S", 28UL Mod -3S) PrintResult("28UL Mod 24US", 28UL Mod 24US) PrintResult("28UL Mod -5I", 28UL Mod -5I) PrintResult("28UL Mod 26UI", 28UL Mod 26UI) PrintResult("28UL Mod -7L", 28UL Mod -7L) PrintResult("28UL Mod 28UL", 28UL Mod 28UL) PrintResult("28UL Mod -9D", 28UL Mod -9D) PrintResult("28UL Mod 10.0F", 28UL Mod 10.0F) PrintResult("28UL Mod -11.0R", 28UL Mod -11.0R) PrintResult("28UL Mod ""12""", 28UL Mod "12") PrintResult("28UL Mod TypeCode.Double", 28UL Mod TypeCode.Double) PrintResult("-9D Mod True", -9D Mod True) PrintResult("-9D Mod System.SByte.MinValue", -9D Mod System.SByte.MinValue) PrintResult("-9D Mod System.Byte.MaxValue", -9D Mod System.Byte.MaxValue) PrintResult("-9D Mod -3S", -9D Mod -3S) PrintResult("-9D Mod 24US", -9D Mod 24US) PrintResult("-9D Mod -5I", -9D Mod -5I) PrintResult("-9D Mod 26UI", -9D Mod 26UI) PrintResult("-9D Mod -7L", -9D Mod -7L) PrintResult("-9D Mod 28UL", -9D Mod 28UL) PrintResult("-9D Mod -9D", -9D Mod -9D) PrintResult("-9D Mod 10.0F", -9D Mod 10.0F) PrintResult("-9D Mod -11.0R", -9D Mod -11.0R) PrintResult("-9D Mod ""12""", -9D Mod "12") PrintResult("-9D Mod TypeCode.Double", -9D Mod TypeCode.Double) PrintResult("10.0F Mod True", 10.0F Mod True) PrintResult("10.0F Mod System.SByte.MinValue", 10.0F Mod System.SByte.MinValue) PrintResult("10.0F Mod System.Byte.MaxValue", 10.0F Mod System.Byte.MaxValue) PrintResult("10.0F Mod -3S", 10.0F Mod -3S) PrintResult("10.0F Mod 24US", 10.0F Mod 24US) PrintResult("10.0F Mod -5I", 10.0F Mod -5I) PrintResult("10.0F Mod 26UI", 10.0F Mod 26UI) PrintResult("10.0F Mod -7L", 10.0F Mod -7L) PrintResult("10.0F Mod 28UL", 10.0F Mod 28UL) PrintResult("10.0F Mod -9D", 10.0F Mod -9D) PrintResult("10.0F Mod 10.0F", 10.0F Mod 10.0F) PrintResult("10.0F Mod -11.0R", 10.0F Mod -11.0R) PrintResult("10.0F Mod ""12""", 10.0F Mod "12") PrintResult("10.0F Mod TypeCode.Double", 10.0F Mod TypeCode.Double) PrintResult("-11.0R Mod True", -11.0R Mod True) PrintResult("-11.0R Mod System.SByte.MinValue", -11.0R Mod System.SByte.MinValue) PrintResult("-11.0R Mod System.Byte.MaxValue", -11.0R Mod System.Byte.MaxValue) PrintResult("-11.0R Mod -3S", -11.0R Mod -3S) PrintResult("-11.0R Mod 24US", -11.0R Mod 24US) PrintResult("-11.0R Mod -5I", -11.0R Mod -5I) PrintResult("-11.0R Mod 26UI", -11.0R Mod 26UI) PrintResult("-11.0R Mod -7L", -11.0R Mod -7L) PrintResult("-11.0R Mod 28UL", -11.0R Mod 28UL) PrintResult("-11.0R Mod -9D", -11.0R Mod -9D) PrintResult("-11.0R Mod 10.0F", -11.0R Mod 10.0F) PrintResult("-11.0R Mod -11.0R", -11.0R Mod -11.0R) PrintResult("-11.0R Mod ""12""", -11.0R Mod "12") PrintResult("-11.0R Mod TypeCode.Double", -11.0R Mod TypeCode.Double) PrintResult("""12"" Mod True", "12" Mod True) PrintResult("""12"" Mod System.SByte.MinValue", "12" Mod System.SByte.MinValue) PrintResult("""12"" Mod System.Byte.MaxValue", "12" Mod System.Byte.MaxValue) PrintResult("""12"" Mod -3S", "12" Mod -3S) PrintResult("""12"" Mod 24US", "12" Mod 24US) PrintResult("""12"" Mod -5I", "12" Mod -5I) PrintResult("""12"" Mod 26UI", "12" Mod 26UI) PrintResult("""12"" Mod -7L", "12" Mod -7L) PrintResult("""12"" Mod 28UL", "12" Mod 28UL) PrintResult("""12"" Mod -9D", "12" Mod -9D) PrintResult("""12"" Mod 10.0F", "12" Mod 10.0F) PrintResult("""12"" Mod -11.0R", "12" Mod -11.0R) PrintResult("""12"" Mod ""12""", "12" Mod "12") PrintResult("""12"" Mod TypeCode.Double", "12" Mod TypeCode.Double) PrintResult("TypeCode.Double Mod True", TypeCode.Double Mod True) PrintResult("TypeCode.Double Mod System.SByte.MinValue", TypeCode.Double Mod System.SByte.MinValue) PrintResult("TypeCode.Double Mod System.Byte.MaxValue", TypeCode.Double Mod System.Byte.MaxValue) PrintResult("TypeCode.Double Mod -3S", TypeCode.Double Mod -3S) PrintResult("TypeCode.Double Mod 24US", TypeCode.Double Mod 24US) PrintResult("TypeCode.Double Mod -5I", TypeCode.Double Mod -5I) PrintResult("TypeCode.Double Mod 26UI", TypeCode.Double Mod 26UI) PrintResult("TypeCode.Double Mod -7L", TypeCode.Double Mod -7L) PrintResult("TypeCode.Double Mod 28UL", TypeCode.Double Mod 28UL) PrintResult("TypeCode.Double Mod -9D", TypeCode.Double Mod -9D) PrintResult("TypeCode.Double Mod 10.0F", TypeCode.Double Mod 10.0F) PrintResult("TypeCode.Double Mod -11.0R", TypeCode.Double Mod -11.0R) PrintResult("TypeCode.Double Mod ""12""", TypeCode.Double Mod "12") PrintResult("TypeCode.Double Mod TypeCode.Double", TypeCode.Double Mod TypeCode.Double) PrintResult("False ^ False", False ^ False) PrintResult("False ^ True", False ^ True) PrintResult("False ^ System.SByte.MinValue", False ^ System.SByte.MinValue) PrintResult("False ^ System.Byte.MaxValue", False ^ System.Byte.MaxValue) PrintResult("False ^ -3S", False ^ -3S) PrintResult("False ^ 24US", False ^ 24US) PrintResult("False ^ -5I", False ^ -5I) PrintResult("False ^ 26UI", False ^ 26UI) PrintResult("False ^ -7L", False ^ -7L) PrintResult("False ^ 28UL", False ^ 28UL) PrintResult("False ^ -9D", False ^ -9D) PrintResult("False ^ 10.0F", False ^ 10.0F) PrintResult("False ^ -11.0R", False ^ -11.0R) PrintResult("False ^ ""12""", False ^ "12") PrintResult("False ^ TypeCode.Double", False ^ TypeCode.Double) PrintResult("True ^ False", True ^ False) PrintResult("True ^ True", True ^ True) PrintResult("True ^ System.SByte.MinValue", True ^ System.SByte.MinValue) PrintResult("True ^ System.Byte.MaxValue", True ^ System.Byte.MaxValue) PrintResult("True ^ -3S", True ^ -3S) PrintResult("True ^ 24US", True ^ 24US) PrintResult("True ^ -5I", True ^ -5I) PrintResult("True ^ 26UI", True ^ 26UI) PrintResult("True ^ -7L", True ^ -7L) PrintResult("True ^ 28UL", True ^ 28UL) PrintResult("True ^ -9D", True ^ -9D) PrintResult("True ^ 10.0F", True ^ 10.0F) PrintResult("True ^ -11.0R", True ^ -11.0R) PrintResult("True ^ ""12""", True ^ "12") PrintResult("True ^ TypeCode.Double", True ^ TypeCode.Double) PrintResult("System.SByte.MinValue ^ False", System.SByte.MinValue ^ False) PrintResult("System.SByte.MinValue ^ True", System.SByte.MinValue ^ True) PrintResult("System.SByte.MinValue ^ System.SByte.MinValue", System.SByte.MinValue ^ System.SByte.MinValue) PrintResult("System.SByte.MinValue ^ System.Byte.MaxValue", System.SByte.MinValue ^ System.Byte.MaxValue) PrintResult("System.SByte.MinValue ^ -3S", System.SByte.MinValue ^ -3S) PrintResult("System.SByte.MinValue ^ 24US", System.SByte.MinValue ^ 24US) PrintResult("System.SByte.MinValue ^ -5I", System.SByte.MinValue ^ -5I) PrintResult("System.SByte.MinValue ^ 26UI", System.SByte.MinValue ^ 26UI) PrintResult("System.SByte.MinValue ^ -7L", System.SByte.MinValue ^ -7L) PrintResult("System.SByte.MinValue ^ 28UL", System.SByte.MinValue ^ 28UL) PrintResult("System.SByte.MinValue ^ -9D", System.SByte.MinValue ^ -9D) PrintResult("System.SByte.MinValue ^ 10.0F", System.SByte.MinValue ^ 10.0F) PrintResult("System.SByte.MinValue ^ -11.0R", System.SByte.MinValue ^ -11.0R) PrintResult("System.SByte.MinValue ^ ""12""", System.SByte.MinValue ^ "12") PrintResult("System.SByte.MinValue ^ TypeCode.Double", System.SByte.MinValue ^ TypeCode.Double) PrintResult("System.Byte.MaxValue ^ False", System.Byte.MaxValue ^ False) PrintResult("System.Byte.MaxValue ^ True", System.Byte.MaxValue ^ True) PrintResult("System.Byte.MaxValue ^ System.SByte.MinValue", System.Byte.MaxValue ^ System.SByte.MinValue) PrintResult("System.Byte.MaxValue ^ System.Byte.MaxValue", System.Byte.MaxValue ^ System.Byte.MaxValue) PrintResult("System.Byte.MaxValue ^ -3S", System.Byte.MaxValue ^ -3S) PrintResult("System.Byte.MaxValue ^ 24US", System.Byte.MaxValue ^ 24US) PrintResult("System.Byte.MaxValue ^ -5I", System.Byte.MaxValue ^ -5I) PrintResult("System.Byte.MaxValue ^ 26UI", System.Byte.MaxValue ^ 26UI) PrintResult("System.Byte.MaxValue ^ -7L", System.Byte.MaxValue ^ -7L) PrintResult("System.Byte.MaxValue ^ 28UL", System.Byte.MaxValue ^ 28UL) PrintResult("System.Byte.MaxValue ^ -9D", System.Byte.MaxValue ^ -9D) PrintResult("System.Byte.MaxValue ^ 10.0F", System.Byte.MaxValue ^ 10.0F) PrintResult("System.Byte.MaxValue ^ -11.0R", System.Byte.MaxValue ^ -11.0R) PrintResult("System.Byte.MaxValue ^ ""12""", System.Byte.MaxValue ^ "12") PrintResult("System.Byte.MaxValue ^ TypeCode.Double", System.Byte.MaxValue ^ TypeCode.Double) PrintResult("-3S ^ False", -3S ^ False) PrintResult("-3S ^ True", -3S ^ True) PrintResult("-3S ^ System.SByte.MinValue", -3S ^ System.SByte.MinValue) PrintResult("-3S ^ System.Byte.MaxValue", -3S ^ System.Byte.MaxValue) PrintResult("-3S ^ -3S", -3S ^ -3S) PrintResult("-3S ^ 24US", -3S ^ 24US) PrintResult("-3S ^ -5I", -3S ^ -5I) PrintResult("-3S ^ 26UI", -3S ^ 26UI) PrintResult("-3S ^ -7L", -3S ^ -7L) PrintResult("-3S ^ 28UL", -3S ^ 28UL) PrintResult("-3S ^ -9D", -3S ^ -9D) PrintResult("-3S ^ 10.0F", -3S ^ 10.0F) PrintResult("-3S ^ -11.0R", -3S ^ -11.0R) PrintResult("-3S ^ ""12""", -3S ^ "12") PrintResult("-3S ^ TypeCode.Double", -3S ^ TypeCode.Double) PrintResult("24US ^ False", 24US ^ False) PrintResult("24US ^ True", 24US ^ True) PrintResult("24US ^ System.SByte.MinValue", 24US ^ System.SByte.MinValue) PrintResult("24US ^ System.Byte.MaxValue", 24US ^ System.Byte.MaxValue) PrintResult("24US ^ -3S", 24US ^ -3S) PrintResult("24US ^ 24US", 24US ^ 24US) PrintResult("24US ^ -5I", 24US ^ -5I) PrintResult("24US ^ 26UI", 24US ^ 26UI) PrintResult("24US ^ -7L", 24US ^ -7L) PrintResult("24US ^ 28UL", 24US ^ 28UL) PrintResult("24US ^ -9D", 24US ^ -9D) PrintResult("24US ^ 10.0F", 24US ^ 10.0F) PrintResult("24US ^ -11.0R", 24US ^ -11.0R) PrintResult("24US ^ ""12""", 24US ^ "12") PrintResult("24US ^ TypeCode.Double", 24US ^ TypeCode.Double) PrintResult("-5I ^ False", -5I ^ False) PrintResult("-5I ^ True", -5I ^ True) PrintResult("-5I ^ System.SByte.MinValue", -5I ^ System.SByte.MinValue) PrintResult("-5I ^ System.Byte.MaxValue", -5I ^ System.Byte.MaxValue) PrintResult("-5I ^ -3S", -5I ^ -3S) PrintResult("-5I ^ 24US", -5I ^ 24US) PrintResult("-5I ^ -5I", -5I ^ -5I) PrintResult("-5I ^ 26UI", -5I ^ 26UI) PrintResult("-5I ^ -7L", -5I ^ -7L) PrintResult("-5I ^ 28UL", -5I ^ 28UL) PrintResult("-5I ^ -9D", -5I ^ -9D) PrintResult("-5I ^ 10.0F", -5I ^ 10.0F) PrintResult("-5I ^ -11.0R", -5I ^ -11.0R) PrintResult("-5I ^ ""12""", -5I ^ "12") PrintResult("-5I ^ TypeCode.Double", -5I ^ TypeCode.Double) PrintResult("26UI ^ False", 26UI ^ False) PrintResult("26UI ^ True", 26UI ^ True) PrintResult("26UI ^ System.SByte.MinValue", 26UI ^ System.SByte.MinValue) PrintResult("26UI ^ System.Byte.MaxValue", 26UI ^ System.Byte.MaxValue) PrintResult("26UI ^ -3S", 26UI ^ -3S) PrintResult("26UI ^ 24US", 26UI ^ 24US) PrintResult("26UI ^ -5I", 26UI ^ -5I) PrintResult("26UI ^ 26UI", 26UI ^ 26UI) PrintResult("26UI ^ -7L", 26UI ^ -7L) PrintResult("26UI ^ 28UL", 26UI ^ 28UL) PrintResult("26UI ^ -9D", 26UI ^ -9D) PrintResult("26UI ^ 10.0F", 26UI ^ 10.0F) PrintResult("26UI ^ -11.0R", 26UI ^ -11.0R) PrintResult("26UI ^ ""12""", 26UI ^ "12") PrintResult("26UI ^ TypeCode.Double", 26UI ^ TypeCode.Double) PrintResult("-7L ^ False", -7L ^ False) PrintResult("-7L ^ True", -7L ^ True) PrintResult("-7L ^ System.SByte.MinValue", -7L ^ System.SByte.MinValue) PrintResult("-7L ^ System.Byte.MaxValue", -7L ^ System.Byte.MaxValue) PrintResult("-7L ^ -3S", -7L ^ -3S) PrintResult("-7L ^ 24US", -7L ^ 24US) PrintResult("-7L ^ -5I", -7L ^ -5I) PrintResult("-7L ^ 26UI", -7L ^ 26UI) PrintResult("-7L ^ -7L", -7L ^ -7L) PrintResult("-7L ^ 28UL", -7L ^ 28UL) PrintResult("-7L ^ -9D", -7L ^ -9D) PrintResult("-7L ^ 10.0F", -7L ^ 10.0F) PrintResult("-7L ^ -11.0R", -7L ^ -11.0R) PrintResult("-7L ^ ""12""", -7L ^ "12") PrintResult("-7L ^ TypeCode.Double", -7L ^ TypeCode.Double) PrintResult("28UL ^ False", 28UL ^ False) PrintResult("28UL ^ True", 28UL ^ True) PrintResult("28UL ^ System.SByte.MinValue", 28UL ^ System.SByte.MinValue) PrintResult("28UL ^ System.Byte.MaxValue", 28UL ^ System.Byte.MaxValue) PrintResult("28UL ^ -3S", 28UL ^ -3S) PrintResult("28UL ^ 24US", 28UL ^ 24US) PrintResult("28UL ^ -5I", 28UL ^ -5I) PrintResult("28UL ^ 26UI", 28UL ^ 26UI) PrintResult("28UL ^ -7L", 28UL ^ -7L) PrintResult("28UL ^ 28UL", 28UL ^ 28UL) PrintResult("28UL ^ -9D", 28UL ^ -9D) PrintResult("28UL ^ 10.0F", 28UL ^ 10.0F) PrintResult("28UL ^ -11.0R", 28UL ^ -11.0R) PrintResult("28UL ^ ""12""", 28UL ^ "12") PrintResult("28UL ^ TypeCode.Double", 28UL ^ TypeCode.Double) PrintResult("-9D ^ False", -9D ^ False) PrintResult("-9D ^ True", -9D ^ True) PrintResult("-9D ^ System.SByte.MinValue", -9D ^ System.SByte.MinValue) PrintResult("-9D ^ System.Byte.MaxValue", -9D ^ System.Byte.MaxValue) PrintResult("-9D ^ -3S", -9D ^ -3S) PrintResult("-9D ^ 24US", -9D ^ 24US) PrintResult("-9D ^ -5I", -9D ^ -5I) PrintResult("-9D ^ 26UI", -9D ^ 26UI) PrintResult("-9D ^ -7L", -9D ^ -7L) PrintResult("-9D ^ 28UL", -9D ^ 28UL) PrintResult("-9D ^ -9D", -9D ^ -9D) PrintResult("-9D ^ 10.0F", -9D ^ 10.0F) PrintResult("-9D ^ -11.0R", -9D ^ -11.0R) PrintResult("-9D ^ ""12""", -9D ^ "12") PrintResult("-9D ^ TypeCode.Double", -9D ^ TypeCode.Double) PrintResult("10.0F ^ False", 10.0F ^ False) PrintResult("10.0F ^ True", 10.0F ^ True) PrintResult("10.0F ^ System.SByte.MinValue", 10.0F ^ System.SByte.MinValue) PrintResult("10.0F ^ System.Byte.MaxValue", 10.0F ^ System.Byte.MaxValue) PrintResult("10.0F ^ -3S", 10.0F ^ -3S) PrintResult("10.0F ^ 24US", 10.0F ^ 24US) PrintResult("10.0F ^ -5I", 10.0F ^ -5I) PrintResult("10.0F ^ 26UI", 10.0F ^ 26UI) PrintResult("10.0F ^ -7L", 10.0F ^ -7L) PrintResult("10.0F ^ 28UL", 10.0F ^ 28UL) PrintResult("10.0F ^ -9D", 10.0F ^ -9D) PrintResult("10.0F ^ 10.0F", 10.0F ^ 10.0F) PrintResult("10.0F ^ -11.0R", 10.0F ^ -11.0R) PrintResult("10.0F ^ ""12""", 10.0F ^ "12") PrintResult("10.0F ^ TypeCode.Double", 10.0F ^ TypeCode.Double) PrintResult("-11.0R ^ False", -11.0R ^ False) PrintResult("-11.0R ^ True", -11.0R ^ True) PrintResult("-11.0R ^ System.SByte.MinValue", -11.0R ^ System.SByte.MinValue) PrintResult("-11.0R ^ System.Byte.MaxValue", -11.0R ^ System.Byte.MaxValue) PrintResult("-11.0R ^ -3S", -11.0R ^ -3S) PrintResult("-11.0R ^ 24US", -11.0R ^ 24US) PrintResult("-11.0R ^ -5I", -11.0R ^ -5I) PrintResult("-11.0R ^ 26UI", -11.0R ^ 26UI) PrintResult("-11.0R ^ -7L", -11.0R ^ -7L) PrintResult("-11.0R ^ 28UL", -11.0R ^ 28UL) PrintResult("-11.0R ^ -9D", -11.0R ^ -9D) PrintResult("-11.0R ^ 10.0F", -11.0R ^ 10.0F) PrintResult("-11.0R ^ -11.0R", -11.0R ^ -11.0R) PrintResult("-11.0R ^ ""12""", -11.0R ^ "12") PrintResult("-11.0R ^ TypeCode.Double", -11.0R ^ TypeCode.Double) PrintResult("""12"" ^ False", "12" ^ False) PrintResult("""12"" ^ True", "12" ^ True) PrintResult("""12"" ^ System.SByte.MinValue", "12" ^ System.SByte.MinValue) PrintResult("""12"" ^ System.Byte.MaxValue", "12" ^ System.Byte.MaxValue) PrintResult("""12"" ^ -3S", "12" ^ -3S) PrintResult("""12"" ^ 24US", "12" ^ 24US) PrintResult("""12"" ^ -5I", "12" ^ -5I) PrintResult("""12"" ^ 26UI", "12" ^ 26UI) PrintResult("""12"" ^ -7L", "12" ^ -7L) PrintResult("""12"" ^ 28UL", "12" ^ 28UL) PrintResult("""12"" ^ -9D", "12" ^ -9D) PrintResult("""12"" ^ 10.0F", "12" ^ 10.0F) PrintResult("""12"" ^ -11.0R", "12" ^ -11.0R) PrintResult("""12"" ^ ""12""", "12" ^ "12") PrintResult("""12"" ^ TypeCode.Double", "12" ^ TypeCode.Double) PrintResult("TypeCode.Double ^ False", TypeCode.Double ^ False) PrintResult("TypeCode.Double ^ True", TypeCode.Double ^ True) PrintResult("TypeCode.Double ^ System.SByte.MinValue", TypeCode.Double ^ System.SByte.MinValue) PrintResult("TypeCode.Double ^ System.Byte.MaxValue", TypeCode.Double ^ System.Byte.MaxValue) PrintResult("TypeCode.Double ^ -3S", TypeCode.Double ^ -3S) PrintResult("TypeCode.Double ^ 24US", TypeCode.Double ^ 24US) PrintResult("TypeCode.Double ^ -5I", TypeCode.Double ^ -5I) PrintResult("TypeCode.Double ^ 26UI", TypeCode.Double ^ 26UI) PrintResult("TypeCode.Double ^ -7L", TypeCode.Double ^ -7L) PrintResult("TypeCode.Double ^ 28UL", TypeCode.Double ^ 28UL) PrintResult("TypeCode.Double ^ -9D", TypeCode.Double ^ -9D) PrintResult("TypeCode.Double ^ 10.0F", TypeCode.Double ^ 10.0F) PrintResult("TypeCode.Double ^ -11.0R", TypeCode.Double ^ -11.0R) PrintResult("TypeCode.Double ^ ""12""", TypeCode.Double ^ "12") PrintResult("TypeCode.Double ^ TypeCode.Double", TypeCode.Double ^ TypeCode.Double) PrintResult("False << False", False << False) PrintResult("False << True", False << True) PrintResult("False << System.SByte.MinValue", False << System.SByte.MinValue) PrintResult("False << System.Byte.MaxValue", False << System.Byte.MaxValue) PrintResult("False << -3S", False << -3S) PrintResult("False << 24US", False << 24US) PrintResult("False << -5I", False << -5I) PrintResult("False << 26UI", False << 26UI) PrintResult("False << -7L", False << -7L) PrintResult("False << 28UL", False << 28UL) PrintResult("False << -9D", False << -9D) PrintResult("False << 10.0F", False << 10.0F) PrintResult("False << -11.0R", False << -11.0R) PrintResult("False << ""12""", False << "12") PrintResult("False << TypeCode.Double", False << TypeCode.Double) PrintResult("True << False", True << False) PrintResult("True << True", True << True) PrintResult("True << System.SByte.MinValue", True << System.SByte.MinValue) PrintResult("True << System.Byte.MaxValue", True << System.Byte.MaxValue) PrintResult("True << -3S", True << -3S) PrintResult("True << 24US", True << 24US) PrintResult("True << -5I", True << -5I) PrintResult("True << 26UI", True << 26UI) PrintResult("True << -7L", True << -7L) PrintResult("True << 28UL", True << 28UL) PrintResult("True << -9D", True << -9D) PrintResult("True << 10.0F", True << 10.0F) PrintResult("True << -11.0R", True << -11.0R) PrintResult("True << ""12""", True << "12") PrintResult("True << TypeCode.Double", True << TypeCode.Double) PrintResult("System.SByte.MinValue << False", System.SByte.MinValue << False) PrintResult("System.SByte.MinValue << True", System.SByte.MinValue << True) PrintResult("System.SByte.MinValue << System.SByte.MinValue", System.SByte.MinValue << System.SByte.MinValue) PrintResult("System.SByte.MinValue << System.Byte.MaxValue", System.SByte.MinValue << System.Byte.MaxValue) PrintResult("System.SByte.MinValue << -3S", System.SByte.MinValue << -3S) PrintResult("System.SByte.MinValue << 24US", System.SByte.MinValue << 24US) PrintResult("System.SByte.MinValue << -5I", System.SByte.MinValue << -5I) PrintResult("System.SByte.MinValue << 26UI", System.SByte.MinValue << 26UI) PrintResult("System.SByte.MinValue << -7L", System.SByte.MinValue << -7L) PrintResult("System.SByte.MinValue << 28UL", System.SByte.MinValue << 28UL) PrintResult("System.SByte.MinValue << -9D", System.SByte.MinValue << -9D) PrintResult("System.SByte.MinValue << 10.0F", System.SByte.MinValue << 10.0F) PrintResult("System.SByte.MinValue << -11.0R", System.SByte.MinValue << -11.0R) PrintResult("System.SByte.MinValue << ""12""", System.SByte.MinValue << "12") PrintResult("System.SByte.MinValue << TypeCode.Double", System.SByte.MinValue << TypeCode.Double) PrintResult("System.Byte.MaxValue << False", System.Byte.MaxValue << False) PrintResult("System.Byte.MaxValue << True", System.Byte.MaxValue << True) PrintResult("System.Byte.MaxValue << System.SByte.MinValue", System.Byte.MaxValue << System.SByte.MinValue) PrintResult("System.Byte.MaxValue << System.Byte.MaxValue", System.Byte.MaxValue << System.Byte.MaxValue) PrintResult("System.Byte.MaxValue << -3S", System.Byte.MaxValue << -3S) PrintResult("System.Byte.MaxValue << 24US", System.Byte.MaxValue << 24US) PrintResult("System.Byte.MaxValue << -5I", System.Byte.MaxValue << -5I) PrintResult("System.Byte.MaxValue << 26UI", System.Byte.MaxValue << 26UI) PrintResult("System.Byte.MaxValue << -7L", System.Byte.MaxValue << -7L) PrintResult("System.Byte.MaxValue << 28UL", System.Byte.MaxValue << 28UL) PrintResult("System.Byte.MaxValue << -9D", System.Byte.MaxValue << -9D) PrintResult("System.Byte.MaxValue << 10.0F", System.Byte.MaxValue << 10.0F) PrintResult("System.Byte.MaxValue << -11.0R", System.Byte.MaxValue << -11.0R) PrintResult("System.Byte.MaxValue << ""12""", System.Byte.MaxValue << "12") PrintResult("System.Byte.MaxValue << TypeCode.Double", System.Byte.MaxValue << TypeCode.Double) PrintResult("-3S << False", -3S << False) PrintResult("-3S << True", -3S << True) PrintResult("-3S << System.SByte.MinValue", -3S << System.SByte.MinValue) PrintResult("-3S << System.Byte.MaxValue", -3S << System.Byte.MaxValue) PrintResult("-3S << -3S", -3S << -3S) PrintResult("-3S << 24US", -3S << 24US) PrintResult("-3S << -5I", -3S << -5I) PrintResult("-3S << 26UI", -3S << 26UI) PrintResult("-3S << -7L", -3S << -7L) PrintResult("-3S << 28UL", -3S << 28UL) PrintResult("-3S << -9D", -3S << -9D) PrintResult("-3S << 10.0F", -3S << 10.0F) PrintResult("-3S << -11.0R", -3S << -11.0R) PrintResult("-3S << ""12""", -3S << "12") PrintResult("-3S << TypeCode.Double", -3S << TypeCode.Double) PrintResult("24US << False", 24US << False) PrintResult("24US << True", 24US << True) PrintResult("24US << System.SByte.MinValue", 24US << System.SByte.MinValue) PrintResult("24US << System.Byte.MaxValue", 24US << System.Byte.MaxValue) PrintResult("24US << -3S", 24US << -3S) PrintResult("24US << 24US", 24US << 24US) PrintResult("24US << -5I", 24US << -5I) PrintResult("24US << 26UI", 24US << 26UI) PrintResult("24US << -7L", 24US << -7L) PrintResult("24US << 28UL", 24US << 28UL) PrintResult("24US << -9D", 24US << -9D) PrintResult("24US << 10.0F", 24US << 10.0F) PrintResult("24US << -11.0R", 24US << -11.0R) PrintResult("24US << ""12""", 24US << "12") PrintResult("24US << TypeCode.Double", 24US << TypeCode.Double) PrintResult("-5I << False", -5I << False) PrintResult("-5I << True", -5I << True) PrintResult("-5I << System.SByte.MinValue", -5I << System.SByte.MinValue) PrintResult("-5I << System.Byte.MaxValue", -5I << System.Byte.MaxValue) PrintResult("-5I << -3S", -5I << -3S) PrintResult("-5I << 24US", -5I << 24US) PrintResult("-5I << -5I", -5I << -5I) PrintResult("-5I << 26UI", -5I << 26UI) PrintResult("-5I << -7L", -5I << -7L) PrintResult("-5I << 28UL", -5I << 28UL) PrintResult("-5I << -9D", -5I << -9D) PrintResult("-5I << 10.0F", -5I << 10.0F) PrintResult("-5I << -11.0R", -5I << -11.0R) PrintResult("-5I << ""12""", -5I << "12") PrintResult("-5I << TypeCode.Double", -5I << TypeCode.Double) PrintResult("26UI << False", 26UI << False) PrintResult("26UI << True", 26UI << True) PrintResult("26UI << System.SByte.MinValue", 26UI << System.SByte.MinValue) PrintResult("26UI << System.Byte.MaxValue", 26UI << System.Byte.MaxValue) PrintResult("26UI << -3S", 26UI << -3S) PrintResult("26UI << 24US", 26UI << 24US) PrintResult("26UI << -5I", 26UI << -5I) PrintResult("26UI << 26UI", 26UI << 26UI) PrintResult("26UI << -7L", 26UI << -7L) PrintResult("26UI << 28UL", 26UI << 28UL) PrintResult("26UI << -9D", 26UI << -9D) PrintResult("26UI << 10.0F", 26UI << 10.0F) PrintResult("26UI << -11.0R", 26UI << -11.0R) PrintResult("26UI << ""12""", 26UI << "12") PrintResult("26UI << TypeCode.Double", 26UI << TypeCode.Double) PrintResult("-7L << False", -7L << False) PrintResult("-7L << True", -7L << True) PrintResult("-7L << System.SByte.MinValue", -7L << System.SByte.MinValue) PrintResult("-7L << System.Byte.MaxValue", -7L << System.Byte.MaxValue) PrintResult("-7L << -3S", -7L << -3S) PrintResult("-7L << 24US", -7L << 24US) PrintResult("-7L << -5I", -7L << -5I) PrintResult("-7L << 26UI", -7L << 26UI) PrintResult("-7L << -7L", -7L << -7L) PrintResult("-7L << 28UL", -7L << 28UL) PrintResult("-7L << -9D", -7L << -9D) PrintResult("-7L << 10.0F", -7L << 10.0F) PrintResult("-7L << -11.0R", -7L << -11.0R) PrintResult("-7L << ""12""", -7L << "12") PrintResult("-7L << TypeCode.Double", -7L << TypeCode.Double) PrintResult("28UL << False", 28UL << False) PrintResult("28UL << True", 28UL << True) PrintResult("28UL << System.SByte.MinValue", 28UL << System.SByte.MinValue) PrintResult("28UL << System.Byte.MaxValue", 28UL << System.Byte.MaxValue) PrintResult("28UL << -3S", 28UL << -3S) PrintResult("28UL << 24US", 28UL << 24US) PrintResult("28UL << -5I", 28UL << -5I) PrintResult("28UL << 26UI", 28UL << 26UI) PrintResult("28UL << -7L", 28UL << -7L) PrintResult("28UL << 28UL", 28UL << 28UL) PrintResult("28UL << -9D", 28UL << -9D) PrintResult("28UL << 10.0F", 28UL << 10.0F) PrintResult("28UL << -11.0R", 28UL << -11.0R) PrintResult("28UL << ""12""", 28UL << "12") PrintResult("28UL << TypeCode.Double", 28UL << TypeCode.Double) PrintResult("-9D << False", -9D << False) PrintResult("-9D << True", -9D << True) PrintResult("-9D << System.SByte.MinValue", -9D << System.SByte.MinValue) PrintResult("-9D << System.Byte.MaxValue", -9D << System.Byte.MaxValue) PrintResult("-9D << -3S", -9D << -3S) PrintResult("-9D << 24US", -9D << 24US) PrintResult("-9D << -5I", -9D << -5I) PrintResult("-9D << 26UI", -9D << 26UI) PrintResult("-9D << -7L", -9D << -7L) PrintResult("-9D << 28UL", -9D << 28UL) PrintResult("-9D << -9D", -9D << -9D) PrintResult("-9D << 10.0F", -9D << 10.0F) PrintResult("-9D << -11.0R", -9D << -11.0R) PrintResult("-9D << ""12""", -9D << "12") PrintResult("-9D << TypeCode.Double", -9D << TypeCode.Double) PrintResult("10.0F << False", 10.0F << False) PrintResult("10.0F << True", 10.0F << True) PrintResult("10.0F << System.SByte.MinValue", 10.0F << System.SByte.MinValue) PrintResult("10.0F << System.Byte.MaxValue", 10.0F << System.Byte.MaxValue) PrintResult("10.0F << -3S", 10.0F << -3S) PrintResult("10.0F << 24US", 10.0F << 24US) PrintResult("10.0F << -5I", 10.0F << -5I) PrintResult("10.0F << 26UI", 10.0F << 26UI) PrintResult("10.0F << -7L", 10.0F << -7L) PrintResult("10.0F << 28UL", 10.0F << 28UL) PrintResult("10.0F << -9D", 10.0F << -9D) PrintResult("10.0F << 10.0F", 10.0F << 10.0F) PrintResult("10.0F << -11.0R", 10.0F << -11.0R) PrintResult("10.0F << ""12""", 10.0F << "12") PrintResult("10.0F << TypeCode.Double", 10.0F << TypeCode.Double) PrintResult("-11.0R << False", -11.0R << False) PrintResult("-11.0R << True", -11.0R << True) PrintResult("-11.0R << System.SByte.MinValue", -11.0R << System.SByte.MinValue) PrintResult("-11.0R << System.Byte.MaxValue", -11.0R << System.Byte.MaxValue) PrintResult("-11.0R << -3S", -11.0R << -3S) PrintResult("-11.0R << 24US", -11.0R << 24US) PrintResult("-11.0R << -5I", -11.0R << -5I) PrintResult("-11.0R << 26UI", -11.0R << 26UI) PrintResult("-11.0R << -7L", -11.0R << -7L) PrintResult("-11.0R << 28UL", -11.0R << 28UL) PrintResult("-11.0R << -9D", -11.0R << -9D) PrintResult("-11.0R << 10.0F", -11.0R << 10.0F) PrintResult("-11.0R << -11.0R", -11.0R << -11.0R) PrintResult("-11.0R << ""12""", -11.0R << "12") PrintResult("-11.0R << TypeCode.Double", -11.0R << TypeCode.Double) PrintResult("""12"" << False", "12" << False) PrintResult("""12"" << True", "12" << True) PrintResult("""12"" << System.SByte.MinValue", "12" << System.SByte.MinValue) PrintResult("""12"" << System.Byte.MaxValue", "12" << System.Byte.MaxValue) PrintResult("""12"" << -3S", "12" << -3S) PrintResult("""12"" << 24US", "12" << 24US) PrintResult("""12"" << -5I", "12" << -5I) PrintResult("""12"" << 26UI", "12" << 26UI) PrintResult("""12"" << -7L", "12" << -7L) PrintResult("""12"" << 28UL", "12" << 28UL) PrintResult("""12"" << -9D", "12" << -9D) PrintResult("""12"" << 10.0F", "12" << 10.0F) PrintResult("""12"" << -11.0R", "12" << -11.0R) PrintResult("""12"" << ""12""", "12" << "12") PrintResult("""12"" << TypeCode.Double", "12" << TypeCode.Double) PrintResult("TypeCode.Double << False", TypeCode.Double << False) PrintResult("TypeCode.Double << True", TypeCode.Double << True) PrintResult("TypeCode.Double << System.SByte.MinValue", TypeCode.Double << System.SByte.MinValue) PrintResult("TypeCode.Double << System.Byte.MaxValue", TypeCode.Double << System.Byte.MaxValue) PrintResult("TypeCode.Double << -3S", TypeCode.Double << -3S) PrintResult("TypeCode.Double << 24US", TypeCode.Double << 24US) PrintResult("TypeCode.Double << -5I", TypeCode.Double << -5I) PrintResult("TypeCode.Double << 26UI", TypeCode.Double << 26UI) PrintResult("TypeCode.Double << -7L", TypeCode.Double << -7L) PrintResult("TypeCode.Double << 28UL", TypeCode.Double << 28UL) PrintResult("TypeCode.Double << -9D", TypeCode.Double << -9D) PrintResult("TypeCode.Double << 10.0F", TypeCode.Double << 10.0F) PrintResult("TypeCode.Double << -11.0R", TypeCode.Double << -11.0R) PrintResult("TypeCode.Double << ""12""", TypeCode.Double << "12") PrintResult("TypeCode.Double << TypeCode.Double", TypeCode.Double << TypeCode.Double) PrintResult("False >> False", False >> False) PrintResult("False >> True", False >> True) PrintResult("False >> System.SByte.MinValue", False >> System.SByte.MinValue) PrintResult("False >> System.Byte.MaxValue", False >> System.Byte.MaxValue) PrintResult("False >> -3S", False >> -3S) PrintResult("False >> 24US", False >> 24US) PrintResult("False >> -5I", False >> -5I) PrintResult("False >> 26UI", False >> 26UI) PrintResult("False >> -7L", False >> -7L) PrintResult("False >> 28UL", False >> 28UL) PrintResult("False >> -9D", False >> -9D) PrintResult("False >> 10.0F", False >> 10.0F) PrintResult("False >> -11.0R", False >> -11.0R) PrintResult("False >> ""12""", False >> "12") PrintResult("False >> TypeCode.Double", False >> TypeCode.Double) PrintResult("True >> False", True >> False) PrintResult("True >> True", True >> True) PrintResult("True >> System.SByte.MinValue", True >> System.SByte.MinValue) PrintResult("True >> System.Byte.MaxValue", True >> System.Byte.MaxValue) PrintResult("True >> -3S", True >> -3S) PrintResult("True >> 24US", True >> 24US) PrintResult("True >> -5I", True >> -5I) PrintResult("True >> 26UI", True >> 26UI) PrintResult("True >> -7L", True >> -7L) PrintResult("True >> 28UL", True >> 28UL) PrintResult("True >> -9D", True >> -9D) PrintResult("True >> 10.0F", True >> 10.0F) PrintResult("True >> -11.0R", True >> -11.0R) PrintResult("True >> ""12""", True >> "12") PrintResult("True >> TypeCode.Double", True >> TypeCode.Double) PrintResult("System.SByte.MinValue >> False", System.SByte.MinValue >> False) PrintResult("System.SByte.MinValue >> True", System.SByte.MinValue >> True) PrintResult("System.SByte.MinValue >> System.SByte.MinValue", System.SByte.MinValue >> System.SByte.MinValue) PrintResult("System.SByte.MinValue >> System.Byte.MaxValue", System.SByte.MinValue >> System.Byte.MaxValue) PrintResult("System.SByte.MinValue >> -3S", System.SByte.MinValue >> -3S) PrintResult("System.SByte.MinValue >> 24US", System.SByte.MinValue >> 24US) PrintResult("System.SByte.MinValue >> -5I", System.SByte.MinValue >> -5I) PrintResult("System.SByte.MinValue >> 26UI", System.SByte.MinValue >> 26UI) PrintResult("System.SByte.MinValue >> -7L", System.SByte.MinValue >> -7L) PrintResult("System.SByte.MinValue >> 28UL", System.SByte.MinValue >> 28UL) PrintResult("System.SByte.MinValue >> -9D", System.SByte.MinValue >> -9D) PrintResult("System.SByte.MinValue >> 10.0F", System.SByte.MinValue >> 10.0F) PrintResult("System.SByte.MinValue >> -11.0R", System.SByte.MinValue >> -11.0R) PrintResult("System.SByte.MinValue >> ""12""", System.SByte.MinValue >> "12") PrintResult("System.SByte.MinValue >> TypeCode.Double", System.SByte.MinValue >> TypeCode.Double) PrintResult("System.Byte.MaxValue >> False", System.Byte.MaxValue >> False) PrintResult("System.Byte.MaxValue >> True", System.Byte.MaxValue >> True) PrintResult("System.Byte.MaxValue >> System.SByte.MinValue", System.Byte.MaxValue >> System.SByte.MinValue) PrintResult("System.Byte.MaxValue >> System.Byte.MaxValue", System.Byte.MaxValue >> System.Byte.MaxValue) PrintResult("System.Byte.MaxValue >> -3S", System.Byte.MaxValue >> -3S) PrintResult("System.Byte.MaxValue >> 24US", System.Byte.MaxValue >> 24US) PrintResult("System.Byte.MaxValue >> -5I", System.Byte.MaxValue >> -5I) PrintResult("System.Byte.MaxValue >> 26UI", System.Byte.MaxValue >> 26UI) PrintResult("System.Byte.MaxValue >> -7L", System.Byte.MaxValue >> -7L) PrintResult("System.Byte.MaxValue >> 28UL", System.Byte.MaxValue >> 28UL) PrintResult("System.Byte.MaxValue >> -9D", System.Byte.MaxValue >> -9D) PrintResult("System.Byte.MaxValue >> 10.0F", System.Byte.MaxValue >> 10.0F) PrintResult("System.Byte.MaxValue >> -11.0R", System.Byte.MaxValue >> -11.0R) PrintResult("System.Byte.MaxValue >> ""12""", System.Byte.MaxValue >> "12") PrintResult("System.Byte.MaxValue >> TypeCode.Double", System.Byte.MaxValue >> TypeCode.Double) PrintResult("-3S >> False", -3S >> False) PrintResult("-3S >> True", -3S >> True) PrintResult("-3S >> System.SByte.MinValue", -3S >> System.SByte.MinValue) PrintResult("-3S >> System.Byte.MaxValue", -3S >> System.Byte.MaxValue) PrintResult("-3S >> -3S", -3S >> -3S) PrintResult("-3S >> 24US", -3S >> 24US) PrintResult("-3S >> -5I", -3S >> -5I) PrintResult("-3S >> 26UI", -3S >> 26UI) PrintResult("-3S >> -7L", -3S >> -7L) PrintResult("-3S >> 28UL", -3S >> 28UL) PrintResult("-3S >> -9D", -3S >> -9D) PrintResult("-3S >> 10.0F", -3S >> 10.0F) PrintResult("-3S >> -11.0R", -3S >> -11.0R) PrintResult("-3S >> ""12""", -3S >> "12") PrintResult("-3S >> TypeCode.Double", -3S >> TypeCode.Double) PrintResult("24US >> False", 24US >> False) PrintResult("24US >> True", 24US >> True) PrintResult("24US >> System.SByte.MinValue", 24US >> System.SByte.MinValue) PrintResult("24US >> System.Byte.MaxValue", 24US >> System.Byte.MaxValue) PrintResult("24US >> -3S", 24US >> -3S) PrintResult("24US >> 24US", 24US >> 24US) PrintResult("24US >> -5I", 24US >> -5I) PrintResult("24US >> 26UI", 24US >> 26UI) PrintResult("24US >> -7L", 24US >> -7L) PrintResult("24US >> 28UL", 24US >> 28UL) PrintResult("24US >> -9D", 24US >> -9D) PrintResult("24US >> 10.0F", 24US >> 10.0F) PrintResult("24US >> -11.0R", 24US >> -11.0R) PrintResult("24US >> ""12""", 24US >> "12") PrintResult("24US >> TypeCode.Double", 24US >> TypeCode.Double) PrintResult("-5I >> False", -5I >> False) PrintResult("-5I >> True", -5I >> True) PrintResult("-5I >> System.SByte.MinValue", -5I >> System.SByte.MinValue) PrintResult("-5I >> System.Byte.MaxValue", -5I >> System.Byte.MaxValue) PrintResult("-5I >> -3S", -5I >> -3S) PrintResult("-5I >> 24US", -5I >> 24US) PrintResult("-5I >> -5I", -5I >> -5I) PrintResult("-5I >> 26UI", -5I >> 26UI) PrintResult("-5I >> -7L", -5I >> -7L) PrintResult("-5I >> 28UL", -5I >> 28UL) PrintResult("-5I >> -9D", -5I >> -9D) PrintResult("-5I >> 10.0F", -5I >> 10.0F) PrintResult("-5I >> -11.0R", -5I >> -11.0R) PrintResult("-5I >> ""12""", -5I >> "12") PrintResult("-5I >> TypeCode.Double", -5I >> TypeCode.Double) PrintResult("26UI >> False", 26UI >> False) PrintResult("26UI >> True", 26UI >> True) PrintResult("26UI >> System.SByte.MinValue", 26UI >> System.SByte.MinValue) PrintResult("26UI >> System.Byte.MaxValue", 26UI >> System.Byte.MaxValue) PrintResult("26UI >> -3S", 26UI >> -3S) PrintResult("26UI >> 24US", 26UI >> 24US) PrintResult("26UI >> -5I", 26UI >> -5I) PrintResult("26UI >> 26UI", 26UI >> 26UI) PrintResult("26UI >> -7L", 26UI >> -7L) PrintResult("26UI >> 28UL", 26UI >> 28UL) PrintResult("26UI >> -9D", 26UI >> -9D) PrintResult("26UI >> 10.0F", 26UI >> 10.0F) PrintResult("26UI >> -11.0R", 26UI >> -11.0R) PrintResult("26UI >> ""12""", 26UI >> "12") PrintResult("26UI >> TypeCode.Double", 26UI >> TypeCode.Double) PrintResult("-7L >> False", -7L >> False) PrintResult("-7L >> True", -7L >> True) PrintResult("-7L >> System.SByte.MinValue", -7L >> System.SByte.MinValue) PrintResult("-7L >> System.Byte.MaxValue", -7L >> System.Byte.MaxValue) PrintResult("-7L >> -3S", -7L >> -3S) PrintResult("-7L >> 24US", -7L >> 24US) PrintResult("-7L >> -5I", -7L >> -5I) PrintResult("-7L >> 26UI", -7L >> 26UI) PrintResult("-7L >> -7L", -7L >> -7L) PrintResult("-7L >> 28UL", -7L >> 28UL) PrintResult("-7L >> -9D", -7L >> -9D) PrintResult("-7L >> 10.0F", -7L >> 10.0F) PrintResult("-7L >> -11.0R", -7L >> -11.0R) PrintResult("-7L >> ""12""", -7L >> "12") PrintResult("-7L >> TypeCode.Double", -7L >> TypeCode.Double) PrintResult("28UL >> False", 28UL >> False) PrintResult("28UL >> True", 28UL >> True) PrintResult("28UL >> System.SByte.MinValue", 28UL >> System.SByte.MinValue) PrintResult("28UL >> System.Byte.MaxValue", 28UL >> System.Byte.MaxValue) PrintResult("28UL >> -3S", 28UL >> -3S) PrintResult("28UL >> 24US", 28UL >> 24US) PrintResult("28UL >> -5I", 28UL >> -5I) PrintResult("28UL >> 26UI", 28UL >> 26UI) PrintResult("28UL >> -7L", 28UL >> -7L) PrintResult("28UL >> 28UL", 28UL >> 28UL) PrintResult("28UL >> -9D", 28UL >> -9D) PrintResult("28UL >> 10.0F", 28UL >> 10.0F) PrintResult("28UL >> -11.0R", 28UL >> -11.0R) PrintResult("28UL >> ""12""", 28UL >> "12") PrintResult("28UL >> TypeCode.Double", 28UL >> TypeCode.Double) PrintResult("-9D >> False", -9D >> False) PrintResult("-9D >> True", -9D >> True) PrintResult("-9D >> System.SByte.MinValue", -9D >> System.SByte.MinValue) PrintResult("-9D >> System.Byte.MaxValue", -9D >> System.Byte.MaxValue) PrintResult("-9D >> -3S", -9D >> -3S) PrintResult("-9D >> 24US", -9D >> 24US) PrintResult("-9D >> -5I", -9D >> -5I) PrintResult("-9D >> 26UI", -9D >> 26UI) PrintResult("-9D >> -7L", -9D >> -7L) PrintResult("-9D >> 28UL", -9D >> 28UL) PrintResult("-9D >> -9D", -9D >> -9D) PrintResult("-9D >> 10.0F", -9D >> 10.0F) PrintResult("-9D >> -11.0R", -9D >> -11.0R) PrintResult("-9D >> ""12""", -9D >> "12") PrintResult("-9D >> TypeCode.Double", -9D >> TypeCode.Double) PrintResult("10.0F >> False", 10.0F >> False) PrintResult("10.0F >> True", 10.0F >> True) PrintResult("10.0F >> System.SByte.MinValue", 10.0F >> System.SByte.MinValue) PrintResult("10.0F >> System.Byte.MaxValue", 10.0F >> System.Byte.MaxValue) PrintResult("10.0F >> -3S", 10.0F >> -3S) PrintResult("10.0F >> 24US", 10.0F >> 24US) PrintResult("10.0F >> -5I", 10.0F >> -5I) PrintResult("10.0F >> 26UI", 10.0F >> 26UI) PrintResult("10.0F >> -7L", 10.0F >> -7L) PrintResult("10.0F >> 28UL", 10.0F >> 28UL) PrintResult("10.0F >> -9D", 10.0F >> -9D) PrintResult("10.0F >> 10.0F", 10.0F >> 10.0F) PrintResult("10.0F >> -11.0R", 10.0F >> -11.0R) PrintResult("10.0F >> ""12""", 10.0F >> "12") PrintResult("10.0F >> TypeCode.Double", 10.0F >> TypeCode.Double) PrintResult("-11.0R >> False", -11.0R >> False) PrintResult("-11.0R >> True", -11.0R >> True) PrintResult("-11.0R >> System.SByte.MinValue", -11.0R >> System.SByte.MinValue) PrintResult("-11.0R >> System.Byte.MaxValue", -11.0R >> System.Byte.MaxValue) PrintResult("-11.0R >> -3S", -11.0R >> -3S) PrintResult("-11.0R >> 24US", -11.0R >> 24US) PrintResult("-11.0R >> -5I", -11.0R >> -5I) PrintResult("-11.0R >> 26UI", -11.0R >> 26UI) PrintResult("-11.0R >> -7L", -11.0R >> -7L) PrintResult("-11.0R >> 28UL", -11.0R >> 28UL) PrintResult("-11.0R >> -9D", -11.0R >> -9D) PrintResult("-11.0R >> 10.0F", -11.0R >> 10.0F) PrintResult("-11.0R >> -11.0R", -11.0R >> -11.0R) PrintResult("-11.0R >> ""12""", -11.0R >> "12") PrintResult("-11.0R >> TypeCode.Double", -11.0R >> TypeCode.Double) PrintResult("""12"" >> False", "12" >> False) PrintResult("""12"" >> True", "12" >> True) PrintResult("""12"" >> System.SByte.MinValue", "12" >> System.SByte.MinValue) PrintResult("""12"" >> System.Byte.MaxValue", "12" >> System.Byte.MaxValue) PrintResult("""12"" >> -3S", "12" >> -3S) PrintResult("""12"" >> 24US", "12" >> 24US) PrintResult("""12"" >> -5I", "12" >> -5I) PrintResult("""12"" >> 26UI", "12" >> 26UI) PrintResult("""12"" >> -7L", "12" >> -7L) PrintResult("""12"" >> 28UL", "12" >> 28UL) PrintResult("""12"" >> -9D", "12" >> -9D) PrintResult("""12"" >> 10.0F", "12" >> 10.0F) PrintResult("""12"" >> -11.0R", "12" >> -11.0R) PrintResult("""12"" >> ""12""", "12" >> "12") PrintResult("""12"" >> TypeCode.Double", "12" >> TypeCode.Double) PrintResult("TypeCode.Double >> False", TypeCode.Double >> False) PrintResult("TypeCode.Double >> True", TypeCode.Double >> True) PrintResult("TypeCode.Double >> System.SByte.MinValue", TypeCode.Double >> System.SByte.MinValue) PrintResult("TypeCode.Double >> System.Byte.MaxValue", TypeCode.Double >> System.Byte.MaxValue) PrintResult("TypeCode.Double >> -3S", TypeCode.Double >> -3S) PrintResult("TypeCode.Double >> 24US", TypeCode.Double >> 24US) PrintResult("TypeCode.Double >> -5I", TypeCode.Double >> -5I) PrintResult("TypeCode.Double >> 26UI", TypeCode.Double >> 26UI) PrintResult("TypeCode.Double >> -7L", TypeCode.Double >> -7L) PrintResult("TypeCode.Double >> 28UL", TypeCode.Double >> 28UL) PrintResult("TypeCode.Double >> -9D", TypeCode.Double >> -9D) PrintResult("TypeCode.Double >> 10.0F", TypeCode.Double >> 10.0F) PrintResult("TypeCode.Double >> -11.0R", TypeCode.Double >> -11.0R) PrintResult("TypeCode.Double >> ""12""", TypeCode.Double >> "12") PrintResult("TypeCode.Double >> TypeCode.Double", TypeCode.Double >> TypeCode.Double) PrintResult("False OrElse False", False OrElse False) PrintResult("False OrElse True", False OrElse True) PrintResult("False OrElse System.SByte.MinValue", False OrElse System.SByte.MinValue) PrintResult("False OrElse System.Byte.MaxValue", False OrElse System.Byte.MaxValue) PrintResult("False OrElse -3S", False OrElse -3S) PrintResult("False OrElse 24US", False OrElse 24US) PrintResult("False OrElse -5I", False OrElse -5I) PrintResult("False OrElse 26UI", False OrElse 26UI) PrintResult("False OrElse -7L", False OrElse -7L) PrintResult("False OrElse 28UL", False OrElse 28UL) PrintResult("False OrElse -9D", False OrElse -9D) PrintResult("False OrElse 10.0F", False OrElse 10.0F) PrintResult("False OrElse -11.0R", False OrElse -11.0R) PrintResult("False OrElse ""12""", False OrElse "12") PrintResult("False OrElse TypeCode.Double", False OrElse TypeCode.Double) PrintResult("True OrElse False", True OrElse False) PrintResult("True OrElse True", True OrElse True) PrintResult("True OrElse System.SByte.MinValue", True OrElse System.SByte.MinValue) PrintResult("True OrElse System.Byte.MaxValue", True OrElse System.Byte.MaxValue) PrintResult("True OrElse -3S", True OrElse -3S) PrintResult("True OrElse 24US", True OrElse 24US) PrintResult("True OrElse -5I", True OrElse -5I) PrintResult("True OrElse 26UI", True OrElse 26UI) PrintResult("True OrElse -7L", True OrElse -7L) PrintResult("True OrElse 28UL", True OrElse 28UL) PrintResult("True OrElse -9D", True OrElse -9D) PrintResult("True OrElse 10.0F", True OrElse 10.0F) PrintResult("True OrElse -11.0R", True OrElse -11.0R) PrintResult("True OrElse ""12""", True OrElse "12") PrintResult("True OrElse TypeCode.Double", True OrElse TypeCode.Double) PrintResult("System.SByte.MinValue OrElse False", System.SByte.MinValue OrElse False) PrintResult("System.SByte.MinValue OrElse True", System.SByte.MinValue OrElse True) PrintResult("System.SByte.MinValue OrElse System.SByte.MinValue", System.SByte.MinValue OrElse System.SByte.MinValue) PrintResult("System.SByte.MinValue OrElse System.Byte.MaxValue", System.SByte.MinValue OrElse System.Byte.MaxValue) PrintResult("System.SByte.MinValue OrElse -3S", System.SByte.MinValue OrElse -3S) PrintResult("System.SByte.MinValue OrElse 24US", System.SByte.MinValue OrElse 24US) PrintResult("System.SByte.MinValue OrElse -5I", System.SByte.MinValue OrElse -5I) PrintResult("System.SByte.MinValue OrElse 26UI", System.SByte.MinValue OrElse 26UI) PrintResult("System.SByte.MinValue OrElse -7L", System.SByte.MinValue OrElse -7L) PrintResult("System.SByte.MinValue OrElse 28UL", System.SByte.MinValue OrElse 28UL) PrintResult("System.SByte.MinValue OrElse -9D", System.SByte.MinValue OrElse -9D) PrintResult("System.SByte.MinValue OrElse 10.0F", System.SByte.MinValue OrElse 10.0F) PrintResult("System.SByte.MinValue OrElse -11.0R", System.SByte.MinValue OrElse -11.0R) PrintResult("System.SByte.MinValue OrElse ""12""", System.SByte.MinValue OrElse "12") PrintResult("System.SByte.MinValue OrElse TypeCode.Double", System.SByte.MinValue OrElse TypeCode.Double) PrintResult("System.Byte.MaxValue OrElse False", System.Byte.MaxValue OrElse False) PrintResult("System.Byte.MaxValue OrElse True", System.Byte.MaxValue OrElse True) PrintResult("System.Byte.MaxValue OrElse System.SByte.MinValue", System.Byte.MaxValue OrElse System.SByte.MinValue) PrintResult("System.Byte.MaxValue OrElse System.Byte.MaxValue", System.Byte.MaxValue OrElse System.Byte.MaxValue) PrintResult("System.Byte.MaxValue OrElse -3S", System.Byte.MaxValue OrElse -3S) PrintResult("System.Byte.MaxValue OrElse 24US", System.Byte.MaxValue OrElse 24US) PrintResult("System.Byte.MaxValue OrElse -5I", System.Byte.MaxValue OrElse -5I) PrintResult("System.Byte.MaxValue OrElse 26UI", System.Byte.MaxValue OrElse 26UI) PrintResult("System.Byte.MaxValue OrElse -7L", System.Byte.MaxValue OrElse -7L) PrintResult("System.Byte.MaxValue OrElse 28UL", System.Byte.MaxValue OrElse 28UL) PrintResult("System.Byte.MaxValue OrElse -9D", System.Byte.MaxValue OrElse -9D) PrintResult("System.Byte.MaxValue OrElse 10.0F", System.Byte.MaxValue OrElse 10.0F) PrintResult("System.Byte.MaxValue OrElse -11.0R", System.Byte.MaxValue OrElse -11.0R) PrintResult("System.Byte.MaxValue OrElse ""12""", System.Byte.MaxValue OrElse "12") PrintResult("System.Byte.MaxValue OrElse TypeCode.Double", System.Byte.MaxValue OrElse TypeCode.Double) PrintResult("-3S OrElse False", -3S OrElse False) PrintResult("-3S OrElse True", -3S OrElse True) PrintResult("-3S OrElse System.SByte.MinValue", -3S OrElse System.SByte.MinValue) PrintResult("-3S OrElse System.Byte.MaxValue", -3S OrElse System.Byte.MaxValue) PrintResult("-3S OrElse -3S", -3S OrElse -3S) PrintResult("-3S OrElse 24US", -3S OrElse 24US) PrintResult("-3S OrElse -5I", -3S OrElse -5I) PrintResult("-3S OrElse 26UI", -3S OrElse 26UI) PrintResult("-3S OrElse -7L", -3S OrElse -7L) PrintResult("-3S OrElse 28UL", -3S OrElse 28UL) PrintResult("-3S OrElse -9D", -3S OrElse -9D) PrintResult("-3S OrElse 10.0F", -3S OrElse 10.0F) PrintResult("-3S OrElse -11.0R", -3S OrElse -11.0R) PrintResult("-3S OrElse ""12""", -3S OrElse "12") PrintResult("-3S OrElse TypeCode.Double", -3S OrElse TypeCode.Double) PrintResult("24US OrElse False", 24US OrElse False) PrintResult("24US OrElse True", 24US OrElse True) PrintResult("24US OrElse System.SByte.MinValue", 24US OrElse System.SByte.MinValue) PrintResult("24US OrElse System.Byte.MaxValue", 24US OrElse System.Byte.MaxValue) PrintResult("24US OrElse -3S", 24US OrElse -3S) PrintResult("24US OrElse 24US", 24US OrElse 24US) PrintResult("24US OrElse -5I", 24US OrElse -5I) PrintResult("24US OrElse 26UI", 24US OrElse 26UI) PrintResult("24US OrElse -7L", 24US OrElse -7L) PrintResult("24US OrElse 28UL", 24US OrElse 28UL) PrintResult("24US OrElse -9D", 24US OrElse -9D) PrintResult("24US OrElse 10.0F", 24US OrElse 10.0F) PrintResult("24US OrElse -11.0R", 24US OrElse -11.0R) PrintResult("24US OrElse ""12""", 24US OrElse "12") PrintResult("24US OrElse TypeCode.Double", 24US OrElse TypeCode.Double) PrintResult("-5I OrElse False", -5I OrElse False) PrintResult("-5I OrElse True", -5I OrElse True) PrintResult("-5I OrElse System.SByte.MinValue", -5I OrElse System.SByte.MinValue) PrintResult("-5I OrElse System.Byte.MaxValue", -5I OrElse System.Byte.MaxValue) PrintResult("-5I OrElse -3S", -5I OrElse -3S) PrintResult("-5I OrElse 24US", -5I OrElse 24US) PrintResult("-5I OrElse -5I", -5I OrElse -5I) PrintResult("-5I OrElse 26UI", -5I OrElse 26UI) PrintResult("-5I OrElse -7L", -5I OrElse -7L) PrintResult("-5I OrElse 28UL", -5I OrElse 28UL) PrintResult("-5I OrElse -9D", -5I OrElse -9D) PrintResult("-5I OrElse 10.0F", -5I OrElse 10.0F) PrintResult("-5I OrElse -11.0R", -5I OrElse -11.0R) PrintResult("-5I OrElse ""12""", -5I OrElse "12") PrintResult("-5I OrElse TypeCode.Double", -5I OrElse TypeCode.Double) PrintResult("26UI OrElse False", 26UI OrElse False) PrintResult("26UI OrElse True", 26UI OrElse True) PrintResult("26UI OrElse System.SByte.MinValue", 26UI OrElse System.SByte.MinValue) PrintResult("26UI OrElse System.Byte.MaxValue", 26UI OrElse System.Byte.MaxValue) PrintResult("26UI OrElse -3S", 26UI OrElse -3S) PrintResult("26UI OrElse 24US", 26UI OrElse 24US) PrintResult("26UI OrElse -5I", 26UI OrElse -5I) PrintResult("26UI OrElse 26UI", 26UI OrElse 26UI) PrintResult("26UI OrElse -7L", 26UI OrElse -7L) PrintResult("26UI OrElse 28UL", 26UI OrElse 28UL) PrintResult("26UI OrElse -9D", 26UI OrElse -9D) PrintResult("26UI OrElse 10.0F", 26UI OrElse 10.0F) PrintResult("26UI OrElse -11.0R", 26UI OrElse -11.0R) PrintResult("26UI OrElse ""12""", 26UI OrElse "12") PrintResult("26UI OrElse TypeCode.Double", 26UI OrElse TypeCode.Double) PrintResult("-7L OrElse False", -7L OrElse False) PrintResult("-7L OrElse True", -7L OrElse True) PrintResult("-7L OrElse System.SByte.MinValue", -7L OrElse System.SByte.MinValue) PrintResult("-7L OrElse System.Byte.MaxValue", -7L OrElse System.Byte.MaxValue) PrintResult("-7L OrElse -3S", -7L OrElse -3S) PrintResult("-7L OrElse 24US", -7L OrElse 24US) PrintResult("-7L OrElse -5I", -7L OrElse -5I) PrintResult("-7L OrElse 26UI", -7L OrElse 26UI) PrintResult("-7L OrElse -7L", -7L OrElse -7L) PrintResult("-7L OrElse 28UL", -7L OrElse 28UL) PrintResult("-7L OrElse -9D", -7L OrElse -9D) PrintResult("-7L OrElse 10.0F", -7L OrElse 10.0F) PrintResult("-7L OrElse -11.0R", -7L OrElse -11.0R) PrintResult("-7L OrElse ""12""", -7L OrElse "12") PrintResult("-7L OrElse TypeCode.Double", -7L OrElse TypeCode.Double) PrintResult("28UL OrElse False", 28UL OrElse False) PrintResult("28UL OrElse True", 28UL OrElse True) PrintResult("28UL OrElse System.SByte.MinValue", 28UL OrElse System.SByte.MinValue) PrintResult("28UL OrElse System.Byte.MaxValue", 28UL OrElse System.Byte.MaxValue) PrintResult("28UL OrElse -3S", 28UL OrElse -3S) PrintResult("28UL OrElse 24US", 28UL OrElse 24US) PrintResult("28UL OrElse -5I", 28UL OrElse -5I) PrintResult("28UL OrElse 26UI", 28UL OrElse 26UI) PrintResult("28UL OrElse -7L", 28UL OrElse -7L) PrintResult("28UL OrElse 28UL", 28UL OrElse 28UL) PrintResult("28UL OrElse -9D", 28UL OrElse -9D) PrintResult("28UL OrElse 10.0F", 28UL OrElse 10.0F) PrintResult("28UL OrElse -11.0R", 28UL OrElse -11.0R) PrintResult("28UL OrElse ""12""", 28UL OrElse "12") PrintResult("28UL OrElse TypeCode.Double", 28UL OrElse TypeCode.Double) PrintResult("-9D OrElse False", -9D OrElse False) PrintResult("-9D OrElse True", -9D OrElse True) PrintResult("-9D OrElse System.SByte.MinValue", -9D OrElse System.SByte.MinValue) PrintResult("-9D OrElse System.Byte.MaxValue", -9D OrElse System.Byte.MaxValue) PrintResult("-9D OrElse -3S", -9D OrElse -3S) PrintResult("-9D OrElse 24US", -9D OrElse 24US) PrintResult("-9D OrElse -5I", -9D OrElse -5I) PrintResult("-9D OrElse 26UI", -9D OrElse 26UI) PrintResult("-9D OrElse -7L", -9D OrElse -7L) PrintResult("-9D OrElse 28UL", -9D OrElse 28UL) PrintResult("-9D OrElse -9D", -9D OrElse -9D) PrintResult("-9D OrElse 10.0F", -9D OrElse 10.0F) PrintResult("-9D OrElse -11.0R", -9D OrElse -11.0R) PrintResult("-9D OrElse ""12""", -9D OrElse "12") PrintResult("-9D OrElse TypeCode.Double", -9D OrElse TypeCode.Double) PrintResult("10.0F OrElse False", 10.0F OrElse False) PrintResult("10.0F OrElse True", 10.0F OrElse True) PrintResult("10.0F OrElse System.SByte.MinValue", 10.0F OrElse System.SByte.MinValue) PrintResult("10.0F OrElse System.Byte.MaxValue", 10.0F OrElse System.Byte.MaxValue) PrintResult("10.0F OrElse -3S", 10.0F OrElse -3S) PrintResult("10.0F OrElse 24US", 10.0F OrElse 24US) PrintResult("10.0F OrElse -5I", 10.0F OrElse -5I) PrintResult("10.0F OrElse 26UI", 10.0F OrElse 26UI) PrintResult("10.0F OrElse -7L", 10.0F OrElse -7L) PrintResult("10.0F OrElse 28UL", 10.0F OrElse 28UL) PrintResult("10.0F OrElse -9D", 10.0F OrElse -9D) PrintResult("10.0F OrElse 10.0F", 10.0F OrElse 10.0F) PrintResult("10.0F OrElse -11.0R", 10.0F OrElse -11.0R) PrintResult("10.0F OrElse ""12""", 10.0F OrElse "12") PrintResult("10.0F OrElse TypeCode.Double", 10.0F OrElse TypeCode.Double) PrintResult("-11.0R OrElse False", -11.0R OrElse False) PrintResult("-11.0R OrElse True", -11.0R OrElse True) PrintResult("-11.0R OrElse System.SByte.MinValue", -11.0R OrElse System.SByte.MinValue) PrintResult("-11.0R OrElse System.Byte.MaxValue", -11.0R OrElse System.Byte.MaxValue) PrintResult("-11.0R OrElse -3S", -11.0R OrElse -3S) PrintResult("-11.0R OrElse 24US", -11.0R OrElse 24US) PrintResult("-11.0R OrElse -5I", -11.0R OrElse -5I) PrintResult("-11.0R OrElse 26UI", -11.0R OrElse 26UI) PrintResult("-11.0R OrElse -7L", -11.0R OrElse -7L) PrintResult("-11.0R OrElse 28UL", -11.0R OrElse 28UL) PrintResult("-11.0R OrElse -9D", -11.0R OrElse -9D) PrintResult("-11.0R OrElse 10.0F", -11.0R OrElse 10.0F) PrintResult("-11.0R OrElse -11.0R", -11.0R OrElse -11.0R) PrintResult("-11.0R OrElse ""12""", -11.0R OrElse "12") PrintResult("-11.0R OrElse TypeCode.Double", -11.0R OrElse TypeCode.Double) PrintResult("""12"" OrElse False", "12" OrElse False) PrintResult("""12"" OrElse True", "12" OrElse True) PrintResult("""12"" OrElse System.SByte.MinValue", "12" OrElse System.SByte.MinValue) PrintResult("""12"" OrElse System.Byte.MaxValue", "12" OrElse System.Byte.MaxValue) PrintResult("""12"" OrElse -3S", "12" OrElse -3S) PrintResult("""12"" OrElse 24US", "12" OrElse 24US) PrintResult("""12"" OrElse -5I", "12" OrElse -5I) PrintResult("""12"" OrElse 26UI", "12" OrElse 26UI) PrintResult("""12"" OrElse -7L", "12" OrElse -7L) PrintResult("""12"" OrElse 28UL", "12" OrElse 28UL) PrintResult("""12"" OrElse -9D", "12" OrElse -9D) PrintResult("""12"" OrElse 10.0F", "12" OrElse 10.0F) PrintResult("""12"" OrElse -11.0R", "12" OrElse -11.0R) PrintResult("""12"" OrElse ""12""", "12" OrElse "12") PrintResult("""12"" OrElse TypeCode.Double", "12" OrElse TypeCode.Double) PrintResult("TypeCode.Double OrElse False", TypeCode.Double OrElse False) PrintResult("TypeCode.Double OrElse True", TypeCode.Double OrElse True) PrintResult("TypeCode.Double OrElse System.SByte.MinValue", TypeCode.Double OrElse System.SByte.MinValue) PrintResult("TypeCode.Double OrElse System.Byte.MaxValue", TypeCode.Double OrElse System.Byte.MaxValue) PrintResult("TypeCode.Double OrElse -3S", TypeCode.Double OrElse -3S) PrintResult("TypeCode.Double OrElse 24US", TypeCode.Double OrElse 24US) PrintResult("TypeCode.Double OrElse -5I", TypeCode.Double OrElse -5I) PrintResult("TypeCode.Double OrElse 26UI", TypeCode.Double OrElse 26UI) PrintResult("TypeCode.Double OrElse -7L", TypeCode.Double OrElse -7L) PrintResult("TypeCode.Double OrElse 28UL", TypeCode.Double OrElse 28UL) PrintResult("TypeCode.Double OrElse -9D", TypeCode.Double OrElse -9D) PrintResult("TypeCode.Double OrElse 10.0F", TypeCode.Double OrElse 10.0F) PrintResult("TypeCode.Double OrElse -11.0R", TypeCode.Double OrElse -11.0R) PrintResult("TypeCode.Double OrElse ""12""", TypeCode.Double OrElse "12") PrintResult("TypeCode.Double OrElse TypeCode.Double", TypeCode.Double OrElse TypeCode.Double) PrintResult("False AndAlso False", False AndAlso False) PrintResult("False AndAlso True", False AndAlso True) PrintResult("False AndAlso System.SByte.MinValue", False AndAlso System.SByte.MinValue) PrintResult("False AndAlso System.Byte.MaxValue", False AndAlso System.Byte.MaxValue) PrintResult("False AndAlso -3S", False AndAlso -3S) PrintResult("False AndAlso 24US", False AndAlso 24US) PrintResult("False AndAlso -5I", False AndAlso -5I) PrintResult("False AndAlso 26UI", False AndAlso 26UI) PrintResult("False AndAlso -7L", False AndAlso -7L) PrintResult("False AndAlso 28UL", False AndAlso 28UL) PrintResult("False AndAlso -9D", False AndAlso -9D) PrintResult("False AndAlso 10.0F", False AndAlso 10.0F) PrintResult("False AndAlso -11.0R", False AndAlso -11.0R) PrintResult("False AndAlso ""12""", False AndAlso "12") PrintResult("False AndAlso TypeCode.Double", False AndAlso TypeCode.Double) PrintResult("True AndAlso False", True AndAlso False) PrintResult("True AndAlso True", True AndAlso True) PrintResult("True AndAlso System.SByte.MinValue", True AndAlso System.SByte.MinValue) PrintResult("True AndAlso System.Byte.MaxValue", True AndAlso System.Byte.MaxValue) PrintResult("True AndAlso -3S", True AndAlso -3S) PrintResult("True AndAlso 24US", True AndAlso 24US) PrintResult("True AndAlso -5I", True AndAlso -5I) PrintResult("True AndAlso 26UI", True AndAlso 26UI) PrintResult("True AndAlso -7L", True AndAlso -7L) PrintResult("True AndAlso 28UL", True AndAlso 28UL) PrintResult("True AndAlso -9D", True AndAlso -9D) PrintResult("True AndAlso 10.0F", True AndAlso 10.0F) PrintResult("True AndAlso -11.0R", True AndAlso -11.0R) PrintResult("True AndAlso ""12""", True AndAlso "12") PrintResult("True AndAlso TypeCode.Double", True AndAlso TypeCode.Double) PrintResult("System.SByte.MinValue AndAlso False", System.SByte.MinValue AndAlso False) PrintResult("System.SByte.MinValue AndAlso True", System.SByte.MinValue AndAlso True) PrintResult("System.SByte.MinValue AndAlso System.SByte.MinValue", System.SByte.MinValue AndAlso System.SByte.MinValue) PrintResult("System.SByte.MinValue AndAlso System.Byte.MaxValue", System.SByte.MinValue AndAlso System.Byte.MaxValue) PrintResult("System.SByte.MinValue AndAlso -3S", System.SByte.MinValue AndAlso -3S) PrintResult("System.SByte.MinValue AndAlso 24US", System.SByte.MinValue AndAlso 24US) PrintResult("System.SByte.MinValue AndAlso -5I", System.SByte.MinValue AndAlso -5I) PrintResult("System.SByte.MinValue AndAlso 26UI", System.SByte.MinValue AndAlso 26UI) PrintResult("System.SByte.MinValue AndAlso -7L", System.SByte.MinValue AndAlso -7L) PrintResult("System.SByte.MinValue AndAlso 28UL", System.SByte.MinValue AndAlso 28UL) PrintResult("System.SByte.MinValue AndAlso -9D", System.SByte.MinValue AndAlso -9D) PrintResult("System.SByte.MinValue AndAlso 10.0F", System.SByte.MinValue AndAlso 10.0F) PrintResult("System.SByte.MinValue AndAlso -11.0R", System.SByte.MinValue AndAlso -11.0R) PrintResult("System.SByte.MinValue AndAlso ""12""", System.SByte.MinValue AndAlso "12") PrintResult("System.SByte.MinValue AndAlso TypeCode.Double", System.SByte.MinValue AndAlso TypeCode.Double) PrintResult("System.Byte.MaxValue AndAlso False", System.Byte.MaxValue AndAlso False) PrintResult("System.Byte.MaxValue AndAlso True", System.Byte.MaxValue AndAlso True) PrintResult("System.Byte.MaxValue AndAlso System.SByte.MinValue", System.Byte.MaxValue AndAlso System.SByte.MinValue) PrintResult("System.Byte.MaxValue AndAlso System.Byte.MaxValue", System.Byte.MaxValue AndAlso System.Byte.MaxValue) PrintResult("System.Byte.MaxValue AndAlso -3S", System.Byte.MaxValue AndAlso -3S) PrintResult("System.Byte.MaxValue AndAlso 24US", System.Byte.MaxValue AndAlso 24US) PrintResult("System.Byte.MaxValue AndAlso -5I", System.Byte.MaxValue AndAlso -5I) PrintResult("System.Byte.MaxValue AndAlso 26UI", System.Byte.MaxValue AndAlso 26UI) PrintResult("System.Byte.MaxValue AndAlso -7L", System.Byte.MaxValue AndAlso -7L) PrintResult("System.Byte.MaxValue AndAlso 28UL", System.Byte.MaxValue AndAlso 28UL) PrintResult("System.Byte.MaxValue AndAlso -9D", System.Byte.MaxValue AndAlso -9D) PrintResult("System.Byte.MaxValue AndAlso 10.0F", System.Byte.MaxValue AndAlso 10.0F) PrintResult("System.Byte.MaxValue AndAlso -11.0R", System.Byte.MaxValue AndAlso -11.0R) PrintResult("System.Byte.MaxValue AndAlso ""12""", System.Byte.MaxValue AndAlso "12") PrintResult("System.Byte.MaxValue AndAlso TypeCode.Double", System.Byte.MaxValue AndAlso TypeCode.Double) PrintResult("-3S AndAlso False", -3S AndAlso False) PrintResult("-3S AndAlso True", -3S AndAlso True) PrintResult("-3S AndAlso System.SByte.MinValue", -3S AndAlso System.SByte.MinValue) PrintResult("-3S AndAlso System.Byte.MaxValue", -3S AndAlso System.Byte.MaxValue) PrintResult("-3S AndAlso -3S", -3S AndAlso -3S) PrintResult("-3S AndAlso 24US", -3S AndAlso 24US) PrintResult("-3S AndAlso -5I", -3S AndAlso -5I) PrintResult("-3S AndAlso 26UI", -3S AndAlso 26UI) PrintResult("-3S AndAlso -7L", -3S AndAlso -7L) PrintResult("-3S AndAlso 28UL", -3S AndAlso 28UL) PrintResult("-3S AndAlso -9D", -3S AndAlso -9D) PrintResult("-3S AndAlso 10.0F", -3S AndAlso 10.0F) PrintResult("-3S AndAlso -11.0R", -3S AndAlso -11.0R) PrintResult("-3S AndAlso ""12""", -3S AndAlso "12") PrintResult("-3S AndAlso TypeCode.Double", -3S AndAlso TypeCode.Double) PrintResult("24US AndAlso False", 24US AndAlso False) PrintResult("24US AndAlso True", 24US AndAlso True) PrintResult("24US AndAlso System.SByte.MinValue", 24US AndAlso System.SByte.MinValue) PrintResult("24US AndAlso System.Byte.MaxValue", 24US AndAlso System.Byte.MaxValue) PrintResult("24US AndAlso -3S", 24US AndAlso -3S) PrintResult("24US AndAlso 24US", 24US AndAlso 24US) PrintResult("24US AndAlso -5I", 24US AndAlso -5I) PrintResult("24US AndAlso 26UI", 24US AndAlso 26UI) PrintResult("24US AndAlso -7L", 24US AndAlso -7L) PrintResult("24US AndAlso 28UL", 24US AndAlso 28UL) PrintResult("24US AndAlso -9D", 24US AndAlso -9D) PrintResult("24US AndAlso 10.0F", 24US AndAlso 10.0F) PrintResult("24US AndAlso -11.0R", 24US AndAlso -11.0R) PrintResult("24US AndAlso ""12""", 24US AndAlso "12") PrintResult("24US AndAlso TypeCode.Double", 24US AndAlso TypeCode.Double) PrintResult("-5I AndAlso False", -5I AndAlso False) PrintResult("-5I AndAlso True", -5I AndAlso True) PrintResult("-5I AndAlso System.SByte.MinValue", -5I AndAlso System.SByte.MinValue) PrintResult("-5I AndAlso System.Byte.MaxValue", -5I AndAlso System.Byte.MaxValue) PrintResult("-5I AndAlso -3S", -5I AndAlso -3S) PrintResult("-5I AndAlso 24US", -5I AndAlso 24US) PrintResult("-5I AndAlso -5I", -5I AndAlso -5I) PrintResult("-5I AndAlso 26UI", -5I AndAlso 26UI) PrintResult("-5I AndAlso -7L", -5I AndAlso -7L) PrintResult("-5I AndAlso 28UL", -5I AndAlso 28UL) PrintResult("-5I AndAlso -9D", -5I AndAlso -9D) PrintResult("-5I AndAlso 10.0F", -5I AndAlso 10.0F) PrintResult("-5I AndAlso -11.0R", -5I AndAlso -11.0R) PrintResult("-5I AndAlso ""12""", -5I AndAlso "12") PrintResult("-5I AndAlso TypeCode.Double", -5I AndAlso TypeCode.Double) PrintResult("26UI AndAlso False", 26UI AndAlso False) PrintResult("26UI AndAlso True", 26UI AndAlso True) PrintResult("26UI AndAlso System.SByte.MinValue", 26UI AndAlso System.SByte.MinValue) PrintResult("26UI AndAlso System.Byte.MaxValue", 26UI AndAlso System.Byte.MaxValue) PrintResult("26UI AndAlso -3S", 26UI AndAlso -3S) PrintResult("26UI AndAlso 24US", 26UI AndAlso 24US) PrintResult("26UI AndAlso -5I", 26UI AndAlso -5I) PrintResult("26UI AndAlso 26UI", 26UI AndAlso 26UI) PrintResult("26UI AndAlso -7L", 26UI AndAlso -7L) PrintResult("26UI AndAlso 28UL", 26UI AndAlso 28UL) PrintResult("26UI AndAlso -9D", 26UI AndAlso -9D) PrintResult("26UI AndAlso 10.0F", 26UI AndAlso 10.0F) PrintResult("26UI AndAlso -11.0R", 26UI AndAlso -11.0R) PrintResult("26UI AndAlso ""12""", 26UI AndAlso "12") PrintResult("26UI AndAlso TypeCode.Double", 26UI AndAlso TypeCode.Double) PrintResult("-7L AndAlso False", -7L AndAlso False) PrintResult("-7L AndAlso True", -7L AndAlso True) PrintResult("-7L AndAlso System.SByte.MinValue", -7L AndAlso System.SByte.MinValue) PrintResult("-7L AndAlso System.Byte.MaxValue", -7L AndAlso System.Byte.MaxValue) PrintResult("-7L AndAlso -3S", -7L AndAlso -3S) PrintResult("-7L AndAlso 24US", -7L AndAlso 24US) PrintResult("-7L AndAlso -5I", -7L AndAlso -5I) PrintResult("-7L AndAlso 26UI", -7L AndAlso 26UI) PrintResult("-7L AndAlso -7L", -7L AndAlso -7L) PrintResult("-7L AndAlso 28UL", -7L AndAlso 28UL) PrintResult("-7L AndAlso -9D", -7L AndAlso -9D) PrintResult("-7L AndAlso 10.0F", -7L AndAlso 10.0F) PrintResult("-7L AndAlso -11.0R", -7L AndAlso -11.0R) PrintResult("-7L AndAlso ""12""", -7L AndAlso "12") PrintResult("-7L AndAlso TypeCode.Double", -7L AndAlso TypeCode.Double) PrintResult("28UL AndAlso False", 28UL AndAlso False) PrintResult("28UL AndAlso True", 28UL AndAlso True) PrintResult("28UL AndAlso System.SByte.MinValue", 28UL AndAlso System.SByte.MinValue) PrintResult("28UL AndAlso System.Byte.MaxValue", 28UL AndAlso System.Byte.MaxValue) PrintResult("28UL AndAlso -3S", 28UL AndAlso -3S) PrintResult("28UL AndAlso 24US", 28UL AndAlso 24US) PrintResult("28UL AndAlso -5I", 28UL AndAlso -5I) PrintResult("28UL AndAlso 26UI", 28UL AndAlso 26UI) PrintResult("28UL AndAlso -7L", 28UL AndAlso -7L) PrintResult("28UL AndAlso 28UL", 28UL AndAlso 28UL) PrintResult("28UL AndAlso -9D", 28UL AndAlso -9D) PrintResult("28UL AndAlso 10.0F", 28UL AndAlso 10.0F) PrintResult("28UL AndAlso -11.0R", 28UL AndAlso -11.0R) PrintResult("28UL AndAlso ""12""", 28UL AndAlso "12") PrintResult("28UL AndAlso TypeCode.Double", 28UL AndAlso TypeCode.Double) PrintResult("-9D AndAlso False", -9D AndAlso False) PrintResult("-9D AndAlso True", -9D AndAlso True) PrintResult("-9D AndAlso System.SByte.MinValue", -9D AndAlso System.SByte.MinValue) PrintResult("-9D AndAlso System.Byte.MaxValue", -9D AndAlso System.Byte.MaxValue) PrintResult("-9D AndAlso -3S", -9D AndAlso -3S) PrintResult("-9D AndAlso 24US", -9D AndAlso 24US) PrintResult("-9D AndAlso -5I", -9D AndAlso -5I) PrintResult("-9D AndAlso 26UI", -9D AndAlso 26UI) PrintResult("-9D AndAlso -7L", -9D AndAlso -7L) PrintResult("-9D AndAlso 28UL", -9D AndAlso 28UL) PrintResult("-9D AndAlso -9D", -9D AndAlso -9D) PrintResult("-9D AndAlso 10.0F", -9D AndAlso 10.0F) PrintResult("-9D AndAlso -11.0R", -9D AndAlso -11.0R) PrintResult("-9D AndAlso ""12""", -9D AndAlso "12") PrintResult("-9D AndAlso TypeCode.Double", -9D AndAlso TypeCode.Double) PrintResult("10.0F AndAlso False", 10.0F AndAlso False) PrintResult("10.0F AndAlso True", 10.0F AndAlso True) PrintResult("10.0F AndAlso System.SByte.MinValue", 10.0F AndAlso System.SByte.MinValue) PrintResult("10.0F AndAlso System.Byte.MaxValue", 10.0F AndAlso System.Byte.MaxValue) PrintResult("10.0F AndAlso -3S", 10.0F AndAlso -3S) PrintResult("10.0F AndAlso 24US", 10.0F AndAlso 24US) PrintResult("10.0F AndAlso -5I", 10.0F AndAlso -5I) PrintResult("10.0F AndAlso 26UI", 10.0F AndAlso 26UI) PrintResult("10.0F AndAlso -7L", 10.0F AndAlso -7L) PrintResult("10.0F AndAlso 28UL", 10.0F AndAlso 28UL) PrintResult("10.0F AndAlso -9D", 10.0F AndAlso -9D) PrintResult("10.0F AndAlso 10.0F", 10.0F AndAlso 10.0F) PrintResult("10.0F AndAlso -11.0R", 10.0F AndAlso -11.0R) PrintResult("10.0F AndAlso ""12""", 10.0F AndAlso "12") PrintResult("10.0F AndAlso TypeCode.Double", 10.0F AndAlso TypeCode.Double) PrintResult("-11.0R AndAlso False", -11.0R AndAlso False) PrintResult("-11.0R AndAlso True", -11.0R AndAlso True) PrintResult("-11.0R AndAlso System.SByte.MinValue", -11.0R AndAlso System.SByte.MinValue) PrintResult("-11.0R AndAlso System.Byte.MaxValue", -11.0R AndAlso System.Byte.MaxValue) PrintResult("-11.0R AndAlso -3S", -11.0R AndAlso -3S) PrintResult("-11.0R AndAlso 24US", -11.0R AndAlso 24US) PrintResult("-11.0R AndAlso -5I", -11.0R AndAlso -5I) PrintResult("-11.0R AndAlso 26UI", -11.0R AndAlso 26UI) PrintResult("-11.0R AndAlso -7L", -11.0R AndAlso -7L) PrintResult("-11.0R AndAlso 28UL", -11.0R AndAlso 28UL) PrintResult("-11.0R AndAlso -9D", -11.0R AndAlso -9D) PrintResult("-11.0R AndAlso 10.0F", -11.0R AndAlso 10.0F) PrintResult("-11.0R AndAlso -11.0R", -11.0R AndAlso -11.0R) PrintResult("-11.0R AndAlso ""12""", -11.0R AndAlso "12") PrintResult("-11.0R AndAlso TypeCode.Double", -11.0R AndAlso TypeCode.Double) PrintResult("""12"" AndAlso False", "12" AndAlso False) PrintResult("""12"" AndAlso True", "12" AndAlso True) PrintResult("""12"" AndAlso System.SByte.MinValue", "12" AndAlso System.SByte.MinValue) PrintResult("""12"" AndAlso System.Byte.MaxValue", "12" AndAlso System.Byte.MaxValue) PrintResult("""12"" AndAlso -3S", "12" AndAlso -3S) PrintResult("""12"" AndAlso 24US", "12" AndAlso 24US) PrintResult("""12"" AndAlso -5I", "12" AndAlso -5I) PrintResult("""12"" AndAlso 26UI", "12" AndAlso 26UI) PrintResult("""12"" AndAlso -7L", "12" AndAlso -7L) PrintResult("""12"" AndAlso 28UL", "12" AndAlso 28UL) PrintResult("""12"" AndAlso -9D", "12" AndAlso -9D) PrintResult("""12"" AndAlso 10.0F", "12" AndAlso 10.0F) PrintResult("""12"" AndAlso -11.0R", "12" AndAlso -11.0R) PrintResult("""12"" AndAlso ""12""", "12" AndAlso "12") PrintResult("""12"" AndAlso TypeCode.Double", "12" AndAlso TypeCode.Double) PrintResult("TypeCode.Double AndAlso False", TypeCode.Double AndAlso False) PrintResult("TypeCode.Double AndAlso True", TypeCode.Double AndAlso True) PrintResult("TypeCode.Double AndAlso System.SByte.MinValue", TypeCode.Double AndAlso System.SByte.MinValue) PrintResult("TypeCode.Double AndAlso System.Byte.MaxValue", TypeCode.Double AndAlso System.Byte.MaxValue) PrintResult("TypeCode.Double AndAlso -3S", TypeCode.Double AndAlso -3S) PrintResult("TypeCode.Double AndAlso 24US", TypeCode.Double AndAlso 24US) PrintResult("TypeCode.Double AndAlso -5I", TypeCode.Double AndAlso -5I) PrintResult("TypeCode.Double AndAlso 26UI", TypeCode.Double AndAlso 26UI) PrintResult("TypeCode.Double AndAlso -7L", TypeCode.Double AndAlso -7L) PrintResult("TypeCode.Double AndAlso 28UL", TypeCode.Double AndAlso 28UL) PrintResult("TypeCode.Double AndAlso -9D", TypeCode.Double AndAlso -9D) PrintResult("TypeCode.Double AndAlso 10.0F", TypeCode.Double AndAlso 10.0F) PrintResult("TypeCode.Double AndAlso -11.0R", TypeCode.Double AndAlso -11.0R) PrintResult("TypeCode.Double AndAlso ""12""", TypeCode.Double AndAlso "12") PrintResult("TypeCode.Double AndAlso TypeCode.Double", TypeCode.Double AndAlso TypeCode.Double) PrintResult("False & False", False & False) PrintResult("False & True", False & True) PrintResult("False & System.SByte.MinValue", False & System.SByte.MinValue) PrintResult("False & System.Byte.MaxValue", False & System.Byte.MaxValue) PrintResult("False & -3S", False & -3S) PrintResult("False & 24US", False & 24US) PrintResult("False & -5I", False & -5I) PrintResult("False & 26UI", False & 26UI) PrintResult("False & -7L", False & -7L) PrintResult("False & 28UL", False & 28UL) PrintResult("False & -9D", False & -9D) PrintResult("False & 10.0F", False & 10.0F) PrintResult("False & -11.0R", False & -11.0R) PrintResult("False & ""12""", False & "12") PrintResult("False & TypeCode.Double", False & TypeCode.Double) PrintResult("True & False", True & False) PrintResult("True & True", True & True) PrintResult("True & System.SByte.MinValue", True & System.SByte.MinValue) PrintResult("True & System.Byte.MaxValue", True & System.Byte.MaxValue) PrintResult("True & -3S", True & -3S) PrintResult("True & 24US", True & 24US) PrintResult("True & -5I", True & -5I) PrintResult("True & 26UI", True & 26UI) PrintResult("True & -7L", True & -7L) PrintResult("True & 28UL", True & 28UL) PrintResult("True & -9D", True & -9D) PrintResult("True & 10.0F", True & 10.0F) PrintResult("True & -11.0R", True & -11.0R) PrintResult("True & ""12""", True & "12") PrintResult("True & TypeCode.Double", True & TypeCode.Double) PrintResult("System.SByte.MinValue & False", System.SByte.MinValue & False) PrintResult("System.SByte.MinValue & True", System.SByte.MinValue & True) PrintResult("System.SByte.MinValue & System.SByte.MinValue", System.SByte.MinValue & System.SByte.MinValue) PrintResult("System.SByte.MinValue & System.Byte.MaxValue", System.SByte.MinValue & System.Byte.MaxValue) PrintResult("System.SByte.MinValue & -3S", System.SByte.MinValue & -3S) PrintResult("System.SByte.MinValue & 24US", System.SByte.MinValue & 24US) PrintResult("System.SByte.MinValue & -5I", System.SByte.MinValue & -5I) PrintResult("System.SByte.MinValue & 26UI", System.SByte.MinValue & 26UI) PrintResult("System.SByte.MinValue & -7L", System.SByte.MinValue & -7L) PrintResult("System.SByte.MinValue & 28UL", System.SByte.MinValue & 28UL) PrintResult("System.SByte.MinValue & -9D", System.SByte.MinValue & -9D) PrintResult("System.SByte.MinValue & 10.0F", System.SByte.MinValue & 10.0F) PrintResult("System.SByte.MinValue & -11.0R", System.SByte.MinValue & -11.0R) PrintResult("System.SByte.MinValue & ""12""", System.SByte.MinValue & "12") PrintResult("System.SByte.MinValue & TypeCode.Double", System.SByte.MinValue & TypeCode.Double) PrintResult("System.Byte.MaxValue & False", System.Byte.MaxValue & False) PrintResult("System.Byte.MaxValue & True", System.Byte.MaxValue & True) PrintResult("System.Byte.MaxValue & System.SByte.MinValue", System.Byte.MaxValue & System.SByte.MinValue) PrintResult("System.Byte.MaxValue & System.Byte.MaxValue", System.Byte.MaxValue & System.Byte.MaxValue) PrintResult("System.Byte.MaxValue & -3S", System.Byte.MaxValue & -3S) PrintResult("System.Byte.MaxValue & 24US", System.Byte.MaxValue & 24US) PrintResult("System.Byte.MaxValue & -5I", System.Byte.MaxValue & -5I) PrintResult("System.Byte.MaxValue & 26UI", System.Byte.MaxValue & 26UI) PrintResult("System.Byte.MaxValue & -7L", System.Byte.MaxValue & -7L) PrintResult("System.Byte.MaxValue & 28UL", System.Byte.MaxValue & 28UL) PrintResult("System.Byte.MaxValue & -9D", System.Byte.MaxValue & -9D) PrintResult("System.Byte.MaxValue & 10.0F", System.Byte.MaxValue & 10.0F) PrintResult("System.Byte.MaxValue & -11.0R", System.Byte.MaxValue & -11.0R) PrintResult("System.Byte.MaxValue & ""12""", System.Byte.MaxValue & "12") PrintResult("System.Byte.MaxValue & TypeCode.Double", System.Byte.MaxValue & TypeCode.Double) PrintResult("-3S & False", -3S & False) PrintResult("-3S & True", -3S & True) PrintResult("-3S & System.SByte.MinValue", -3S & System.SByte.MinValue) PrintResult("-3S & System.Byte.MaxValue", -3S & System.Byte.MaxValue) PrintResult("-3S & -3S", -3S & -3S) PrintResult("-3S & 24US", -3S & 24US) PrintResult("-3S & -5I", -3S & -5I) PrintResult("-3S & 26UI", -3S & 26UI) PrintResult("-3S & -7L", -3S & -7L) PrintResult("-3S & 28UL", -3S & 28UL) PrintResult("-3S & -9D", -3S & -9D) PrintResult("-3S & 10.0F", -3S & 10.0F) PrintResult("-3S & -11.0R", -3S & -11.0R) PrintResult("-3S & ""12""", -3S & "12") PrintResult("-3S & TypeCode.Double", -3S & TypeCode.Double) PrintResult("24US & False", 24US & False) PrintResult("24US & True", 24US & True) PrintResult("24US & System.SByte.MinValue", 24US & System.SByte.MinValue) PrintResult("24US & System.Byte.MaxValue", 24US & System.Byte.MaxValue) PrintResult("24US & -3S", 24US & -3S) PrintResult("24US & 24US", 24US & 24US) PrintResult("24US & -5I", 24US & -5I) PrintResult("24US & 26UI", 24US & 26UI) PrintResult("24US & -7L", 24US & -7L) PrintResult("24US & 28UL", 24US & 28UL) PrintResult("24US & -9D", 24US & -9D) PrintResult("24US & 10.0F", 24US & 10.0F) PrintResult("24US & -11.0R", 24US & -11.0R) PrintResult("24US & ""12""", 24US & "12") PrintResult("24US & TypeCode.Double", 24US & TypeCode.Double) PrintResult("-5I & False", -5I & False) PrintResult("-5I & True", -5I & True) PrintResult("-5I & System.SByte.MinValue", -5I & System.SByte.MinValue) PrintResult("-5I & System.Byte.MaxValue", -5I & System.Byte.MaxValue) PrintResult("-5I & -3S", -5I & -3S) PrintResult("-5I & 24US", -5I & 24US) PrintResult("-5I & -5I", -5I & -5I) PrintResult("-5I & 26UI", -5I & 26UI) PrintResult("-5I & -7L", -5I & -7L) PrintResult("-5I & 28UL", -5I & 28UL) PrintResult("-5I & -9D", -5I & -9D) PrintResult("-5I & 10.0F", -5I & 10.0F) PrintResult("-5I & -11.0R", -5I & -11.0R) PrintResult("-5I & ""12""", -5I & "12") PrintResult("-5I & TypeCode.Double", -5I & TypeCode.Double) PrintResult("26UI & False", 26UI & False) PrintResult("26UI & True", 26UI & True) PrintResult("26UI & System.SByte.MinValue", 26UI & System.SByte.MinValue) PrintResult("26UI & System.Byte.MaxValue", 26UI & System.Byte.MaxValue) PrintResult("26UI & -3S", 26UI & -3S) PrintResult("26UI & 24US", 26UI & 24US) PrintResult("26UI & -5I", 26UI & -5I) PrintResult("26UI & 26UI", 26UI & 26UI) PrintResult("26UI & -7L", 26UI & -7L) PrintResult("26UI & 28UL", 26UI & 28UL) PrintResult("26UI & -9D", 26UI & -9D) PrintResult("26UI & 10.0F", 26UI & 10.0F) PrintResult("26UI & -11.0R", 26UI & -11.0R) PrintResult("26UI & ""12""", 26UI & "12") PrintResult("26UI & TypeCode.Double", 26UI & TypeCode.Double) PrintResult("-7L & False", -7L & False) PrintResult("-7L & True", -7L & True) PrintResult("-7L & System.SByte.MinValue", -7L & System.SByte.MinValue) PrintResult("-7L & System.Byte.MaxValue", -7L & System.Byte.MaxValue) PrintResult("-7L & -3S", -7L & -3S) PrintResult("-7L & 24US", -7L & 24US) PrintResult("-7L & -5I", -7L & -5I) PrintResult("-7L & 26UI", -7L & 26UI) PrintResult("-7L & -7L", -7L & -7L) PrintResult("-7L & 28UL", -7L & 28UL) PrintResult("-7L & -9D", -7L & -9D) PrintResult("-7L & 10.0F", -7L & 10.0F) PrintResult("-7L & -11.0R", -7L & -11.0R) PrintResult("-7L & ""12""", -7L & "12") PrintResult("-7L & TypeCode.Double", -7L & TypeCode.Double) PrintResult("28UL & False", 28UL & False) PrintResult("28UL & True", 28UL & True) PrintResult("28UL & System.SByte.MinValue", 28UL & System.SByte.MinValue) PrintResult("28UL & System.Byte.MaxValue", 28UL & System.Byte.MaxValue) PrintResult("28UL & -3S", 28UL & -3S) PrintResult("28UL & 24US", 28UL & 24US) PrintResult("28UL & -5I", 28UL & -5I) PrintResult("28UL & 26UI", 28UL & 26UI) PrintResult("28UL & -7L", 28UL & -7L) PrintResult("28UL & 28UL", 28UL & 28UL) PrintResult("28UL & -9D", 28UL & -9D) PrintResult("28UL & 10.0F", 28UL & 10.0F) PrintResult("28UL & -11.0R", 28UL & -11.0R) PrintResult("28UL & ""12""", 28UL & "12") PrintResult("28UL & TypeCode.Double", 28UL & TypeCode.Double) PrintResult("-9D & False", -9D & False) PrintResult("-9D & True", -9D & True) PrintResult("-9D & System.SByte.MinValue", -9D & System.SByte.MinValue) PrintResult("-9D & System.Byte.MaxValue", -9D & System.Byte.MaxValue) PrintResult("-9D & -3S", -9D & -3S) PrintResult("-9D & 24US", -9D & 24US) PrintResult("-9D & -5I", -9D & -5I) PrintResult("-9D & 26UI", -9D & 26UI) PrintResult("-9D & -7L", -9D & -7L) PrintResult("-9D & 28UL", -9D & 28UL) PrintResult("-9D & -9D", -9D & -9D) PrintResult("-9D & 10.0F", -9D & 10.0F) PrintResult("-9D & -11.0R", -9D & -11.0R) PrintResult("-9D & ""12""", -9D & "12") PrintResult("-9D & TypeCode.Double", -9D & TypeCode.Double) PrintResult("10.0F & False", 10.0F & False) PrintResult("10.0F & True", 10.0F & True) PrintResult("10.0F & System.SByte.MinValue", 10.0F & System.SByte.MinValue) PrintResult("10.0F & System.Byte.MaxValue", 10.0F & System.Byte.MaxValue) PrintResult("10.0F & -3S", 10.0F & -3S) PrintResult("10.0F & 24US", 10.0F & 24US) PrintResult("10.0F & -5I", 10.0F & -5I) PrintResult("10.0F & 26UI", 10.0F & 26UI) PrintResult("10.0F & -7L", 10.0F & -7L) PrintResult("10.0F & 28UL", 10.0F & 28UL) PrintResult("10.0F & -9D", 10.0F & -9D) PrintResult("10.0F & 10.0F", 10.0F & 10.0F) PrintResult("10.0F & -11.0R", 10.0F & -11.0R) PrintResult("10.0F & ""12""", 10.0F & "12") PrintResult("10.0F & TypeCode.Double", 10.0F & TypeCode.Double) PrintResult("-11.0R & False", -11.0R & False) PrintResult("-11.0R & True", -11.0R & True) PrintResult("-11.0R & System.SByte.MinValue", -11.0R & System.SByte.MinValue) PrintResult("-11.0R & System.Byte.MaxValue", -11.0R & System.Byte.MaxValue) PrintResult("-11.0R & -3S", -11.0R & -3S) PrintResult("-11.0R & 24US", -11.0R & 24US) PrintResult("-11.0R & -5I", -11.0R & -5I) PrintResult("-11.0R & 26UI", -11.0R & 26UI) PrintResult("-11.0R & -7L", -11.0R & -7L) PrintResult("-11.0R & 28UL", -11.0R & 28UL) PrintResult("-11.0R & -9D", -11.0R & -9D) PrintResult("-11.0R & 10.0F", -11.0R & 10.0F) PrintResult("-11.0R & -11.0R", -11.0R & -11.0R) PrintResult("-11.0R & ""12""", -11.0R & "12") PrintResult("-11.0R & TypeCode.Double", -11.0R & TypeCode.Double) PrintResult("""12"" & False", "12" & False) PrintResult("""12"" & True", "12" & True) PrintResult("""12"" & System.SByte.MinValue", "12" & System.SByte.MinValue) PrintResult("""12"" & System.Byte.MaxValue", "12" & System.Byte.MaxValue) PrintResult("""12"" & -3S", "12" & -3S) PrintResult("""12"" & 24US", "12" & 24US) PrintResult("""12"" & -5I", "12" & -5I) PrintResult("""12"" & 26UI", "12" & 26UI) PrintResult("""12"" & -7L", "12" & -7L) PrintResult("""12"" & 28UL", "12" & 28UL) PrintResult("""12"" & -9D", "12" & -9D) PrintResult("""12"" & 10.0F", "12" & 10.0F) PrintResult("""12"" & -11.0R", "12" & -11.0R) PrintResult("""12"" & ""12""", "12" & "12") PrintResult("""12"" & TypeCode.Double", "12" & TypeCode.Double) PrintResult("TypeCode.Double & False", TypeCode.Double & False) PrintResult("TypeCode.Double & True", TypeCode.Double & True) PrintResult("TypeCode.Double & System.SByte.MinValue", TypeCode.Double & System.SByte.MinValue) PrintResult("TypeCode.Double & System.Byte.MaxValue", TypeCode.Double & System.Byte.MaxValue) PrintResult("TypeCode.Double & -3S", TypeCode.Double & -3S) PrintResult("TypeCode.Double & 24US", TypeCode.Double & 24US) PrintResult("TypeCode.Double & -5I", TypeCode.Double & -5I) PrintResult("TypeCode.Double & 26UI", TypeCode.Double & 26UI) PrintResult("TypeCode.Double & -7L", TypeCode.Double & -7L) PrintResult("TypeCode.Double & 28UL", TypeCode.Double & 28UL) PrintResult("TypeCode.Double & -9D", TypeCode.Double & -9D) PrintResult("TypeCode.Double & 10.0F", TypeCode.Double & 10.0F) PrintResult("TypeCode.Double & -11.0R", TypeCode.Double & -11.0R) PrintResult("TypeCode.Double & ""12""", TypeCode.Double & "12") PrintResult("TypeCode.Double & TypeCode.Double", TypeCode.Double & TypeCode.Double) PrintResult("False Like False", False Like False) PrintResult("False Like True", False Like True) PrintResult("False Like System.SByte.MinValue", False Like System.SByte.MinValue) PrintResult("False Like System.Byte.MaxValue", False Like System.Byte.MaxValue) PrintResult("False Like -3S", False Like -3S) PrintResult("False Like 24US", False Like 24US) PrintResult("False Like -5I", False Like -5I) PrintResult("False Like 26UI", False Like 26UI) PrintResult("False Like -7L", False Like -7L) PrintResult("False Like 28UL", False Like 28UL) PrintResult("False Like -9D", False Like -9D) PrintResult("False Like 10.0F", False Like 10.0F) PrintResult("False Like -11.0R", False Like -11.0R) PrintResult("False Like ""12""", False Like "12") PrintResult("False Like TypeCode.Double", False Like TypeCode.Double) PrintResult("True Like False", True Like False) PrintResult("True Like True", True Like True) PrintResult("True Like System.SByte.MinValue", True Like System.SByte.MinValue) PrintResult("True Like System.Byte.MaxValue", True Like System.Byte.MaxValue) PrintResult("True Like -3S", True Like -3S) PrintResult("True Like 24US", True Like 24US) PrintResult("True Like -5I", True Like -5I) PrintResult("True Like 26UI", True Like 26UI) PrintResult("True Like -7L", True Like -7L) PrintResult("True Like 28UL", True Like 28UL) PrintResult("True Like -9D", True Like -9D) PrintResult("True Like 10.0F", True Like 10.0F) PrintResult("True Like -11.0R", True Like -11.0R) PrintResult("True Like ""12""", True Like "12") PrintResult("True Like TypeCode.Double", True Like TypeCode.Double) PrintResult("System.SByte.MinValue Like False", System.SByte.MinValue Like False) PrintResult("System.SByte.MinValue Like True", System.SByte.MinValue Like True) PrintResult("System.SByte.MinValue Like System.SByte.MinValue", System.SByte.MinValue Like System.SByte.MinValue) PrintResult("System.SByte.MinValue Like System.Byte.MaxValue", System.SByte.MinValue Like System.Byte.MaxValue) PrintResult("System.SByte.MinValue Like -3S", System.SByte.MinValue Like -3S) PrintResult("System.SByte.MinValue Like 24US", System.SByte.MinValue Like 24US) PrintResult("System.SByte.MinValue Like -5I", System.SByte.MinValue Like -5I) PrintResult("System.SByte.MinValue Like 26UI", System.SByte.MinValue Like 26UI) PrintResult("System.SByte.MinValue Like -7L", System.SByte.MinValue Like -7L) PrintResult("System.SByte.MinValue Like 28UL", System.SByte.MinValue Like 28UL) PrintResult("System.SByte.MinValue Like -9D", System.SByte.MinValue Like -9D) PrintResult("System.SByte.MinValue Like 10.0F", System.SByte.MinValue Like 10.0F) PrintResult("System.SByte.MinValue Like -11.0R", System.SByte.MinValue Like -11.0R) PrintResult("System.SByte.MinValue Like ""12""", System.SByte.MinValue Like "12") PrintResult("System.SByte.MinValue Like TypeCode.Double", System.SByte.MinValue Like TypeCode.Double) PrintResult("System.Byte.MaxValue Like False", System.Byte.MaxValue Like False) PrintResult("System.Byte.MaxValue Like True", System.Byte.MaxValue Like True) PrintResult("System.Byte.MaxValue Like System.SByte.MinValue", System.Byte.MaxValue Like System.SByte.MinValue) PrintResult("System.Byte.MaxValue Like System.Byte.MaxValue", System.Byte.MaxValue Like System.Byte.MaxValue) PrintResult("System.Byte.MaxValue Like -3S", System.Byte.MaxValue Like -3S) PrintResult("System.Byte.MaxValue Like 24US", System.Byte.MaxValue Like 24US) PrintResult("System.Byte.MaxValue Like -5I", System.Byte.MaxValue Like -5I) PrintResult("System.Byte.MaxValue Like 26UI", System.Byte.MaxValue Like 26UI) PrintResult("System.Byte.MaxValue Like -7L", System.Byte.MaxValue Like -7L) PrintResult("System.Byte.MaxValue Like 28UL", System.Byte.MaxValue Like 28UL) PrintResult("System.Byte.MaxValue Like -9D", System.Byte.MaxValue Like -9D) PrintResult("System.Byte.MaxValue Like 10.0F", System.Byte.MaxValue Like 10.0F) PrintResult("System.Byte.MaxValue Like -11.0R", System.Byte.MaxValue Like -11.0R) PrintResult("System.Byte.MaxValue Like ""12""", System.Byte.MaxValue Like "12") PrintResult("System.Byte.MaxValue Like TypeCode.Double", System.Byte.MaxValue Like TypeCode.Double) PrintResult("-3S Like False", -3S Like False) PrintResult("-3S Like True", -3S Like True) PrintResult("-3S Like System.SByte.MinValue", -3S Like System.SByte.MinValue) PrintResult("-3S Like System.Byte.MaxValue", -3S Like System.Byte.MaxValue) PrintResult("-3S Like -3S", -3S Like -3S) PrintResult("-3S Like 24US", -3S Like 24US) PrintResult("-3S Like -5I", -3S Like -5I) PrintResult("-3S Like 26UI", -3S Like 26UI) PrintResult("-3S Like -7L", -3S Like -7L) PrintResult("-3S Like 28UL", -3S Like 28UL) PrintResult("-3S Like -9D", -3S Like -9D) PrintResult("-3S Like 10.0F", -3S Like 10.0F) PrintResult("-3S Like -11.0R", -3S Like -11.0R) PrintResult("-3S Like ""12""", -3S Like "12") PrintResult("-3S Like TypeCode.Double", -3S Like TypeCode.Double) PrintResult("24US Like False", 24US Like False) PrintResult("24US Like True", 24US Like True) PrintResult("24US Like System.SByte.MinValue", 24US Like System.SByte.MinValue) PrintResult("24US Like System.Byte.MaxValue", 24US Like System.Byte.MaxValue) PrintResult("24US Like -3S", 24US Like -3S) PrintResult("24US Like 24US", 24US Like 24US) PrintResult("24US Like -5I", 24US Like -5I) PrintResult("24US Like 26UI", 24US Like 26UI) PrintResult("24US Like -7L", 24US Like -7L) PrintResult("24US Like 28UL", 24US Like 28UL) PrintResult("24US Like -9D", 24US Like -9D) PrintResult("24US Like 10.0F", 24US Like 10.0F) PrintResult("24US Like -11.0R", 24US Like -11.0R) PrintResult("24US Like ""12""", 24US Like "12") PrintResult("24US Like TypeCode.Double", 24US Like TypeCode.Double) PrintResult("-5I Like False", -5I Like False) PrintResult("-5I Like True", -5I Like True) PrintResult("-5I Like System.SByte.MinValue", -5I Like System.SByte.MinValue) PrintResult("-5I Like System.Byte.MaxValue", -5I Like System.Byte.MaxValue) PrintResult("-5I Like -3S", -5I Like -3S) PrintResult("-5I Like 24US", -5I Like 24US) PrintResult("-5I Like -5I", -5I Like -5I) PrintResult("-5I Like 26UI", -5I Like 26UI) PrintResult("-5I Like -7L", -5I Like -7L) PrintResult("-5I Like 28UL", -5I Like 28UL) PrintResult("-5I Like -9D", -5I Like -9D) PrintResult("-5I Like 10.0F", -5I Like 10.0F) PrintResult("-5I Like -11.0R", -5I Like -11.0R) PrintResult("-5I Like ""12""", -5I Like "12") PrintResult("-5I Like TypeCode.Double", -5I Like TypeCode.Double) PrintResult("26UI Like False", 26UI Like False) PrintResult("26UI Like True", 26UI Like True) PrintResult("26UI Like System.SByte.MinValue", 26UI Like System.SByte.MinValue) PrintResult("26UI Like System.Byte.MaxValue", 26UI Like System.Byte.MaxValue) PrintResult("26UI Like -3S", 26UI Like -3S) PrintResult("26UI Like 24US", 26UI Like 24US) PrintResult("26UI Like -5I", 26UI Like -5I) PrintResult("26UI Like 26UI", 26UI Like 26UI) PrintResult("26UI Like -7L", 26UI Like -7L) PrintResult("26UI Like 28UL", 26UI Like 28UL) PrintResult("26UI Like -9D", 26UI Like -9D) PrintResult("26UI Like 10.0F", 26UI Like 10.0F) PrintResult("26UI Like -11.0R", 26UI Like -11.0R) PrintResult("26UI Like ""12""", 26UI Like "12") PrintResult("26UI Like TypeCode.Double", 26UI Like TypeCode.Double) PrintResult("-7L Like False", -7L Like False) PrintResult("-7L Like True", -7L Like True) PrintResult("-7L Like System.SByte.MinValue", -7L Like System.SByte.MinValue) PrintResult("-7L Like System.Byte.MaxValue", -7L Like System.Byte.MaxValue) PrintResult("-7L Like -3S", -7L Like -3S) PrintResult("-7L Like 24US", -7L Like 24US) PrintResult("-7L Like -5I", -7L Like -5I) PrintResult("-7L Like 26UI", -7L Like 26UI) PrintResult("-7L Like -7L", -7L Like -7L) PrintResult("-7L Like 28UL", -7L Like 28UL) PrintResult("-7L Like -9D", -7L Like -9D) PrintResult("-7L Like 10.0F", -7L Like 10.0F) PrintResult("-7L Like -11.0R", -7L Like -11.0R) PrintResult("-7L Like ""12""", -7L Like "12") PrintResult("-7L Like TypeCode.Double", -7L Like TypeCode.Double) PrintResult("28UL Like False", 28UL Like False) PrintResult("28UL Like True", 28UL Like True) PrintResult("28UL Like System.SByte.MinValue", 28UL Like System.SByte.MinValue) PrintResult("28UL Like System.Byte.MaxValue", 28UL Like System.Byte.MaxValue) PrintResult("28UL Like -3S", 28UL Like -3S) PrintResult("28UL Like 24US", 28UL Like 24US) PrintResult("28UL Like -5I", 28UL Like -5I) PrintResult("28UL Like 26UI", 28UL Like 26UI) PrintResult("28UL Like -7L", 28UL Like -7L) PrintResult("28UL Like 28UL", 28UL Like 28UL) PrintResult("28UL Like -9D", 28UL Like -9D) PrintResult("28UL Like 10.0F", 28UL Like 10.0F) PrintResult("28UL Like -11.0R", 28UL Like -11.0R) PrintResult("28UL Like ""12""", 28UL Like "12") PrintResult("28UL Like TypeCode.Double", 28UL Like TypeCode.Double) PrintResult("-9D Like False", -9D Like False) PrintResult("-9D Like True", -9D Like True) PrintResult("-9D Like System.SByte.MinValue", -9D Like System.SByte.MinValue) PrintResult("-9D Like System.Byte.MaxValue", -9D Like System.Byte.MaxValue) PrintResult("-9D Like -3S", -9D Like -3S) PrintResult("-9D Like 24US", -9D Like 24US) PrintResult("-9D Like -5I", -9D Like -5I) PrintResult("-9D Like 26UI", -9D Like 26UI) PrintResult("-9D Like -7L", -9D Like -7L) PrintResult("-9D Like 28UL", -9D Like 28UL) PrintResult("-9D Like -9D", -9D Like -9D) PrintResult("-9D Like 10.0F", -9D Like 10.0F) PrintResult("-9D Like -11.0R", -9D Like -11.0R) PrintResult("-9D Like ""12""", -9D Like "12") PrintResult("-9D Like TypeCode.Double", -9D Like TypeCode.Double) PrintResult("10.0F Like False", 10.0F Like False) PrintResult("10.0F Like True", 10.0F Like True) PrintResult("10.0F Like System.SByte.MinValue", 10.0F Like System.SByte.MinValue) PrintResult("10.0F Like System.Byte.MaxValue", 10.0F Like System.Byte.MaxValue) PrintResult("10.0F Like -3S", 10.0F Like -3S) PrintResult("10.0F Like 24US", 10.0F Like 24US) PrintResult("10.0F Like -5I", 10.0F Like -5I) PrintResult("10.0F Like 26UI", 10.0F Like 26UI) PrintResult("10.0F Like -7L", 10.0F Like -7L) PrintResult("10.0F Like 28UL", 10.0F Like 28UL) PrintResult("10.0F Like -9D", 10.0F Like -9D) PrintResult("10.0F Like 10.0F", 10.0F Like 10.0F) PrintResult("10.0F Like -11.0R", 10.0F Like -11.0R) PrintResult("10.0F Like ""12""", 10.0F Like "12") PrintResult("10.0F Like TypeCode.Double", 10.0F Like TypeCode.Double) PrintResult("-11.0R Like False", -11.0R Like False) PrintResult("-11.0R Like True", -11.0R Like True) PrintResult("-11.0R Like System.SByte.MinValue", -11.0R Like System.SByte.MinValue) PrintResult("-11.0R Like System.Byte.MaxValue", -11.0R Like System.Byte.MaxValue) PrintResult("-11.0R Like -3S", -11.0R Like -3S) PrintResult("-11.0R Like 24US", -11.0R Like 24US) PrintResult("-11.0R Like -5I", -11.0R Like -5I) PrintResult("-11.0R Like 26UI", -11.0R Like 26UI) PrintResult("-11.0R Like -7L", -11.0R Like -7L) PrintResult("-11.0R Like 28UL", -11.0R Like 28UL) PrintResult("-11.0R Like -9D", -11.0R Like -9D) PrintResult("-11.0R Like 10.0F", -11.0R Like 10.0F) PrintResult("-11.0R Like -11.0R", -11.0R Like -11.0R) PrintResult("-11.0R Like ""12""", -11.0R Like "12") PrintResult("-11.0R Like TypeCode.Double", -11.0R Like TypeCode.Double) PrintResult("""12"" Like False", "12" Like False) PrintResult("""12"" Like True", "12" Like True) PrintResult("""12"" Like System.SByte.MinValue", "12" Like System.SByte.MinValue) PrintResult("""12"" Like System.Byte.MaxValue", "12" Like System.Byte.MaxValue) PrintResult("""12"" Like -3S", "12" Like -3S) PrintResult("""12"" Like 24US", "12" Like 24US) PrintResult("""12"" Like -5I", "12" Like -5I) PrintResult("""12"" Like 26UI", "12" Like 26UI) PrintResult("""12"" Like -7L", "12" Like -7L) PrintResult("""12"" Like 28UL", "12" Like 28UL) PrintResult("""12"" Like -9D", "12" Like -9D) PrintResult("""12"" Like 10.0F", "12" Like 10.0F) PrintResult("""12"" Like -11.0R", "12" Like -11.0R) PrintResult("""12"" Like ""12""", "12" Like "12") PrintResult("""12"" Like TypeCode.Double", "12" Like TypeCode.Double) PrintResult("TypeCode.Double Like False", TypeCode.Double Like False) PrintResult("TypeCode.Double Like True", TypeCode.Double Like True) PrintResult("TypeCode.Double Like System.SByte.MinValue", TypeCode.Double Like System.SByte.MinValue) PrintResult("TypeCode.Double Like System.Byte.MaxValue", TypeCode.Double Like System.Byte.MaxValue) PrintResult("TypeCode.Double Like -3S", TypeCode.Double Like -3S) PrintResult("TypeCode.Double Like 24US", TypeCode.Double Like 24US) PrintResult("TypeCode.Double Like -5I", TypeCode.Double Like -5I) PrintResult("TypeCode.Double Like 26UI", TypeCode.Double Like 26UI) PrintResult("TypeCode.Double Like -7L", TypeCode.Double Like -7L) PrintResult("TypeCode.Double Like 28UL", TypeCode.Double Like 28UL) PrintResult("TypeCode.Double Like -9D", TypeCode.Double Like -9D) PrintResult("TypeCode.Double Like 10.0F", TypeCode.Double Like 10.0F) PrintResult("TypeCode.Double Like -11.0R", TypeCode.Double Like -11.0R) PrintResult("TypeCode.Double Like ""12""", TypeCode.Double Like "12") PrintResult("TypeCode.Double Like TypeCode.Double", TypeCode.Double Like TypeCode.Double) PrintResult("False = False", False = False) PrintResult("False = True", False = True) PrintResult("False = System.SByte.MinValue", False = System.SByte.MinValue) PrintResult("False = System.Byte.MaxValue", False = System.Byte.MaxValue) PrintResult("False = -3S", False = -3S) PrintResult("False = 24US", False = 24US) PrintResult("False = -5I", False = -5I) PrintResult("False = 26UI", False = 26UI) PrintResult("False = -7L", False = -7L) PrintResult("False = 28UL", False = 28UL) PrintResult("False = -9D", False = -9D) PrintResult("False = 10.0F", False = 10.0F) PrintResult("False = -11.0R", False = -11.0R) PrintResult("False = ""12""", False = "12") PrintResult("False = TypeCode.Double", False = TypeCode.Double) PrintResult("True = False", True = False) PrintResult("True = True", True = True) PrintResult("True = System.SByte.MinValue", True = System.SByte.MinValue) PrintResult("True = System.Byte.MaxValue", True = System.Byte.MaxValue) PrintResult("True = -3S", True = -3S) PrintResult("True = 24US", True = 24US) PrintResult("True = -5I", True = -5I) PrintResult("True = 26UI", True = 26UI) PrintResult("True = -7L", True = -7L) PrintResult("True = 28UL", True = 28UL) PrintResult("True = -9D", True = -9D) PrintResult("True = 10.0F", True = 10.0F) PrintResult("True = -11.0R", True = -11.0R) PrintResult("True = ""12""", True = "12") PrintResult("True = TypeCode.Double", True = TypeCode.Double) PrintResult("System.SByte.MinValue = False", System.SByte.MinValue = False) PrintResult("System.SByte.MinValue = True", System.SByte.MinValue = True) PrintResult("System.SByte.MinValue = System.SByte.MinValue", System.SByte.MinValue = System.SByte.MinValue) PrintResult("System.SByte.MinValue = System.Byte.MaxValue", System.SByte.MinValue = System.Byte.MaxValue) PrintResult("System.SByte.MinValue = -3S", System.SByte.MinValue = -3S) PrintResult("System.SByte.MinValue = 24US", System.SByte.MinValue = 24US) PrintResult("System.SByte.MinValue = -5I", System.SByte.MinValue = -5I) PrintResult("System.SByte.MinValue = 26UI", System.SByte.MinValue = 26UI) PrintResult("System.SByte.MinValue = -7L", System.SByte.MinValue = -7L) PrintResult("System.SByte.MinValue = 28UL", System.SByte.MinValue = 28UL) PrintResult("System.SByte.MinValue = -9D", System.SByte.MinValue = -9D) PrintResult("System.SByte.MinValue = 10.0F", System.SByte.MinValue = 10.0F) PrintResult("System.SByte.MinValue = -11.0R", System.SByte.MinValue = -11.0R) PrintResult("System.SByte.MinValue = ""12""", System.SByte.MinValue = "12") PrintResult("System.SByte.MinValue = TypeCode.Double", System.SByte.MinValue = TypeCode.Double) PrintResult("System.Byte.MaxValue = False", System.Byte.MaxValue = False) PrintResult("System.Byte.MaxValue = True", System.Byte.MaxValue = True) PrintResult("System.Byte.MaxValue = System.SByte.MinValue", System.Byte.MaxValue = System.SByte.MinValue) PrintResult("System.Byte.MaxValue = System.Byte.MaxValue", System.Byte.MaxValue = System.Byte.MaxValue) PrintResult("System.Byte.MaxValue = -3S", System.Byte.MaxValue = -3S) PrintResult("System.Byte.MaxValue = 24US", System.Byte.MaxValue = 24US) PrintResult("System.Byte.MaxValue = -5I", System.Byte.MaxValue = -5I) PrintResult("System.Byte.MaxValue = 26UI", System.Byte.MaxValue = 26UI) PrintResult("System.Byte.MaxValue = -7L", System.Byte.MaxValue = -7L) PrintResult("System.Byte.MaxValue = 28UL", System.Byte.MaxValue = 28UL) PrintResult("System.Byte.MaxValue = -9D", System.Byte.MaxValue = -9D) PrintResult("System.Byte.MaxValue = 10.0F", System.Byte.MaxValue = 10.0F) PrintResult("System.Byte.MaxValue = -11.0R", System.Byte.MaxValue = -11.0R) PrintResult("System.Byte.MaxValue = ""12""", System.Byte.MaxValue = "12") PrintResult("System.Byte.MaxValue = TypeCode.Double", System.Byte.MaxValue = TypeCode.Double) PrintResult("-3S = False", -3S = False) PrintResult("-3S = True", -3S = True) PrintResult("-3S = System.SByte.MinValue", -3S = System.SByte.MinValue) PrintResult("-3S = System.Byte.MaxValue", -3S = System.Byte.MaxValue) PrintResult("-3S = -3S", -3S = -3S) PrintResult("-3S = 24US", -3S = 24US) PrintResult("-3S = -5I", -3S = -5I) PrintResult("-3S = 26UI", -3S = 26UI) PrintResult("-3S = -7L", -3S = -7L) PrintResult("-3S = 28UL", -3S = 28UL) PrintResult("-3S = -9D", -3S = -9D) PrintResult("-3S = 10.0F", -3S = 10.0F) PrintResult("-3S = -11.0R", -3S = -11.0R) PrintResult("-3S = ""12""", -3S = "12") PrintResult("-3S = TypeCode.Double", -3S = TypeCode.Double) PrintResult("24US = False", 24US = False) PrintResult("24US = True", 24US = True) PrintResult("24US = System.SByte.MinValue", 24US = System.SByte.MinValue) PrintResult("24US = System.Byte.MaxValue", 24US = System.Byte.MaxValue) PrintResult("24US = -3S", 24US = -3S) PrintResult("24US = 24US", 24US = 24US) PrintResult("24US = -5I", 24US = -5I) PrintResult("24US = 26UI", 24US = 26UI) PrintResult("24US = -7L", 24US = -7L) PrintResult("24US = 28UL", 24US = 28UL) PrintResult("24US = -9D", 24US = -9D) PrintResult("24US = 10.0F", 24US = 10.0F) PrintResult("24US = -11.0R", 24US = -11.0R) PrintResult("24US = ""12""", 24US = "12") PrintResult("24US = TypeCode.Double", 24US = TypeCode.Double) PrintResult("-5I = False", -5I = False) PrintResult("-5I = True", -5I = True) PrintResult("-5I = System.SByte.MinValue", -5I = System.SByte.MinValue) PrintResult("-5I = System.Byte.MaxValue", -5I = System.Byte.MaxValue) PrintResult("-5I = -3S", -5I = -3S) PrintResult("-5I = 24US", -5I = 24US) PrintResult("-5I = -5I", -5I = -5I) PrintResult("-5I = 26UI", -5I = 26UI) PrintResult("-5I = -7L", -5I = -7L) PrintResult("-5I = 28UL", -5I = 28UL) PrintResult("-5I = -9D", -5I = -9D) PrintResult("-5I = 10.0F", -5I = 10.0F) PrintResult("-5I = -11.0R", -5I = -11.0R) PrintResult("-5I = ""12""", -5I = "12") PrintResult("-5I = TypeCode.Double", -5I = TypeCode.Double) PrintResult("26UI = False", 26UI = False) PrintResult("26UI = True", 26UI = True) PrintResult("26UI = System.SByte.MinValue", 26UI = System.SByte.MinValue) PrintResult("26UI = System.Byte.MaxValue", 26UI = System.Byte.MaxValue) PrintResult("26UI = -3S", 26UI = -3S) PrintResult("26UI = 24US", 26UI = 24US) PrintResult("26UI = -5I", 26UI = -5I) PrintResult("26UI = 26UI", 26UI = 26UI) PrintResult("26UI = -7L", 26UI = -7L) PrintResult("26UI = 28UL", 26UI = 28UL) PrintResult("26UI = -9D", 26UI = -9D) PrintResult("26UI = 10.0F", 26UI = 10.0F) PrintResult("26UI = -11.0R", 26UI = -11.0R) PrintResult("26UI = ""12""", 26UI = "12") PrintResult("26UI = TypeCode.Double", 26UI = TypeCode.Double) PrintResult("-7L = False", -7L = False) PrintResult("-7L = True", -7L = True) PrintResult("-7L = System.SByte.MinValue", -7L = System.SByte.MinValue) PrintResult("-7L = System.Byte.MaxValue", -7L = System.Byte.MaxValue) PrintResult("-7L = -3S", -7L = -3S) PrintResult("-7L = 24US", -7L = 24US) PrintResult("-7L = -5I", -7L = -5I) PrintResult("-7L = 26UI", -7L = 26UI) PrintResult("-7L = -7L", -7L = -7L) PrintResult("-7L = 28UL", -7L = 28UL) PrintResult("-7L = -9D", -7L = -9D) PrintResult("-7L = 10.0F", -7L = 10.0F) PrintResult("-7L = -11.0R", -7L = -11.0R) PrintResult("-7L = ""12""", -7L = "12") PrintResult("-7L = TypeCode.Double", -7L = TypeCode.Double) PrintResult("28UL = False", 28UL = False) PrintResult("28UL = True", 28UL = True) PrintResult("28UL = System.SByte.MinValue", 28UL = System.SByte.MinValue) PrintResult("28UL = System.Byte.MaxValue", 28UL = System.Byte.MaxValue) PrintResult("28UL = -3S", 28UL = -3S) PrintResult("28UL = 24US", 28UL = 24US) PrintResult("28UL = -5I", 28UL = -5I) PrintResult("28UL = 26UI", 28UL = 26UI) PrintResult("28UL = -7L", 28UL = -7L) PrintResult("28UL = 28UL", 28UL = 28UL) PrintResult("28UL = -9D", 28UL = -9D) PrintResult("28UL = 10.0F", 28UL = 10.0F) PrintResult("28UL = -11.0R", 28UL = -11.0R) PrintResult("28UL = ""12""", 28UL = "12") PrintResult("28UL = TypeCode.Double", 28UL = TypeCode.Double) PrintResult("-9D = False", -9D = False) PrintResult("-9D = True", -9D = True) PrintResult("-9D = System.SByte.MinValue", -9D = System.SByte.MinValue) PrintResult("-9D = System.Byte.MaxValue", -9D = System.Byte.MaxValue) PrintResult("-9D = -3S", -9D = -3S) PrintResult("-9D = 24US", -9D = 24US) PrintResult("-9D = -5I", -9D = -5I) PrintResult("-9D = 26UI", -9D = 26UI) PrintResult("-9D = -7L", -9D = -7L) PrintResult("-9D = 28UL", -9D = 28UL) PrintResult("-9D = -9D", -9D = -9D) PrintResult("-9D = 10.0F", -9D = 10.0F) PrintResult("-9D = -11.0R", -9D = -11.0R) PrintResult("-9D = ""12""", -9D = "12") PrintResult("-9D = TypeCode.Double", -9D = TypeCode.Double) PrintResult("10.0F = False", 10.0F = False) PrintResult("10.0F = True", 10.0F = True) PrintResult("10.0F = System.SByte.MinValue", 10.0F = System.SByte.MinValue) PrintResult("10.0F = System.Byte.MaxValue", 10.0F = System.Byte.MaxValue) PrintResult("10.0F = -3S", 10.0F = -3S) PrintResult("10.0F = 24US", 10.0F = 24US) PrintResult("10.0F = -5I", 10.0F = -5I) PrintResult("10.0F = 26UI", 10.0F = 26UI) PrintResult("10.0F = -7L", 10.0F = -7L) PrintResult("10.0F = 28UL", 10.0F = 28UL) PrintResult("10.0F = -9D", 10.0F = -9D) PrintResult("10.0F = 10.0F", 10.0F = 10.0F) PrintResult("10.0F = -11.0R", 10.0F = -11.0R) PrintResult("10.0F = ""12""", 10.0F = "12") PrintResult("10.0F = TypeCode.Double", 10.0F = TypeCode.Double) PrintResult("-11.0R = False", -11.0R = False) PrintResult("-11.0R = True", -11.0R = True) PrintResult("-11.0R = System.SByte.MinValue", -11.0R = System.SByte.MinValue) PrintResult("-11.0R = System.Byte.MaxValue", -11.0R = System.Byte.MaxValue) PrintResult("-11.0R = -3S", -11.0R = -3S) PrintResult("-11.0R = 24US", -11.0R = 24US) PrintResult("-11.0R = -5I", -11.0R = -5I) PrintResult("-11.0R = 26UI", -11.0R = 26UI) PrintResult("-11.0R = -7L", -11.0R = -7L) PrintResult("-11.0R = 28UL", -11.0R = 28UL) PrintResult("-11.0R = -9D", -11.0R = -9D) PrintResult("-11.0R = 10.0F", -11.0R = 10.0F) PrintResult("-11.0R = -11.0R", -11.0R = -11.0R) PrintResult("-11.0R = ""12""", -11.0R = "12") PrintResult("-11.0R = TypeCode.Double", -11.0R = TypeCode.Double) PrintResult("""12"" = False", "12" = False) PrintResult("""12"" = True", "12" = True) PrintResult("""12"" = System.SByte.MinValue", "12" = System.SByte.MinValue) PrintResult("""12"" = System.Byte.MaxValue", "12" = System.Byte.MaxValue) PrintResult("""12"" = -3S", "12" = -3S) PrintResult("""12"" = 24US", "12" = 24US) PrintResult("""12"" = -5I", "12" = -5I) PrintResult("""12"" = 26UI", "12" = 26UI) PrintResult("""12"" = -7L", "12" = -7L) PrintResult("""12"" = 28UL", "12" = 28UL) PrintResult("""12"" = -9D", "12" = -9D) PrintResult("""12"" = 10.0F", "12" = 10.0F) PrintResult("""12"" = -11.0R", "12" = -11.0R) PrintResult("""12"" = ""12""", "12" = "12") PrintResult("""12"" = TypeCode.Double", "12" = TypeCode.Double) PrintResult("TypeCode.Double = False", TypeCode.Double = False) PrintResult("TypeCode.Double = True", TypeCode.Double = True) PrintResult("TypeCode.Double = System.SByte.MinValue", TypeCode.Double = System.SByte.MinValue) PrintResult("TypeCode.Double = System.Byte.MaxValue", TypeCode.Double = System.Byte.MaxValue) PrintResult("TypeCode.Double = -3S", TypeCode.Double = -3S) PrintResult("TypeCode.Double = 24US", TypeCode.Double = 24US) PrintResult("TypeCode.Double = -5I", TypeCode.Double = -5I) PrintResult("TypeCode.Double = 26UI", TypeCode.Double = 26UI) PrintResult("TypeCode.Double = -7L", TypeCode.Double = -7L) PrintResult("TypeCode.Double = 28UL", TypeCode.Double = 28UL) PrintResult("TypeCode.Double = -9D", TypeCode.Double = -9D) PrintResult("TypeCode.Double = 10.0F", TypeCode.Double = 10.0F) PrintResult("TypeCode.Double = -11.0R", TypeCode.Double = -11.0R) PrintResult("TypeCode.Double = ""12""", TypeCode.Double = "12") PrintResult("TypeCode.Double = TypeCode.Double", TypeCode.Double = TypeCode.Double) PrintResult("False <> False", False <> False) PrintResult("False <> True", False <> True) PrintResult("False <> System.SByte.MinValue", False <> System.SByte.MinValue) PrintResult("False <> System.Byte.MaxValue", False <> System.Byte.MaxValue) PrintResult("False <> -3S", False <> -3S) PrintResult("False <> 24US", False <> 24US) PrintResult("False <> -5I", False <> -5I) PrintResult("False <> 26UI", False <> 26UI) PrintResult("False <> -7L", False <> -7L) PrintResult("False <> 28UL", False <> 28UL) PrintResult("False <> -9D", False <> -9D) PrintResult("False <> 10.0F", False <> 10.0F) PrintResult("False <> -11.0R", False <> -11.0R) PrintResult("False <> ""12""", False <> "12") PrintResult("False <> TypeCode.Double", False <> TypeCode.Double) PrintResult("True <> False", True <> False) PrintResult("True <> True", True <> True) PrintResult("True <> System.SByte.MinValue", True <> System.SByte.MinValue) PrintResult("True <> System.Byte.MaxValue", True <> System.Byte.MaxValue) PrintResult("True <> -3S", True <> -3S) PrintResult("True <> 24US", True <> 24US) PrintResult("True <> -5I", True <> -5I) PrintResult("True <> 26UI", True <> 26UI) PrintResult("True <> -7L", True <> -7L) PrintResult("True <> 28UL", True <> 28UL) PrintResult("True <> -9D", True <> -9D) PrintResult("True <> 10.0F", True <> 10.0F) PrintResult("True <> -11.0R", True <> -11.0R) PrintResult("True <> ""12""", True <> "12") PrintResult("True <> TypeCode.Double", True <> TypeCode.Double) PrintResult("System.SByte.MinValue <> False", System.SByte.MinValue <> False) PrintResult("System.SByte.MinValue <> True", System.SByte.MinValue <> True) PrintResult("System.SByte.MinValue <> System.SByte.MinValue", System.SByte.MinValue <> System.SByte.MinValue) PrintResult("System.SByte.MinValue <> System.Byte.MaxValue", System.SByte.MinValue <> System.Byte.MaxValue) PrintResult("System.SByte.MinValue <> -3S", System.SByte.MinValue <> -3S) PrintResult("System.SByte.MinValue <> 24US", System.SByte.MinValue <> 24US) PrintResult("System.SByte.MinValue <> -5I", System.SByte.MinValue <> -5I) PrintResult("System.SByte.MinValue <> 26UI", System.SByte.MinValue <> 26UI) PrintResult("System.SByte.MinValue <> -7L", System.SByte.MinValue <> -7L) PrintResult("System.SByte.MinValue <> 28UL", System.SByte.MinValue <> 28UL) PrintResult("System.SByte.MinValue <> -9D", System.SByte.MinValue <> -9D) PrintResult("System.SByte.MinValue <> 10.0F", System.SByte.MinValue <> 10.0F) PrintResult("System.SByte.MinValue <> -11.0R", System.SByte.MinValue <> -11.0R) PrintResult("System.SByte.MinValue <> ""12""", System.SByte.MinValue <> "12") PrintResult("System.SByte.MinValue <> TypeCode.Double", System.SByte.MinValue <> TypeCode.Double) PrintResult("System.Byte.MaxValue <> False", System.Byte.MaxValue <> False) PrintResult("System.Byte.MaxValue <> True", System.Byte.MaxValue <> True) PrintResult("System.Byte.MaxValue <> System.SByte.MinValue", System.Byte.MaxValue <> System.SByte.MinValue) PrintResult("System.Byte.MaxValue <> System.Byte.MaxValue", System.Byte.MaxValue <> System.Byte.MaxValue) PrintResult("System.Byte.MaxValue <> -3S", System.Byte.MaxValue <> -3S) PrintResult("System.Byte.MaxValue <> 24US", System.Byte.MaxValue <> 24US) PrintResult("System.Byte.MaxValue <> -5I", System.Byte.MaxValue <> -5I) PrintResult("System.Byte.MaxValue <> 26UI", System.Byte.MaxValue <> 26UI) PrintResult("System.Byte.MaxValue <> -7L", System.Byte.MaxValue <> -7L) PrintResult("System.Byte.MaxValue <> 28UL", System.Byte.MaxValue <> 28UL) PrintResult("System.Byte.MaxValue <> -9D", System.Byte.MaxValue <> -9D) PrintResult("System.Byte.MaxValue <> 10.0F", System.Byte.MaxValue <> 10.0F) PrintResult("System.Byte.MaxValue <> -11.0R", System.Byte.MaxValue <> -11.0R) PrintResult("System.Byte.MaxValue <> ""12""", System.Byte.MaxValue <> "12") PrintResult("System.Byte.MaxValue <> TypeCode.Double", System.Byte.MaxValue <> TypeCode.Double) PrintResult("-3S <> False", -3S <> False) PrintResult("-3S <> True", -3S <> True) PrintResult("-3S <> System.SByte.MinValue", -3S <> System.SByte.MinValue) PrintResult("-3S <> System.Byte.MaxValue", -3S <> System.Byte.MaxValue) PrintResult("-3S <> -3S", -3S <> -3S) PrintResult("-3S <> 24US", -3S <> 24US) PrintResult("-3S <> -5I", -3S <> -5I) PrintResult("-3S <> 26UI", -3S <> 26UI) PrintResult("-3S <> -7L", -3S <> -7L) PrintResult("-3S <> 28UL", -3S <> 28UL) PrintResult("-3S <> -9D", -3S <> -9D) PrintResult("-3S <> 10.0F", -3S <> 10.0F) PrintResult("-3S <> -11.0R", -3S <> -11.0R) PrintResult("-3S <> ""12""", -3S <> "12") PrintResult("-3S <> TypeCode.Double", -3S <> TypeCode.Double) PrintResult("24US <> False", 24US <> False) PrintResult("24US <> True", 24US <> True) PrintResult("24US <> System.SByte.MinValue", 24US <> System.SByte.MinValue) PrintResult("24US <> System.Byte.MaxValue", 24US <> System.Byte.MaxValue) PrintResult("24US <> -3S", 24US <> -3S) PrintResult("24US <> 24US", 24US <> 24US) PrintResult("24US <> -5I", 24US <> -5I) PrintResult("24US <> 26UI", 24US <> 26UI) PrintResult("24US <> -7L", 24US <> -7L) PrintResult("24US <> 28UL", 24US <> 28UL) PrintResult("24US <> -9D", 24US <> -9D) PrintResult("24US <> 10.0F", 24US <> 10.0F) PrintResult("24US <> -11.0R", 24US <> -11.0R) PrintResult("24US <> ""12""", 24US <> "12") PrintResult("24US <> TypeCode.Double", 24US <> TypeCode.Double) PrintResult("-5I <> False", -5I <> False) PrintResult("-5I <> True", -5I <> True) PrintResult("-5I <> System.SByte.MinValue", -5I <> System.SByte.MinValue) PrintResult("-5I <> System.Byte.MaxValue", -5I <> System.Byte.MaxValue) PrintResult("-5I <> -3S", -5I <> -3S) PrintResult("-5I <> 24US", -5I <> 24US) PrintResult("-5I <> -5I", -5I <> -5I) PrintResult("-5I <> 26UI", -5I <> 26UI) PrintResult("-5I <> -7L", -5I <> -7L) PrintResult("-5I <> 28UL", -5I <> 28UL) PrintResult("-5I <> -9D", -5I <> -9D) PrintResult("-5I <> 10.0F", -5I <> 10.0F) PrintResult("-5I <> -11.0R", -5I <> -11.0R) PrintResult("-5I <> ""12""", -5I <> "12") PrintResult("-5I <> TypeCode.Double", -5I <> TypeCode.Double) PrintResult("26UI <> False", 26UI <> False) PrintResult("26UI <> True", 26UI <> True) PrintResult("26UI <> System.SByte.MinValue", 26UI <> System.SByte.MinValue) PrintResult("26UI <> System.Byte.MaxValue", 26UI <> System.Byte.MaxValue) PrintResult("26UI <> -3S", 26UI <> -3S) PrintResult("26UI <> 24US", 26UI <> 24US) PrintResult("26UI <> -5I", 26UI <> -5I) PrintResult("26UI <> 26UI", 26UI <> 26UI) PrintResult("26UI <> -7L", 26UI <> -7L) PrintResult("26UI <> 28UL", 26UI <> 28UL) PrintResult("26UI <> -9D", 26UI <> -9D) PrintResult("26UI <> 10.0F", 26UI <> 10.0F) PrintResult("26UI <> -11.0R", 26UI <> -11.0R) PrintResult("26UI <> ""12""", 26UI <> "12") PrintResult("26UI <> TypeCode.Double", 26UI <> TypeCode.Double) PrintResult("-7L <> False", -7L <> False) PrintResult("-7L <> True", -7L <> True) PrintResult("-7L <> System.SByte.MinValue", -7L <> System.SByte.MinValue) PrintResult("-7L <> System.Byte.MaxValue", -7L <> System.Byte.MaxValue) PrintResult("-7L <> -3S", -7L <> -3S) PrintResult("-7L <> 24US", -7L <> 24US) PrintResult("-7L <> -5I", -7L <> -5I) PrintResult("-7L <> 26UI", -7L <> 26UI) PrintResult("-7L <> -7L", -7L <> -7L) PrintResult("-7L <> 28UL", -7L <> 28UL) PrintResult("-7L <> -9D", -7L <> -9D) PrintResult("-7L <> 10.0F", -7L <> 10.0F) PrintResult("-7L <> -11.0R", -7L <> -11.0R) PrintResult("-7L <> ""12""", -7L <> "12") PrintResult("-7L <> TypeCode.Double", -7L <> TypeCode.Double) PrintResult("28UL <> False", 28UL <> False) PrintResult("28UL <> True", 28UL <> True) PrintResult("28UL <> System.SByte.MinValue", 28UL <> System.SByte.MinValue) PrintResult("28UL <> System.Byte.MaxValue", 28UL <> System.Byte.MaxValue) PrintResult("28UL <> -3S", 28UL <> -3S) PrintResult("28UL <> 24US", 28UL <> 24US) PrintResult("28UL <> -5I", 28UL <> -5I) PrintResult("28UL <> 26UI", 28UL <> 26UI) PrintResult("28UL <> -7L", 28UL <> -7L) PrintResult("28UL <> 28UL", 28UL <> 28UL) PrintResult("28UL <> -9D", 28UL <> -9D) PrintResult("28UL <> 10.0F", 28UL <> 10.0F) PrintResult("28UL <> -11.0R", 28UL <> -11.0R) PrintResult("28UL <> ""12""", 28UL <> "12") PrintResult("28UL <> TypeCode.Double", 28UL <> TypeCode.Double) PrintResult("-9D <> False", -9D <> False) PrintResult("-9D <> True", -9D <> True) PrintResult("-9D <> System.SByte.MinValue", -9D <> System.SByte.MinValue) PrintResult("-9D <> System.Byte.MaxValue", -9D <> System.Byte.MaxValue) PrintResult("-9D <> -3S", -9D <> -3S) PrintResult("-9D <> 24US", -9D <> 24US) PrintResult("-9D <> -5I", -9D <> -5I) PrintResult("-9D <> 26UI", -9D <> 26UI) PrintResult("-9D <> -7L", -9D <> -7L) PrintResult("-9D <> 28UL", -9D <> 28UL) PrintResult("-9D <> -9D", -9D <> -9D) PrintResult("-9D <> 10.0F", -9D <> 10.0F) PrintResult("-9D <> -11.0R", -9D <> -11.0R) PrintResult("-9D <> ""12""", -9D <> "12") PrintResult("-9D <> TypeCode.Double", -9D <> TypeCode.Double) PrintResult("10.0F <> False", 10.0F <> False) PrintResult("10.0F <> True", 10.0F <> True) PrintResult("10.0F <> System.SByte.MinValue", 10.0F <> System.SByte.MinValue) PrintResult("10.0F <> System.Byte.MaxValue", 10.0F <> System.Byte.MaxValue) PrintResult("10.0F <> -3S", 10.0F <> -3S) PrintResult("10.0F <> 24US", 10.0F <> 24US) PrintResult("10.0F <> -5I", 10.0F <> -5I) PrintResult("10.0F <> 26UI", 10.0F <> 26UI) PrintResult("10.0F <> -7L", 10.0F <> -7L) PrintResult("10.0F <> 28UL", 10.0F <> 28UL) PrintResult("10.0F <> -9D", 10.0F <> -9D) PrintResult("10.0F <> 10.0F", 10.0F <> 10.0F) PrintResult("10.0F <> -11.0R", 10.0F <> -11.0R) PrintResult("10.0F <> ""12""", 10.0F <> "12") PrintResult("10.0F <> TypeCode.Double", 10.0F <> TypeCode.Double) PrintResult("-11.0R <> False", -11.0R <> False) PrintResult("-11.0R <> True", -11.0R <> True) PrintResult("-11.0R <> System.SByte.MinValue", -11.0R <> System.SByte.MinValue) PrintResult("-11.0R <> System.Byte.MaxValue", -11.0R <> System.Byte.MaxValue) PrintResult("-11.0R <> -3S", -11.0R <> -3S) PrintResult("-11.0R <> 24US", -11.0R <> 24US) PrintResult("-11.0R <> -5I", -11.0R <> -5I) PrintResult("-11.0R <> 26UI", -11.0R <> 26UI) PrintResult("-11.0R <> -7L", -11.0R <> -7L) PrintResult("-11.0R <> 28UL", -11.0R <> 28UL) PrintResult("-11.0R <> -9D", -11.0R <> -9D) PrintResult("-11.0R <> 10.0F", -11.0R <> 10.0F) PrintResult("-11.0R <> -11.0R", -11.0R <> -11.0R) PrintResult("-11.0R <> ""12""", -11.0R <> "12") PrintResult("-11.0R <> TypeCode.Double", -11.0R <> TypeCode.Double) PrintResult("""12"" <> False", "12" <> False) PrintResult("""12"" <> True", "12" <> True) PrintResult("""12"" <> System.SByte.MinValue", "12" <> System.SByte.MinValue) PrintResult("""12"" <> System.Byte.MaxValue", "12" <> System.Byte.MaxValue) PrintResult("""12"" <> -3S", "12" <> -3S) PrintResult("""12"" <> 24US", "12" <> 24US) PrintResult("""12"" <> -5I", "12" <> -5I) PrintResult("""12"" <> 26UI", "12" <> 26UI) PrintResult("""12"" <> -7L", "12" <> -7L) PrintResult("""12"" <> 28UL", "12" <> 28UL) PrintResult("""12"" <> -9D", "12" <> -9D) PrintResult("""12"" <> 10.0F", "12" <> 10.0F) PrintResult("""12"" <> -11.0R", "12" <> -11.0R) PrintResult("""12"" <> ""12""", "12" <> "12") PrintResult("""12"" <> TypeCode.Double", "12" <> TypeCode.Double) PrintResult("TypeCode.Double <> False", TypeCode.Double <> False) PrintResult("TypeCode.Double <> True", TypeCode.Double <> True) PrintResult("TypeCode.Double <> System.SByte.MinValue", TypeCode.Double <> System.SByte.MinValue) PrintResult("TypeCode.Double <> System.Byte.MaxValue", TypeCode.Double <> System.Byte.MaxValue) PrintResult("TypeCode.Double <> -3S", TypeCode.Double <> -3S) PrintResult("TypeCode.Double <> 24US", TypeCode.Double <> 24US) PrintResult("TypeCode.Double <> -5I", TypeCode.Double <> -5I) PrintResult("TypeCode.Double <> 26UI", TypeCode.Double <> 26UI) PrintResult("TypeCode.Double <> -7L", TypeCode.Double <> -7L) PrintResult("TypeCode.Double <> 28UL", TypeCode.Double <> 28UL) PrintResult("TypeCode.Double <> -9D", TypeCode.Double <> -9D) PrintResult("TypeCode.Double <> 10.0F", TypeCode.Double <> 10.0F) PrintResult("TypeCode.Double <> -11.0R", TypeCode.Double <> -11.0R) PrintResult("TypeCode.Double <> ""12""", TypeCode.Double <> "12") PrintResult("TypeCode.Double <> TypeCode.Double", TypeCode.Double <> TypeCode.Double) PrintResult("False <= False", False <= False) PrintResult("False <= True", False <= True) PrintResult("False <= System.SByte.MinValue", False <= System.SByte.MinValue) PrintResult("False <= System.Byte.MaxValue", False <= System.Byte.MaxValue) PrintResult("False <= -3S", False <= -3S) PrintResult("False <= 24US", False <= 24US) PrintResult("False <= -5I", False <= -5I) PrintResult("False <= 26UI", False <= 26UI) PrintResult("False <= -7L", False <= -7L) PrintResult("False <= 28UL", False <= 28UL) PrintResult("False <= -9D", False <= -9D) PrintResult("False <= 10.0F", False <= 10.0F) PrintResult("False <= -11.0R", False <= -11.0R) PrintResult("False <= ""12""", False <= "12") PrintResult("False <= TypeCode.Double", False <= TypeCode.Double) PrintResult("True <= False", True <= False) PrintResult("True <= True", True <= True) PrintResult("True <= System.SByte.MinValue", True <= System.SByte.MinValue) PrintResult("True <= System.Byte.MaxValue", True <= System.Byte.MaxValue) PrintResult("True <= -3S", True <= -3S) PrintResult("True <= 24US", True <= 24US) PrintResult("True <= -5I", True <= -5I) PrintResult("True <= 26UI", True <= 26UI) PrintResult("True <= -7L", True <= -7L) PrintResult("True <= 28UL", True <= 28UL) PrintResult("True <= -9D", True <= -9D) PrintResult("True <= 10.0F", True <= 10.0F) PrintResult("True <= -11.0R", True <= -11.0R) PrintResult("True <= ""12""", True <= "12") PrintResult("True <= TypeCode.Double", True <= TypeCode.Double) PrintResult("System.SByte.MinValue <= False", System.SByte.MinValue <= False) PrintResult("System.SByte.MinValue <= True", System.SByte.MinValue <= True) PrintResult("System.SByte.MinValue <= System.SByte.MinValue", System.SByte.MinValue <= System.SByte.MinValue) PrintResult("System.SByte.MinValue <= System.Byte.MaxValue", System.SByte.MinValue <= System.Byte.MaxValue) PrintResult("System.SByte.MinValue <= -3S", System.SByte.MinValue <= -3S) PrintResult("System.SByte.MinValue <= 24US", System.SByte.MinValue <= 24US) PrintResult("System.SByte.MinValue <= -5I", System.SByte.MinValue <= -5I) PrintResult("System.SByte.MinValue <= 26UI", System.SByte.MinValue <= 26UI) PrintResult("System.SByte.MinValue <= -7L", System.SByte.MinValue <= -7L) PrintResult("System.SByte.MinValue <= 28UL", System.SByte.MinValue <= 28UL) PrintResult("System.SByte.MinValue <= -9D", System.SByte.MinValue <= -9D) PrintResult("System.SByte.MinValue <= 10.0F", System.SByte.MinValue <= 10.0F) PrintResult("System.SByte.MinValue <= -11.0R", System.SByte.MinValue <= -11.0R) PrintResult("System.SByte.MinValue <= ""12""", System.SByte.MinValue <= "12") PrintResult("System.SByte.MinValue <= TypeCode.Double", System.SByte.MinValue <= TypeCode.Double) PrintResult("System.Byte.MaxValue <= False", System.Byte.MaxValue <= False) PrintResult("System.Byte.MaxValue <= True", System.Byte.MaxValue <= True) PrintResult("System.Byte.MaxValue <= System.SByte.MinValue", System.Byte.MaxValue <= System.SByte.MinValue) PrintResult("System.Byte.MaxValue <= System.Byte.MaxValue", System.Byte.MaxValue <= System.Byte.MaxValue) PrintResult("System.Byte.MaxValue <= -3S", System.Byte.MaxValue <= -3S) PrintResult("System.Byte.MaxValue <= 24US", System.Byte.MaxValue <= 24US) PrintResult("System.Byte.MaxValue <= -5I", System.Byte.MaxValue <= -5I) PrintResult("System.Byte.MaxValue <= 26UI", System.Byte.MaxValue <= 26UI) PrintResult("System.Byte.MaxValue <= -7L", System.Byte.MaxValue <= -7L) PrintResult("System.Byte.MaxValue <= 28UL", System.Byte.MaxValue <= 28UL) PrintResult("System.Byte.MaxValue <= -9D", System.Byte.MaxValue <= -9D) PrintResult("System.Byte.MaxValue <= 10.0F", System.Byte.MaxValue <= 10.0F) PrintResult("System.Byte.MaxValue <= -11.0R", System.Byte.MaxValue <= -11.0R) PrintResult("System.Byte.MaxValue <= ""12""", System.Byte.MaxValue <= "12") PrintResult("System.Byte.MaxValue <= TypeCode.Double", System.Byte.MaxValue <= TypeCode.Double) PrintResult("-3S <= False", -3S <= False) PrintResult("-3S <= True", -3S <= True) PrintResult("-3S <= System.SByte.MinValue", -3S <= System.SByte.MinValue) PrintResult("-3S <= System.Byte.MaxValue", -3S <= System.Byte.MaxValue) PrintResult("-3S <= -3S", -3S <= -3S) PrintResult("-3S <= 24US", -3S <= 24US) PrintResult("-3S <= -5I", -3S <= -5I) PrintResult("-3S <= 26UI", -3S <= 26UI) PrintResult("-3S <= -7L", -3S <= -7L) PrintResult("-3S <= 28UL", -3S <= 28UL) PrintResult("-3S <= -9D", -3S <= -9D) PrintResult("-3S <= 10.0F", -3S <= 10.0F) PrintResult("-3S <= -11.0R", -3S <= -11.0R) PrintResult("-3S <= ""12""", -3S <= "12") PrintResult("-3S <= TypeCode.Double", -3S <= TypeCode.Double) PrintResult("24US <= False", 24US <= False) PrintResult("24US <= True", 24US <= True) PrintResult("24US <= System.SByte.MinValue", 24US <= System.SByte.MinValue) PrintResult("24US <= System.Byte.MaxValue", 24US <= System.Byte.MaxValue) PrintResult("24US <= -3S", 24US <= -3S) PrintResult("24US <= 24US", 24US <= 24US) PrintResult("24US <= -5I", 24US <= -5I) PrintResult("24US <= 26UI", 24US <= 26UI) PrintResult("24US <= -7L", 24US <= -7L) PrintResult("24US <= 28UL", 24US <= 28UL) PrintResult("24US <= -9D", 24US <= -9D) PrintResult("24US <= 10.0F", 24US <= 10.0F) PrintResult("24US <= -11.0R", 24US <= -11.0R) PrintResult("24US <= ""12""", 24US <= "12") PrintResult("24US <= TypeCode.Double", 24US <= TypeCode.Double) PrintResult("-5I <= False", -5I <= False) PrintResult("-5I <= True", -5I <= True) PrintResult("-5I <= System.SByte.MinValue", -5I <= System.SByte.MinValue) PrintResult("-5I <= System.Byte.MaxValue", -5I <= System.Byte.MaxValue) PrintResult("-5I <= -3S", -5I <= -3S) PrintResult("-5I <= 24US", -5I <= 24US) PrintResult("-5I <= -5I", -5I <= -5I) PrintResult("-5I <= 26UI", -5I <= 26UI) PrintResult("-5I <= -7L", -5I <= -7L) PrintResult("-5I <= 28UL", -5I <= 28UL) PrintResult("-5I <= -9D", -5I <= -9D) PrintResult("-5I <= 10.0F", -5I <= 10.0F) PrintResult("-5I <= -11.0R", -5I <= -11.0R) PrintResult("-5I <= ""12""", -5I <= "12") PrintResult("-5I <= TypeCode.Double", -5I <= TypeCode.Double) PrintResult("26UI <= False", 26UI <= False) PrintResult("26UI <= True", 26UI <= True) PrintResult("26UI <= System.SByte.MinValue", 26UI <= System.SByte.MinValue) PrintResult("26UI <= System.Byte.MaxValue", 26UI <= System.Byte.MaxValue) PrintResult("26UI <= -3S", 26UI <= -3S) PrintResult("26UI <= 24US", 26UI <= 24US) PrintResult("26UI <= -5I", 26UI <= -5I) PrintResult("26UI <= 26UI", 26UI <= 26UI) PrintResult("26UI <= -7L", 26UI <= -7L) PrintResult("26UI <= 28UL", 26UI <= 28UL) PrintResult("26UI <= -9D", 26UI <= -9D) PrintResult("26UI <= 10.0F", 26UI <= 10.0F) PrintResult("26UI <= -11.0R", 26UI <= -11.0R) PrintResult("26UI <= ""12""", 26UI <= "12") PrintResult("26UI <= TypeCode.Double", 26UI <= TypeCode.Double) PrintResult("-7L <= False", -7L <= False) PrintResult("-7L <= True", -7L <= True) PrintResult("-7L <= System.SByte.MinValue", -7L <= System.SByte.MinValue) PrintResult("-7L <= System.Byte.MaxValue", -7L <= System.Byte.MaxValue) PrintResult("-7L <= -3S", -7L <= -3S) PrintResult("-7L <= 24US", -7L <= 24US) PrintResult("-7L <= -5I", -7L <= -5I) PrintResult("-7L <= 26UI", -7L <= 26UI) PrintResult("-7L <= -7L", -7L <= -7L) PrintResult("-7L <= 28UL", -7L <= 28UL) PrintResult("-7L <= -9D", -7L <= -9D) PrintResult("-7L <= 10.0F", -7L <= 10.0F) PrintResult("-7L <= -11.0R", -7L <= -11.0R) PrintResult("-7L <= ""12""", -7L <= "12") PrintResult("-7L <= TypeCode.Double", -7L <= TypeCode.Double) PrintResult("28UL <= False", 28UL <= False) PrintResult("28UL <= True", 28UL <= True) PrintResult("28UL <= System.SByte.MinValue", 28UL <= System.SByte.MinValue) PrintResult("28UL <= System.Byte.MaxValue", 28UL <= System.Byte.MaxValue) PrintResult("28UL <= -3S", 28UL <= -3S) PrintResult("28UL <= 24US", 28UL <= 24US) PrintResult("28UL <= -5I", 28UL <= -5I) PrintResult("28UL <= 26UI", 28UL <= 26UI) PrintResult("28UL <= -7L", 28UL <= -7L) PrintResult("28UL <= 28UL", 28UL <= 28UL) PrintResult("28UL <= -9D", 28UL <= -9D) PrintResult("28UL <= 10.0F", 28UL <= 10.0F) PrintResult("28UL <= -11.0R", 28UL <= -11.0R) PrintResult("28UL <= ""12""", 28UL <= "12") PrintResult("28UL <= TypeCode.Double", 28UL <= TypeCode.Double) PrintResult("-9D <= False", -9D <= False) PrintResult("-9D <= True", -9D <= True) PrintResult("-9D <= System.SByte.MinValue", -9D <= System.SByte.MinValue) PrintResult("-9D <= System.Byte.MaxValue", -9D <= System.Byte.MaxValue) PrintResult("-9D <= -3S", -9D <= -3S) PrintResult("-9D <= 24US", -9D <= 24US) PrintResult("-9D <= -5I", -9D <= -5I) PrintResult("-9D <= 26UI", -9D <= 26UI) PrintResult("-9D <= -7L", -9D <= -7L) PrintResult("-9D <= 28UL", -9D <= 28UL) PrintResult("-9D <= -9D", -9D <= -9D) PrintResult("-9D <= 10.0F", -9D <= 10.0F) PrintResult("-9D <= -11.0R", -9D <= -11.0R) PrintResult("-9D <= ""12""", -9D <= "12") PrintResult("-9D <= TypeCode.Double", -9D <= TypeCode.Double) PrintResult("10.0F <= False", 10.0F <= False) PrintResult("10.0F <= True", 10.0F <= True) PrintResult("10.0F <= System.SByte.MinValue", 10.0F <= System.SByte.MinValue) PrintResult("10.0F <= System.Byte.MaxValue", 10.0F <= System.Byte.MaxValue) PrintResult("10.0F <= -3S", 10.0F <= -3S) PrintResult("10.0F <= 24US", 10.0F <= 24US) PrintResult("10.0F <= -5I", 10.0F <= -5I) PrintResult("10.0F <= 26UI", 10.0F <= 26UI) PrintResult("10.0F <= -7L", 10.0F <= -7L) PrintResult("10.0F <= 28UL", 10.0F <= 28UL) PrintResult("10.0F <= -9D", 10.0F <= -9D) PrintResult("10.0F <= 10.0F", 10.0F <= 10.0F) PrintResult("10.0F <= -11.0R", 10.0F <= -11.0R) PrintResult("10.0F <= ""12""", 10.0F <= "12") PrintResult("10.0F <= TypeCode.Double", 10.0F <= TypeCode.Double) PrintResult("-11.0R <= False", -11.0R <= False) PrintResult("-11.0R <= True", -11.0R <= True) PrintResult("-11.0R <= System.SByte.MinValue", -11.0R <= System.SByte.MinValue) PrintResult("-11.0R <= System.Byte.MaxValue", -11.0R <= System.Byte.MaxValue) PrintResult("-11.0R <= -3S", -11.0R <= -3S) PrintResult("-11.0R <= 24US", -11.0R <= 24US) PrintResult("-11.0R <= -5I", -11.0R <= -5I) PrintResult("-11.0R <= 26UI", -11.0R <= 26UI) PrintResult("-11.0R <= -7L", -11.0R <= -7L) PrintResult("-11.0R <= 28UL", -11.0R <= 28UL) PrintResult("-11.0R <= -9D", -11.0R <= -9D) PrintResult("-11.0R <= 10.0F", -11.0R <= 10.0F) PrintResult("-11.0R <= -11.0R", -11.0R <= -11.0R) PrintResult("-11.0R <= ""12""", -11.0R <= "12") PrintResult("-11.0R <= TypeCode.Double", -11.0R <= TypeCode.Double) PrintResult("""12"" <= False", "12" <= False) PrintResult("""12"" <= True", "12" <= True) PrintResult("""12"" <= System.SByte.MinValue", "12" <= System.SByte.MinValue) PrintResult("""12"" <= System.Byte.MaxValue", "12" <= System.Byte.MaxValue) PrintResult("""12"" <= -3S", "12" <= -3S) PrintResult("""12"" <= 24US", "12" <= 24US) PrintResult("""12"" <= -5I", "12" <= -5I) PrintResult("""12"" <= 26UI", "12" <= 26UI) PrintResult("""12"" <= -7L", "12" <= -7L) PrintResult("""12"" <= 28UL", "12" <= 28UL) PrintResult("""12"" <= -9D", "12" <= -9D) PrintResult("""12"" <= 10.0F", "12" <= 10.0F) PrintResult("""12"" <= -11.0R", "12" <= -11.0R) PrintResult("""12"" <= ""12""", "12" <= "12") PrintResult("""12"" <= TypeCode.Double", "12" <= TypeCode.Double) PrintResult("TypeCode.Double <= False", TypeCode.Double <= False) PrintResult("TypeCode.Double <= True", TypeCode.Double <= True) PrintResult("TypeCode.Double <= System.SByte.MinValue", TypeCode.Double <= System.SByte.MinValue) PrintResult("TypeCode.Double <= System.Byte.MaxValue", TypeCode.Double <= System.Byte.MaxValue) PrintResult("TypeCode.Double <= -3S", TypeCode.Double <= -3S) PrintResult("TypeCode.Double <= 24US", TypeCode.Double <= 24US) PrintResult("TypeCode.Double <= -5I", TypeCode.Double <= -5I) PrintResult("TypeCode.Double <= 26UI", TypeCode.Double <= 26UI) PrintResult("TypeCode.Double <= -7L", TypeCode.Double <= -7L) PrintResult("TypeCode.Double <= 28UL", TypeCode.Double <= 28UL) PrintResult("TypeCode.Double <= -9D", TypeCode.Double <= -9D) PrintResult("TypeCode.Double <= 10.0F", TypeCode.Double <= 10.0F) PrintResult("TypeCode.Double <= -11.0R", TypeCode.Double <= -11.0R) PrintResult("TypeCode.Double <= ""12""", TypeCode.Double <= "12") PrintResult("TypeCode.Double <= TypeCode.Double", TypeCode.Double <= TypeCode.Double) PrintResult("False >= False", False >= False) PrintResult("False >= True", False >= True) PrintResult("False >= System.SByte.MinValue", False >= System.SByte.MinValue) PrintResult("False >= System.Byte.MaxValue", False >= System.Byte.MaxValue) PrintResult("False >= -3S", False >= -3S) PrintResult("False >= 24US", False >= 24US) PrintResult("False >= -5I", False >= -5I) PrintResult("False >= 26UI", False >= 26UI) PrintResult("False >= -7L", False >= -7L) PrintResult("False >= 28UL", False >= 28UL) PrintResult("False >= -9D", False >= -9D) PrintResult("False >= 10.0F", False >= 10.0F) PrintResult("False >= -11.0R", False >= -11.0R) PrintResult("False >= ""12""", False >= "12") PrintResult("False >= TypeCode.Double", False >= TypeCode.Double) PrintResult("True >= False", True >= False) PrintResult("True >= True", True >= True) PrintResult("True >= System.SByte.MinValue", True >= System.SByte.MinValue) PrintResult("True >= System.Byte.MaxValue", True >= System.Byte.MaxValue) PrintResult("True >= -3S", True >= -3S) PrintResult("True >= 24US", True >= 24US) PrintResult("True >= -5I", True >= -5I) PrintResult("True >= 26UI", True >= 26UI) PrintResult("True >= -7L", True >= -7L) PrintResult("True >= 28UL", True >= 28UL) PrintResult("True >= -9D", True >= -9D) PrintResult("True >= 10.0F", True >= 10.0F) PrintResult("True >= -11.0R", True >= -11.0R) PrintResult("True >= ""12""", True >= "12") PrintResult("True >= TypeCode.Double", True >= TypeCode.Double) PrintResult("System.SByte.MinValue >= False", System.SByte.MinValue >= False) PrintResult("System.SByte.MinValue >= True", System.SByte.MinValue >= True) PrintResult("System.SByte.MinValue >= System.SByte.MinValue", System.SByte.MinValue >= System.SByte.MinValue) PrintResult("System.SByte.MinValue >= System.Byte.MaxValue", System.SByte.MinValue >= System.Byte.MaxValue) PrintResult("System.SByte.MinValue >= -3S", System.SByte.MinValue >= -3S) PrintResult("System.SByte.MinValue >= 24US", System.SByte.MinValue >= 24US) PrintResult("System.SByte.MinValue >= -5I", System.SByte.MinValue >= -5I) PrintResult("System.SByte.MinValue >= 26UI", System.SByte.MinValue >= 26UI) PrintResult("System.SByte.MinValue >= -7L", System.SByte.MinValue >= -7L) PrintResult("System.SByte.MinValue >= 28UL", System.SByte.MinValue >= 28UL) PrintResult("System.SByte.MinValue >= -9D", System.SByte.MinValue >= -9D) PrintResult("System.SByte.MinValue >= 10.0F", System.SByte.MinValue >= 10.0F) PrintResult("System.SByte.MinValue >= -11.0R", System.SByte.MinValue >= -11.0R) PrintResult("System.SByte.MinValue >= ""12""", System.SByte.MinValue >= "12") PrintResult("System.SByte.MinValue >= TypeCode.Double", System.SByte.MinValue >= TypeCode.Double) PrintResult("System.Byte.MaxValue >= False", System.Byte.MaxValue >= False) PrintResult("System.Byte.MaxValue >= True", System.Byte.MaxValue >= True) PrintResult("System.Byte.MaxValue >= System.SByte.MinValue", System.Byte.MaxValue >= System.SByte.MinValue) PrintResult("System.Byte.MaxValue >= System.Byte.MaxValue", System.Byte.MaxValue >= System.Byte.MaxValue) PrintResult("System.Byte.MaxValue >= -3S", System.Byte.MaxValue >= -3S) PrintResult("System.Byte.MaxValue >= 24US", System.Byte.MaxValue >= 24US) PrintResult("System.Byte.MaxValue >= -5I", System.Byte.MaxValue >= -5I) PrintResult("System.Byte.MaxValue >= 26UI", System.Byte.MaxValue >= 26UI) PrintResult("System.Byte.MaxValue >= -7L", System.Byte.MaxValue >= -7L) PrintResult("System.Byte.MaxValue >= 28UL", System.Byte.MaxValue >= 28UL) PrintResult("System.Byte.MaxValue >= -9D", System.Byte.MaxValue >= -9D) PrintResult("System.Byte.MaxValue >= 10.0F", System.Byte.MaxValue >= 10.0F) PrintResult("System.Byte.MaxValue >= -11.0R", System.Byte.MaxValue >= -11.0R) PrintResult("System.Byte.MaxValue >= ""12""", System.Byte.MaxValue >= "12") PrintResult("System.Byte.MaxValue >= TypeCode.Double", System.Byte.MaxValue >= TypeCode.Double) PrintResult("-3S >= False", -3S >= False) PrintResult("-3S >= True", -3S >= True) PrintResult("-3S >= System.SByte.MinValue", -3S >= System.SByte.MinValue) PrintResult("-3S >= System.Byte.MaxValue", -3S >= System.Byte.MaxValue) PrintResult("-3S >= -3S", -3S >= -3S) PrintResult("-3S >= 24US", -3S >= 24US) PrintResult("-3S >= -5I", -3S >= -5I) PrintResult("-3S >= 26UI", -3S >= 26UI) PrintResult("-3S >= -7L", -3S >= -7L) PrintResult("-3S >= 28UL", -3S >= 28UL) PrintResult("-3S >= -9D", -3S >= -9D) PrintResult("-3S >= 10.0F", -3S >= 10.0F) PrintResult("-3S >= -11.0R", -3S >= -11.0R) PrintResult("-3S >= ""12""", -3S >= "12") PrintResult("-3S >= TypeCode.Double", -3S >= TypeCode.Double) PrintResult("24US >= False", 24US >= False) PrintResult("24US >= True", 24US >= True) PrintResult("24US >= System.SByte.MinValue", 24US >= System.SByte.MinValue) PrintResult("24US >= System.Byte.MaxValue", 24US >= System.Byte.MaxValue) PrintResult("24US >= -3S", 24US >= -3S) PrintResult("24US >= 24US", 24US >= 24US) PrintResult("24US >= -5I", 24US >= -5I) PrintResult("24US >= 26UI", 24US >= 26UI) PrintResult("24US >= -7L", 24US >= -7L) PrintResult("24US >= 28UL", 24US >= 28UL) PrintResult("24US >= -9D", 24US >= -9D) PrintResult("24US >= 10.0F", 24US >= 10.0F) PrintResult("24US >= -11.0R", 24US >= -11.0R) PrintResult("24US >= ""12""", 24US >= "12") PrintResult("24US >= TypeCode.Double", 24US >= TypeCode.Double) PrintResult("-5I >= False", -5I >= False) PrintResult("-5I >= True", -5I >= True) PrintResult("-5I >= System.SByte.MinValue", -5I >= System.SByte.MinValue) PrintResult("-5I >= System.Byte.MaxValue", -5I >= System.Byte.MaxValue) PrintResult("-5I >= -3S", -5I >= -3S) PrintResult("-5I >= 24US", -5I >= 24US) PrintResult("-5I >= -5I", -5I >= -5I) PrintResult("-5I >= 26UI", -5I >= 26UI) PrintResult("-5I >= -7L", -5I >= -7L) PrintResult("-5I >= 28UL", -5I >= 28UL) PrintResult("-5I >= -9D", -5I >= -9D) PrintResult("-5I >= 10.0F", -5I >= 10.0F) PrintResult("-5I >= -11.0R", -5I >= -11.0R) PrintResult("-5I >= ""12""", -5I >= "12") PrintResult("-5I >= TypeCode.Double", -5I >= TypeCode.Double) PrintResult("26UI >= False", 26UI >= False) PrintResult("26UI >= True", 26UI >= True) PrintResult("26UI >= System.SByte.MinValue", 26UI >= System.SByte.MinValue) PrintResult("26UI >= System.Byte.MaxValue", 26UI >= System.Byte.MaxValue) PrintResult("26UI >= -3S", 26UI >= -3S) PrintResult("26UI >= 24US", 26UI >= 24US) PrintResult("26UI >= -5I", 26UI >= -5I) PrintResult("26UI >= 26UI", 26UI >= 26UI) PrintResult("26UI >= -7L", 26UI >= -7L) PrintResult("26UI >= 28UL", 26UI >= 28UL) PrintResult("26UI >= -9D", 26UI >= -9D) PrintResult("26UI >= 10.0F", 26UI >= 10.0F) PrintResult("26UI >= -11.0R", 26UI >= -11.0R) PrintResult("26UI >= ""12""", 26UI >= "12") PrintResult("26UI >= TypeCode.Double", 26UI >= TypeCode.Double) PrintResult("-7L >= False", -7L >= False) PrintResult("-7L >= True", -7L >= True) PrintResult("-7L >= System.SByte.MinValue", -7L >= System.SByte.MinValue) PrintResult("-7L >= System.Byte.MaxValue", -7L >= System.Byte.MaxValue) PrintResult("-7L >= -3S", -7L >= -3S) PrintResult("-7L >= 24US", -7L >= 24US) PrintResult("-7L >= -5I", -7L >= -5I) PrintResult("-7L >= 26UI", -7L >= 26UI) PrintResult("-7L >= -7L", -7L >= -7L) PrintResult("-7L >= 28UL", -7L >= 28UL) PrintResult("-7L >= -9D", -7L >= -9D) PrintResult("-7L >= 10.0F", -7L >= 10.0F) PrintResult("-7L >= -11.0R", -7L >= -11.0R) PrintResult("-7L >= ""12""", -7L >= "12") PrintResult("-7L >= TypeCode.Double", -7L >= TypeCode.Double) PrintResult("28UL >= False", 28UL >= False) PrintResult("28UL >= True", 28UL >= True) PrintResult("28UL >= System.SByte.MinValue", 28UL >= System.SByte.MinValue) PrintResult("28UL >= System.Byte.MaxValue", 28UL >= System.Byte.MaxValue) PrintResult("28UL >= -3S", 28UL >= -3S) PrintResult("28UL >= 24US", 28UL >= 24US) PrintResult("28UL >= -5I", 28UL >= -5I) PrintResult("28UL >= 26UI", 28UL >= 26UI) PrintResult("28UL >= -7L", 28UL >= -7L) PrintResult("28UL >= 28UL", 28UL >= 28UL) PrintResult("28UL >= -9D", 28UL >= -9D) PrintResult("28UL >= 10.0F", 28UL >= 10.0F) PrintResult("28UL >= -11.0R", 28UL >= -11.0R) PrintResult("28UL >= ""12""", 28UL >= "12") PrintResult("28UL >= TypeCode.Double", 28UL >= TypeCode.Double) PrintResult("-9D >= False", -9D >= False) PrintResult("-9D >= True", -9D >= True) PrintResult("-9D >= System.SByte.MinValue", -9D >= System.SByte.MinValue) PrintResult("-9D >= System.Byte.MaxValue", -9D >= System.Byte.MaxValue) PrintResult("-9D >= -3S", -9D >= -3S) PrintResult("-9D >= 24US", -9D >= 24US) PrintResult("-9D >= -5I", -9D >= -5I) PrintResult("-9D >= 26UI", -9D >= 26UI) PrintResult("-9D >= -7L", -9D >= -7L) PrintResult("-9D >= 28UL", -9D >= 28UL) PrintResult("-9D >= -9D", -9D >= -9D) PrintResult("-9D >= 10.0F", -9D >= 10.0F) PrintResult("-9D >= -11.0R", -9D >= -11.0R) PrintResult("-9D >= ""12""", -9D >= "12") PrintResult("-9D >= TypeCode.Double", -9D >= TypeCode.Double) PrintResult("10.0F >= False", 10.0F >= False) PrintResult("10.0F >= True", 10.0F >= True) PrintResult("10.0F >= System.SByte.MinValue", 10.0F >= System.SByte.MinValue) PrintResult("10.0F >= System.Byte.MaxValue", 10.0F >= System.Byte.MaxValue) PrintResult("10.0F >= -3S", 10.0F >= -3S) PrintResult("10.0F >= 24US", 10.0F >= 24US) PrintResult("10.0F >= -5I", 10.0F >= -5I) PrintResult("10.0F >= 26UI", 10.0F >= 26UI) PrintResult("10.0F >= -7L", 10.0F >= -7L) PrintResult("10.0F >= 28UL", 10.0F >= 28UL) PrintResult("10.0F >= -9D", 10.0F >= -9D) PrintResult("10.0F >= 10.0F", 10.0F >= 10.0F) PrintResult("10.0F >= -11.0R", 10.0F >= -11.0R) PrintResult("10.0F >= ""12""", 10.0F >= "12") PrintResult("10.0F >= TypeCode.Double", 10.0F >= TypeCode.Double) PrintResult("-11.0R >= False", -11.0R >= False) PrintResult("-11.0R >= True", -11.0R >= True) PrintResult("-11.0R >= System.SByte.MinValue", -11.0R >= System.SByte.MinValue) PrintResult("-11.0R >= System.Byte.MaxValue", -11.0R >= System.Byte.MaxValue) PrintResult("-11.0R >= -3S", -11.0R >= -3S) PrintResult("-11.0R >= 24US", -11.0R >= 24US) PrintResult("-11.0R >= -5I", -11.0R >= -5I) PrintResult("-11.0R >= 26UI", -11.0R >= 26UI) PrintResult("-11.0R >= -7L", -11.0R >= -7L) PrintResult("-11.0R >= 28UL", -11.0R >= 28UL) PrintResult("-11.0R >= -9D", -11.0R >= -9D) PrintResult("-11.0R >= 10.0F", -11.0R >= 10.0F) PrintResult("-11.0R >= -11.0R", -11.0R >= -11.0R) PrintResult("-11.0R >= ""12""", -11.0R >= "12") PrintResult("-11.0R >= TypeCode.Double", -11.0R >= TypeCode.Double) PrintResult("""12"" >= False", "12" >= False) PrintResult("""12"" >= True", "12" >= True) PrintResult("""12"" >= System.SByte.MinValue", "12" >= System.SByte.MinValue) PrintResult("""12"" >= System.Byte.MaxValue", "12" >= System.Byte.MaxValue) PrintResult("""12"" >= -3S", "12" >= -3S) PrintResult("""12"" >= 24US", "12" >= 24US) PrintResult("""12"" >= -5I", "12" >= -5I) PrintResult("""12"" >= 26UI", "12" >= 26UI) PrintResult("""12"" >= -7L", "12" >= -7L) PrintResult("""12"" >= 28UL", "12" >= 28UL) PrintResult("""12"" >= -9D", "12" >= -9D) PrintResult("""12"" >= 10.0F", "12" >= 10.0F) PrintResult("""12"" >= -11.0R", "12" >= -11.0R) PrintResult("""12"" >= ""12""", "12" >= "12") PrintResult("""12"" >= TypeCode.Double", "12" >= TypeCode.Double) PrintResult("TypeCode.Double >= False", TypeCode.Double >= False) PrintResult("TypeCode.Double >= True", TypeCode.Double >= True) PrintResult("TypeCode.Double >= System.SByte.MinValue", TypeCode.Double >= System.SByte.MinValue) PrintResult("TypeCode.Double >= System.Byte.MaxValue", TypeCode.Double >= System.Byte.MaxValue) PrintResult("TypeCode.Double >= -3S", TypeCode.Double >= -3S) PrintResult("TypeCode.Double >= 24US", TypeCode.Double >= 24US) PrintResult("TypeCode.Double >= -5I", TypeCode.Double >= -5I) PrintResult("TypeCode.Double >= 26UI", TypeCode.Double >= 26UI) PrintResult("TypeCode.Double >= -7L", TypeCode.Double >= -7L) PrintResult("TypeCode.Double >= 28UL", TypeCode.Double >= 28UL) PrintResult("TypeCode.Double >= -9D", TypeCode.Double >= -9D) PrintResult("TypeCode.Double >= 10.0F", TypeCode.Double >= 10.0F) PrintResult("TypeCode.Double >= -11.0R", TypeCode.Double >= -11.0R) PrintResult("TypeCode.Double >= ""12""", TypeCode.Double >= "12") PrintResult("TypeCode.Double >= TypeCode.Double", TypeCode.Double >= TypeCode.Double) PrintResult("False < False", False < False) PrintResult("False < True", False < True) PrintResult("False < System.SByte.MinValue", False < System.SByte.MinValue) PrintResult("False < System.Byte.MaxValue", False < System.Byte.MaxValue) PrintResult("False < -3S", False < -3S) PrintResult("False < 24US", False < 24US) PrintResult("False < -5I", False < -5I) PrintResult("False < 26UI", False < 26UI) PrintResult("False < -7L", False < -7L) PrintResult("False < 28UL", False < 28UL) PrintResult("False < -9D", False < -9D) PrintResult("False < 10.0F", False < 10.0F) PrintResult("False < -11.0R", False < -11.0R) PrintResult("False < ""12""", False < "12") PrintResult("False < TypeCode.Double", False < TypeCode.Double) PrintResult("True < False", True < False) PrintResult("True < True", True < True) PrintResult("True < System.SByte.MinValue", True < System.SByte.MinValue) PrintResult("True < System.Byte.MaxValue", True < System.Byte.MaxValue) PrintResult("True < -3S", True < -3S) PrintResult("True < 24US", True < 24US) PrintResult("True < -5I", True < -5I) PrintResult("True < 26UI", True < 26UI) PrintResult("True < -7L", True < -7L) PrintResult("True < 28UL", True < 28UL) PrintResult("True < -9D", True < -9D) PrintResult("True < 10.0F", True < 10.0F) PrintResult("True < -11.0R", True < -11.0R) PrintResult("True < ""12""", True < "12") PrintResult("True < TypeCode.Double", True < TypeCode.Double) PrintResult("System.SByte.MinValue < False", System.SByte.MinValue < False) PrintResult("System.SByte.MinValue < True", System.SByte.MinValue < True) PrintResult("System.SByte.MinValue < System.SByte.MinValue", System.SByte.MinValue < System.SByte.MinValue) PrintResult("System.SByte.MinValue < System.Byte.MaxValue", System.SByte.MinValue < System.Byte.MaxValue) PrintResult("System.SByte.MinValue < -3S", System.SByte.MinValue < -3S) PrintResult("System.SByte.MinValue < 24US", System.SByte.MinValue < 24US) PrintResult("System.SByte.MinValue < -5I", System.SByte.MinValue < -5I) PrintResult("System.SByte.MinValue < 26UI", System.SByte.MinValue < 26UI) PrintResult("System.SByte.MinValue < -7L", System.SByte.MinValue < -7L) PrintResult("System.SByte.MinValue < 28UL", System.SByte.MinValue < 28UL) PrintResult("System.SByte.MinValue < -9D", System.SByte.MinValue < -9D) PrintResult("System.SByte.MinValue < 10.0F", System.SByte.MinValue < 10.0F) PrintResult("System.SByte.MinValue < -11.0R", System.SByte.MinValue < -11.0R) PrintResult("System.SByte.MinValue < ""12""", System.SByte.MinValue < "12") PrintResult("System.SByte.MinValue < TypeCode.Double", System.SByte.MinValue < TypeCode.Double) PrintResult("System.Byte.MaxValue < False", System.Byte.MaxValue < False) PrintResult("System.Byte.MaxValue < True", System.Byte.MaxValue < True) PrintResult("System.Byte.MaxValue < System.SByte.MinValue", System.Byte.MaxValue < System.SByte.MinValue) PrintResult("System.Byte.MaxValue < System.Byte.MaxValue", System.Byte.MaxValue < System.Byte.MaxValue) PrintResult("System.Byte.MaxValue < -3S", System.Byte.MaxValue < -3S) PrintResult("System.Byte.MaxValue < 24US", System.Byte.MaxValue < 24US) PrintResult("System.Byte.MaxValue < -5I", System.Byte.MaxValue < -5I) PrintResult("System.Byte.MaxValue < 26UI", System.Byte.MaxValue < 26UI) PrintResult("System.Byte.MaxValue < -7L", System.Byte.MaxValue < -7L) PrintResult("System.Byte.MaxValue < 28UL", System.Byte.MaxValue < 28UL) PrintResult("System.Byte.MaxValue < -9D", System.Byte.MaxValue < -9D) PrintResult("System.Byte.MaxValue < 10.0F", System.Byte.MaxValue < 10.0F) PrintResult("System.Byte.MaxValue < -11.0R", System.Byte.MaxValue < -11.0R) PrintResult("System.Byte.MaxValue < ""12""", System.Byte.MaxValue < "12") PrintResult("System.Byte.MaxValue < TypeCode.Double", System.Byte.MaxValue < TypeCode.Double) PrintResult("-3S < False", -3S < False) PrintResult("-3S < True", -3S < True) PrintResult("-3S < System.SByte.MinValue", -3S < System.SByte.MinValue) PrintResult("-3S < System.Byte.MaxValue", -3S < System.Byte.MaxValue) PrintResult("-3S < -3S", -3S < -3S) PrintResult("-3S < 24US", -3S < 24US) PrintResult("-3S < -5I", -3S < -5I) PrintResult("-3S < 26UI", -3S < 26UI) PrintResult("-3S < -7L", -3S < -7L) PrintResult("-3S < 28UL", -3S < 28UL) PrintResult("-3S < -9D", -3S < -9D) PrintResult("-3S < 10.0F", -3S < 10.0F) PrintResult("-3S < -11.0R", -3S < -11.0R) PrintResult("-3S < ""12""", -3S < "12") PrintResult("-3S < TypeCode.Double", -3S < TypeCode.Double) PrintResult("24US < False", 24US < False) PrintResult("24US < True", 24US < True) PrintResult("24US < System.SByte.MinValue", 24US < System.SByte.MinValue) PrintResult("24US < System.Byte.MaxValue", 24US < System.Byte.MaxValue) PrintResult("24US < -3S", 24US < -3S) PrintResult("24US < 24US", 24US < 24US) PrintResult("24US < -5I", 24US < -5I) PrintResult("24US < 26UI", 24US < 26UI) PrintResult("24US < -7L", 24US < -7L) PrintResult("24US < 28UL", 24US < 28UL) PrintResult("24US < -9D", 24US < -9D) PrintResult("24US < 10.0F", 24US < 10.0F) PrintResult("24US < -11.0R", 24US < -11.0R) PrintResult("24US < ""12""", 24US < "12") PrintResult("24US < TypeCode.Double", 24US < TypeCode.Double) PrintResult("-5I < False", -5I < False) PrintResult("-5I < True", -5I < True) PrintResult("-5I < System.SByte.MinValue", -5I < System.SByte.MinValue) PrintResult("-5I < System.Byte.MaxValue", -5I < System.Byte.MaxValue) PrintResult("-5I < -3S", -5I < -3S) PrintResult("-5I < 24US", -5I < 24US) PrintResult("-5I < -5I", -5I < -5I) PrintResult("-5I < 26UI", -5I < 26UI) PrintResult("-5I < -7L", -5I < -7L) PrintResult("-5I < 28UL", -5I < 28UL) PrintResult("-5I < -9D", -5I < -9D) PrintResult("-5I < 10.0F", -5I < 10.0F) PrintResult("-5I < -11.0R", -5I < -11.0R) PrintResult("-5I < ""12""", -5I < "12") PrintResult("-5I < TypeCode.Double", -5I < TypeCode.Double) PrintResult("26UI < False", 26UI < False) PrintResult("26UI < True", 26UI < True) PrintResult("26UI < System.SByte.MinValue", 26UI < System.SByte.MinValue) PrintResult("26UI < System.Byte.MaxValue", 26UI < System.Byte.MaxValue) PrintResult("26UI < -3S", 26UI < -3S) PrintResult("26UI < 24US", 26UI < 24US) PrintResult("26UI < -5I", 26UI < -5I) PrintResult("26UI < 26UI", 26UI < 26UI) PrintResult("26UI < -7L", 26UI < -7L) PrintResult("26UI < 28UL", 26UI < 28UL) PrintResult("26UI < -9D", 26UI < -9D) PrintResult("26UI < 10.0F", 26UI < 10.0F) PrintResult("26UI < -11.0R", 26UI < -11.0R) PrintResult("26UI < ""12""", 26UI < "12") PrintResult("26UI < TypeCode.Double", 26UI < TypeCode.Double) PrintResult("-7L < False", -7L < False) PrintResult("-7L < True", -7L < True) PrintResult("-7L < System.SByte.MinValue", -7L < System.SByte.MinValue) PrintResult("-7L < System.Byte.MaxValue", -7L < System.Byte.MaxValue) PrintResult("-7L < -3S", -7L < -3S) PrintResult("-7L < 24US", -7L < 24US) PrintResult("-7L < -5I", -7L < -5I) PrintResult("-7L < 26UI", -7L < 26UI) PrintResult("-7L < -7L", -7L < -7L) PrintResult("-7L < 28UL", -7L < 28UL) PrintResult("-7L < -9D", -7L < -9D) PrintResult("-7L < 10.0F", -7L < 10.0F) PrintResult("-7L < -11.0R", -7L < -11.0R) PrintResult("-7L < ""12""", -7L < "12") PrintResult("-7L < TypeCode.Double", -7L < TypeCode.Double) PrintResult("28UL < False", 28UL < False) PrintResult("28UL < True", 28UL < True) PrintResult("28UL < System.SByte.MinValue", 28UL < System.SByte.MinValue) PrintResult("28UL < System.Byte.MaxValue", 28UL < System.Byte.MaxValue) PrintResult("28UL < -3S", 28UL < -3S) PrintResult("28UL < 24US", 28UL < 24US) PrintResult("28UL < -5I", 28UL < -5I) PrintResult("28UL < 26UI", 28UL < 26UI) PrintResult("28UL < -7L", 28UL < -7L) PrintResult("28UL < 28UL", 28UL < 28UL) PrintResult("28UL < -9D", 28UL < -9D) PrintResult("28UL < 10.0F", 28UL < 10.0F) PrintResult("28UL < -11.0R", 28UL < -11.0R) PrintResult("28UL < ""12""", 28UL < "12") PrintResult("28UL < TypeCode.Double", 28UL < TypeCode.Double) PrintResult("-9D < False", -9D < False) PrintResult("-9D < True", -9D < True) PrintResult("-9D < System.SByte.MinValue", -9D < System.SByte.MinValue) PrintResult("-9D < System.Byte.MaxValue", -9D < System.Byte.MaxValue) PrintResult("-9D < -3S", -9D < -3S) PrintResult("-9D < 24US", -9D < 24US) PrintResult("-9D < -5I", -9D < -5I) PrintResult("-9D < 26UI", -9D < 26UI) PrintResult("-9D < -7L", -9D < -7L) PrintResult("-9D < 28UL", -9D < 28UL) PrintResult("-9D < -9D", -9D < -9D) PrintResult("-9D < 10.0F", -9D < 10.0F) PrintResult("-9D < -11.0R", -9D < -11.0R) PrintResult("-9D < ""12""", -9D < "12") PrintResult("-9D < TypeCode.Double", -9D < TypeCode.Double) PrintResult("10.0F < False", 10.0F < False) PrintResult("10.0F < True", 10.0F < True) PrintResult("10.0F < System.SByte.MinValue", 10.0F < System.SByte.MinValue) PrintResult("10.0F < System.Byte.MaxValue", 10.0F < System.Byte.MaxValue) PrintResult("10.0F < -3S", 10.0F < -3S) PrintResult("10.0F < 24US", 10.0F < 24US) PrintResult("10.0F < -5I", 10.0F < -5I) PrintResult("10.0F < 26UI", 10.0F < 26UI) PrintResult("10.0F < -7L", 10.0F < -7L) PrintResult("10.0F < 28UL", 10.0F < 28UL) PrintResult("10.0F < -9D", 10.0F < -9D) PrintResult("10.0F < 10.0F", 10.0F < 10.0F) PrintResult("10.0F < -11.0R", 10.0F < -11.0R) PrintResult("10.0F < ""12""", 10.0F < "12") PrintResult("10.0F < TypeCode.Double", 10.0F < TypeCode.Double) PrintResult("-11.0R < False", -11.0R < False) PrintResult("-11.0R < True", -11.0R < True) PrintResult("-11.0R < System.SByte.MinValue", -11.0R < System.SByte.MinValue) PrintResult("-11.0R < System.Byte.MaxValue", -11.0R < System.Byte.MaxValue) PrintResult("-11.0R < -3S", -11.0R < -3S) PrintResult("-11.0R < 24US", -11.0R < 24US) PrintResult("-11.0R < -5I", -11.0R < -5I) PrintResult("-11.0R < 26UI", -11.0R < 26UI) PrintResult("-11.0R < -7L", -11.0R < -7L) PrintResult("-11.0R < 28UL", -11.0R < 28UL) PrintResult("-11.0R < -9D", -11.0R < -9D) PrintResult("-11.0R < 10.0F", -11.0R < 10.0F) PrintResult("-11.0R < -11.0R", -11.0R < -11.0R) PrintResult("-11.0R < ""12""", -11.0R < "12") PrintResult("-11.0R < TypeCode.Double", -11.0R < TypeCode.Double) PrintResult("""12"" < False", "12" < False) PrintResult("""12"" < True", "12" < True) PrintResult("""12"" < System.SByte.MinValue", "12" < System.SByte.MinValue) PrintResult("""12"" < System.Byte.MaxValue", "12" < System.Byte.MaxValue) PrintResult("""12"" < -3S", "12" < -3S) PrintResult("""12"" < 24US", "12" < 24US) PrintResult("""12"" < -5I", "12" < -5I) PrintResult("""12"" < 26UI", "12" < 26UI) PrintResult("""12"" < -7L", "12" < -7L) PrintResult("""12"" < 28UL", "12" < 28UL) PrintResult("""12"" < -9D", "12" < -9D) PrintResult("""12"" < 10.0F", "12" < 10.0F) PrintResult("""12"" < -11.0R", "12" < -11.0R) PrintResult("""12"" < ""12""", "12" < "12") PrintResult("""12"" < TypeCode.Double", "12" < TypeCode.Double) PrintResult("TypeCode.Double < False", TypeCode.Double < False) PrintResult("TypeCode.Double < True", TypeCode.Double < True) PrintResult("TypeCode.Double < System.SByte.MinValue", TypeCode.Double < System.SByte.MinValue) PrintResult("TypeCode.Double < System.Byte.MaxValue", TypeCode.Double < System.Byte.MaxValue) PrintResult("TypeCode.Double < -3S", TypeCode.Double < -3S) PrintResult("TypeCode.Double < 24US", TypeCode.Double < 24US) PrintResult("TypeCode.Double < -5I", TypeCode.Double < -5I) PrintResult("TypeCode.Double < 26UI", TypeCode.Double < 26UI) PrintResult("TypeCode.Double < -7L", TypeCode.Double < -7L) PrintResult("TypeCode.Double < 28UL", TypeCode.Double < 28UL) PrintResult("TypeCode.Double < -9D", TypeCode.Double < -9D) PrintResult("TypeCode.Double < 10.0F", TypeCode.Double < 10.0F) PrintResult("TypeCode.Double < -11.0R", TypeCode.Double < -11.0R) PrintResult("TypeCode.Double < ""12""", TypeCode.Double < "12") PrintResult("TypeCode.Double < TypeCode.Double", TypeCode.Double < TypeCode.Double) PrintResult("False > False", False > False) PrintResult("False > True", False > True) PrintResult("False > System.SByte.MinValue", False > System.SByte.MinValue) PrintResult("False > System.Byte.MaxValue", False > System.Byte.MaxValue) PrintResult("False > -3S", False > -3S) PrintResult("False > 24US", False > 24US) PrintResult("False > -5I", False > -5I) PrintResult("False > 26UI", False > 26UI) PrintResult("False > -7L", False > -7L) PrintResult("False > 28UL", False > 28UL) PrintResult("False > -9D", False > -9D) PrintResult("False > 10.0F", False > 10.0F) PrintResult("False > -11.0R", False > -11.0R) PrintResult("False > ""12""", False > "12") PrintResult("False > TypeCode.Double", False > TypeCode.Double) PrintResult("True > False", True > False) PrintResult("True > True", True > True) PrintResult("True > System.SByte.MinValue", True > System.SByte.MinValue) PrintResult("True > System.Byte.MaxValue", True > System.Byte.MaxValue) PrintResult("True > -3S", True > -3S) PrintResult("True > 24US", True > 24US) PrintResult("True > -5I", True > -5I) PrintResult("True > 26UI", True > 26UI) PrintResult("True > -7L", True > -7L) PrintResult("True > 28UL", True > 28UL) PrintResult("True > -9D", True > -9D) PrintResult("True > 10.0F", True > 10.0F) PrintResult("True > -11.0R", True > -11.0R) PrintResult("True > ""12""", True > "12") PrintResult("True > TypeCode.Double", True > TypeCode.Double) PrintResult("System.SByte.MinValue > False", System.SByte.MinValue > False) PrintResult("System.SByte.MinValue > True", System.SByte.MinValue > True) PrintResult("System.SByte.MinValue > System.SByte.MinValue", System.SByte.MinValue > System.SByte.MinValue) PrintResult("System.SByte.MinValue > System.Byte.MaxValue", System.SByte.MinValue > System.Byte.MaxValue) PrintResult("System.SByte.MinValue > -3S", System.SByte.MinValue > -3S) PrintResult("System.SByte.MinValue > 24US", System.SByte.MinValue > 24US) PrintResult("System.SByte.MinValue > -5I", System.SByte.MinValue > -5I) PrintResult("System.SByte.MinValue > 26UI", System.SByte.MinValue > 26UI) PrintResult("System.SByte.MinValue > -7L", System.SByte.MinValue > -7L) PrintResult("System.SByte.MinValue > 28UL", System.SByte.MinValue > 28UL) PrintResult("System.SByte.MinValue > -9D", System.SByte.MinValue > -9D) PrintResult("System.SByte.MinValue > 10.0F", System.SByte.MinValue > 10.0F) PrintResult("System.SByte.MinValue > -11.0R", System.SByte.MinValue > -11.0R) PrintResult("System.SByte.MinValue > ""12""", System.SByte.MinValue > "12") PrintResult("System.SByte.MinValue > TypeCode.Double", System.SByte.MinValue > TypeCode.Double) PrintResult("System.Byte.MaxValue > False", System.Byte.MaxValue > False) PrintResult("System.Byte.MaxValue > True", System.Byte.MaxValue > True) PrintResult("System.Byte.MaxValue > System.SByte.MinValue", System.Byte.MaxValue > System.SByte.MinValue) PrintResult("System.Byte.MaxValue > System.Byte.MaxValue", System.Byte.MaxValue > System.Byte.MaxValue) PrintResult("System.Byte.MaxValue > -3S", System.Byte.MaxValue > -3S) PrintResult("System.Byte.MaxValue > 24US", System.Byte.MaxValue > 24US) PrintResult("System.Byte.MaxValue > -5I", System.Byte.MaxValue > -5I) PrintResult("System.Byte.MaxValue > 26UI", System.Byte.MaxValue > 26UI) PrintResult("System.Byte.MaxValue > -7L", System.Byte.MaxValue > -7L) PrintResult("System.Byte.MaxValue > 28UL", System.Byte.MaxValue > 28UL) PrintResult("System.Byte.MaxValue > -9D", System.Byte.MaxValue > -9D) PrintResult("System.Byte.MaxValue > 10.0F", System.Byte.MaxValue > 10.0F) PrintResult("System.Byte.MaxValue > -11.0R", System.Byte.MaxValue > -11.0R) PrintResult("System.Byte.MaxValue > ""12""", System.Byte.MaxValue > "12") PrintResult("System.Byte.MaxValue > TypeCode.Double", System.Byte.MaxValue > TypeCode.Double) PrintResult("-3S > False", -3S > False) PrintResult("-3S > True", -3S > True) PrintResult("-3S > System.SByte.MinValue", -3S > System.SByte.MinValue) PrintResult("-3S > System.Byte.MaxValue", -3S > System.Byte.MaxValue) PrintResult("-3S > -3S", -3S > -3S) PrintResult("-3S > 24US", -3S > 24US) PrintResult("-3S > -5I", -3S > -5I) PrintResult("-3S > 26UI", -3S > 26UI) PrintResult("-3S > -7L", -3S > -7L) PrintResult("-3S > 28UL", -3S > 28UL) PrintResult("-3S > -9D", -3S > -9D) PrintResult("-3S > 10.0F", -3S > 10.0F) PrintResult("-3S > -11.0R", -3S > -11.0R) PrintResult("-3S > ""12""", -3S > "12") PrintResult("-3S > TypeCode.Double", -3S > TypeCode.Double) PrintResult("24US > False", 24US > False) PrintResult("24US > True", 24US > True) PrintResult("24US > System.SByte.MinValue", 24US > System.SByte.MinValue) PrintResult("24US > System.Byte.MaxValue", 24US > System.Byte.MaxValue) PrintResult("24US > -3S", 24US > -3S) PrintResult("24US > 24US", 24US > 24US) PrintResult("24US > -5I", 24US > -5I) PrintResult("24US > 26UI", 24US > 26UI) PrintResult("24US > -7L", 24US > -7L) PrintResult("24US > 28UL", 24US > 28UL) PrintResult("24US > -9D", 24US > -9D) PrintResult("24US > 10.0F", 24US > 10.0F) PrintResult("24US > -11.0R", 24US > -11.0R) PrintResult("24US > ""12""", 24US > "12") PrintResult("24US > TypeCode.Double", 24US > TypeCode.Double) PrintResult("-5I > False", -5I > False) PrintResult("-5I > True", -5I > True) PrintResult("-5I > System.SByte.MinValue", -5I > System.SByte.MinValue) PrintResult("-5I > System.Byte.MaxValue", -5I > System.Byte.MaxValue) PrintResult("-5I > -3S", -5I > -3S) PrintResult("-5I > 24US", -5I > 24US) PrintResult("-5I > -5I", -5I > -5I) PrintResult("-5I > 26UI", -5I > 26UI) PrintResult("-5I > -7L", -5I > -7L) PrintResult("-5I > 28UL", -5I > 28UL) PrintResult("-5I > -9D", -5I > -9D) PrintResult("-5I > 10.0F", -5I > 10.0F) PrintResult("-5I > -11.0R", -5I > -11.0R) PrintResult("-5I > ""12""", -5I > "12") PrintResult("-5I > TypeCode.Double", -5I > TypeCode.Double) PrintResult("26UI > False", 26UI > False) PrintResult("26UI > True", 26UI > True) PrintResult("26UI > System.SByte.MinValue", 26UI > System.SByte.MinValue) PrintResult("26UI > System.Byte.MaxValue", 26UI > System.Byte.MaxValue) PrintResult("26UI > -3S", 26UI > -3S) PrintResult("26UI > 24US", 26UI > 24US) PrintResult("26UI > -5I", 26UI > -5I) PrintResult("26UI > 26UI", 26UI > 26UI) PrintResult("26UI > -7L", 26UI > -7L) PrintResult("26UI > 28UL", 26UI > 28UL) PrintResult("26UI > -9D", 26UI > -9D) PrintResult("26UI > 10.0F", 26UI > 10.0F) PrintResult("26UI > -11.0R", 26UI > -11.0R) PrintResult("26UI > ""12""", 26UI > "12") PrintResult("26UI > TypeCode.Double", 26UI > TypeCode.Double) PrintResult("-7L > False", -7L > False) PrintResult("-7L > True", -7L > True) PrintResult("-7L > System.SByte.MinValue", -7L > System.SByte.MinValue) PrintResult("-7L > System.Byte.MaxValue", -7L > System.Byte.MaxValue) PrintResult("-7L > -3S", -7L > -3S) PrintResult("-7L > 24US", -7L > 24US) PrintResult("-7L > -5I", -7L > -5I) PrintResult("-7L > 26UI", -7L > 26UI) PrintResult("-7L > -7L", -7L > -7L) PrintResult("-7L > 28UL", -7L > 28UL) PrintResult("-7L > -9D", -7L > -9D) PrintResult("-7L > 10.0F", -7L > 10.0F) PrintResult("-7L > -11.0R", -7L > -11.0R) PrintResult("-7L > ""12""", -7L > "12") PrintResult("-7L > TypeCode.Double", -7L > TypeCode.Double) PrintResult("28UL > False", 28UL > False) PrintResult("28UL > True", 28UL > True) PrintResult("28UL > System.SByte.MinValue", 28UL > System.SByte.MinValue) PrintResult("28UL > System.Byte.MaxValue", 28UL > System.Byte.MaxValue) PrintResult("28UL > -3S", 28UL > -3S) PrintResult("28UL > 24US", 28UL > 24US) PrintResult("28UL > -5I", 28UL > -5I) PrintResult("28UL > 26UI", 28UL > 26UI) PrintResult("28UL > -7L", 28UL > -7L) PrintResult("28UL > 28UL", 28UL > 28UL) PrintResult("28UL > -9D", 28UL > -9D) PrintResult("28UL > 10.0F", 28UL > 10.0F) PrintResult("28UL > -11.0R", 28UL > -11.0R) PrintResult("28UL > ""12""", 28UL > "12") PrintResult("28UL > TypeCode.Double", 28UL > TypeCode.Double) PrintResult("-9D > False", -9D > False) PrintResult("-9D > True", -9D > True) PrintResult("-9D > System.SByte.MinValue", -9D > System.SByte.MinValue) PrintResult("-9D > System.Byte.MaxValue", -9D > System.Byte.MaxValue) PrintResult("-9D > -3S", -9D > -3S) PrintResult("-9D > 24US", -9D > 24US) PrintResult("-9D > -5I", -9D > -5I) PrintResult("-9D > 26UI", -9D > 26UI) PrintResult("-9D > -7L", -9D > -7L) PrintResult("-9D > 28UL", -9D > 28UL) PrintResult("-9D > -9D", -9D > -9D) PrintResult("-9D > 10.0F", -9D > 10.0F) PrintResult("-9D > -11.0R", -9D > -11.0R) PrintResult("-9D > ""12""", -9D > "12") PrintResult("-9D > TypeCode.Double", -9D > TypeCode.Double) PrintResult("10.0F > False", 10.0F > False) PrintResult("10.0F > True", 10.0F > True) PrintResult("10.0F > System.SByte.MinValue", 10.0F > System.SByte.MinValue) PrintResult("10.0F > System.Byte.MaxValue", 10.0F > System.Byte.MaxValue) PrintResult("10.0F > -3S", 10.0F > -3S) PrintResult("10.0F > 24US", 10.0F > 24US) PrintResult("10.0F > -5I", 10.0F > -5I) PrintResult("10.0F > 26UI", 10.0F > 26UI) PrintResult("10.0F > -7L", 10.0F > -7L) PrintResult("10.0F > 28UL", 10.0F > 28UL) PrintResult("10.0F > -9D", 10.0F > -9D) PrintResult("10.0F > 10.0F", 10.0F > 10.0F) PrintResult("10.0F > -11.0R", 10.0F > -11.0R) PrintResult("10.0F > ""12""", 10.0F > "12") PrintResult("10.0F > TypeCode.Double", 10.0F > TypeCode.Double) PrintResult("-11.0R > False", -11.0R > False) PrintResult("-11.0R > True", -11.0R > True) PrintResult("-11.0R > System.SByte.MinValue", -11.0R > System.SByte.MinValue) PrintResult("-11.0R > System.Byte.MaxValue", -11.0R > System.Byte.MaxValue) PrintResult("-11.0R > -3S", -11.0R > -3S) PrintResult("-11.0R > 24US", -11.0R > 24US) PrintResult("-11.0R > -5I", -11.0R > -5I) PrintResult("-11.0R > 26UI", -11.0R > 26UI) PrintResult("-11.0R > -7L", -11.0R > -7L) PrintResult("-11.0R > 28UL", -11.0R > 28UL) PrintResult("-11.0R > -9D", -11.0R > -9D) PrintResult("-11.0R > 10.0F", -11.0R > 10.0F) PrintResult("-11.0R > -11.0R", -11.0R > -11.0R) PrintResult("-11.0R > ""12""", -11.0R > "12") PrintResult("-11.0R > TypeCode.Double", -11.0R > TypeCode.Double) PrintResult("""12"" > False", "12" > False) PrintResult("""12"" > True", "12" > True) PrintResult("""12"" > System.SByte.MinValue", "12" > System.SByte.MinValue) PrintResult("""12"" > System.Byte.MaxValue", "12" > System.Byte.MaxValue) PrintResult("""12"" > -3S", "12" > -3S) PrintResult("""12"" > 24US", "12" > 24US) PrintResult("""12"" > -5I", "12" > -5I) PrintResult("""12"" > 26UI", "12" > 26UI) PrintResult("""12"" > -7L", "12" > -7L) PrintResult("""12"" > 28UL", "12" > 28UL) PrintResult("""12"" > -9D", "12" > -9D) PrintResult("""12"" > 10.0F", "12" > 10.0F) PrintResult("""12"" > -11.0R", "12" > -11.0R) PrintResult("""12"" > ""12""", "12" > "12") PrintResult("""12"" > TypeCode.Double", "12" > TypeCode.Double) PrintResult("TypeCode.Double > False", TypeCode.Double > False) PrintResult("TypeCode.Double > True", TypeCode.Double > True) PrintResult("TypeCode.Double > System.SByte.MinValue", TypeCode.Double > System.SByte.MinValue) PrintResult("TypeCode.Double > System.Byte.MaxValue", TypeCode.Double > System.Byte.MaxValue) PrintResult("TypeCode.Double > -3S", TypeCode.Double > -3S) PrintResult("TypeCode.Double > 24US", TypeCode.Double > 24US) PrintResult("TypeCode.Double > -5I", TypeCode.Double > -5I) PrintResult("TypeCode.Double > 26UI", TypeCode.Double > 26UI) PrintResult("TypeCode.Double > -7L", TypeCode.Double > -7L) PrintResult("TypeCode.Double > 28UL", TypeCode.Double > 28UL) PrintResult("TypeCode.Double > -9D", TypeCode.Double > -9D) PrintResult("TypeCode.Double > 10.0F", TypeCode.Double > 10.0F) PrintResult("TypeCode.Double > -11.0R", TypeCode.Double > -11.0R) PrintResult("TypeCode.Double > ""12""", TypeCode.Double > "12") PrintResult("TypeCode.Double > TypeCode.Double", TypeCode.Double > TypeCode.Double) PrintResult("False Xor False", False Xor False) PrintResult("False Xor True", False Xor True) PrintResult("False Xor System.SByte.MinValue", False Xor System.SByte.MinValue) PrintResult("False Xor System.Byte.MaxValue", False Xor System.Byte.MaxValue) PrintResult("False Xor -3S", False Xor -3S) PrintResult("False Xor 24US", False Xor 24US) PrintResult("False Xor -5I", False Xor -5I) PrintResult("False Xor 26UI", False Xor 26UI) PrintResult("False Xor -7L", False Xor -7L) PrintResult("False Xor 28UL", False Xor 28UL) PrintResult("False Xor -9D", False Xor -9D) PrintResult("False Xor 10.0F", False Xor 10.0F) PrintResult("False Xor -11.0R", False Xor -11.0R) PrintResult("False Xor ""12""", False Xor "12") PrintResult("False Xor TypeCode.Double", False Xor TypeCode.Double) PrintResult("True Xor False", True Xor False) PrintResult("True Xor True", True Xor True) PrintResult("True Xor System.SByte.MinValue", True Xor System.SByte.MinValue) PrintResult("True Xor System.Byte.MaxValue", True Xor System.Byte.MaxValue) PrintResult("True Xor -3S", True Xor -3S) PrintResult("True Xor 24US", True Xor 24US) PrintResult("True Xor -5I", True Xor -5I) PrintResult("True Xor 26UI", True Xor 26UI) PrintResult("True Xor -7L", True Xor -7L) PrintResult("True Xor 28UL", True Xor 28UL) PrintResult("True Xor -9D", True Xor -9D) PrintResult("True Xor 10.0F", True Xor 10.0F) PrintResult("True Xor -11.0R", True Xor -11.0R) PrintResult("True Xor ""12""", True Xor "12") PrintResult("True Xor TypeCode.Double", True Xor TypeCode.Double) PrintResult("System.SByte.MinValue Xor False", System.SByte.MinValue Xor False) PrintResult("System.SByte.MinValue Xor True", System.SByte.MinValue Xor True) PrintResult("System.SByte.MinValue Xor System.SByte.MinValue", System.SByte.MinValue Xor System.SByte.MinValue) PrintResult("System.SByte.MinValue Xor System.Byte.MaxValue", System.SByte.MinValue Xor System.Byte.MaxValue) PrintResult("System.SByte.MinValue Xor -3S", System.SByte.MinValue Xor -3S) PrintResult("System.SByte.MinValue Xor 24US", System.SByte.MinValue Xor 24US) PrintResult("System.SByte.MinValue Xor -5I", System.SByte.MinValue Xor -5I) PrintResult("System.SByte.MinValue Xor 26UI", System.SByte.MinValue Xor 26UI) PrintResult("System.SByte.MinValue Xor -7L", System.SByte.MinValue Xor -7L) PrintResult("System.SByte.MinValue Xor 28UL", System.SByte.MinValue Xor 28UL) PrintResult("System.SByte.MinValue Xor -9D", System.SByte.MinValue Xor -9D) PrintResult("System.SByte.MinValue Xor 10.0F", System.SByte.MinValue Xor 10.0F) PrintResult("System.SByte.MinValue Xor -11.0R", System.SByte.MinValue Xor -11.0R) PrintResult("System.SByte.MinValue Xor ""12""", System.SByte.MinValue Xor "12") PrintResult("System.SByte.MinValue Xor TypeCode.Double", System.SByte.MinValue Xor TypeCode.Double) PrintResult("System.Byte.MaxValue Xor False", System.Byte.MaxValue Xor False) PrintResult("System.Byte.MaxValue Xor True", System.Byte.MaxValue Xor True) PrintResult("System.Byte.MaxValue Xor System.SByte.MinValue", System.Byte.MaxValue Xor System.SByte.MinValue) PrintResult("System.Byte.MaxValue Xor System.Byte.MaxValue", System.Byte.MaxValue Xor System.Byte.MaxValue) PrintResult("System.Byte.MaxValue Xor -3S", System.Byte.MaxValue Xor -3S) PrintResult("System.Byte.MaxValue Xor 24US", System.Byte.MaxValue Xor 24US) PrintResult("System.Byte.MaxValue Xor -5I", System.Byte.MaxValue Xor -5I) PrintResult("System.Byte.MaxValue Xor 26UI", System.Byte.MaxValue Xor 26UI) PrintResult("System.Byte.MaxValue Xor -7L", System.Byte.MaxValue Xor -7L) PrintResult("System.Byte.MaxValue Xor 28UL", System.Byte.MaxValue Xor 28UL) PrintResult("System.Byte.MaxValue Xor -9D", System.Byte.MaxValue Xor -9D) PrintResult("System.Byte.MaxValue Xor 10.0F", System.Byte.MaxValue Xor 10.0F) PrintResult("System.Byte.MaxValue Xor -11.0R", System.Byte.MaxValue Xor -11.0R) PrintResult("System.Byte.MaxValue Xor ""12""", System.Byte.MaxValue Xor "12") PrintResult("System.Byte.MaxValue Xor TypeCode.Double", System.Byte.MaxValue Xor TypeCode.Double) PrintResult("-3S Xor False", -3S Xor False) PrintResult("-3S Xor True", -3S Xor True) PrintResult("-3S Xor System.SByte.MinValue", -3S Xor System.SByte.MinValue) PrintResult("-3S Xor System.Byte.MaxValue", -3S Xor System.Byte.MaxValue) PrintResult("-3S Xor -3S", -3S Xor -3S) PrintResult("-3S Xor 24US", -3S Xor 24US) PrintResult("-3S Xor -5I", -3S Xor -5I) PrintResult("-3S Xor 26UI", -3S Xor 26UI) PrintResult("-3S Xor -7L", -3S Xor -7L) PrintResult("-3S Xor 28UL", -3S Xor 28UL) PrintResult("-3S Xor -9D", -3S Xor -9D) PrintResult("-3S Xor 10.0F", -3S Xor 10.0F) PrintResult("-3S Xor -11.0R", -3S Xor -11.0R) PrintResult("-3S Xor ""12""", -3S Xor "12") PrintResult("-3S Xor TypeCode.Double", -3S Xor TypeCode.Double) PrintResult("24US Xor False", 24US Xor False) PrintResult("24US Xor True", 24US Xor True) PrintResult("24US Xor System.SByte.MinValue", 24US Xor System.SByte.MinValue) PrintResult("24US Xor System.Byte.MaxValue", 24US Xor System.Byte.MaxValue) PrintResult("24US Xor -3S", 24US Xor -3S) PrintResult("24US Xor 24US", 24US Xor 24US) PrintResult("24US Xor -5I", 24US Xor -5I) PrintResult("24US Xor 26UI", 24US Xor 26UI) PrintResult("24US Xor -7L", 24US Xor -7L) PrintResult("24US Xor 28UL", 24US Xor 28UL) PrintResult("24US Xor -9D", 24US Xor -9D) PrintResult("24US Xor 10.0F", 24US Xor 10.0F) PrintResult("24US Xor -11.0R", 24US Xor -11.0R) PrintResult("24US Xor ""12""", 24US Xor "12") PrintResult("24US Xor TypeCode.Double", 24US Xor TypeCode.Double) PrintResult("-5I Xor False", -5I Xor False) PrintResult("-5I Xor True", -5I Xor True) PrintResult("-5I Xor System.SByte.MinValue", -5I Xor System.SByte.MinValue) PrintResult("-5I Xor System.Byte.MaxValue", -5I Xor System.Byte.MaxValue) PrintResult("-5I Xor -3S", -5I Xor -3S) PrintResult("-5I Xor 24US", -5I Xor 24US) PrintResult("-5I Xor -5I", -5I Xor -5I) PrintResult("-5I Xor 26UI", -5I Xor 26UI) PrintResult("-5I Xor -7L", -5I Xor -7L) PrintResult("-5I Xor 28UL", -5I Xor 28UL) PrintResult("-5I Xor -9D", -5I Xor -9D) PrintResult("-5I Xor 10.0F", -5I Xor 10.0F) PrintResult("-5I Xor -11.0R", -5I Xor -11.0R) PrintResult("-5I Xor ""12""", -5I Xor "12") PrintResult("-5I Xor TypeCode.Double", -5I Xor TypeCode.Double) PrintResult("26UI Xor False", 26UI Xor False) PrintResult("26UI Xor True", 26UI Xor True) PrintResult("26UI Xor System.SByte.MinValue", 26UI Xor System.SByte.MinValue) PrintResult("26UI Xor System.Byte.MaxValue", 26UI Xor System.Byte.MaxValue) PrintResult("26UI Xor -3S", 26UI Xor -3S) PrintResult("26UI Xor 24US", 26UI Xor 24US) PrintResult("26UI Xor -5I", 26UI Xor -5I) PrintResult("26UI Xor 26UI", 26UI Xor 26UI) PrintResult("26UI Xor -7L", 26UI Xor -7L) PrintResult("26UI Xor 28UL", 26UI Xor 28UL) PrintResult("26UI Xor -9D", 26UI Xor -9D) PrintResult("26UI Xor 10.0F", 26UI Xor 10.0F) PrintResult("26UI Xor -11.0R", 26UI Xor -11.0R) PrintResult("26UI Xor ""12""", 26UI Xor "12") PrintResult("26UI Xor TypeCode.Double", 26UI Xor TypeCode.Double) PrintResult("-7L Xor False", -7L Xor False) PrintResult("-7L Xor True", -7L Xor True) PrintResult("-7L Xor System.SByte.MinValue", -7L Xor System.SByte.MinValue) PrintResult("-7L Xor System.Byte.MaxValue", -7L Xor System.Byte.MaxValue) PrintResult("-7L Xor -3S", -7L Xor -3S) PrintResult("-7L Xor 24US", -7L Xor 24US) PrintResult("-7L Xor -5I", -7L Xor -5I) PrintResult("-7L Xor 26UI", -7L Xor 26UI) PrintResult("-7L Xor -7L", -7L Xor -7L) PrintResult("-7L Xor 28UL", -7L Xor 28UL) PrintResult("-7L Xor -9D", -7L Xor -9D) PrintResult("-7L Xor 10.0F", -7L Xor 10.0F) PrintResult("-7L Xor -11.0R", -7L Xor -11.0R) PrintResult("-7L Xor ""12""", -7L Xor "12") PrintResult("-7L Xor TypeCode.Double", -7L Xor TypeCode.Double) PrintResult("28UL Xor False", 28UL Xor False) PrintResult("28UL Xor True", 28UL Xor True) PrintResult("28UL Xor System.SByte.MinValue", 28UL Xor System.SByte.MinValue) PrintResult("28UL Xor System.Byte.MaxValue", 28UL Xor System.Byte.MaxValue) PrintResult("28UL Xor -3S", 28UL Xor -3S) PrintResult("28UL Xor 24US", 28UL Xor 24US) PrintResult("28UL Xor -5I", 28UL Xor -5I) PrintResult("28UL Xor 26UI", 28UL Xor 26UI) PrintResult("28UL Xor -7L", 28UL Xor -7L) PrintResult("28UL Xor 28UL", 28UL Xor 28UL) PrintResult("28UL Xor -9D", 28UL Xor -9D) PrintResult("28UL Xor 10.0F", 28UL Xor 10.0F) PrintResult("28UL Xor -11.0R", 28UL Xor -11.0R) PrintResult("28UL Xor ""12""", 28UL Xor "12") PrintResult("28UL Xor TypeCode.Double", 28UL Xor TypeCode.Double) PrintResult("-9D Xor False", -9D Xor False) PrintResult("-9D Xor True", -9D Xor True) PrintResult("-9D Xor System.SByte.MinValue", -9D Xor System.SByte.MinValue) PrintResult("-9D Xor System.Byte.MaxValue", -9D Xor System.Byte.MaxValue) PrintResult("-9D Xor -3S", -9D Xor -3S) PrintResult("-9D Xor 24US", -9D Xor 24US) PrintResult("-9D Xor -5I", -9D Xor -5I) PrintResult("-9D Xor 26UI", -9D Xor 26UI) PrintResult("-9D Xor -7L", -9D Xor -7L) PrintResult("-9D Xor 28UL", -9D Xor 28UL) PrintResult("-9D Xor -9D", -9D Xor -9D) PrintResult("-9D Xor 10.0F", -9D Xor 10.0F) PrintResult("-9D Xor -11.0R", -9D Xor -11.0R) PrintResult("-9D Xor ""12""", -9D Xor "12") PrintResult("-9D Xor TypeCode.Double", -9D Xor TypeCode.Double) PrintResult("10.0F Xor False", 10.0F Xor False) PrintResult("10.0F Xor True", 10.0F Xor True) PrintResult("10.0F Xor System.SByte.MinValue", 10.0F Xor System.SByte.MinValue) PrintResult("10.0F Xor System.Byte.MaxValue", 10.0F Xor System.Byte.MaxValue) PrintResult("10.0F Xor -3S", 10.0F Xor -3S) PrintResult("10.0F Xor 24US", 10.0F Xor 24US) PrintResult("10.0F Xor -5I", 10.0F Xor -5I) PrintResult("10.0F Xor 26UI", 10.0F Xor 26UI) PrintResult("10.0F Xor -7L", 10.0F Xor -7L) PrintResult("10.0F Xor 28UL", 10.0F Xor 28UL) PrintResult("10.0F Xor -9D", 10.0F Xor -9D) PrintResult("10.0F Xor 10.0F", 10.0F Xor 10.0F) PrintResult("10.0F Xor -11.0R", 10.0F Xor -11.0R) PrintResult("10.0F Xor ""12""", 10.0F Xor "12") PrintResult("10.0F Xor TypeCode.Double", 10.0F Xor TypeCode.Double) PrintResult("-11.0R Xor False", -11.0R Xor False) PrintResult("-11.0R Xor True", -11.0R Xor True) PrintResult("-11.0R Xor System.SByte.MinValue", -11.0R Xor System.SByte.MinValue) PrintResult("-11.0R Xor System.Byte.MaxValue", -11.0R Xor System.Byte.MaxValue) PrintResult("-11.0R Xor -3S", -11.0R Xor -3S) PrintResult("-11.0R Xor 24US", -11.0R Xor 24US) PrintResult("-11.0R Xor -5I", -11.0R Xor -5I) PrintResult("-11.0R Xor 26UI", -11.0R Xor 26UI) PrintResult("-11.0R Xor -7L", -11.0R Xor -7L) PrintResult("-11.0R Xor 28UL", -11.0R Xor 28UL) PrintResult("-11.0R Xor -9D", -11.0R Xor -9D) PrintResult("-11.0R Xor 10.0F", -11.0R Xor 10.0F) PrintResult("-11.0R Xor -11.0R", -11.0R Xor -11.0R) PrintResult("-11.0R Xor ""12""", -11.0R Xor "12") PrintResult("-11.0R Xor TypeCode.Double", -11.0R Xor TypeCode.Double) PrintResult("""12"" Xor False", "12" Xor False) PrintResult("""12"" Xor True", "12" Xor True) PrintResult("""12"" Xor System.SByte.MinValue", "12" Xor System.SByte.MinValue) PrintResult("""12"" Xor System.Byte.MaxValue", "12" Xor System.Byte.MaxValue) PrintResult("""12"" Xor -3S", "12" Xor -3S) PrintResult("""12"" Xor 24US", "12" Xor 24US) PrintResult("""12"" Xor -5I", "12" Xor -5I) PrintResult("""12"" Xor 26UI", "12" Xor 26UI) PrintResult("""12"" Xor -7L", "12" Xor -7L) PrintResult("""12"" Xor 28UL", "12" Xor 28UL) PrintResult("""12"" Xor -9D", "12" Xor -9D) PrintResult("""12"" Xor 10.0F", "12" Xor 10.0F) PrintResult("""12"" Xor -11.0R", "12" Xor -11.0R) PrintResult("""12"" Xor ""12""", "12" Xor "12") PrintResult("""12"" Xor TypeCode.Double", "12" Xor TypeCode.Double) PrintResult("TypeCode.Double Xor False", TypeCode.Double Xor False) PrintResult("TypeCode.Double Xor True", TypeCode.Double Xor True) PrintResult("TypeCode.Double Xor System.SByte.MinValue", TypeCode.Double Xor System.SByte.MinValue) PrintResult("TypeCode.Double Xor System.Byte.MaxValue", TypeCode.Double Xor System.Byte.MaxValue) PrintResult("TypeCode.Double Xor -3S", TypeCode.Double Xor -3S) PrintResult("TypeCode.Double Xor 24US", TypeCode.Double Xor 24US) PrintResult("TypeCode.Double Xor -5I", TypeCode.Double Xor -5I) PrintResult("TypeCode.Double Xor 26UI", TypeCode.Double Xor 26UI) PrintResult("TypeCode.Double Xor -7L", TypeCode.Double Xor -7L) PrintResult("TypeCode.Double Xor 28UL", TypeCode.Double Xor 28UL) PrintResult("TypeCode.Double Xor -9D", TypeCode.Double Xor -9D) PrintResult("TypeCode.Double Xor 10.0F", TypeCode.Double Xor 10.0F) PrintResult("TypeCode.Double Xor -11.0R", TypeCode.Double Xor -11.0R) PrintResult("TypeCode.Double Xor ""12""", TypeCode.Double Xor "12") PrintResult("TypeCode.Double Xor TypeCode.Double", TypeCode.Double Xor TypeCode.Double) PrintResult("False Or False", False Or False) PrintResult("False Or True", False Or True) PrintResult("False Or System.SByte.MinValue", False Or System.SByte.MinValue) PrintResult("False Or System.Byte.MaxValue", False Or System.Byte.MaxValue) PrintResult("False Or -3S", False Or -3S) PrintResult("False Or 24US", False Or 24US) PrintResult("False Or -5I", False Or -5I) PrintResult("False Or 26UI", False Or 26UI) PrintResult("False Or -7L", False Or -7L) PrintResult("False Or 28UL", False Or 28UL) PrintResult("False Or -9D", False Or -9D) PrintResult("False Or 10.0F", False Or 10.0F) PrintResult("False Or -11.0R", False Or -11.0R) PrintResult("False Or ""12""", False Or "12") PrintResult("False Or TypeCode.Double", False Or TypeCode.Double) PrintResult("True Or False", True Or False) PrintResult("True Or True", True Or True) PrintResult("True Or System.SByte.MinValue", True Or System.SByte.MinValue) PrintResult("True Or System.Byte.MaxValue", True Or System.Byte.MaxValue) PrintResult("True Or -3S", True Or -3S) PrintResult("True Or 24US", True Or 24US) PrintResult("True Or -5I", True Or -5I) PrintResult("True Or 26UI", True Or 26UI) PrintResult("True Or -7L", True Or -7L) PrintResult("True Or 28UL", True Or 28UL) PrintResult("True Or -9D", True Or -9D) PrintResult("True Or 10.0F", True Or 10.0F) PrintResult("True Or -11.0R", True Or -11.0R) PrintResult("True Or ""12""", True Or "12") PrintResult("True Or TypeCode.Double", True Or TypeCode.Double) PrintResult("System.SByte.MinValue Or False", System.SByte.MinValue Or False) PrintResult("System.SByte.MinValue Or True", System.SByte.MinValue Or True) PrintResult("System.SByte.MinValue Or System.SByte.MinValue", System.SByte.MinValue Or System.SByte.MinValue) PrintResult("System.SByte.MinValue Or System.Byte.MaxValue", System.SByte.MinValue Or System.Byte.MaxValue) PrintResult("System.SByte.MinValue Or -3S", System.SByte.MinValue Or -3S) PrintResult("System.SByte.MinValue Or 24US", System.SByte.MinValue Or 24US) PrintResult("System.SByte.MinValue Or -5I", System.SByte.MinValue Or -5I) PrintResult("System.SByte.MinValue Or 26UI", System.SByte.MinValue Or 26UI) PrintResult("System.SByte.MinValue Or -7L", System.SByte.MinValue Or -7L) PrintResult("System.SByte.MinValue Or 28UL", System.SByte.MinValue Or 28UL) PrintResult("System.SByte.MinValue Or -9D", System.SByte.MinValue Or -9D) PrintResult("System.SByte.MinValue Or 10.0F", System.SByte.MinValue Or 10.0F) PrintResult("System.SByte.MinValue Or -11.0R", System.SByte.MinValue Or -11.0R) PrintResult("System.SByte.MinValue Or ""12""", System.SByte.MinValue Or "12") PrintResult("System.SByte.MinValue Or TypeCode.Double", System.SByte.MinValue Or TypeCode.Double) PrintResult("System.Byte.MaxValue Or False", System.Byte.MaxValue Or False) PrintResult("System.Byte.MaxValue Or True", System.Byte.MaxValue Or True) PrintResult("System.Byte.MaxValue Or System.SByte.MinValue", System.Byte.MaxValue Or System.SByte.MinValue) PrintResult("System.Byte.MaxValue Or System.Byte.MaxValue", System.Byte.MaxValue Or System.Byte.MaxValue) PrintResult("System.Byte.MaxValue Or -3S", System.Byte.MaxValue Or -3S) PrintResult("System.Byte.MaxValue Or 24US", System.Byte.MaxValue Or 24US) PrintResult("System.Byte.MaxValue Or -5I", System.Byte.MaxValue Or -5I) PrintResult("System.Byte.MaxValue Or 26UI", System.Byte.MaxValue Or 26UI) PrintResult("System.Byte.MaxValue Or -7L", System.Byte.MaxValue Or -7L) PrintResult("System.Byte.MaxValue Or 28UL", System.Byte.MaxValue Or 28UL) PrintResult("System.Byte.MaxValue Or -9D", System.Byte.MaxValue Or -9D) PrintResult("System.Byte.MaxValue Or 10.0F", System.Byte.MaxValue Or 10.0F) PrintResult("System.Byte.MaxValue Or -11.0R", System.Byte.MaxValue Or -11.0R) PrintResult("System.Byte.MaxValue Or ""12""", System.Byte.MaxValue Or "12") PrintResult("System.Byte.MaxValue Or TypeCode.Double", System.Byte.MaxValue Or TypeCode.Double) PrintResult("-3S Or False", -3S Or False) PrintResult("-3S Or True", -3S Or True) PrintResult("-3S Or System.SByte.MinValue", -3S Or System.SByte.MinValue) PrintResult("-3S Or System.Byte.MaxValue", -3S Or System.Byte.MaxValue) PrintResult("-3S Or -3S", -3S Or -3S) PrintResult("-3S Or 24US", -3S Or 24US) PrintResult("-3S Or -5I", -3S Or -5I) PrintResult("-3S Or 26UI", -3S Or 26UI) PrintResult("-3S Or -7L", -3S Or -7L) PrintResult("-3S Or 28UL", -3S Or 28UL) PrintResult("-3S Or -9D", -3S Or -9D) PrintResult("-3S Or 10.0F", -3S Or 10.0F) PrintResult("-3S Or -11.0R", -3S Or -11.0R) PrintResult("-3S Or ""12""", -3S Or "12") PrintResult("-3S Or TypeCode.Double", -3S Or TypeCode.Double) PrintResult("24US Or False", 24US Or False) PrintResult("24US Or True", 24US Or True) PrintResult("24US Or System.SByte.MinValue", 24US Or System.SByte.MinValue) PrintResult("24US Or System.Byte.MaxValue", 24US Or System.Byte.MaxValue) PrintResult("24US Or -3S", 24US Or -3S) PrintResult("24US Or 24US", 24US Or 24US) PrintResult("24US Or -5I", 24US Or -5I) PrintResult("24US Or 26UI", 24US Or 26UI) PrintResult("24US Or -7L", 24US Or -7L) PrintResult("24US Or 28UL", 24US Or 28UL) PrintResult("24US Or -9D", 24US Or -9D) PrintResult("24US Or 10.0F", 24US Or 10.0F) PrintResult("24US Or -11.0R", 24US Or -11.0R) PrintResult("24US Or ""12""", 24US Or "12") PrintResult("24US Or TypeCode.Double", 24US Or TypeCode.Double) PrintResult("-5I Or False", -5I Or False) PrintResult("-5I Or True", -5I Or True) PrintResult("-5I Or System.SByte.MinValue", -5I Or System.SByte.MinValue) PrintResult("-5I Or System.Byte.MaxValue", -5I Or System.Byte.MaxValue) PrintResult("-5I Or -3S", -5I Or -3S) PrintResult("-5I Or 24US", -5I Or 24US) PrintResult("-5I Or -5I", -5I Or -5I) PrintResult("-5I Or 26UI", -5I Or 26UI) PrintResult("-5I Or -7L", -5I Or -7L) PrintResult("-5I Or 28UL", -5I Or 28UL) PrintResult("-5I Or -9D", -5I Or -9D) PrintResult("-5I Or 10.0F", -5I Or 10.0F) PrintResult("-5I Or -11.0R", -5I Or -11.0R) PrintResult("-5I Or ""12""", -5I Or "12") PrintResult("-5I Or TypeCode.Double", -5I Or TypeCode.Double) PrintResult("26UI Or False", 26UI Or False) PrintResult("26UI Or True", 26UI Or True) PrintResult("26UI Or System.SByte.MinValue", 26UI Or System.SByte.MinValue) PrintResult("26UI Or System.Byte.MaxValue", 26UI Or System.Byte.MaxValue) PrintResult("26UI Or -3S", 26UI Or -3S) PrintResult("26UI Or 24US", 26UI Or 24US) PrintResult("26UI Or -5I", 26UI Or -5I) PrintResult("26UI Or 26UI", 26UI Or 26UI) PrintResult("26UI Or -7L", 26UI Or -7L) PrintResult("26UI Or 28UL", 26UI Or 28UL) PrintResult("26UI Or -9D", 26UI Or -9D) PrintResult("26UI Or 10.0F", 26UI Or 10.0F) PrintResult("26UI Or -11.0R", 26UI Or -11.0R) PrintResult("26UI Or ""12""", 26UI Or "12") PrintResult("26UI Or TypeCode.Double", 26UI Or TypeCode.Double) PrintResult("-7L Or False", -7L Or False) PrintResult("-7L Or True", -7L Or True) PrintResult("-7L Or System.SByte.MinValue", -7L Or System.SByte.MinValue) PrintResult("-7L Or System.Byte.MaxValue", -7L Or System.Byte.MaxValue) PrintResult("-7L Or -3S", -7L Or -3S) PrintResult("-7L Or 24US", -7L Or 24US) PrintResult("-7L Or -5I", -7L Or -5I) PrintResult("-7L Or 26UI", -7L Or 26UI) PrintResult("-7L Or -7L", -7L Or -7L) PrintResult("-7L Or 28UL", -7L Or 28UL) PrintResult("-7L Or -9D", -7L Or -9D) PrintResult("-7L Or 10.0F", -7L Or 10.0F) PrintResult("-7L Or -11.0R", -7L Or -11.0R) PrintResult("-7L Or ""12""", -7L Or "12") PrintResult("-7L Or TypeCode.Double", -7L Or TypeCode.Double) PrintResult("28UL Or False", 28UL Or False) PrintResult("28UL Or True", 28UL Or True) PrintResult("28UL Or System.SByte.MinValue", 28UL Or System.SByte.MinValue) PrintResult("28UL Or System.Byte.MaxValue", 28UL Or System.Byte.MaxValue) PrintResult("28UL Or -3S", 28UL Or -3S) PrintResult("28UL Or 24US", 28UL Or 24US) PrintResult("28UL Or -5I", 28UL Or -5I) PrintResult("28UL Or 26UI", 28UL Or 26UI) PrintResult("28UL Or -7L", 28UL Or -7L) PrintResult("28UL Or 28UL", 28UL Or 28UL) PrintResult("28UL Or -9D", 28UL Or -9D) PrintResult("28UL Or 10.0F", 28UL Or 10.0F) PrintResult("28UL Or -11.0R", 28UL Or -11.0R) PrintResult("28UL Or ""12""", 28UL Or "12") PrintResult("28UL Or TypeCode.Double", 28UL Or TypeCode.Double) PrintResult("-9D Or False", -9D Or False) PrintResult("-9D Or True", -9D Or True) PrintResult("-9D Or System.SByte.MinValue", -9D Or System.SByte.MinValue) PrintResult("-9D Or System.Byte.MaxValue", -9D Or System.Byte.MaxValue) PrintResult("-9D Or -3S", -9D Or -3S) PrintResult("-9D Or 24US", -9D Or 24US) PrintResult("-9D Or -5I", -9D Or -5I) PrintResult("-9D Or 26UI", -9D Or 26UI) PrintResult("-9D Or -7L", -9D Or -7L) PrintResult("-9D Or 28UL", -9D Or 28UL) PrintResult("-9D Or -9D", -9D Or -9D) PrintResult("-9D Or 10.0F", -9D Or 10.0F) PrintResult("-9D Or -11.0R", -9D Or -11.0R) PrintResult("-9D Or ""12""", -9D Or "12") PrintResult("-9D Or TypeCode.Double", -9D Or TypeCode.Double) PrintResult("10.0F Or False", 10.0F Or False) PrintResult("10.0F Or True", 10.0F Or True) PrintResult("10.0F Or System.SByte.MinValue", 10.0F Or System.SByte.MinValue) PrintResult("10.0F Or System.Byte.MaxValue", 10.0F Or System.Byte.MaxValue) PrintResult("10.0F Or -3S", 10.0F Or -3S) PrintResult("10.0F Or 24US", 10.0F Or 24US) PrintResult("10.0F Or -5I", 10.0F Or -5I) PrintResult("10.0F Or 26UI", 10.0F Or 26UI) PrintResult("10.0F Or -7L", 10.0F Or -7L) PrintResult("10.0F Or 28UL", 10.0F Or 28UL) PrintResult("10.0F Or -9D", 10.0F Or -9D) PrintResult("10.0F Or 10.0F", 10.0F Or 10.0F) PrintResult("10.0F Or -11.0R", 10.0F Or -11.0R) PrintResult("10.0F Or ""12""", 10.0F Or "12") PrintResult("10.0F Or TypeCode.Double", 10.0F Or TypeCode.Double) PrintResult("-11.0R Or False", -11.0R Or False) PrintResult("-11.0R Or True", -11.0R Or True) PrintResult("-11.0R Or System.SByte.MinValue", -11.0R Or System.SByte.MinValue) PrintResult("-11.0R Or System.Byte.MaxValue", -11.0R Or System.Byte.MaxValue) PrintResult("-11.0R Or -3S", -11.0R Or -3S) PrintResult("-11.0R Or 24US", -11.0R Or 24US) PrintResult("-11.0R Or -5I", -11.0R Or -5I) PrintResult("-11.0R Or 26UI", -11.0R Or 26UI) PrintResult("-11.0R Or -7L", -11.0R Or -7L) PrintResult("-11.0R Or 28UL", -11.0R Or 28UL) PrintResult("-11.0R Or -9D", -11.0R Or -9D) PrintResult("-11.0R Or 10.0F", -11.0R Or 10.0F) PrintResult("-11.0R Or -11.0R", -11.0R Or -11.0R) PrintResult("-11.0R Or ""12""", -11.0R Or "12") PrintResult("-11.0R Or TypeCode.Double", -11.0R Or TypeCode.Double) PrintResult("""12"" Or False", "12" Or False) PrintResult("""12"" Or True", "12" Or True) PrintResult("""12"" Or System.SByte.MinValue", "12" Or System.SByte.MinValue) PrintResult("""12"" Or System.Byte.MaxValue", "12" Or System.Byte.MaxValue) PrintResult("""12"" Or -3S", "12" Or -3S) PrintResult("""12"" Or 24US", "12" Or 24US) PrintResult("""12"" Or -5I", "12" Or -5I) PrintResult("""12"" Or 26UI", "12" Or 26UI) PrintResult("""12"" Or -7L", "12" Or -7L) PrintResult("""12"" Or 28UL", "12" Or 28UL) PrintResult("""12"" Or -9D", "12" Or -9D) PrintResult("""12"" Or 10.0F", "12" Or 10.0F) PrintResult("""12"" Or -11.0R", "12" Or -11.0R) PrintResult("""12"" Or ""12""", "12" Or "12") PrintResult("""12"" Or TypeCode.Double", "12" Or TypeCode.Double) PrintResult("TypeCode.Double Or False", TypeCode.Double Or False) PrintResult("TypeCode.Double Or True", TypeCode.Double Or True) PrintResult("TypeCode.Double Or System.SByte.MinValue", TypeCode.Double Or System.SByte.MinValue) PrintResult("TypeCode.Double Or System.Byte.MaxValue", TypeCode.Double Or System.Byte.MaxValue) PrintResult("TypeCode.Double Or -3S", TypeCode.Double Or -3S) PrintResult("TypeCode.Double Or 24US", TypeCode.Double Or 24US) PrintResult("TypeCode.Double Or -5I", TypeCode.Double Or -5I) PrintResult("TypeCode.Double Or 26UI", TypeCode.Double Or 26UI) PrintResult("TypeCode.Double Or -7L", TypeCode.Double Or -7L) PrintResult("TypeCode.Double Or 28UL", TypeCode.Double Or 28UL) PrintResult("TypeCode.Double Or -9D", TypeCode.Double Or -9D) PrintResult("TypeCode.Double Or 10.0F", TypeCode.Double Or 10.0F) PrintResult("TypeCode.Double Or -11.0R", TypeCode.Double Or -11.0R) PrintResult("TypeCode.Double Or ""12""", TypeCode.Double Or "12") PrintResult("TypeCode.Double Or TypeCode.Double", TypeCode.Double Or TypeCode.Double) PrintResult("False And False", False And False) PrintResult("False And True", False And True) PrintResult("False And System.SByte.MinValue", False And System.SByte.MinValue) PrintResult("False And System.Byte.MaxValue", False And System.Byte.MaxValue) PrintResult("False And -3S", False And -3S) PrintResult("False And 24US", False And 24US) PrintResult("False And -5I", False And -5I) PrintResult("False And 26UI", False And 26UI) PrintResult("False And -7L", False And -7L) PrintResult("False And 28UL", False And 28UL) PrintResult("False And -9D", False And -9D) PrintResult("False And 10.0F", False And 10.0F) PrintResult("False And -11.0R", False And -11.0R) PrintResult("False And ""12""", False And "12") PrintResult("False And TypeCode.Double", False And TypeCode.Double) PrintResult("True And False", True And False) PrintResult("True And True", True And True) PrintResult("True And System.SByte.MinValue", True And System.SByte.MinValue) PrintResult("True And System.Byte.MaxValue", True And System.Byte.MaxValue) PrintResult("True And -3S", True And -3S) PrintResult("True And 24US", True And 24US) PrintResult("True And -5I", True And -5I) PrintResult("True And 26UI", True And 26UI) PrintResult("True And -7L", True And -7L) PrintResult("True And 28UL", True And 28UL) PrintResult("True And -9D", True And -9D) PrintResult("True And 10.0F", True And 10.0F) PrintResult("True And -11.0R", True And -11.0R) PrintResult("True And ""12""", True And "12") PrintResult("True And TypeCode.Double", True And TypeCode.Double) PrintResult("System.SByte.MinValue And False", System.SByte.MinValue And False) PrintResult("System.SByte.MinValue And True", System.SByte.MinValue And True) PrintResult("System.SByte.MinValue And System.SByte.MinValue", System.SByte.MinValue And System.SByte.MinValue) PrintResult("System.SByte.MinValue And System.Byte.MaxValue", System.SByte.MinValue And System.Byte.MaxValue) PrintResult("System.SByte.MinValue And -3S", System.SByte.MinValue And -3S) PrintResult("System.SByte.MinValue And 24US", System.SByte.MinValue And 24US) PrintResult("System.SByte.MinValue And -5I", System.SByte.MinValue And -5I) PrintResult("System.SByte.MinValue And 26UI", System.SByte.MinValue And 26UI) PrintResult("System.SByte.MinValue And -7L", System.SByte.MinValue And -7L) PrintResult("System.SByte.MinValue And 28UL", System.SByte.MinValue And 28UL) PrintResult("System.SByte.MinValue And -9D", System.SByte.MinValue And -9D) PrintResult("System.SByte.MinValue And 10.0F", System.SByte.MinValue And 10.0F) PrintResult("System.SByte.MinValue And -11.0R", System.SByte.MinValue And -11.0R) PrintResult("System.SByte.MinValue And ""12""", System.SByte.MinValue And "12") PrintResult("System.SByte.MinValue And TypeCode.Double", System.SByte.MinValue And TypeCode.Double) PrintResult("System.Byte.MaxValue And False", System.Byte.MaxValue And False) PrintResult("System.Byte.MaxValue And True", System.Byte.MaxValue And True) PrintResult("System.Byte.MaxValue And System.SByte.MinValue", System.Byte.MaxValue And System.SByte.MinValue) PrintResult("System.Byte.MaxValue And System.Byte.MaxValue", System.Byte.MaxValue And System.Byte.MaxValue) PrintResult("System.Byte.MaxValue And -3S", System.Byte.MaxValue And -3S) PrintResult("System.Byte.MaxValue And 24US", System.Byte.MaxValue And 24US) PrintResult("System.Byte.MaxValue And -5I", System.Byte.MaxValue And -5I) PrintResult("System.Byte.MaxValue And 26UI", System.Byte.MaxValue And 26UI) PrintResult("System.Byte.MaxValue And -7L", System.Byte.MaxValue And -7L) PrintResult("System.Byte.MaxValue And 28UL", System.Byte.MaxValue And 28UL) PrintResult("System.Byte.MaxValue And -9D", System.Byte.MaxValue And -9D) PrintResult("System.Byte.MaxValue And 10.0F", System.Byte.MaxValue And 10.0F) PrintResult("System.Byte.MaxValue And -11.0R", System.Byte.MaxValue And -11.0R) PrintResult("System.Byte.MaxValue And ""12""", System.Byte.MaxValue And "12") PrintResult("System.Byte.MaxValue And TypeCode.Double", System.Byte.MaxValue And TypeCode.Double) PrintResult("-3S And False", -3S And False) PrintResult("-3S And True", -3S And True) PrintResult("-3S And System.SByte.MinValue", -3S And System.SByte.MinValue) PrintResult("-3S And System.Byte.MaxValue", -3S And System.Byte.MaxValue) PrintResult("-3S And -3S", -3S And -3S) PrintResult("-3S And 24US", -3S And 24US) PrintResult("-3S And -5I", -3S And -5I) PrintResult("-3S And 26UI", -3S And 26UI) PrintResult("-3S And -7L", -3S And -7L) PrintResult("-3S And 28UL", -3S And 28UL) PrintResult("-3S And -9D", -3S And -9D) PrintResult("-3S And 10.0F", -3S And 10.0F) PrintResult("-3S And -11.0R", -3S And -11.0R) PrintResult("-3S And ""12""", -3S And "12") PrintResult("-3S And TypeCode.Double", -3S And TypeCode.Double) PrintResult("24US And False", 24US And False) PrintResult("24US And True", 24US And True) PrintResult("24US And System.SByte.MinValue", 24US And System.SByte.MinValue) PrintResult("24US And System.Byte.MaxValue", 24US And System.Byte.MaxValue) PrintResult("24US And -3S", 24US And -3S) PrintResult("24US And 24US", 24US And 24US) PrintResult("24US And -5I", 24US And -5I) PrintResult("24US And 26UI", 24US And 26UI) PrintResult("24US And -7L", 24US And -7L) PrintResult("24US And 28UL", 24US And 28UL) PrintResult("24US And -9D", 24US And -9D) PrintResult("24US And 10.0F", 24US And 10.0F) PrintResult("24US And -11.0R", 24US And -11.0R) PrintResult("24US And ""12""", 24US And "12") PrintResult("24US And TypeCode.Double", 24US And TypeCode.Double) PrintResult("-5I And False", -5I And False) PrintResult("-5I And True", -5I And True) PrintResult("-5I And System.SByte.MinValue", -5I And System.SByte.MinValue) PrintResult("-5I And System.Byte.MaxValue", -5I And System.Byte.MaxValue) PrintResult("-5I And -3S", -5I And -3S) PrintResult("-5I And 24US", -5I And 24US) PrintResult("-5I And -5I", -5I And -5I) PrintResult("-5I And 26UI", -5I And 26UI) PrintResult("-5I And -7L", -5I And -7L) PrintResult("-5I And 28UL", -5I And 28UL) PrintResult("-5I And -9D", -5I And -9D) PrintResult("-5I And 10.0F", -5I And 10.0F) PrintResult("-5I And -11.0R", -5I And -11.0R) PrintResult("-5I And ""12""", -5I And "12") PrintResult("-5I And TypeCode.Double", -5I And TypeCode.Double) PrintResult("26UI And False", 26UI And False) PrintResult("26UI And True", 26UI And True) PrintResult("26UI And System.SByte.MinValue", 26UI And System.SByte.MinValue) PrintResult("26UI And System.Byte.MaxValue", 26UI And System.Byte.MaxValue) PrintResult("26UI And -3S", 26UI And -3S) PrintResult("26UI And 24US", 26UI And 24US) PrintResult("26UI And -5I", 26UI And -5I) PrintResult("26UI And 26UI", 26UI And 26UI) PrintResult("26UI And -7L", 26UI And -7L) PrintResult("26UI And 28UL", 26UI And 28UL) PrintResult("26UI And -9D", 26UI And -9D) PrintResult("26UI And 10.0F", 26UI And 10.0F) PrintResult("26UI And -11.0R", 26UI And -11.0R) PrintResult("26UI And ""12""", 26UI And "12") PrintResult("26UI And TypeCode.Double", 26UI And TypeCode.Double) PrintResult("-7L And False", -7L And False) PrintResult("-7L And True", -7L And True) PrintResult("-7L And System.SByte.MinValue", -7L And System.SByte.MinValue) PrintResult("-7L And System.Byte.MaxValue", -7L And System.Byte.MaxValue) PrintResult("-7L And -3S", -7L And -3S) PrintResult("-7L And 24US", -7L And 24US) PrintResult("-7L And -5I", -7L And -5I) PrintResult("-7L And 26UI", -7L And 26UI) PrintResult("-7L And -7L", -7L And -7L) PrintResult("-7L And 28UL", -7L And 28UL) PrintResult("-7L And -9D", -7L And -9D) PrintResult("-7L And 10.0F", -7L And 10.0F) PrintResult("-7L And -11.0R", -7L And -11.0R) PrintResult("-7L And ""12""", -7L And "12") PrintResult("-7L And TypeCode.Double", -7L And TypeCode.Double) PrintResult("28UL And False", 28UL And False) PrintResult("28UL And True", 28UL And True) PrintResult("28UL And System.SByte.MinValue", 28UL And System.SByte.MinValue) PrintResult("28UL And System.Byte.MaxValue", 28UL And System.Byte.MaxValue) PrintResult("28UL And -3S", 28UL And -3S) PrintResult("28UL And 24US", 28UL And 24US) PrintResult("28UL And -5I", 28UL And -5I) PrintResult("28UL And 26UI", 28UL And 26UI) PrintResult("28UL And -7L", 28UL And -7L) PrintResult("28UL And 28UL", 28UL And 28UL) PrintResult("28UL And -9D", 28UL And -9D) PrintResult("28UL And 10.0F", 28UL And 10.0F) PrintResult("28UL And -11.0R", 28UL And -11.0R) PrintResult("28UL And ""12""", 28UL And "12") PrintResult("28UL And TypeCode.Double", 28UL And TypeCode.Double) PrintResult("-9D And False", -9D And False) PrintResult("-9D And True", -9D And True) PrintResult("-9D And System.SByte.MinValue", -9D And System.SByte.MinValue) PrintResult("-9D And System.Byte.MaxValue", -9D And System.Byte.MaxValue) PrintResult("-9D And -3S", -9D And -3S) PrintResult("-9D And 24US", -9D And 24US) PrintResult("-9D And -5I", -9D And -5I) PrintResult("-9D And 26UI", -9D And 26UI) PrintResult("-9D And -7L", -9D And -7L) PrintResult("-9D And 28UL", -9D And 28UL) PrintResult("-9D And -9D", -9D And -9D) PrintResult("-9D And 10.0F", -9D And 10.0F) PrintResult("-9D And -11.0R", -9D And -11.0R) PrintResult("-9D And ""12""", -9D And "12") PrintResult("-9D And TypeCode.Double", -9D And TypeCode.Double) PrintResult("10.0F And False", 10.0F And False) PrintResult("10.0F And True", 10.0F And True) PrintResult("10.0F And System.SByte.MinValue", 10.0F And System.SByte.MinValue) PrintResult("10.0F And System.Byte.MaxValue", 10.0F And System.Byte.MaxValue) PrintResult("10.0F And -3S", 10.0F And -3S) PrintResult("10.0F And 24US", 10.0F And 24US) PrintResult("10.0F And -5I", 10.0F And -5I) PrintResult("10.0F And 26UI", 10.0F And 26UI) PrintResult("10.0F And -7L", 10.0F And -7L) PrintResult("10.0F And 28UL", 10.0F And 28UL) PrintResult("10.0F And -9D", 10.0F And -9D) PrintResult("10.0F And 10.0F", 10.0F And 10.0F) PrintResult("10.0F And -11.0R", 10.0F And -11.0R) PrintResult("10.0F And ""12""", 10.0F And "12") PrintResult("10.0F And TypeCode.Double", 10.0F And TypeCode.Double) PrintResult("-11.0R And False", -11.0R And False) PrintResult("-11.0R And True", -11.0R And True) PrintResult("-11.0R And System.SByte.MinValue", -11.0R And System.SByte.MinValue) PrintResult("-11.0R And System.Byte.MaxValue", -11.0R And System.Byte.MaxValue) PrintResult("-11.0R And -3S", -11.0R And -3S) PrintResult("-11.0R And 24US", -11.0R And 24US) PrintResult("-11.0R And -5I", -11.0R And -5I) PrintResult("-11.0R And 26UI", -11.0R And 26UI) PrintResult("-11.0R And -7L", -11.0R And -7L) PrintResult("-11.0R And 28UL", -11.0R And 28UL) PrintResult("-11.0R And -9D", -11.0R And -9D) PrintResult("-11.0R And 10.0F", -11.0R And 10.0F) PrintResult("-11.0R And -11.0R", -11.0R And -11.0R) PrintResult("-11.0R And ""12""", -11.0R And "12") PrintResult("-11.0R And TypeCode.Double", -11.0R And TypeCode.Double) PrintResult("""12"" And False", "12" And False) PrintResult("""12"" And True", "12" And True) PrintResult("""12"" And System.SByte.MinValue", "12" And System.SByte.MinValue) PrintResult("""12"" And System.Byte.MaxValue", "12" And System.Byte.MaxValue) PrintResult("""12"" And -3S", "12" And -3S) PrintResult("""12"" And 24US", "12" And 24US) PrintResult("""12"" And -5I", "12" And -5I) PrintResult("""12"" And 26UI", "12" And 26UI) PrintResult("""12"" And -7L", "12" And -7L) PrintResult("""12"" And 28UL", "12" And 28UL) PrintResult("""12"" And -9D", "12" And -9D) PrintResult("""12"" And 10.0F", "12" And 10.0F) PrintResult("""12"" And -11.0R", "12" And -11.0R) PrintResult("""12"" And ""12""", "12" And "12") PrintResult("""12"" And TypeCode.Double", "12" And TypeCode.Double) PrintResult("TypeCode.Double And False", TypeCode.Double And False) PrintResult("TypeCode.Double And True", TypeCode.Double And True) PrintResult("TypeCode.Double And System.SByte.MinValue", TypeCode.Double And System.SByte.MinValue) PrintResult("TypeCode.Double And System.Byte.MaxValue", TypeCode.Double And System.Byte.MaxValue) PrintResult("TypeCode.Double And -3S", TypeCode.Double And -3S) PrintResult("TypeCode.Double And 24US", TypeCode.Double And 24US) PrintResult("TypeCode.Double And -5I", TypeCode.Double And -5I) PrintResult("TypeCode.Double And 26UI", TypeCode.Double And 26UI) PrintResult("TypeCode.Double And -7L", TypeCode.Double And -7L) PrintResult("TypeCode.Double And 28UL", TypeCode.Double And 28UL) PrintResult("TypeCode.Double And -9D", TypeCode.Double And -9D) PrintResult("TypeCode.Double And 10.0F", TypeCode.Double And 10.0F) PrintResult("TypeCode.Double And -11.0R", TypeCode.Double And -11.0R) PrintResult("TypeCode.Double And ""12""", TypeCode.Double And "12") PrintResult("TypeCode.Double And TypeCode.Double", TypeCode.Double And TypeCode.Double) 'PrintResult("#8:30:00 AM# + ""12""", #8:30:00 AM# + "12") 'PrintResult("#8:30:00 AM# + #8:30:00 AM#", #8:30:00 AM# + #8:30:00 AM#) PrintResult("""c""c + ""12""", "c"c + "12") PrintResult("""c""c + ""c""c", "c"c + "c"c) 'PrintResult("""12"" + #8:30:00 AM#", "12" + #8:30:00 AM#) PrintResult("""12"" + ""c""c", "12" + "c"c) 'PrintResult("#8:30:00 AM# & False", #8:30:00 AM# & False) 'PrintResult("#8:30:00 AM# & True", #8:30:00 AM# & True) 'PrintResult("#8:30:00 AM# & System.SByte.MinValue", #8:30:00 AM# & System.SByte.MinValue) 'PrintResult("#8:30:00 AM# & System.Byte.MaxValue", #8:30:00 AM# & System.Byte.MaxValue) 'PrintResult("#8:30:00 AM# & -3S", #8:30:00 AM# & -3S) 'PrintResult("#8:30:00 AM# & 24US", #8:30:00 AM# & 24US) 'PrintResult("#8:30:00 AM# & -5I", #8:30:00 AM# & -5I) 'PrintResult("#8:30:00 AM# & 26UI", #8:30:00 AM# & 26UI) 'PrintResult("#8:30:00 AM# & -7L", #8:30:00 AM# & -7L) 'PrintResult("#8:30:00 AM# & 28UL", #8:30:00 AM# & 28UL) 'PrintResult("#8:30:00 AM# & -9D", #8:30:00 AM# & -9D) 'PrintResult("#8:30:00 AM# & 10.0F", #8:30:00 AM# & 10.0F) 'PrintResult("#8:30:00 AM# & -11.0R", #8:30:00 AM# & -11.0R) 'PrintResult("#8:30:00 AM# & ""12""", #8:30:00 AM# & "12") 'PrintResult("#8:30:00 AM# & TypeCode.Double", #8:30:00 AM# & TypeCode.Double) 'PrintResult("#8:30:00 AM# & #8:30:00 AM#", #8:30:00 AM# & #8:30:00 AM#) 'PrintResult("#8:30:00 AM# & ""c""c", #8:30:00 AM# & "c"c) PrintResult("""c""c & False", "c"c & False) PrintResult("""c""c & True", "c"c & True) PrintResult("""c""c & System.SByte.MinValue", "c"c & System.SByte.MinValue) PrintResult("""c""c & System.Byte.MaxValue", "c"c & System.Byte.MaxValue) PrintResult("""c""c & -3S", "c"c & -3S) PrintResult("""c""c & 24US", "c"c & 24US) PrintResult("""c""c & -5I", "c"c & -5I) PrintResult("""c""c & 26UI", "c"c & 26UI) PrintResult("""c""c & -7L", "c"c & -7L) PrintResult("""c""c & 28UL", "c"c & 28UL) PrintResult("""c""c & -9D", "c"c & -9D) PrintResult("""c""c & 10.0F", "c"c & 10.0F) PrintResult("""c""c & -11.0R", "c"c & -11.0R) PrintResult("""c""c & ""12""", "c"c & "12") PrintResult("""c""c & TypeCode.Double", "c"c & TypeCode.Double) 'PrintResult("""c""c & #8:30:00 AM#", "c"c & #8:30:00 AM#) PrintResult("""c""c & ""c""c", "c"c & "c"c) 'PrintResult("False & #8:30:00 AM#", False & #8:30:00 AM#) PrintResult("False & ""c""c", False & "c"c) 'PrintResult("True & #8:30:00 AM#", True & #8:30:00 AM#) PrintResult("True & ""c""c", True & "c"c) 'PrintResult("System.SByte.MinValue & #8:30:00 AM#", System.SByte.MinValue & #8:30:00 AM#) PrintResult("System.SByte.MinValue & ""c""c", System.SByte.MinValue & "c"c) 'PrintResult("System.Byte.MaxValue & #8:30:00 AM#", System.Byte.MaxValue & #8:30:00 AM#) PrintResult("System.Byte.MaxValue & ""c""c", System.Byte.MaxValue & "c"c) 'PrintResult("-3S & #8:30:00 AM#", -3S & #8:30:00 AM#) PrintResult("-3S & ""c""c", -3S & "c"c) 'PrintResult("24US & #8:30:00 AM#", 24US & #8:30:00 AM#) PrintResult("24US & ""c""c", 24US & "c"c) 'PrintResult("-5I & #8:30:00 AM#", -5I & #8:30:00 AM#) PrintResult("-5I & ""c""c", -5I & "c"c) 'PrintResult("26UI & #8:30:00 AM#", 26UI & #8:30:00 AM#) PrintResult("26UI & ""c""c", 26UI & "c"c) 'PrintResult("-7L & #8:30:00 AM#", -7L & #8:30:00 AM#) PrintResult("-7L & ""c""c", -7L & "c"c) 'PrintResult("28UL & #8:30:00 AM#", 28UL & #8:30:00 AM#) PrintResult("28UL & ""c""c", 28UL & "c"c) 'PrintResult("-9D & #8:30:00 AM#", -9D & #8:30:00 AM#) PrintResult("-9D & ""c""c", -9D & "c"c) 'PrintResult("10.0F & #8:30:00 AM#", 10.0F & #8:30:00 AM#) PrintResult("10.0F & ""c""c", 10.0F & "c"c) 'PrintResult("-11.0R & #8:30:00 AM#", -11.0R & #8:30:00 AM#) PrintResult("-11.0R & ""c""c", -11.0R & "c"c) 'PrintResult("""12"" & #8:30:00 AM#", "12" & #8:30:00 AM#) PrintResult("""12"" & ""c""c", "12" & "c"c) 'PrintResult("TypeCode.Double & #8:30:00 AM#", TypeCode.Double & #8:30:00 AM#) PrintResult("TypeCode.Double & ""c""c", TypeCode.Double & "c"c) PrintResult("#8:30:00 AM# Like False", #8:30:00 AM# Like False) PrintResult("#8:30:00 AM# Like True", #8:30:00 AM# Like True) PrintResult("#8:30:00 AM# Like System.SByte.MinValue", #8:30:00 AM# Like System.SByte.MinValue) PrintResult("#8:30:00 AM# Like System.Byte.MaxValue", #8:30:00 AM# Like System.Byte.MaxValue) PrintResult("#8:30:00 AM# Like -3S", #8:30:00 AM# Like -3S) PrintResult("#8:30:00 AM# Like 24US", #8:30:00 AM# Like 24US) PrintResult("#8:30:00 AM# Like -5I", #8:30:00 AM# Like -5I) PrintResult("#8:30:00 AM# Like 26UI", #8:30:00 AM# Like 26UI) PrintResult("#8:30:00 AM# Like -7L", #8:30:00 AM# Like -7L) PrintResult("#8:30:00 AM# Like 28UL", #8:30:00 AM# Like 28UL) PrintResult("#8:30:00 AM# Like -9D", #8:30:00 AM# Like -9D) PrintResult("#8:30:00 AM# Like 10.0F", #8:30:00 AM# Like 10.0F) PrintResult("#8:30:00 AM# Like -11.0R", #8:30:00 AM# Like -11.0R) PrintResult("#8:30:00 AM# Like ""12""", #8:30:00 AM# Like "12") PrintResult("#8:30:00 AM# Like TypeCode.Double", #8:30:00 AM# Like TypeCode.Double) PrintResult("#8:30:00 AM# Like #8:30:00 AM#", #8:30:00 AM# Like #8:30:00 AM#) PrintResult("#8:30:00 AM# Like ""c""c", #8:30:00 AM# Like "c"c) PrintResult("""c""c Like False", "c"c Like False) PrintResult("""c""c Like True", "c"c Like True) PrintResult("""c""c Like System.SByte.MinValue", "c"c Like System.SByte.MinValue) PrintResult("""c""c Like System.Byte.MaxValue", "c"c Like System.Byte.MaxValue) PrintResult("""c""c Like -3S", "c"c Like -3S) PrintResult("""c""c Like 24US", "c"c Like 24US) PrintResult("""c""c Like -5I", "c"c Like -5I) PrintResult("""c""c Like 26UI", "c"c Like 26UI) PrintResult("""c""c Like -7L", "c"c Like -7L) PrintResult("""c""c Like 28UL", "c"c Like 28UL) PrintResult("""c""c Like -9D", "c"c Like -9D) PrintResult("""c""c Like 10.0F", "c"c Like 10.0F) PrintResult("""c""c Like -11.0R", "c"c Like -11.0R) PrintResult("""c""c Like ""12""", "c"c Like "12") PrintResult("""c""c Like TypeCode.Double", "c"c Like TypeCode.Double) PrintResult("""c""c Like #8:30:00 AM#", "c"c Like #8:30:00 AM#) PrintResult("""c""c Like ""c""c", "c"c Like "c"c) PrintResult("False Like #8:30:00 AM#", False Like #8:30:00 AM#) PrintResult("False Like ""c""c", False Like "c"c) PrintResult("True Like #8:30:00 AM#", True Like #8:30:00 AM#) PrintResult("True Like ""c""c", True Like "c"c) PrintResult("System.SByte.MinValue Like #8:30:00 AM#", System.SByte.MinValue Like #8:30:00 AM#) PrintResult("System.SByte.MinValue Like ""c""c", System.SByte.MinValue Like "c"c) PrintResult("System.Byte.MaxValue Like #8:30:00 AM#", System.Byte.MaxValue Like #8:30:00 AM#) PrintResult("System.Byte.MaxValue Like ""c""c", System.Byte.MaxValue Like "c"c) PrintResult("-3S Like #8:30:00 AM#", -3S Like #8:30:00 AM#) PrintResult("-3S Like ""c""c", -3S Like "c"c) PrintResult("24US Like #8:30:00 AM#", 24US Like #8:30:00 AM#) PrintResult("24US Like ""c""c", 24US Like "c"c) PrintResult("-5I Like #8:30:00 AM#", -5I Like #8:30:00 AM#) PrintResult("-5I Like ""c""c", -5I Like "c"c) PrintResult("26UI Like #8:30:00 AM#", 26UI Like #8:30:00 AM#) PrintResult("26UI Like ""c""c", 26UI Like "c"c) PrintResult("-7L Like #8:30:00 AM#", -7L Like #8:30:00 AM#) PrintResult("-7L Like ""c""c", -7L Like "c"c) PrintResult("28UL Like #8:30:00 AM#", 28UL Like #8:30:00 AM#) PrintResult("28UL Like ""c""c", 28UL Like "c"c) PrintResult("-9D Like #8:30:00 AM#", -9D Like #8:30:00 AM#) PrintResult("-9D Like ""c""c", -9D Like "c"c) PrintResult("10.0F Like #8:30:00 AM#", 10.0F Like #8:30:00 AM#) PrintResult("10.0F Like ""c""c", 10.0F Like "c"c) PrintResult("-11.0R Like #8:30:00 AM#", -11.0R Like #8:30:00 AM#) PrintResult("-11.0R Like ""c""c", -11.0R Like "c"c) PrintResult("""12"" Like #8:30:00 AM#", "12" Like #8:30:00 AM#) PrintResult("""12"" Like ""c""c", "12" Like "c"c) PrintResult("TypeCode.Double Like #8:30:00 AM#", TypeCode.Double Like #8:30:00 AM#) PrintResult("TypeCode.Double Like ""c""c", TypeCode.Double Like "c"c) PrintResult("#8:30:00 AM# = #8:30:00 AM#", #8:30:00 AM# = #8:30:00 AM#) PrintResult("""c""c = ""12""", "c"c = "12") PrintResult("""c""c = ""c""c", "c"c = "c"c) PrintResult("""12"" = ""c""c", "12" = "c"c) PrintResult("#8:30:00 AM# <> #8:30:00 AM#", #8:30:00 AM# <> #8:30:00 AM#) PrintResult("""c""c <> ""12""", "c"c <> "12") PrintResult("""c""c <> ""c""c", "c"c <> "c"c) PrintResult("""12"" <> ""c""c", "12" <> "c"c) PrintResult("#8:30:00 AM# <= #8:30:00 AM#", #8:30:00 AM# <= #8:30:00 AM#) PrintResult("""c""c <= ""12""", "c"c <= "12") PrintResult("""c""c <= ""c""c", "c"c <= "c"c) PrintResult("""12"" <= ""c""c", "12" <= "c"c) PrintResult("#8:30:00 AM# >= #8:30:00 AM#", #8:30:00 AM# >= #8:30:00 AM#) PrintResult("""c""c >= ""12""", "c"c >= "12") PrintResult("""c""c >= ""c""c", "c"c >= "c"c) PrintResult("""12"" >= ""c""c", "12" >= "c"c) PrintResult("#8:30:00 AM# < #8:30:00 AM#", #8:30:00 AM# < #8:30:00 AM#) PrintResult("""c""c < ""12""", "c"c < "12") PrintResult("""c""c < ""c""c", "c"c < "c"c) PrintResult("""12"" < ""c""c", "12" < "c"c) PrintResult("#8:30:00 AM# > #8:30:00 AM#", #8:30:00 AM# > #8:30:00 AM#) PrintResult("""c""c > ""12""", "c"c > "12") PrintResult("""c""c > ""c""c", "c"c > "c"c) PrintResult("""12"" > ""c""c", "12" > "c"c) PrintResult("System.Byte.MaxValue - 24US", System.Byte.MaxValue - 24US) PrintResult("System.Byte.MaxValue - 26UI", System.Byte.MaxValue - 26UI) PrintResult("System.Byte.MaxValue - 28UL", System.Byte.MaxValue - 28UL) PrintResult("44US - 26UI", 44US - 26UI) PrintResult("44US - 28UL", 44US - 28UL) PrintResult("46UI - 28UL", 46UI - 28UL) PrintResult("System.Byte.MaxValue * (System.Byte.MaxValue \ System.Byte.MaxValue)", System.Byte.MaxValue * (System.Byte.MaxValue \ System.Byte.MaxValue)) PrintResult("#8:31:00 AM# = ""8:30:00 AM""", #8:31:00 AM# = "8:30:00 AM") PrintResult("""8:30:00 AM"" = #8:31:00 AM#", "8:30:00 AM" = #8:31:00 AM#) PrintResult("#8:31:00 AM# <> ""8:30:00 AM""", #8:31:00 AM# <> "8:30:00 AM") PrintResult("""8:30:00 AM"" <> #8:31:00 AM#", "8:30:00 AM" <> #8:31:00 AM#) PrintResult("#8:31:00 AM# <= ""8:30:00 AM""", #8:31:00 AM# <= "8:30:00 AM") PrintResult("""8:30:00 AM"" <= #8:31:00 AM#", "8:30:00 AM" <= #8:31:00 AM#) PrintResult("#8:31:00 AM# >= ""8:30:00 AM""", #8:31:00 AM# >= "8:30:00 AM") PrintResult("""8:30:00 AM"" >= #8:31:00 AM#", "8:30:00 AM" >= #8:31:00 AM#) PrintResult("#8:31:00 AM# < ""8:30:00 AM""", #8:31:00 AM# < "8:30:00 AM") PrintResult("""8:30:00 AM"" < #8:31:00 AM#", "8:30:00 AM" < #8:31:00 AM#) PrintResult("#8:31:00 AM# > ""8:30:00 AM""", #8:31:00 AM# > "8:30:00 AM") PrintResult("""8:30:00 AM"" > #8:31:00 AM#", "8:30:00 AM" > #8:31:00 AM#) PrintResult("-5I + Nothing", -5I + Nothing) PrintResult("""12"" + Nothing", "12" + Nothing) PrintResult("""12"" + DBNull.Value", "12" + DBNull.Value) PrintResult("Nothing + Nothing", Nothing + Nothing) PrintResult("Nothing + -5I", Nothing + -5I) PrintResult("Nothing + ""12""", Nothing + "12") PrintResult("DBNull.Value + ""12""", DBNull.Value + "12") PrintResult("-5I - Nothing", -5I - Nothing) PrintResult("""12"" - Nothing", "12" - Nothing) PrintResult("Nothing - Nothing", Nothing - Nothing) PrintResult("Nothing - -5I", Nothing - -5I) PrintResult("Nothing - ""12""", Nothing - "12") PrintResult("-5I * Nothing", -5I * Nothing) PrintResult("""12"" * Nothing", "12" * Nothing) PrintResult("Nothing * Nothing", Nothing * Nothing) PrintResult("Nothing * -5I", Nothing * -5I) PrintResult("Nothing * ""12""", Nothing * "12") PrintResult("-5I / Nothing", -5I / Nothing) PrintResult("""12"" / Nothing", "12" / Nothing) PrintResult("Nothing / Nothing", Nothing / Nothing) PrintResult("Nothing / -5I", Nothing / -5I) PrintResult("Nothing / ""12""", Nothing / "12") PrintResult("Nothing \ -5I", Nothing \ -5I) PrintResult("Nothing \ ""12""", Nothing \ "12") PrintResult("""12"" Mod Nothing", "12" Mod Nothing) PrintResult("Nothing Mod -5I", Nothing Mod -5I) PrintResult("Nothing Mod ""12""", Nothing Mod "12") PrintResult("-5I ^ Nothing", -5I ^ Nothing) PrintResult("""12"" ^ Nothing", "12" ^ Nothing) PrintResult("Nothing ^ Nothing", Nothing ^ Nothing) PrintResult("Nothing ^ -5I", Nothing ^ -5I) PrintResult("Nothing ^ ""12""", Nothing ^ "12") PrintResult("-5I << Nothing", -5I << Nothing) PrintResult("""12"" << Nothing", "12" << Nothing) PrintResult("Nothing << Nothing", Nothing << Nothing) PrintResult("Nothing << -5I", Nothing << -5I) PrintResult("Nothing << ""12""", Nothing << "12") PrintResult("-5I >> Nothing", -5I >> Nothing) PrintResult("""12"" >> Nothing", "12" >> Nothing) PrintResult("Nothing >> Nothing", Nothing >> Nothing) PrintResult("Nothing >> -5I", Nothing >> -5I) PrintResult("Nothing >> ""12""", Nothing >> "12") PrintResult("-5I OrElse Nothing", -5I OrElse Nothing) PrintResult("""12"" OrElse Nothing", "12" OrElse Nothing) PrintResult("Nothing OrElse Nothing", Nothing OrElse Nothing) PrintResult("Nothing OrElse -5I", Nothing OrElse -5I) PrintResult("-5I AndAlso Nothing", -5I AndAlso Nothing) PrintResult("Nothing AndAlso Nothing", Nothing AndAlso Nothing) PrintResult("Nothing AndAlso -5I", Nothing AndAlso -5I) PrintResult("-5I & Nothing", -5I & Nothing) PrintResult("-5I & DBNull.Value", -5I & DBNull.Value) PrintResult("""12"" & Nothing", "12" & Nothing) PrintResult("""12"" & DBNull.Value", "12" & DBNull.Value) PrintResult("Nothing & Nothing", Nothing & Nothing) PrintResult("Nothing & DBNull.Value", Nothing & DBNull.Value) PrintResult("DBNull.Value & Nothing", DBNull.Value & Nothing) PrintResult("Nothing & -5I", Nothing & -5I) PrintResult("Nothing & ""12""", Nothing & "12") PrintResult("DBNull.Value & -5I", DBNull.Value & -5I) PrintResult("DBNull.Value & ""12""", DBNull.Value & "12") PrintResult("-5I Like Nothing", -5I Like Nothing) PrintResult("""12"" Like Nothing", "12" Like Nothing) PrintResult("Nothing Like Nothing", Nothing Like Nothing) PrintResult("Nothing Like -5I", Nothing Like -5I) PrintResult("Nothing Like ""12""", Nothing Like "12") PrintResult("-5I = Nothing", -5I = Nothing) PrintResult("""12"" = Nothing", "12" = Nothing) PrintResult("Nothing = Nothing", Nothing = Nothing) PrintResult("Nothing = -5I", Nothing = -5I) PrintResult("Nothing = ""12""", Nothing = "12") PrintResult("-5I <> Nothing", -5I <> Nothing) PrintResult("""12"" <> Nothing", "12" <> Nothing) PrintResult("Nothing <> Nothing", Nothing <> Nothing) PrintResult("Nothing <> -5I", Nothing <> -5I) PrintResult("Nothing <> ""12""", Nothing <> "12") PrintResult("-5I <= Nothing", -5I <= Nothing) PrintResult("""12"" <= Nothing", "12" <= Nothing) PrintResult("Nothing <= Nothing", Nothing <= Nothing) PrintResult("Nothing <= -5I", Nothing <= -5I) PrintResult("Nothing <= ""12""", Nothing <= "12") PrintResult("-5I >= Nothing", -5I >= Nothing) PrintResult("""12"" >= Nothing", "12" >= Nothing) PrintResult("Nothing >= Nothing", Nothing >= Nothing) PrintResult("Nothing >= -5I", Nothing >= -5I) PrintResult("Nothing >= ""12""", Nothing >= "12") PrintResult("-5I < Nothing", -5I < Nothing) PrintResult("""12"" < Nothing", "12" < Nothing) PrintResult("Nothing < Nothing", Nothing < Nothing) PrintResult("Nothing < -5I", Nothing < -5I) PrintResult("Nothing < ""12""", Nothing < "12") PrintResult("-5I > Nothing", -5I > Nothing) PrintResult("""12"" > Nothing", "12" > Nothing) PrintResult("Nothing > Nothing", Nothing > Nothing) PrintResult("Nothing > -5I", Nothing > -5I) PrintResult("Nothing > ""12""", Nothing > "12") PrintResult("-5I Xor Nothing", -5I Xor Nothing) PrintResult("""12"" Xor Nothing", "12" Xor Nothing) PrintResult("Nothing Xor Nothing", Nothing Xor Nothing) PrintResult("Nothing Xor -5I", Nothing Xor -5I) PrintResult("Nothing Xor ""12""", Nothing Xor "12") PrintResult("-5I Or Nothing", -5I Or Nothing) PrintResult("""12"" Or Nothing", "12" Or Nothing) PrintResult("Nothing Or Nothing", Nothing Or Nothing) PrintResult("Nothing Or -5I", Nothing Or -5I) PrintResult("Nothing Or ""12""", Nothing Or "12") PrintResult("-5I And Nothing", -5I And Nothing) PrintResult("""12"" And Nothing", "12" And Nothing) PrintResult("Nothing And Nothing", Nothing And Nothing) PrintResult("Nothing And -5I", Nothing And -5I) PrintResult("Nothing And ""12""", Nothing And "12") PrintResult("2I / 0", 2I / 0) PrintResult("1.5F / 0", 1.5F / 0) PrintResult("2.5R / 0", 2.5R / 0) PrintResult("1.5F Mod 0", 1.5F Mod 0) PrintResult("2.5R Mod 0", 2.5R Mod 0) PrintResult("2I / 0", 2I / Nothing) PrintResult("1.5F / 0", 1.5F / Nothing) PrintResult("2.5R / 0", 2.5R / Nothing) PrintResult("1.5F Mod 0", 1.5F Mod Nothing) PrintResult("2.5R Mod 0", 2.5R Mod Nothing) PrintResult("System.Single.MinValue - 1.0F", System.Single.MinValue - 1.0F) PrintResult("System.Double.MinValue - 1.0R", System.Double.MinValue - 1.0R) PrintResult("System.Single.MaxValue + 1.0F", System.Single.MaxValue + 1.0F) PrintResult("System.Double.MaxValue + 1.0R", System.Double.MaxValue + 1.0R) PrintResult("1.0F ^ System.Single.NegativeInfinity", 1.0F ^ System.Single.NegativeInfinity) PrintResult("1.0F ^ System.Single.PositiveInfinity", 1.0F ^ System.Single.PositiveInfinity) PrintResult("1.0R ^ System.Double.NegativeInfinity", 1.0R ^ System.Double.NegativeInfinity) PrintResult("1.0R ^ System.Double.PositiveInfinity", 1.0R ^ System.Double.PositiveInfinity) PrintResult("-1.0F ^ System.Single.NegativeInfinity", -1.0F ^ System.Single.NegativeInfinity) PrintResult("-1.0F ^ System.Single.PositiveInfinity", -1.0F ^ System.Single.PositiveInfinity) PrintResult("-1.0R ^ System.Double.NegativeInfinity", -1.0R ^ System.Double.NegativeInfinity) PrintResult("-1.0R ^ System.Double.PositiveInfinity", -1.0R ^ System.Double.PositiveInfinity) PrintResult("2.0F ^ System.Single.NaN", 2.0F ^ System.Single.NaN) PrintResult("2.0R ^ System.Double.NaN", 2.0R ^ System.Double.NaN) PrintResult("(-1.0F) ^ System.Single.NegativeInfinity", (-1.0F) ^ System.Single.NegativeInfinity) PrintResult("(-1.0F) ^ System.Single.PositiveInfinity", (-1.0F) ^ System.Single.PositiveInfinity) PrintResult("(-1.0F) ^ System.Double.NegativeInfinity", (-1.0F) ^ System.Double.NegativeInfinity) PrintResult("(-1.0F) ^ System.Double.PositiveInfinity", (-1.0F) ^ System.Double.PositiveInfinity) End Sub End Module
abock/roslyn
src/Compilers/VisualBasic/Test/Semantic/Semantics/BinaryOperatorsTestSource5.vb
Visual Basic
mit
327,291
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Microsoft.CodeAnalysis.VisualBasic.UnitTests.Emit Imports Roslyn.Test.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests Public Class CodeGenUsingStatement Inherits BasicTestBase ' Take the ByRef parameter as object <Fact()> Public Sub ParameterAsResource() Dim source = <compilation> <file name="a.vb"> Class C1 Shared Sub main() Dim x As MyManagedClass = New MyManagedClass() foo(x) End Sub Private Shared Sub foo(ByRef x1 As MyManagedClass) Using x1 x1 = New MyManagedClass() End Using End Sub End Class Class MyManagedClass Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source, expectedOutput:=<![CDATA[ Dispose ]]>).VerifyIL("C1.foo", <![CDATA[ { // Code size 23 (0x17) .maxstack 2 .locals init (MyManagedClass V_0) IL_0000: ldarg.0 IL_0001: ldind.ref IL_0002: stloc.0 .try { IL_0003: ldarg.0 IL_0004: newobj "Sub MyManagedClass..ctor()" IL_0009: stind.ref IL_000a: leave.s IL_0016 } finally { IL_000c: ldloc.0 IL_000d: brfalse.s IL_0015 IL_000f: ldloc.0 IL_0010: callvirt "Sub System.IDisposable.Dispose()" IL_0015: endfinally } IL_0016: ret } ]]>) End Sub ' Take the function call as object <Fact()> Public Sub FunctionCallAsResource() Dim source = <compilation> <file name="a.vb"> Class MyManagedClass Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class Class C1 Sub foo() Using N() End Using End Sub Shared Sub main() End Sub Function N() As MyManagedClass Return Nothing End Function End Class </file> </compilation> CompileAndVerify(source).VerifyIL("C1.foo", <![CDATA[ { // Code size 20 (0x14) .maxstack 1 .locals init (MyManagedClass V_0) IL_0000: ldarg.0 IL_0001: call "Function C1.N() As MyManagedClass" IL_0006: stloc.0 .try { IL_0007: leave.s IL_0013 } finally { IL_0009: ldloc.0 IL_000a: brfalse.s IL_0012 IL_000c: ldloc.0 IL_000d: callvirt "Sub System.IDisposable.Dispose()" IL_0012: endfinally } IL_0013: ret } ]]>) End Sub <Fact(), WorkItem(10570, "DevDiv_Projects/Roslyn")> Public Sub UsingNothing() Dim source = <compilation> <file name="a.vb"> Option Infer On Option Strict Off Class C1 Sub foo() Using Nothing End Using End Sub Shared Sub main() End Sub End Class </file> </compilation> CompileAndVerify(source).VerifyIL("C1.foo", <![CDATA[ { // Code size 20 (0x14) .maxstack 1 .locals init (Object V_0) IL_0000: ldnull IL_0001: stloc.0 .try { IL_0002: leave.s IL_0013 } finally { IL_0004: ldloc.0 IL_0005: brfalse.s IL_0012 IL_0007: ldloc.0 IL_0008: castclass "System.IDisposable" IL_000d: callvirt "Sub System.IDisposable.Dispose()" IL_0012: endfinally } IL_0013: ret }]]>) End Sub ' Implement Dispose with another Name <Fact()> Public Sub ImplementDisposeWithAnotherName() Dim source = <compilation> <file name="a.vb"> Option Infer On Option Strict Off Imports System Class C1 Shared Sub Main() Dim mnObj As New MyManagedClass Using mnObj End Using End Sub End Class Class MyManagedClass Implements IDisposable Sub Dispose() Console.Write("Dispose") End Sub Public Sub RealDispose() Implements System.IDisposable.Dispose Console.Write("RealDispose") End Sub End Class </file> </compilation> CompileAndVerify(source, "RealDispose").VerifyIL("C1.Main", <![CDATA[ { // Code size 19 (0x13) .maxstack 1 .locals init (MyManagedClass V_0) IL_0000: newobj "Sub MyManagedClass..ctor()" IL_0005: stloc.0 .try { IL_0006: leave.s IL_0012 } finally { IL_0008: ldloc.0 IL_0009: brfalse.s IL_0011 IL_000b: ldloc.0 IL_000c: callvirt "Sub System.IDisposable.Dispose()" IL_0011: endfinally } IL_0012: ret } ]]>) End Sub ' Using different kinds of values, function returns, property values, statics etc <Fact()> Public Sub DifferentKindOfValuesAsResource() Dim source = <compilation> <file name="a.vb"> Imports System Class cls1 Inherits Exception Implements IDisposable Public Sub Dispose() Implements System.IDisposable.Dispose Console.WriteLine("Dispose") End Sub Sub New() End Sub Sub New(ByRef x As cls1) x = Me End Sub Sub foo() Using Me End Using Dim m_x As New cls_member Using m_x.m End Using Dim p_x As New cls_prop Using p_x.P1 End Using Dim f_x As New cls_fun Using f_x.F1 End Using Dim c As cls1 Using New cls1(c) End Using End Sub Function goo() As cls1 goo = New cls1 Using goo End Using End Function Shared Sub Main() Dim x = New cls1() x.foo() End Sub End Class Class cls_member Public m As New cls1 End Class Class cls_prop Private o As New cls1 Public Property P1() As cls1 Get Return o End Get Set(ByVal Value As cls1) End Set End Property End Class Class cls_fun Private o As New cls1 Public Function F1() As cls1 Return o End Function End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose Dispose Dispose Dispose]]>) End Sub ' Nested using <Fact()> Public Sub NestedUsing() Dim source = <compilation> <file name="a.vb"> Option Infer On Option Strict Off Imports System Class cls1 Implements IDisposable Public disposed As Boolean = False Public Sub Dispose() Implements System.IDisposable.Dispose disposed = True End Sub End Class Class C1 Shared Sub Main() Dim o1 As New cls1 Using o1 Using o1 End Using End Using End Sub End Class </file> </compilation> CompileAndVerify(source).VerifyIL("C1.Main", <![CDATA[ { // Code size 33 (0x21) .maxstack 1 .locals init (cls1 V_0, //o1 cls1 V_1, cls1 V_2) IL_0000: newobj "Sub cls1..ctor()" IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: stloc.1 .try { IL_0008: ldloc.0 IL_0009: stloc.2 .try { IL_000a: leave.s IL_0020 } finally { IL_000c: ldloc.2 IL_000d: brfalse.s IL_0015 IL_000f: ldloc.2 IL_0010: callvirt "Sub System.IDisposable.Dispose()" IL_0015: endfinally } } finally { IL_0016: ldloc.1 IL_0017: brfalse.s IL_001f IL_0019: ldloc.1 IL_001a: callvirt "Sub System.IDisposable.Dispose()" IL_001f: endfinally } IL_0020: ret }]]>) End Sub ' Goto in using <Fact()> Public Sub JumpInUsing() Dim source = <compilation> <file name="a.vb"> Imports System Module Program Sub Main(args As String()) Dim obj = New s1() Using obj GoTo label2 label2: GoTo label2 End Using End Sub End Module Structure s1 Implements IDisposable Sub Dispose() Implements IDisposable.Dispose End Sub End Structure </file> </compilation> CompileAndVerify(source).VerifyIL("Program.Main", <![CDATA[ { // Code size 26 (0x1a) .maxstack 1 .locals init (s1 V_0) IL_0000: ldloca.s V_0 IL_0002: initobj "s1" IL_0008: ldloc.0 IL_0009: stloc.0 .try { IL_000a: br.s IL_000a } finally { IL_000c: ldloca.s V_0 IL_000e: constrained. "s1" IL_0014: callvirt "Sub System.IDisposable.Dispose()" IL_0019: endfinally } } ]]>) End Sub ' Dispose() not called if the object(Reference type) not created <Fact()> Public Sub DisplayNotCalledIfObjectNotCreated_Class_Outside() Dim source = <compilation> <file name="a.vb"> Imports System Class Program Shared mnObj As MyManagedClass Shared Sub Main(args As String()) Dim x = New Program() Dim obj1, obj2 As MyManagedClass x.foo(obj1, obj2) End Sub Sub foo(ByVal x As MyManagedClass, ByRef y As MyManagedClass) Dim mnObj1 As MyManagedClass Using mnObj mnObj = New MyManagedClass() End Using mnObj.Display() Using mnObj1 mnObj1 = New MyManagedClass() End Using mnObj1.Display() Using x x = Nothing End Using Using y y = Nothing End Using End Sub End Class Class MyManagedClass Implements IDisposable Dim flag = 1 Sub Dispose() Implements IDisposable.Dispose flag = 2 Console.WriteLine("Dispose") End Sub Sub Display() Console.WriteLine(flag) End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[1 1]]>) End Sub <Fact()> Public Sub DisplayNotCalledIfObjectNotCreated_Class_Inside() Dim source = <compilation> <file name="a.vb"> Imports System Class Program Shared mnObj As MyManagedClass Shared Sub Main(args As String()) Dim x = New Program() x.foo() End Sub Sub foo() Using mnObj As MyManagedClass = Nothing End Using End Sub End Class Class MyManagedClass Implements IDisposable Sub Dispose() Implements IDisposable.Dispose Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source).VerifyIL("Program.foo", <![CDATA[ { // Code size 15 (0xf) .maxstack 1 .locals init (MyManagedClass V_0) //mnObj IL_0000: ldnull IL_0001: stloc.0 .try { IL_0002: leave.s IL_000e } finally { IL_0004: ldloc.0 IL_0005: brfalse.s IL_000d IL_0007: ldloc.0 IL_0008: callvirt "Sub System.IDisposable.Dispose()" IL_000d: endfinally } IL_000e: ret }]]>) End Sub ' Dispose() not called if the object(Reference type) not created <Fact()> Public Sub DisplayNotCalledIfObjectNotCreated_Structure_Outside() Dim source = <compilation> <file name="a.vb"> Imports System Class Program Shared mnObj As MyManagedClass Shared Sub Main(args As String()) Dim x = New Program() Dim obj1, obj2 As MyManagedClass x.foo(obj1, obj2) End Sub Sub foo(ByVal x As MyManagedClass, ByRef y As MyManagedClass) Dim mnObj1 As MyManagedClass Using mnObj mnObj = New MyManagedClass() End Using Using mnObj1 mnObj1 = New MyManagedClass() End Using Using x x = Nothing End Using Using y y = Nothing End Using End Sub End Class Structure MyManagedClass Implements IDisposable Sub Dispose() Implements IDisposable.Dispose Console.WriteLine("Dispose") End Sub End Structure </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose Dispose Dispose]]>) End Sub <Fact()> Public Sub DisplayNotCalledIfObjectNotCreated_Structure_Inside() Dim source = <compilation> <file name="a.vb"> Option Infer on Imports System Class Program Shared mnObj As MyManagedClass Shared Sub Main(args As String()) Dim x = New Program() x.foo() End Sub Sub foo() Using mnObj As MyManagedClass = Nothing End Using End Sub End Class Structure MyManagedClass Implements IDisposable Sub Dispose() Implements IDisposable.Dispose Console.WriteLine("Dispose") End Sub End Structure </file> </compilation> CompileAndVerify(source, "Dispose").VerifyIL("Program.foo", <![CDATA[ { // Code size 25 (0x19) .maxstack 1 .locals init (MyManagedClass V_0) //mnObj IL_0000: ldloca.s V_0 IL_0002: initobj "MyManagedClass" .try { IL_0008: leave.s IL_0018 } finally { IL_000a: ldloca.s V_0 IL_000c: constrained. "MyManagedClass" IL_0012: callvirt "Sub System.IDisposable.Dispose()" IL_0017: endfinally } IL_0018: ret } ]]>) End Sub ' The used variable is nulled-out in the using block <Fact()> Public Sub VarNulledInUsing_Class() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared mnObj1 As MyManagedClass = New MyManagedClass() Shared Sub Main(args As String()) Dim x = New Program() Dim obj1 = New MyManagedClass(), obj2 = New MyManagedClass() x.foo(obj1, obj2) End Sub Sub foo(ByVal x As MyManagedClass, ByRef y As MyManagedClass) Dim mnObj2 As MyManagedClass = New MyManagedClass Using mnObj1 mnObj1 = Nothing End Using Using mnObj2 mnObj2 = Nothing End Using Using x x = Nothing End Using Using y y = Nothing End Using End Sub End Class Class MyManagedClass Implements IDisposable Sub Dispose() Implements IDisposable.Dispose Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose Dispose Dispose]]>) End Sub ' The used variable is nulled-out in the using block <Fact()> Public Sub VarNulledInUsing_Structure() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared mnObj1 As MyManagedClass = New MyManagedClass() Shared Sub Main(args As String()) Dim x = New Program() Dim obj1 = New MyManagedClass(), obj2 = New MyManagedClass() x.foo(obj1, obj2) End Sub Sub foo(ByVal x As MyManagedClass, ByRef y As MyManagedClass) Dim mnObj2 As MyManagedClass = New MyManagedClass Using mnObj1 mnObj1 = Nothing End Using Using mnObj2 mnObj2 = Nothing End Using Using x x = Nothing End Using Using y y = Nothing End Using End Sub End Class Structure MyManagedClass Implements IDisposable Sub Dispose() Implements IDisposable.Dispose Console.WriteLine("Dispose") End Sub End Structure </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose Dispose Dispose]]>) End Sub ' Dispose() called before leave the block <Fact()> Public Sub JumpOutFromUsing() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared Sub Main(args As String()) Using x = New MyManagedClass() GoTo label1 End Using label1: End Sub End Class Class MyManagedClass Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 19 (0x13) .maxstack 1 .locals init (MyManagedClass V_0) //x IL_0000: newobj "Sub MyManagedClass..ctor()" IL_0005: stloc.0 .try { IL_0006: leave.s IL_0012 } finally { IL_0008: ldloc.0 IL_0009: brfalse.s IL_0011 IL_000b: ldloc.0 IL_000c: callvirt "Sub System.IDisposable.Dispose()" IL_0011: endfinally } IL_0012: ret }]]>) End Sub <Fact()> Public Sub JumpOutFromUsing_1() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared Sub Main(args As String()) Dim Obj1 = New MyManagedClass() For x As Integer = 1 To 10 Using Obj1 Exit For End Using Next Try Using Obj1 Dim i As Integer = i \ i End Using Catch ex As Exception End Try goo(Obj1) factorial(4) End Sub Shared Function factorial(ByVal x As Integer) As Integer Dim o As New MyManagedClass Using o If x = 0 Then factorial = 1 Else factorial = x * factorial(x - 1) * x End If End Using End Function Shared Sub goo(ByVal o As MyManagedClass) Using o Exit Sub End Using End Sub End Class Class MyManagedClass Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose Dispose Dispose Dispose Dispose Dispose Dispose]]>) End Sub ' Disposing the var inside the Using <Fact()> Public Sub CallDisposeInsideUsing() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared Sub Main(args As String()) Dim obj As New MyManagedClass Using obj CType(obj, IDisposable).Dispose() End Using End Sub End Class Structure MyManagedClass Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Structure </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 43 (0x2b) .maxstack 1 .locals init (MyManagedClass V_0, //obj MyManagedClass V_1) IL_0000: ldloca.s V_0 IL_0002: initobj "MyManagedClass" IL_0008: ldloc.0 IL_0009: stloc.1 .try { IL_000a: ldloc.0 IL_000b: box "MyManagedClass" IL_0010: castclass "System.IDisposable" IL_0015: callvirt "Sub System.IDisposable.Dispose()" IL_001a: leave.s IL_002a } finally { IL_001c: ldloca.s V_1 IL_001e: constrained. "MyManagedClass" IL_0024: callvirt "Sub System.IDisposable.Dispose()" IL_0029: endfinally } IL_002a: ret } ]]>) End Sub ' Multiple object declared inside using with different type <Fact()> Public Sub MultipleResourceWithDifferentType() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared Sub Main() Using x = New MyManagedClass(), y = New MyManagedClass1() End Using End Sub End Class Class MyManagedClass Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class Structure MyManagedClass1 Implements System.IDisposable Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose1") End Sub End Structure </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose1 Dispose]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 41 (0x29) .maxstack 1 .locals init (MyManagedClass V_0, //x MyManagedClass1 V_1) //y IL_0000: newobj "Sub MyManagedClass..ctor()" IL_0005: stloc.0 .try { IL_0006: ldloca.s V_1 IL_0008: initobj "MyManagedClass1" .try { IL_000e: leave.s IL_0028 } finally { IL_0010: ldloca.s V_1 IL_0012: constrained. "MyManagedClass1" IL_0018: callvirt "Sub System.IDisposable.Dispose()" IL_001d: endfinally } } finally { IL_001e: ldloc.0 IL_001f: brfalse.s IL_0027 IL_0021: ldloc.0 IL_0022: callvirt "Sub System.IDisposable.Dispose()" IL_0027: endfinally } IL_0028: ret } ]]>) End Sub <Fact()> Public Sub MutableStructCallAndUsing1() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared Sub Main() Using y = New MyManagedStruct(42) y.mutate(123) End Using End Sub End Class Structure MyManagedStruct Implements System.IDisposable Private num As Integer Sub mutate(x As Integer) num = x End Sub Sub New(x As Integer) num = x End Sub Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose_" &amp; num) End Sub End Structure </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose_42]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 37 (0x25) .maxstack 2 .locals init (MyManagedStruct V_0, //y MyManagedStruct V_1) IL_0000: ldloca.s V_0 IL_0002: ldc.i4.s 42 IL_0004: call "Sub MyManagedStruct..ctor(Integer)" .try { IL_0009: ldloc.0 IL_000a: stloc.1 IL_000b: ldloca.s V_1 IL_000d: ldc.i4.s 123 IL_000f: call "Sub MyManagedStruct.mutate(Integer)" IL_0014: leave.s IL_0024 } finally { IL_0016: ldloca.s V_0 IL_0018: constrained. "MyManagedStruct" IL_001e: callvirt "Sub System.IDisposable.Dispose()" IL_0023: endfinally } IL_0024: ret } ]]>) End Sub <Fact()> Public Sub MutableStructCallAndUsing2() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Class Program Shared Sub Main() Using y = New MyManagedStruct(42) y.mutate(123) y.n.n.mutate(456) End Using End Sub End Class Structure MyManagedStruct Implements System.IDisposable Structure Nested Public n As Nested1 Structure Nested1 Public num As Integer Sub mutate(x As Integer) num = x End Sub End Structure End Structure Public n As Nested Sub mutate(x As Integer) n.n.num = x End Sub Sub New(x As Integer) n.n.num = x End Sub Sub Dispose() Implements System.IDisposable.Dispose System.Console.WriteLine("Dispose_" &amp; n.n.num) End Sub End Structure </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose_42]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 61 (0x3d) .maxstack 2 .locals init (MyManagedStruct V_0, //y MyManagedStruct V_1) IL_0000: ldloca.s V_0 IL_0002: ldc.i4.s 42 IL_0004: call "Sub MyManagedStruct..ctor(Integer)" .try { IL_0009: ldloc.0 IL_000a: stloc.1 IL_000b: ldloca.s V_1 IL_000d: ldc.i4.s 123 IL_000f: call "Sub MyManagedStruct.mutate(Integer)" IL_0014: ldloc.0 IL_0015: stloc.1 IL_0016: ldloca.s V_1 IL_0018: ldflda "MyManagedStruct.n As MyManagedStruct.Nested" IL_001d: ldflda "MyManagedStruct.Nested.n As MyManagedStruct.Nested.Nested1" IL_0022: ldc.i4 0x1c8 IL_0027: call "Sub MyManagedStruct.Nested.Nested1.mutate(Integer)" IL_002c: leave.s IL_003c } finally { IL_002e: ldloca.s V_0 IL_0030: constrained. "MyManagedStruct" IL_0036: callvirt "Sub System.IDisposable.Dispose()" IL_003b: endfinally } IL_003c: ret } ]]>) End Sub <Fact()> Public Sub Assignment_2() Dim source = <compilation> <file name="a.vb"> Option Infer On Option Strict On Imports System Class Program Shared Sub Main() Dim x As MyManagedClass = Nothing Using x x = MyManagedClass.Acquire() End Using End Sub End Class Public Class MyManagedClass Implements System.IDisposable Public Sub Dispose() Implements System.IDisposable.Dispose Console.Write("Dispose") End Sub Public Shared Function Acquire() As MyManagedClass Return New MyManagedClass() End Function End Class </file> </compilation> CompileAndVerify(source).VerifyIL("Program.Main", <![CDATA[ { // Code size 21 (0x15) .maxstack 1 .locals init (MyManagedClass V_0) IL_0000: ldnull IL_0001: stloc.0 .try { IL_0002: call "Function MyManagedClass.Acquire() As MyManagedClass" IL_0007: pop IL_0008: leave.s IL_0014 } finally { IL_000a: ldloc.0 IL_000b: brfalse.s IL_0013 IL_000d: ldloc.0 IL_000e: callvirt "Sub System.IDisposable.Dispose()" IL_0013: endfinally } IL_0014: ret } ]]>) End Sub 'Put the using around the try <Fact()> Public Sub UsingAroundTry() Dim source = <compilation> <file name="a.vb"> Imports System Class Program Public Shared Sub Main() Dim x As New MyManagedClass() Using x Try System.Console.WriteLine("Try") Finally x = Nothing System.Console.WriteLine("Catch") End Try End Using End Sub End Class Public Class MyManagedClass Implements IDisposable Public Sub Dispose() Implements IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Try Catch Dispose]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 40 (0x28) .maxstack 1 .locals init (MyManagedClass V_0) IL_0000: newobj "Sub MyManagedClass..ctor()" IL_0005: stloc.0 .try { .try { IL_0006: ldstr "Try" IL_000b: call "Sub System.Console.WriteLine(String)" IL_0010: leave.s IL_0027 } finally { IL_0012: ldstr "Catch" IL_0017: call "Sub System.Console.WriteLine(String)" IL_001c: endfinally } } finally { IL_001d: ldloc.0 IL_001e: brfalse.s IL_0026 IL_0020: ldloc.0 IL_0021: callvirt "Sub System.IDisposable.Dispose()" IL_0026: endfinally } IL_0027: ret }]]>) End Sub 'Put the using in the try <Fact()> Public Sub UsingInTry() Dim source = <compilation> <file name="a.vb"> Imports System Class Program Public Shared Sub Main() Dim x As New MyManagedClass() Try System.Console.WriteLine("Try") Using x Throw New Exception() End Using Catch System.Console.WriteLine("Catch") x = Nothing End Try End Sub End Class Public Class MyManagedClass Implements IDisposable Public Sub Dispose() Implements IDisposable.Dispose System.Console.WriteLine("Dispose") End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Try Dispose Catch]]>).VerifyIL("Program.Main", <![CDATA[ { // Code size 59 (0x3b) .maxstack 1 .locals init (MyManagedClass V_0, //x MyManagedClass V_1) IL_0000: newobj "Sub MyManagedClass..ctor()" IL_0005: stloc.0 .try { IL_0006: ldstr "Try" IL_000b: call "Sub System.Console.WriteLine(String)" IL_0010: ldloc.0 IL_0011: stloc.1 .try { IL_0012: newobj "Sub System.Exception..ctor()" IL_0017: throw } finally { IL_0018: ldloc.1 IL_0019: brfalse.s IL_0021 IL_001b: ldloc.1 IL_001c: callvirt "Sub System.IDisposable.Dispose()" IL_0021: endfinally } } catch System.Exception { IL_0022: call "Sub Microsoft.VisualBasic.CompilerServices.ProjectData.SetProjectError(System.Exception)" IL_0027: ldstr "Catch" IL_002c: call "Sub System.Console.WriteLine(String)" IL_0031: ldnull IL_0032: stloc.0 IL_0033: call "Sub Microsoft.VisualBasic.CompilerServices.ProjectData.ClearProjectError()" IL_0038: leave.s IL_003a } IL_003a: ret }]]>) End Sub ' Using inside SyncLock <Fact()> Public Sub UsingInsideSyncLock() Dim source = <compilation> <file name="a.vb"> Imports System Class cls1 Implements IDisposable Public disposed As Boolean = False Public Sub Dispose() Implements System.IDisposable.Dispose disposed = True Console.WriteLine("Dispose") End Sub End Class Class Program Shared Sub main() Dim o1 As New cls1 SyncLock New Object Using o1 End Using End SyncLock Dim o2 As New cls1 SyncLock New Object Using o2 End Using End SyncLock Dim o3 As New cls1 Try SyncLock New Object Using o3 Throw New Exception End Using End SyncLock Catch End Try End Sub End Class </file> </compilation> CompileAndVerify(source, <![CDATA[Dispose Dispose Dispose]]>) End Sub <Fact()> Public Sub Regress574470() Dim source = <compilation> <file name="a.vb"> Option Infer On Imports System Structure strd Implements IDisposable Public disposed As Integer Public Shared disposed_s As Integer Public Sub Dispose() Implements System.IDisposable.Dispose disposed += 1 disposed_s += 1 End Sub End Structure Friend Module Module1 Sub Main() strd.disposed_s = 0 Dim o2 As Object = New strd Using o2 Using o2 End Using End Using Console.Write(o2.disposed) Console.Write(o2.disposed_s) End Sub End Module </file> </compilation> CompileAndVerify(source, <![CDATA[22]]>).VerifyIL("Module1.Main", <![CDATA[ { // Code size 120 (0x78) .maxstack 7 .locals init (Object V_0, //o2 strd V_1, Object V_2, Object V_3) IL_0000: ldc.i4.0 IL_0001: stsfld "strd.disposed_s As Integer" IL_0006: ldloca.s V_1 IL_0008: initobj "strd" IL_000e: ldloc.1 IL_000f: box "strd" IL_0014: stloc.0 IL_0015: ldloc.0 IL_0016: stloc.2 .try { IL_0017: ldloc.0 IL_0018: stloc.3 .try { IL_0019: leave.s IL_0039 } finally { IL_001b: ldloc.3 IL_001c: brfalse.s IL_0029 IL_001e: ldloc.3 IL_001f: castclass "System.IDisposable" IL_0024: callvirt "Sub System.IDisposable.Dispose()" IL_0029: endfinally } } finally { IL_002a: ldloc.2 IL_002b: brfalse.s IL_0038 IL_002d: ldloc.2 IL_002e: castclass "System.IDisposable" IL_0033: callvirt "Sub System.IDisposable.Dispose()" IL_0038: endfinally } IL_0039: ldloc.0 IL_003a: ldnull IL_003b: ldstr "disposed" IL_0040: ldc.i4.0 IL_0041: newarr "Object" IL_0046: ldnull IL_0047: ldnull IL_0048: ldnull IL_0049: call "Function Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object, System.Type, String, Object(), String(), System.Type(), Boolean()) As Object" IL_004e: call "Function System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Object) As Object" IL_0053: call "Sub System.Console.Write(Object)" IL_0058: ldloc.0 IL_0059: ldnull IL_005a: ldstr "disposed_s" IL_005f: ldc.i4.0 IL_0060: newarr "Object" IL_0065: ldnull IL_0066: ldnull IL_0067: ldnull IL_0068: call "Function Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object, System.Type, String, Object(), String(), System.Type(), Boolean()) As Object" IL_006d: call "Function System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Object) As Object" IL_0072: call "Sub System.Console.Write(Object)" IL_0077: ret } ]]>) End Sub End Class End Namespace
physhi/roslyn
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenUsingStatement.vb
Visual Basic
apache-2.0
32,349
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My 'NOTE: This file is auto-generated; do not modify it directly. To make changes, ' or if you encounter build errors in this file, go to the Project Designer ' (go to Project Properties or double-click the My Project node in ' Solution Explorer), and make changes on the Application tab. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = true Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Tool.Form1 End Sub End Class End Namespace
SaturnsVoid/GoBot2
Tools/Sources/BasicOBF/BasicOBF/My Project/Application.Designer.vb
Visual Basic
mit
1,469
Option Infer On Imports System Imports System.Runtime.InteropServices Namespace Examples Friend Class Program <STAThread> Shared Sub Main(ByVal args() As String) Dim application As RevisionManager.Application = Nothing Dim insight As RevisionManager.Insight = Nothing Try application = New RevisionManager.Application() insight = CType(application.Insight, RevisionManager.Insight) Dim DocumentNameToShowRevisions = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit.par" Dim NumberOfRevisions As Integer = Nothing Dim DocumentNamesOfRevisions As Object = Nothing insight.ShowRevisionsForServerDocuments(DocumentNameToShowRevisions, NumberOfRevisions, DocumentNamesOfRevisions) Catch ex As System.Exception Console.WriteLine(ex) End Try End Sub End Class End Namespace
SolidEdgeCommunity/docs
docfx_project/snippets/RevisionManager.IInsight.ShowRevisionsForServerDocuments.vb
Visual Basic
mit
994
#Region "Microsoft.VisualBasic::e74125b1cc07e83526890dadb565402a, src\metadb\Massbank\Public\NCBI\PubChem\Web\MetaInfoReader.vb" ' Author: ' ' xieguigang (gg.xie@bionovogene.com, BioNovoGene Co., LTD.) ' ' Copyright (c) 2018 gg.xie@bionovogene.com, BioNovoGene Co., LTD. ' ' ' MIT License ' ' ' Permission is hereby granted, free of charge, to any person obtaining a copy ' of this software and associated documentation files (the "Software"), to deal ' in the Software without restriction, including without limitation the rights ' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ' copies of the Software, and to permit persons to whom the Software is ' furnished to do so, subject to the following conditions: ' ' The above copyright notice and this permission notice shall be included in all ' copies or substantial portions of the Software. ' ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ' SOFTWARE. ' /********************************************************************************/ ' Summaries: ' Module MetaInfoReader ' ' Function: GetInform, GetInformList, GetMetaInfo, getSynonyms, navigateView ' removesDbEntry ' ' ' /********************************************************************************/ #End Region Imports System.Runtime.CompilerServices Imports System.Text.RegularExpressions Imports BioNovoGene.BioDeep.Chemistry.MetaLib.Models Imports Microsoft.VisualBasic.ComponentModel.Collection Imports Microsoft.VisualBasic.Linq Imports MetaInfo = BioNovoGene.BioDeep.Chemistry.MetaLib.Models.MetaLib Namespace NCBI.PubChem <HideModuleName> Public Module MetaInfoReader ''' <summary> ''' 如果<paramref name="path"/>的末端是使用索引语法,则索引的起始下标是从零开始的 ''' </summary> ''' <param name="view"></param> ''' <param name="path"></param> ''' <returns></returns> <Extension> Public Function GetInform(view As PugViewRecord, path$) As Information Dim parts = path.Trim("/"c).Split("/"c) Dim section = view.navigateView(parts) Return section.GetInformation(parts.Last, multipleInfo:=False) End Function <Extension> Private Function navigateView(view As PugViewRecord, parts As String()) As Section If parts.Length = 1 OrElse view Is Nothing Then Return Nothing End If Dim sec As Section = view(parts(Scan0)) For Each part As String In parts.Skip(1).Take(parts.Length - 2) If sec Is Nothing Then Return Nothing Else sec = sec(part) End If Next Return sec End Function ''' <summary> ''' ''' </summary> ''' <param name="view"></param> ''' <param name="path"></param> ''' <returns></returns> <Extension> Public Function GetInformList(view As PugViewRecord, path$) As Information() Dim parts = path.Trim("/"c).Split("/"c) Dim section = view.navigateView(parts) Return section.GetInformation(parts.Last, multipleInfo:=True) End Function ReadOnly nameDatabase As Index(Of String) = { "Human Metabolome Database (HMDB)", "ChEBI", "DrugBank", "European Chemicals Agency (ECHA)", "MassBank of North America (MoNA)" } <Extension> Private Iterator Function getSynonyms(names As Section) As IEnumerable(Of String) Dim depositor = names("Depositor-Supplied Synonyms") Dim mesh = names("MeSH Entry Terms") If Not depositor Is Nothing Then For Each info As Information In depositor.Information If info.InfoType Is GetType(String) Then Yield info.InfoValue Else For Each value As String In DirectCast(info.InfoValue, String()) Yield value Next End If Next End If If Not mesh Is Nothing Then For Each info As Information In mesh.Information If info.InfoType Is GetType(String) Then Yield info.InfoValue Else For Each value As String In DirectCast(info.InfoValue, String()) Yield value Next End If Next End If End Function ''' <summary> ''' 从pubchem数据库之中提取注释所需要的必须基本信息 ''' </summary> ''' <returns></returns> ''' <Extension> Public Function GetMetaInfo(view As PugViewRecord) As MetaInfo If view Is Nothing Then Return Nothing End If Dim identifier As Section = view("Names and Identifiers") Dim formula = view.GetInform("/Names and Identifiers/Molecular Formula/#0") Dim descriptors = identifier("Computed Descriptors") Dim SMILES = view.GetInform("/Names and Identifiers/Computed Descriptors/Canonical SMILES/#0") Dim InChIKey = descriptors("InChI Key").GetInformationString("#0") Dim InChI = descriptors("InChI").GetInformationString("#0") Dim otherNames = identifier("Other Identifiers") Dim synonyms = identifier("Synonyms").getSynonyms.Distinct.OrderBy(Function(s) s).ToArray Dim computedProperties = view("Chemical and Physical Properties")("Computed Properties") ' Dim properties = Table.ToDictionary(computedProperties) Dim CASNumber$() If synonyms Is Nothing Then synonyms = {} End If If otherNames Is Nothing Then CASNumber = synonyms _ .Where(Function(id) id.IsPattern("\d+([-]\d+)+")) _ .ToArray Else CASNumber = otherNames("CAS")?.GetInformationStrings("CAS", True) End If Dim exact_mass# = computedProperties("Exact Mass").GetInformationNumber(Nothing) Dim xref As New xref With { .InChI = InChI, .CAS = CASNumber, .InChIkey = InChIKey, .pubchem = view.RecordNumber, .chebi = synonyms.FirstOrDefault(Function(id) id.IsPattern("CHEBI[:]\d+")), .KEGG = synonyms.FirstOrDefault(Function(id) ' KEGG编号是C开头,后面跟随5个数字 Return id.IsPattern("C\d{5}", RegexOptions.Singleline) End Function), .HMDB = view.Reference.GetHMDBId, .SMILES = SMILES.InfoValue } Dim commonName$ = view.RecordTitle If commonName.StringEmpty Then commonName = view _ .Reference _ .FirstOrDefault(Function(r) r.SourceName Like nameDatabase) _ ?.Name End If ' 20190618 formula可能会存在多个的情况 Dim formulaStr As String = "" If Not formula Is Nothing Then If formula.InfoType Is GetType(String) Then formulaStr = formula.InfoValue Else formulaStr = DirectCast(formula.InfoValue, String()).FirstOrDefault End If End If Return New MetaInfo With { .formula = formulaStr, .xref = xref, .name = commonName, .exact_mass = exact_mass, .ID = view.RecordNumber, .synonym = synonyms.removesDbEntry.ToArray } End Function <Extension> Private Iterator Function removesDbEntry(synonyms As String()) As IEnumerable(Of String) For Each name As String In synonyms If name.IsPattern("\d+") Then Continue For End If If name.Match("\d+").Length > 2 Then Continue For End If If xref.IsCASNumber(name) Then Continue For End If Yield name Next End Function End Module End Namespace
xieguigang/MassSpectrum-toolkits
src/metadb/Massbank/Public/NCBI/PubChem/Web/MetaInfoReader.vb
Visual Basic
mit
9,281
Imports SistFoncreagro.BussinessEntities Imports System.Data.SqlClient Imports System.Data Public Class TareaRepository : Inherits MasterDataAccess : Implements ITareaRepository Private Function SelectObjectFactory(ByVal command As SqlCommand) As List(Of Tarea) Dim lista As New List(Of Tarea) Using reader As SqlDataReader = MyBase.ExecuteReader(command) While reader.Read Dim _Tarea As New Tarea() With { .IdTarea = reader.GetValue(0), .IdSubActividad = reader.GetValue(1), .NomTarea = reader.GetValue(2), .Unidad = reader.GetValue(3), .FinalizaActividad = reader.GetValue(5) } If Not (reader.IsDBNull(reader.GetOrdinal("Porcentaje"))) Then _Tarea.Porcentaje = reader.GetValue(reader.GetOrdinal("Porcentaje")) End If If Not (reader.IsDBNull(reader.GetOrdinal("Codigo"))) Then _Tarea.Codigo = reader.GetValue(reader.GetOrdinal("Codigo")) End If lista.Add(_Tarea) End While End Using Return lista End Function Public Sub DeleteTAREA(IdTarea As Integer) Implements ITareaRepository.DeleteTAREA Dim command As SqlCommand = MyBase.CreateSPCommand("DeleteTAREA") command.Parameters.AddWithValue("IdTarea", IdTarea) MyBase.ExecuteNonQuery(command) End Sub Public Sub SaveTAREA(_Tarea As BussinessEntities.Tarea) Implements ITareaRepository.SaveTAREA Dim command As SqlCommand = MyBase.CreateSPCommand("SaveTAREA") command.Parameters.AddWithValue("Codigo", _Tarea.Codigo) command.Parameters.AddWithValue("FinalizaActividad", _Tarea.FinalizaActividad) command.Parameters.AddWithValue("IdSubActividad", _Tarea.IdSubActividad) command.Parameters.AddWithValue("IdTarea", _Tarea.IdTarea) command.Parameters.AddWithValue("NomTarea", _Tarea.NomTarea) command.Parameters.AddWithValue("Porcentaje", _Tarea.Porcentaje) command.Parameters.AddWithValue("Unidad", _Tarea.Unidad) MyBase.ExecuteNonQuery(command) End Sub End Class
crackper/SistFoncreagro
SistFoncreagro.DataAccess/TareaRepository.vb
Visual Basic
mit
2,282
'------------------------------------------------------------------------------ ' <auto-generated> ' 此代码由工具生成。 ' 运行时版本:4.0.30319.42000 ' ' 对此文件的更改可能会导致不正确的行为,并且如果 ' 重新生成代码,这些更改将会丢失。 ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) #Region "My.Settings 自动保存功能" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default]() As MySettings Get #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject If Not addedHandler Then AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings addedHandler = True End If End SyncLock End If #End If Return defaultInstance End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Cyl_gear.My.MySettings Get Return Global.Cyl_gear.My.MySettings.Default End Get End Property End Module End Namespace
Lentil1016/LTB
v1.0/澜塔工具集/ClassLibrary1/My Project/Settings.Designer.vb
Visual Basic
mit
2,918
Option Strict Off ' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Threading.Tasks Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.VisualBasic.CodeFixes.GenerateConstructor Imports Microsoft.CodeAnalysis.VisualBasic.Diagnostics Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics.GenerateConstructor Public Class GenerateConstructorTests Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, CodeFixProvider) Return New Tuple(Of DiagnosticAnalyzer, CodeFixProvider)(Nothing, New GenerateConstructorCodeFixProvider()) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateIntoContainingType() As Task Await TestAsync( NewLines("Class C \n Sub Main() \n Dim f = New C([|4|], 5, 6) \n End Sub \n End Class"), NewLines("Class C \n Private v1 As Integer \n Private v2 As Integer \n Private v3 As Integer \n Public Sub New(v1 As Integer, v2 As Integer, v3 As Integer) \n Me.v1 = v1 \n Me.v2 = v2 \n Me.v3 = v3 \n End Sub \n Sub Main() \n Dim f = New C(4, 5, 6) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestInvokingFromInsideAnotherConstructor() As Task Await TestAsync( NewLines("Class A \n Private v As B \n Public Sub New() \n Me.v = New B([|5|]) \n End Sub \n End Class \n Friend Class B \n End Class"), NewLines("Class A \n Private v As B \n Public Sub New() \n Me.v = New B(5) \n End Sub \n End Class \n Friend Class B \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMissingGenerateDefaultConstructor() As Task Await TestMissingAsync( NewLines("Class Test \n Sub Main() \n Dim a = New [|A|]() \n End Sub \n End Class \n Class A \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMissingGenerateDefaultConstructorInStructure() As Task Await TestMissingAsync( NewLines("Class Test \n Sub Main() \n Dim a = New [|A|]() \n End Sub \n End Class \n Structure A \n End Structure")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOfferDefaultConstructorWhenOverloadExists() As Task Await TestAsync( NewLines("Class Test \n Sub Main() \n Dim a = [|New A()|] \n End Sub \n End Class \n Class A \n Sub New(x As Integer) \n End Sub \n End Class"), NewLines("Class Test \n Sub Main() \n Dim a = New A() \n End Sub \n End Class \n Class A \n Public Sub New() \n End Sub \n Sub New(x As Integer) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestParameterizedConstructorOffered1() As Task Await TestAsync( NewLines("Class Test \n Sub Main() \n Dim a = New A([|1|]) \n End Sub \n End Class \n Class A \n End Class"), NewLines("Class Test \n Sub Main() \n Dim a = New A(1) \n End Sub \n End Class \n Class A \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestParameterizedConstructorOffered2() As Task Await TestAsync( NewLines("Class Test \n Sub Main() \n Dim a = New A([|1|]) \n End Sub \n End Class \n Class A \n Public Sub New() \n End Sub \n End Class"), NewLines("Class Test \n Sub Main() \n Dim a = New A(1) \n End Sub \n End Class \n Class A \n Private v As Integer \n Public Sub New() \n End Sub \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WorkItem(527627), WorkItem(539735), WorkItem(539735)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestInAsNewExpression() As Task Await TestAsync( NewLines("Class Test \n Sub Main() \n Dim a As New A([|1|]) \n End Sub \n End Class \n Class A \n Public Sub New() \n End Sub \n End Class"), NewLines("Class Test \n Sub Main() \n Dim a As New A(1) \n End Sub \n End Class \n Class A \n Private v As Integer \n Public Sub New() \n End Sub \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInPartialClass1() As Task Await TestAsync( NewLines("Public Partial Class Test \n Public Sub S1() \n End Sub \n End Class \n Public Class Test \n Public Sub S2() \n End Sub \n End Class \n Public Class A \n Sub Main() \n Dim s = New Test([|5|]) \n End Sub \n End Class"), NewLines("Public Partial Class Test \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Public Sub S1() \n End Sub \n End Class \n Public Class Test \n Public Sub S2() \n End Sub \n End Class \n Public Class A \n Sub Main() \n Dim s = New Test(5) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInPartialClassWhenArityDoesntMatch() As Task Await TestAsync( NewLines("Public Partial Class Test \n Public Sub S1() \n End Sub \n End Class \n Public Class Test(Of T) \n Public Sub S2() \n End Sub \n End Class \n Public Class A \n Sub Main() \n Dim s = New Test([|5|]) \n End Sub \n End Class"), NewLines("Public Partial Class Test \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Public Sub S1() \n End Sub \n End Class \n Public Class Test(Of T) \n Public Sub S2() \n End Sub \n End Class \n Public Class A \n Sub Main() \n Dim s = New Test(5) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInPartialClassWithConflicts() As Task Await TestAsync( NewLines("Public Partial Class Test2 \n End Class \n Private Partial Class Test2 \n End Class \n Public Class A \n Sub Main() \n Dim s = New Test2([|5|]) \n End Sub \n End Class"), NewLines("Public Partial Class Test2 \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n Private Partial Class Test2 \n End Class \n Public Class A \n Sub Main() \n Dim s = New Test2(5) \n End Sub \n End Class")) End Function <WorkItem(528257)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateIntoInaccessibleType() As Task Await TestMissingAsync( NewLines("Class Foo \n Private Class Bar \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New Foo.Bar([|5|]) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOnNestedTypes() As Task Await TestAsync( NewLines("Class Foo \n Class Bar \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New Foo.Bar([|5|]) \n End Sub \n End Class"), NewLines("Class Foo \n Class Bar \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New Foo.Bar(5) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOnNestedPartialTypes() As Task Await TestAsync( NewLines("Public Partial Class Test \n Public Partial Class NestedTest \n Public Sub S1() \n End Sub \n End Class \n End Class \n Public Partial Class Test \n Public Partial Class NestedTest \n Public Sub S2() \n End Sub \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New Test.NestedTest([|5|]) \n End Sub \n End Class"), NewLines("Public Partial Class Test \n Public Partial Class NestedTest \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Public Sub S1() \n End Sub \n End Class \n End Class \n Public Partial Class Test \n Public Partial Class NestedTest \n Public Sub S2() \n End Sub \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New Test.NestedTest(5) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOnNestedGenericType() As Task Await TestAsync( NewLines("Class Outer(Of T) \n Public Class Inner \n End Class \n Public i = New Inner([|5|]) \n End Class"), NewLines("Class Outer(Of T) \n Public Class Inner \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n Public i = New Inner(5) \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOnGenericTypes1() As Task Await TestAsync( NewLines("Class Base(Of T, V) \n End Class \n Class Test \n Sub Foo() \n Dim a = New Base(Of Integer, Integer)([|5|], 5) \n End Sub \n End Class"), NewLines("Class Base(Of T, V) \n Private v1 As Integer \n Private v2 As Integer \n Public Sub New(v1 As Integer, v2 As Integer) \n Me.v1 = v1 \n Me.v2 = v2 \n End Sub \n End Class \n Class Test \n Sub Foo() \n Dim a = New Base(Of Integer, Integer)(5, 5) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOnGenericTypes2() As Task Await TestAsync( NewLines("Class Base(Of T, V) \n End Class \n Class Derived(Of V) \n Inherits Base(Of Integer, V) \n End Class \n Class Test \n Sub Foo() \n Dim a = New Base(Of Integer, Integer)(5, 5) \n Dim b = New Derived(Of Integer)([|5|]) \n End Sub \n End Class"), NewLines("Class Base(Of T, V) \n End Class \n Class Derived(Of V) \n Inherits Base(Of Integer, V) \n Private v1 As Integer \n Public Sub New(v1 As Integer) \n Me.v1 = v1 \n End Sub \n End Class \n Class Test \n Sub Foo() \n Dim a = New Base(Of Integer, Integer)(5, 5) \n Dim b = New Derived(Of Integer)(5) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOnGenericTypes3() As Task Await TestAsync( NewLines("Class Base(Of T, V) \n End Class \n Class Derived(Of V) \n Inherits Base(Of Integer, V) \n End Class \n Class MoreDerived \n Inherits Derived(Of Double) \n End Class \n Class Test \n Sub Foo() \n Dim a = New Base(Of Integer, Integer)(5, 5) \n Dim b = New Derived(Of Integer)(5) \n Dim c = New MoreDerived([|5.5|]) \n End Sub \n End Class"), NewLines("Class Base(Of T, V) \n End Class \n Class Derived(Of V) \n Inherits Base(Of Integer, V) \n End Class \n Class MoreDerived \n Inherits Derived(Of Double) \n Private v As Double \n Public Sub New(v As Double) \n Me.v = v \n End Sub \n End Class \n Class Test \n Sub Foo() \n Dim a = New Base(Of Integer, Integer)(5, 5) \n Dim b = New Derived(Of Integer)(5) \n Dim c = New MoreDerived(5.5) \n End Sub \n End Class")) End Function <WorkItem(528244)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestDateTypeForInference() As Task Await TestAsync( NewLines("Class Foo \n End Class \n Class A \n Sub Main() \n Dim s = New Foo([|Date.Now|]) \n End Sub \n End Class"), NewLines("Class Foo \n Private now As Date \n Public Sub New(now As Date) \n Me.now = now \n End Sub \n End Class \n Class A \n Sub Main() \n Dim s = New Foo(Date.Now) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestBaseConstructor() As Task Await TestAsync( NewLines("Class Base \n End Class \n Class Derived \n Inherits Base \n Private x As Integer \n Public Sub New(x As Integer) \n MyBase.New([|x|]) \n Me.x = x \n End Sub \n End Class"), NewLines("Class Base \n Private x As Integer \n Public Sub New(x As Integer) \n Me.x = x \n End Sub \n End Class \n Class Derived \n Inherits Base \n Private x As Integer \n Public Sub New(x As Integer) \n MyBase.New(x) \n Me.x = x \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMustInheritBase() As Task Await TestAsync( NewLines("MustInherit Class Base \n End Class \n Class Derived \n Inherits Base \n Shared x As Integer \n Public Sub New(x As Integer) \n MyBase.New([|x|]) 'This should generate a protected ctor in Base \n Derived.x = x \n End Sub \n Sub Test1() \n Dim a As New Derived(1) \n End Sub \n End Class"), NewLines("MustInherit Class Base \n Private x As Integer \n Public Sub New(x As Integer) \n Me.x = x \n End Sub \n End Class \n Class Derived \n Inherits Base \n Shared x As Integer \n Public Sub New(x As Integer) \n MyBase.New(x) 'This should generate a protected ctor in Base \n Derived.x = x \n End Sub \n Sub Test1() \n Dim a As New Derived(1) \n End Sub \n End Class")) End Function <WorkItem(540586)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMissingOnNoCloseParen() As Task Await TestMissingAsync( NewLines("Imports System \n Imports System.Collections.Generic \n Imports System.Linq \n Module Program \n Sub Main(args As String()) \n Dim c = New [|foo|]( \n End Sub \n End Module \n Class foo \n End Class")) End Function <WorkItem(540545)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestConversionError() As Task Await TestAsync( NewLines("Imports System \n Module Program \n Sub Main(args As String()) \n Dim i As Char \n Dim cObject As C = New C([|i|]) \n Console.WriteLine(cObject.v1) \n End Sub \n End Module \n Class C \n Public v1 As Integer \n Public Sub New(v1 As Integer) \n Me.v1 = v1 \n End Sub \n End Class"), NewLines("Imports System \n Module Program \n Sub Main(args As String()) \n Dim i As Char \n Dim cObject As C = New C(i) \n Console.WriteLine(cObject.v1) \n End Sub \n End Module \n Class C \n Public v1 As Integer \n Private i As Char \n Public Sub New(i As Char) \n Me.i = i \n End Sub Public Sub New(v1 As Integer) \n Me.v1 = v1 \n End Sub \n \n End Class")) End Function <WorkItem(540642)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestNotOnNestedConstructor() As Task Await TestAsync( NewLines("Module Program \n Sub Main(args As String()) \n Dim x As C = New C([|New C()|]) \n End Sub \n End Module \n Friend Class C \n End Class"), NewLines("Module Program \n Sub Main(args As String()) \n Dim x As C = New C(New C()) \n End Sub \n End Module \n Friend Class C \n Private c As C \n Public Sub New(c As C) \n Me.c = c \n End Sub \n End Class")) End Function <WorkItem(540607)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestUnavailableTypeParameters() As Task Await TestAsync( NewLines("Class C(Of T1, T2) \n Sub M(x As T1, y As T2) \n Dim a As Test = New Test([|x|], y) \n End Sub \n End Class \n Friend Class Test \n End Class"), NewLines("Class C(Of T1, T2) \n Sub M(x As T1, y As T2) \n Dim a As Test = New Test(x, y) \n End Sub \n End Class \n Friend Class Test \n Private x As Object \n Private y As Object \n Public Sub New(x As Object, y As Object) \n Me.x = x \n Me.y = y \n End Sub \n End Class")) End Function <WorkItem(540748)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestKeywordArgument1() As Task Await TestAsync( NewLines("Class Test \n Private [Class] As Integer = 5 \n Sub Main() \n Dim a = New A([|[Class]|]) \n End Sub \n End Class \n Class A \n End Class"), NewLines("Class Test \n Private [Class] As Integer = 5 \n Sub Main() \n Dim a = New A([Class]) \n End Sub \n End Class \n Class A \n Private [class] As Integer \n Public Sub New([class] As Integer) \n Me.class = [class] \n End Sub \n End Class")) End Function <WorkItem(540747)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestKeywordArgument2() As Task Await TestAsync( NewLines("Class Test \n Sub Main() \n Dim a = New A([|Class|]) \n End Sub \n End Class \n Class A \n End Class"), NewLines("Class Test \n Sub Main() \n Dim a = New A(Class) \n End Sub \n End Class \n Class A \n Private p As Object \n Public Sub New(p As Object) \n Me.p = p \n End Sub \n End Class")) End Function <WorkItem(540746)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestConflictWithTypeParameterName() As Task Await TestAsync( NewLines("Class Test \n Sub Foo() \n Dim a = New Bar(Of Integer)([|5|]) \n End Sub \n End Class \n Class Bar(Of V) \n End Class"), NewLines("Class Test \n Sub Foo() \n Dim a = New Bar(Of Integer)(5) \n End Sub \n End Class \n Class Bar(Of V) \n Private v1 As Integer \n Public Sub New(v1 As Integer) \n Me.v1 = v1 \n End Sub \n End Class")) End Function <WorkItem(541174)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingReadonlyField() As Task Await TestAsync( NewLines("Class C \n ReadOnly x As Integer \n Sub Test() \n Dim x As Integer = 1 \n Dim obj As New C([|x|]) \n End Sub \n End Class"), NewLines("Class C \n ReadOnly x As Integer \n Public Sub New(x As Integer) \n Me.x = x \n End Sub \n Sub Test() \n Dim x As Integer = 1 \n Dim obj As New C(x) \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingProperty() As Task Await TestAsync( NewLines("Class Program \n Sub Test() \n Dim x = New A([|P|]:=5) \n End Sub \n End Class \n Class A \n Public Property P As Integer \n End Class"), NewLines("Class Program \n Sub Test() \n Dim x = New A(P:=5) \n End Sub \n End Class \n Class A \n Public Sub New(P As Integer) \n Me.P = P \n End Sub \n Public Property P As Integer \n End Class")) End Function <WorkItem(542055)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingMethod() As Task Await TestAsync( NewLines("Class A \n Sub Test() \n Dim t As New C([|u|]:=5) \n End Sub \n End Class \n Class C \n Public Sub u() \n End Sub \n End Class"), NewLines("Class A \n Sub Test() \n Dim t As New C(u:=5) \n End Sub \n End Class \n Class C \n Private u1 As Integer \n Public Sub New(u As Integer) \n Me.u1 = u \n End Sub \n Public Sub u() \n End Sub \n End Class")) End Function <WorkItem(542055)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestDetectAssignmentToSharedFieldFromInstanceConstructor() As Task Await TestAsync( NewLines("Class Program \n Sub Test() \n Dim x = New A([|P|]:=5) \n End Sub \n End Class \n Class A \n Shared Property P As Integer \n End Class"), NewLines("Class Program \n Sub Test() \n Dim x = New A(P:=5) \n End Sub \n End Class \n Class A \n Private P1 As Integer \n Public Sub New(P As Integer) \n Me.P1 = P \n End Sub \n Shared Property P As Integer \n End Class")) End Function <WorkItem(542055)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingFieldWithSameNameButIncompatibleType() As Task Await TestAsync( NewLines("Class A \n Sub Test() \n Dim t As New B([|x|]:=5) \n End Sub \n End Class \n Class B \n Private x As String \n End Class"), NewLines("Class A \n Sub Test() \n Dim t As New B(x:=5) \n End Sub \n End Class \n Class B \n Private x As String \n Private x1 As Integer \n Public Sub New(x As Integer) \n Me.x1 = x \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingFieldFromBaseClass() As Task Await TestAsync( NewLines("Class A \n Sub Test() \n Dim t As New C([|u|]:=5) \n End Sub \n End Class \n Class C \n Inherits B \n Private x As String \n End Class \n Class B \n Protected u As Integer \n End Class"), NewLines("Class A \n Sub Test() \n Dim t As New C(u:=5) \n End Sub \n End Class \n Class C \n Inherits B \n Private x As String \n Public Sub New(u As Integer) \n Me.u = u \n End Sub \n End Class \n Class B \n Protected u As Integer \n End Class")) End Function <WorkItem(542098)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMeConstructorInitializer() As Task Await TestAsync( NewLines("Class C \n Sub New \n Me.New([|1|]) \n End Sub \n End Class"), NewLines("Class C \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Sub New \n Me.New(1) \n End Sub \n End Class")) End Function <WorkItem(542098)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingMeConstructorInitializer() As Task Await TestMissingAsync( NewLines("Class C \n Private v As Integer \n Sub New \n Me.[|New|](1) \n End Sub \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WorkItem(542098)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMyBaseConstructorInitializer() As Task Await TestAsync( NewLines("Class C \n Sub New \n MyClass.New([|1|]) \n End Sub \n End Class"), NewLines("Class C \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Sub New \n MyClass.New(1) \n End Sub \n End Class")) End Function <WorkItem(542098)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingMyBaseConstructorInitializer() As Task Await TestMissingAsync( NewLines("Class C \n Private v As Integer \n Sub New \n MyClass.[|New|](1) \n End Sub \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WorkItem(542098)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMyClassConstructorInitializer() As Task Await TestAsync( NewLines("Class C \n Inherits B \n Sub New \n MyBase.New([|1|]) \n End Sub \n End Class \n Class B \n End Class"), NewLines("Class C \n Inherits B \n Sub New \n MyBase.New(1) \n End Sub \n End Class \n Class B \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WorkItem(542098)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestExistingMyClassConstructorInitializer() As Task Await TestMissingAsync( NewLines("Class C \n Inherits B \n Sub New \n MyBase.New([|1|]) \n End Sub \n End Class \n Class B \n Protected Sub New(v As Integer) \n End Sub \n End Class")) End Function <WorkItem(542056)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestConflictingFieldNameInSubclass() As Task Await TestAsync( NewLines("Class A \n Sub Test() \n Dim t As New C([|u|]:=5) \n End Sub \n End Class \n Class C \n Inherits B \n Private x As String \n End Class \n Class B \n Protected u As String \n End Class"), NewLines("Class A \n Sub Test() \n Dim t As New C(u:=5) \n End Sub \n End Class \n Class C \n Inherits B \n Private u1 As Integer \n Private x As String \n Public Sub New(u As Integer) \n Me.u1 = u \n End Sub \n End Class \n Class B \n Protected u As String \n End Class")) End Function <WorkItem(542442)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestNothingArgument() As Task Await TestMissingAsync( NewLines("Class C1 \n Public Sub New(ByVal accountKey As Integer) \n Me.new() \n Me.[|new|](accountKey, Nothing) \n End Sub \n Public Sub New(ByVal accountKey As Integer, ByVal accountName As String) \n Me.New(accountKey, accountName, Nothing) \n End Sub \n Public Sub New(ByVal accountKey As Integer, ByVal accountName As String, ByVal accountNumber As String) \n End Sub \n End Class")) End Function <WorkItem(540641)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestMissingOnExistingConstructor() As Task Await TestMissingAsync( NewLines("Module Program \n Sub M() \n Dim x As C = New [|C|](P) \n End Sub \n End Module \n Class C \n Private v As Object \n Public Sub New(v As Object) \n Me.v = v \n End Sub \n End Class")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerationIntoVisibleType() As Task Await TestAsync( NewLines("#ExternalSource (""Default.aspx"", 1) \n Class C \n Sub Foo() \n Dim x As New D([|5|]) \n End Sub \n End Class \n Class D \n End Class \n #End ExternalSource"), NewLines("#ExternalSource (""Default.aspx"", 1) \n Class C \n Sub Foo() \n Dim x As New D(5) \n End Sub \n End Class \n Class D \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n #End ExternalSource")) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestNoGenerationIntoEntirelyHiddenType() As Task Await TestMissingAsync( <Text>#ExternalSource (""Default.aspx"", 1) Class C Sub Foo() Dim x As New D([|5|]) End Sub End Class #End ExternalSource Class D End Class </Text>.Value) End Function <WorkItem(546030)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestConflictingDelegatedParameterNameAndNamedArgumentName1() As Task Await TestAsync( NewLines("Module Program \n Sub Main(args As String()) \n Dim objc As New C(1, [|prop|]:=""Property"") \n End Sub \n End Module \n \n Class C \n Private prop As String \n \n Public Sub New(prop As String) \n Me.prop = prop \n End Sub \n End Class"), NewLines("Module Program \n Sub Main(args As String()) \n Dim objc As New C(1, prop:=""Property"") \n End Sub \n End Module \n \n Class C \n Private prop As String \n Private v As Integer \n Public Sub New(prop As String) \n Me.prop = prop \n End Sub \n Public Sub New(v As Integer, prop As String) \n Me.v = v \n Me.prop = prop \n End Sub \n End Class")) End Function <WpfFact(), Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestFormattingInGenerateConstructor() As Task Await TestAsync( <Text>Class C Sub New() MyClass.New([|1|]) End Sub End Class</Text>.Value.Replace(vbLf, vbCrLf), <Text>Class C Private v As Integer Sub New() MyClass.New(1) End Sub Public Sub New(v As Integer) Me.v = v End Sub End Class</Text>.Value.Replace(vbLf, vbCrLf), compareTokens:=False) End Function <WorkItem(530003)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestAttributesWithArgument() As Task Await TestAsync( NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n End Class \n [|<MyAttribute(123)>|] \n Public Class D \n End Class"), NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n <MyAttribute(123)> \n Public Class D \n End Class")) End Function <WorkItem(530003)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestAttributesWithMultipleArguments() As Task Await TestAsync( NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n End Class \n [|<MyAttribute(true, 1, ""hello"")>|] \n Public Class D \n End Class"), NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n Private v1 As Boolean \n Private v2 As Integer \n Private v3 As String \n Public Sub New(v1 As Boolean, v2 As Integer, v3 As String) \n Me.v1 = v1 \n Me.v2 = v2 \n Me.v3 = v3 \n End Sub \n End Class \n <MyAttribute(true, 1, ""hello"")> \n Public Class D \n End Class")) End Function <WorkItem(530003)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestAttributesWithNamedArguments() As Task Await TestAsync( NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n End Class \n [|<MyAttribute(true, 1, Topic:= ""hello"")>|] \n Public Class D \n End Class"), NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n Private Topic As String \n Private v1 As Boolean \n Private v2 As Integer \n Public Sub New(v1 As Boolean, v2 As Integer, Topic As String) \n Me.v1 = v1 \n Me.v2 = v2 \n Me.Topic = Topic \n End Sub \n End Class \n <MyAttribute(true, 1, Topic:= ""hello"")> \n Public Class D \n End Class")) End Function <WorkItem(530003)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestAttributesWithAdditionalConstructors() As Task Await TestAsync( NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n [|<MyAttribute(True, 2)>|] \n Public Class D \n End Class"), NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n Private v As Integer \n Private v1 As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Public Sub New(v As Integer, v1 As Integer) \n Me.New(v) \n Me.v1 = v1 \n End Sub \n End Class \n <MyAttribute(True, 2)> \n Public Class D \n End Class")) End Function <WorkItem(530003)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestAttributesWithAllValidArguments() As Task Await TestAsync( NewLines("Enum A \n A1 \n End Enum \n <AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n End Class \n [|<MyAttribute(New Short(1) {1, 2, 3}, A.A1, True, 1, ""Z""c, 5S, 1I, 5L, 6.0R, 2.1F, ""abc"")>|] \n Public Class D End Class"), NewLines("Enum A \n A1 \n End Enum \n <AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute \n Private a1 As A \n Private v1 As Short() \n Private v10 As String \n Private v2 As Boolean \n Private v3 As Integer \n Private v4 As Char \n Private v5 As Short \n Private v6 As Integer \n Private v7 As Long \n Private v8 As Double \n Private v9 As Single \n Public Sub New(v1() As Short, a1 As A, v2 As Boolean, v3 As Integer, v4 As Char, v5 As Short, v6 As Integer, v7 As Long, v8 As Double, v9 As Single, v10 As String) \n Me.v1 = v1 \n Me.a1 = a1 \n Me.v2 = v2 \n Me.v3 = v3 \n Me.v4 = v4 \n Me.v5 = v5 \n Me.v6 = v6 \n Me.v7 = v7 \n Me.v8 = v8 \n Me.v9 = v9 \n Me.v10 = v10 \n End Sub \n End Class \n <MyAttribute(New Short(1) {1, 2, 3}, A.A1, True, 1, ""Z""c, 5S, 1I, 5L, 6.0R, 2.1F, ""abc"")> \n Public Class D \n End Class ")) End Function <WorkItem(530003)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestAttributesWithLambda() As Task Await TestMissingAsync( NewLines("<AttributeUsage(AttributeTargets.Class)> \n Public Class MyAttribute \n Inherits System.Attribute End Class \n [|<MyAttribute(Function(x) x+1)>|] \n Public Class D \n End Class")) End Function <WorkItem(889349)> <WpfFact(), Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestConstructorGenerationForDifferentNamedParameter() As Task Await TestAsync( <Text>Class Program Sub Main(args As String()) Dim a = New Program([|y:=4|]) End Sub Sub New(x As Integer) End Sub End Class</Text>.Value.Replace(vbLf, vbCrLf), <Text>Class Program Private y As Integer Sub Main(args As String()) Dim a = New Program(y:=4) End Sub Sub New(x As Integer) End Sub Public Sub New(y As Integer) Me.y = y End Sub End Class</Text>.Value.Replace(vbLf, vbCrLf), compareTokens:=False) End Function <WorkItem(897355)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestOptionStrictOn() As Task Await TestAsync( NewLines("Option Strict On \n Module Module1 \n Sub Main() \n Dim int As Integer = 3 \n Dim obj As Object = New Object() \n Dim c1 As Classic = New Classic(int) \n Dim c2 As Classic = [|New Classic(obj)|] \n End Sub \n Class Classic \n Private int As Integer \n Public Sub New(int As Integer) \n Me.int = int \n End Sub \n End Class \n End Module"), NewLines("Option Strict On \n Module Module1 \n Sub Main() \n Dim int As Integer = 3 \n Dim obj As Object = New Object() \n Dim c1 As Classic = New Classic(int) \n Dim c2 As Classic = New Classic(obj) \n End Sub \n Class Classic \n Private int As Integer \n Private obj As Object \n Public Sub New(obj As Object) \n Me.obj = obj \n End Sub \n Public Sub New(int As Integer) \n Me.int = int \n End Sub \n End Class \n End Module ")) End Function <WorkItem(528257)> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInInaccessibleType() As Task Await TestAsync( NewLines("Class Foo \n Private Class Bar \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New [|Foo.Bar(5)|] \n End Sub \n End Class"), NewLines("Class Foo \n Private Class Bar \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class \n End Class \n Class A \n Sub Main() \n Dim s = New Foo.Bar(5) \n End Sub \n End Class")) End Function Public Class GenerateConstructorTestsWithFindMissingIdentifiersAnalyzer Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, CodeFixProvider) Return New Tuple(Of DiagnosticAnalyzer, CodeFixProvider)(New VisualBasicUnboundIdentifiersDiagnosticAnalyzer(), New GenerateConstructorCodeFixProvider()) End Function <WorkItem(1241, "https://github.com/dotnet/roslyn/issues/1241")> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateConstructorInIncompleteLambda() As Task Await TestAsync( NewLines("Imports System.Linq \n Class C \n Sub New() \n Dim s As Action = Sub() \n Dim a = New [|C|](0)"), NewLines("Imports System.Linq \n Class C \n Private v As Integer \n Sub New() \n Dim s As Action = Sub() \n Dim a = New C(0)Public Sub New(v As Integer) \n Me.v = v \n End Sub \n End Class")) End Function <WorkItem(5920, "https://github.com/dotnet/roslyn/issues/5920")> <Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateConstructorInIncompleteLambda2() As Task Await TestAsync( NewLines("Imports System.Linq \n Class C \n Private v As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Sub New() \n Dim s As Action = Sub() \n Dim a = New [|C|](0, 0)"), NewLines("Imports System.Linq \n Class C \n Private v As Integer \n Private v1 As Integer \n Public Sub New(v As Integer) \n Me.v = v \n End Sub \n Sub New() \n Dim s As Action = Sub() \n Dim a = New C(0, 0) \n Public Sub New(v As Integer, v1 As Integer) \n Me.New(v) \n Me.v1 = v1 \n End Sub \n End Class")) End Function End Class <WorkItem(6541, "https://github.com/dotnet/Roslyn/issues/6541")> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInDerivedType1() As Task Await TestAsync( " Public Class Base Public Sub New(a As String) End Sub End Class Public Class [||]Derived Inherits Base End Class", " Public Class Base Public Sub New(a As String) End Sub End Class Public Class Derived Inherits Base Public Sub New(a As String) MyBase.New(a) End Sub End Class") End Function <WorkItem(6541, "https://github.com/dotnet/Roslyn/issues/6541")> <WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInDerivedType2() As Task Await TestAsync( " Public Class Base Public Sub New(a As Integer, Optional b As String = Nothing) End Sub End Class Public Class [||]Derived Inherits Base End Class", " Public Class Base Public Sub New(a As Integer, Optional b As String = Nothing) End Sub End Class Public Class Derived Inherits Base Public Sub New(a As Integer, Optional b As String = Nothing) MyBase.New(a, b) End Sub End Class") End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)> Public Async Function TestGenerateInDerivedType_Crash() As Task Await TestMissingAsync( " Public Class Base Public Sub New(a As Integer, Optional b As String = Nothing) End Sub End Class Public Class [|;;|]Derived Inherits Base End Class") End Function End Class End Namespace
mseamari/Stuff
src/EditorFeatures/VisualBasicTest/Diagnostics/GenerateConstructor/GenerateConstructorTests.vb
Visual Basic
apache-2.0
39,969
Imports BVSoftware.Bvc5.Core Imports System.Collections.ObjectModel Partial Class BVModules_Themes_Foundation4_Responsive_ContentBlocks_Mailing_List_Unsubscribe_view Inherits Content.BVModule Private _ListId As String = String.Empty Public Property ListId() As String Get Return _ListId End Get Set(ByVal Value As String) _ListId = Value End Set End Property Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then SetDefaultControlValues() End If Me.ListId = SettingsManager.GetSetting("MailingListId") End Sub Private Sub SetDefaultControlValues() lblTitle.Text = SettingsManager.GetSetting("Title") If lblTitle.Text = String.Empty Then lblTitle.Text = "Mailing List Unsubscribe" End If Me.lblError.Text = SettingsManager.GetSetting("ErrorMessage") If Me.lblError.Text = String.Empty Then Me.lblError.Text = "<i class='fa fa-exclamation-triangle'></i> Please enter a valid email address" Me.lblError.Visible = True End If Me.lblSuccess.Text = SettingsManager.GetSetting("SuccessMessage") If Me.lblSuccess.Text = String.Empty Then Me.lblSuccess.Text = "Thank You!" End If Me.lblInstructions.Text = SettingsManager.GetSetting("Instructions") If Me.lblInstructions.Text = String.Empty Then Me.lblInstructions.Text = "Please enter your email address" End If btnGoEmail.ImageUrl = PersonalizationServices.GetThemedButton("GoMailingList") btnGoEmail.AlternateText = "Submit Form" End Sub Protected Sub btnGoEmail_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnGoEmail.Click lblError.Text = "" lblSuccess.Visible = False 'lblInstructions.Visible = False valEmail.Validate() If valEmail.IsValid = False Then lblError.Text = valEmail.ErrorMessage lblError.Visible = True Else Try If EmailAddressField.Text.Trim.Length > 3 Then If ListId <> String.Empty Then Contacts.MailingListMember.DeleteByEmail(EmailAddressField.Text.Trim, ListId) Else Dim lists As Collection(Of Contacts.MailingList) = Contacts.MailingList.FindAllPublic() If lists.Count > 0 Then Contacts.MailingListMember.DeleteByEmail(EmailAddressField.Text.Trim, lists(0).Bvin) End If lists = Nothing End If lblSuccess.Visible = True lblInstructions.Visible = False pnlMailingListSignupForm.Visible = False Else lblError.Text = "<i class='fa fa-exclamation-triangle'></i> Please enter your email address" lblError.Visible = True End If Catch ex As Exception lblError.Text = ex.Message lblError.Visible = True End Try End If End Sub End Class
ajaydex/Scopelist_2015
BVModules/Themes/Foundation4 Responsive/ContentBlocks/Mailing List Unsubscribe/view.ascx.vb
Visual Basic
apache-2.0
3,318
Public Function getMyDocsPath() As String '****************************************************************************** ' Description: Retreives current user's My Documents path without trailing "/" ' ' Author: taxbender ' Contributors: ' Sources: ' Last Updated: 12/30/2015 ' Dependencies: Runtime Reference: Microsoft Scripting Runtime ' Var - cEnableErrorHandling ' Sub - errMessage ' Known Issues: None '****************************************************************************** If cEnableErrorHandling Then On Error GoTo errHandler Dim oShell As Object Set oShell = CreateObject("WScript.Shell") getMyDocsPath = oShell.SpecialFolders("mydocuments") exitMe: Set oShell = Nothing Exit Function errHandler: errMessage "getMyDocsPath", Err.Number, Err.Description Resume exitMe End Function
aaronkeene/ExcelVBA
Utilities/getMyDocsPath.vb
Visual Basic
mit
893
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.Collections.Immutable Imports System.Composition Imports System.Threading Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.Host.Mef Imports Microsoft.CodeAnalysis.Internal.Log Imports Microsoft.CodeAnalysis.Simplification Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Microsoft.CodeAnalysis.VisualBasic.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.Simplification <ExportLanguageService(GetType(ISimplificationService), LanguageNames.VisualBasic), [Shared]> Partial Friend Class VisualBasicSimplificationService Inherits AbstractSimplificationService(Of ExpressionSyntax, ExecutableStatementSyntax, CrefReferenceSyntax) Private Shared ReadOnly s_reducers As ImmutableArray(Of AbstractReducer) = ImmutableArray.Create(Of AbstractReducer)( New VisualBasicExtensionMethodReducer(), New VisualBasicCastReducer(), New VisualBasicNameReducer(), New VisualBasicParenthesesReducer(), New VisualBasicCallReducer(), New VisualBasicEscapingReducer(), ' order before VisualBasicMiscellaneousReducer, see RenameNewOverload test New VisualBasicMiscellaneousReducer(), New VisualBasicCastReducer(), New VisualBasicVariableDeclaratorReducer(), New VisualBasicInferredMemberNameReducer()) <ImportingConstructor> Public Sub New() MyBase.New(s_reducers) End Sub Public Overrides Function Expand(node As SyntaxNode, semanticModel As SemanticModel, aliasReplacementAnnotation As SyntaxAnnotation, expandInsideNode As Func(Of SyntaxNode, Boolean), expandParameter As Boolean, cancellationToken As CancellationToken) As SyntaxNode Using Logger.LogBlock(FunctionId.Simplifier_ExpandNode, cancellationToken) If TypeOf node Is ExpressionSyntax OrElse TypeOf node Is StatementSyntax OrElse TypeOf node Is AttributeSyntax OrElse TypeOf node Is SimpleArgumentSyntax OrElse TypeOf node Is CrefReferenceSyntax OrElse TypeOf node Is TypeConstraintSyntax Then Dim rewriter = New Expander(semanticModel, expandInsideNode, cancellationToken, expandParameter, aliasReplacementAnnotation) Return rewriter.Visit(node) Else Throw New ArgumentException( VBWorkspaceResources.Only_attributes_expressions_or_statements_can_be_made_explicit, paramName:=NameOf(node)) End If End Using End Function Public Overrides Function Expand(token As SyntaxToken, semanticModel As SemanticModel, expandInsideNode As Func(Of SyntaxNode, Boolean), cancellationToken As CancellationToken) As SyntaxToken Using Logger.LogBlock(FunctionId.Simplifier_ExpandToken, cancellationToken) Dim rewriter = New Expander(semanticModel, expandInsideNode, cancellationToken) Return TryEscapeIdentifierToken(rewriter.VisitToken(token)) End Using End Function Protected Overrides Function GetSpeculativeSemanticModel(ByRef nodeToSpeculate As SyntaxNode, originalSemanticModel As SemanticModel, originalNode As SyntaxNode) As SemanticModel Contract.ThrowIfNull(nodeToSpeculate) Contract.ThrowIfNull(originalNode) Dim speculativeModel As SemanticModel Dim methodBlockBase = TryCast(nodeToSpeculate, MethodBlockBaseSyntax) ' Speculation over Field Declarations is not supported If originalNode.Kind() = SyntaxKind.VariableDeclarator AndAlso originalNode.Parent.Kind() = SyntaxKind.FieldDeclaration Then Return originalSemanticModel End If If methodBlockBase IsNot Nothing Then ' Certain reducers for VB (escaping, parentheses) require to operate on the entire method body, rather than individual statements. ' Hence, we need to reduce the entire method body as a single unit. ' However, there is no SyntaxNode for the method body or statement list, hence NodesAndTokensToReduceComputer added the MethodBlockBaseSyntax to the list of nodes to be reduced. ' Here we make sure that we create a speculative semantic model for the method body for the given MethodBlockBaseSyntax. Dim originalMethod = DirectCast(originalNode, MethodBlockBaseSyntax) Contract.ThrowIfFalse(originalMethod.Statements.Any(), "How did empty method body get reduced?") Dim position As Integer If originalSemanticModel.IsSpeculativeSemanticModel Then ' Chaining speculative model Not supported, speculate off the original model. Debug.Assert(originalSemanticModel.ParentModel IsNot Nothing) Debug.Assert(Not originalSemanticModel.ParentModel.IsSpeculativeSemanticModel) position = originalSemanticModel.OriginalPositionForSpeculation originalSemanticModel = originalSemanticModel.ParentModel Else position = originalMethod.Statements.First.SpanStart End If speculativeModel = Nothing originalSemanticModel.TryGetSpeculativeSemanticModelForMethodBody(position, methodBlockBase, speculativeModel) Return speculativeModel End If Contract.ThrowIfFalse(SpeculationAnalyzer.CanSpeculateOnNode(nodeToSpeculate)) Dim isAsNewClause = nodeToSpeculate.Kind = SyntaxKind.AsNewClause If isAsNewClause Then ' Currently, there is no support for speculating on an AsNewClauseSyntax node. ' So we synthesize an EqualsValueSyntax with the inner NewExpression and speculate on this EqualsValueSyntax node. Dim asNewClauseNode = DirectCast(nodeToSpeculate, AsNewClauseSyntax) nodeToSpeculate = SyntaxFactory.EqualsValue(asNewClauseNode.NewExpression) nodeToSpeculate = asNewClauseNode.CopyAnnotationsTo(nodeToSpeculate) End If speculativeModel = SpeculationAnalyzer.CreateSpeculativeSemanticModelForNode(originalNode, nodeToSpeculate, originalSemanticModel) If isAsNewClause Then nodeToSpeculate = speculativeModel.SyntaxTree.GetRoot() End If Return speculativeModel End Function Protected Overrides Function TransformReducedNode(reducedNode As SyntaxNode, originalNode As SyntaxNode) As SyntaxNode ' Please see comments within the above GetSpeculativeSemanticModel method for details. If originalNode.Kind = SyntaxKind.AsNewClause AndAlso reducedNode.Kind = SyntaxKind.EqualsValue Then Return originalNode.ReplaceNode(DirectCast(originalNode, AsNewClauseSyntax).NewExpression, DirectCast(reducedNode, EqualsValueSyntax).Value) End If Dim originalMethod = TryCast(originalNode, MethodBlockBaseSyntax) If originalMethod IsNot Nothing Then Dim reducedMethod = DirectCast(reducedNode, MethodBlockBaseSyntax) reducedMethod = reducedMethod.ReplaceNode(reducedMethod.BlockStatement, originalMethod.BlockStatement) Return reducedMethod.ReplaceNode(reducedMethod.EndBlockStatement, originalMethod.EndBlockStatement) End If Return reducedNode End Function Protected Overrides Function GetNodesAndTokensToReduce(root As SyntaxNode, isNodeOrTokenOutsideSimplifySpans As Func(Of SyntaxNodeOrToken, Boolean)) As ImmutableArray(Of NodeOrTokenToReduce) Return NodesAndTokensToReduceComputer.Compute(root, isNodeOrTokenOutsideSimplifySpans) End Function Protected Overrides Function CanNodeBeSimplifiedWithoutSpeculation(node As SyntaxNode) As Boolean Return node IsNot Nothing AndAlso node.Parent IsNot Nothing AndAlso TypeOf node Is VariableDeclaratorSyntax AndAlso TypeOf node.Parent Is FieldDeclarationSyntax End Function Private Const s_BC50000_UnusedImportsClause As String = "BC50000" Private Const s_BC50001_UnusedImportsStatement As String = "BC50001" Protected Overrides Sub GetUnusedNamespaceImports(model As SemanticModel, namespaceImports As HashSet(Of SyntaxNode), cancellationToken As CancellationToken) Dim root = model.SyntaxTree.GetRoot() Dim diagnostics = model.GetDiagnostics(cancellationToken:=cancellationToken) For Each diagnostic In diagnostics If diagnostic.Id = s_BC50000_UnusedImportsClause OrElse diagnostic.Id = s_BC50001_UnusedImportsStatement Then Dim node = root.FindNode(diagnostic.Location.SourceSpan) Dim statement = TryCast(node, ImportsStatementSyntax) Dim clause = TryCast(node, ImportsStatementSyntax) If statement IsNot Nothing Or clause IsNot Nothing Then namespaceImports.Add(node) End If End If Next End Sub End Class End Namespace
abock/roslyn
src/Workspaces/VisualBasic/Portable/Simplification/VisualBasicSimplificationService.vb
Visual Basic
mit
9,679
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports Microsoft.CodeAnalysis.Completion Imports Microsoft.CodeAnalysis.Completion.Providers Imports Microsoft.CodeAnalysis.Editor.UnitTests Imports Microsoft.CodeAnalysis.Shared.Utilities Imports Microsoft.CodeAnalysis.VisualBasic.Completion.Providers Imports Microsoft.CodeAnalysis.VisualBasic.Completion.SuggestionMode Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion <UseExportProvider> Public Class CompletionProviderOrderTests ''' <summary> ''' Verifies the exact order of all built-in completion providers. ''' </summary> <Fact> Public Sub TestCompletionProviderOrder() Dim completionProviderExports = TestExportProvider.ExportProviderWithCSharpAndVisualBasic.GetExports(Of CompletionProvider, CompletionProviderMetadata)() Dim orderedVisualBasicCompletionProviders = ExtensionOrderer.Order(completionProviderExports.Where(Function(export) export.Metadata.Language = LanguageNames.VisualBasic)) Dim actualOrder = orderedVisualBasicCompletionProviders.Select(Function(x) x.Value.GetType()).ToArray() Dim expectedOrder = { GetType(FirstBuiltInCompletionProvider), GetType(KeywordCompletionProvider), GetType(SymbolCompletionProvider), GetType(ObjectInitializerCompletionProvider), GetType(ObjectCreationCompletionProvider), GetType(EnumCompletionProvider), GetType(NamedParameterCompletionProvider), GetType(VisualBasicSuggestionModeCompletionProvider), GetType(ImplementsClauseCompletionProvider), GetType(HandlesClauseCompletionProvider), GetType(PartialTypeCompletionProvider), GetType(CrefCompletionProvider), GetType(CompletionListTagCompletionProvider), GetType(OverrideCompletionProvider), GetType(XmlDocCommentCompletionProvider), GetType(InternalsVisibleToCompletionProvider), GetType(EmbeddedLanguageCompletionProvider), GetType(TypeImportCompletionProvider), GetType(ExtensionMethodImportCompletionProvider), GetType(LastBuiltInCompletionProvider) } AssertEx.EqualOrDiff( String.Join(Environment.NewLine, expectedOrder.Select(Function(x) x.FullName)), String.Join(Environment.NewLine, actualOrder.Select(Function(x) x.FullName))) End Sub ''' <summary> ''' Verifies that the order of built-in completion providers is deterministic. ''' </summary> <Fact> Public Sub TestCompletionProviderOrderMetadata() Dim completionProviderExports = TestExportProvider.ExportProviderWithCSharpAndVisualBasic.GetExports(Of CompletionProvider, CompletionProviderMetadata)() Dim orderedVisualBasicCompletionProviders = ExtensionOrderer.Order(completionProviderExports.Where(Function(export) export.Metadata.Language = LanguageNames.VisualBasic)) For i = 0 To orderedVisualBasicCompletionProviders.Count - 1 If i = 0 Then Assert.Empty(orderedVisualBasicCompletionProviders(i).Metadata.BeforeTyped) Assert.Empty(orderedVisualBasicCompletionProviders(i).Metadata.AfterTyped) Continue For ElseIf i = orderedVisualBasicCompletionProviders.Count - 1 Then Assert.Empty(orderedVisualBasicCompletionProviders(i).Metadata.BeforeTyped) If Not orderedVisualBasicCompletionProviders(i).Metadata.AfterTyped.Contains(orderedVisualBasicCompletionProviders(i - 1).Metadata.Name) Then ' Make sure the last built-in provider comes before the marker Assert.Contains(orderedVisualBasicCompletionProviders(i).Metadata.Name, orderedVisualBasicCompletionProviders(i - 1).Metadata.BeforeTyped) End If Continue For End If If orderedVisualBasicCompletionProviders(i).Metadata.BeforeTyped.Any() Then Assert.Equal(orderedVisualBasicCompletionProviders.Last().Metadata.Name, Assert.Single(orderedVisualBasicCompletionProviders(i).Metadata.BeforeTyped)) End If Dim after = Assert.Single(orderedVisualBasicCompletionProviders(i).Metadata.AfterTyped) Assert.Equal(orderedVisualBasicCompletionProviders(i - 1).Metadata.Name, after) Next End Sub <Fact> Public Sub TestCompletionProviderFirstNameMetadata() Dim completionProviderExports = TestExportProvider.ExportProviderWithCSharpAndVisualBasic.GetExports(Of CompletionProvider, CompletionProviderMetadata)() Dim orderedVisualBasicCompletionProviders = ExtensionOrderer.Order(completionProviderExports.Where(Function(export) export.Metadata.Language = LanguageNames.VisualBasic)) Dim firstCompletionProvider = orderedVisualBasicCompletionProviders.First() Assert.Equal("FirstBuiltInCompletionProvider", firstCompletionProvider.Metadata.Name) End Sub <Fact> Public Sub TestCompletionProviderLastNameMetadata() Dim completionProviderExports = TestExportProvider.ExportProviderWithCSharpAndVisualBasic.GetExports(Of CompletionProvider, CompletionProviderMetadata)() Dim orderedVisualBasicCompletionProviders = ExtensionOrderer.Order(completionProviderExports.Where(Function(export) export.Metadata.Language = LanguageNames.VisualBasic)) Dim lastCompletionProvider = orderedVisualBasicCompletionProviders.Last() Assert.Equal("LastBuiltInCompletionProvider", lastCompletionProvider.Metadata.Name) End Sub <Fact> Public Sub TestCompletionProviderNameMetadata() Dim completionProviderExports = TestExportProvider.ExportProviderWithCSharpAndVisualBasic.GetExports(Of CompletionProvider, CompletionProviderMetadata)() Dim visualBasicCompletionProviders = completionProviderExports.Where(Function(export) export.Metadata.Language = LanguageNames.VisualBasic) For Each export In visualBasicCompletionProviders Assert.Equal(export.Value.GetType().Name, export.Metadata.Name) Next End Sub End Class End Namespace
reaction1989/roslyn
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviderOrderTests.vb
Visual Basic
apache-2.0
6,707
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.Composition Imports System.Threading Imports Microsoft.CodeAnalysis.Highlighting Imports Microsoft.CodeAnalysis.Host.Mef Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeAnalysis.VisualBasic.KeywordHighlighting <ExportHighlighter(LanguageNames.VisualBasic), [Shared]> Friend Class PropertyDeclarationHighlighter Inherits AbstractKeywordHighlighter(Of PropertyStatementSyntax) <ImportingConstructor> <Obsolete(MefConstruction.ImportingConstructorMessage, True)> Public Sub New() End Sub Protected Overrides Sub AddHighlights(propertyDeclaration As PropertyStatementSyntax, highlights As List(Of TextSpan), cancellationToken As CancellationToken) ' If the ancestor is not a property block, treat this as an auto-property. ' Otherwise, let the PropertyBlockHighlighter take over. Dim propertyBlock = propertyDeclaration.GetAncestor(Of PropertyBlockSyntax)() If propertyBlock IsNot Nothing Then Return End If With propertyDeclaration Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword) highlights.Add(TextSpan.FromBounds(firstKeyword.SpanStart, .DeclarationKeyword.Span.End)) If .ImplementsClause IsNot Nothing Then highlights.Add(.ImplementsClause.ImplementsKeyword.Span) End If End With End Sub End Class End Namespace
mavasani/roslyn
src/Features/VisualBasic/Portable/Highlighting/KeywordHighlighters/PropertyDeclarationHighlighter.vb
Visual Basic
mit
1,787
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.IO Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.SpecialType Imports Microsoft.CodeAnalysis.Test.Extensions Imports Microsoft.CodeAnalysis.Test.Utilities Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic Imports Microsoft.CodeAnalysis.VisualBasic.OverloadResolution Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Roslyn.Test.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests.Semantics Public Class UnaryOperators Inherits BasicTestBase <Fact> <WorkItem(33564, "https://github.com/dotnet/roslyn/issues/33564")> Public Sub Test1() Dim source = <compilation name="UnaryOperator1"> <file name="a.vb"> Option Strict Off Module Module1 Sub Main() Dim Bo As Boolean Dim SB As SByte Dim By As Byte Dim Sh As Short Dim US As UShort Dim [In] As Integer Dim UI As UInteger Dim Lo As Long Dim UL As ULong Dim De As Decimal Dim Si As Single Dim [Do] As Double Dim St As String Dim Ob As Object Dim Tc As System.TypeCode Bo = False SB = -1 By = 2 Sh = -3 US = 4 [In] = -5 UI = 6 Lo = -7 UL = 8 De = -9D Si = 10 [Do] = -11 St = "12" Ob = -13 System.Console.WriteLine("Unary Minus") PrintResult(-Nothing) PrintResult(-Bo) PrintResult(-SB) PrintResult(-By) PrintResult(-Sh) PrintResult(-US) PrintResult(-[In]) PrintResult(-UI) PrintResult(-Lo) PrintResult(-UL) PrintResult(-De) PrintResult(-Si) PrintResult(-[Do]) PrintResult(-St) PrintResult(-Ob) PrintResult(-Tc) PrintResult(-True) PrintResult(-False) PrintResult(-System.SByte.MaxValue) PrintResult(-System.Byte.MaxValue) PrintResult(-14S) PrintResult(-15US) PrintResult(-16I) PrintResult(-17UI) PrintResult(-19L) PrintResult(-20UL) PrintResult(-System.Single.MaxValue) PrintResult(-22.0) PrintResult(-23D) PrintResult(-"24") System.Console.WriteLine("") System.Console.WriteLine("Unary Plus") PrintResult(+Nothing) PrintResult(+Bo) PrintResult(+SB) PrintResult(+By) PrintResult(+Sh) PrintResult(+US) PrintResult(+[In]) PrintResult(+UI) PrintResult(+Lo) PrintResult(+UL) PrintResult(+De) PrintResult(+Si) PrintResult(+[Do]) PrintResult(+St) PrintResult(+Ob) PrintResult(+Tc) PrintResult(+True) PrintResult(+False) PrintResult(+System.SByte.MaxValue) PrintResult(+System.Byte.MaxValue) PrintResult(+14S) PrintResult(+15US) PrintResult(+16I) PrintResult(+17UI) PrintResult(+19L) PrintResult(+20UL) PrintResult(+System.Single.MaxValue) PrintResult(+22.0) PrintResult(+23D) PrintResult(+"24") System.Console.WriteLine("") System.Console.WriteLine("Logical Not") PrintResult(Not Nothing) PrintResult(Not Bo) PrintResult(Not SB) PrintResult(Not By) PrintResult(Not Sh) PrintResult(Not US) PrintResult(Not [In]) PrintResult(Not UI) PrintResult(Not Lo) PrintResult(Not UL) PrintResult(Not De) PrintResult(Not Si) PrintResult(Not [Do]) PrintResult(Not St) PrintResult(Not Ob) PrintResult(Not Tc) PrintResult(Not True) PrintResult(Not False) PrintResult(Not System.SByte.MaxValue) PrintResult(Not System.Byte.MaxValue) PrintResult(Not 14S) PrintResult(Not 15US) PrintResult(Not 16I) PrintResult(Not 17UI) PrintResult(Not 19L) PrintResult(Not 20UL) PrintResult(Not 21.0F) PrintResult(Not 22.0) PrintResult(Not 23D) PrintResult(Not "24") End Sub Sub PrintResult(val As Boolean) System.Console.WriteLine("Boolean: {0}", val) End Sub Sub PrintResult(val As SByte) System.Console.WriteLine("SByte: {0}", val) End Sub Sub PrintResult(val As Byte) System.Console.WriteLine("Byte: {0}", val) End Sub Sub PrintResult(val As Short) System.Console.WriteLine("Short: {0}", val) End Sub Sub PrintResult(val As UShort) System.Console.WriteLine("UShort: {0}", val) End Sub Sub PrintResult(val As Integer) System.Console.WriteLine("Integer: {0}", val) End Sub Sub PrintResult(val As UInteger) System.Console.WriteLine("UInteger: {0}", val) End Sub Sub PrintResult(val As Long) System.Console.WriteLine("Long: {0}", val) End Sub Sub PrintResult(val As ULong) System.Console.WriteLine("ULong: {0}", val) End Sub Sub PrintResult(val As Decimal) System.Console.WriteLine("Decimal: {0}", val) End Sub Sub PrintResult(val As Single) System.Console.WriteLine("Single: {0}", val.ToString("G7", System.Globalization.CultureInfo.InvariantCulture)) End Sub Sub PrintResult(val As Double) System.Console.WriteLine("Double: {0}", val) End Sub 'Sub PrintResult(val As Date) ' System.Console.WriteLine("Date: {0}", val) 'End Sub Sub PrintResult(val As Char) System.Console.WriteLine("Char: {0}", val) End Sub Sub PrintResult(val As String) System.Console.WriteLine("String: ") System.Console.WriteLine(val) End Sub Sub PrintResult(val As Object) System.Console.WriteLine("Object: {0}", val) End Sub Sub PrintResult(val As System.TypeCode) System.Console.WriteLine("TypeCode: {0}", val) End Sub End Module </file> </compilation> Dim expected = <![CDATA[ Unary Minus Integer: 0 Short: 0 SByte: 1 Short: -2 Short: 3 Integer: -4 Integer: 5 Long: -6 Long: 7 Decimal: -8 Decimal: 9 Single: -10 Double: 11 Double: -12 Object: 13 Integer: 0 Short: 1 Short: 0 SByte: -127 Short: -255 Short: -14 Integer: -15 Integer: -16 Long: -17 Long: -19 Decimal: -20 Single: -3.402823E+38 Double: -22 Decimal: -23 Double: -24 Unary Plus Integer: 0 Short: 0 SByte: -1 Byte: 2 Short: -3 UShort: 4 Integer: -5 UInteger: 6 Long: -7 ULong: 8 Decimal: -9 Single: 10 Double: -11 Double: 12 Object: -13 Integer: 0 Short: -1 Short: 0 SByte: 127 Byte: 255 Short: 14 UShort: 15 Integer: 16 UInteger: 17 Long: 19 ULong: 20 Single: 3.402823E+38 Double: 22 Decimal: 23 Double: 24 Logical Not Integer: -1 Boolean: True SByte: 0 Byte: 253 Short: 2 UShort: 65531 Integer: 4 UInteger: 4294967289 Long: 6 ULong: 18446744073709551607 Long: 8 Long: -11 Long: 10 Long: -13 Object: 12 TypeCode: -1 Boolean: False Boolean: True SByte: -128 Byte: 0 Short: -15 UShort: 65520 Integer: -17 UInteger: 4294967278 Long: -20 ULong: 18446744073709551595 Long: -22 Long: -23 Long: -24 Long: -25 ]]> Dim c1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe) Assert.True(c1.Options.CheckOverflow) CompileAndVerify(c1, expected) c1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOverflowChecks(False)) Assert.False(c1.Options.CheckOverflow) CompileAndVerify(c1, expected) End Sub <Fact> Public Sub Test2() Dim compilationDef = <compilation name="Test2"> <file name="a.vb"> Option Strict On Module Module1 Sub Main() Dim Da As Date Dim Ch As Char Dim Ob As Object Dim result As Object result = -Da result = -Ch result = -Ob result = +Da result = +Ch result = +Ob result = Not Da result = Not Ch result = Not Ob result = --Da End Sub End Module </file> </compilation> Dim c1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef) CompilationUtils.AssertTheseDiagnostics(c1, <expected> BC30487: Operator '-' is not defined for type 'Date'. result = -Da ~~~ BC30487: Operator '-' is not defined for type 'Char'. result = -Ch ~~~ BC30038: Option Strict On prohibits operands of type Object for operator '-'. result = -Ob ~~ BC42104: Variable 'Ob' is used before it has been assigned a value. A null reference exception could result at runtime. result = -Ob ~~ BC30487: Operator '+' is not defined for type 'Date'. result = +Da ~~~ BC30487: Operator '+' is not defined for type 'Char'. result = +Ch ~~~ BC30038: Option Strict On prohibits operands of type Object for operator '+'. result = +Ob ~~ BC30487: Operator 'Not' is not defined for type 'Date'. result = Not Da ~~~~~~ BC30487: Operator 'Not' is not defined for type 'Char'. result = Not Ch ~~~~~~ BC30038: Option Strict On prohibits operands of type Object for operator 'Not'. result = Not Ob ~~ BC30487: Operator '-' is not defined for type 'Date'. result = --Da ~~~ </expected>) End Sub <Fact> Public Sub Test3() Dim c1 = VisualBasicCompilation.Create("Test3", syntaxTrees:={VisualBasicSyntaxTree.ParseText( <text> Option Strict Off Module Module1 Interface I1 End Interface Function Main() As I1 Dim result As Object result = -Nothing End Function End Module</text>.Value )}, references:=Nothing, options:=TestOptions.ReleaseDll) CompilationUtils.AssertTheseDiagnostics(c1, <expected> BC31091: Import of type 'Object' from assembly or module 'Test3.dll' failed. Module Module1 ~~~~~~~ BC35000: Requested operation is not available because the runtime library function 'Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute..ctor' is not defined. Module Module1 ~~~~~~~ BC30002: Type 'System.Object' is not defined. Dim result As Object ~~~~~~ BC30002: Type 'System.Int32' is not defined. result = -Nothing ~~~~~~~ BC42105: Function 'Main' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used. End Function ~~~~~~~~~~~~ </expected>) End Sub <Fact> Public Sub Test4() Dim source = <compilation name="UnaryOperator4"> <file name="a.vb"> Option Strict Off Imports System Module Module1 Sub Main() Dim Ob As Object Ob = -System.Byte.MinValue Ob = -System.Byte.MaxValue Ob = -System.SByte.MinValue Ob = -System.SByte.MaxValue Ob = -Int16.MinValue Ob = -Int16.MaxValue Ob = -UInt16.MaxValue Ob = -UInt16.MinValue Ob = -Int32.MinValue Ob = -Int32.MaxValue Ob = -UInt32.MaxValue Ob = -UInt32.MinValue Ob = -Int64.MinValue Ob = -Int64.MaxValue Ob = -UInt64.MaxValue Ob = -UInt64.MinValue Ob = -System.Decimal.MaxValue Ob = -System.Decimal.MinValue Ob = -System.Single.MaxValue Ob = -System.Single.MinValue Ob = -System.Double.MaxValue Ob = -System.Double.MinValue End Sub End Module </file> </compilation> Dim expected = <expected> BC30439: Constant expression not representable in type 'SByte'. Ob = -System.SByte.MinValue ~~~~~~~~~~~~~~~~~~~~~~ BC30439: Constant expression not representable in type 'Short'. Ob = -Int16.MinValue ~~~~~~~~~~~~~~~ BC30439: Constant expression not representable in type 'Integer'. Ob = -Int32.MinValue ~~~~~~~~~~~~~~~ BC30439: Constant expression not representable in type 'Long'. Ob = -Int64.MinValue ~~~~~~~~~~~~~~~ </expected> Dim c1 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source) Assert.True(c1.Options.CheckOverflow) CompilationUtils.AssertTheseDiagnostics(c1, expected) Dim c2 = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.ReleaseExe.WithOverflowChecks(False)) Assert.False(c2.Options.CheckOverflow) CompilationUtils.AssertTheseDiagnostics(c2, expected) End Sub <Fact> Public Sub Test5() Dim compilationDef = <compilation name="UnaryOperator2"> <file name="a.vb"> Imports System Module Module1 Sub Main() Dim Ob As Object = Nothing Ob = -Ob Ob = +Ob Ob = Not Ob End Sub End Module </file> </compilation> Dim expected = <expected> BC42019: Operands of type Object used for operator '-'; runtime errors could occur. Ob = -Ob ~~ BC42019: Operands of type Object used for operator '+'; runtime errors could occur. Ob = +Ob ~~ BC42019: Operands of type Object used for operator 'Not'; runtime errors could occur. Ob = Not Ob ~~ </expected> Dim compilation = CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(compilationDef, TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom)) Assert.Equal(OptionStrict.Custom, compilation.Options.OptionStrict) CompilationUtils.AssertTheseDiagnostics(compilation, expected) End Sub <WorkItem(544620, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544620")> <Fact()> Public Sub Bug13088() Dim compilation = CreateCompilationWithMscorlib40AndVBRuntime( <compilation> <file name="a.vb"><![CDATA[ Module Program Public Const Z1 As Integer = +2147483648 'BIND:"Public Const Z1 As Integer = +2147483648" Public Const Z2 As Integer = (-(-2147483648)) 'BIND1:"Public Const Z2 As Integer = (-(-2147483648))" Sub Main() End Sub End Module ]]></file> </compilation>) VerifyDiagnostics(compilation, Diagnostic(ERRID.ERR_ExpressionOverflow1, "+2147483648").WithArguments("Integer"), Diagnostic(ERRID.ERR_ExpressionOverflow1, "(-(-2147483648))").WithArguments("Integer")) Dim symbol = compilation.GlobalNamespace.GetTypeMembers("Program").Single.GetMembers("Z1").Single Assert.False(DirectCast(symbol, FieldSymbol).HasConstantValue) symbol = compilation.GlobalNamespace.GetTypeMembers("Program").Single.GetMembers("Z2").Single Assert.False(DirectCast(symbol, FieldSymbol).HasConstantValue) End Sub <Fact()> Public Sub IntrinsicSymbols() Dim operators() As UnaryOperatorKind = { UnaryOperatorKind.Plus, UnaryOperatorKind.Minus, UnaryOperatorKind.Not } Dim opTokens = (From op In operators Select SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(op))).ToArray() Dim typeNames() As String = { "System.Object", "System.String", "System.Double", "System.SByte", "System.Int16", "System.Int32", "System.Int64", "System.Decimal", "System.Single", "System.Byte", "System.UInt16", "System.UInt32", "System.UInt64", "System.Boolean", "System.Char", "System.DateTime", "System.TypeCode", "System.StringComparison", "System.Guid" } Dim builder As New System.Text.StringBuilder Dim n As Integer = 0 For Each arg1 In typeNames n += 1 builder.AppendFormat( "Sub Test{1}(x1 as {0}, x2 as {0}?)" & vbCrLf, arg1, n) Dim k As Integer = 0 For Each opToken In opTokens builder.AppendFormat( " Dim z{0}_1 = {1} x1" & vbCrLf & " Dim z{0}_2 = {1} x2" & vbCrLf & " If {1} x1" & vbCrLf & " End If" & vbCrLf & " If {1} x2" & vbCrLf & " End If" & vbCrLf, k, opToken) k += 1 Next builder.Append( "End Sub" & vbCrLf) Next Dim source = <compilation> <file name="a.vb"> Class Module1 <%= New System.Xml.Linq.XCData(builder.ToString()) %> End Class </file> </compilation> Dim compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithOverflowChecks(True)) Dim tree As SyntaxTree = (From t In compilation.SyntaxTrees Where t.FilePath = "a.vb").Single() Dim semanticModel = compilation.GetSemanticModel(tree) Dim nodes = (From node In tree.GetRoot().DescendantNodes() Select node = TryCast(node, UnaryExpressionSyntax) Where node IsNot Nothing).ToArray() n = 0 For Each name In typeNames Dim type = compilation.GetTypeByMetadataName(name) For Each op In operators TestIntrinsicSymbol( op, type, compilation, semanticModel, nodes(n), nodes(n + 1), nodes(n + 2), nodes(n + 3)) n += 4 Next Next Assert.Equal(n, nodes.Length) End Sub Private Sub TestIntrinsicSymbol( op As UnaryOperatorKind, type As TypeSymbol, compilation As VisualBasicCompilation, semanticModel As SemanticModel, node1 As UnaryExpressionSyntax, node2 As UnaryExpressionSyntax, node3 As UnaryExpressionSyntax, node4 As UnaryExpressionSyntax ) Dim info1 As SymbolInfo = semanticModel.GetSymbolInfo(node1) Assert.Equal(CandidateReason.None, info1.CandidateReason) Assert.Equal(0, info1.CandidateSymbols.Length) Dim symbol1 = DirectCast(info1.Symbol, MethodSymbol) Dim symbol2 = semanticModel.GetSymbolInfo(node2).Symbol Dim symbol3 = DirectCast(semanticModel.GetSymbolInfo(node3).Symbol, MethodSymbol) Dim symbol4 = semanticModel.GetSymbolInfo(node4).Symbol Assert.Equal(symbol1, symbol3) If symbol1 IsNot Nothing Then Assert.NotSame(symbol1, symbol3) Assert.Equal(symbol1.GetHashCode(), symbol3.GetHashCode()) Assert.Equal(symbol1.Parameters(0), symbol3.Parameters(0)) Assert.Equal(symbol1.Parameters(0).GetHashCode(), symbol3.Parameters(0).GetHashCode()) End If Assert.Equal(symbol2, symbol4) Dim special As SpecialType = type.GetEnumUnderlyingTypeOrSelf().SpecialType Dim resultType As SpecialType = OverloadResolution.ResolveNotLiftedIntrinsicUnaryOperator(op, special) If resultType = SpecialType.None Then Assert.Null(symbol1) Assert.Null(symbol2) Assert.Null(symbol3) Assert.Null(symbol4) Return End If Assert.NotNull(symbol1) Dim containerName As String = compilation.GetSpecialType(resultType).ToTestDisplayString() Dim returnName As String = containerName If op = UnaryOperatorKind.Not AndAlso type.IsEnumType() Then containerName = type.ToTestDisplayString() returnName = containerName End If Assert.Equal(String.Format("Function {0}.{1}(value As {0}) As {2}", containerName, OverloadResolution.TryGetOperatorName(op), returnName), symbol1.ToTestDisplayString()) Assert.Equal(MethodKind.BuiltinOperator, symbol1.MethodKind) Assert.True(symbol1.IsImplicitlyDeclared) Assert.Equal(op = UnaryOperatorKind.Minus AndAlso symbol1.ContainingType.IsIntegralType(), symbol1.IsCheckedBuiltin) Assert.False(symbol1.IsGenericMethod) Assert.False(symbol1.IsExtensionMethod) Assert.False(symbol1.IsExternalMethod) Assert.False(symbol1.CanBeReferencedByName) Assert.Null(symbol1.DeclaringCompilation) Assert.Equal(symbol1.Name, symbol1.MetadataName) Assert.Same(symbol1.ContainingSymbol, symbol1.Parameters(0).Type) Assert.Equal(0, symbol1.Locations.Length) Assert.Null(symbol1.GetDocumentationCommentId) Assert.Equal("", symbol1.GetDocumentationCommentXml) Assert.True(symbol1.HasSpecialName) Assert.True(symbol1.IsShared) Assert.Equal(Accessibility.Public, symbol1.DeclaredAccessibility) Assert.False(symbol1.IsOverloads) Assert.False(symbol1.IsOverrides) Assert.False(symbol1.IsOverridable) Assert.False(symbol1.IsMustOverride) Assert.False(symbol1.IsNotOverridable) Assert.Equal(1, symbol1.ParameterCount) Assert.Equal(0, symbol1.Parameters(0).Ordinal) Dim otherSymbol = DirectCast(semanticModel.GetSymbolInfo(node1).Symbol, MethodSymbol) Assert.Equal(symbol1, otherSymbol) If type.IsValueType Then Assert.Equal(symbol1, symbol2) Return End If Assert.Null(symbol2) End Sub <Fact()> Public Sub CheckedIntrinsicSymbols() Dim source = <compilation> <file name="a.vb"> Class Module1 Sub Test(x as Integer) Dim z1 = -x End Sub End Class </file> </compilation> Dim compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithOverflowChecks(False)) Dim tree As SyntaxTree = (From t In compilation.SyntaxTrees Where t.FilePath = "a.vb").Single() Dim semanticModel = compilation.GetSemanticModel(tree) Dim node1 = (From node In tree.GetRoot().DescendantNodes() Select node = TryCast(node, UnaryExpressionSyntax) Where node IsNot Nothing).Single() Dim symbol1 = DirectCast(semanticModel.GetSymbolInfo(node1).Symbol, MethodSymbol) Assert.False(symbol1.IsCheckedBuiltin) compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOverflowChecks(True)) semanticModel = compilation.GetSemanticModel(tree) Dim symbol2 = DirectCast(semanticModel.GetSymbolInfo(node1).Symbol, MethodSymbol) Assert.True(symbol2.IsCheckedBuiltin) Assert.NotEqual(symbol1, symbol2) End Sub End Class End Namespace
jmarolf/roslyn
src/Compilers/VisualBasic/Test/Semantic/Semantics/UnaryOperators.vb
Visual Basic
mit
24,042
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.Collections.Immutable Imports Microsoft.CodeAnalysis.PooledObjects Imports Microsoft.CodeAnalysis.Text Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports System.Runtime.InteropServices Namespace Microsoft.CodeAnalysis.VisualBasic ''' <summary> ''' Binder used for interiors of documentation comment ''' </summary> Friend MustInherit Class DocumentationCommentBinder Inherits Binder Protected Sub New(containingBinder As Binder, commentedSymbol As Symbol) MyBase.New(containingBinder) CheckBinderSymbolRelationship(containingBinder, commentedSymbol) Me.CommentedSymbol = commentedSymbol End Sub ''' <summary> ''' Assuming there is one, the containing member of the binder is the commented symbol if and only if ''' the commented symbol is a non-delegate named type. (Otherwise, it is the containing type or namespace of the commented symbol.) ''' </summary> ''' <remarks> ''' Delegates don't have user-defined members, so it makes more sense to treat ''' them like methods. ''' </remarks> <Conditional("DEBUG")> Private Shared Sub CheckBinderSymbolRelationship(containingBinder As Binder, commentedSymbol As Symbol) If commentedSymbol Is Nothing Then Return End If Dim commentedNamedType = TryCast(commentedSymbol, NamedTypeSymbol) Dim binderContainingMember As Symbol = containingBinder.ContainingMember If commentedNamedType IsNot Nothing AndAlso commentedNamedType.TypeKind <> TypeKind.Delegate Then Debug.Assert(binderContainingMember = commentedSymbol) ElseIf commentedSymbol.ContainingType IsNot Nothing Then Debug.Assert(TypeSymbol.Equals(DirectCast(binderContainingMember, TypeSymbol), commentedSymbol.ContainingType, TypeCompareKind.ConsiderEverything)) Else ' It's not worth writing a complicated check that handles merged namespaces. Debug.Assert(binderContainingMember <> commentedSymbol) Debug.Assert(binderContainingMember.Kind = SymbolKind.Namespace) End If End Sub Friend Enum BinderType None Cref NameInTypeParamRef NameInTypeParam NameInParamOrParamRef End Enum Public Shared Function IsIntrinsicTypeForDocumentationComment(kind As SyntaxKind) As Boolean Select Case kind Case SyntaxKind.ShortKeyword, SyntaxKind.UShortKeyword, SyntaxKind.IntegerKeyword, SyntaxKind.UIntegerKeyword, SyntaxKind.LongKeyword, SyntaxKind.ULongKeyword, SyntaxKind.DecimalKeyword, SyntaxKind.SingleKeyword, SyntaxKind.DoubleKeyword, SyntaxKind.SByteKeyword, SyntaxKind.ByteKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.CharKeyword, SyntaxKind.DateKeyword, SyntaxKind.StringKeyword Return True Case Else Return False End Select End Function Friend Shared Function GetBinderTypeForNameAttribute(node As BaseXmlAttributeSyntax) As DocumentationCommentBinder.BinderType Return GetBinderTypeForNameAttribute(GetParentXmlElementName(node)) End Function Friend Shared Function GetBinderTypeForNameAttribute(parentNodeName As String) As DocumentationCommentBinder.BinderType If parentNodeName IsNot Nothing Then If DocumentationCommentXmlNames.ElementEquals(parentNodeName, DocumentationCommentXmlNames.ParameterElementName, True) OrElse DocumentationCommentXmlNames.ElementEquals(parentNodeName, DocumentationCommentXmlNames.ParameterReferenceElementName, True) Then Return DocumentationCommentBinder.BinderType.NameInParamOrParamRef ElseIf DocumentationCommentXmlNames.ElementEquals(parentNodeName, DocumentationCommentXmlNames.TypeParameterElementName, True) Then Return DocumentationCommentBinder.BinderType.NameInTypeParam ElseIf DocumentationCommentXmlNames.ElementEquals(parentNodeName, DocumentationCommentXmlNames.TypeParameterReferenceElementName, True) Then Return DocumentationCommentBinder.BinderType.NameInTypeParamRef End If End If Return DocumentationCommentBinder.BinderType.None End Function Friend Shared Function GetParentXmlElementName(attr As BaseXmlAttributeSyntax) As String Dim parent As VisualBasicSyntaxNode = attr.Parent If parent Is Nothing Then Return Nothing End If Select Case parent.Kind Case SyntaxKind.XmlEmptyElement Dim element = DirectCast(parent, XmlEmptyElementSyntax) If element.Name.Kind <> SyntaxKind.XmlName Then Return Nothing End If Return DirectCast(element.Name, XmlNameSyntax).LocalName.ValueText Case SyntaxKind.XmlElementStartTag Dim element = DirectCast(parent, XmlElementStartTagSyntax) If element.Name.Kind <> SyntaxKind.XmlName Then Return Nothing End If Return DirectCast(element.Name, XmlNameSyntax).LocalName.ValueText End Select Return Nothing End Function ''' <summary> ''' Symbol commented with the documentation comment handled by this binder. In general, ''' all name lookup is being performed in context of this symbol's containing symbol. ''' We still need this symbol, though, to be able to find type parameters or parameters ''' referenced from 'param', 'paramref', 'typeparam' and 'typeparamref' tags. ''' </summary> Protected ReadOnly CommentedSymbol As Symbol Friend Overrides Function BindXmlNameAttributeValue(identifier As IdentifierNameSyntax, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ImmutableArray(Of Symbol) Throw ExceptionUtilities.Unreachable End Function Friend Overrides Function BindInsideCrefAttributeValue(name As TypeSyntax, preserveAliases As Boolean, diagnosticBag As BindingDiagnosticBag, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ImmutableArray(Of Symbol) Throw ExceptionUtilities.Unreachable End Function Friend Overrides Function BindInsideCrefAttributeValue(reference As CrefReferenceSyntax, preserveAliases As Boolean, diagnosticBag As BindingDiagnosticBag, <[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)) As ImmutableArray(Of Symbol) Throw ExceptionUtilities.Unreachable End Function Protected Shared Function FindSymbolInSymbolArray(Of TSymbol As Symbol)( name As String, symbols As ImmutableArray(Of TSymbol)) As ImmutableArray(Of Symbol) If Not symbols.IsEmpty Then For Each p In symbols If IdentifierComparison.Equals(name, p.Name) Then Return ImmutableArray.Create(Of Symbol)(p) End If Next End If Return ImmutableArray(Of Symbol).Empty End Function Friend Overrides Function BinderSpecificLookupOptions(options As LookupOptions) As LookupOptions Return ContainingBinder.BinderSpecificLookupOptions(options) Or LookupOptions.UseBaseReferenceAccessibility End Function ''' <summary> ''' Removes from symbol collection overridden methods or properties ''' </summary> Protected Shared Sub RemoveOverriddenMethodsAndProperties(symbols As ArrayBuilder(Of Symbol)) If symbols Is Nothing OrElse symbols.Count < 2 Then Return End If ' Do we have any method or property? Dim originalDef2Symbol As Dictionary(Of Symbol, Integer) = Nothing For i = 0 To symbols.Count - 1 Dim sym As Symbol = symbols(i) Select Case sym.Kind Case SymbolKind.Method, SymbolKind.Property If originalDef2Symbol Is Nothing Then originalDef2Symbol = New Dictionary(Of Symbol, Integer)() End If originalDef2Symbol.Add(sym.OriginalDefinition, i) End Select Next If originalDef2Symbol Is Nothing Then Return End If ' Do we need to remove any? Dim indices2remove As ArrayBuilder(Of Integer) = Nothing For i = 0 To symbols.Count - 1 Dim index As Integer = -1 Dim sym As Symbol = symbols(i) Select Case sym.Kind Case SymbolKind.Method ' Remove overridden methods Dim method = DirectCast(sym.OriginalDefinition, MethodSymbol) While True method = method.OverriddenMethod If method Is Nothing Then Exit While End If If originalDef2Symbol.TryGetValue(method, index) Then If indices2remove Is Nothing Then indices2remove = ArrayBuilder(Of Integer).GetInstance End If indices2remove.Add(index) End If End While Case SymbolKind.Property ' Remove overridden properties Dim prop = DirectCast(sym.OriginalDefinition, PropertySymbol) While True prop = prop.OverriddenProperty If prop Is Nothing Then Exit While End If If originalDef2Symbol.TryGetValue(prop, index) Then If indices2remove Is Nothing Then indices2remove = ArrayBuilder(Of Integer).GetInstance End If indices2remove.Add(index) End If End While End Select Next If indices2remove Is Nothing Then Return End If ' remove elements by indices from 'indices2remove' For i = 0 To indices2remove.Count - 1 symbols(indices2remove(i)) = Nothing Next Dim target As Integer = 0 For source = 0 To symbols.Count - 1 Dim sym As Symbol = symbols(source) If sym IsNot Nothing Then symbols(target) = sym target += 1 End If Next symbols.Clip(target) indices2remove.Free() End Sub End Class End Namespace
physhi/roslyn
src/Compilers/VisualBasic/Portable/Binding/DocumentationCommentBinder.vb
Visual Basic
apache-2.0
12,003
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Threading Imports Microsoft.CodeAnalysis.VisualBasic Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.SymbolId Public Class SymbolKeyTestBase Inherits BasicTestBase <Flags> Friend Enum SymbolIdComparison None = 0 CaseSensitive = 1 CaseInsensitive = 2 IgnoreAssemblyIds = 4 End Enum <Flags> Friend Enum SymbolCategory All = 0 DeclaredNamespace = 1 DeclaredType = 2 NonTypeMember = 4 Parameter = 16 Local = 32 End Enum #Region "Verification" Friend Shared Sub ResolveAndVerifySymbolList(newSymbols As IEnumerable(Of ISymbol), newCompilation As Compilation, originalSymbols As IEnumerable(Of ISymbol), originalCompilation As Compilation) Dim newlist = newSymbols.OrderBy(Function(s) s.Name).ToList() Dim origlist = originalSymbols.OrderBy(Function(s) s.Name).ToList() Assert.Equal(origlist.Count, newlist.Count) For i = 0 To newlist.Count - 1 ResolveAndVerifySymbol(newlist(i), newCompilation, origlist(i), originalCompilation) Next End Sub Friend Shared Sub ResolveAndVerifyTypeSymbol(node As ExpressionSyntax, sourceSymbol As ITypeSymbol, model As SemanticModel, sourceComp As Compilation) Dim typeinfo = model.GetTypeInfo(node) ResolveAndVerifySymbol(If(typeinfo.Type, typeinfo.ConvertedType), model.Compilation, sourceSymbol, sourceComp) End Sub Friend Shared Sub ResolveAndVerifySymbol(node As ExpressionSyntax, sourceSymbol As ISymbol, model As SemanticModel, sourceComp As Compilation, Optional comparison As SymbolIdComparison = SymbolIdComparison.None) Dim syminfo = model.GetSymbolInfo(node) Dim symbol = syminfo.Symbol If symbol Is Nothing Then symbol = syminfo.CandidateSymbols.Single() End If ResolveAndVerifySymbol(symbol, model.Compilation, sourceSymbol, sourceComp, comparison) End Sub Friend Shared Sub ResolveAndVerifySymbol(symbol1 As ISymbol, compilation1 As Compilation, symbol2 As ISymbol, compilation2 As Compilation, Optional comparison As SymbolIdComparison = SymbolIdComparison.None) AssertSymbolsIdsEqual(symbol1, compilation1, symbol2, compilation2, comparison) Dim resolvedSymbol = ResolveSymbol(symbol1, compilation1, compilation2, comparison) Assert.NotNull(resolvedSymbol) Assert.Equal(symbol2, resolvedSymbol) Assert.Equal(symbol2.GetHashCode(), resolvedSymbol.GetHashCode()) End Sub Friend Shared Function ResolveSymbol(originalSymbol As ISymbol, originalCompilation As Compilation, targetCompilation As Compilation, comparison As SymbolIdComparison) As ISymbol Dim sid = SymbolKey.Create(originalSymbol, originalCompilation, CancellationToken.None) Dim symInfo = sid.Resolve(targetCompilation, (comparison And SymbolIdComparison.IgnoreAssemblyIds) = SymbolIdComparison.IgnoreAssemblyIds) Return symInfo.Symbol End Function Friend Shared Sub AssertSymbolsIdsEqual(symbol1 As ISymbol, compilation1 As Compilation, symbol2 As ISymbol, compilation2 As Compilation, comparison As SymbolIdComparison, Optional expectEqual As Boolean = True) Dim sid1 = SymbolKey.Create(symbol1, compilation1, CancellationToken.None) Dim sid2 = SymbolKey.Create(symbol2, compilation2, CancellationToken.None) Dim isCaseSensitive = (comparison And SymbolIdComparison.CaseSensitive) = SymbolIdComparison.CaseSensitive Dim ignoreAssemblyIds = (comparison And SymbolIdComparison.IgnoreAssemblyIds) = SymbolIdComparison.IgnoreAssemblyIds Dim message = String.Concat( If(isCaseSensitive, "SymbolID CaseSensitive", "SymbolID CaseInsensitive"), If(ignoreAssemblyIds, " IgnoreAssemblyIds ", " "), "Compare") If expectEqual Then Assert.[True](CodeAnalysis.SymbolKey.GetComparer(isCaseSensitive, ignoreAssemblyIds).Equals(sid2, sid1), message) Else Assert.[False](CodeAnalysis.SymbolKey.GetComparer(isCaseSensitive, ignoreAssemblyIds).Equals(sid2, sid1), message) End If End Sub #End Region #Region "Utilities" Friend Shared Function GetBindNodes(Of T As VisualBasicSyntaxNode)(comp As VisualBasicCompilation, fileName As String, count As Integer) As IList(Of T) Dim list = New List(Of T)() ' 1 based - BIND#: For i = 1 To count Try Dim node = CompilationUtils.FindBindingText(Of T)(comp, fileName, i) list.Add(node) Catch ex As Exception Exit For End Try Next Return list End Function Friend Shared Function GetSourceSymbols(comp As VisualBasicCompilation, category As SymbolCategory) As IEnumerable(Of ISymbol) Dim list = GetSourceSymbols(comp, includeLocals:=(category And SymbolCategory.Local) <> 0) Dim kinds = New List(Of SymbolKind)() If (category And SymbolCategory.DeclaredNamespace) <> 0 Then kinds.Add(SymbolKind.Namespace) End If If (category And SymbolCategory.DeclaredType) <> 0 Then kinds.Add(SymbolKind.NamedType) kinds.Add(SymbolKind.TypeParameter) End If If (category And SymbolCategory.NonTypeMember) <> 0 Then kinds.Add(SymbolKind.Field) kinds.Add(SymbolKind.Event) kinds.Add(SymbolKind.Property) kinds.Add(SymbolKind.Method) End If If (category And SymbolCategory.Parameter) <> 0 Then kinds.Add(SymbolKind.Parameter) End If If (category And SymbolCategory.Local) <> 0 Then kinds.Add(SymbolKind.Local) kinds.Add(SymbolKind.Label) kinds.Add(SymbolKind.RangeVariable) ' TODO: anonymous type & func End If Return list.Where(Function(s) If s.IsImplicitlyDeclared Then Return False End If For Each k In kinds If s.Kind = k Then Return True End If Next Return False End Function) End Function Friend Shared Function GetSourceSymbols(compilation As VisualBasicCompilation, includeLocals As Boolean) As IList(Of ISymbol) Dim list = New List(Of ISymbol)() Dim localDumper As LocalSymbolDumper = If(includeLocals, New LocalSymbolDumper(compilation), Nothing) GetSourceMemberSymbols(compilation.SourceModule.GlobalNamespace, list, localDumper) GetSourceAliasSymbols(compilation, list) list.Add(compilation.Assembly) list.AddRange(compilation.Assembly.Modules) Return list End Function Private Shared Sub GetSourceAliasSymbols(comp As VisualBasicCompilation, list As List(Of ISymbol)) For Each tree In comp.SyntaxTrees Dim aliases = tree.GetRoot().DescendantNodes().OfType(Of ImportAliasClauseSyntax)() Dim model = comp.GetSemanticModel(tree) For Each a In aliases Dim sym = model.GetDeclaredSymbol(a) If sym IsNot Nothing AndAlso Not list.Contains(sym) Then list.Add(sym) End If Next Next End Sub Private Shared Sub GetSourceMemberSymbols(symbol As INamespaceOrTypeSymbol, list As List(Of ISymbol), localDumper As LocalSymbolDumper) For Each member In symbol.GetMembers() list.Add(member) Select Case member.Kind Case SymbolKind.NamedType, SymbolKind.Namespace GetSourceMemberSymbols(DirectCast(member, INamespaceOrTypeSymbol), list, localDumper) Case SymbolKind.Method Dim method = DirectCast(member, IMethodSymbol) For Each parameter In method.Parameters list.Add(parameter) Next If localDumper IsNot Nothing Then localDumper.GetLocalSymbols(method, list) End If Case SymbolKind.Field If localDumper IsNot Nothing Then localDumper.GetLocalSymbols(DirectCast(member, IFieldSymbol), list) End If End Select Next End Sub #End Region End Class Friend Class LocalSymbolDumper Private _comp As VisualBasicCompilation Public Sub New(comp As VisualBasicCompilation) Me._comp = comp End Sub Public Sub GetLocalSymbols(symbol As IFieldSymbol, list As List(Of ISymbol)) For Each node In symbol.DeclaringSyntaxReferences.Select(Function(d) d.GetSyntax()) Dim declarator = TryCast(node.Parent, VariableDeclaratorSyntax) If declarator IsNot Nothing AndAlso declarator.Initializer IsNot Nothing Then Dim model = _comp.GetSemanticModel(declarator.SyntaxTree) Dim df = model.AnalyzeDataFlow(declarator.Initializer.Value) GetLocalAndType(df, list) GetAnonymousExprSymbols(declarator.Initializer.Value, model, list) End If Next End Sub Public Sub GetLocalSymbols(symbol As IMethodSymbol, list As List(Of ISymbol)) ' Declaration statement is child of Block For Each n In symbol.DeclaringSyntaxReferences.Select(Function(d) d.GetSyntax()) Dim body = TryCast(n.Parent, MethodBlockSyntax) ' interface method If body IsNot Nothing Then If body.Statements <> Nothing AndAlso body.Statements.Count > 0 Then Dim model = _comp.GetSemanticModel(body.SyntaxTree) Dim df As DataFlowAnalysis = Nothing If body.Statements.Count = 1 Then df = model.AnalyzeDataFlow(body.Statements.First) Else df = model.AnalyzeDataFlow(body.Statements.First, body.Statements.Last) End If GetLocalAndType(df, list) GetLabelSymbols(body, model, list) GetAnonymousTypeAndFuncSymbols(body, model, list) End If End If Next End Sub Private Sub GetLocalAndType(df As DataFlowAnalysis, list As List(Of ISymbol)) ' add local symbols to list For Each v As ISymbol In df.VariablesDeclared list.Add(v) Dim local = TryCast(v, ILocalSymbol) If local IsNot Nothing AndAlso local.Type.Kind = SymbolKind.ArrayType Then list.Add(local.Type) End If Next End Sub Private Sub GetLabelSymbols(body As MethodBlockSyntax, model As SemanticModel, list As List(Of ISymbol)) Dim labels = body.DescendantNodes().OfType(Of LabelStatementSyntax)() For Each lb As LabelStatementSyntax In labels Dim sym = model.GetDeclaredSymbol(lb) list.Add(sym) Next ' VB has not SwitchLabel; it's CaseStatement End Sub Private Sub GetAnonymousTypeAndFuncSymbols(body As MethodBlockSyntax, model As SemanticModel, list As List(Of ISymbol)) Dim exprs As IEnumerable(Of ExpressionSyntax), tmp As IEnumerable(Of ExpressionSyntax) exprs = body.DescendantNodes().OfType(Of AnonymousObjectCreationExpressionSyntax)() tmp = body.DescendantNodes().OfType(Of SingleLineLambdaExpressionSyntax)() exprs = exprs.Concat(tmp) tmp = body.DescendantNodes().OfType(Of MultiLineLambdaExpressionSyntax)() exprs = exprs.Concat(tmp) For Each expr As ExpressionSyntax In exprs GetAnonymousExprSymbols(expr, model, list) Next End Sub Private Sub GetAnonymousExprSymbols(expr As ExpressionSyntax, model As SemanticModel, list As List(Of ISymbol)) Dim kind = expr.Kind If kind <> SyntaxKind.AnonymousObjectCreationExpression AndAlso kind <> SyntaxKind.SingleLineSubLambdaExpression AndAlso kind <> SyntaxKind.SingleLineFunctionLambdaExpression AndAlso kind <> SyntaxKind.MultiLineSubLambdaExpression AndAlso kind <> SyntaxKind.MultiLineFunctionLambdaExpression Then Return End If Dim tinfo = model.GetTypeInfo(expr) Dim tconv = model.GetConversion(expr) ' lambda has NO type ' Bug#13362 - Lambda If tconv.IsAnonymousDelegate OrElse tconv.IsLambda Then Dim sinfo = model.GetSymbolInfo(expr) ' SymbolInfo should NOT be null list.Add(sinfo.Symbol) ' Error case might be Nothing ElseIf tinfo.Type IsNot Nothing Then list.Add(tinfo.Type) For Each m In tinfo.Type.GetMembers list.Add(m) Next End If End Sub End Class End Namespace
jroggeman/roslyn
src/EditorFeatures/VisualBasicTest/SymbolId/SymbolKeyTestBase.vb
Visual Basic
apache-2.0
14,438
Imports System.Data Partial Class MCL_fDevolucion_Material Inherits vis2formularios.frmReporte Dim loObjetoReporte As CrystalDecisions.CrystalReports.Engine.ReportDocument Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim Empresa As String = cusAplicacion.goEmpresa.pcNombre Dim loComandoSeleccionar As New StringBuilder() loComandoSeleccionar.AppendLine("SELECT Ajustes.Documento AS Documento, ") loComandoSeleccionar.AppendLine(" Ajustes.Status AS Estatus, ") loComandoSeleccionar.AppendLine(" Ajustes.Fec_Ini AS Fec_Ini, ") loComandoSeleccionar.AppendLine(" Ajustes.Comentario AS Comentario, ") loComandoSeleccionar.AppendLine(" Renglones_Ajustes.Renglon AS Renglon, ") loComandoSeleccionar.AppendLine(" Renglones_Ajustes.Cod_Art AS Cod_Art, ") loComandoSeleccionar.AppendLine(" Articulos.Nom_Art AS Nom_Art,") loComandoSeleccionar.AppendLine(" Renglones_Ajustes.Cod_Alm AS Cod_Alm,") loComandoSeleccionar.AppendLine(" Almacenes.Nom_Alm AS Nom_Alm,") loComandoSeleccionar.AppendLine(" Renglones_Ajustes.Cod_Uni AS Cod_Uni, ") loComandoSeleccionar.AppendLine(" Renglones_Ajustes.Can_Art1 AS Can_Art1, ") loComandoSeleccionar.AppendLine(" Renglones_Ajustes.Notas AS Notas,") loComandoSeleccionar.AppendLine(" COALESCE(Operaciones_Lotes.Cod_Lot,'') AS Lote,") loComandoSeleccionar.AppendLine(" COALESCE(Operaciones_Lotes.Cantidad,0) AS Cant_Lote,") loComandoSeleccionar.AppendLine(" COALESCE(Piezas.Res_Num, 0) AS Piezas,") loComandoSeleccionar.AppendLine(" COALESCE((SELECT Nom_Usu ") loComandoSeleccionar.AppendLine(" FROM Factory_Global.dbo.Usuarios ") loComandoSeleccionar.AppendLine(" WHERE Cod_Usu COLLATE DATABASE_DEFAULT = (SELECT Auditorias.Cod_Usu") loComandoSeleccionar.AppendLine(" FROM Auditorias") loComandoSeleccionar.AppendLine(" WHERE Ajustes.Documento = Auditorias.Documento") loComandoSeleccionar.AppendLine(" AND Auditorias.Tabla = 'Ajustes' AND Opcion = 'AjustesInventarios'") loComandoSeleccionar.AppendLine(" AND Auditorias.Accion = 'Agregar')) COLLATE DATABASE_DEFAULT") loComandoSeleccionar.AppendLine(" ,'') AS Usuario,") loComandoSeleccionar.AppendLine(" COALESCE((SELECT Departamento ") loComandoSeleccionar.AppendLine(" FROM Factory_Global.dbo.Usuarios ") loComandoSeleccionar.AppendLine(" WHERE Cod_Usu COLLATE DATABASE_DEFAULT = (SELECT Auditorias.Cod_Usu") loComandoSeleccionar.AppendLine(" FROM Auditorias") loComandoSeleccionar.AppendLine(" WHERE Ajustes.Documento = Auditorias.Documento") loComandoSeleccionar.AppendLine(" AND Auditorias.Tabla = 'Ajustes' AND Opcion = 'AjustesInventarios'") loComandoSeleccionar.AppendLine(" AND Auditorias.Accion = 'Agregar')) COLLATE DATABASE_DEFAULT") loComandoSeleccionar.AppendLine(" ,'') AS Dep_Usuario,") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine("") loComandoSeleccionar.AppendLine(" '" & Empresa & "' AS Empresa_Usuario") loComandoSeleccionar.AppendLine("FROM Ajustes ") loComandoSeleccionar.AppendLine(" JOIN Renglones_Ajustes ON Ajustes.Documento = Renglones_Ajustes.Documento") loComandoSeleccionar.AppendLine(" JOIN Articulos ON Articulos.Cod_Art = Renglones_Ajustes.Cod_Art") loComandoSeleccionar.AppendLine(" JOIN Almacenes ON Renglones_Ajustes.Cod_Alm = Almacenes.Cod_Alm") loComandoSeleccionar.AppendLine(" LEFT JOIN Operaciones_Lotes ON Operaciones_Lotes.Num_Doc = Renglones_Ajustes.Documento") loComandoSeleccionar.AppendLine(" AND Operaciones_Lotes.Tip_Doc = 'Ajustes_Inventarios' ") loComandoSeleccionar.AppendLine(" AND Operaciones_Lotes.Ren_Ori = Renglones_Ajustes.Renglon") loComandoSeleccionar.AppendLine(" AND Operaciones_Lotes.Tip_Ope = 'Salida'") loComandoSeleccionar.AppendLine(" LEFT JOIN Mediciones ON Mediciones.Cod_Reg = Ajustes.Documento") loComandoSeleccionar.AppendLine(" AND Mediciones.Origen = 'Ajustes_Inventarios'") loComandoSeleccionar.AppendLine(" AND Mediciones.Adicional LIKE ('%'+RTRIM(Operaciones_Lotes.Cod_Lot)+'%')") loComandoSeleccionar.AppendLine(" AND Renglones_Ajustes.Renglon = SUBSTRING(Mediciones.Adicional, LEN(Mediciones.Adicional), 1)") loComandoSeleccionar.AppendLine(" LEFT JOIN Renglones_Mediciones AS Piezas ON Mediciones.Documento = Piezas.Documento") loComandoSeleccionar.AppendLine(" AND Piezas.Cod_Var = 'AINV-NPIEZ'") loComandoSeleccionar.AppendLine(" AND Piezas.Res_Num > 0") loComandoSeleccionar.AppendLine("WHERE " & cusAplicacion.goFormatos.pcCondicionPrincipal) loComandoSeleccionar.AppendLine(" AND Renglones_Ajustes.Cod_Tip = 'S07' ") 'Me.mEscribirConsulta(loComandoSeleccionar.ToString) Dim loServicios As New cusDatos.goDatos Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loComandoSeleccionar.ToString, "curReportes") '------------------------------------------------------------------------------------------------------- ' Verificando si el select (tabla nº0) trae registros '------------------------------------------------------------------------------------------------------- If (laDatosReporte.Tables(0).Rows.Count <= 0) Then Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Información", _ "No se Encontraron Registros para los Parámetros Especificados. ", _ vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Informacion, _ "350px", _ "200px") End If '--------------------------------------------------' ' Carga la imagen del logo en cusReportes ' '--------------------------------------------------' Me.mCargarLogoEmpresa(laDatosReporte.Tables(0), "LogoEmpresa") loObjetoReporte = cusAplicacion.goFormatos.mCargarInforme("MCL_fDevolucion_Material", laDatosReporte) Me.mTraducirReporte(loObjetoReporte) Me.mFormatearCamposReporte(loObjetoReporte) Me.crvMCL_fDevolucion_Material.ReportSource = loObjetoReporte Catch loExcepcion As Exception Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Error", _ "No se pudo Completar el Proceso: " & loExcepcion.Message, _ vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Error, _ "auto", _ "auto") End Try End Sub Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload Try loObjetoReporte.Close() Catch loExcepcion As Exception End Try End Sub End Class '-------------------------------------------------------------------------------------------' ' Fin del codigo '-------------------------------------------------------------------------------------------' ' JJD: 27/12/08: Codigo inicial '-------------------------------------------------------------------------------------------' ' CMS: 10/09/09: Se ajusto el nombre del articulo para los casos de aquellos articulos genericos '-------------------------------------------------------------------------------------------' ' CMS: 16/09/09: Se Agrego la distribucion de impuesto '-------------------------------------------------------------------------------------------' ' MAT: 01/03/11: Ajuste de la vista de diseño ' '-------------------------------------------------------------------------------------------'
kodeitsolutions/ef-reports
MCL_fDevolucion_Material.aspx.vb
Visual Basic
mit
8,896
Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("AsyncStackTraceExWinrt")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("AsyncStackTraceExWinrt")> <Assembly: AssemblyCopyright("Copyright © 2015")> <Assembly: AssemblyTrademark("")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.2")> <Assembly: AssemblyFileVersion("1.0.0.2")> <Assembly: ComVisible(false)>
ljw1004/async-exception-stacktrace
AsyncStackTraceEx/AsyncStackTraceExWinrt/My Project/AssemblyInfo.vb
Visual Basic
mit
1,018
Option Infer On Imports System Imports System.Collections.Generic Imports System.Runtime.InteropServices Namespace Examples Friend Class Program <STAThread> Shared Sub Main(ByVal args() As String) Dim application As SolidEdgeFramework.Application = Nothing Dim partDocument As SolidEdgePart.PartDocument = Nothing Dim refAxes As SolidEdgePart.RefAxes = Nothing Dim refAxis As SolidEdgePart.RefAxis = Nothing Try ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic. OleMessageFilter.Register() ' Attempt to connect to a running instance of Solid Edge. application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application) partDocument = TryCast(application.ActiveDocument, SolidEdgePart.PartDocument) If partDocument IsNot Nothing Then refAxes = partDocument.RefAxes For i As Integer = 1 To refAxes.Count refAxis = refAxes.Item(i) Dim attributeSets = CType(refAxis.AttributeSets, SolidEdgeFramework.AttributeSets) Next i End If Catch ex As System.Exception Console.WriteLine(ex) Finally OleMessageFilter.Unregister() End Try End Sub End Class End Namespace
SolidEdgeCommunity/docs
docfx_project/snippets/SolidEdgePart.RefAxis.AttributeSets.vb
Visual Basic
mit
1,516
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Imports System Namespace My.Resources 'This class was auto-generated by the StronglyTypedResourceBuilder 'class via a tool like ResGen or Visual Studio. 'To add or remove a member, edit your .ResX file then rerun ResGen 'with the /str option, or rebuild your VS project. '''<summary> ''' A strongly-typed resource class, for looking up localized strings, etc. '''</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("XtraVb.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan End Get End Property '''<summary> ''' Overrides the current thread's CurrentUICulture property for all ''' resource lookups using this strongly typed resource class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set resourceCulture = value End Set End Property End Module End Namespace
jeremytammik/AdnRevitApiLabsXtra
XtraVb/My Project/Resources.Designer.vb
Visual Basic
mit
2,775
Imports Microsoft.VisualBasic Imports System.IO Namespace Web.Handlers Public Class GenerateThumbnailHandler Implements System.Web.IHttpHandler #Region " Public Shared Constants " Public Const QUERY_IMAGE As String = "image" Public Const QUERY_CONSTRAINT As String = "constraint" Public Const QUERY_VALUE As String = "value" Public Const QUERY_MAXIMUM_OTHER As String = "maximum-other" #End Region #Region " Private Methods " Private Function GetThumbnailImageAbort() As Boolean Return False End Function #End Region #Region " IHttpHandler Implementation " Public ReadOnly Property IsReusable() As Boolean _ Implements System.Web.IHttpHandler.IsReusable Get Return True End Get End Property Public Sub ProcessRequest( _ ByVal context As System.Web.HttpContext _ ) Implements System.Web.IHttpHandler.ProcessRequest Try Dim image As String = context.Request.QueryString(QUERY_IMAGE) Dim constraint As String = context.Request.QueryString(QUERY_CONSTRAINT) Dim constraintValue As String = context.Request.QueryString(QUERY_VALUE) Dim maximumOtherValue As String = context.Request.QueryString(QUERY_MAXIMUM_OTHER) context.Response.Clear() context.Response.Cache.SetExpires(DateTime.Now.Add(New TimeSpan(0, 1, 0))) context.Response.Cache.SetCacheability(System.Web.HttpCacheability.Public) context.Response.Cache.SetValidUntilExpires(False) Dim output_Format As System.Drawing.Imaging.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg If image.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) Then context.Response.ContentType = "image/jpg" output_Format = System.Drawing.Imaging.ImageFormat.Jpeg ElseIf image.EndsWith(".png", StringComparison.OrdinalIgnoreCase) Then context.Response.ContentType = "image/png" output_Format = System.Drawing.Imaging.ImageFormat.Png End If If Not String.IsNullOrEmpty(image) Then image = context.Request.MapPath(image) If File.Exists(image) Then If Not String.IsNullOrEmpty(Constraint) Then Dim value As Integer Dim other_Value As Integer = -1 If Not String.IsNullOrEmpty(constraintValue) AndAlso Integer.TryParse(constraintValue, value) Then If Not String.IsNullOrEmpty(maximumOtherValue) AndAlso Not Integer.TryParse(maximumOtherValue, other_Value) Then _ other_Value = -1 Dim fullImage As New System.Drawing.Bitmap(image) Dim source_X As Integer = 0 Dim source_Y As Integer = 0 Dim source_Width As Integer = fullImage.Width Dim source_Height As Integer = fullImage.Height Dim destination_Width As Integer Dim destination_Height As Integer If Constraint.ToLower = "height" Then destination_Width = CInt((value / source_Height) * source_Width) destination_Height = value If other_Value > 0 AndAlso destination_Width > other_Value Then Dim scaling_Ratio As Single = CSng(other_Value / destination_Width) source_Width = CInt(source_Width * scaling_Ratio) destination_Width = other_Value End If ElseIf Constraint.ToLower = "width" Then destination_Height = CInt((value / source_Width) * source_Height) destination_Width = value If other_Value > 0 AndAlso destination_Height > other_Value Then Dim scaling_Ratio As Single = CSng(other_Value / destination_Height) source_Height = CInt(source_Height * scaling_Ratio) source_Y = fullImage.Height - source_Height destination_Height = other_Value End If End If Dim img_Output As New System.Drawing.Bitmap(destination_Width, destination_Height) Dim gfx_Output As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(img_Output) gfx_Output.DrawImage(fullImage, _ New System.Drawing.Rectangle(0, 0, destination_Width, destination_Height), _ New System.Drawing.Rectangle(source_X, source_Y, source_Width, source_Height), _ System.Drawing.GraphicsUnit.Pixel) gfx_Output.Dispose() gfx_Output = Nothing img_Output.Save(context.Response.OutputStream, output_Format) img_Output = Nothing fullImage = Nothing End If End If End If End If context.Response.Flush() Catch ex As Exception End Try End Sub #End Region End Class End Namespace
thiscouldbejd/Hermes
_Web/_Handlers/Partials/GenerateThumbnailHandler.vb
Visual Basic
mit
4,584
Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("iOSWinSigner2")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("iOSWinSigner2")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("ae4516a0-fcb0-4c58-bcd2-d67c584e75c4")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
LinuxPhreak/iOS-Win-Signer
iOSWinSigner2/iOSWinSigner2/My Project/AssemblyInfo.vb
Visual Basic
apache-2.0
1,179
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.IO Imports <xmlns="http://schemas.microsoft.com/VisualStudio/Roslyn/Compiler"> Public Class XmlRenamer Private _xDoc As XDocument Public Sub New(xDoc As XDocument) _xDoc = xDoc End Sub Public Sub Rename(renamingFile As String) Dim namesToUpdate As List(Of NameToUpdate) namesToUpdate = ParseUpdateList(renamingFile) For Each name In (From n In namesToUpdate Where n.kind = UpdateKind.Enumerator) UpdateEnumerator(name) Next For Each name In (From n In namesToUpdate Where n.kind = UpdateKind.Child) UpdateChild(name) Next For Each name In (From n In namesToUpdate Where n.kind = UpdateKind.Field) UpdateField(name) Next For Each name In (From n In namesToUpdate Where n.kind = UpdateKind.Kind) UpdateNodeKind(name) Next For Each name In (From n In namesToUpdate Where n.kind = UpdateKind.Class) UpdateNodeClass(name) Next For Each name In (From n In namesToUpdate Where n.kind = UpdateKind.Enum) UpdateEnum(name) Next End Sub Private Function ParseUpdateList(renamingFile As String) As List(Of NameToUpdate) Dim namesToUpdate As New List(Of NameToUpdate) For Each line In File.ReadLines(renamingFile) Dim fields = line.Split({","c}) If fields.Length >= 4 AndAlso fields(0).Trim <> "" AndAlso Cleanup(fields(3)) <> "" Then namesToUpdate.Add(New NameToUpdate With {.kind = DirectCast([Enum].Parse(GetType(UpdateKind), fields(0), True), UpdateKind), .typeName = Cleanup(fields(1)), .memberName = Cleanup(fields(2)), .newName = Cleanup(fields(3))}) End If Next Return namesToUpdate End Function Private Function Cleanup(s As String) As String s = s.Trim() If s.StartsWith("[", StringComparison.Ordinal) AndAlso s.EndsWith("]", StringComparison.Ordinal) Then s = s.Substring(1, s.Length - 2) End If If s.StartsWith("Optional", StringComparison.Ordinal) Then s = s.Substring("Optional".Length) End If Return s End Function Private Sub UpdateNodeKind(update As NameToUpdate) For Each node In (From n In _xDoc...<node-kind> Where n.@name = update.memberName) node.@name = update.newName Next UpdateKindString(update.memberName, update.newName) End Sub Private Sub UpdateNodeClass(update As NameToUpdate) For Each node In (From n In _xDoc...<node-structure> Where n.@name = update.typeName) node.@name = update.newName Next For Each node In (From n In _xDoc...<node-structure> Where n.@parent = update.typeName) node.@parent = update.newName Next Dim oldKindName = "@" + update.typeName Dim newKindName = "@" + update.newName UpdateKindString(oldKindName, newKindName) End Sub Private Sub UpdateEnum(update As NameToUpdate) For Each node In (From n In _xDoc...<enumeration> Where n.@name = update.typeName) node.@name = update.newName Next End Sub Private Sub UpdateEnumerator(update As NameToUpdate) For Each enumNode In (From n In _xDoc...<enumeration> Where n.@name = update.typeName) For Each node In (From n In enumNode.<enumerators>.<enumerator> Where n.@name = update.memberName) node.@name = update.newName Next Next End Sub Private Sub UpdateChild(update As NameToUpdate) For Each structNode In (From n In _xDoc...<node-structure> Where n.@name = update.typeName) For Each node In (From n In structNode.<child> Where n.@name = update.memberName) node.@name = update.newName Next Next End Sub Private Sub UpdateField(update As NameToUpdate) For Each structNode In (From n In _xDoc...<node-structure> Where n.@name = update.typeName) For Each node In (From n In structNode.<field> Where n.@name = update.memberName) node.@name = update.newName Next Next End Sub Private Function IndexOfNodeKind(attrValue As String, kind As String) As Integer If String.IsNullOrEmpty(attrValue) Then Return -1 End If Dim index As Integer = attrValue.IndexOf(kind, StringComparison.Ordinal) If (index > 0 AndAlso attrValue(index - 1) <> "|"c) Then Return -1 ' must be preceded by vert bar or nothing. End If Dim endIndex = index + kind.Length If (endIndex < attrValue.Length AndAlso attrValue(endIndex) <> "|"c) Then Return -1 ' must be followed by vert bar or nothing. End If Return index End Function Private Function ContainsNodeKind(attrValue As String, kind As String) As Boolean Return IndexOfNodeKind(attrValue, kind) >= 0 End Function Private Sub UpdateKindString(oldKind As String, newKind As String) For Each node In (From n In _xDoc...<child> Where ContainsNodeKind(n.@kind, oldKind)) UpdateKindAttribute(node.Attribute("kind"), oldKind, newKind) Next For Each node In (From n In _xDoc...<child> Where ContainsNodeKind(n.@<separator-kind>, oldKind)) UpdateKindAttribute(node.Attribute("separator-kind"), oldKind, newKind) Next For Each node In (From n In _xDoc...<node-kind-alias> Where ContainsNodeKind(n.@alias, oldKind)) UpdateKindAttribute(node.Attribute("alias"), oldKind, newKind) Next End Sub Private Sub UpdateKindAttribute(attr As XAttribute, oldKind As String, newKind As String) Dim attrValue = attr.Value Dim startIndex = IndexOfNodeKind(attrValue, oldKind) Dim newValue = attrValue.Substring(0, startIndex) + newKind + attrValue.Substring(startIndex + oldKind.Length) attr.Value = newValue End Sub End Class Class NameToUpdate Public kind As updateKind Public typeName As String Public memberName As String Public newName As String End Class Enum UpdateKind [Enum] Enumerator [Class] Kind Field Child End Enum
ManishJayaswal/roslyn
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/Util/XmlRenamer.vb
Visual Basic
apache-2.0
6,652
Imports Microsoft.VisualBasic Imports System.Reflection Namespace Gears ''' <summary> ''' GearsPage内で使用する拡張ユーティリティ ''' </summary> ''' <remarks></remarks> Public Module GearsPageExtension ''' <summary>最初のログを取得する</summary> <Runtime.CompilerServices.Extension()> _ Public Function FirstLog(ByVal log As Dictionary(Of String, GearsException)) As GearsException If log IsNot Nothing AndAlso log.Count > 0 Then Return log.First.Value Else Return Nothing End If End Function End Module ''' <summary> ''' コントロール拡張 ''' </summary> ''' <remarks></remarks> Public Module GearsControlExtension ''' <summary>ControlからGearsControlを作成する</summary> <Runtime.CompilerServices.Extension()> _ Public Function toGControl(ByVal con As Control) As GearsControl Dim gcon As New GearsControl(GearsControl.extractControl(con), String.Empty) Return gcon End Function ''' <summary>ControlからGearsControlを作成する</summary> <Runtime.CompilerServices.Extension()> _ Public Function toGControl(ByVal con As Control, ByVal conName As String, Optional ByVal dns As String = "") As GearsControl Dim gcon As New GearsControl(GearsControl.extractControl(con), conName, dns) Return gcon End Function End Module End Namespace
icoxfog417/Gears
Gears/Code/GearsExtensions.vb
Visual Basic
apache-2.0
1,551
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System Imports System.Collections.Immutable Imports System.Composition Imports System.Threading Imports System.Threading.Tasks Imports Analyzer.Utilities Imports Microsoft.CodeQuality.Analyzers.ApiDesignGuidelines Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.Formatting Imports Microsoft.CodeAnalysis.VisualBasic Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Namespace Microsoft.CodeQuality.VisualBasic.Analyzers.ApiDesignGuidelines <ExportCodeFixProvider(LanguageNames.VisualBasic), [Shared]> Public Class BasicStaticHolderTypesFixer Inherits CodeFixProvider Public NotOverridable Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) Get ' TODO: Re-implement the VB fix by turning the Class into a Module. ' For now, leave this fixer in place but don't declare it to fix anything. ' ' This is tracked by https://github.com/dotnet/roslyn/issues/3546. ' ' Return ImmutableArray.Create(CA1052DiagnosticAnalyzer.DiagnosticId) Return ImmutableArray(Of String).Empty End Get End Property Public NotOverridable Overrides Function GetFixAllProvider() As FixAllProvider Return WellKnownFixAllProviders.BatchFixer End Function Public NotOverridable Overrides Async Function RegisterCodeFixesAsync(context As CodeFixContext) As Task Dim document = context.Document Dim span = context.Span Dim cancellationToken = context.CancellationToken cancellationToken.ThrowIfCancellationRequested() Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) Dim classStatement = root.FindToken(span.Start).Parent?.FirstAncestorOrSelf(Of ClassStatementSyntax) If classStatement IsNot Nothing Then Dim title As String = String.Format(MicrosoftApiDesignGuidelinesAnalyzersResources.MakeClassStatic, classStatement.Identifier.Text) Dim fix = New MyCodeAction(title, Async Function(ct) Await AddNotInheritableKeyword(document, root, classStatement).ConfigureAwait(False)) context.RegisterCodeFix(fix, context.Diagnostics) End If End Function Private Function AddNotInheritableKeyword(document As Document, root As SyntaxNode, classStatement As ClassStatementSyntax) As Task(Of Document) Dim notInheritableKeyword = SyntaxFactory.Token(SyntaxKind.NotInheritableKeyword).WithAdditionalAnnotations(Formatter.Annotation) Dim newClassStatement = classStatement.AddModifiers(notInheritableKeyword) Dim newRoot = root.ReplaceNode(classStatement, newClassStatement) Return Task.FromResult(document.WithSyntaxRoot(newRoot)) End Function Private Class MyCodeAction Inherits DocumentChangeAction Public Overrides ReadOnly Property EquivalenceKey As String Get Return NameOf(BasicStaticHolderTypesFixer) End Get End Property Public Sub New(title As String, createChangedDocument As Func(Of CancellationToken, Task(Of Document))) MyBase.New(title, createChangedDocument) End Sub End Class End Class End Namespace
heejaechang/roslyn-analyzers
src/Microsoft.CodeQuality.Analyzers/VisualBasic/ApiDesignGuidelines/BasicStaticHolderTypes.Fixer.vb
Visual Basic
apache-2.0
3,638
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.ComponentModel.Composition Imports System.Diagnostics.CodeAnalysis Imports System.Threading Imports Microsoft.CodeAnalysis.DocumentationComments Imports Microsoft.CodeAnalysis.VisualBasic.Syntax Imports Microsoft.VisualStudio.Commanding Imports Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion Imports Microsoft.VisualStudio.Text Imports Microsoft.VisualStudio.Text.Editor Imports Microsoft.VisualStudio.Text.Operations Imports Microsoft.VisualStudio.Utilities Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.DocumentationComments <Export(GetType(ICommandHandler))> <ContentType(ContentTypeNames.VisualBasicContentType)> <Name("XmlTagCompletionCommandHandler")> <Order(Before:=PredefinedCompletionNames.CompletionCommandHandler)> Friend Class XmlTagCompletionCommandHandler Inherits AbstractXmlTagCompletionCommandHandler <ImportingConstructor> <SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification:="Used in test code: https://github.com/dotnet/roslyn/issues/42814")> Public Sub New(undoHistory As ITextUndoHistoryRegistry) MyBase.New(undoHistory) End Sub Protected Overrides Sub TryCompleteTag(textView As ITextView, subjectBuffer As ITextBuffer, document As Document, position As SnapshotPoint, cancellationToken As CancellationToken) Dim tree = document.GetSyntaxTreeSynchronously(cancellationToken) Dim token = tree.FindTokenOnLeftOfPosition(position, cancellationToken, includeDocumentationComments:=True) Dim parentTrivia = token.GetAncestor(Of DocumentationCommentTriviaSyntax)() If parentTrivia Is Nothing Then Return End If If token.IsKind(SyntaxKind.GreaterThanToken) AndAlso token.Parent.IsKind(SyntaxKind.XmlElementStartTag) AndAlso token.Parent.Parent.IsKind(SyntaxKind.XmlElement) Then Dim element = DirectCast(token.Parent.Parent, XmlElementSyntax) Dim elementName = DirectCast(element.StartTag.Name, XmlNameSyntax).LocalName.ValueText ' '''<blah><blah$$</blah> If HasMatchingEndTag(element) AndAlso HasUnmatchedIdenticalParentStart(element, elementName) Then InsertTextAndMoveCaret(textView, subjectBuffer, position, "</" + elementName + ">", position) End If Dim endTag = element.EndTag Dim endTagText = If(endTag.Name IsNot Nothing, endTag.Name.LocalName.ValueText, String.Empty) If elementName.Length > 0 AndAlso elementName <> endTagText Then InsertTextAndMoveCaret(textView, subjectBuffer, position, "</" + elementName + ">", position) End If End If End Sub Private Function HasUnmatchedIdenticalParentStart(element As XmlElementSyntax, expectedName As String) As Boolean If element Is Nothing Then Return False End If Dim startTag = element.StartTag Dim elementName = DirectCast(startTag.Name, XmlNameSyntax).LocalName.ValueText If elementName = expectedName Then If HasMatchingEndTag(element) Then Return HasUnmatchedIdenticalParentStart(TryCast(element.Parent, XmlElementSyntax), expectedName) End If Return True End If Return False End Function Private Shared Function HasMatchingEndTag(element As XmlElementSyntax) As Boolean Dim startTag = element.StartTag Dim endTag = element.EndTag If startTag IsNot Nothing AndAlso endTag IsNot Nothing Then Dim name = DirectCast(startTag.Name, XmlNameSyntax).LocalName.ValueText Return Not endTag.IsMissing AndAlso endTag.Name.LocalName.ValueText = name End If Return False End Function End Class End Namespace
dotnet/roslyn
src/EditorFeatures/VisualBasic/DocumentationComments/XmlTagCompletionCommandHandler.vb
Visual Basic
mit
4,290