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
|
|---|---|---|---|---|---|
'-------------------------------------------------------------------------------------------'
' Inicio del codigo
'-------------------------------------------------------------------------------------------'
' Importando librerias
'-------------------------------------------------------------------------------------------'
Imports System.Data
'-------------------------------------------------------------------------------------------'
' Inicio de clase "rTotal_Casos_Ejecutor_AnoMes"
'-------------------------------------------------------------------------------------------'
Partial Class rTotal_Casos_Ejecutor_AnoMes
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))
Dim lcParametro0Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(0))
Dim lcParametro1Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(1), goServicios.enuOpcionesRedondeo.KN_FechaInicioDelDia)
Dim lcParametro1Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(1), goServicios.enuOpcionesRedondeo.KN_FechaFinDelDia)
Dim lcParametro2Desde As String = goServicios.mObtenerListaFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(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 = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(5))
Dim lcParametro5Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(5))
Dim lcParametro6Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(6))
Dim lcParametro6Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(6))
Dim lcParametro7Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(7))
Dim lcParametro7Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(7))
Dim lcParametro8Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(8))
Dim lcParametro8Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(8))
Dim lcOrdenamiento As String = cusAplicacion.goReportes.pcOrden
Dim loConsulta As New StringBuilder()
loConsulta.AppendLine("")
loConsulta.AppendLine("SELECT YEAR(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini)) AS Ano,")
loConsulta.AppendLine(" MONTH(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini)) AS Mes,")
loConsulta.AppendLine(" (CASE MONTH(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini))")
loConsulta.AppendLine(" WHEN 1 THEN 'ENERO'")
loConsulta.AppendLine(" WHEN 2 THEN 'FEBRERO'")
loConsulta.AppendLine(" WHEN 3 THEN 'MARZO'")
loConsulta.AppendLine(" WHEN 4 THEN 'ABRIL'")
loConsulta.AppendLine(" WHEN 5 THEN 'MAYO'")
loConsulta.AppendLine(" WHEN 6 THEN 'JUNIO'")
loConsulta.AppendLine(" WHEN 7 THEN 'JULIO'")
loConsulta.AppendLine(" WHEN 8 THEN 'AGOSTO'")
loConsulta.AppendLine(" WHEN 9 THEN 'SEPTIEMBRE'")
loConsulta.AppendLine(" WHEN 10 THEN 'OCTUBRE'")
loConsulta.AppendLine(" WHEN 11 THEN 'NOVIEMBRE'")
loConsulta.AppendLine(" WHEN 12 THEN 'DICIEMBRE'")
loConsulta.AppendLine(" END) AS Nombre_Mes,")
loConsulta.AppendLine(" Ejecutores.Cod_Ven AS Cod_Eje,")
loConsulta.AppendLine(" Ejecutores.Nom_Ven AS Nom_Eje,")
loConsulta.AppendLine(" COUNT(DISTINCT Casos.Cod_Reg) AS Clientes,")
loConsulta.AppendLine(" COUNT(DISTINCT CAST(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini) AS DATE)) AS Dias,")
loConsulta.AppendLine(" COUNT(DISTINCT Casos.Documento) AS Casos,")
loConsulta.AppendLine(" COUNT(*) AS Actividades,")
loConsulta.AppendLine(" SUM(CASE WHEN Renglones_Casos.facturable = 1 ")
loConsulta.AppendLine(" THEN Renglones_Casos.duracion")
loConsulta.AppendLine(" ELSE 0 END) AS Horas_Fact,")
loConsulta.AppendLine(" (CASE WHEN COALESCE(SUM(Renglones_Casos.duracion), 0) = 0 ")
loConsulta.AppendLine(" THEN 0 ")
loConsulta.AppendLine(" ELSE SUM(CASE WHEN Renglones_Casos.facturable = 1 ")
loConsulta.AppendLine(" THEN Renglones_Casos.duracion ")
loConsulta.AppendLine(" ELSE 0 END ")
loConsulta.AppendLine(" )/COALESCE(SUM(Renglones_Casos.duracion), 0)")
loConsulta.AppendLine(" END)*100.0 AS Por_Fact,")
loConsulta.AppendLine(" SUM(CASE WHEN Renglones_Casos.facturable = 0")
loConsulta.AppendLine(" THEN Renglones_Casos.duracion")
loConsulta.AppendLine(" ELSE 0 END) AS Horas_No_Fact,")
loConsulta.AppendLine(" COALESCE(SUM(Renglones_Casos.duracion), 0) AS Horas_Totales,")
loConsulta.AppendLine(" SUM(CASE WHEN Renglones_Casos.facturable = 1 ")
loConsulta.AppendLine(" THEN Renglones_Casos.duracion")
loConsulta.AppendLine(" ELSE 0 END)/COUNT(DISTINCT CAST(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini) AS DATE)) AS Horas_Fact_Dia")
loConsulta.AppendLine("FROM Casos")
loConsulta.AppendLine(" LEFT JOIN Renglones_Casos")
loConsulta.AppendLine(" ON Renglones_Casos.Documento = Casos.Documento")
loConsulta.AppendLine(" JOIN Vendedores AS Ejecutores")
loConsulta.AppendLine(" ON Ejecutores.Cod_Ven = Casos.Cod_Eje")
loConsulta.AppendLine("WHERE Casos.Documento BETWEEN " & lcParametro0Desde)
loConsulta.AppendLine(" AND " & lcParametro0Hasta)
loConsulta.AppendLine(" AND COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini) BETWEEN " & lcParametro1Desde)
loConsulta.AppendLine(" AND " & lcParametro1Hasta)
loConsulta.AppendLine(" AND Casos.Status IN (" & lcParametro2Desde & ")")
loConsulta.AppendLine(" AND Casos.Cod_Reg BETWEEN " & lcParametro3Desde)
loConsulta.AppendLine(" AND " & lcParametro3Hasta)
loConsulta.AppendLine(" AND Casos.Cod_Coo BETWEEN " & lcParametro4Desde)
loConsulta.AppendLine(" AND " & lcParametro4Hasta)
loConsulta.AppendLine(" AND COALESCE(Renglones_Casos.Cod_Eje, Casos.Cod_Eje) BETWEEN " & lcParametro5Desde)
loConsulta.AppendLine(" AND " & lcParametro5Hasta)
loConsulta.AppendLine(" AND Casos.Cod_Suc BETWEEN " & lcParametro6Desde)
loConsulta.AppendLine(" AND " & lcParametro6Hasta)
loConsulta.AppendLine(" AND Casos.Cod_Rev BETWEEN " & lcParametro7Desde)
loConsulta.AppendLine(" AND " & lcParametro7Hasta)
loConsulta.AppendLine(" AND Ejecutores.Cod_Tip BETWEEN " & lcParametro8Desde)
loConsulta.AppendLine(" AND " & lcParametro8Hasta)
loConsulta.AppendLine("GROUP BY YEAR(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini)),")
loConsulta.AppendLine(" MONTH(COALESCE(Renglones_Casos.Fec_Ini, Casos.Fec_Ini)),")
loConsulta.AppendLine(" Ejecutores.Cod_Ven, Ejecutores.Nom_Ven")
loConsulta.AppendLine("ORDER BY Ano, Mes," & lcOrdenamiento)
loConsulta.AppendLine(" ")
loConsulta.AppendLine("")
'Me.mEscribirConsulta(loConsulta.ToString())
Dim loServicios As New cusDatos.goDatos
Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loConsulta.ToString(), "curReportes")
loObjetoReporte = cusAplicacion.goReportes.mCargarReporte("rTotal_Casos_Ejecutor_AnoMes", laDatosReporte)
Me.mTraducirReporte(loObjetoReporte)
Me.mFormatearCamposReporte(loObjetoReporte)
Me.crvrTotal_Casos_Ejecutor_AnoMes.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: 05/09/15: Codigo inicial, a partir de rTotal_Casos_AnoMes_Ejecutor. '
'-------------------------------------------------------------------------------------------'
|
kodeitsolutions/ef-reports
|
rTotal_Casos_Ejecutor_AnoMes.aspx.vb
|
Visual Basic
|
mit
| 11,252
|
Imports NUnit.Framework
Imports System.Xml
Imports System.IO
Imports System.Globalization
Imports System.Drawing.Imaging
Imports System.Collections.Specialized
Imports System.Text
Imports System.Net
#Const NUnitTest = True ' NUnit Tests on
#Const AssertTest = True ' Assertion rules on
Imports SignWriterStudio.General
Public Module All
''' <summary>
''' Converts Unix's epoch time to VB DateTime value
''' </summary>
''' <param name="epochValue">Epoch time (seconds)</param>
''' <returns>VB Date</returns>
''' <remarks></remarks>
Public Function EpochToDateTime(ByVal epochValue As Integer) As Date
'
If EpochValue >= 0 Then
Return CDate("1.1.1970 00:00:00").AddSeconds(EpochValue)
Else
Return CDate("1.1.1970 00:00:00")
End If
End Function
''' <summary>
''' Converts VB DateTime value to Unix's epoch time
''' </summary>
''' <param name="DateTimeValue">DateTime to convert</param>
''' <returns>Epoch time (seconds)</returns>
''' <remarks></remarks>
Public Function DateTimeToEpoch(ByVal DateTimeValue As Date) As Integer
'
Try
Return CInt(DateTimeValue.Subtract(CDate("1.1.1970 00:00:00")).TotalSeconds)
Catch ex As System.OverflowException
General.LogError(ex, "DateTimeToEpoch error")
Return -1
End Try
End Function
Public Function VbCrLf() As String
Return Microsoft.VisualBasic.Strings.ChrW(13) & Microsoft.VisualBasic.Strings.ChrW(10)
End Function
Public Function Format(ByVal expression As Object, Optional ByVal style As String = "") As String
Return Microsoft.VisualBasic.Strings.Format(Expression, Style)
End Function
Public Function InputBox(ByVal prompt As String, Optional ByVal title As String = "", Optional ByVal defaultResponse As String = "", Optional ByVal XPos As Integer = -1, Optional ByVal YPos As Integer = -1) As String
Return Microsoft.VisualBasic.Interaction.InputBox(Prompt, Title, DefaultResponse, XPos, YPos)
End Function
Public Function IsDbNull(ByVal value As Object) As Boolean
Return Convert.IsDBNull(value)
End Function
'Function
''' <summary>
''' Function NZ returns replacement Object if tested object is DbNull or Nothing
''' </summary>
Function NZ(ByVal tested As Object, ByVal replacement As Object) As Object
Dim returnValue As Object
'Require Test parameters
#If AssertTest Then
'If replacement Is Nothing Then
' Throw New AssertionException("Replacement object is Nothing.")
'End If
#End If
If IsDBNull(tested) OrElse tested Is Nothing Then
returnValue = replacement
Else
returnValue = tested
End If
'Ensure Test return value
#If AssertTest Then
'If returnValue Is Nothing Then
' Throw New AssertionException("NZ return value is Nothing")
'End If
#End If
Return returnValue
End Function
'Function
''' <summary>
''' Function ByteArraytoImage transforms a ByteArray to an Image
''' </summary>
Public Function ByteArraytoImage(ByVal buffer() As Byte) As Image
'Require Test parameters
Dim img As Image = Nothing
#If AssertTest Then
If buffer Is Nothing Then
Return Nothing
End If
#End If
Dim ms As New MemoryStream(buffer)
If ms.Length > 0 Then
Try
img = Image.FromStream(ms)
Catch ex As Exception
LogError (ex,"Exception")
End Try
Return img
Else
Return Nothing
End If
End Function
'Function
''' <summary>
''' Function NulltoByteArray description
''' </summary>
Function NulltoByteArray(ByVal nullObject As Byte()) As Byte()
If IsDBNull(NullObject) Or NullObject Is Nothing Then
Return Nothing 'type byte()
Else
Return NullObject
End If
End Function
'Function
''' <summary>
''' Function ImageToByteArray description
''' </summary>
Function ImageToByteArray(ByVal img As Image, ByVal format As Imaging.ImageFormat) As Byte()
'Require Test parameters
#If AssertTest Then
If img Is Nothing Then
Throw New AssertionException("Provide an image to ImagetoByteArray")
End If
If format Is Nothing Then
Throw New AssertionException("Provide a valid format to ImagetoByteArray")
End If
#End If
Dim ms As New IO.MemoryStream
If img IsNot Nothing Then
img.Save(ms, format)
End If
'Ensure Test return value
#If AssertTest Then
If ms.Length <= 1 Then
Throw New AssertionException("Byte array did not convert to Image.")
End If
#End If
Return ms.ToArray()
End Function
Function ImageToDataUri(ByVal img As Image, ByVal format As Imaging.ImageFormat) As String
'Require Test parameters
#If AssertTest Then
If img Is Nothing Then
Return String.Empty
End If
If format Is Nothing Then
Throw New AssertionException("Provide a valid format to ImagetoByteArray")
End If
#End If
Dim ms As New IO.MemoryStream
If img IsNot Nothing Then
img.Save(ms, format)
End If
'Ensure Test return value
#If AssertTest Then
If ms.Length <= 1 Then
Throw New AssertionException("Byte array did not convert to Image.")
End If
#End If
Return "data:image/png;base64," & Convert.ToBase64String(ms.ToArray())
End Function
Public Function ImageToBase64(ByVal image As Image) As String
If image IsNot Nothing Then
Return Convert.ToBase64String(ImageToByteArray(image))
Else
Return String.Empty
End If
End Function
Public Function Base64ToImage(ByVal base64 As String) As Image
If Not base64 = String.Empty Then
Dim img As Image
Dim dataStream As New MemoryStream(Convert.FromBase64String(base64))
img = Image.FromStream(dataStream)
dataStream.Close()
Return img
Else
Return Nothing
End If
End Function
Function ImageToByteArray(ByVal img As Image) As Byte()
Return ImageToByteArray(img, ImageFormat.Png)
End Function
''' <summary>
''' Function BinaryCount description
''' </summary>
Function BinaryCount(ByRef Bin As Integer) As Integer
'Require Test parameters
#If AssertTest Then
If Bin > 65535 OrElse Bin < 0 Then
Throw New AssertionException("Binary count is only for positive numbers smaller or equal 65535")
End If
#End If
Dim Sum As Integer
Dim Eat As Integer = Bin
Dim Bit As Integer
For I As Integer = 1 To 16
Bit = Eat And 1
Sum += Bit
Eat = Eat >> 1
Next
'Ensure Test return value
#If AssertTest Then
If Sum < 0 Then
Throw New AssertionException("Sum of BinaryCount is incorrect")
End If
#End If
Return Sum
End Function
''' <summary>
''' Function CheckSWId checks if SWId is a valid format for a symbol Id
''' </summary>
Public Function CheckId(ByVal SWId As String) As Boolean
If SWId IsNot Nothing AndAlso SWId IsNot String.Empty AndAlso SWId.Length = 18 AndAlso System.Text.RegularExpressions.Regex.IsMatch(SWId, "\d\d-\d\d-\d\d\d-\d\d-\d\d-\d\d") Then
Return True
Else
Return False
End If
End Function
Public Function URLEncode(str As String) As String
Return System.Web.HttpUtility.UrlEncode(str)
End Function
Public Function URLDecode(str As String) As String
Return System.Web.HttpUtility.UrlDecode(str)
End Function
Public Function HtmlEncode(str As String) As String
Return System.Web.HttpUtility.HtmlEncode(str)
End Function
Public Function HtmlDecode(str As String) As String
Return System.Web.HttpUtility.HtmlDecode(str)
End Function
Public Function PrepareParamInfo(ByVal pColl As NameValueCollection) As String
Dim paramInfo As New StringBuilder
' Iterate through the collection and add
' each key to the string variable.
'name1=value1&name2=value2
Dim i As Integer
For i = 0 To pColl.Count - 1
If i = 0 Then
paramInfo.Append(pColl.GetKey(i))
paramInfo.Append("=")
Else
paramInfo.Append("&")
paramInfo.Append(pColl.GetKey(i))
paramInfo.Append("=")
End If
' Create a string array that contains
' the values associated with each key.
Dim pValues() As String = pColl.GetValues(i)
' Iterate through the array and add
' each value to the string variable.
For Each value In pValues
paramInfo.Append(value)
Next
Next i
Return paramInfo.ToString
End Function
Public Function HttpPost(uri As String, parameters As String) As String
' parameters: name1=value1&name2=value2
Dim webRequest1 As WebRequest = WebRequest.Create(uri)
webRequest1.ContentType = "application/x-www-form-urlencoded"
'webRequest1.ContentType = "text/xml"
webRequest1.Method = "POST"
'Dim bytes As Byte() = Encoding.ASCII.GetBytes(parameters)
Dim bytes As Byte() = Encoding.UTF8.GetBytes(parameters)
Dim os As Stream = Nothing
Try
' send the Post
webRequest1.ContentLength = bytes.Length
'Count bytes to send
os = webRequest1.GetRequestStream()
'Send it
os.Write(bytes, 0, bytes.Length)
Try
' get the response
Dim webResponse As WebResponse = webRequest1.GetResponse()
If webResponse Is Nothing Then
Return Nothing
End If
Dim sr As New StreamReader(webResponse.GetResponseStream())
Return sr.ReadToEnd().Trim()
Catch ex As WebException
General.LogError(ex, "HTTPPost error")
Console.WriteLine(ex.Message)
Throw
End Try
Catch ex As WebException
General.LogError(ex, "HTTPPost error")
Console.WriteLine(ex.Message)
Throw
Finally
If os IsNot Nothing Then
os.Close()
End If
End Try
Return Nothing
End Function ' end HttpPost
Public Function SendPost(ByVal remoteUrl As String, Params As NameValueCollection) As String
Dim ParamInfo As String = PrepareParamInfo(Params)
Dim postResult As String = HttpPost(remoteUrl, ParamInfo)
Return postResult
End Function
Private Function GetSubstring(str As String, Fromstr As String, Tostr As String) As String
Dim strStart As Integer = str.IndexOf(Fromstr)
Dim strStop As Integer = str.IndexOf(Tostr)
If strStart >= 0 AndAlso strStop >= 0 Then
Return str.Substring(strStart + Fromstr.Length + 1, strStop - strStart - Tostr.Length + 1)
Else
Return String.Empty
End If
End Function
Private Function GetSubstringInclusive(str As String, Fromstr As String, Tostr As String) As String
Dim strStart As Integer = str.IndexOf(Fromstr)
Dim strStop As Integer = str.IndexOf(Tostr)
If strStart >= 0 AndAlso strStop >= 0 Then
Return str.Substring(strStart, strStop - strStart + Tostr.Length)
Else
Return String.Empty
End If
End Function
Public Function GetTagValue(xmltext As String, Tag As String) As String
Return GetSubstring(xmltext, "<" & Tag, "</" & Tag & ">")
End Function
Public Function GetTag(xmltext As String, Tag As String) As String
Return GetSubstringInclusive(xmltext, "<" & Tag, "</" & Tag & ">")
End Function
Public Sub LogError(ex As Exception, Desc As String)
My.Application.Log.WriteException(ex, TraceEventType.Error, Desc & " Error:" & ex.Message & " StackTrace:" & ex.StackTrace, 0)
End Sub
End Module
Public Class RadioButtonFull
Inherits RadioButton
Protected Overrides Function IsInputKey( _
ByVal keyData As System.Windows.Forms.Keys) As Boolean
If keyData = Keys.Up OrElse keyData = Keys.Down OrElse keyData = Keys.Left OrElse keyData = Keys.Right OrElse _
keyData = (Keys.Shift Or Keys.Up) OrElse keyData = (Keys.Shift Or Keys.Up) OrElse keyData = (Keys.Shift Or Keys.Down) OrElse keyData = (Keys.Shift Or Keys.Left) OrElse keyData = (Keys.Shift Or Keys.Right) Then
Return True 'False 'true
Else
Return MyBase.IsInputKey(keyData)
End If
End Function
Protected Overrides Sub OnKeyDown( _
ByVal e As System.Windows.Forms.KeyEventArgs)
'If Not (kevent.KeyData = Keys.Up OrElse kevent.KeyData = Keys.Down OrElse kevent.KeyData = Keys.Left OrElse kevent.KeyData = Keys.Right) Then
' Me.SelectedText = " "
'Else
MyBase.OnKeyDown(e)
'End If
End Sub
End Class
'Class
''' <summary>
''' Class Paths description
''' </summary>
Public NotInheritable Class Paths
'Function
''' <summary>
''' Function AllUserData description
''' </summary>
Public Shared Function AllUsersData() As String
Static path As String
If path Is Nothing Then
path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
If Not My.Computer.FileSystem.DirectoryExists(IO.Path.Combine(path, "SignWriter Studio")) Then
My.Computer.FileSystem.CreateDirectory(IO.Path.Combine(path, "SignWriter Studio"))
End If
path = IO.Path.Combine(path, "SignWriter Studio")
End If
'Ensure Test return value
#If AssertTest Then
If path Is Nothing OrElse path.Length = 0 OrElse path = String.Empty Then
Throw New AssertionException("AllUsersData not returning path.")
End If
#End If
Return path
End Function
Public Shared Function ApplicationPath() As String
Return My.Application.Info.DirectoryPath
End Function
Public Shared Function Join(ByVal path1 As String, ByVal path2 As String) As String
Return IO.Path.Combine(path1, path2)
End Function
Public Shared Function FileExists(ByVal filename As String) As Boolean
Return System.IO.File.Exists(filename)
End Function
Public Shared Sub Copy(ByVal path1 As String, ByVal path2 As String)
IO.File.Copy(path1, path2)
End Sub
End Class
'Class
''' <summary>
''' Class Undo description
''' </summary>
Public NotInheritable Class Undo(Of TItem)
Private undoStack As New Stack(Of TItem)
Private redoStack As New Stack(Of TItem)
''' <summary>
''' Function Undo description
''' </summary>
Public Function Undo(ByVal currentItem As TItem) As TItem
If currentItem IsNot Nothing Then
If Me.undoStack.Count > 0 Then
redoStack.Push(currentItem)
Return undoStack.Pop
Else
Return Nothing
End If
End If
End Function
Public Function Redo(ByVal currentItem As TItem) As TItem
If Me.redoStack.Count > 0 Then
Me.undoStack.Push(currentItem)
Return redoStack.Pop
Else
Return Nothing
End If
End Function
Public Sub Add(ByVal addItem As TItem)
Me.undoStack.Push(addItem)
Me.redoStack.Clear()
End Sub
Public Sub Clear()
Me.undoStack.Clear()
Me.redoStack.Clear()
End Sub
End Class
'Class
''' <summary>
''' Class SignBounds description
''' </summary>
Public Class SignBounds
Const Edge As Integer = 1920
Private _top As Integer = Edge
Public ReadOnly Property Top() As Integer
Get
Return _top
End Get
End Property
Private _bottom As Integer = -Edge
Public ReadOnly Property Bottom() As Integer
Get
Return _bottom
End Get
End Property
Private _right As Integer = -Edge
Public ReadOnly Property Right() As Integer
Get
Return _right
End Get
End Property
Private _left As Integer = Edge
Public ReadOnly Property Left() As Integer
Get
Return _left
End Get
End Property
Private _width As Integer
Public ReadOnly Property Width() As Integer
Get
Return _width
End Get
End Property
Private _height As Integer
Public ReadOnly Property Height() As Integer
Get
Return _height
End Get
End Property
Public Sub Update(ByVal left As Integer, ByVal top As Integer, ByVal width As Integer, ByVal height As Integer)
If top < _top Then
_top = top
End If
If top + height > _bottom Then
_bottom = top + height
End If
If left < _left Then
_left = left
End If
If left + width > _right Then
_right = left + width
End If
_width = _right - _left
_height = _bottom - _top
End Sub
End Class
Public Class SerializeObjects
'Friend WithEvents monitor As EQATEC.Analytics.Monitor.IAnalyticsMonitor = EQATEC.Analytics.Monitor.AnalyticsMonitorFactory.Create("7A55FE8188FD4072B11C3EA5D30EB7F9")
Public Shared Function SerializeObject(ByVal obj As Object, ByVal objType As Type, ByVal extraTypes As Type()) As XmlDocument
Dim myWriter As IO.StringWriter
Dim xmlDoc As New System.Xml.XmlDocument
Try
Dim myObject As Object = obj
' Insert code to set properties and fields of the object.
'Dim mySerializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(CompInfo))
Dim mySerializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(objType, extraTypes)
Dim str As New System.Text.StringBuilder
myWriter = New IO.StringWriter(str, CultureInfo.InvariantCulture)
mySerializer.Serialize(myWriter, myObject)
xmlDoc.PreserveWhitespace = True
xmlDoc.LoadXml(str.ToString)
Catch ex As XmlException
'monitor.TrackException(ex, _
' TraceEventType.Error.ToString, _
' "Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message)
General.LogError(ex, "Cannot serialize object " & ex.GetType().Name)
'My.Application.Log.WriteException(ex, _
' TraceEventType.Error, _
' "Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message)
Dim MBO As MessageBoxOptions = MessageBoxOptions.RtlReading And MessageBoxOptions.RightAlign
MessageBox.Show("Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message, "Could not save", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MBO, False)
End Try
Return xmlDoc
End Function
Public Shared Function SerializeObject(ByVal obj As Object, ByVal objType As Type) As XmlDocument
Dim myWriter As IO.StringWriter
Dim xmlDoc As New System.Xml.XmlDocument
Try
Dim myObject As Object = obj
' Insert code to set properties and fields of the object.
'Dim mySerializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(CompInfo))
Dim mySerializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(objType)
Dim str As New System.Text.StringBuilder
myWriter = New IO.StringWriter(str, CultureInfo.InvariantCulture)
mySerializer.Serialize(myWriter, myObject)
xmlDoc.PreserveWhitespace = True
xmlDoc.LoadXml(str.ToString)
Catch ex As XmlException
'monitor.TrackException(ex, _
' TraceEventType.Error.ToString, _
' "Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message)
General.LogError(ex, "Cannot serialize object " & ex.GetType().Name)
'My.Application.Log.WriteException(ex, _
' TraceEventType.Error, _
' "Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message)
Dim MBO As MessageBoxOptions = MessageBoxOptions.RtlReading And MessageBoxOptions.RightAlign
MessageBox.Show("Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message, "Could not serialize", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MBO, False)
End Try
Return xmlDoc
End Function
Public Shared Function SerializeObject(ByVal obj As Object, ByVal objType As Type, ByVal filename As String)
Dim myWriter As IO.StringWriter
Dim xmlDoc As New System.Xml.XmlDocument
Try
Dim myObject As Object = obj
' Insert code to set properties and fields of the object.
'Dim mySerializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(CompInfo))
Dim mySerializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(objType)
Dim str As New System.Text.StringBuilder
myWriter = New IO.StringWriter(str, CultureInfo.InvariantCulture)
mySerializer.Serialize(myWriter, myObject)
xmlDoc.PreserveWhitespace = True
xmlDoc.Save(filename)
'.LoadXml(str.ToString)
Catch ex As XmlException
'monitor.TrackException(ex, _
' TraceEventType.Error.ToString, _
' "Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message)
General.LogError(ex, "Cannot serialize object " & ex.GetType().Name)
'My.Application.Log.WriteException(ex, _
' TraceEventType.Error, _
' "Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message)
Dim MBO As MessageBoxOptions = MessageBoxOptions.RtlReading And MessageBoxOptions.RightAlign
MessageBox.Show("Cannot serialize object " & ex.GetType().Name & " Error:" & ex.Message, "Could not serialize", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MBO, False)
End Try
Return xmlDoc
End Function
Public Shared Function DESerializeObject(ByVal xmlDoc As XmlDocument, ByVal objType As Type) As Object
If xmlDoc Is Nothing Then
Throw New ArgumentNullException("xmlDoc")
End If
If objType Is Nothing Then
Throw New ArgumentNullException("objType")
End If
Dim obj As Object
Try
Dim myReader As TextReader
' Construct an instance of the XmlSerializer with the type
' of object that is being deserialized.
Dim mySerializer As Serialization.XmlSerializer = New Serialization.XmlSerializer(objType)
' To read the file, create a FileStream.
myReader = New IO.StringReader(xmlDoc.OuterXml)
' Call the Deserialize method and cast to the object type.
xmlDoc.ToString()
obj = mySerializer.Deserialize(myReader)
Return obj
Catch ex As XmlException
'monitor.TrackException(ex, _
' TraceEventType.Error.ToString, _
' "Cannot deserialze object. Error: " & ex.Message, "Could not open ")
General.LogError(ex, "Cannot deserialize object " & ex.GetType().Name)
'My.Application.Log.WriteException(ex, _
' TraceEventType.Error, _
' "Cannot deserialze object. Error: " & ex.Message, 0)
Dim MBO As MessageBoxOptions = MessageBoxOptions.RtlReading And MessageBoxOptions.RightAlign
MessageBox.Show("Cannot deserialze object " & ex.GetType().Name & " Error:" & ex.Message, "Could not deserialize", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MBO, False)
Return Nothing
End Try
End Function
End Class
|
JonathanDDuncan/SignWriterStudio
|
General/General/General.vb
|
Visual Basic
|
mit
| 25,088
|
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.17929
'
' 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", "10.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.VBFindUnreadMessages.My.MySettings
Get
Return Global.VBFindUnreadMessages.My.MySettings.Default
End Get
End Property
End Module
End Namespace
|
age-killer/Electronic-invoice-document-processing
|
MailSort_CSHARP/packages/Independentsoft.Exchange.3.0.400/Tutorial/VBFindUnreadMessages/My Project/Settings.Designer.vb
|
Visual Basic
|
mit
| 2,930
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmMain
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 Map1 As Pegazux.Controls.GoogleMaps.Map = New Pegazux.Controls.GoogleMaps.Map
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
Me.GMap = New Pegazux.Controls.GoogleMaps.GoogleMapsControl
Me.pMap = New System.Windows.Forms.Panel
Me.DataGridView1 = New System.Windows.Forms.DataGridView
Me.wp_id = New System.Windows.Forms.DataGridViewTextBoxColumn
Me.wp_lat = New System.Windows.Forms.DataGridViewTextBoxColumn
Me.wp_lon = New System.Windows.Forms.DataGridViewTextBoxColumn
Me.WaypointName = New System.Windows.Forms.DataGridViewTextBoxColumn
Me.pMonitoring = New System.Windows.Forms.Panel
Me.pInstruments = New System.Windows.Forms.Panel
Me.picAlert = New System.Windows.Forms.PictureBox
Me.chkManualControl = New System.Windows.Forms.CheckBox
Me.lblGPSCourse = New System.Windows.Forms.Label
Me.lblMyMode = New System.Windows.Forms.Label
Me.PicSpeed = New System.Windows.Forms.PictureBox
Me.PicPitch = New System.Windows.Forms.PictureBox
Me.PicRoll = New System.Windows.Forms.PictureBox
Me.PicCompass = New System.Windows.Forms.PictureBox
Me.lblRollPitch = New System.Windows.Forms.Label
Me.lblDistanceCovered = New System.Windows.Forms.Label
Me.lblWaterTemp = New System.Windows.Forms.Label
Me.lblHullTemp = New System.Windows.Forms.Label
Me.lblRemainingPower = New System.Windows.Forms.Label
Me.lblSolarPanelVolt = New System.Windows.Forms.Label
Me.lblMotorSpeeds = New System.Windows.Forms.Label
Me.lblLatLong = New System.Windows.Forms.Label
Me.lblSpeed = New System.Windows.Forms.Label
Me.lblCurrentWaypoint = New System.Windows.Forms.Label
Me.lblTargetHeading = New System.Windows.Forms.Label
Me.lblCurrentHeading = New System.Windows.Forms.Label
Me.lblPowerSavingMode = New System.Windows.Forms.Label
Me.lblBattery = New System.Windows.Forms.Label
Me.wbMap = New System.Windows.Forms.WebBrowser
Me.pConfig = New System.Windows.Forms.Panel
Me.txtSerialData = New System.Windows.Forms.TextBox
Me.txtSerialInput = New System.Windows.Forms.TextBox
Me.sPort = New System.IO.Ports.SerialPort(Me.components)
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip
Me.MissionToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.LoadLastViewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.SaveViewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripSeparator
Me.NewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.OpenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.SaveNavigationToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripSeparator
Me.PrintNavigationToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripSeparator
Me.ExitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.HelpToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.AboutMEWToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.timConnectedShow = New System.Windows.Forms.Timer(Me.components)
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog
Me.timTelRecShow = New System.Windows.Forms.Timer(Me.components)
Me.timAlertBlink = New System.Windows.Forms.Timer(Me.components)
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.timTelemetry = New System.Windows.Forms.Timer(Me.components)
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip
Me.lblStatus = New System.Windows.Forms.ToolStripStatusLabel
Me.statuslabelConnect = New System.Windows.Forms.ToolStripStatusLabel
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel
Me.cmbView = New System.Windows.Forms.ToolStripComboBox
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator
Me.cboPorts = New System.Windows.Forms.ToolStripComboBox
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel
Me.btnConnect = New System.Windows.Forms.ToolStripButton
Me.btnClearWaypoints = New System.Windows.Forms.ToolStripButton
Me.btnUploadWaypoints = New System.Windows.Forms.ToolStripButton
Me.btnSameViewinMap = New System.Windows.Forms.ToolStripButton
Me.chkAutoCenter2 = New System.Windows.Forms.ToolStripButton
Me.btnTelemetry2 = New System.Windows.Forms.ToolStripButton
Me.btnTel = New System.Windows.Forms.ToolStripDropDownButton
Me.ToolStripMenuItem4 = New System.Windows.Forms.ToolStripMenuItem
Me.QuaterOfASecondToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.HalfASecondToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem5 = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem6 = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem7 = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStripMenuItem8 = New System.Windows.Forms.ToolStripMenuItem
Me.pMap.SuspendLayout()
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pMonitoring.SuspendLayout()
Me.pInstruments.SuspendLayout()
CType(Me.picAlert, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PicSpeed, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PicPitch, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PicRoll, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PicCompass, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pConfig.SuspendLayout()
Me.MenuStrip1.SuspendLayout()
Me.StatusStrip1.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
Me.SuspendLayout()
'
'GMap
'
Me.GMap.BackColor = System.Drawing.Color.White
Me.GMap.Dock = System.Windows.Forms.DockStyle.Top
Me.GMap.Location = New System.Drawing.Point(0, 0)
Map1.AddMarkerOnClick = False
Map1.Bounds = Nothing
Map1.CenterMapOnClick = False
Map1.Parent = Me.GMap
Map1.UseMarkerClusterer = False
Me.GMap.Map = Map1
Me.GMap.Name = "GMap"
Me.GMap.Size = New System.Drawing.Size(721, 538)
Me.GMap.TabIndex = 5
'
'pMap
'
Me.pMap.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.pMap.Controls.Add(Me.DataGridView1)
Me.pMap.Controls.Add(Me.GMap)
Me.pMap.Location = New System.Drawing.Point(928, 284)
Me.pMap.Name = "pMap"
Me.pMap.Size = New System.Drawing.Size(721, 585)
Me.pMap.TabIndex = 5
Me.pMap.Visible = False
'
'DataGridView1
'
Me.DataGridView1.AllowUserToAddRows = False
Me.DataGridView1.AllowUserToDeleteRows = False
Me.DataGridView1.BackgroundColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.wp_id, Me.wp_lat, Me.wp_lon, Me.WaypointName})
Me.DataGridView1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.DataGridView1.GridColor = System.Drawing.Color.Gainsboro
Me.DataGridView1.Location = New System.Drawing.Point(0, 445)
Me.DataGridView1.Margin = New System.Windows.Forms.Padding(0)
Me.DataGridView1.MultiSelect = False
Me.DataGridView1.Name = "DataGridView1"
Me.DataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
DataGridViewCellStyle2.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView1.RowHeadersDefaultCellStyle = DataGridViewCellStyle2
Me.DataGridView1.RowHeadersVisible = False
DataGridViewCellStyle3.BackColor = System.Drawing.Color.Silver
DataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.Black
Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle3
Me.DataGridView1.Size = New System.Drawing.Size(721, 140)
Me.DataGridView1.TabIndex = 0
'
'wp_id
'
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
DataGridViewCellStyle1.ForeColor = System.Drawing.Color.White
Me.wp_id.DefaultCellStyle = DataGridViewCellStyle1
Me.wp_id.HeaderText = "Waypoint ID"
Me.wp_id.Name = "wp_id"
Me.wp_id.ReadOnly = True
'
'wp_lat
'
Me.wp_lat.HeaderText = "Latitude"
Me.wp_lat.Name = "wp_lat"
'
'wp_lon
'
Me.wp_lon.HeaderText = "Longitude"
Me.wp_lon.Name = "wp_lon"
'
'WaypointName
'
Me.WaypointName.HeaderText = "Name"
Me.WaypointName.Name = "WaypointName"
'
'pMonitoring
'
Me.pMonitoring.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pMonitoring.Controls.Add(Me.pInstruments)
Me.pMonitoring.Controls.Add(Me.wbMap)
Me.pMonitoring.Location = New System.Drawing.Point(12, 52)
Me.pMonitoring.Name = "pMonitoring"
Me.pMonitoring.Size = New System.Drawing.Size(873, 640)
Me.pMonitoring.TabIndex = 7
'
'pInstruments
'
Me.pInstruments.Controls.Add(Me.picAlert)
Me.pInstruments.Controls.Add(Me.chkManualControl)
Me.pInstruments.Controls.Add(Me.lblGPSCourse)
Me.pInstruments.Controls.Add(Me.lblMyMode)
Me.pInstruments.Controls.Add(Me.PicSpeed)
Me.pInstruments.Controls.Add(Me.PicPitch)
Me.pInstruments.Controls.Add(Me.PicRoll)
Me.pInstruments.Controls.Add(Me.PicCompass)
Me.pInstruments.Controls.Add(Me.lblRollPitch)
Me.pInstruments.Controls.Add(Me.lblDistanceCovered)
Me.pInstruments.Controls.Add(Me.lblWaterTemp)
Me.pInstruments.Controls.Add(Me.lblHullTemp)
Me.pInstruments.Controls.Add(Me.lblRemainingPower)
Me.pInstruments.Controls.Add(Me.lblSolarPanelVolt)
Me.pInstruments.Controls.Add(Me.lblMotorSpeeds)
Me.pInstruments.Controls.Add(Me.lblLatLong)
Me.pInstruments.Controls.Add(Me.lblSpeed)
Me.pInstruments.Controls.Add(Me.lblCurrentWaypoint)
Me.pInstruments.Controls.Add(Me.lblTargetHeading)
Me.pInstruments.Controls.Add(Me.lblCurrentHeading)
Me.pInstruments.Controls.Add(Me.lblPowerSavingMode)
Me.pInstruments.Controls.Add(Me.lblBattery)
Me.pInstruments.Dock = System.Windows.Forms.DockStyle.Right
Me.pInstruments.Location = New System.Drawing.Point(269, 0)
Me.pInstruments.Name = "pInstruments"
Me.pInstruments.Size = New System.Drawing.Size(602, 638)
Me.pInstruments.TabIndex = 39
'
'picAlert
'
Me.picAlert.Image = CType(resources.GetObject("picAlert.Image"), System.Drawing.Image)
Me.picAlert.Location = New System.Drawing.Point(428, 611)
Me.picAlert.Name = "picAlert"
Me.picAlert.Size = New System.Drawing.Size(16, 16)
Me.picAlert.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
Me.picAlert.TabIndex = 63
Me.picAlert.TabStop = False
Me.ToolTip1.SetToolTip(Me.picAlert, "Telemetry is outdated")
Me.picAlert.Visible = False
'
'chkManualControl
'
Me.chkManualControl.Image = Global.MEW_Control_Station.My.Resources.Resources.joystick
Me.chkManualControl.ImageAlign = System.Drawing.ContentAlignment.BottomLeft
Me.chkManualControl.Location = New System.Drawing.Point(284, 612)
Me.chkManualControl.Name = "chkManualControl"
Me.chkManualControl.Size = New System.Drawing.Size(113, 18)
Me.chkManualControl.TabIndex = 62
Me.chkManualControl.Text = "Manual Control"
Me.chkManualControl.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.chkManualControl.UseVisualStyleBackColor = True
'
'lblGPSCourse
'
Me.lblGPSCourse.AutoSize = True
Me.lblGPSCourse.ForeColor = System.Drawing.Color.White
Me.lblGPSCourse.Location = New System.Drawing.Point(24, 541)
Me.lblGPSCourse.Name = "lblGPSCourse"
Me.lblGPSCourse.Size = New System.Drawing.Size(70, 13)
Me.lblGPSCourse.TabIndex = 61
Me.lblGPSCourse.Text = "GPS Course: "
'
'lblMyMode
'
Me.lblMyMode.AutoSize = True
Me.lblMyMode.ForeColor = System.Drawing.Color.White
Me.lblMyMode.Location = New System.Drawing.Point(24, 554)
Me.lblMyMode.Name = "lblMyMode"
Me.lblMyMode.Size = New System.Drawing.Size(77, 13)
Me.lblMyMode.TabIndex = 60
Me.lblMyMode.Text = "Current Mode:"
'
'PicSpeed
'
Me.PicSpeed.Location = New System.Drawing.Point(243, 11)
Me.PicSpeed.Name = "PicSpeed"
Me.PicSpeed.Size = New System.Drawing.Size(222, 230)
Me.PicSpeed.TabIndex = 58
Me.PicSpeed.TabStop = False
'
'PicPitch
'
Me.PicPitch.Location = New System.Drawing.Point(15, 247)
Me.PicPitch.Name = "PicPitch"
Me.PicPitch.Size = New System.Drawing.Size(222, 230)
Me.PicPitch.TabIndex = 57
Me.PicPitch.TabStop = False
'
'PicRoll
'
Me.PicRoll.Location = New System.Drawing.Point(243, 247)
Me.PicRoll.Name = "PicRoll"
Me.PicRoll.Size = New System.Drawing.Size(222, 230)
Me.PicRoll.TabIndex = 56
Me.PicRoll.TabStop = False
'
'PicCompass
'
Me.PicCompass.Location = New System.Drawing.Point(15, 11)
Me.PicCompass.Name = "PicCompass"
Me.PicCompass.Size = New System.Drawing.Size(222, 230)
Me.PicCompass.TabIndex = 55
Me.PicCompass.TabStop = False
'
'lblRollPitch
'
Me.lblRollPitch.AutoSize = True
Me.lblRollPitch.ForeColor = System.Drawing.Color.White
Me.lblRollPitch.Location = New System.Drawing.Point(24, 528)
Me.lblRollPitch.Name = "lblRollPitch"
Me.lblRollPitch.Size = New System.Drawing.Size(78, 13)
Me.lblRollPitch.TabIndex = 54
Me.lblRollPitch.Text = "Roll and Pitch: "
'
'lblDistanceCovered
'
Me.lblDistanceCovered.AutoSize = True
Me.lblDistanceCovered.ForeColor = System.Drawing.Color.Gray
Me.lblDistanceCovered.Location = New System.Drawing.Point(24, 602)
Me.lblDistanceCovered.Name = "lblDistanceCovered"
Me.lblDistanceCovered.Size = New System.Drawing.Size(119, 13)
Me.lblDistanceCovered.TabIndex = 53
Me.lblDistanceCovered.Text = "Distance Covered: 46m"
Me.lblDistanceCovered.Visible = False
'
'lblWaterTemp
'
Me.lblWaterTemp.AutoSize = True
Me.lblWaterTemp.ForeColor = System.Drawing.Color.White
Me.lblWaterTemp.Location = New System.Drawing.Point(24, 515)
Me.lblWaterTemp.Name = "lblWaterTemp"
Me.lblWaterTemp.Size = New System.Drawing.Size(109, 13)
Me.lblWaterTemp.TabIndex = 52
Me.lblWaterTemp.Text = "Water Temperature: "
'
'lblHullTemp
'
Me.lblHullTemp.AutoSize = True
Me.lblHullTemp.ForeColor = System.Drawing.Color.White
Me.lblHullTemp.Location = New System.Drawing.Point(24, 502)
Me.lblHullTemp.Name = "lblHullTemp"
Me.lblHullTemp.Size = New System.Drawing.Size(96, 13)
Me.lblHullTemp.TabIndex = 51
Me.lblHullTemp.Text = "Hull Temperature: "
'
'lblRemainingPower
'
Me.lblRemainingPower.AutoSize = True
Me.lblRemainingPower.ForeColor = System.Drawing.Color.Gray
Me.lblRemainingPower.Location = New System.Drawing.Point(24, 589)
Me.lblRemainingPower.Name = "lblRemainingPower"
Me.lblRemainingPower.Size = New System.Drawing.Size(185, 13)
Me.lblRemainingPower.TabIndex = 50
Me.lblRemainingPower.Text = "Remaining Power to Last for: 5 hours"
Me.lblRemainingPower.Visible = False
'
'lblSolarPanelVolt
'
Me.lblSolarPanelVolt.AutoSize = True
Me.lblSolarPanelVolt.ForeColor = System.Drawing.Color.White
Me.lblSolarPanelVolt.Location = New System.Drawing.Point(283, 500)
Me.lblSolarPanelVolt.Name = "lblSolarPanelVolt"
Me.lblSolarPanelVolt.Size = New System.Drawing.Size(103, 13)
Me.lblSolarPanelVolt.TabIndex = 49
Me.lblSolarPanelVolt.Text = "Solar Panel Voltage:"
'
'lblMotorSpeeds
'
Me.lblMotorSpeeds.AutoSize = True
Me.lblMotorSpeeds.ForeColor = System.Drawing.Color.White
Me.lblMotorSpeeds.Location = New System.Drawing.Point(24, 489)
Me.lblMotorSpeeds.Name = "lblMotorSpeeds"
Me.lblMotorSpeeds.Size = New System.Drawing.Size(77, 13)
Me.lblMotorSpeeds.TabIndex = 48
Me.lblMotorSpeeds.Text = "Motor Speeds:"
'
'lblLatLong
'
Me.lblLatLong.AutoSize = True
Me.lblLatLong.ForeColor = System.Drawing.Color.White
Me.lblLatLong.Location = New System.Drawing.Point(283, 565)
Me.lblLatLong.Name = "lblLatLong"
Me.lblLatLong.Size = New System.Drawing.Size(56, 13)
Me.lblLatLong.TabIndex = 45
Me.lblLatLong.Text = "Lat/Long: "
'
'lblSpeed
'
Me.lblSpeed.AutoSize = True
Me.lblSpeed.ForeColor = System.Drawing.Color.White
Me.lblSpeed.Location = New System.Drawing.Point(283, 552)
Me.lblSpeed.Name = "lblSpeed"
Me.lblSpeed.Size = New System.Drawing.Size(44, 13)
Me.lblSpeed.TabIndex = 44
Me.lblSpeed.Text = "Speed: "
'
'lblCurrentWaypoint
'
Me.lblCurrentWaypoint.AutoSize = True
Me.lblCurrentWaypoint.ForeColor = System.Drawing.Color.White
Me.lblCurrentWaypoint.Location = New System.Drawing.Point(283, 539)
Me.lblCurrentWaypoint.Name = "lblCurrentWaypoint"
Me.lblCurrentWaypoint.Size = New System.Drawing.Size(100, 13)
Me.lblCurrentWaypoint.TabIndex = 43
Me.lblCurrentWaypoint.Text = "Current Waypoint: "
'
'lblTargetHeading
'
Me.lblTargetHeading.AutoSize = True
Me.lblTargetHeading.ForeColor = System.Drawing.Color.White
Me.lblTargetHeading.Location = New System.Drawing.Point(283, 526)
Me.lblTargetHeading.Name = "lblTargetHeading"
Me.lblTargetHeading.Size = New System.Drawing.Size(88, 13)
Me.lblTargetHeading.TabIndex = 42
Me.lblTargetHeading.Text = "Target Heading: "
'
'lblCurrentHeading
'
Me.lblCurrentHeading.AutoSize = True
Me.lblCurrentHeading.ForeColor = System.Drawing.Color.White
Me.lblCurrentHeading.Location = New System.Drawing.Point(283, 513)
Me.lblCurrentHeading.Name = "lblCurrentHeading"
Me.lblCurrentHeading.Size = New System.Drawing.Size(90, 13)
Me.lblCurrentHeading.TabIndex = 41
Me.lblCurrentHeading.Text = "Current Heading:"
'
'lblPowerSavingMode
'
Me.lblPowerSavingMode.AutoSize = True
Me.lblPowerSavingMode.ForeColor = System.Drawing.Color.White
Me.lblPowerSavingMode.Location = New System.Drawing.Point(283, 578)
Me.lblPowerSavingMode.Name = "lblPowerSavingMode"
Me.lblPowerSavingMode.Size = New System.Drawing.Size(105, 13)
Me.lblPowerSavingMode.TabIndex = 40
Me.lblPowerSavingMode.Text = "Power Saving Mode:"
'
'lblBattery
'
Me.lblBattery.AutoSize = True
Me.lblBattery.ForeColor = System.Drawing.Color.White
Me.lblBattery.Location = New System.Drawing.Point(283, 487)
Me.lblBattery.Name = "lblBattery"
Me.lblBattery.Size = New System.Drawing.Size(89, 13)
Me.lblBattery.TabIndex = 39
Me.lblBattery.Text = "Battery Voltage: "
'
'wbMap
'
Me.wbMap.AllowWebBrowserDrop = False
Me.wbMap.Dock = System.Windows.Forms.DockStyle.Left
Me.wbMap.Location = New System.Drawing.Point(0, 0)
Me.wbMap.MinimumSize = New System.Drawing.Size(20, 20)
Me.wbMap.Name = "wbMap"
Me.wbMap.Size = New System.Drawing.Size(247, 638)
Me.wbMap.TabIndex = 35
Me.wbMap.Url = New System.Uri("", System.UriKind.Relative)
'
'pConfig
'
Me.pConfig.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.pConfig.Controls.Add(Me.txtSerialData)
Me.pConfig.Controls.Add(Me.txtSerialInput)
Me.pConfig.Location = New System.Drawing.Point(845, 605)
Me.pConfig.Name = "pConfig"
Me.pConfig.Size = New System.Drawing.Size(119, 116)
Me.pConfig.TabIndex = 8
Me.pConfig.Visible = False
'
'txtSerialData
'
Me.txtSerialData.Dock = System.Windows.Forms.DockStyle.Top
Me.txtSerialData.Font = New System.Drawing.Font("Courier New", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtSerialData.Location = New System.Drawing.Point(0, 0)
Me.txtSerialData.Multiline = True
Me.txtSerialData.Name = "txtSerialData"
Me.txtSerialData.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.txtSerialData.Size = New System.Drawing.Size(115, 620)
Me.txtSerialData.TabIndex = 9
'
'txtSerialInput
'
Me.txtSerialInput.AcceptsReturn = True
Me.txtSerialInput.AutoCompleteCustomSource.AddRange(New String() {"reset", "setid", "getid", "setwp", "heartbeat", "settotalwp", "setcurrentwp", "getcurrentwp", "clearwps", "printwps", "setmode", "getmode", "calcdistance", "calcbearing", "getgps", "targets", "cls", "feventreachwp", "debugmodecompass", "debugmodegps", "debugmodesteering", "debugmodetel", "getwpradius", "setwpradius"})
Me.txtSerialInput.Dock = System.Windows.Forms.DockStyle.Bottom
Me.txtSerialInput.Location = New System.Drawing.Point(0, 91)
Me.txtSerialInput.Name = "txtSerialInput"
Me.txtSerialInput.Size = New System.Drawing.Size(115, 21)
Me.txtSerialInput.TabIndex = 10
'
'sPort
'
Me.sPort.BaudRate = 115200
Me.sPort.DiscardNull = True
Me.sPort.ReadBufferSize = 1024
Me.sPort.WriteBufferSize = 51200
'
'MenuStrip1
'
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MissionToolStripMenuItem, Me.HelpToolStripMenuItem})
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional
Me.MenuStrip1.Size = New System.Drawing.Size(1028, 24)
Me.MenuStrip1.TabIndex = 9
Me.MenuStrip1.Text = "MenuStrip1"
'
'MissionToolStripMenuItem
'
Me.MissionToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LoadLastViewToolStripMenuItem, Me.SaveViewToolStripMenuItem, Me.ToolStripMenuItem3, Me.NewToolStripMenuItem, Me.OpenToolStripMenuItem, Me.SaveNavigationToolStripMenuItem, Me.ToolStripMenuItem2, Me.PrintNavigationToolStripMenuItem, Me.ToolStripMenuItem1, Me.ExitToolStripMenuItem})
Me.MissionToolStripMenuItem.Name = "MissionToolStripMenuItem"
Me.MissionToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.L), System.Windows.Forms.Keys)
Me.MissionToolStripMenuItem.Size = New System.Drawing.Size(35, 20)
Me.MissionToolStripMenuItem.Text = "&File"
'
'LoadLastViewToolStripMenuItem
'
Me.LoadLastViewToolStripMenuItem.Image = Global.MEW_Control_Station.My.Resources.Resources.action_refresh
Me.LoadLastViewToolStripMenuItem.Name = "LoadLastViewToolStripMenuItem"
Me.LoadLastViewToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.L), System.Windows.Forms.Keys)
Me.LoadLastViewToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.LoadLastViewToolStripMenuItem.Text = "Load View"
'
'SaveViewToolStripMenuItem
'
Me.SaveViewToolStripMenuItem.Image = Global.MEW_Control_Station.My.Resources.Resources.action_refresh_blue
Me.SaveViewToolStripMenuItem.Name = "SaveViewToolStripMenuItem"
Me.SaveViewToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.S), System.Windows.Forms.Keys)
Me.SaveViewToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.SaveViewToolStripMenuItem.Text = "Save View"
'
'ToolStripMenuItem3
'
Me.ToolStripMenuItem3.Name = "ToolStripMenuItem3"
Me.ToolStripMenuItem3.Size = New System.Drawing.Size(235, 6)
'
'NewToolStripMenuItem
'
Me.NewToolStripMenuItem.Image = Global.MEW_Control_Station.My.Resources.Resources.box
Me.NewToolStripMenuItem.Name = "NewToolStripMenuItem"
Me.NewToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.N), System.Windows.Forms.Keys)
Me.NewToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.NewToolStripMenuItem.Text = "&New Navigation"
'
'OpenToolStripMenuItem
'
Me.OpenToolStripMenuItem.Image = Global.MEW_Control_Station.My.Resources.Resources.folder_images
Me.OpenToolStripMenuItem.Name = "OpenToolStripMenuItem"
Me.OpenToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.O), System.Windows.Forms.Keys)
Me.OpenToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.OpenToolStripMenuItem.Text = "&Open Saved Navigation"
'
'SaveNavigationToolStripMenuItem
'
Me.SaveNavigationToolStripMenuItem.Image = Global.MEW_Control_Station.My.Resources.Resources.action_save
Me.SaveNavigationToolStripMenuItem.Name = "SaveNavigationToolStripMenuItem"
Me.SaveNavigationToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.S), System.Windows.Forms.Keys)
Me.SaveNavigationToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.SaveNavigationToolStripMenuItem.Text = "&Save Navigation"
'
'ToolStripMenuItem2
'
Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2"
Me.ToolStripMenuItem2.Size = New System.Drawing.Size(235, 6)
'
'PrintNavigationToolStripMenuItem
'
Me.PrintNavigationToolStripMenuItem.Image = Global.MEW_Control_Station.My.Resources.Resources.action_print
Me.PrintNavigationToolStripMenuItem.Name = "PrintNavigationToolStripMenuItem"
Me.PrintNavigationToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.P), System.Windows.Forms.Keys)
Me.PrintNavigationToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.PrintNavigationToolStripMenuItem.Text = "&Print Navigation"
'
'ToolStripMenuItem1
'
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(235, 6)
'
'ExitToolStripMenuItem
'
Me.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem"
Me.ExitToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.E), System.Windows.Forms.Keys)
Me.ExitToolStripMenuItem.Size = New System.Drawing.Size(238, 22)
Me.ExitToolStripMenuItem.Text = "&Exit"
'
'HelpToolStripMenuItem
'
Me.HelpToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AboutMEWToolStripMenuItem})
Me.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"
Me.HelpToolStripMenuItem.Size = New System.Drawing.Size(40, 20)
Me.HelpToolStripMenuItem.Text = "Help"
'
'AboutMEWToolStripMenuItem
'
Me.AboutMEWToolStripMenuItem.Name = "AboutMEWToolStripMenuItem"
Me.AboutMEWToolStripMenuItem.Size = New System.Drawing.Size(141, 22)
Me.AboutMEWToolStripMenuItem.Text = "About MEW"
'
'timConnectedShow
'
Me.timConnectedShow.Enabled = True
'
'OpenFileDialog1
'
Me.OpenFileDialog1.Filter = "MEW Files|*.mew"
'
'SaveFileDialog1
'
Me.SaveFileDialog1.Filter = "MEW Files|*.mew"
'
'timTelRecShow
'
'
'timAlertBlink
'
Me.timAlertBlink.Enabled = True
Me.timAlertBlink.Interval = 250
'
'ToolTip1
'
Me.ToolTip1.AutoPopDelay = 0
Me.ToolTip1.InitialDelay = 0
Me.ToolTip1.ReshowDelay = 100
Me.ToolTip1.ShowAlways = True
'
'timTelemetry
'
Me.timTelemetry.Interval = 1000
'
'StatusStrip1
'
Me.StatusStrip1.BackgroundImage = Global.MEW_Control_Station.My.Resources.Resources.TOOLBAR
Me.StatusStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.lblStatus, Me.statuslabelConnect})
Me.StatusStrip1.Location = New System.Drawing.Point(0, 724)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(1028, 22)
Me.StatusStrip1.TabIndex = 2
Me.StatusStrip1.Text = "StatusStrip1"
'
'lblStatus
'
Me.lblStatus.AutoSize = False
Me.lblStatus.BackgroundImage = Global.MEW_Control_Station.My.Resources.Resources.TOOLBAR
Me.lblStatus.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.lblStatus.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Top
Me.lblStatus.ForeColor = System.Drawing.Color.Silver
Me.lblStatus.Name = "lblStatus"
Me.lblStatus.Size = New System.Drawing.Size(800, 17)
Me.lblStatus.Text = "Status"
Me.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'statuslabelConnect
'
Me.statuslabelConnect.ForeColor = System.Drawing.Color.Silver
Me.statuslabelConnect.Image = Global.MEW_Control_Station.My.Resources.Resources.icon_alert
Me.statuslabelConnect.Name = "statuslabelConnect"
Me.statuslabelConnect.Size = New System.Drawing.Size(87, 17)
Me.statuslabelConnect.Text = "Disconnected"
Me.statuslabelConnect.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'ToolStrip1
'
Me.ToolStrip1.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.ToolStrip1.BackgroundImage = Global.MEW_Control_Station.My.Resources.Resources.MENUBAR
Me.ToolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel1, Me.cmbView, Me.ToolStripSeparator1, Me.cboPorts, Me.ToolStripLabel2, Me.btnConnect, Me.btnClearWaypoints, Me.btnUploadWaypoints, Me.btnSameViewinMap, Me.chkAutoCenter2, Me.btnTelemetry2, Me.btnTel})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 24)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(1028, 25)
Me.ToolStrip1.TabIndex = 1
Me.ToolStrip1.Text = "ToolStrip1"
'
'ToolStripLabel1
'
Me.ToolStripLabel1.ForeColor = System.Drawing.Color.White
Me.ToolStripLabel1.Name = "ToolStripLabel1"
Me.ToolStripLabel1.Size = New System.Drawing.Size(54, 22)
Me.ToolStripLabel1.Text = "Main View"
'
'cmbView
'
Me.cmbView.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbView.Items.AddRange(New Object() {"Monitoring", "Navigation", "Configuration"})
Me.cmbView.Name = "cmbView"
Me.cmbView.Size = New System.Drawing.Size(121, 25)
'
'ToolStripSeparator1
'
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
'
'cboPorts
'
Me.cboPorts.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.cboPorts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboPorts.Name = "cboPorts"
Me.cboPorts.Size = New System.Drawing.Size(75, 25)
Me.cboPorts.Text = Global.MEW_Control_Station.My.MySettings.Default.COMPort
'
'ToolStripLabel2
'
Me.ToolStripLabel2.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.ToolStripLabel2.ForeColor = System.Drawing.Color.White
Me.ToolStripLabel2.Name = "ToolStripLabel2"
Me.ToolStripLabel2.Size = New System.Drawing.Size(88, 22)
Me.ToolStripLabel2.Text = "Connection Port:"
'
'btnConnect
'
Me.btnConnect.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.btnConnect.ForeColor = System.Drawing.Color.White
Me.btnConnect.Image = Global.MEW_Control_Station.My.Resources.Resources.icon_link
Me.btnConnect.ImageTransparentColor = System.Drawing.Color.Magenta
Me.btnConnect.Name = "btnConnect"
Me.btnConnect.Size = New System.Drawing.Size(67, 22)
Me.btnConnect.Text = "Connect"
'
'btnClearWaypoints
'
Me.btnClearWaypoints.ForeColor = System.Drawing.Color.White
Me.btnClearWaypoints.Image = Global.MEW_Control_Station.My.Resources.Resources.action_stop
Me.btnClearWaypoints.ImageTransparentColor = System.Drawing.Color.Magenta
Me.btnClearWaypoints.Name = "btnClearWaypoints"
Me.btnClearWaypoints.Size = New System.Drawing.Size(106, 22)
Me.btnClearWaypoints.Text = "Clear Waypoints"
'
'btnUploadWaypoints
'
Me.btnUploadWaypoints.ForeColor = System.Drawing.Color.White
Me.btnUploadWaypoints.Image = Global.MEW_Control_Station.My.Resources.Resources.icon_package_get
Me.btnUploadWaypoints.ImageTransparentColor = System.Drawing.Color.Magenta
Me.btnUploadWaypoints.Name = "btnUploadWaypoints"
Me.btnUploadWaypoints.Size = New System.Drawing.Size(114, 22)
Me.btnUploadWaypoints.Text = "Upload Waypoints"
'
'btnSameViewinMap
'
Me.btnSameViewinMap.Image = Global.MEW_Control_Station.My.Resources.Resources.map_go
Me.btnSameViewinMap.ImageTransparentColor = System.Drawing.Color.Magenta
Me.btnSameViewinMap.Name = "btnSameViewinMap"
Me.btnSameViewinMap.Size = New System.Drawing.Size(114, 22)
Me.btnSameViewinMap.Text = "Same View at Map"
'
'chkAutoCenter2
'
Me.chkAutoCenter2.CheckOnClick = True
Me.chkAutoCenter2.Image = Global.MEW_Control_Station.My.Resources.Resources.World_link
Me.chkAutoCenter2.ImageTransparentColor = System.Drawing.Color.Magenta
Me.chkAutoCenter2.Name = "chkAutoCenter2"
Me.chkAutoCenter2.Size = New System.Drawing.Size(86, 22)
Me.chkAutoCenter2.Text = "Auto Center"
'
'btnTelemetry2
'
Me.btnTelemetry2.Image = Global.MEW_Control_Station.My.Resources.Resources.transmit_blue
Me.btnTelemetry2.ImageTransparentColor = System.Drawing.Color.Magenta
Me.btnTelemetry2.Name = "btnTelemetry2"
Me.btnTelemetry2.Size = New System.Drawing.Size(75, 22)
Me.btnTelemetry2.Text = "Telemetry"
'
'btnTel
'
Me.btnTel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.None
Me.btnTel.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem4, Me.QuaterOfASecondToolStripMenuItem, Me.HalfASecondToolStripMenuItem, Me.ToolStripMenuItem5, Me.ToolStripMenuItem6, Me.ToolStripMenuItem7, Me.ToolStripMenuItem8})
Me.btnTel.Image = CType(resources.GetObject("btnTel.Image"), System.Drawing.Image)
Me.btnTel.ImageTransparentColor = System.Drawing.Color.Magenta
Me.btnTel.Name = "btnTel"
Me.btnTel.Size = New System.Drawing.Size(13, 22)
Me.btnTel.Text = "Telemetry"
'
'ToolStripMenuItem4
'
Me.ToolStripMenuItem4.Name = "ToolStripMenuItem4"
Me.ToolStripMenuItem4.Size = New System.Drawing.Size(178, 22)
Me.ToolStripMenuItem4.Text = "Once"
'
'QuaterOfASecondToolStripMenuItem
'
Me.QuaterOfASecondToolStripMenuItem.Name = "QuaterOfASecondToolStripMenuItem"
Me.QuaterOfASecondToolStripMenuItem.Size = New System.Drawing.Size(178, 22)
Me.QuaterOfASecondToolStripMenuItem.Text = "Quater of a second"
'
'HalfASecondToolStripMenuItem
'
Me.HalfASecondToolStripMenuItem.Name = "HalfASecondToolStripMenuItem"
Me.HalfASecondToolStripMenuItem.Size = New System.Drawing.Size(178, 22)
Me.HalfASecondToolStripMenuItem.Text = "Half a second"
'
'ToolStripMenuItem5
'
Me.ToolStripMenuItem5.Name = "ToolStripMenuItem5"
Me.ToolStripMenuItem5.Size = New System.Drawing.Size(178, 22)
Me.ToolStripMenuItem5.Text = "1 second"
'
'ToolStripMenuItem6
'
Me.ToolStripMenuItem6.Name = "ToolStripMenuItem6"
Me.ToolStripMenuItem6.Size = New System.Drawing.Size(178, 22)
Me.ToolStripMenuItem6.Text = "5 seconds"
'
'ToolStripMenuItem7
'
Me.ToolStripMenuItem7.Name = "ToolStripMenuItem7"
Me.ToolStripMenuItem7.Size = New System.Drawing.Size(178, 22)
Me.ToolStripMenuItem7.Text = "10 seconds"
'
'ToolStripMenuItem8
'
Me.ToolStripMenuItem8.Name = "ToolStripMenuItem8"
Me.ToolStripMenuItem8.Size = New System.Drawing.Size(178, 22)
Me.ToolStripMenuItem8.Text = "1 minute"
'
'frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.ClientSize = New System.Drawing.Size(1028, 746)
Me.Controls.Add(Me.pMap)
Me.Controls.Add(Me.pConfig)
Me.Controls.Add(Me.pMonitoring)
Me.Controls.Add(Me.StatusStrip1)
Me.Controls.Add(Me.ToolStrip1)
Me.Controls.Add(Me.MenuStrip1)
Me.DataBindings.Add(New System.Windows.Forms.Binding("Location", Global.MEW_Control_Station.My.MySettings.Default, "MainFormLocation", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ForeColor = System.Drawing.Color.White
Me.Location = Global.MEW_Control_Station.My.MySettings.Default.MainFormLocation
Me.MainMenuStrip = Me.MenuStrip1
Me.Name = "frmMain"
Me.Text = "Multipurpose Enduring Watercraft Control Station"
Me.pMap.ResumeLayout(False)
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
Me.pMonitoring.ResumeLayout(False)
Me.pInstruments.ResumeLayout(False)
Me.pInstruments.PerformLayout()
CType(Me.picAlert, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PicSpeed, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PicPitch, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PicRoll, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PicCompass, System.ComponentModel.ISupportInitialize).EndInit()
Me.pConfig.ResumeLayout(False)
Me.pConfig.PerformLayout()
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.StatusStrip1.ResumeLayout(False)
Me.StatusStrip1.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
Friend WithEvents pMap As System.Windows.Forms.Panel
Friend WithEvents GMap As Pegazux.Controls.GoogleMaps.GoogleMapsControl
Friend WithEvents ToolStripLabel1 As System.Windows.Forms.ToolStripLabel
Friend WithEvents cmbView As System.Windows.Forms.ToolStripComboBox
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ToolStripLabel2 As System.Windows.Forms.ToolStripLabel
Friend WithEvents cboPorts As System.Windows.Forms.ToolStripComboBox
Friend WithEvents btnConnect As System.Windows.Forms.ToolStripButton
Friend WithEvents pMonitoring As System.Windows.Forms.Panel
Friend WithEvents pConfig As System.Windows.Forms.Panel
Friend WithEvents lblStatus As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
Private WithEvents AxGENavigationControlCoClass1 As AxGEPlugin.AxGENavigationControlCoClass
Friend WithEvents btnClearWaypoints As System.Windows.Forms.ToolStripButton
Friend WithEvents btnUploadWaypoints As System.Windows.Forms.ToolStripButton
Friend WithEvents sPort As System.IO.Ports.SerialPort
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents MissionToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents NewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents OpenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem1 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ExitToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem2 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents PrintNavigationToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SaveNavigationToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents HelpToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents AboutMEWToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents LoadLastViewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem3 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents SaveViewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents timConnectedShow As System.Windows.Forms.Timer
Friend WithEvents statuslabelConnect As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents txtSerialInput As System.Windows.Forms.TextBox
Friend WithEvents txtSerialData As System.Windows.Forms.TextBox
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog
Friend WithEvents wbMap As System.Windows.Forms.WebBrowser
Friend WithEvents pInstruments As System.Windows.Forms.Panel
Friend WithEvents lblRollPitch As System.Windows.Forms.Label
Friend WithEvents lblDistanceCovered As System.Windows.Forms.Label
Friend WithEvents lblWaterTemp As System.Windows.Forms.Label
Friend WithEvents lblHullTemp As System.Windows.Forms.Label
Friend WithEvents lblRemainingPower As System.Windows.Forms.Label
Friend WithEvents lblSolarPanelVolt As System.Windows.Forms.Label
Friend WithEvents lblMotorSpeeds As System.Windows.Forms.Label
Friend WithEvents lblLatLong As System.Windows.Forms.Label
Friend WithEvents lblSpeed As System.Windows.Forms.Label
Friend WithEvents lblCurrentWaypoint As System.Windows.Forms.Label
Friend WithEvents lblTargetHeading As System.Windows.Forms.Label
Friend WithEvents lblCurrentHeading As System.Windows.Forms.Label
Friend WithEvents lblPowerSavingMode As System.Windows.Forms.Label
Friend WithEvents lblBattery As System.Windows.Forms.Label
Friend WithEvents PicSpeed As System.Windows.Forms.PictureBox
Friend WithEvents PicPitch As System.Windows.Forms.PictureBox
Friend WithEvents PicRoll As System.Windows.Forms.PictureBox
Friend WithEvents PicCompass As System.Windows.Forms.PictureBox
Friend WithEvents wp_id As System.Windows.Forms.DataGridViewTextBoxColumn
Friend WithEvents wp_lat As System.Windows.Forms.DataGridViewTextBoxColumn
Friend WithEvents wp_lon As System.Windows.Forms.DataGridViewTextBoxColumn
Friend WithEvents WaypointName As System.Windows.Forms.DataGridViewTextBoxColumn
Friend WithEvents timTelRecShow As System.Windows.Forms.Timer
Friend WithEvents lblMyMode As System.Windows.Forms.Label
Friend WithEvents lblGPSCourse As System.Windows.Forms.Label
Friend WithEvents chkManualControl As System.Windows.Forms.CheckBox
Friend WithEvents btnSameViewinMap As System.Windows.Forms.ToolStripButton
Friend WithEvents chkAutoCenter2 As System.Windows.Forms.ToolStripButton
Friend WithEvents picAlert As System.Windows.Forms.PictureBox
Friend WithEvents timAlertBlink As System.Windows.Forms.Timer
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents btnTel As System.Windows.Forms.ToolStripDropDownButton
Friend WithEvents ToolStripMenuItem4 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem5 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem6 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem7 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem8 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents timTelemetry As System.Windows.Forms.Timer
Friend WithEvents QuaterOfASecondToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents HalfASecondToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents btnTelemetry2 As System.Windows.Forms.ToolStripButton
End Class
|
mujtabachang/mew
|
ControlApp/MEW Control Room/Form1.Designer.vb
|
Visual Basic
|
mit
| 50,242
|
'------------------------------------------------------------------------------
' <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
<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 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.Access01AddinVB4.My.MySettings
Get
Return Global.Access01AddinVB4.My.MySettings.Default
End Get
End Property
End Module
End Namespace
|
NetOfficeFw/NetOffice
|
Examples/Access/VB/NetOffice COMAddin Examples/01 Simple/My Project/Settings.Designer.vb
|
Visual Basic
|
mit
| 2,922
|
Imports LyriX.Document.ObjectModel
Imports System.ComponentModel
Namespace Document
''' <summary>
''' 用于读取 LyriX 包所包含的信息。
''' </summary>
Public NotInheritable Class LyriXPackage
Inherits DataContainer
''' <summary>
''' LyriX 包的默认小写后缀名“lrcx”,不包括点。
''' </summary>
Public Const FileExt = "lrcx"
Friend Const PNHeader = "/header.xml"
Friend Const PNMusicInfo = "/musicInfo.xml"
Friend Const PNLyrics = "/lyrics.xml"
Private Shared ReadOnly PUHeader As New Uri(PNHeader, UriKind.Relative)
Private Shared ReadOnly PUMusicInfo As New Uri(PNMusicInfo, UriKind.Relative)
Private Shared ReadOnly PULyrics As New Uri(PNLyrics, UriKind.Relative)
Private m_Header As Header
Private m_MusicInfo As MusicInfo
Private m_Lyrics As Lyrics
Private m_LocalizedParts As LocalizedPackagePartsCollection
''' <summary>
''' 获取可用于文件对话框的 LyriX 包的筛选器字符串,格式为“...|...”。
''' </summary>
Public Shared ReadOnly Property FileFilter As String
Get
Return Prompts.LyriXFileFilter
End Get
End Property
''' <summary>
''' 基础结构。获取包中的子级。
''' </summary>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overrides ReadOnly Iterator Property Children As IEnumerable(Of DataContainer)
Get
Yield m_Header
Yield m_MusicInfo
Yield m_Lyrics
Yield m_LocalizedParts
End Get
End Property
''' <summary>
''' 获取/设置 LyriX 包的基本信息。
''' </summary>
''' <exception cref="ArgumentNullException">试图将值设为 <c>null</c>。</exception>
Public Property Header As Header
Get
Return m_Header
End Get
Set(ByVal value As Header)
If value Is Nothing Then
Throw New ArgumentNullException("value")
Else
m_Lyrics.Detach()
value.Attach(Me)
m_Header = value
OnContainerDataChanged("Header")
End If
End Set
End Property
''' <summary>
''' 获取/设置 LyriX 包的音乐信息。
''' </summary>
''' <exception cref="ArgumentNullException">试图将值设为 <c>null</c>。</exception>
Public Property MusicInfo As MusicInfo
Get
Return m_MusicInfo
End Get
Set(ByVal value As MusicInfo)
If value Is Nothing Then
Throw New ArgumentNullException("value")
Else
m_MusicInfo.Detach()
value.Attach(Me)
m_MusicInfo = value
OnContainerDataChanged("MusicInfo")
End If
End Set
End Property
''' <summary>
''' 获取/设置 LyriX 包的歌词信息。
''' </summary>
''' <exception cref="ArgumentNullException">试图将值设为 <c>null</c>。</exception>
Public Property Lyrics As Lyrics
Get
Return m_Lyrics
End Get
Set(ByVal value As Lyrics)
If value Is Nothing Then
Throw New ArgumentNullException("value")
Else
m_Lyrics.Detach()
value.Attach(Me)
m_Lyrics = value
OnContainerDataChanged("Lyrics")
End If
End Set
End Property
''' <summary>
''' 获取/设置 LyriX 包中与语言相关的部分列表。
''' </summary>
Public ReadOnly Property LocalizedParts As LocalizedPackagePartsCollection
Get
Return m_LocalizedParts
End Get
End Property
''' <summary>
''' 将 LyriX 信息保存到指定包。
''' </summary>
''' <param name="package">一个空包。</param>
''' <exception cref="ArgumentNullException"><paramref name="package" /> 为 <c>null</c>。</exception>
Public Sub SavePackage(ByVal package As Package)
If package Is Nothing Then
Throw New ArgumentNullException("package")
Else
m_Header.WritePackage(package, PUHeader)
m_MusicInfo.WritePackage(package, PUMusicInfo)
m_Lyrics.WritePackage(package, PULyrics)
m_LocalizedParts.WritePackage(package)
End If
End Sub
''' <summary>
''' 将 LyriX 信息保存到指定流。
''' </summary>
''' <param name="stream">保存的目标。</param>
Public Sub SavePackage(ByVal stream As IO.Stream)
Using pk = Package.Open(stream, IO.FileMode.Create)
SavePackage(pk)
End Using
End Sub
''' <summary>
''' 初始化。
''' </summary>
Private Sub Init(Optional ByVal package As Package = Nothing)
'加载包
If package Is Nothing Then
'默认值
m_Header = New Header
m_MusicInfo = New MusicInfo
m_Lyrics = New Lyrics
m_LocalizedParts = New LocalizedPackagePartsCollection
Else
With package
'根目录
m_Header = .ReadPackagePart(PUHeader, Function(doc) New Header(doc))
m_MusicInfo = .ReadPackagePart(PUMusicInfo, Function(doc) New MusicInfo(doc))
m_Lyrics = .ReadPackagePart(PULyrics, Function(doc) New Lyrics(doc))
'本地化
m_LocalizedParts = New LocalizedPackagePartsCollection(package)
End With
End If
m_Header.Attach(Me)
m_MusicInfo.Attach(Me)
m_Lyrics.Attach(Me)
m_LocalizedParts.Attach(Me)
End Sub
''' <summary>
''' 从包中载入 LyriX 信息。
''' </summary>
''' <exception cref="IO.FileFormatException">XML 文档格式不正确。</exception>
''' <exception cref="IO.IOException">无法打开指定的部分。</exception>
Public Sub New(ByVal package As Package)
Init(package)
End Sub
''' <summary>
''' 从文件中载入 LyriX 信息。
''' </summary>
''' <exception cref="IO.FileFormatException">XML 文档格式不正确。</exception>
''' <exception cref="IO.IOException">无法打开指定的部分。</exception>
Public Sub New(ByVal path As String)
If path Is Nothing Then
Init()
Else
Using pk = Package.Open(path, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.Read)
Init(pk)
End Using
End If
End Sub
''' <summary>
''' 从流中载入 LyriX 信息。
''' </summary>
''' <exception cref="IO.FileFormatException">XML 文档格式不正确。</exception>
''' <exception cref="IO.IOException">无法访问指定的流,或是打开包的指定部分。</exception>
Public Sub New(ByVal stream As IO.Stream)
If stream Is Nothing Then
Init()
Else
Using pk = Package.Open(stream)
Init(pk)
End Using
End If
End Sub
''' <summary>
''' 初始化一个空的 <see cref="LyriXPackage" />。
''' </summary>
Public Sub New()
Init(Nothing)
End Sub
Protected Sub New(prevInstance As LyriXPackage)
Debug.Assert(prevInstance IsNot Nothing)
With prevInstance
m_Header = DirectCast(.m_Header.Clone, Document.Header)
m_MusicInfo = DirectCast(.m_MusicInfo.Clone, Document.MusicInfo)
m_Lyrics = DirectCast(.m_Lyrics.Clone, Document.Lyrics)
m_LocalizedParts = DirectCast(.m_LocalizedParts.Clone, Document.LocalizedPackagePartsCollection)
End With
End Sub
End Class
End Namespace
|
CXuesong/legacy-LyriX
|
LyriX/NSDocuments/LyriXPackage.vb
|
Visual Basic
|
mit
| 8,530
|
Imports System.Data
Partial Class fPresupuestos_Proveedores_IKP
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 loConsulta As New StringBuilder()
loConsulta.AppendLine(" SELECT Presupuestos.Cod_Pro, ")
loConsulta.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Presupuestos.Nom_Pro = '') THEN Proveedores.Nom_Pro ELSE ")
loConsulta.AppendLine(" (CASE WHEN (Presupuestos.Nom_Pro = '') THEN Proveedores.Nom_Pro ELSE Presupuestos.Nom_Pro END) END) AS Nom_Pro, ")
loConsulta.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Presupuestos.Nom_Pro = '') THEN Proveedores.Rif ELSE ")
loConsulta.AppendLine(" (CASE WHEN (Presupuestos.Rif = '') THEN Proveedores.Rif ELSE Presupuestos.Rif END) END) AS Rif, ")
loConsulta.AppendLine(" Proveedores.Nit, ")
loConsulta.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Presupuestos.Nom_Pro = '') THEN SUBSTRING(Proveedores.Dir_Fis,1, 200) ELSE ")
loConsulta.AppendLine(" (CASE WHEN (SUBSTRING(Presupuestos.Dir_Fis,1, 200) = '') THEN SUBSTRING(Proveedores.Dir_Fis,1, 200) ELSE SUBSTRING(Presupuestos.Dir_Fis,1, 200) END) END) AS Dir_Fis, ")
loConsulta.AppendLine(" (CASE WHEN (Proveedores.Generico = 0 AND Presupuestos.Nom_Pro = '') THEN Proveedores.Telefonos ELSE ")
loConsulta.AppendLine(" (CASE WHEN (Presupuestos.Telefonos = '') THEN Proveedores.Telefonos ELSE Presupuestos.Telefonos END) END) AS Telefonos, ")
loConsulta.AppendLine(" Proveedores.Fax, ")
loConsulta.AppendLine(" Presupuestos.Nom_Pro As Nom_Gen, ")
loConsulta.AppendLine(" Presupuestos.Rif As Rif_Gen, ")
loConsulta.AppendLine(" Presupuestos.Nit As Nit_Gen, ")
loConsulta.AppendLine(" Presupuestos.Dir_Fis As Dir_Gen, ")
loConsulta.AppendLine(" Presupuestos.Telefonos As Tel_Gen, ")
loConsulta.AppendLine(" Presupuestos.Documento, ")
loConsulta.AppendLine(" Presupuestos.Fec_Ini, ")
loConsulta.AppendLine(" Presupuestos.Fec_Fin, ")
loConsulta.AppendLine(" Presupuestos.Mon_Bru, ")
loConsulta.AppendLine(" Presupuestos.Mon_Imp1, ")
loConsulta.AppendLine(" Presupuestos.Por_Des1, ")
loConsulta.AppendLine(" Presupuestos.Mon_Des1, ")
loConsulta.AppendLine(" Presupuestos.Por_Rec1, ")
loConsulta.AppendLine(" Presupuestos.Mon_Rec1, ")
loConsulta.AppendLine(" Presupuestos.Dis_Imp, ")
loConsulta.AppendLine(" Presupuestos.Mon_Net, ")
loConsulta.AppendLine(" Presupuestos.Cod_For, ")
loConsulta.AppendLine(" SUBSTRING(Formas_Pagos.Nom_For,1,20) AS Nom_For, ")
loConsulta.AppendLine(" Presupuestos.Cod_Ven, ")
loConsulta.AppendLine(" Presupuestos.Comentario, ")
loConsulta.AppendLine(" Vendedores.Nom_Ven, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Cod_Art, ")
loConsulta.AppendLine(" CASE")
loConsulta.AppendLine(" WHEN Articulos.Generico = 0 THEN Articulos.Nom_Art")
loConsulta.AppendLine(" ELSE Renglones_Presupuestos.Notas")
loConsulta.AppendLine(" END AS Nom_Art, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Renglon, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Can_Art1, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Por_Des, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Cod_Uni, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Precio1, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Mon_Net As Neto, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Por_Imp1 As Por_Imp, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Cod_Imp, ")
loConsulta.AppendLine(" Renglones_Presupuestos.Mon_Imp1 As Impuesto, ")
loConsulta.AppendLine(" Sucursales.nom_suc AS Nombre_Empresa_Cliente, ")
loConsulta.AppendLine(" COALESCE(campos_propiedades.val_car, '') AS Rif_Empresa_Cliente, ")
loConsulta.AppendLine(" Sucursales.direccion AS Direccion_Empresa_Cliente, ")
loConsulta.AppendLine(" Sucursales.telefonos AS Telefono_Empresa_Cliente, ")
loConsulta.AppendLine(" Sucursales.Fax AS Fax_Empresa_Cliente ")
loConsulta.AppendLine(" FROM Presupuestos ")
loConsulta.AppendLine(" JOIN Renglones_Presupuestos on Presupuestos.Documento = Renglones_Presupuestos.Documento")
loConsulta.AppendLine(" JOIN Proveedores ON Presupuestos.Cod_Pro = Proveedores.Cod_Pro ")
loConsulta.AppendLine(" JOIN Formas_Pagos ON Presupuestos.Cod_For = Formas_Pagos.Cod_For ")
loConsulta.AppendLine(" LEFT JOIN Vendedores ON Presupuestos.Cod_Ven = Vendedores.Cod_Ven ")
loConsulta.AppendLine(" JOIN Articulos ON Articulos.Cod_Art = Renglones_Presupuestos.Cod_Art")
loConsulta.AppendLine(" JOIN Sucursales ON Sucursales.cod_suc = Presupuestos.cod_suc")
loConsulta.AppendLine(" LEFT JOIN campos_propiedades ON campos_propiedades.cod_reg = Sucursales.cod_suc")
loConsulta.AppendLine(" AND campos_propiedades.origen = 'Sucursales'")
loConsulta.AppendLine(" AND campos_propiedades.cod_pro = 'SUC-RIF'")
loConsulta.AppendLine(" WHERE " & cusAplicacion.goFormatos.pcCondicionPrincipal)
loConsulta.AppendLine("")
Dim loServicios As New cusDatos.goDatos
Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loConsulta.ToString, "curReportes")
Dim lcXml As String = "<impuesto></impuesto>"
Dim lcPorcentajesImpueto As String
Dim loImpuestos As New System.Xml.XmlDocument()
lcPorcentajesImpueto = "("
'Recorre cada renglon de la tabla
For lnNumeroFila As Integer = 0 To laDatosReporte.Tables(0).Rows.Count - 1
lcXml = laDatosReporte.Tables(0).Rows(lnNumeroFila).Item("dis_imp")
If String.IsNullOrEmpty(lcXml.Trim()) Then
Continue For
End If
loImpuestos.LoadXml(lcXml)
'En cada renglón lee el contenido de la distribución de impuestos
For Each loImpuesto As System.Xml.XmlNode In loImpuestos.SelectNodes("impuestos/impuesto")
If lnNumeroFila = laDatosReporte.Tables(0).Rows.Count - 1 Then
'Verifica si el impuesto es igual a Cero
if CDec(loImpuesto.SelectSingleNode("porcentaje").InnerText) <> 0 Then
lcPorcentajesImpueto = lcPorcentajesImpueto & ", " & CDec(loImpuesto.SelectSingleNode("porcentaje").InnerText) & "%"
End If
End If
Next loImpuesto
Next lnNumeroFila
lcPorcentajesImpueto = lcPorcentajesImpueto & ")"
lcPorcentajesImpueto = lcPorcentajesImpueto.Replace("(,","(")
if lcPorcentajesImpueto = "()" Then
lcPorcentajesImpueto = " "
End If
'--------------------------------------------------'
' Carga la imagen del logo en cusReportes '
'--------------------------------------------------'
Me.mCargarLogoEmpresa(laDatosReporte.Tables(0), "LogoEmpresa")
'-------------------------------------------------------------------------------------------------------
' 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
loObjetoReporte = cusAplicacion.goFormatos.mCargarInforme("fPresupuestos_Proveedores_IKP", laDatosReporte)
lcPorcentajesImpueto = lcPorcentajesImpueto.Replace(".",",")
CType(loObjetoReporte.ReportDefinition.ReportObjects("Text29"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = lcPorcentajesImpueto.ToString
Me.mTraducirReporte(loObjetoReporte)
Me.mFormatearCamposReporte(loObjetoReporte)
Me.crvfPresupuestos_Proveedores_IKP.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
' Se modifico la consulta para hacer left join con vendedores
'-------------------------------------------------------------------------------------------'
' CMS: 16/09/09: Se Agrego la distribucion de impuesto
'-------------------------------------------------------------------------------------------'
' CMS: 11/06/10: Se coloco la validación de registros 0 y el metodo de carga de imagen
' Se agrego el descuento del renglon, proveedor generico, y el descuento y
' recargo del documento
'-------------------------------------------------------------------------------------------'
' MAT: 10/11/10: Mantenimiento del Reporte
'-------------------------------------------------------------------------------------------'
|
kodeitsolutions/ef-reports
|
fPresupuestos_Proveedores_IKP.aspx.vb
|
Visual Basic
|
mit
| 11,555
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class formnotepad
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()
Me.notepadtextbox = New System.Windows.Forms.TextBox()
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
Me.FileToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.EditToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.SearchToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.FormatToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.NewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.OpenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SaveToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SaveAsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.PageSetupToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.PrintToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ExitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.EditToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.UndoCtrlZToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.CutCtrlXToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.CopyCtrlCToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.PasteCtrlVToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DeleteDelToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SelectAllToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.TimeDateF5ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.WordWrapToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SearchToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FindToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.FindNextF3ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.HelpToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.HelpTopicsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.AboutNotepadToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.look = New System.Windows.Forms.Timer(Me.components)
Me.program = New System.Windows.Forms.Panel()
Me.programtopbar = New System.Windows.Forms.Panel()
Me.maximizebutton = New System.Windows.Forms.PictureBox()
Me.minimizebutton = New System.Windows.Forms.PictureBox()
Me.programname = New System.Windows.Forms.Label()
Me.closebutton = New System.Windows.Forms.PictureBox()
Me.toprightcorner = New System.Windows.Forms.Panel()
Me.bottomrightcorner = New System.Windows.Forms.Panel()
Me.bottomleftcorner = New System.Windows.Forms.Panel()
Me.topleftcorner = New System.Windows.Forms.Panel()
Me.left = New System.Windows.Forms.Panel()
Me.bottom = New System.Windows.Forms.Panel()
Me.right = New System.Windows.Forms.Panel()
Me.top = New System.Windows.Forms.Panel()
Me.pullside = New System.Windows.Forms.Timer(Me.components)
Me.pullbottom = New System.Windows.Forms.Timer(Me.components)
Me.pullbs = New System.Windows.Forms.Timer(Me.components)
Me.MenuStrip1.SuspendLayout()
Me.program.SuspendLayout()
Me.programtopbar.SuspendLayout()
CType(Me.maximizebutton, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.minimizebutton, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.closebutton, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'notepadtextbox
'
Me.notepadtextbox.Cursor = System.Windows.Forms.Cursors.Arrow
Me.notepadtextbox.Dock = System.Windows.Forms.DockStyle.Fill
Me.notepadtextbox.Location = New System.Drawing.Point(4, 46)
Me.notepadtextbox.Multiline = True
Me.notepadtextbox.Name = "notepadtextbox"
Me.notepadtextbox.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.notepadtextbox.Size = New System.Drawing.Size(532, 374)
Me.notepadtextbox.TabIndex = 1
'
'MenuStrip1
'
Me.MenuStrip1.BackColor = System.Drawing.Color.Silver
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FileToolStripMenuItem1, Me.EditToolStripMenuItem1, Me.SearchToolStripMenuItem1, Me.FormatToolStripMenuItem})
Me.MenuStrip1.Location = New System.Drawing.Point(4, 22)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(532, 24)
Me.MenuStrip1.TabIndex = 2
Me.MenuStrip1.Text = "MenuStrip1"
'
'FileToolStripMenuItem1
'
Me.FileToolStripMenuItem1.Name = "FileToolStripMenuItem1"
Me.FileToolStripMenuItem1.Size = New System.Drawing.Size(37, 20)
Me.FileToolStripMenuItem1.Text = "File"
'
'EditToolStripMenuItem1
'
Me.EditToolStripMenuItem1.Name = "EditToolStripMenuItem1"
Me.EditToolStripMenuItem1.Size = New System.Drawing.Size(39, 20)
Me.EditToolStripMenuItem1.Text = "Edit"
'
'SearchToolStripMenuItem1
'
Me.SearchToolStripMenuItem1.Name = "SearchToolStripMenuItem1"
Me.SearchToolStripMenuItem1.Size = New System.Drawing.Size(54, 20)
Me.SearchToolStripMenuItem1.Text = "Search"
'
'FormatToolStripMenuItem
'
Me.FormatToolStripMenuItem.Name = "FormatToolStripMenuItem"
Me.FormatToolStripMenuItem.Size = New System.Drawing.Size(44, 20)
Me.FormatToolStripMenuItem.Text = "Help"
'
'FileToolStripMenuItem
'
Me.FileToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.FileToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripMenuItem, Me.OpenToolStripMenuItem, Me.SaveToolStripMenuItem, Me.SaveAsToolStripMenuItem, Me.PageSetupToolStripMenuItem, Me.PrintToolStripMenuItem, Me.ExitToolStripMenuItem})
Me.FileToolStripMenuItem.Name = "FileToolStripMenuItem"
Me.FileToolStripMenuItem.Size = New System.Drawing.Size(37, 20)
Me.FileToolStripMenuItem.Text = "File"
'
'NewToolStripMenuItem
'
Me.NewToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.NewToolStripMenuItem.Name = "NewToolStripMenuItem"
Me.NewToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.NewToolStripMenuItem.Text = "New"
'
'OpenToolStripMenuItem
'
Me.OpenToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.OpenToolStripMenuItem.Name = "OpenToolStripMenuItem"
Me.OpenToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.OpenToolStripMenuItem.Text = "Open..."
'
'SaveToolStripMenuItem
'
Me.SaveToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.SaveToolStripMenuItem.Name = "SaveToolStripMenuItem"
Me.SaveToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.SaveToolStripMenuItem.Text = "Save"
'
'SaveAsToolStripMenuItem
'
Me.SaveAsToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.SaveAsToolStripMenuItem.Name = "SaveAsToolStripMenuItem"
Me.SaveAsToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.SaveAsToolStripMenuItem.Text = "Save As..."
'
'PageSetupToolStripMenuItem
'
Me.PageSetupToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.PageSetupToolStripMenuItem.Name = "PageSetupToolStripMenuItem"
Me.PageSetupToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.PageSetupToolStripMenuItem.Text = "Page Setup..."
'
'PrintToolStripMenuItem
'
Me.PrintToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.PrintToolStripMenuItem.Name = "PrintToolStripMenuItem"
Me.PrintToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.PrintToolStripMenuItem.Text = "Print"
'
'ExitToolStripMenuItem
'
Me.ExitToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem"
Me.ExitToolStripMenuItem.Size = New System.Drawing.Size(142, 22)
Me.ExitToolStripMenuItem.Text = "Exit"
'
'EditToolStripMenuItem
'
Me.EditToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.EditToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UndoCtrlZToolStripMenuItem, Me.CutCtrlXToolStripMenuItem, Me.CopyCtrlCToolStripMenuItem, Me.PasteCtrlVToolStripMenuItem, Me.DeleteDelToolStripMenuItem, Me.SelectAllToolStripMenuItem, Me.TimeDateF5ToolStripMenuItem, Me.WordWrapToolStripMenuItem})
Me.EditToolStripMenuItem.Name = "EditToolStripMenuItem"
Me.EditToolStripMenuItem.Size = New System.Drawing.Size(39, 20)
Me.EditToolStripMenuItem.Text = "Edit"
'
'UndoCtrlZToolStripMenuItem
'
Me.UndoCtrlZToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.UndoCtrlZToolStripMenuItem.Name = "UndoCtrlZToolStripMenuItem"
Me.UndoCtrlZToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.UndoCtrlZToolStripMenuItem.Text = "Undo Ctrl+Z"
'
'CutCtrlXToolStripMenuItem
'
Me.CutCtrlXToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.CutCtrlXToolStripMenuItem.Name = "CutCtrlXToolStripMenuItem"
Me.CutCtrlXToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.CutCtrlXToolStripMenuItem.Text = "Cut Ctrl+X"
'
'CopyCtrlCToolStripMenuItem
'
Me.CopyCtrlCToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.CopyCtrlCToolStripMenuItem.Name = "CopyCtrlCToolStripMenuItem"
Me.CopyCtrlCToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.CopyCtrlCToolStripMenuItem.Text = "Copy Ctrl+C"
'
'PasteCtrlVToolStripMenuItem
'
Me.PasteCtrlVToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.PasteCtrlVToolStripMenuItem.Name = "PasteCtrlVToolStripMenuItem"
Me.PasteCtrlVToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.PasteCtrlVToolStripMenuItem.Text = "Paste Ctrl+V"
'
'DeleteDelToolStripMenuItem
'
Me.DeleteDelToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.DeleteDelToolStripMenuItem.Name = "DeleteDelToolStripMenuItem"
Me.DeleteDelToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.DeleteDelToolStripMenuItem.Text = "Delete Del"
'
'SelectAllToolStripMenuItem
'
Me.SelectAllToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.SelectAllToolStripMenuItem.Name = "SelectAllToolStripMenuItem"
Me.SelectAllToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.SelectAllToolStripMenuItem.Text = "Select All"
'
'TimeDateF5ToolStripMenuItem
'
Me.TimeDateF5ToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.TimeDateF5ToolStripMenuItem.Name = "TimeDateF5ToolStripMenuItem"
Me.TimeDateF5ToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.TimeDateF5ToolStripMenuItem.Text = "Time/Date F5"
'
'WordWrapToolStripMenuItem
'
Me.WordWrapToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.WordWrapToolStripMenuItem.Name = "WordWrapToolStripMenuItem"
Me.WordWrapToolStripMenuItem.Size = New System.Drawing.Size(167, 22)
Me.WordWrapToolStripMenuItem.Text = "Word Wrap"
'
'SearchToolStripMenuItem
'
Me.SearchToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.SearchToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FindToolStripMenuItem1, Me.FindNextF3ToolStripMenuItem})
Me.SearchToolStripMenuItem.Name = "SearchToolStripMenuItem"
Me.SearchToolStripMenuItem.Size = New System.Drawing.Size(54, 20)
Me.SearchToolStripMenuItem.Text = "Search"
'
'FindToolStripMenuItem1
'
Me.FindToolStripMenuItem1.BackColor = System.Drawing.Color.Silver
Me.FindToolStripMenuItem1.Name = "FindToolStripMenuItem1"
Me.FindToolStripMenuItem1.Size = New System.Drawing.Size(151, 22)
Me.FindToolStripMenuItem1.Text = "Find..."
'
'FindNextF3ToolStripMenuItem
'
Me.FindNextF3ToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.FindNextF3ToolStripMenuItem.Name = "FindNextF3ToolStripMenuItem"
Me.FindNextF3ToolStripMenuItem.Size = New System.Drawing.Size(151, 22)
Me.FindNextF3ToolStripMenuItem.Text = "Find Next F3"
'
'HelpToolStripMenuItem1
'
Me.HelpToolStripMenuItem1.BackColor = System.Drawing.Color.Silver
Me.HelpToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.HelpTopicsToolStripMenuItem, Me.AboutNotepadToolStripMenuItem})
Me.HelpToolStripMenuItem1.Name = "HelpToolStripMenuItem1"
Me.HelpToolStripMenuItem1.Size = New System.Drawing.Size(44, 20)
Me.HelpToolStripMenuItem1.Text = "Help"
'
'HelpTopicsToolStripMenuItem
'
Me.HelpTopicsToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.HelpTopicsToolStripMenuItem.Name = "HelpTopicsToolStripMenuItem"
Me.HelpTopicsToolStripMenuItem.Size = New System.Drawing.Size(156, 22)
Me.HelpTopicsToolStripMenuItem.Text = "Help Topics"
'
'AboutNotepadToolStripMenuItem
'
Me.AboutNotepadToolStripMenuItem.BackColor = System.Drawing.Color.Silver
Me.AboutNotepadToolStripMenuItem.Name = "AboutNotepadToolStripMenuItem"
Me.AboutNotepadToolStripMenuItem.Size = New System.Drawing.Size(156, 22)
Me.AboutNotepadToolStripMenuItem.Text = "About Notepad"
'
'look
'
'
'program
'
Me.program.BackColor = System.Drawing.Color.Silver
Me.program.Controls.Add(Me.notepadtextbox)
Me.program.Controls.Add(Me.MenuStrip1)
Me.program.Controls.Add(Me.programtopbar)
Me.program.Controls.Add(Me.toprightcorner)
Me.program.Controls.Add(Me.bottomrightcorner)
Me.program.Controls.Add(Me.bottomleftcorner)
Me.program.Controls.Add(Me.topleftcorner)
Me.program.Controls.Add(Me.left)
Me.program.Controls.Add(Me.bottom)
Me.program.Controls.Add(Me.right)
Me.program.Controls.Add(Me.top)
Me.program.Dock = System.Windows.Forms.DockStyle.Fill
Me.program.Location = New System.Drawing.Point(0, 0)
Me.program.Name = "program"
Me.program.Size = New System.Drawing.Size(540, 424)
Me.program.TabIndex = 4
'
'programtopbar
'
Me.programtopbar.BackColor = System.Drawing.Color.DarkBlue
Me.programtopbar.Controls.Add(Me.maximizebutton)
Me.programtopbar.Controls.Add(Me.minimizebutton)
Me.programtopbar.Controls.Add(Me.programname)
Me.programtopbar.Controls.Add(Me.closebutton)
Me.programtopbar.Dock = System.Windows.Forms.DockStyle.Top
Me.programtopbar.Location = New System.Drawing.Point(4, 4)
Me.programtopbar.Name = "programtopbar"
Me.programtopbar.Size = New System.Drawing.Size(532, 18)
Me.programtopbar.TabIndex = 0
'
'maximizebutton
'
Me.maximizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.maximizebutton.Image = Global.Histacom.My.Resources.Resources.Maximize
Me.maximizebutton.Location = New System.Drawing.Point(499, 2)
Me.maximizebutton.Name = "maximizebutton"
Me.maximizebutton.Size = New System.Drawing.Size(16, 14)
Me.maximizebutton.TabIndex = 6
Me.maximizebutton.TabStop = False
'
'minimizebutton
'
Me.minimizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.minimizebutton.Image = Global.Histacom.My.Resources.Resources.minimize
Me.minimizebutton.Location = New System.Drawing.Point(483, 2)
Me.minimizebutton.Name = "minimizebutton"
Me.minimizebutton.Size = New System.Drawing.Size(16, 14)
Me.minimizebutton.TabIndex = 5
Me.minimizebutton.TabStop = False
'
'programname
'
Me.programname.AutoSize = True
Me.programname.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.programname.ForeColor = System.Drawing.Color.White
Me.programname.Location = New System.Drawing.Point(3, 2)
Me.programname.Name = "programname"
Me.programname.Size = New System.Drawing.Size(55, 13)
Me.programname.TabIndex = 3
Me.programname.Text = "Notepad"
'
'closebutton
'
Me.closebutton.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.closebutton.Image = Global.Histacom.My.Resources.Resources.close
Me.closebutton.Location = New System.Drawing.Point(515, 2)
Me.closebutton.Name = "closebutton"
Me.closebutton.Size = New System.Drawing.Size(16, 14)
Me.closebutton.TabIndex = 4
Me.closebutton.TabStop = False
'
'toprightcorner
'
Me.toprightcorner.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.toprightcorner.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95toprightcorner
Me.toprightcorner.Location = New System.Drawing.Point(536, 0)
Me.toprightcorner.Name = "toprightcorner"
Me.toprightcorner.Size = New System.Drawing.Size(4, 4)
Me.toprightcorner.TabIndex = 6
'
'bottomrightcorner
'
Me.bottomrightcorner.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.bottomrightcorner.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95bottomrightcorner
Me.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE
Me.bottomrightcorner.Location = New System.Drawing.Point(536, 420)
Me.bottomrightcorner.Name = "bottomrightcorner"
Me.bottomrightcorner.Size = New System.Drawing.Size(4, 4)
Me.bottomrightcorner.TabIndex = 4
'
'bottomleftcorner
'
Me.bottomleftcorner.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.bottomleftcorner.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95bottomleftcorner
Me.bottomleftcorner.Location = New System.Drawing.Point(0, 420)
Me.bottomleftcorner.Name = "bottomleftcorner"
Me.bottomleftcorner.Size = New System.Drawing.Size(4, 4)
Me.bottomleftcorner.TabIndex = 2
'
'topleftcorner
'
Me.topleftcorner.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95topleftcorner
Me.topleftcorner.Location = New System.Drawing.Point(0, 0)
Me.topleftcorner.Name = "topleftcorner"
Me.topleftcorner.Size = New System.Drawing.Size(4, 4)
Me.topleftcorner.TabIndex = 1
'
'left
'
Me.left.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95leftside
Me.left.Dock = System.Windows.Forms.DockStyle.Left
Me.left.Location = New System.Drawing.Point(0, 4)
Me.left.Name = "left"
Me.left.Size = New System.Drawing.Size(4, 416)
Me.left.TabIndex = 3
'
'bottom
'
Me.bottom.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95bottom
Me.bottom.Cursor = System.Windows.Forms.Cursors.SizeNS
Me.bottom.Dock = System.Windows.Forms.DockStyle.Bottom
Me.bottom.Location = New System.Drawing.Point(0, 420)
Me.bottom.Name = "bottom"
Me.bottom.Size = New System.Drawing.Size(536, 4)
Me.bottom.TabIndex = 5
'
'right
'
Me.right.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95rightside
Me.right.Cursor = System.Windows.Forms.Cursors.SizeWE
Me.right.Dock = System.Windows.Forms.DockStyle.Right
Me.right.Location = New System.Drawing.Point(536, 4)
Me.right.Name = "right"
Me.right.Size = New System.Drawing.Size(4, 420)
Me.right.TabIndex = 7
'
'top
'
Me.top.BackgroundImage = Global.Histacom.My.Resources.Resources.windows95top
Me.top.Dock = System.Windows.Forms.DockStyle.Top
Me.top.Location = New System.Drawing.Point(0, 0)
Me.top.Name = "top"
Me.top.Size = New System.Drawing.Size(540, 4)
Me.top.TabIndex = 8
'
'pullside
'
Me.pullside.Interval = 1
'
'pullbottom
'
Me.pullbottom.Interval = 1
'
'pullbs
'
Me.pullbs.Interval = 1
'
'formnotepad
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(540, 424)
Me.Controls.Add(Me.program)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "formnotepad"
Me.Text = "notepad"
Me.TopMost = True
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.program.ResumeLayout(False)
Me.program.PerformLayout()
Me.programtopbar.ResumeLayout(False)
Me.programtopbar.PerformLayout()
CType(Me.maximizebutton, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.minimizebutton, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.closebutton, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents notepadtextbox As System.Windows.Forms.TextBox
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents FileToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents NewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents OpenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SaveToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SaveAsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents PageSetupToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents PrintToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ExitToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents EditToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents UndoCtrlZToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents CutCtrlXToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents CopyCtrlCToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents PasteCtrlVToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents DeleteDelToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SelectAllToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents TimeDateF5ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents WordWrapToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SearchToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents FindToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents FindNextF3ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents HelpToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents HelpTopicsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents AboutNotepadToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents look As System.Windows.Forms.Timer
Friend WithEvents program As System.Windows.Forms.Panel
Friend WithEvents toprightcorner As System.Windows.Forms.Panel
Friend WithEvents bottomrightcorner As System.Windows.Forms.Panel
Friend WithEvents bottomleftcorner As System.Windows.Forms.Panel
Friend WithEvents topleftcorner As System.Windows.Forms.Panel
Friend WithEvents programtopbar As System.Windows.Forms.Panel
Friend WithEvents maximizebutton As System.Windows.Forms.PictureBox
Friend WithEvents minimizebutton As System.Windows.Forms.PictureBox
Friend WithEvents programname As System.Windows.Forms.Label
Friend WithEvents closebutton As System.Windows.Forms.PictureBox
Friend WithEvents left As System.Windows.Forms.Panel
Friend WithEvents bottom As System.Windows.Forms.Panel
Friend WithEvents right As System.Windows.Forms.Panel
Friend WithEvents top As System.Windows.Forms.Panel
Friend WithEvents pullside As System.Windows.Forms.Timer
Friend WithEvents pullbottom As System.Windows.Forms.Timer
Friend WithEvents pullbs As System.Windows.Forms.Timer
Friend WithEvents FileToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents EditToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SearchToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents FormatToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
End Class
|
Histacom/Histacom
|
windows 95/notepad.Designer.vb
|
Visual Basic
|
apache-2.0
| 28,087
|
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("CommonControls")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Esri")>
<Assembly: AssemblyProduct("CommonControls")>
<Assembly: AssemblyCopyright("Copyright © Esri 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("1150eb91-e190-477c-9750-653c5d6fdee3")>
' 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("10.2.0.0")>
<Assembly: AssemblyFileVersion("10.2.0.0")>
|
Esri/water-utility-mobile-map
|
CommonControls/My Project/AssemblyInfo.vb
|
Visual Basic
|
apache-2.0
| 1,156
|
Public Class RowInfo
Private _rowIndex As Integer
Private _cellsToModify As Dictionary(Of ColumnInfo, CellInfo)
Private _keyValues As Dictionary(Of KeyInfo, Object)
Public ReadOnly Property CellsToModify() As Dictionary(Of ColumnInfo, CellInfo)
Get
Return _cellsToModify
End Get
End Property
Public ReadOnly Property KeyValues() As Dictionary(Of KeyInfo, Object)
Get
Return _keyValues
End Get
End Property
Public ReadOnly Property RowIndex() As Integer
Get
Return _rowIndex
End Get
End Property
Public Sub New(ByVal rowIndex As Integer)
_rowIndex = rowIndex
_cellsToModify = New Dictionary(Of ColumnInfo, CellInfo)
_keyValues = New Dictionary(Of KeyInfo, Object)
End Sub
Public Sub AddCell(ByVal cell As CellInfo)
Dim tempCellInfo As CellInfo = Nothing
If _cellsToModify.TryGetValue(cell.Column, tempCellInfo) Then
tempCellInfo.NewValue = cell.NewValue
Else
_cellsToModify.Add(cell.Column, cell)
End If
End Sub
Public Sub ClearCells()
_cellsToModify = New Dictionary(Of ColumnInfo, CellInfo)
End Sub
Public Sub AddKeyValue(ByVal key As KeyInfo, ByVal value As Object)
_keyValues.Add(key, value)
End Sub
Public Sub ClearKeyValues()
_keyValues = New Dictionary(Of KeyInfo, Object)
End Sub
Public Function GetKeyValue(ByVal key As KeyInfo) As Object
If _keyValues.ContainsKey(key) Then
Return _keyValues(key)
Else
Return Nothing
End If
End Function
End Class
|
QMDevTeam/QMDesigner
|
DataManager/Classes/Edit Classes/RowInfo.vb
|
Visual Basic
|
apache-2.0
| 1,696
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class RootFarmTree
Inherits EIDSS.BaseFarmTreePanel
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
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()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(RootFarmTree))
Me.SuspendLayout()
'
'RootFarmTree
'
Me.AccessibleDescription = Nothing
Me.AccessibleName = Nothing
resources.ApplyResources(Me, "$this")
Me.BackgroundImage = Nothing
Me.Caption = Nothing
Me.Font = Nothing
Me.Name = "RootFarmTree"
Me.ResumeLayout(False)
End Sub
End Class
|
EIDSS/EIDSS-Legacy
|
EIDSS v5/vb/EIDSS/EIDSS_Vet/Farm/RootFarmTree.Designer.vb
|
Visual Basic
|
bsd-2-clause
| 1,392
|
' 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.ComponentModel.Composition
Imports Microsoft.CodeAnalysis.Host.Mef
Imports Microsoft.VisualStudio.Language.Intellisense
Imports Microsoft.VisualStudio.Text
Imports Microsoft.VisualStudio.Text.Editor
Imports Microsoft.VisualStudio.Utilities
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
<Export(GetType(IIntelliSensePresenter(Of ICompletionPresenterSession, ICompletionSession)))>
<PartNotDiscoverable>
<Name("Presenter")>
<ContentType(ContentTypeNames.RoslynContentType)>
Friend Class TestCompletionPresenter
Implements IIntelliSensePresenter(Of ICompletionPresenterSession, ICompletionSession)
Private ReadOnly _testState As IIntelliSenseTestState
<ImportingConstructor>
<Obsolete(MefConstruction.ImportingConstructorMessage, True)>
Public Sub New(testState As IIntelliSenseTestState)
Me._testState = testState
End Sub
Public Function CreateSession(textView As ITextView, subjectBuffer As ITextBuffer, sessionOpt As ICompletionSession) As ICompletionPresenterSession _
Implements IIntelliSensePresenter(Of ICompletionPresenterSession, ICompletionSession).CreateSession
Return New TestCompletionPresenterSession(_testState)
End Function
End Class
End Namespace
|
DustinCampbell/roslyn
|
src/EditorFeatures/TestUtilities2/Intellisense/TestCompletionPresenter.vb
|
Visual Basic
|
apache-2.0
| 1,486
|
' 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.Concurrent
Imports System.Collections.Generic
Imports System.Collections.Immutable
Imports System.Runtime.InteropServices
Imports System.Threading
Imports Microsoft.CodeAnalysis.RuntimeMembers
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports Roslyn.Utilities
Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Namespace Microsoft.CodeAnalysis.VisualBasic
''' <summary>
''' A ExecutableCodeBinder provides context for looking up labels within a context represented by a syntax node,
''' and also implementation of GetBinder.
''' </summary>
Friend MustInherit Class ExecutableCodeBinder
Inherits Binder
Private ReadOnly _syntaxRoot As VisualBasicSyntaxNode
Private ReadOnly _descendantBinderFactory As DescendantBinderFactory
Private _labelsMap As MultiDictionary(Of String, SourceLabelSymbol)
Private _labels As ImmutableArray(Of SourceLabelSymbol) = Nothing
Public Sub New(root As VisualBasicSyntaxNode, containingBinder As Binder)
MyBase.New(containingBinder)
_syntaxRoot = root
_descendantBinderFactory = New DescendantBinderFactory(Me, root)
End Sub
Friend ReadOnly Property Labels As ImmutableArray(Of SourceLabelSymbol)
Get
If _labels.IsDefault Then
ImmutableInterlocked.InterlockedCompareExchange(_labels, BuildLabels(), Nothing)
End If
Return _labels
End Get
End Property
' Build a read only array of all the local variables declared in this statement list.
Private Function BuildLabels() As ImmutableArray(Of SourceLabelSymbol)
Dim labels = ArrayBuilder(Of SourceLabelSymbol).GetInstance()
Dim syntaxVisitor = New LabelVisitor(labels, DirectCast(ContainingMember, MethodSymbol), Me)
Select Case _syntaxRoot.Kind
Case SyntaxKind.SingleLineFunctionLambdaExpression,
SyntaxKind.SingleLineSubLambdaExpression
syntaxVisitor.Visit(DirectCast(_syntaxRoot, SingleLineLambdaExpressionSyntax).Body)
Case SyntaxKind.MultiLineFunctionLambdaExpression,
SyntaxKind.MultiLineSubLambdaExpression
syntaxVisitor.VisitList(DirectCast(_syntaxRoot, MultiLineLambdaExpressionSyntax).Statements)
Case Else
syntaxVisitor.Visit(_syntaxRoot)
End Select
If labels.Count > 0 Then
Return labels.ToImmutableAndFree()
Else
labels.Free()
Return ImmutableArray(Of SourceLabelSymbol).Empty
End If
End Function
Private ReadOnly Property LabelsMap As MultiDictionary(Of String, SourceLabelSymbol)
Get
If Me._labelsMap Is Nothing Then
Interlocked.CompareExchange(Me._labelsMap, BuildLabelsMap(Me.Labels), Nothing)
End If
Return Me._labelsMap
End Get
End Property
Private Shared ReadOnly s_emptyLabelMap As MultiDictionary(Of String, SourceLabelSymbol) = New MultiDictionary(Of String, SourceLabelSymbol)(0, IdentifierComparison.Comparer)
Private Shared Function BuildLabelsMap(labels As ImmutableArray(Of SourceLabelSymbol)) As MultiDictionary(Of String, SourceLabelSymbol)
If Not labels.IsEmpty Then
Dim map = New MultiDictionary(Of String, SourceLabelSymbol)(labels.Length, IdentifierComparison.Comparer)
For Each label In labels
map.Add(label.Name, label)
Next
Return map
Else
' Return an empty map if there aren't any labels.
' LookupLabelByNameToken and other methods assumes a non null map
' is returned from the LabelMap property.
Return s_emptyLabelMap
End If
End Function
Friend Overrides Function LookupLabelByNameToken(labelName As SyntaxToken) As LabelSymbol
Dim name As String = labelName.ValueText
For Each labelSymbol As LabelSymbol In Me.LabelsMap(name)
If labelSymbol.LabelName = labelName Then
Return labelSymbol
End If
Next
Return MyBase.LookupLabelByNameToken(labelName)
End Function
Friend Overrides Sub LookupInSingleBinder(lookupResult As LookupResult,
name As String,
arity As Integer,
options As LookupOptions,
originalBinder As Binder,
<[In], Out> ByRef useSiteDiagnostics As HashSet(Of DiagnosticInfo))
Debug.Assert(lookupResult.IsClear)
If (options And LookupOptions.LabelsOnly) = LookupOptions.LabelsOnly AndAlso LabelsMap IsNot Nothing Then
Dim labels = Me.LabelsMap(name)
Select Case labels.Count
Case 0
' Not found
Case 1
lookupResult.SetFrom(SingleLookupResult.Good(labels.Single()))
Case Else
' There are several labels with the same name, so we are going through the list
' of labels and pick one with the smallest location to make the choice deterministic
Dim bestSymbol As SourceLabelSymbol = Nothing
Dim bestLocation As Location = Nothing
For Each symbol In labels
Debug.Assert(symbol.Locations.Length = 1)
Dim sourceLocation As Location = symbol.Locations(0)
If bestSymbol Is Nothing OrElse Me.Compilation.CompareSourceLocations(bestLocation, sourceLocation) > 0 Then
bestSymbol = symbol
bestLocation = sourceLocation
End If
Next
lookupResult.SetFrom(SingleLookupResult.Good(bestSymbol))
End Select
End If
End Sub
Friend Overrides Sub AddLookupSymbolsInfoInSingleBinder(nameSet As LookupSymbolsInfo,
options As LookupOptions,
originalBinder As Binder)
' UNDONE: additional filtering based on options?
If Not Labels.IsEmpty AndAlso (options And LookupOptions.LabelsOnly) = LookupOptions.LabelsOnly Then
Dim labels = Me.Labels
For Each labelSymbol In labels
nameSet.AddSymbol(labelSymbol, labelSymbol.Name, 0)
Next
End If
End Sub
Public Overrides Function GetBinder(stmtList As SyntaxList(Of StatementSyntax)) As Binder
Return _descendantBinderFactory.GetBinder(stmtList)
End Function
Public Overrides Function GetBinder(node As VisualBasicSyntaxNode) As Binder
Return _descendantBinderFactory.GetBinder(node)
End Function
Public ReadOnly Property Root As VisualBasicSyntaxNode
Get
Return _descendantBinderFactory.Root
End Get
End Property
' Get the map that maps from syntax nodes to binders.
Public ReadOnly Property NodeToBinderMap As ImmutableDictionary(Of VisualBasicSyntaxNode, BlockBaseBinder)
Get
Return _descendantBinderFactory.NodeToBinderMap
End Get
End Property
' Get the map that maps from statement lists to binders.
Friend ReadOnly Property StmtListToBinderMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder)
Get
Return _descendantBinderFactory.StmtListToBinderMap
End Get
End Property
#If DEBUG Then
' Implicit variable declaration (Option Explicit Off) relies on identifiers
' being bound in order. Also, most of our tests run with Option Explicit On. To test that
' we bind identifiers in order even with Option Explicit On, in DEBUG we check the order or
' binding of simple names when compiling a whole method body (i.e., during batch compilation,
' not SemanticModel services).
'
' We check lambda separately from method bodies (even though in theory they should be checked
' together) because there are cases where lambda are bound out of order.
'
' See SourceMethodSymbol.GetBoundMethodBody for where this is enabled.
'
' See BindSimpleName for where CheckSimpleNameBinderOrder is called.
' We just store the positions of simple names that have been checked.
Private _checkSimpleNameBindingOrder As Boolean = False
' The set of offsets of simple names that have already been bound.
Private _boundSimpleNames As HashSet(Of Integer)
' The largest position that has been bound.
Private _lastBoundSimpleName As Integer = -1
Public Overrides Sub CheckSimpleNameBindingOrder(node As SimpleNameSyntax)
If _checkSimpleNameBindingOrder Then
Dim position = node.SpanStart
' There are cases where we bind the same name multiple times -- for example, For loop
' variables, and debug checks with local type inference. Hence we only check the first time we
' see a simple name.
If Not _boundSimpleNames.Contains(position) Then
' If this assert fires, it indicates that simple names are not being bound in order.
' This indicates that binding with Option Explicit Off likely will exhibit a bug.
Debug.Assert(position >= _lastBoundSimpleName, "Did not bind simple names in order. Option Explicit Off probably will not behave correctly.")
_boundSimpleNames.Add(position)
_lastBoundSimpleName = Math.Max(_lastBoundSimpleName, position)
End If
End If
End Sub
' We require simple name binding order checks to be enabled, because the SemanticModel APIs
' will bind things not in order. We only enable them during binding of a full method body or lambda body.
Public Overrides Sub EnableSimpleNameBindingOrderChecks(enable As Boolean)
If enable Then
Debug.Assert(Not _checkSimpleNameBindingOrder)
Debug.Assert(_boundSimpleNames Is Nothing)
_boundSimpleNames = New HashSet(Of Integer)
_checkSimpleNameBindingOrder = True
Else
_boundSimpleNames = Nothing
_checkSimpleNameBindingOrder = False
End If
End Sub
#End If
Public Class LabelVisitor
Inherits StatementSyntaxWalker
Private ReadOnly _labels As ArrayBuilder(Of SourceLabelSymbol)
Private ReadOnly _containingMethod As MethodSymbol
Private ReadOnly _binder As Binder
Public Sub New(labels As ArrayBuilder(Of SourceLabelSymbol), containingMethod As MethodSymbol, binder As Binder)
Me._labels = labels
Me._containingMethod = containingMethod
Me._binder = binder
End Sub
Public Overrides Sub VisitLabelStatement(node As LabelStatementSyntax)
_labels.Add(New SourceLabelSymbol(node.LabelToken, _containingMethod, _binder))
End Sub
End Class
End Class
End Namespace
|
MatthieuMEZIL/roslyn
|
src/Compilers/VisualBasic/Portable/Binding/ExecutableCodeBinder.vb
|
Visual Basic
|
apache-2.0
| 12,290
|
Imports System
Imports System.Net
Imports Independentsoft.Exchange
Namespace Sample
Class Module1
Shared Sub Main(ByVal args As String())
Dim credential As New NetworkCredential("username", "password")
Dim service As New Service("https://myserver/ews/Exchange.asmx", credential)
Try
Dim backupFolderId As FolderId = service.CreateFolder("Backup", StandardFolder.MailboxRoot)
Dim findFolderResponse As FindFolderResponse = service.FindFolder(StandardFolder.Drafts)
For i As Integer = 0 To findFolderResponse.Folders.Count - 1
Dim currentFolderId As FolderId = findFolderResponse.Folders(i).FolderId
Dim newFolderId As FolderId = service.CopyFolder(currentFolderId, backupFolderId)
Next
Catch ex As ServiceRequestException
Console.WriteLine("Error: " + ex.Message)
Console.WriteLine("Error: " + ex.XmlMessage)
Console.Read()
Catch ex As WebException
Console.WriteLine("Error: " + ex.Message)
Console.Read()
End Try
End Sub
End Class
End Namespace
|
age-killer/Electronic-invoice-document-processing
|
MailSort_CSHARP/packages/Independentsoft.Exchange.3.0.400/Tutorial/VBCopyFolder/Module1.vb
|
Visual Basic
|
mit
| 1,233
|
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("Practica6")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Practica6")>
<Assembly: AssemblyCopyright("Copyright © 2014")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("85c5ac41-3759-4968-86bb-15aac2c2f58f")>
' 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")>
|
rafael25/poe-unitec
|
Practica6/Practica6/My Project/AssemblyInfo.vb
|
Visual Basic
|
mit
| 1,171
|
'
' News Articles for DotNetNuke - http://www.dotnetnuke.com
' Copyright (c) 2002-2007
' by Ventrian ( sales@ventrian.com ) ( http://www.ventrian.com )
'
Imports System
Imports System.ComponentModel
Imports System.Text.RegularExpressions
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Xml
Imports DotNetNuke.Common
Imports DotNetNuke.Common.Utilities
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Security
Imports DotNetNuke.Security.Permissions
Imports DotNetNuke.Services.Localization
Namespace Ventrian.NewsArticles.Base
Public Class NewsArticleModuleBase
Inherits PortalModuleBase
#Region " Private Members "
Private _articleSettings As ArticleSettings
#End Region
#Region " Public Properties "
<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public ReadOnly Property BasePage() As DotNetNuke.Framework.CDefault
Get
Return CType(Page, DotNetNuke.Framework.CDefault)
End Get
End Property
Public ReadOnly Property ArticleSettings() As ArticleSettings
Get
If (_articleSettings Is Nothing) Then
Try
_articleSettings = New ArticleSettings(Settings, PortalSettings, ModuleConfiguration)
Catch
Dim objSettings As Hashtable = ModuleConfiguration.ModuleSettings
Dim objTabSettings As Hashtable = ModuleConfiguration.TabModuleSettings
For Each item As DictionaryEntry In objTabSettings
If (objSettings.ContainsKey(item.Key) = False) Then
objSettings.Add(item.Key, item.Value)
End If
Next
_articleSettings = New ArticleSettings(objSettings, PortalSettings, ModuleConfiguration)
ModuleController.Instance.UpdateModuleSetting(ModuleId, "ResetArticleSettings", "true")
End Try
End If
Return _articleSettings
End Get
End Property
Public ReadOnly Property ModuleKey() As String
Get
Return "NewsArticles-" & TabModuleId
End Get
End Property
#End Region
#Region " Protected Methods "
Protected Function EditArticleUrl(ByVal ctl As String) As String
If (ArticleSettings.AuthorUserIDFilter) Then
If (ArticleSettings.AuthorUserIDParam <> "") Then
If (HttpContext.Current.Request(ArticleSettings.AuthorUserIDParam) <> "") Then
Return EditUrl(ArticleSettings.AuthorUserIDParam, HttpContext.Current.Request(ArticleSettings.AuthorUserIDParam), ctl)
End If
End If
End If
If (ArticleSettings.AuthorUsernameFilter) Then
If (ArticleSettings.AuthorUsernameParam <> "") Then
If (HttpContext.Current.Request(ArticleSettings.AuthorUsernameParam) <> "") Then
Return EditUrl(ArticleSettings.AuthorUsernameParam, HttpContext.Current.Request(ArticleSettings.AuthorUsernameParam), ctl)
End If
End If
End If
Return EditUrl(ctl)
End Function
Protected Function EditArticleUrl(ByVal ctl As String, ByVal ParamArray params() As String) As String
Dim parameters As New List(Of String)
parameters.Add("mid=" & ModuleId.ToString())
parameters.AddRange(params)
If (ArticleSettings.AuthorUserIDFilter) Then
If (ArticleSettings.AuthorUserIDParam <> "") Then
If (HttpContext.Current.Request(ArticleSettings.AuthorUserIDParam) <> "") Then
parameters.Add(ArticleSettings.AuthorUserIDParam & "=" & HttpContext.Current.Request(ArticleSettings.AuthorUserIDParam))
End If
End If
End If
If (ArticleSettings.AuthorUsernameFilter) Then
If (ArticleSettings.AuthorUsernameParam <> "") Then
If (HttpContext.Current.Request(ArticleSettings.AuthorUsernameParam) <> "") Then
parameters.Add(ArticleSettings.AuthorUsernameParam & "=" & HttpContext.Current.Request(ArticleSettings.AuthorUsernameParam))
End If
End If
End If
Return NavigateURL(TabId, ctl, parameters.ToArray)
End Function
Public Sub LoadStyleSheet()
Dim objCSS As Control = BasePage.FindControl("CSS")
If Not (objCSS Is Nothing) Then
Dim objLink As New HtmlLink()
objLink.ID = "Template_" & ModuleId.ToString()
objLink.Attributes("rel") = "stylesheet"
objLink.Attributes("type") = "text/css"
objLink.Href = Page.ResolveUrl("~/DesktopModules/DnnForge - NewsArticles/Templates/" & _articleSettings.Template & "/Template.css")
objCSS.Controls.AddAt(0, objLink)
End If
End Sub
Public Function GetSkinAttribute(ByVal xDoc As XmlDocument, ByVal tag As String, ByVal attrib As String, ByVal defaultValue As String) As String
Dim retValue As String = defaultValue
Dim xmlSkinAttributeRoot As XmlNode = xDoc.SelectSingleNode("descendant::Object[Token='[" & tag & "]']")
' if the token is found
If Not xmlSkinAttributeRoot Is Nothing Then
' process each token attribute
Dim xmlSkinAttribute As XmlNode
For Each xmlSkinAttribute In xmlSkinAttributeRoot.SelectNodes(".//Settings/Setting")
If xmlSkinAttribute.SelectSingleNode("Value").InnerText <> "" Then
' append the formatted attribute to the inner contents of the control statement
If xmlSkinAttribute.SelectSingleNode("Name").InnerText = attrib Then
retValue = xmlSkinAttribute.SelectSingleNode("Value").InnerText
End If
End If
Next
End If
Return retValue
End Function
Protected Function FormatImageUrl(ByVal imageUrlResolved As String) As String
Return PortalSettings.HomeDirectory & imageUrlResolved
End Function
Protected Function IsRated(ByVal objArticle As ArticleInfo) As Boolean
If (objArticle.Rating = Null.NullDouble) Then
Return False
Else
Return True
End If
End Function
Protected Function IsRated(ByVal objDataItem As Object) As Boolean
Dim objArticle As ArticleInfo = CType(objDataItem, ArticleInfo)
Return IsRated(objArticle)
End Function
Protected Function GetRatingImage(ByVal objArticle As ArticleInfo) As String
If (objArticle.Rating = Null.NullDouble) Then
Return ResolveUrl("Images\Rating\stars-0-0.gif")
Else
Select Case RoundToUnit(objArticle.Rating, 0.5, False)
Case 1
Return ResolveUrl("Images\Rating\stars-1-0.gif")
Case 1.5
Return ResolveUrl("Images\Rating\stars-1-5.gif")
Case 2
Return ResolveUrl("Images\Rating\stars-2-0.gif")
Case 2.5
Return ResolveUrl("Images\Rating\stars-2-5.gif")
Case 3
Return ResolveUrl("Images\Rating\stars-3-0.gif")
Case 3.5
Return ResolveUrl("Images\Rating\stars-3-5.gif")
Case 4
Return ResolveUrl("Images\Rating\stars-4-0.gif")
Case 4.5
Return ResolveUrl("Images\Rating\stars-4-5.gif")
Case 5
Return ResolveUrl("Images\Rating\stars-5-0.gif")
End Select
Return ResolveUrl("Images\Rating\stars-0-0.gif")
End If
End Function
Public Function StripHtml(ByVal html As String) As String
Return StripHtml(html, False)
End Function
Public Function StripHtml(ByVal html As String, ByVal cleanLineBreaks As Boolean) As String
Dim pattern As String = "<(.|\n)*?>"
Return Regex.Replace(html, pattern, String.Empty).Replace(System.Environment.NewLine, " ")
End Function
Private Function RoundToUnit(ByVal d As Double, ByVal unit As Double, ByVal roundDown As Boolean) As Double
If (roundDown) Then
Return Math.Round(Math.Round((d / unit) - 0.5, 0) * unit, 2)
Else
Return Math.Round(Math.Round((d / unit) + 0.5, 0) * unit, 2)
End If
End Function
Protected Function GetRatingImage(ByVal objDataItem As Object) As String
Dim objArticle As ArticleInfo = CType(objDataItem, ArticleInfo)
Return GetRatingImage(objArticle)
End Function
Protected Function GetUserName(ByVal dataItem As Object) As String
Dim objArticle As ArticleInfo = CType(dataItem, ArticleInfo)
If Not (objArticle Is Nothing) Then
Select Case ArticleSettings.DisplayMode
Case DisplayType.UserName
Return objArticle.AuthorUserName
Case DisplayType.FirstName
Return objArticle.AuthorFirstName
Case DisplayType.LastName
Return objArticle.AuthorLastName
Case DisplayType.FullName
Return objArticle.AuthorFullName
End Select
End If
Return Null.NullString
End Function
Protected Function GetUserName(ByVal dataItem As Object, ByVal type As Integer) As String
Dim objArticle As ArticleInfo = CType(dataItem, ArticleInfo)
If Not (objArticle Is Nothing) Then
Select Case type
Case 1 'Last Updated
Select Case ArticleSettings.DisplayMode
Case DisplayType.UserName
Return objArticle.LastUpdateUserName
Case DisplayType.FirstName
Return objArticle.LastUpdateFirstName
Case DisplayType.LastName
Return objArticle.LastUpdateLastName
Case DisplayType.FullName
Return objArticle.LastUpdateDisplayName
End Select
Case Else
Select Case ArticleSettings.DisplayMode
Case DisplayType.UserName
Return objArticle.AuthorUserName
Case DisplayType.FirstName
Return objArticle.AuthorFirstName
Case DisplayType.LastName
Return objArticle.AuthorLastName
Case DisplayType.FullName
Return objArticle.AuthorDisplayName
End Select
End Select
End If
Return Null.NullString
End Function
Protected Function HasEditRights(ByVal articleId As Integer, ByVal moduleID As Integer, ByVal tabID As Integer) As Boolean
' Unauthenticated User
'
If (Request.IsAuthenticated = False) Then
Return False
End If
Dim objModuleController As ModuleController = New ModuleController
Dim objModule As ModuleInfo = objModuleController.GetModule(moduleID, tabID)
If Not (objModule Is Nothing) Then
' Admin of Module
'
If (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "EDIT" , objModule)) Then
Return True
End If
End If
' Approver
'
If (ArticleSettings.IsApprover) Then
Return True
End If
' Submitter of New Article
'
If (articleId = Null.NullInteger And ArticleSettings.IsSubmitter) Then
Return True
End If
' Owner of Article
'
Dim objArticleController As ArticleController = New ArticleController
Dim objArticle As ArticleInfo = objArticleController.GetArticle(articleId)
If Not (objArticle Is Nothing) Then
If (objArticle.AuthorID = UserId And (objArticle.Status = StatusType.Draft Or ArticleSettings.IsAutoApprover)) Then
Return True
End If
End If
Return False
End Function
Public Function GetSharedResource(ByVal key As String) As String
Dim path As String = "~/DesktopModules/DnnForge - NewsArticles/" & Localization.LocalResourceDirectory & "/" & Localization.LocalSharedResourceFile
Return Localization.GetString(key, path)
End Function
#End Region
#Region " Shadowed Methods "
Public Shadows Function ResolveUrl(ByVal url As String) As String
Return MyBase.ResolveUrl(url).Replace(" ", "%20")
End Function
#End Region
End Class
End Namespace
|
ventrian/News-Articles
|
Base/NewsArticleModuleBase.vb
|
Visual Basic
|
mit
| 14,241
|
Imports System
Imports System.Net
Imports Independentsoft.Exchange
Namespace Sample
Class Module1
Shared Sub Main(ByVal args As String())
Dim credential As New NetworkCredential("username", "password")
Dim service As New Service("https://myserver/ews/Exchange.asmx", credential)
Try
Dim myPropertyName As New PropertyName("myfield1", StandardPropertySet.PublicStrings, MapiPropertyType.[String])
Dim myProperty As New ExtendedProperty(myPropertyName, "test")
Dim contact As New Contact()
contact.GivenName = "John"
contact.Surname = "Smith"
contact.FileAsMapping = FileAsMapping.LastSpaceFirst
contact.CompanyName = "Independentsoft"
contact.BusinessPhone = "555-666-777"
contact.Email1Address = "john@independentsoft.de"
contact.Email1DisplayName = "John Smith"
contact.Email1DisplayAs = "John Smith"
contact.Email1Type = "SMTP"
contact.ExtendedProperties.Add(myProperty)
Dim itemId As ItemId = service.CreateItem(contact)
Catch ex As ServiceRequestException
Console.WriteLine("Error: " + ex.Message)
Console.WriteLine("Error: " + ex.XmlMessage)
Console.Read()
Catch ex As WebException
Console.WriteLine("Error: " + ex.Message)
Console.Read()
End Try
End Sub
End Class
End Namespace
|
age-killer/Electronic-invoice-document-processing
|
MailSort_CSHARP/packages/Independentsoft.Exchange.3.0.400/Tutorial/VBCreateContactWithCustomProperty/Module1.vb
|
Visual Basic
|
mit
| 1,591
|
'-------------------------------------------------------------------------------------------'
' Inicio del codigo
'-------------------------------------------------------------------------------------------'
' Importando librerias
'-------------------------------------------------------------------------------------------'
Imports System.Data
'-------------------------------------------------------------------------------------------'
' Inicio de clase "rMargen_gVendedorArticulos_Resumido"
'-------------------------------------------------------------------------------------------'
Partial Class rMargen_gVendedorArticulos_Resumido
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))
Dim lcParametro0Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(0))
Dim lcParametro1Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(1), goServicios.enuOpcionesRedondeo.KN_FechaInicioDelDia)
Dim lcParametro1Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(1), goServicios.enuOpcionesRedondeo.KN_FechaFinDelDia)
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 = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(5))
Dim lcParametro5Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(5))
Dim lcParametro6Desde As String = cusAplicacion.goReportes.paParametrosIniciales(6)
Dim lcParametro7Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(7))
Dim lcParametro7Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(7))
Dim lcParametro8Desde As String = cusAplicacion.goReportes.paParametrosIniciales(8)
Dim lcParametro9Desde As String = cusAplicacion.goReportes.paParametrosIniciales(9)
Dim lcParametro10Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(10))
Dim lcParametro10Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(10))
Dim lcParametro11Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(11))
Dim lcParametro11Hasta As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosFinales(11))
Dim lcOrdenamiento As String = cusAplicacion.goReportes.pcOrden
Dim lcCosto As String = ""
Select Case lcParametro6Desde
Case "Promedio MP"
lcCosto = "Cos_Pro1"
Case "Ultimo MP"
lcCosto = "Cos_Ult1"
Case "Anterior MP"
lcCosto = "Cos_Ant1"
Case "Promedio MS"
lcCosto = "Cos_Pro2"
Case "Ultimo MS"
lcCosto = "Cos_Ult2"
Case "Anterior MS"
lcCosto = "Cos_Ant2"
End Select
Dim loComandoSeleccionar As New StringBuilder()
loComandoSeleccionar.AppendLine("CREATE TABLE #tmpGanancia( Cod_Ven CHAR(30), ")
loComandoSeleccionar.AppendLine(" Nom_Ven CHAR(100), ")
loComandoSeleccionar.AppendLine(" Cod_Art CHAR(30), ")
loComandoSeleccionar.AppendLine(" Nom_Art CHAR(100), ")
loComandoSeleccionar.AppendLine(" Can_Art DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Can_Fac DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Can_Dev DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Base_A DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Base_B DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Costo_A DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Costo_B DECIMAL(28, 10)) ")
loComandoSeleccionar.AppendLine(" ")
loComandoSeleccionar.AppendLine("CREATE TABLE #tmpFinal( Cod_Ven CHAR(30), ")
loComandoSeleccionar.AppendLine(" Nom_Ven CHAR(100), ")
loComandoSeleccionar.AppendLine(" Cod_Art CHAR(30), ")
loComandoSeleccionar.AppendLine(" Nom_Art CHAR(100), ")
loComandoSeleccionar.AppendLine(" Can_Art DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Can_Fac DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Can_Dev DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Base_A DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Base_B DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Costo_A DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Costo_B DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Ganancia_A DECIMAL(28, 10), ")
loComandoSeleccionar.AppendLine(" Ganancia_B DECIMAL(28, 10)) ")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("/*------------------------------------------------------------------------------------------*/")
loComandoSeleccionar.AppendLine("/* Datos de Venta */")
loComandoSeleccionar.AppendLine("/*------------------------------------------------------------------------------------------*/")
loComandoSeleccionar.AppendLine("INSERT INTO #tmpGanancia(Cod_Ven, Nom_Ven, Cod_Art, Nom_Art, Can_Art, Can_Fac, Can_Dev, Base_A, Base_B, Costo_A, Costo_B)")
loComandoSeleccionar.AppendLine("SELECT Vendedores.Cod_Ven AS Cod_Ven,")
loComandoSeleccionar.AppendLine(" Vendedores.Nom_Ven AS Nom_Ven,")
loComandoSeleccionar.AppendLine(" Articulos.Cod_Art AS Cod_Art,")
loComandoSeleccionar.AppendLine(" Articulos.Nom_Art AS Nom_Art,")
loComandoSeleccionar.AppendLine(" SUM(Renglones_Facturas.Can_Art1) AS Can_Art,")
loComandoSeleccionar.AppendLine(" COUNT(DISTINCT Facturas.Documento) AS Can_Fac,")
loComandoSeleccionar.AppendLine(" 0 AS Can_Dev,")
loComandoSeleccionar.AppendLine(" SUM(Renglones_Facturas.Mon_Net) AS Base_A,")
loComandoSeleccionar.AppendLine(" 0 AS Base_B,")
loComandoSeleccionar.AppendLine(" SUM(Renglones_Facturas.Can_Art1*Renglones_Facturas." & lcCosto & ") AS Costo_A,")
loComandoSeleccionar.AppendLine(" 0 AS Costo_B")
loComandoSeleccionar.AppendLine("FROM Clientes")
loComandoSeleccionar.AppendLine(" JOIN Facturas ")
loComandoSeleccionar.AppendLine(" ON Facturas.Cod_Cli = Clientes.Cod_Cli")
loComandoSeleccionar.AppendLine(" JOIN Renglones_Facturas ")
loComandoSeleccionar.AppendLine(" ON Renglones_Facturas.Documento = Facturas.Documento")
loComandoSeleccionar.AppendLine(" JOIN Vendedores ")
loComandoSeleccionar.AppendLine(" ON Vendedores.Cod_Ven = Facturas.Cod_Ven")
loComandoSeleccionar.AppendLine(" JOIN Articulos ")
loComandoSeleccionar.AppendLine(" ON Renglones_Facturas.Cod_Art = Articulos.Cod_Art")
loComandoSeleccionar.AppendLine("WHERE Facturas.Documento BETWEEN " & lcParametro0Desde & " AND " & lcParametro0Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Fec_Ini BETWEEN " & lcParametro1Desde & " AND " & lcParametro1Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Cod_Cli BETWEEN " & lcParametro2Desde & " AND " & lcParametro2Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Cod_Ven BETWEEN " & lcParametro3Desde & " AND " & lcParametro3Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Status IN ('Confirmado', 'Afectado', 'Procesado')")
loComandoSeleccionar.AppendLine(" AND Renglones_Facturas.Cod_Art BETWEEN " & lcParametro4Desde & " AND " & lcParametro4Hasta)
loComandoSeleccionar.AppendLine(" AND Articulos.Cod_Dep BETWEEN " & lcParametro5Desde & " AND " & lcParametro5Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Cod_Mon BETWEEN " & lcParametro7Desde & " AND " & lcParametro7Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Cod_Rev BETWEEN " & lcParametro10Desde & " AND " & lcParametro10Hasta)
loComandoSeleccionar.AppendLine(" AND Facturas.Cod_Suc BETWEEN " & lcParametro11Desde & " AND " & lcParametro11Hasta)
loComandoSeleccionar.AppendLine("GROUP BY Vendedores.Cod_Ven, Vendedores.Nom_Ven, Articulos.Cod_Art, Articulos.Nom_Art")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("/*------------------------------------------------------------------------------------------*/")
loComandoSeleccionar.AppendLine("/* Datos de Devoluciones */")
loComandoSeleccionar.AppendLine("/*------------------------------------------------------------------------------------------*/")
loComandoSeleccionar.AppendLine("INSERT INTO #tmpGanancia(Cod_Ven, Nom_Ven, Cod_Art, Nom_Art, Can_Art, Can_Fac, Can_Dev, Base_A, Base_B, Costo_A, Costo_B)")
loComandoSeleccionar.AppendLine("SELECT Vendedores.Cod_Ven AS Cod_Ven,")
loComandoSeleccionar.AppendLine(" Vendedores.Nom_Ven AS Nom_Ven,")
loComandoSeleccionar.AppendLine(" Articulos.Cod_Art AS Cod_Art,")
loComandoSeleccionar.AppendLine(" Articulos.Nom_Art AS Nom_Art,")
loComandoSeleccionar.AppendLine(" -SUM(Renglones_dClientes.Can_Art1) AS Can_Art,")
loComandoSeleccionar.AppendLine(" 0 AS Can_Fac,")
loComandoSeleccionar.AppendLine(" COUNT(DISTINCT Devoluciones_Clientes.Documento) AS Can_Dev,")
loComandoSeleccionar.AppendLine(" 0 AS Base_A,")
loComandoSeleccionar.AppendLine(" SUM(Renglones_dClientes.Mon_Net) AS Base_B,")
loComandoSeleccionar.AppendLine(" 0 AS Costo_A,")
loComandoSeleccionar.AppendLine(" SUM(Renglones_dClientes.Can_Art1*Renglones_dClientes.Cos_Pro1) AS Costo_B")
loComandoSeleccionar.AppendLine("FROM Clientes")
loComandoSeleccionar.AppendLine(" JOIN Devoluciones_Clientes ")
loComandoSeleccionar.AppendLine(" ON Devoluciones_Clientes.Cod_Cli = Clientes.Cod_Cli")
loComandoSeleccionar.AppendLine(" JOIN Renglones_dClientes ")
loComandoSeleccionar.AppendLine(" ON Renglones_dClientes.Documento = Devoluciones_Clientes.Documento")
loComandoSeleccionar.AppendLine(" AND Renglones_dClientes.tip_Ori = 'Facturas'")
loComandoSeleccionar.AppendLine(" JOIN Vendedores ")
loComandoSeleccionar.AppendLine(" ON Vendedores.Cod_Ven = Devoluciones_Clientes.Cod_Ven")
loComandoSeleccionar.AppendLine(" JOIN Articulos ")
loComandoSeleccionar.AppendLine(" ON Renglones_dClientes.Cod_Art = Articulos.Cod_Art")
loComandoSeleccionar.AppendLine("WHERE Devoluciones_Clientes.Documento BETWEEN " & lcParametro0Desde & " AND " & lcParametro0Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Fec_Ini BETWEEN " & lcParametro1Desde & " AND " & lcParametro1Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Cod_Cli BETWEEN " & lcParametro2Desde & " AND " & lcParametro2Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Cod_Ven BETWEEN " & lcParametro3Desde & " AND " & lcParametro3Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Status IN ('Confirmado', 'Afectado', 'Procesado')")
loComandoSeleccionar.AppendLine(" AND Renglones_dClientes.Cod_Art BETWEEN " & lcParametro4Desde & " AND " & lcParametro4Hasta)
loComandoSeleccionar.AppendLine(" AND Articulos.Cod_Dep BETWEEN " & lcParametro5Desde & " AND " & lcParametro5Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Cod_Mon BETWEEN " & lcParametro7Desde & " AND " & lcParametro7Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Cod_Rev BETWEEN " & lcParametro10Desde & " AND " & lcParametro10Hasta)
loComandoSeleccionar.AppendLine(" AND Devoluciones_Clientes.Cod_Suc BETWEEN " & lcParametro11Desde & " AND " & lcParametro11Hasta)
loComandoSeleccionar.AppendLine("GROUP BY Vendedores.Cod_Ven, Vendedores.Nom_Ven, Articulos.Cod_Art, Articulos.Nom_Art")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("/*------------------------------------------------------------------------------------------*/")
loComandoSeleccionar.AppendLine("/* Cálculo de ganancia */ ")
loComandoSeleccionar.AppendLine("/*------------------------------------------------------------------------------------------*/")
loComandoSeleccionar.AppendLine("INSERT INTO #tmpFinal(Cod_Ven, Nom_Ven, Cod_Art, Nom_Art, Can_Art, Can_Fac, Can_Dev, Base_A, Base_B, Costo_A, Costo_B, Ganancia_A, Ganancia_B)")
loComandoSeleccionar.AppendLine("SELECT Cod_Ven AS Cod_Ven,")
loComandoSeleccionar.AppendLine(" Nom_Ven AS Nom_Ven,")
loComandoSeleccionar.AppendLine(" Cod_Art AS Cod_Art,")
loComandoSeleccionar.AppendLine(" Nom_Art AS Nom_Art,")
loComandoSeleccionar.AppendLine(" SUM(Can_Art) AS Can_Art,")
loComandoSeleccionar.AppendLine(" SUM(Can_Fac) AS Can_Fac,")
loComandoSeleccionar.AppendLine(" SUM(Can_Dev) AS Can_Dev,")
loComandoSeleccionar.AppendLine(" SUM(Base_A) AS Base_A,")
loComandoSeleccionar.AppendLine(" SUM(Base_B) AS Base_B,")
loComandoSeleccionar.AppendLine(" SUM(Costo_A) AS Costo_A,")
loComandoSeleccionar.AppendLine(" SUM(Costo_B) AS Costo_B,")
loComandoSeleccionar.AppendLine(" 0 AS Ganancia_A,")
loComandoSeleccionar.AppendLine(" 0 AS Ganancia_B")
loComandoSeleccionar.AppendLine("FROM #tmpGanancia")
loComandoSeleccionar.AppendLine("GROUP BY Cod_Ven, Nom_Ven, Cod_Art, Nom_Art")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("UPDATE #tmpFinal")
loComandoSeleccionar.AppendLine("SET Ganancia_A = (Base_A -Base_B) - (Costo_A - Costo_B),")
loComandoSeleccionar.AppendLine(" Ganancia_B = ( CASE ")
loComandoSeleccionar.AppendLine(" WHEN (Base_A - Base_B) <> 0")
loComandoSeleccionar.AppendLine(" THEN ( (Base_A -Base_B) - (Costo_A - Costo_B))*100 / (Base_A - Base_B)")
loComandoSeleccionar.AppendLine(" ELSE 0")
loComandoSeleccionar.AppendLine(" END)")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("SELECT Cod_Ven AS Cod_Ven,")
loComandoSeleccionar.AppendLine(" Nom_Ven AS Nom_Ven,")
loComandoSeleccionar.AppendLine(" Cod_Art AS Cod_Art,")
loComandoSeleccionar.AppendLine(" Nom_Art AS Nom_Art,")
loComandoSeleccionar.AppendLine(" Can_Art AS Can_Art,")
loComandoSeleccionar.AppendLine(" Can_Fac AS Can_Fac,")
loComandoSeleccionar.AppendLine(" Can_Fac AS Can_Fac,")
loComandoSeleccionar.AppendLine(" Can_Dev AS Can_Dev,")
loComandoSeleccionar.AppendLine(" (Base_A-Base_B) AS Monto_Real,")
loComandoSeleccionar.AppendLine(" (Costo_A-Costo_B) AS Costo_Real,")
loComandoSeleccionar.AppendLine(" Base_A AS Base_A,")
loComandoSeleccionar.AppendLine(" Base_B AS Base_B,")
loComandoSeleccionar.AppendLine(" Costo_A AS Costo_A,")
loComandoSeleccionar.AppendLine(" Costo_B AS Costo_B,")
loComandoSeleccionar.AppendLine(" Ganancia_A AS Utilidad,")
loComandoSeleccionar.AppendLine(" Ganancia_B AS Porcentaje")
loComandoSeleccionar.AppendLine("FROM #tmpFinal")
Select Case lcParametro8Desde
Case "Mayor"
loComandoSeleccionar.AppendLine("WHERE Ganancia_B > " & lcParametro9Desde)
Case "Menor"
loComandoSeleccionar.AppendLine("WHERE Ganancia_B < " & lcParametro9Desde)
Case "Igual"
loComandoSeleccionar.AppendLine("WHERE Ganancia_B = " & lcParametro9Desde)
Case "Todos"
'No filtra por Ganancia_B
End Select
loComandoSeleccionar.AppendLine("ORDER BY " & lcOrdenamiento)
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("DROP TABLE #tmpFinal")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("")
loComandoSeleccionar.AppendLine("")
'Me.mEscribirConsulta(loComandoSeleccionar.ToString())
Dim loServicios As New cusDatos.goDatos
Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loComandoSeleccionar.ToString, "curReportes")
loObjetoReporte = cusAplicacion.goReportes.mCargarReporte("rMargen_gVendedorArticulos_Resumido", laDatosReporte)
'-------------------------------------------------------------------------------------------------------
' 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
Me.mTraducirReporte(loObjetoReporte)
Me.mFormatearCamposReporte(loObjetoReporte)
Me.crvrMargen_gVendedorArticulos_Resumido.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
'-------------------------------------------------------------------------------------------'
' MAT: 08/09/11: Programacion inicial
'-------------------------------------------------------------------------------------------'
' RJG: 05/09/12: Corrección de SELECT.
'-------------------------------------------------------------------------------------------'
|
kodeitsolutions/ef-reports
|
rMargen_gVendedorArticulos_Resumido.aspx.vb
|
Visual Basic
|
mit
| 21,216
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class TestAndEasterEgg
Inherits System.Windows.Forms.Form
'Form은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
<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
'Windows Form 디자이너에 필요합니다.
Private components As System.ComponentModel.IContainer
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
'수정하려면 Windows Form 디자이너를 사용하십시오.
'코드 편집기를 사용하여 수정하지 마십시오.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Button1 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
Me.Button4 = New System.Windows.Forms.Button()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.TreeView1 = New System.Windows.Forms.TreeView()
Me.Button3 = New System.Windows.Forms.Button()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.Label2 = New System.Windows.Forms.Label()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
Me.AbcdToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.EfghToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.HijklToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.MnopToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.QrstToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabControl1.SuspendLayout()
Me.TabPage3.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.TabPage2.SuspendLayout()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer1.Panel1.SuspendLayout()
Me.SplitContainer1.Panel2.SuspendLayout()
Me.SplitContainer1.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.MenuStrip1.SuspendLayout()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(189, 376)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(83, 22)
Me.Button1.TabIndex = 0
Me.Button1.Text = "알림!"
Me.Button1.UseVisualStyleBackColor = True
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(6, 376)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(177, 21)
Me.TextBox1.TabIndex = 1
'
'PictureBox1
'
Me.PictureBox1.Image = Global.버들라이브러리.My.Resources.Resources.easteregg_kuroneko_masturbation
Me.PictureBox1.Location = New System.Drawing.Point(6, 6)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(500, 282)
Me.PictureBox1.TabIndex = 3
Me.PictureBox1.TabStop = False
'
'ListBox1
'
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.ItemHeight = 12
Me.ListBox1.Items.AddRange(New Object() {"알림", "동기화[로컬]완료됨", "동기화[서버]완료됨", "로그인 성공", "경고", "파일 다운로드 완료"})
Me.ListBox1.Location = New System.Drawing.Point(6, 294)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(266, 76)
Me.ListBox1.TabIndex = 4
'
'TabControl1
'
Me.TabControl1.Controls.Add(Me.TabPage3)
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.TabControl1.Location = New System.Drawing.Point(0, 24)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(784, 537)
Me.TabControl1.TabIndex = 5
'
'TabPage3
'
Me.TabPage3.Controls.Add(Me.Label2)
Me.TabPage3.Controls.Add(Me.GroupBox1)
Me.TabPage3.Controls.Add(Me.CheckBox1)
Me.TabPage3.Controls.Add(Me.Button4)
Me.TabPage3.Location = New System.Drawing.Point(4, 22)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Size = New System.Drawing.Size(776, 511)
Me.TabPage3.TabIndex = 2
Me.TabPage3.Text = "TabPage3"
Me.TabPage3.UseVisualStyleBackColor = True
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.ComboBox1)
Me.GroupBox1.Location = New System.Drawing.Point(434, 48)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(309, 104)
Me.GroupBox1.TabIndex = 3
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "GroupBox1"
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.CheckBox1.Font = New System.Drawing.Font("굴림", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
Me.CheckBox1.Location = New System.Drawing.Point(434, 3)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(94, 16)
Me.CheckBox1.TabIndex = 2
Me.CheckBox1.Text = "CheckBox1"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'ComboBox1
'
Me.ComboBox1.FormattingEnabled = True
Me.ComboBox1.Location = New System.Drawing.Point(6, 35)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(266, 20)
Me.ComboBox1.TabIndex = 1
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(3, 3)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(425, 57)
Me.Button4.TabIndex = 0
Me.Button4.Text = "Button4"
Me.Button4.UseVisualStyleBackColor = True
'
'TabPage2
'
Me.TabPage2.Controls.Add(Me.SplitContainer1)
Me.TabPage2.Controls.Add(Me.Button2)
Me.TabPage2.Controls.Add(Me.Label1)
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(776, 535)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "TabPage2"
Me.TabPage2.UseVisualStyleBackColor = True
'
'SplitContainer1
'
Me.SplitContainer1.Location = New System.Drawing.Point(3, 33)
Me.SplitContainer1.Name = "SplitContainer1"
'
'SplitContainer1.Panel1
'
Me.SplitContainer1.Panel1.Controls.Add(Me.TreeView1)
'
'SplitContainer1.Panel2
'
Me.SplitContainer1.Panel2.Controls.Add(Me.Button3)
Me.SplitContainer1.Panel2.Controls.Add(Me.TextBox2)
Me.SplitContainer1.Size = New System.Drawing.Size(770, 499)
Me.SplitContainer1.SplitterDistance = 256
Me.SplitContainer1.TabIndex = 2
'
'TreeView1
'
Me.TreeView1.Dock = System.Windows.Forms.DockStyle.Fill
Me.TreeView1.Location = New System.Drawing.Point(0, 0)
Me.TreeView1.Name = "TreeView1"
Me.TreeView1.Size = New System.Drawing.Size(256, 499)
Me.TreeView1.TabIndex = 0
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(421, 3)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(89, 21)
Me.Button3.TabIndex = 1
Me.Button3.Text = "Button3"
Me.Button3.UseVisualStyleBackColor = True
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(3, 3)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(414, 21)
Me.TextBox2.TabIndex = 0
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(684, 3)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(89, 27)
Me.Button2.TabIndex = 1
Me.Button2.Text = "Button2"
Me.Button2.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Label1.Location = New System.Drawing.Point(3, 3)
Me.Label1.Name = "Label1"
Me.Label1.Padding = New System.Windows.Forms.Padding(5, 0, 5, 0)
Me.Label1.Size = New System.Drawing.Size(677, 27)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Select Package File"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.PictureBox1)
Me.TabPage1.Controls.Add(Me.ListBox1)
Me.TabPage1.Controls.Add(Me.TextBox1)
Me.TabPage1.Controls.Add(Me.Button1)
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(776, 535)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "TabPage1"
Me.TabPage1.UseVisualStyleBackColor = True
'
'ImageList1
'
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(262, 270)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(42, 12)
Me.Label2.TabIndex = 4
Me.Label2.Text = "Label2"
'
'MenuStrip1
'
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AbcdToolStripMenuItem})
Me.MenuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(784, 24)
Me.MenuStrip1.TabIndex = 6
Me.MenuStrip1.Text = "MenuStrip1"
'
'AbcdToolStripMenuItem
'
Me.AbcdToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EfghToolStripMenuItem})
Me.AbcdToolStripMenuItem.Name = "AbcdToolStripMenuItem"
Me.AbcdToolStripMenuItem.Size = New System.Drawing.Size(45, 20)
Me.AbcdToolStripMenuItem.Text = "abcd"
'
'EfghToolStripMenuItem
'
Me.EfghToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.HijklToolStripMenuItem, Me.MnopToolStripMenuItem, Me.QrstToolStripMenuItem})
Me.EfghToolStripMenuItem.Name = "EfghToolStripMenuItem"
Me.EfghToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.EfghToolStripMenuItem.Text = "efgh"
'
'HijklToolStripMenuItem
'
Me.HijklToolStripMenuItem.Name = "HijklToolStripMenuItem"
Me.HijklToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.HijklToolStripMenuItem.Text = "hijkl"
'
'MnopToolStripMenuItem
'
Me.MnopToolStripMenuItem.Name = "MnopToolStripMenuItem"
Me.MnopToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.MnopToolStripMenuItem.Text = "mnop"
'
'QrstToolStripMenuItem
'
Me.QrstToolStripMenuItem.Name = "QrstToolStripMenuItem"
Me.QrstToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.QrstToolStripMenuItem.Text = "qrst"
'
'TestAndEasterEgg
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(784, 561)
Me.Controls.Add(Me.TabControl1)
Me.Controls.Add(Me.MenuStrip1)
Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(800, 600)
Me.MinimumSize = New System.Drawing.Size(800, 600)
Me.Name = "TestAndEasterEgg"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "TestAndEasterEgg"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabControl1.ResumeLayout(False)
Me.TabPage3.ResumeLayout(False)
Me.TabPage3.PerformLayout()
Me.GroupBox1.ResumeLayout(False)
Me.TabPage2.ResumeLayout(False)
Me.SplitContainer1.Panel1.ResumeLayout(False)
Me.SplitContainer1.Panel2.ResumeLayout(False)
Me.SplitContainer1.Panel2.PerformLayout()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer1.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.TabPage1.PerformLayout()
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
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 Button2 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer
Friend WithEvents TreeView1 As System.Windows.Forms.TreeView
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents AbcdToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents EfghToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents HijklToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents MnopToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents QrstToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
End Class
|
willowslaboratory/WLABV3
|
library.willowslab.net/Library_v3/Forms/TestAndEasterEgg.Designer.vb
|
Visual Basic
|
mit
| 16,469
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> Partial Class frmMainHO
#Region "Windows Form Designer generated code "
<System.Diagnostics.DebuggerNonUserCode()> Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
End Sub
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
Public ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents Command3 As System.Windows.Forms.Button
Public WithEvents picInner As System.Windows.Forms.PictureBox
Public WithEvents picOuter As System.Windows.Forms.Panel
Public WithEvents tmrAutoDE As System.Windows.Forms.Timer
Public WithEvents cmdBookIN As System.Windows.Forms.Button
Public WithEvents cmdBookOut As System.Windows.Forms.Button
Public WithEvents cmdUpReport As System.Windows.Forms.Button
Public WithEvents txtPrevOrder As System.Windows.Forms.TextBox
Public WithEvents Command1 As System.Windows.Forms.Button
Public WithEvents cmdExit As System.Windows.Forms.Button
Public WithEvents cmdToday As System.Windows.Forms.Button
Public WithEvents _DTPicker1_0 As DateTimePicker
Public WithEvents _DTPicker1_1 As DateTimePicker
Public WithEvents _lbl_0 As System.Windows.Forms.Label
Public WithEvents Picture1 As System.Windows.Forms.Panel
Public WithEvents Text4 As System.Windows.Forms.TextBox
Public WithEvents Text3 As System.Windows.Forms.TextBox
Public WithEvents Text2 As System.Windows.Forms.TextBox
Public WithEvents _cmdPulsante_5 As System.Windows.Forms.Button
Public WithEvents cmdClearLock As System.Windows.Forms.Button
Public WithEvents cmdClose As System.Windows.Forms.Button
Public WithEvents Command2 As System.Windows.Forms.Button
Public WithEvents cmdCheckWOrder As System.Windows.Forms.Button
Public WithEvents picButtons As System.Windows.Forms.Panel
Public WithEvents Text1 As System.Windows.Forms.TextBox
Public WithEvents _Label1_1 As System.Windows.Forms.Label
Public WithEvents _Frame1_0 As System.Windows.Forms.GroupBox
Public WithEvents _cmdPulsante_7 As System.Windows.Forms.Button
Public WithEvents _cmdPulsante_6 As System.Windows.Forms.Button
Public WithEvents _Frame1_3 As System.Windows.Forms.GroupBox
Public WithEvents _cmdPulsante_4 As System.Windows.Forms.Button
Public WithEvents _Frame1_2 As System.Windows.Forms.GroupBox
Public WithEvents _cmdPulsante_3 As System.Windows.Forms.Button
Public WithEvents _cmdPulsante_2 As System.Windows.Forms.Button
Public WithEvents _cmdPulsante_1 As System.Windows.Forms.Button
Public WithEvents _cmdPulsante_0 As System.Windows.Forms.Button
Public WithEvents _Frame1_1 As System.Windows.Forms.GroupBox
Public WithEvents lbl8 As System.Windows.Forms.Label
Public WithEvents lbl11 As System.Windows.Forms.Label
Public WithEvents lbl55 As System.Windows.Forms.Label
Public WithEvents lbl5 As System.Windows.Forms.Label
Public WithEvents lbl44 As System.Windows.Forms.Label
Public WithEvents lbl4 As System.Windows.Forms.Label
Public WithEvents lbl33 As System.Windows.Forms.Label
Public WithEvents lbl3 As System.Windows.Forms.Label
Public WithEvents lbl22 As System.Windows.Forms.Label
Public WithEvents lbl2 As System.Windows.Forms.Label
Public WithEvents lbl1 As System.Windows.Forms.Label
Public WithEvents lbl66 As System.Windows.Forms.Label
Public WithEvents lbl6 As System.Windows.Forms.Label
'Public WithEvents DTPicker1 As System.Windows.Forms.DateTimePicker
'Public WithEvents Frame1 As Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray
'Public WithEvents Label1 As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
'Public WithEvents cmdPulsante As Microsoft.VisualBasic.Compatibility.VB6.ButtonArray
'Public WithEvents lbl As Microsoft.VisualBasic.Compatibility.VB6.LabelArray
'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()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMainHO))
Me.components = New System.ComponentModel.Container()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
Me.Command3 = New System.Windows.Forms.Button
Me.picOuter = New System.Windows.Forms.Panel
Me.picInner = New System.Windows.Forms.PictureBox
Me.tmrAutoDE = New System.Windows.Forms.Timer(components)
Me.cmdBookIN = New System.Windows.Forms.Button
Me.cmdBookOut = New System.Windows.Forms.Button
Me.cmdUpReport = New System.Windows.Forms.Button
Me.txtPrevOrder = New System.Windows.Forms.TextBox
Me.Command1 = New System.Windows.Forms.Button
Me.cmdExit = New System.Windows.Forms.Button
Me.Picture1 = New System.Windows.Forms.Panel
Me.cmdToday = New System.Windows.Forms.Button
Me._DTPicker1_0 = New System.Windows.Forms.DateTimePicker
Me._DTPicker1_1 = New System.Windows.Forms.DateTimePicker
Me._lbl_0 = New System.Windows.Forms.Label
Me.Text4 = New System.Windows.Forms.TextBox
Me.Text3 = New System.Windows.Forms.TextBox
Me.Text2 = New System.Windows.Forms.TextBox
Me._cmdPulsante_5 = New System.Windows.Forms.Button
Me.picButtons = New System.Windows.Forms.Panel
Me.cmdClearLock = New System.Windows.Forms.Button
Me.cmdClose = New System.Windows.Forms.Button
Me.Command2 = New System.Windows.Forms.Button
Me.cmdCheckWOrder = New System.Windows.Forms.Button
Me._Frame1_0 = New System.Windows.Forms.GroupBox
Me.Text1 = New System.Windows.Forms.TextBox
Me._Label1_1 = New System.Windows.Forms.Label
Me._Frame1_3 = New System.Windows.Forms.GroupBox
Me._cmdPulsante_7 = New System.Windows.Forms.Button
Me._cmdPulsante_6 = New System.Windows.Forms.Button
Me._Frame1_2 = New System.Windows.Forms.GroupBox
Me._cmdPulsante_4 = New System.Windows.Forms.Button
Me._Frame1_1 = New System.Windows.Forms.GroupBox
Me._cmdPulsante_3 = New System.Windows.Forms.Button
Me._cmdPulsante_2 = New System.Windows.Forms.Button
Me._cmdPulsante_1 = New System.Windows.Forms.Button
Me._cmdPulsante_0 = New System.Windows.Forms.Button
Me.lbl8 = New System.Windows.Forms.Label
Me.lbl11 = New System.Windows.Forms.Label
Me.lbl55 = New System.Windows.Forms.Label
Me.lbl5 = New System.Windows.Forms.Label
Me.lbl44 = New System.Windows.Forms.Label
Me.lbl4 = New System.Windows.Forms.Label
Me.lbl33 = New System.Windows.Forms.Label
Me.lbl3 = New System.Windows.Forms.Label
Me.lbl22 = New System.Windows.Forms.Label
Me.lbl2 = New System.Windows.Forms.Label
Me.lbl1 = New System.Windows.Forms.Label
Me.lbl66 = New System.Windows.Forms.Label
Me.lbl6 = New System.Windows.Forms.Label
'Me.DTPicker1 = New System.Windows.Forms.DateTimePicker
'Me.Frame1 = New Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray(components)
'Me.Label1 = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(components)
'Me.cmdPulsante = New Microsoft.VisualBasic.Compatibility.VB6.ButtonArray(components)
'Me.lbl = New Microsoft.VisualBasic.Compatibility.VB6.LabelArray(components)
Me.picOuter.SuspendLayout()
Me.Picture1.SuspendLayout()
Me.picButtons.SuspendLayout()
Me._Frame1_0.SuspendLayout()
Me._Frame1_3.SuspendLayout()
Me._Frame1_2.SuspendLayout()
Me._Frame1_1.SuspendLayout()
Me.SuspendLayout()
Me.ToolTip1.Active = True
CType(Me._DTPicker1_0, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me._DTPicker1_1, System.ComponentModel.ISupportInitialize).BeginInit()
'CType(Me.DTPicker1, System.ComponentModel.ISupportInitialize).BeginInit()
'CType(Me.Frame1, System.ComponentModel.ISupportInitialize).BeginInit()
'CType(Me.Label1, System.ComponentModel.ISupportInitialize).BeginInit()
'CType(Me.cmdPulsante, System.ComponentModel.ISupportInitialize).BeginInit()
'CType(Me.lbl, System.ComponentModel.ISupportInitialize).BeginInit()
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Text = "4POS HeadOffice Sync Engine"
Me.ClientSize = New System.Drawing.Size(473, 602)
Me.Location = New System.Drawing.Point(3, 29)
Me.ControlBox = False
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.SystemColors.Control
Me.Enabled = True
Me.KeyPreview = False
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ShowInTaskbar = True
Me.HelpButton = False
Me.WindowState = System.Windows.Forms.FormWindowState.Normal
Me.Name = "frmMainHO"
Me.Command3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.Command3.Text = " Prod perfor"
Me.Command3.Size = New System.Drawing.Size(97, 27)
Me.Command3.Location = New System.Drawing.Point(368, 232)
Me.Command3.TabIndex = 48
Me.Command3.Visible = False
Me.Command3.BackColor = System.Drawing.SystemColors.Control
Me.Command3.CausesValidation = True
Me.Command3.Enabled = True
Me.Command3.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command3.Cursor = System.Windows.Forms.Cursors.Default
Me.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command3.TabStop = True
Me.Command3.Name = "Command3"
Me.picOuter.BackColor = System.Drawing.Color.White
Me.picOuter.Size = New System.Drawing.Size(425, 33)
Me.picOuter.Location = New System.Drawing.Point(24, 392)
Me.picOuter.TabIndex = 46
Me.picOuter.Visible = False
Me.picOuter.Dock = System.Windows.Forms.DockStyle.None
Me.picOuter.CausesValidation = True
Me.picOuter.Enabled = True
Me.picOuter.ForeColor = System.Drawing.SystemColors.ControlText
Me.picOuter.Cursor = System.Windows.Forms.Cursors.Default
Me.picOuter.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.picOuter.TabStop = True
Me.picOuter.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.picOuter.Name = "picOuter"
Me.picInner.BackColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.picInner.ForeColor = System.Drawing.SystemColors.WindowText
Me.picInner.Size = New System.Drawing.Size(58, 34)
Me.picInner.Location = New System.Drawing.Point(0, 0)
Me.picInner.TabIndex = 47
Me.picInner.Dock = System.Windows.Forms.DockStyle.None
Me.picInner.CausesValidation = True
Me.picInner.Enabled = True
Me.picInner.Cursor = System.Windows.Forms.Cursors.Default
Me.picInner.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.picInner.TabStop = True
Me.picInner.Visible = True
Me.picInner.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal
Me.picInner.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.picInner.Name = "picInner"
Me.tmrAutoDE.Enabled = False
Me.tmrAutoDE.Interval = 10
Me.cmdBookIN.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdBookIN.Text = "&Book In DB"
Me.cmdBookIN.Size = New System.Drawing.Size(97, 27)
Me.cmdBookIN.Location = New System.Drawing.Point(368, 112)
Me.cmdBookIN.TabIndex = 44
Me.cmdBookIN.BackColor = System.Drawing.SystemColors.Control
Me.cmdBookIN.CausesValidation = True
Me.cmdBookIN.Enabled = True
Me.cmdBookIN.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdBookIN.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdBookIN.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdBookIN.TabStop = True
Me.cmdBookIN.Name = "cmdBookIN"
Me.cmdBookOut.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdBookOut.Text = "&Book Out DB"
Me.cmdBookOut.Size = New System.Drawing.Size(97, 27)
Me.cmdBookOut.Location = New System.Drawing.Point(368, 80)
Me.cmdBookOut.TabIndex = 43
Me.cmdBookOut.BackColor = System.Drawing.SystemColors.Control
Me.cmdBookOut.CausesValidation = True
Me.cmdBookOut.Enabled = True
Me.cmdBookOut.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdBookOut.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdBookOut.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdBookOut.TabStop = True
Me.cmdBookOut.Name = "cmdBookOut"
Me.cmdUpReport.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdUpReport.Text = "&Upload Reports"
Me.cmdUpReport.Size = New System.Drawing.Size(97, 27)
Me.cmdUpReport.Location = New System.Drawing.Point(368, 48)
Me.cmdUpReport.TabIndex = 42
Me.cmdUpReport.BackColor = System.Drawing.SystemColors.Control
Me.cmdUpReport.CausesValidation = True
Me.cmdUpReport.Enabled = True
Me.cmdUpReport.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdUpReport.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdUpReport.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdUpReport.TabStop = True
Me.cmdUpReport.Name = "cmdUpReport"
Me.txtPrevOrder.AutoSize = False
Me.txtPrevOrder.Size = New System.Drawing.Size(129, 25)
Me.txtPrevOrder.Location = New System.Drawing.Point(504, 552)
Me.txtPrevOrder.TabIndex = 41
Me.txtPrevOrder.Text = "response"
Me.txtPrevOrder.Visible = False
Me.txtPrevOrder.AcceptsReturn = True
Me.txtPrevOrder.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.txtPrevOrder.BackColor = System.Drawing.SystemColors.Window
Me.txtPrevOrder.CausesValidation = True
Me.txtPrevOrder.Enabled = True
Me.txtPrevOrder.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtPrevOrder.HideSelection = True
Me.txtPrevOrder.ReadOnly = False
Me.txtPrevOrder.Maxlength = 0
Me.txtPrevOrder.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtPrevOrder.MultiLine = False
Me.txtPrevOrder.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtPrevOrder.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.txtPrevOrder.TabStop = True
Me.txtPrevOrder.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.txtPrevOrder.Name = "txtPrevOrder"
Me.Command1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.Command1.Text = "-"
Me.Command1.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Command1.Size = New System.Drawing.Size(35, 27)
Me.Command1.Location = New System.Drawing.Point(488, 554)
Me.Command1.TabIndex = 40
Me.Command1.BackColor = System.Drawing.SystemColors.Control
Me.Command1.CausesValidation = True
Me.Command1.Enabled = True
Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command1.TabStop = True
Me.Command1.Name = "Command1"
Me.cmdExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdExit.Text = "X"
Me.cmdExit.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.cmdExit.Size = New System.Drawing.Size(35, 27)
Me.cmdExit.Location = New System.Drawing.Point(528, 554)
Me.cmdExit.TabIndex = 39
Me.cmdExit.BackColor = System.Drawing.SystemColors.Control
Me.cmdExit.CausesValidation = True
Me.cmdExit.Enabled = True
Me.cmdExit.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdExit.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdExit.TabStop = True
Me.cmdExit.Name = "cmdExit"
Me.Picture1.Size = New System.Drawing.Size(353, 33)
Me.Picture1.Location = New System.Drawing.Point(8, 40)
Me.Picture1.TabIndex = 34
Me.Picture1.Dock = System.Windows.Forms.DockStyle.None
Me.Picture1.BackColor = System.Drawing.SystemColors.Control
Me.Picture1.CausesValidation = True
Me.Picture1.Enabled = True
Me.Picture1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Picture1.Cursor = System.Windows.Forms.Cursors.Default
Me.Picture1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Picture1.TabStop = True
Me.Picture1.Visible = True
Me.Picture1.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.Picture1.Name = "Picture1"
Me.cmdToday.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdToday.Text = "&1. Goto Yesterday"
Me.cmdToday.Size = New System.Drawing.Size(102, 19)
Me.cmdToday.Location = New System.Drawing.Point(248, 8)
Me.cmdToday.TabIndex = 37
Me.cmdToday.TabStop = False
Me.cmdToday.BackColor = System.Drawing.SystemColors.Control
Me.cmdToday.CausesValidation = True
Me.cmdToday.Enabled = True
Me.cmdToday.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdToday.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdToday.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdToday.Name = "cmdToday"
'_DTPicker1_0.OcxState = CType(resources.GetObject("_DTPicker1_0.OcxState"), System.Windows.Forms.AxHost.State)
Me._DTPicker1_0.Size = New System.Drawing.Size(94, 18)
Me._DTPicker1_0.Location = New System.Drawing.Point(56, 8)
Me._DTPicker1_0.TabIndex = 35
Me._DTPicker1_0.Visible = False
Me._DTPicker1_0.Name = "_DTPicker1_0"
'_DTPicker1_1.OcxState = CType(resources.GetObject("_DTPicker1_1.OcxState"), System.Windows.Forms.AxHost.State)
Me._DTPicker1_1.Size = New System.Drawing.Size(86, 18)
Me._DTPicker1_1.Location = New System.Drawing.Point(160, 8)
Me._DTPicker1_1.TabIndex = 45
Me._DTPicker1_1.Name = "_DTPicker1_1"
Me._lbl_0.Text = "Select Day to Upload Reports"
Me._lbl_0.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me._lbl_0.ForeColor = System.Drawing.Color.Black
Me._lbl_0.Size = New System.Drawing.Size(157, 14)
Me._lbl_0.Location = New System.Drawing.Point(0, 8)
Me._lbl_0.TabIndex = 36
Me._lbl_0.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me._lbl_0.BackColor = System.Drawing.Color.Transparent
Me._lbl_0.Enabled = True
Me._lbl_0.Cursor = System.Windows.Forms.Cursors.Default
Me._lbl_0.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._lbl_0.UseMnemonic = True
Me._lbl_0.Visible = True
Me._lbl_0.AutoSize = True
Me._lbl_0.BorderStyle = System.Windows.Forms.BorderStyle.None
Me._lbl_0.Name = "_lbl_0"
Me.Text4.AutoSize = False
Me.Text4.BackColor = System.Drawing.Color.White
Me.Text4.ForeColor = System.Drawing.Color.Black
Me.Text4.Size = New System.Drawing.Size(249, 41)
Me.Text4.Location = New System.Drawing.Point(480, 176)
Me.Text4.ReadOnly = True
Me.Text4.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.Text4.WordWrap = False
Me.Text4.TabIndex = 32
Me.Text4.Text = "Text1"
Me.Text4.AcceptsReturn = True
Me.Text4.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.Text4.CausesValidation = True
Me.Text4.Enabled = True
Me.Text4.HideSelection = True
Me.Text4.Maxlength = 0
Me.Text4.Cursor = System.Windows.Forms.Cursors.IBeam
Me.Text4.MultiLine = False
Me.Text4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Text4.TabStop = True
Me.Text4.Visible = True
Me.Text4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Text4.Name = "Text4"
Me.Text3.AutoSize = False
Me.Text3.BackColor = System.Drawing.Color.White
Me.Text3.ForeColor = System.Drawing.Color.Black
Me.Text3.Size = New System.Drawing.Size(249, 41)
Me.Text3.Location = New System.Drawing.Point(480, 128)
Me.Text3.ReadOnly = True
Me.Text3.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.Text3.WordWrap = False
Me.Text3.TabIndex = 31
Me.Text3.Text = "Text1"
Me.Text3.AcceptsReturn = True
Me.Text3.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.Text3.CausesValidation = True
Me.Text3.Enabled = True
Me.Text3.HideSelection = True
Me.Text3.Maxlength = 0
Me.Text3.Cursor = System.Windows.Forms.Cursors.IBeam
Me.Text3.MultiLine = False
Me.Text3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Text3.TabStop = True
Me.Text3.Visible = True
Me.Text3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Text3.Name = "Text3"
Me.Text2.AutoSize = False
Me.Text2.BackColor = System.Drawing.Color.White
Me.Text2.ForeColor = System.Drawing.Color.Black
Me.Text2.Size = New System.Drawing.Size(249, 41)
Me.Text2.Location = New System.Drawing.Point(480, 80)
Me.Text2.ReadOnly = True
Me.Text2.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.Text2.WordWrap = False
Me.Text2.TabIndex = 30
Me.Text2.Text = "Text1"
Me.Text2.AcceptsReturn = True
Me.Text2.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.Text2.CausesValidation = True
Me.Text2.Enabled = True
Me.Text2.HideSelection = True
Me.Text2.Maxlength = 0
Me.Text2.Cursor = System.Windows.Forms.Cursors.IBeam
Me.Text2.MultiLine = False
Me.Text2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Text2.TabStop = True
Me.Text2.Visible = True
Me.Text2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Text2.Name = "Text2"
Me._cmdPulsante_5.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_5.Text = "&Log"
Me._cmdPulsante_5.Size = New System.Drawing.Size(97, 57)
Me._cmdPulsante_5.Location = New System.Drawing.Point(616, 216)
Me._cmdPulsante_5.Image = CType(resources.GetObject("_cmdPulsante_5.Image"), System.Drawing.Image)
Me._cmdPulsante_5.TabIndex = 14
Me._cmdPulsante_5.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_5.CausesValidation = True
Me._cmdPulsante_5.Enabled = True
Me._cmdPulsante_5.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_5.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_5.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_5.TabStop = True
Me._cmdPulsante_5.Name = "_cmdPulsante_5"
Me.picButtons.Dock = System.Windows.Forms.DockStyle.Top
Me.picButtons.BackColor = System.Drawing.Color.Blue
Me.picButtons.Size = New System.Drawing.Size(473, 39)
Me.picButtons.Location = New System.Drawing.Point(0, 0)
Me.picButtons.TabIndex = 13
Me.picButtons.TabStop = False
Me.picButtons.CausesValidation = True
Me.picButtons.Enabled = True
Me.picButtons.ForeColor = System.Drawing.SystemColors.ControlText
Me.picButtons.Cursor = System.Windows.Forms.Cursors.Default
Me.picButtons.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.picButtons.Visible = True
Me.picButtons.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.picButtons.Name = "picButtons"
Me.cmdClearLock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdClearLock.Text = "Clear Log"
Me.cmdClearLock.Size = New System.Drawing.Size(73, 29)
Me.cmdClearLock.Location = New System.Drawing.Point(552, 4)
Me.cmdClearLock.TabIndex = 38
Me.cmdClearLock.TabStop = False
Me.cmdClearLock.BackColor = System.Drawing.SystemColors.Control
Me.cmdClearLock.CausesValidation = True
Me.cmdClearLock.Enabled = True
Me.cmdClearLock.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdClearLock.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdClearLock.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdClearLock.Name = "cmdClearLock"
Me.cmdClose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdClose.Text = "E&xit"
Me.cmdClose.Size = New System.Drawing.Size(73, 29)
Me.cmdClose.Location = New System.Drawing.Point(392, 4)
Me.cmdClose.TabIndex = 33
Me.cmdClose.TabStop = False
Me.cmdClose.BackColor = System.Drawing.SystemColors.Control
Me.cmdClose.CausesValidation = True
Me.cmdClose.Enabled = True
Me.cmdClose.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdClose.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdClose.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdClose.Name = "cmdClose"
Me.Command2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.Command2.Text = "&Download Pricing"
Me.Command2.Size = New System.Drawing.Size(97, 27)
Me.Command2.Location = New System.Drawing.Point(112, 4)
Me.Command2.TabIndex = 29
Me.Command2.BackColor = System.Drawing.SystemColors.Control
Me.Command2.CausesValidation = True
Me.Command2.Enabled = True
Me.Command2.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command2.Cursor = System.Windows.Forms.Cursors.Default
Me.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command2.TabStop = True
Me.Command2.Name = "Command2"
Me.cmdCheckWOrder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdCheckWOrder.Text = "&Upload Pricing"
Me.cmdCheckWOrder.Size = New System.Drawing.Size(97, 27)
Me.cmdCheckWOrder.Location = New System.Drawing.Point(8, 4)
Me.cmdCheckWOrder.TabIndex = 28
Me.cmdCheckWOrder.BackColor = System.Drawing.SystemColors.Control
Me.cmdCheckWOrder.CausesValidation = True
Me.cmdCheckWOrder.Enabled = True
Me.cmdCheckWOrder.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdCheckWOrder.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdCheckWOrder.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdCheckWOrder.TabStop = True
Me.cmdCheckWOrder.Name = "cmdCheckWOrder"
Me._Frame1_0.Size = New System.Drawing.Size(457, 313)
Me._Frame1_0.Location = New System.Drawing.Point(8, 280)
Me._Frame1_0.TabIndex = 10
Me._Frame1_0.BackColor = System.Drawing.SystemColors.Control
Me._Frame1_0.Enabled = True
Me._Frame1_0.ForeColor = System.Drawing.SystemColors.ControlText
Me._Frame1_0.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Frame1_0.Visible = True
Me._Frame1_0.Padding = New System.Windows.Forms.Padding(0)
Me._Frame1_0.Name = "_Frame1_0"
Me.Text1.AutoSize = False
Me.Text1.BackColor = System.Drawing.Color.White
Me.Text1.ForeColor = System.Drawing.Color.Black
Me.Text1.Size = New System.Drawing.Size(441, 257)
Me.Text1.Location = New System.Drawing.Point(8, 16)
Me.Text1.ReadOnly = True
Me.Text1.MultiLine = True
Me.Text1.TabIndex = 11
Me.Text1.Text = "Text1"
Me.Text1.AcceptsReturn = True
Me.Text1.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.Text1.CausesValidation = True
Me.Text1.Enabled = True
Me.Text1.HideSelection = True
Me.Text1.Maxlength = 0
Me.Text1.Cursor = System.Windows.Forms.Cursors.IBeam
Me.Text1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Text1.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.Text1.TabStop = True
Me.Text1.Visible = True
Me.Text1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Text1.Name = "Text1"
Me._Label1_1.TextAlign = System.Drawing.ContentAlignment.TopCenter
Me._Label1_1.Text = "File Name"
Me._Label1_1.Size = New System.Drawing.Size(433, 25)
Me._Label1_1.Location = New System.Drawing.Point(8, 280)
Me._Label1_1.TabIndex = 12
Me._Label1_1.BackColor = System.Drawing.SystemColors.Control
Me._Label1_1.Enabled = True
Me._Label1_1.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_1.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_1.UseMnemonic = True
Me._Label1_1.Visible = True
Me._Label1_1.AutoSize = False
Me._Label1_1.BorderStyle = System.Windows.Forms.BorderStyle.None
Me._Label1_1.Name = "_Label1_1"
Me._Frame1_3.Size = New System.Drawing.Size(369, 81)
Me._Frame1_3.Location = New System.Drawing.Point(488, 464)
Me._Frame1_3.TabIndex = 7
Me._Frame1_3.BackColor = System.Drawing.SystemColors.Control
Me._Frame1_3.Enabled = True
Me._Frame1_3.ForeColor = System.Drawing.SystemColors.ControlText
Me._Frame1_3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Frame1_3.Visible = True
Me._Frame1_3.Padding = New System.Windows.Forms.Padding(0)
Me._Frame1_3.Name = "_Frame1_3"
Me._cmdPulsante_7.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_7.Text = "&Download"
Me._cmdPulsante_7.Size = New System.Drawing.Size(145, 57)
Me._cmdPulsante_7.Location = New System.Drawing.Point(208, 16)
Me._cmdPulsante_7.Image = CType(resources.GetObject("_cmdPulsante_7.Image"), System.Drawing.Image)
Me._cmdPulsante_7.TabIndex = 9
Me._cmdPulsante_7.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_7.CausesValidation = True
Me._cmdPulsante_7.Enabled = True
Me._cmdPulsante_7.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_7.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_7.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_7.TabStop = True
Me._cmdPulsante_7.Name = "_cmdPulsante_7"
Me._cmdPulsante_6.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_6.Text = "&Upload"
Me._cmdPulsante_6.Size = New System.Drawing.Size(97, 57)
Me._cmdPulsante_6.Location = New System.Drawing.Point(72, 16)
Me._cmdPulsante_6.Image = CType(resources.GetObject("_cmdPulsante_6.Image"), System.Drawing.Image)
Me._cmdPulsante_6.TabIndex = 8
Me._cmdPulsante_6.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_6.CausesValidation = True
Me._cmdPulsante_6.Enabled = True
Me._cmdPulsante_6.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_6.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_6.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_6.TabStop = True
Me._cmdPulsante_6.Name = "_cmdPulsante_6"
Me._Frame1_2.Text = "Output"
Me._Frame1_2.Size = New System.Drawing.Size(193, 81)
Me._Frame1_2.Location = New System.Drawing.Point(504, 296)
Me._Frame1_2.TabIndex = 5
Me._Frame1_2.BackColor = System.Drawing.SystemColors.Control
Me._Frame1_2.Enabled = True
Me._Frame1_2.ForeColor = System.Drawing.SystemColors.ControlText
Me._Frame1_2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Frame1_2.Visible = True
Me._Frame1_2.Padding = New System.Windows.Forms.Padding(0)
Me._Frame1_2.Name = "_Frame1_2"
Me._cmdPulsante_4.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_4.Text = "&Exit"
Me._cmdPulsante_4.Size = New System.Drawing.Size(177, 57)
Me._cmdPulsante_4.Location = New System.Drawing.Point(8, 16)
Me._cmdPulsante_4.Image = CType(resources.GetObject("_cmdPulsante_4.Image"), System.Drawing.Image)
Me._cmdPulsante_4.TabIndex = 6
Me._cmdPulsante_4.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_4.CausesValidation = True
Me._cmdPulsante_4.Enabled = True
Me._cmdPulsante_4.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_4.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_4.TabStop = True
Me._cmdPulsante_4.Name = "_cmdPulsante_4"
Me._Frame1_1.Size = New System.Drawing.Size(561, 81)
Me._Frame1_1.Location = New System.Drawing.Point(472, 368)
Me._Frame1_1.TabIndex = 0
Me._Frame1_1.BackColor = System.Drawing.SystemColors.Control
Me._Frame1_1.Enabled = True
Me._Frame1_1.ForeColor = System.Drawing.SystemColors.ControlText
Me._Frame1_1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Frame1_1.Visible = True
Me._Frame1_1.Padding = New System.Windows.Forms.Padding(0)
Me._Frame1_1.Name = "_Frame1_1"
Me._cmdPulsante_3.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_3.Text = "&Automatic"
Me._cmdPulsante_3.Size = New System.Drawing.Size(137, 57)
Me._cmdPulsante_3.Location = New System.Drawing.Point(416, 16)
Me._cmdPulsante_3.Image = CType(resources.GetObject("_cmdPulsante_3.Image"), System.Drawing.Image)
Me._cmdPulsante_3.TabIndex = 4
Me._cmdPulsante_3.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_3.CausesValidation = True
Me._cmdPulsante_3.Enabled = True
Me._cmdPulsante_3.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_3.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_3.TabStop = True
Me._cmdPulsante_3.Name = "_cmdPulsante_3"
Me._cmdPulsante_2.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_2.Text = "&Setup"
Me._cmdPulsante_2.Size = New System.Drawing.Size(137, 57)
Me._cmdPulsante_2.Location = New System.Drawing.Point(272, 16)
Me._cmdPulsante_2.Image = CType(resources.GetObject("_cmdPulsante_2.Image"), System.Drawing.Image)
Me._cmdPulsante_2.TabIndex = 3
Me._cmdPulsante_2.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_2.CausesValidation = True
Me._cmdPulsante_2.Enabled = True
Me._cmdPulsante_2.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_2.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_2.TabStop = True
Me._cmdPulsante_2.Name = "_cmdPulsante_2"
Me._cmdPulsante_1.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_1.Text = "&Disconnect"
Me._cmdPulsante_1.Size = New System.Drawing.Size(113, 57)
Me._cmdPulsante_1.Location = New System.Drawing.Point(152, 16)
Me._cmdPulsante_1.Image = CType(resources.GetObject("_cmdPulsante_1.Image"), System.Drawing.Image)
Me._cmdPulsante_1.TabIndex = 2
Me._cmdPulsante_1.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_1.CausesValidation = True
Me._cmdPulsante_1.Enabled = True
Me._cmdPulsante_1.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_1.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_1.TabStop = True
Me._cmdPulsante_1.Name = "_cmdPulsante_1"
Me._cmdPulsante_0.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me._cmdPulsante_0.Text = "&Connect"
Me._cmdPulsante_0.Size = New System.Drawing.Size(137, 57)
Me._cmdPulsante_0.Location = New System.Drawing.Point(8, 16)
Me._cmdPulsante_0.Image = CType(resources.GetObject("_cmdPulsante_0.Image"), System.Drawing.Image)
Me._cmdPulsante_0.TabIndex = 1
Me._cmdPulsante_0.BackColor = System.Drawing.SystemColors.Control
Me._cmdPulsante_0.CausesValidation = True
Me._cmdPulsante_0.Enabled = True
Me._cmdPulsante_0.ForeColor = System.Drawing.SystemColors.ControlText
Me._cmdPulsante_0.Cursor = System.Windows.Forms.Cursors.Default
Me._cmdPulsante_0.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._cmdPulsante_0.TabStop = True
Me._cmdPulsante_0.Name = "_cmdPulsante_0"
Me.lbl8.Text = "server path"
Me.lbl8.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl8.Size = New System.Drawing.Size(64, 14)
Me.lbl8.Location = New System.Drawing.Point(8, 264)
Me.lbl8.TabIndex = 17
Me.lbl8.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl8.BackColor = System.Drawing.Color.Transparent
Me.lbl8.Enabled = True
Me.lbl8.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl8.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl8.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl8.UseMnemonic = True
Me.lbl8.Visible = True
Me.lbl8.AutoSize = True
Me.lbl8.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl8.Name = "lbl8"
Me.lbl11.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl11.Text = "DONE"
Me.lbl11.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl11.ForeColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.lbl11.Size = New System.Drawing.Size(36, 13)
Me.lbl11.Location = New System.Drawing.Point(320, 80)
Me.lbl11.TabIndex = 27
Me.lbl11.BackColor = System.Drawing.Color.Transparent
Me.lbl11.Enabled = True
Me.lbl11.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl11.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl11.UseMnemonic = True
Me.lbl11.Visible = True
Me.lbl11.AutoSize = True
Me.lbl11.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl11.Name = "lbl11"
Me.lbl55.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl55.Text = "DONE"
Me.lbl55.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl55.ForeColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.lbl55.Size = New System.Drawing.Size(36, 13)
Me.lbl55.Location = New System.Drawing.Point(320, 205)
Me.lbl55.TabIndex = 26
Me.lbl55.BackColor = System.Drawing.Color.Transparent
Me.lbl55.Enabled = True
Me.lbl55.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl55.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl55.UseMnemonic = True
Me.lbl55.Visible = True
Me.lbl55.AutoSize = True
Me.lbl55.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl55.Name = "lbl55"
Me.lbl5.Text = "&5. Copying files to 4POS Server"
Me.lbl5.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl5.Size = New System.Drawing.Size(169, 14)
Me.lbl5.Location = New System.Drawing.Point(8, 205)
Me.lbl5.TabIndex = 25
Me.lbl5.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl5.BackColor = System.Drawing.Color.Transparent
Me.lbl5.Enabled = True
Me.lbl5.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl5.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl5.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl5.UseMnemonic = True
Me.lbl5.Visible = True
Me.lbl5.AutoSize = True
Me.lbl5.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl5.Name = "lbl5"
Me.lbl44.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl44.Text = "DONE"
Me.lbl44.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl44.ForeColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.lbl44.Size = New System.Drawing.Size(36, 13)
Me.lbl44.Location = New System.Drawing.Point(320, 173)
Me.lbl44.TabIndex = 24
Me.lbl44.BackColor = System.Drawing.Color.Transparent
Me.lbl44.Enabled = True
Me.lbl44.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl44.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl44.UseMnemonic = True
Me.lbl44.Visible = True
Me.lbl44.AutoSize = True
Me.lbl44.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl44.Name = "lbl44"
Me.lbl4.Text = "&4. Downloading"
Me.lbl4.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl4.Size = New System.Drawing.Size(83, 14)
Me.lbl4.Location = New System.Drawing.Point(8, 173)
Me.lbl4.TabIndex = 23
Me.lbl4.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl4.BackColor = System.Drawing.Color.Transparent
Me.lbl4.Enabled = True
Me.lbl4.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl4.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl4.UseMnemonic = True
Me.lbl4.Visible = True
Me.lbl4.AutoSize = True
Me.lbl4.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl4.Name = "lbl4"
Me.lbl33.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl33.Text = "DONE"
Me.lbl33.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl33.ForeColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.lbl33.Size = New System.Drawing.Size(36, 13)
Me.lbl33.Location = New System.Drawing.Point(320, 141)
Me.lbl33.TabIndex = 22
Me.lbl33.BackColor = System.Drawing.Color.Transparent
Me.lbl33.Enabled = True
Me.lbl33.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl33.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl33.UseMnemonic = True
Me.lbl33.Visible = True
Me.lbl33.AutoSize = True
Me.lbl33.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl33.Name = "lbl33"
Me.lbl3.Text = "&3. Uploading "
Me.lbl3.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl3.Size = New System.Drawing.Size(69, 14)
Me.lbl3.Location = New System.Drawing.Point(8, 141)
Me.lbl3.TabIndex = 21
Me.lbl3.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl3.BackColor = System.Drawing.Color.Transparent
Me.lbl3.Enabled = True
Me.lbl3.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl3.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl3.UseMnemonic = True
Me.lbl3.Visible = True
Me.lbl3.AutoSize = True
Me.lbl3.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl3.Name = "lbl3"
Me.lbl22.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl22.Text = "DONE"
Me.lbl22.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl22.ForeColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.lbl22.Size = New System.Drawing.Size(36, 13)
Me.lbl22.Location = New System.Drawing.Point(320, 109)
Me.lbl22.TabIndex = 20
Me.lbl22.BackColor = System.Drawing.Color.Transparent
Me.lbl22.Enabled = True
Me.lbl22.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl22.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl22.UseMnemonic = True
Me.lbl22.Visible = True
Me.lbl22.AutoSize = True
Me.lbl22.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl22.Name = "lbl22"
Me.lbl2.Text = "&2. Connecting to File transfer engine"
Me.lbl2.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl2.Size = New System.Drawing.Size(200, 14)
Me.lbl2.Location = New System.Drawing.Point(8, 109)
Me.lbl2.TabIndex = 19
Me.lbl2.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl2.BackColor = System.Drawing.Color.Transparent
Me.lbl2.Enabled = True
Me.lbl2.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl2.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl2.UseMnemonic = True
Me.lbl2.Visible = True
Me.lbl2.AutoSize = True
Me.lbl2.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl2.Name = "lbl2"
Me.lbl1.Text = "&1. Checking Internet connection"
Me.lbl1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl1.Size = New System.Drawing.Size(175, 14)
Me.lbl1.Location = New System.Drawing.Point(8, 80)
Me.lbl1.TabIndex = 18
Me.lbl1.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl1.BackColor = System.Drawing.Color.Transparent
Me.lbl1.Enabled = True
Me.lbl1.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl1.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl1.UseMnemonic = True
Me.lbl1.Visible = True
Me.lbl1.AutoSize = True
Me.lbl1.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl1.Name = "lbl1"
Me.lbl66.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl66.Text = "DONE"
Me.lbl66.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl66.ForeColor = System.Drawing.Color.FromARGB(0, 0, 192)
Me.lbl66.Size = New System.Drawing.Size(36, 13)
Me.lbl66.Location = New System.Drawing.Point(320, 232)
Me.lbl66.TabIndex = 16
Me.lbl66.BackColor = System.Drawing.Color.Transparent
Me.lbl66.Enabled = True
Me.lbl66.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl66.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl66.UseMnemonic = True
Me.lbl66.Visible = True
Me.lbl66.AutoSize = True
Me.lbl66.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl66.Name = "lbl66"
Me.lbl6.Text = "&6. Closing Connection"
Me.lbl6.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lbl6.Size = New System.Drawing.Size(120, 14)
Me.lbl6.Location = New System.Drawing.Point(8, 232)
Me.lbl6.TabIndex = 15
Me.lbl6.TextAlign = System.Drawing.ContentAlignment.TopLeft
Me.lbl6.BackColor = System.Drawing.Color.Transparent
Me.lbl6.Enabled = True
Me.lbl6.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl6.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl6.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl6.UseMnemonic = True
Me.lbl6.Visible = True
Me.lbl6.AutoSize = True
Me.lbl6.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl6.Name = "lbl6"
Me.Controls.Add(Command3)
Me.Controls.Add(picOuter)
Me.Controls.Add(cmdBookIN)
Me.Controls.Add(cmdBookOut)
Me.Controls.Add(cmdUpReport)
Me.Controls.Add(txtPrevOrder)
Me.Controls.Add(Command1)
Me.Controls.Add(cmdExit)
Me.Controls.Add(Picture1)
Me.Controls.Add(Text4)
Me.Controls.Add(Text3)
Me.Controls.Add(Text2)
Me.Controls.Add(_cmdPulsante_5)
Me.Controls.Add(picButtons)
Me.Controls.Add(_Frame1_0)
Me.Controls.Add(_Frame1_3)
Me.Controls.Add(_Frame1_2)
Me.Controls.Add(_Frame1_1)
Me.Controls.Add(lbl8)
Me.Controls.Add(lbl11)
Me.Controls.Add(lbl55)
Me.Controls.Add(lbl5)
Me.Controls.Add(lbl44)
Me.Controls.Add(lbl4)
Me.Controls.Add(lbl33)
Me.Controls.Add(lbl3)
Me.Controls.Add(lbl22)
Me.Controls.Add(lbl2)
Me.Controls.Add(lbl1)
Me.Controls.Add(lbl66)
Me.Controls.Add(lbl6)
Me.picOuter.Controls.Add(picInner)
Me.Picture1.Controls.Add(cmdToday)
Me.Picture1.Controls.Add(_DTPicker1_0)
Me.Picture1.Controls.Add(_DTPicker1_1)
Me.Picture1.Controls.Add(_lbl_0)
Me.picButtons.Controls.Add(cmdClearLock)
Me.picButtons.Controls.Add(cmdClose)
Me.picButtons.Controls.Add(Command2)
Me.picButtons.Controls.Add(cmdCheckWOrder)
Me._Frame1_0.Controls.Add(Text1)
Me._Frame1_0.Controls.Add(_Label1_1)
Me._Frame1_3.Controls.Add(_cmdPulsante_7)
Me._Frame1_3.Controls.Add(_cmdPulsante_6)
Me._Frame1_2.Controls.Add(_cmdPulsante_4)
Me._Frame1_1.Controls.Add(_cmdPulsante_3)
Me._Frame1_1.Controls.Add(_cmdPulsante_2)
Me._Frame1_1.Controls.Add(_cmdPulsante_1)
Me._Frame1_1.Controls.Add(_cmdPulsante_0)
'Me.DTPicker1.SetIndex(_DTPicker1_0, CType(0, Short))
'Me.DTPicker1.SetIndex(_DTPicker1_1, CType(1, Short))
'Me.Frame1.SetIndex(_Frame1_0, CType(0, Short))
'Me.Frame1.SetIndex(_Frame1_3, CType(3, Short))
'Me.Frame1.SetIndex(_Frame1_2, CType(2, Short))
'Me.Frame1.SetIndex(_Frame1_1, CType(1, Short))
'Me.Label1.SetIndex(_Label1_1, CType(1, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_5, CType(5, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_7, CType(7, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_6, CType(6, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_4, CType(4, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_3, CType(3, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_2, CType(2, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_1, CType(1, Short))
'Me.cmdPulsante.SetIndex(_cmdPulsante_0, CType(0, Short))
'Me.lbl.SetIndex(_lbl_0, CType(0, Short))
'CType(Me.lbl, System.ComponentModel.ISupportInitialize).EndInit()
'CType(Me.cmdPulsante, System.ComponentModel.ISupportInitialize).EndInit()
'CType(Me.Label1, System.ComponentModel.ISupportInitialize).EndInit()
'CType(Me.Frame1, System.ComponentModel.ISupportInitialize).EndInit()
'CType(Me.DTPicker1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me._DTPicker1_1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me._DTPicker1_0, System.ComponentModel.ISupportInitialize).EndInit()
Me.picOuter.ResumeLayout(False)
Me.Picture1.ResumeLayout(False)
Me.picButtons.ResumeLayout(False)
Me._Frame1_0.ResumeLayout(False)
Me._Frame1_3.ResumeLayout(False)
Me._Frame1_2.ResumeLayout(False)
Me._Frame1_1.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
End Class
|
nodoid/PointOfSale
|
VB/4PosBackOffice.NET/frmMainHO.Designer.vb
|
Visual Basic
|
mit
| 50,021
|
Imports System.IO
Imports System.Drawing.Imaging
Imports SoftLogik.Win.UI
Namespace UI
Public Class RecordForm
'Navigation Events
Public Event NavigationChanged(ByVal sender As System.Object, ByVal e As SPFormNavigateEventArgs)
Public Event RecordBinding(ByVal sender As System.Object, ByVal e As SPFormRecordBindingEventArgs)
Public Event Databound(ByVal sender As System.Object, ByVal e As System.EventArgs)
Public Event RecordChanged(ByVal sender As System.Object, ByVal e As SPFormRecordUpdateEventArgs)
Public Event RecordValidating(ByVal sender As System.Object, ByVal e As SPFormValidatingEventArgs)
#Region "Properties"
Protected _DataSource As DataTable = Nothing
Protected _BindingSettings As SPRecordBindingSettings
Protected _RecordState As SPFormRecordStateManager = New SPFormRecordStateManager()
Protected _LookupForm As LookupForm
Protected _FirstField As Control = Nothing
Protected _NewRecordProc As NewRecordCallback
Public WriteOnly Property LookupForm() As LookupForm
Set(ByVal value As LookupForm)
_LookupForm = value
End Set
End Property
#End Region
#Region "Form Overrides"
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
MyBase.OnLoad(e)
'WindowState = FormWindowState.Maximized
If Not DesignMode Then
Dim dataBindSettings As New SPFormRecordBindingEventArgs()
OnRecordBinding(dataBindSettings)
Me._RecordState.CurrentState = SPFormRecordModes.EditMode 'By Default Form is in Edit Mode
Me._RecordState.BindingData = True
_DataSource = dataBindSettings.DataSource
_BindingSettings = dataBindSettings.BindingSettings
_NewRecordProc = _BindingSettings.NewRecordProc
BindControls(Me.Controls, DetailBinding, _RecordState, AddressOf OnFieldChanged)
MyTabOrderManager = New UI.SPTabOrderManager(Me)
MyTabOrderManager.SetTabOrder(UI.SPTabOrderManager.TabScheme.DownFirst) ' set tab order
End If
End Sub
Protected Overrides Sub OnActivated(ByVal e As System.EventArgs)
MyBase.OnActivated(e)
End Sub
Protected Overrides Sub OnFormClosing(ByVal e As System.Windows.Forms.FormClosingEventArgs)
If _RecordState.CurrentState = SPFormRecordModes.DirtyMode Or _
_RecordState.CurrentState = SPFormRecordModes.InsertMode Then
Dim msgResult As DialogResult = MessageBox.Show("Save Changes made to " & Me.Text & "?", "Save Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
Select Case msgResult
Case Windows.Forms.DialogResult.Yes
OnSaveRecord() 'Save Changes
Case Windows.Forms.DialogResult.No
Case Windows.Forms.DialogResult.Cancel
e.Cancel = True
End Select
End If
MyBase.OnFormClosing(e)
End Sub
Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
MyBase.OnKeyDown(e)
If e.Control Then
Select Case e.KeyCode
Case Keys.N
NewRecord.PerformClick()
Case Keys.S
SaveRecord.PerformClick()
Case Keys.Delete
DeleteRecord.PerformClick()
End Select
End If
If e.KeyCode = Keys.Escape Then
If _RecordState.CurrentState = SPFormRecordModes.DirtyMode Then
UndoRecord.PerformClick()
Else
CloseWindow.PerformClick()
End If
End If
End Sub
#End Region
#Region "Protected Overrides"
Protected Overridable Sub OnRecordBinding(ByVal e As SPFormRecordBindingEventArgs)
RaiseEvent RecordBinding(Me, e) 'let client respond
End Sub
Protected Overridable Sub OnRecordChanged(ByVal e As SPFormRecordUpdateEventArgs)
RaiseEvent RecordChanged(Me, e)
End Sub
#End Region
#Region "Private Methods"
Protected Overridable Sub OnFieldChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
If _RecordState.ShowingData = False Then
If _RecordState.CurrentState = SPFormRecordModes.EditMode AndAlso _
_RecordState.CurrentState <> SPFormRecordModes.DirtyMode AndAlso (Not _RecordState.BindingData) Then
_RecordState.CurrentState = SPFormRecordModes.DirtyMode
UpdateFormCaption()
ToolbarToggleSave(tbrMain, Nothing)
End If
End If
_RecordState.BindingData = False
End Sub
Protected Overridable Sub OnNewRecord()
Try
DetailBinding.AddNew()
DetailBinding.MoveFirst()
Me._RecordState.CurrentState = SPFormRecordModes.InsertMode
ToolbarToggleSave(tbrMain, Nothing)
FirstFieldFocus()
Catch ex As Exception
End Try
End Sub
Protected Overridable Sub OnRefreshRecord()
Try
Me._RecordState.CurrentState = SPFormRecordModes.EditMode
FirstFieldFocus()
Catch ex As Exception
End Try
End Sub
Protected Overridable Sub OnSortRecord()
Try
Me._RecordState.CurrentState = SPFormRecordModes.EditMode
FirstFieldFocus()
Catch ex As Exception
End Try
End Sub
Protected Overridable Sub OnSaveRecord()
Me.Validate()
Try
_RecordState.ShowingData = True
DetailBinding.EndEdit()
_RecordState.ShowingData = False
Catch ex As Exception
Exit Sub
End Try
If DetailBinding.Current IsNot Nothing Then
If Me._RecordState.CurrentState = SPFormRecordModes.InsertMode Then
OnRecordChanged(New SPFormRecordUpdateEventArgs(_RecordState.NewRecordData, SPFormDataStates.[New]))
_RecordState.NewRecordData = Nothing
Else
OnRecordChanged(New SPFormRecordUpdateEventArgs(CType(DetailBinding.Current, DataRowView).Row, SPFormDataStates.Edited))
End If
_RecordState.CurrentState = SPFormRecordModes.EditMode
UpdateFormCaption(True)
End If
End Sub
Protected Overridable Sub OnUndoRecord()
On Error Resume Next
If DetailBinding.Current IsNot Nothing Then
If CType(DetailBinding.Current, DataRowView).IsNew Then
DetailBinding.RemoveCurrent()
Else
DetailBinding.CancelEdit()
End If
End If
_RecordState.CurrentState = SPFormRecordModes.EditMode
UpdateFormCaption(True)
End Sub
Protected Overridable Sub OnDeleteRecord()
Try
If MessageBox.Show("Are you sure you want to Delete '" & CType(DetailBinding.Current, DataRowView).Row(_BindingSettings.DisplayMember).ToString & "' ?", "Delete Record", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
OnRecordChanged(New SPFormRecordUpdateEventArgs(CType(DetailBinding.Current, DataRowView).Row, SPFormDataStates.Deleted))
_RecordState.ShowingData = True
DetailBinding.RemoveCurrent()
_RecordState.ShowingData = False
End If
Catch ex As Exception
End Try
End Sub
Protected Overridable Sub OnSearchRecord()
If _LookupForm IsNot Nothing Then
With _LookupForm
.ShowDialog(Me)
'.SearchResults()
End With
End If
End Sub
Protected Overridable Sub OnCopyRecord()
If DetailBinding.Current IsNot Nothing Then
'_RecordState.ShowingData = True
Dim clonedDataRow As DataRowView = CType(DetailBinding.Current, DataRowView)
Dim newDataRow As DataRowView = CType(DetailBinding.AddNew(), DataRowView)
DuplicateRecord(clonedDataRow, newDataRow)
DetailBinding.ResetBindings(False)
_RecordState.CurrentState = SPFormRecordModes.InsertMode
'_RecordState.ShowingData = False
End If
End Sub
Protected Overridable Sub OnNavigate(ByVal direction As SPRecordNavigateDirections)
Dim lastRecord As DataRow, currentRecord As DataRow
On Error Resume Next
_RecordState.ShowingData = True
lastRecord = CType(DetailBinding.Current, DataRowView).Row
Select Case direction
Case SPRecordNavigateDirections.First
SelectNameInList(0)
Case SPRecordNavigateDirections.Last
SelectNameInList(DetailBinding.Count - 1)
Case SPRecordNavigateDirections.Next
SelectNameInList(DetailBinding.Position + 1)
Case SPRecordNavigateDirections.Previous
SelectNameInList(DetailBinding.Position - 1)
End Select
_RecordState.ShowingData = False
currentRecord = CType(DetailBinding.Current, DataRowView).Row
RaiseEvent NavigationChanged(tbrMain, New SPFormNavigateEventArgs(direction, lastRecord, currentRecord))
End Sub
Protected Overridable Sub OnCloseWindow()
Me.Close()
End Sub
#End Region
#Region "Support Methods"
Protected Overridable Sub UpdateFormCaption(Optional ByVal Clear As Boolean = False)
Dim strText As String = Me.Text
If Not Clear Then
strText &= CStr(IIf(strText.EndsWith("*"), vbNullString, "*"))
Me.Text = strText
Else
Me.Text = strText.Replace("*", vbNullString)
End If
End Sub
Protected Overridable Sub FirstFieldFocus()
Dim lastTabIndex As Integer
Try
Dim firstControl As Control = Me.GetNextControl(Me, True)
If firstControl IsNot Nothing Then
lastTabIndex = firstControl.TabIndex
FindFirstField(firstControl, lastTabIndex)
End If
Catch ex As Exception
Exit Sub
End Try
End Sub
Private Sub FindFirstField(ByRef OuterControl As Control, ByRef lastTabIndex As Integer)
Dim ctl As Control = OuterControl
While Not ctl Is Nothing
If (Not ctl.HasChildren) AndAlso (ctl.CanFocus AndAlso ctl.CanSelect) Then
ctl.Focus()
Exit Sub
Else
ctl = ctl.GetNextControl(ctl, True)
FindFirstField(ctl, lastTabIndex)
End If
End While
End Sub
Private Sub DuplicateRecord(ByVal SourceRow As DataRowView, ByRef TargetRow As DataRowView)
_RecordState.DuplicatingData = True
TargetRow.Row.ItemArray = SourceRow.Row.ItemArray
For Each itm As DataColumn In TargetRow.Row.Table.Columns
If itm.ReadOnly Then
If itm.AutoIncrement Then
TargetRow(itm.ColumnName) = 0
End If
End If
Next
_RecordState.DuplicatingData = False
End Sub
#End Region
#Region "List and Toolbar Events"
Protected Overridable Sub ToolbarOperation(ByVal sender As System.Object, ByVal e As System.EventArgs)
Select Case CType(sender, ToolStripItem).Name
Case MasterToolbarButtonNames.ToolbarNew
OnNewRecord()
Case MasterToolbarButtonNames.ToolbarSave
OnSaveRecord()
Case MasterToolbarButtonNames.ToolbarDelete
OnDeleteRecord()
Case MasterToolbarButtonNames.ToolbarUndo
OnUndoRecord()
Case MasterToolbarButtonNames.ToolbarSearch
OnSearchRecord()
Case MasterToolbarButtonNames.ToolbarCopy
OnCopyRecord()
Case MasterToolbarButtonNames.ToolbarRefresh
OnRefreshRecord()
Case MasterToolbarButtonNames.ToolbarSort
OnSortRecord()
Case MasterToolbarButtonNames.ToolbarFirst
OnNavigate(SPRecordNavigateDirections.First)
Case MasterToolbarButtonNames.ToolbarPrevious
OnNavigate(SPRecordNavigateDirections.Previous)
Case MasterToolbarButtonNames.ToolbarNext
OnNavigate(SPRecordNavigateDirections.Next)
Case MasterToolbarButtonNames.ToolbarLast
OnNavigate(SPRecordNavigateDirections.Last)
Case MasterToolbarButtonNames.ToolbarClose 'Close Window
OnCloseWindow()
End Select
End Sub
Private Sub tbrMain_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles tbrMain.ItemClicked
ToolbarOperation(e.ClickedItem, e)
End Sub
Protected Overridable Sub SelectNameInList(ByVal Index As Integer)
Dim selectedRow As Integer = Index
Dim lastRecord As DataRow = Nothing, currentRecord As DataRow = Nothing
If selectedRow <> -1 Then
_RecordState.ShowingData = True
If DetailBinding.Current IsNot Nothing Then
lastRecord = CType(DetailBinding.Current, DataRowView).Row
End If
DetailBinding.Position = selectedRow
_RecordState.ShowingData = False
If DetailBinding.Current IsNot Nothing Then
currentRecord = CType(DetailBinding.Current, DataRowView).Row
End If
RaiseEvent NavigationChanged(tbrMain, New SPFormNavigateEventArgs(SPRecordNavigateDirections.None, lastRecord, currentRecord))
End If
End Sub
#End Region
Private Sub DetailBinding_BindingComplete(ByVal sender As Object, ByVal e As System.Windows.Forms.BindingCompleteEventArgs) Handles DetailBinding.BindingComplete
Me._RecordState.BindingData = False
End Sub
Private Sub DetailBinding_DataSourceChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailBinding.DataSourceChanged
Me._RecordState.BindingData = True
End Sub
Private Sub DetailBinding_ListChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ListChangedEventArgs) Handles DetailBinding.ListChanged
If e.ListChangedType = System.ComponentModel.ListChangedType.ItemAdded Then
If _NewRecordProc IsNot Nothing AndAlso _RecordState.DuplicatingData = False _
AndAlso _RecordState.ShowingData = False Then
CType(DetailBinding.Item(e.NewIndex), DataRowView).Row.ItemArray = _NewRecordProc.Invoke.Row.ItemArray
_RecordState.NewRecordData = CType(DetailBinding.Item(e.NewIndex), DataRowView).Row
End If
End If
End Sub
End Class
End Namespace
|
okyereadugyamfi/softlogik
|
SPCode/UI/Form/RecordForm.vb
|
Visual Basic
|
mit
| 16,009
|
Option Strict Off
Option Explicit On
Friend Class frmGroupSales
Inherits System.Windows.Forms.Form
Private Sub loadLanguage()
rsLang.filter = "LanguageLayoutLnk_LanguageID=" & 2181 'Group Sales Profitability Order Criteria|Checked
If rsLang.RecordCount Then Me.Text = rsLang.Fields("LanguageLayoutLnk_Description").Value : Me.RightToLeft = rsLang.Fields("LanguageLayoutLnk_RightTL").Value
rsLang.filter = "LanguageLayoutLnk_LanguageID=" & 2182 'Select the Majour Break Group|Checked
If rsLang.RecordCount Then _lbl_0.Text = rsLang.Fields("LanguageLayoutLnk_Description").Value : _lbl_0.RightToLeft = rsLang.Fields("LanguageLayoutLnk_RightTL").Value
rsLang.filter = "LanguageLayoutLnk_LanguageID=" & 2183 'Select the Minor Break Group|Checked
If rsLang.RecordCount Then _lbl_1.Text = rsLang.Fields("LanguageLayoutLnk_Description").Value : _lbl_1.RightToLeft = rsLang.Fields("LanguageLayoutLnk_RightTL").Value
rsLang.filter = "LanguageLayoutLnk_LanguageID=" & 1004 'Exit|Checked
If rsLang.RecordCount Then cmdExit.Text = rsLang.Fields("LanguageLayoutLnk_Description").Value : cmdExit.RightToLeft = rsLang.Fields("LanguageLayoutLnk_RightTL").Value
'NOTE: DB Entry 1269 doesn't have ">>" Chars!
rsLang.filter = "LanguageLayoutLnk_LanguageID=" & 1269 'Load Report|Checked
If rsLang.RecordCount Then cmdLoad.Text = rsLang.Fields("LanguageLayoutLnk_Description").Value : cmdLoad.RightToLeft = rsLang.Fields("LanguageLayoutLnk_RightTL").Value
rsHelp.filter = "Help_Section=0 AND Help_Form='" & Me.Name & "'"
'UPGRADE_ISSUE: Form property frmGroupSales.ToolTip1 was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'
If rsHelp.RecordCount Then Me.ToolTip1 = rsHelp.Fields("Help_ContextID").Value
End Sub
Private Sub cmdExit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdExit.Click
Me.Close()
End Sub
Private Sub setup()
Me.cmbMajor.Items.Clear()
cmbMajor.Items.Add("Supplier")
cmbMajor.Items.Add("Pricing Group")
cmbMajor.Items.Add("Stock Group")
cmbMajor.Items.Add("Deposit Type")
cmbMajor.Items.Add("Shrink Type")
cmbMajor.SelectedIndex = 2
Me.cmbMinor.Items.Clear()
cmbMinor.Items.Add("None")
cmbMinor.Items.Add("Supplier")
cmbMinor.Items.Add("Pricing Group")
cmbMinor.Items.Add("Stock Group")
cmbMinor.Items.Add("Deposit Type")
cmbMinor.Items.Add("Shrink Type")
cmbMinor.SelectedIndex = 0
End Sub
Private Sub cmdLoad_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdLoad.Click
Dim rs As ADODB.Recordset
Dim rsMajor As ADODB.Recordset
Dim rsMinor As ADODB.Recordset
Dim majorSQL As String
Dim majorSQLgroup As String
Dim minorSQL As String
Dim minorSQLgroup As String
Dim Report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim sql As String
If LCase(CStr(cmbMajor.SelectedIndex)) = LCase(CStr(cmbMinor.SelectedIndex)) Then
cmbMinor.SelectedIndex = 0
System.Windows.Forms.Application.DoEvents()
End If
Select Case LCase(CStr(cmbMajor.SelectedIndex))
Case "supplier"
majorSQL = "SELECT Supplier.SupplierID AS sectionAkey, Supplier.Supplier_Name AS sectionAname FROM Supplier ORDER BY Supplier.Supplier_Name;"
majorSQLgroup = "aStockItem.StockItem_SupplierID"
Case "pricing group"
majorSQL = "SELECT aPricingGroup.PricingGroupID AS sectionAkey, aPricingGroup.PricingGroup_Name AS sectionAname FROM aPricingGroup;"
majorSQLgroup = "aStockItem.StockItem_PricingGroupID"
Case "stock group"
majorSQL = "SELECT aStockGroup.StockGroupID AS sectionAkey, aStockGroup.StockGroup_Name AS sectionAname FROM aStockGroup;"
majorSQLgroup = "aStockItem.StockItem_StockGroupID"
Case "deposit type"
majorSQL = "SELECT aDeposit.DepositID AS sectionAkey, aDeposit.Deposit_Name AS sectionAname FROM aDeposit;"
majorSQLgroup = "aStockItem.StockItem_DepositID"
Case "shrink type"
majorSQL = "SELECT aShrink.ShrinkID AS sectionAkey, aShrink.Shrink_Name AS sectionAname FROM aShrink;"
majorSQLgroup = "aStockItem.StockItem_ShrinkID"
End Select
Select Case LCase(CStr(cmbMinor.SelectedIndex))
Case "supplier"
minorSQL = "SELECT Supplier.SupplierID AS sectionAkey, Supplier.Supplier_Name AS sectionAname FROM Supplier;"
minorSQLgroup = "aStockItem.StockItem_SupplierID"
Case "pricing group"
minorSQL = "SELECT aPricingGroup.PricingGroupID AS sectionAkey, aPricingGroup.PricingGroup_Name AS sectionAname FROM aPricingGroup;"
minorSQLgroup = "aStockItem.StockItem_PricingGroupID"
Case "stock group"
minorSQL = "SELECT aStockGroup.StockGroupID AS sectionAkey, aStockGroup.StockGroup_Name AS sectionAname FROM aStockGroup;"
minorSQLgroup = "aStockItem.StockItem_StockGroupID"
Case "deposit type"
minorSQL = "SELECT aDeposit.DepositID AS sectionAkey, aDeposit.Deposit_Name AS sectionAname FROM aDeposit;"
minorSQLgroup = "aStockItem.StockItem_DepositID"
Case "shrink type"
minorSQL = "SELECT aShrink.ShrinkID AS sectionAkey, aShrink.Shrink_Name AS sectionAname FROM aShrink;"
minorSQLgroup = "aStockItem.StockItem_ShrinkID"
End Select
If minorSQL = "" Then
Report.Load("cryGroupSalesMajor.rpt")
sql = "SELECT " & majorSQLgroup & " AS sectionB, Sum(StockList.inclusiveSum) AS inclusive, Sum(StockList.exclusiveSum) AS exclusive, Sum([exclusiveSum]-[depositSum]) AS price, Sum([exclusiveSum]-[depositSum]) AS content, Sum([exclusiveSum]-[depositSum]-[listCostSum]) AS listProfit, Sum([exclusiveSum]-[depositSum]-[actualCostSum]) AS actualProfit, Sum(StockList.quantitySum) AS quantity, Sum(StockList.listCostSum) AS listCost, Sum(StockList.actualCostSum) AS actualCost FROM StockList INNER JOIN "
sql = sql & "aStockItem ON StockList.SaleItem_StockItemID = aStockItem.StockItemID GROUP BY " & majorSQLgroup & ";"
Else
Report.Load("cryGroupSalesMinor.rpt")
sql = "SELECT " & majorSQLgroup & " AS sectionA, " & minorSQLgroup & " AS sectionB, Sum(StockList.inclusiveSum) AS inclusive, Sum(StockList.exclusiveSum) AS exclusive, Sum([exclusiveSum]-[depositSum]) AS price, Sum([exclusiveSum]-[depositSum]) AS content, Sum([exclusiveSum]-[depositSum]-[listCostSum]) AS listProfit, Sum([exclusiveSum]-[depositSum]-[actualCostSum]) AS actualProfit, Sum(StockList.quantitySum) AS quantity, Sum(StockList.listCostSum) AS listCost, Sum(StockList.actualCostSum) AS actualCost FROM StockList INNER JOIN "
sql = sql & "aStockItem ON StockList.SaleItem_StockItemID = aStockItem.StockItemID GROUP BY " & majorSQLgroup & ", " & minorSQLgroup & ";"
End If
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
rs = getRSreport("SELECT Report.Report_Heading, aCompany.Company_Name FROM aCompany, Report;")
Report.SetParameterValue("txtCompanyName", rs.Fields("Company_Name"))
Report.SetParameterValue("txtDayEnd", rs.Fields("Report_Heading"))
rs.Close()
rs = getRSreport(sql)
'ReportNone.Load("cryNoRecords.rpt")
Dim ReportNone As New CrystalDecisions.CrystalReports.Engine.ReportDocument
ReportNone.Load("cryNoRecords.rpt")
If rs.BOF Or rs.EOF Then
ReportNone.SetParameterValue("txtCompanyName", Report.ParameterFields("txtCompanyName").ToString)
ReportNone.SetParameterValue("txtTitle", Report.ParameterFields("txtTitle").ToString)
frmReportShow.Text = ReportNone.ParameterFields("txtTitle").ToString
frmReportShow.CRViewer1.ReportSource = ReportNone
frmReportShow.mReport = ReportNone : frmReportShow.sMode = "0"
frmReportShow.CRViewer1.Refresh()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
frmReportShow.ShowDialog()
Exit Sub
End If
If minorSQL = "" Then
rsMajor = getRSreport(majorSQL)
Report.Database.Tables(1).SetDataSource(rs)
Report.Database.Tables(2).SetDataSource(rsMajor)
Report.SetParameterValue("txtTitle", "Group Sales Profit Summary by " & CStr(cmbMajor.SelectedIndex))
Else
rsMajor = getRSreport(majorSQL)
Report.Database.Tables(1).SetDataSource(rsMajor)
Report.Database.Tables(2).SetDataSource(rs)
rsMinor = getRSreport(minorSQL)
Report.Database.Tables(3).SetDataSource(rsMinor)
Report.SetParameterValue("txtTitle", "Group Sales Profit Summary by " & CStr(cmbMajor.SelectedIndex) & " by " & GetItemString(cmbMinor, cmbMinor.SelectedIndex))
End If
'Report.VerifyOnEveryPrint = True
frmReportShow.Text = Report.ParameterFields("txtTitle").ToString
frmReportShow.CRViewer1.ReportSource = Report
frmReportShow.mReport = Report : frmReportShow.sMode = "0"
frmReportShow.CRViewer1.Refresh()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
frmReportShow.ShowDialog()
End Sub
Private Sub frmGroupSales_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
If KeyAscii = 27 Then
KeyAscii = 0
Me.Close()
End If
eventArgs.KeyChar = Chr(KeyAscii)
If KeyAscii = 0 Then
eventArgs.Handled = True
End If
End Sub
Private Sub frmGroupSales_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
loadLanguage()
setup()
End Sub
End Class
|
nodoid/PointOfSale
|
VB/4PosBackOffice.NET/frmGroupSales.vb
|
Visual Basic
|
mit
| 10,025
|
Public Class Labyrinth
#Region "Template Code"
Public rolldownsize As Integer
Public oldbordersize As Integer
Public oldtitlebarheight As Integer
Public justopened As Boolean = False
Public needtorollback As Boolean = False
Public minimumsizewidth As Integer = 100 'replace with minimum size
Public minimumsizeheight As Integer = 100 'replace with minimum size
Private Sub Template_Load(sender As Object, e As EventArgs) Handles MyBase.Load
justopened = True
Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
setupall()
setuplevels(0, True)
If ShiftOSDesktop.LabyrinthCorrupted Then Me.Close() : infobox.showinfo("The Plague.", Me.Name & "has been corrupted by The Plague.")
ShiftOSDesktop.pnlpanelbuttonmaze.SendToBack() 'CHANGE NAME
ShiftOSDesktop.setuppanelbuttons()
ShiftOSDesktop.setpanelbuttonappearnce(ShiftOSDesktop.pnlpanelbuttonmaze, ShiftOSDesktop.tbmazeicon, ShiftOSDesktop.tbmazetext, True) 'modify to proper name
ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen + 1
End Sub
Public Sub setupall()
setuptitlebar()
setupborders()
setskin()
End Sub
Private Sub ShiftOSDesktop_keydown(sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
'Make terminal appear
If e.KeyCode = Keys.T AndAlso e.Control Then
Terminal.Show()
Terminal.Visible = True
Terminal.BringToFront()
End If
'Movable Windows
If ShiftOSDesktop.boughtmovablewindows = True Then
If e.KeyCode = Keys.A AndAlso e.Control Then
e.Handled = True
Me.Location = New Point(Me.Location.X - ShiftOSDesktop.movablewindownumber, Me.Location.Y)
End If
If e.KeyCode = Keys.D AndAlso e.Control Then
e.Handled = True
Me.Location = New Point(Me.Location.X + ShiftOSDesktop.movablewindownumber, Me.Location.Y)
End If
If e.KeyCode = Keys.W AndAlso e.Control Then
e.Handled = True
Me.Location = New Point(Me.Location.X, Me.Location.Y - ShiftOSDesktop.movablewindownumber)
End If
If e.KeyCode = Keys.S AndAlso e.Control Then
e.Handled = True
Me.Location = New Point(Me.Location.X, Me.Location.Y + ShiftOSDesktop.movablewindownumber)
End If
ShiftOSDesktop.log = ShiftOSDesktop.log & My.Computer.Clock.LocalTime & " User moved " & Me.Name & " to " & Me.Location.ToString & " with " & e.KeyCode.ToString & Environment.NewLine
End If
End Sub
Private Sub titlebar_MouseDown(sender As Object, e As MouseEventArgs) Handles titlebar.MouseDown, lbtitletext.MouseDown, pnlicon.MouseDown, pgtoplcorner.MouseDown, pgtoprcorner.MouseDown
' Handle Draggable Windows
If ShiftOSDesktop.boughtdraggablewindows = True Then
If e.Button = MouseButtons.Left Then
titlebar.Capture = False
lbtitletext.Capture = False
pnlicon.Capture = False
pgtoplcorner.Capture = False
pgtoprcorner.Capture = False
Const WM_NCLBUTTONDOWN As Integer = &HA1S
Const HTCAPTION As Integer = 2
Dim msg As Message = _
Message.Create(Me.Handle, WM_NCLBUTTONDOWN, _
New IntPtr(HTCAPTION), IntPtr.Zero)
Me.DefWndProc(msg)
End If
ShiftOSDesktop.log = ShiftOSDesktop.log & My.Computer.Clock.LocalTime & " User dragged " & Me.Name & " to " & Me.Location.ToString & Environment.NewLine
End If
End Sub
Public Sub setupborders()
If ShiftOSDesktop.boughtwindowborders = False Then
pgleft.Hide()
pgbottom.Hide()
pgright.Hide()
Me.Size = New Size(Me.Width - pgleft.Width - pgright.Width, Me.Height - pgbottom.Height)
End If
End Sub
Private Sub closebutton_Click(sender As Object, e As EventArgs) Handles closebutton.Click
Me.Close()
End Sub
Private Sub closebutton_MouseEnter(sender As Object, e As EventArgs) Handles closebutton.MouseEnter, closebutton.MouseUp
closebutton.BackgroundImage = Skins.closebtnhover
End Sub
Private Sub closebutton_MouseLeave(sender As Object, e As EventArgs) Handles closebutton.MouseLeave
closebutton.BackgroundImage = Skins.closebtn
End Sub
Private Sub closebutton_MouseDown(sender As Object, e As EventArgs) Handles closebutton.MouseDown
closebutton.BackgroundImage = Skins.closebtnclick
End Sub
Private Sub minimizebutton_Click(sender As Object, e As EventArgs) Handles minimizebutton.Click
ShiftOSDesktop.minimizeprogram(Me, False)
End Sub
'Old skinning system - No idea what this does
''Private Sub titlebar_MouseEnter(sender As Object, e As EventArgs) Handles titlebar.MouseEnter, titlebar.MouseUp, lbtitletext.MouseEnter, pnlicon.MouseEnter, closebutton.MouseEnter, rollupbutton.MouseEnter
'' If ShiftOSDesktop.skinimages(3) = ShiftOSDesktop.skinimages(4) Then Else titlebar.BackgroundImage = ShiftOSDesktop.skintitlebar(1)
''End Sub
'Private Sub titlebar_MouseLeave(sender As Object, e As EventArgs) Handles titlebar.MouseLeave, lbtitletext.MouseLeave, pnlicon.MouseLeave, closebutton.MouseLeave, rollupbutton.MouseLeave
' If ShiftOSDesktop.skinimages(3) = ShiftOSDesktop.skinimages(4) Then Else titlebar.BackgroundImage = ShiftOSDesktop.skintitlebar(0)
'End Sub
Private Sub rollupbutton_Click(sender As Object, e As EventArgs) Handles rollupbutton.Click
rollupanddown()
End Sub
Private Sub rollupbutton_MouseEnter(sender As Object, e As EventArgs) Handles rollupbutton.MouseEnter, rollupbutton.MouseUp
rollupbutton.BackgroundImage = Skins.rollbtnhover
End Sub
Private Sub rollupbutton_MouseLeave(sender As Object, e As EventArgs) Handles rollupbutton.MouseLeave
rollupbutton.BackgroundImage = Skins.rollbtn
End Sub
Private Sub rollupbutton_MouseDown(sender As Object, e As EventArgs) Handles rollupbutton.MouseDown
rollupbutton.BackgroundImage = Skins.rollbtnclick
End Sub
Public Sub setuptitlebar()
setupborders()
If Me.Height = Me.titlebar.Height Then pgleft.Show() : pgbottom.Show() : pgright.Show() : Me.Height = rolldownsize : needtorollback = True
pgleft.Width = Skins.borderwidth
pgright.Width = Skins.borderwidth
pgbottom.Height = Skins.borderwidth
titlebar.Height = Skins.titlebarheight
If justopened = True Then
Me.Size = New Size(500, 300) 'put the default size of your window here
Me.Size = New Size(Me.Width, Me.Height + Skins.titlebarheight - 30)
Me.Size = New Size(Me.Width + Skins.borderwidth + Skins.borderwidth, Me.Height + Skins.borderwidth)
oldbordersize = Skins.borderwidth
oldtitlebarheight = Skins.titlebarheight
justopened = False
Else
If Me.Visible = True Then
'Me.Hide()
Me.Size = New Size(Me.Width - (2 * oldbordersize) + (2 * Skins.borderwidth), (Me.Height - oldtitlebarheight - oldbordersize) + Skins.titlebarheight + Skins.borderwidth)
'Me.Size = New Size(Me.Width - oldbordersize - oldbordersize, Me.Height - oldbordersize) 'Just put a little algebra in the first size setting and comment out the mess
oldbordersize = Skins.borderwidth
oldtitlebarheight = Skins.titlebarheight
'Me.Size = New Size(Me.Width, Me.Height + Skins.titlebarheight - 30)
'Me.Size = New Size(Me.Width + Skins. borderwidth + Skins. borderwidth, Me.Height + Skins. borderwidth)
'rolldownsize = Me.Height
If needtorollback = True Then Me.Height = titlebar.Height : pgleft.Hide() : pgbottom.Hide() : pgright.Hide()
'Me.Show()
End If
End If
If Skins.enablecorners = True Then
pgtoplcorner.Show()
pgtoprcorner.Show()
pgtoprcorner.Width = Skins.titlebarcornerwidth
pgtoplcorner.Width = Skins.titlebarcornerwidth
Else
pgtoplcorner.Hide()
pgtoprcorner.Hide()
End If
If ShiftOSDesktop.boughttitlebar = False Then
titlebar.Hide()
Me.Size = New Size(Me.Width, Me.Size.Height - titlebar.Height)
End If
If ShiftOSDesktop.boughttitletext = False Then
lbtitletext.Hide()
Else
lbtitletext.Font = New Font(Skins.titletextfontfamily, Skins.titletextfontsize, Skins.titletextfontstyle, GraphicsUnit.Point)
lbtitletext.Text = ShiftOSDesktop.mazename 'Remember to change to name of program!!!!
lbtitletext.Show()
End If
If ShiftOSDesktop.boughtclosebutton = False Then
closebutton.Hide()
Else
closebutton.BackColor = Skins.closebtncolour
closebutton.Size = Skins.closebtnsize
closebutton.Show()
End If
If ShiftOSDesktop.boughtrollupbutton = False Then
rollupbutton.Hide()
Else
rollupbutton.BackColor = Skins.rollbtncolour
rollupbutton.Size = Skins.rollbtnsize
rollupbutton.Show()
End If
If ShiftOSDesktop.boughtminimizebutton = False Then
minimizebutton.Hide()
Else
minimizebutton.BackColor = Skins.minbtncolour
minimizebutton.Size = Skins.minbtnsize
minimizebutton.Show()
End If
If ShiftOSDesktop.boughtwindowborders = True Then
closebutton.Location = New Point(titlebar.Size.Width - Skins.closebtnfromside - closebutton.Size.Width, Skins.closebtnfromtop)
rollupbutton.Location = New Point(titlebar.Size.Width - Skins.rollbtnfromside - rollupbutton.Size.Width, Skins.rollbtnfromtop)
minimizebutton.Location = New Point(titlebar.Size.Width - Skins.minbtnfromside - minimizebutton.Size.Width, Skins.minbtnfromtop)
Select Case Skins.titletextpos
Case "Left"
lbtitletext.Location = New Point(Skins.titletextfromside, Skins.titletextfromtop)
Case "Centre"
lbtitletext.Location = New Point((titlebar.Width / 2) - lbtitletext.Width / 2, Skins.titletextfromtop)
End Select
lbtitletext.ForeColor = Skins.titletextcolour
Else
closebutton.Location = New Point(titlebar.Size.Width - Skins.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, Skins.closebtnfromtop)
rollupbutton.Location = New Point(titlebar.Size.Width - Skins.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, Skins.rollbtnfromtop)
minimizebutton.Location = New Point(titlebar.Size.Width - Skins.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, Skins.minbtnfromtop)
Select Case Skins.titletextpos
Case "Left"
lbtitletext.Location = New Point(Skins.titletextfromside + pgtoplcorner.Width, Skins.titletextfromtop)
Case "Centre"
lbtitletext.Location = New Point((titlebar.Width / 2) - lbtitletext.Width / 2, Skins.titletextfromtop)
End Select
lbtitletext.ForeColor = Skins.titletextcolour
End If
'Change when Icon skinning complete
If ShiftOSDesktop.boughtshiftneticon = True Then ' Change to program's icon
pnlicon.Visible = True
pnlicon.Location = New Point(ShiftOSDesktop.titlebariconside, ShiftOSDesktop.titlebaricontop)
pnlicon.Size = New Size(ShiftOSDesktop.titlebariconsize, ShiftOSDesktop.titlebariconsize)
pnlicon.Image = ShiftOSDesktop.mazeicontitlebar 'Replace with the correct icon for the program.
End If
End Sub
Public Sub rollupanddown()
If Me.Height = Me.titlebar.Height Then
pgleft.Show()
pgbottom.Show()
pgright.Show()
Me.Height = rolldownsize
Me.MinimumSize = New Size(minimumsizewidth, minimumsizeheight)
Else
Me.MinimumSize = New Size(0, 0)
pgleft.Hide()
pgbottom.Hide()
pgright.Hide()
rolldownsize = Me.Height
Me.Height = Me.titlebar.Height
End If
End Sub
Public Sub resettitlebar()
If ShiftOSDesktop.boughtwindowborders = True Then
closebutton.Location = New Point(titlebar.Size.Width - Skins.closebtnfromside - closebutton.Size.Width, Skins.closebtnfromtop)
rollupbutton.Location = New Point(titlebar.Size.Width - Skins.rollbtnfromside - rollupbutton.Size.Width, Skins.rollbtnfromtop)
minimizebutton.Location = New Point(titlebar.Size.Width - Skins.minbtnfromside - minimizebutton.Size.Width, Skins.minbtnfromtop)
Select Case Skins.titletextpos
Case "Left"
lbtitletext.Location = New Point(Skins.titletextfromside, Skins.titletextfromtop)
Case "Centre"
lbtitletext.Location = New Point((titlebar.Width / 2) - lbtitletext.Width / 2, Skins.titletextfromtop)
End Select
lbtitletext.ForeColor = Skins.titletextcolour
Else
closebutton.Location = New Point(titlebar.Size.Width - Skins.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, Skins.closebtnfromtop)
rollupbutton.Location = New Point(titlebar.Size.Width - Skins.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, Skins.rollbtnfromtop)
minimizebutton.Location = New Point(titlebar.Size.Width - Skins.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, Skins.minbtnfromtop)
Select Case Skins.titletextpos
Case "Left"
lbtitletext.Location = New Point(Skins.titletextfromside + pgtoplcorner.Width, Skins.titletextfromtop)
Case "Centre"
lbtitletext.Location = New Point((titlebar.Width / 2) - lbtitletext.Width / 2, Skins.titletextfromtop)
End Select
lbtitletext.ForeColor = Skins.titletextcolour
End If
End Sub
Private Sub pullside_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pullside.Tick
Me.Width = Cursor.Position.X - Me.Location.X
resettitlebar()
End Sub
Private Sub pullbottom_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pullbottom.Tick
Me.Height = Cursor.Position.Y - Me.Location.Y
resettitlebar()
End Sub
Private Sub pullbs_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles pullbs.Tick
Me.Width = Cursor.Position.X - Me.Location.X
Me.Height = Cursor.Position.Y - Me.Location.Y
resettitlebar()
End Sub
'delete this for non-resizable windows
Private Sub Rightpull_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pgright.MouseDown
If ShiftOSDesktop.boughtresizablewindows = True Then
pullside.Start()
End If
End Sub
Private Sub RightCursorOn_MouseDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles pgright.MouseEnter
If ShiftOSDesktop.boughtresizablewindows = True Then
Cursor = Cursors.SizeWE
End If
End Sub
Private Sub bottomCursorOn_MouseDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles pgbottom.MouseEnter
If ShiftOSDesktop.boughtresizablewindows = True Then
Cursor = Cursors.SizeNS
End If
End Sub
Private Sub CornerCursorOn_MouseDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles pgbottomrcorner.MouseEnter
If ShiftOSDesktop.boughtresizablewindows = True Then
Cursor = Cursors.SizeNWSE
End If
End Sub
Private Sub SizeCursoroff_MouseDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles pgright.MouseLeave, pgbottom.MouseLeave, pgbottomrcorner.MouseLeave
If ShiftOSDesktop.boughtresizablewindows = True Then
Cursor = Cursors.Default
End If
End Sub
Private Sub rightpull_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pgright.MouseUp
If ShiftOSDesktop.boughtresizablewindows = True Then
pullside.Stop()
End If
End Sub
Private Sub bottompull_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pgbottom.MouseDown
If ShiftOSDesktop.boughtresizablewindows = True Then
pullbottom.Start()
End If
End Sub
Private Sub buttompull_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pgbottom.MouseUp
If ShiftOSDesktop.boughtresizablewindows = True Then
pullbottom.Stop()
End If
End Sub
Private Sub bspull_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pgbottomrcorner.MouseDown
If ShiftOSDesktop.boughtresizablewindows = True Then
pullbs.Start()
End If
End Sub
Private Sub bspull_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pgbottomrcorner.MouseUp
If ShiftOSDesktop.boughtresizablewindows = True Then
pullbs.Stop()
End If
End Sub
Public Sub setskin()
'disposals
closebutton.BackgroundImage = Nothing
titlebar.BackgroundImage = Nothing
rollupbutton.BackgroundImage = Nothing
pgtoplcorner.BackgroundImage = Nothing
pgtoprcorner.BackgroundImage = Nothing
minimizebutton.BackgroundImage = Nothing
'apply new skin
If Skins.closebtn Is Nothing Then closebutton.BackColor = Skins.closebtncolour Else closebutton.BackgroundImage = Skins.closebtn
closebutton.BackgroundImageLayout = Skins.closebtnlayout
If Skins.titlebar Is Nothing Then titlebar.BackColor = Skins.titlebarcolour Else titlebar.BackgroundImage = Skins.titlebar
titlebar.BackgroundImageLayout = Skins.titlebarlayout
If Skins.rollbtn Is Nothing Then rollupbutton.BackColor = Skins.rollbtncolour Else rollupbutton.BackgroundImage = Skins.rollbtn
rollupbutton.BackgroundImageLayout = Skins.rollbtnlayout
If Skins.leftcorner Is Nothing Then pgtoplcorner.BackColor = Skins.leftcornercolour Else pgtoplcorner.BackgroundImage = Skins.leftcorner
pgtoplcorner.BackgroundImageLayout = Skins.leftcornerlayout
If Skins.rightcorner Is Nothing Then pgtoprcorner.BackColor = Skins.rightcornercolour Else pgtoprcorner.BackgroundImage = Skins.rightcorner
pgtoprcorner.BackgroundImageLayout = Skins.rightcornerlayout
If Skins.minbtn Is Nothing Then minimizebutton.BackColor = Skins.minbtncolour Else minimizebutton.BackgroundImage = Skins.minbtn
minimizebutton.BackgroundImageLayout = Skins.minbtnlayout
If Skins.borderleft Is Nothing Then pgleft.BackColor = Skins.borderleftcolour Else pgleft.BackgroundImage = Skins.borderleft
pgleft.BackgroundImageLayout = Skins.borderleftlayout
If Skins.borderright Is Nothing Then pgright.BackColor = Skins.borderrightcolour Else pgright.BackgroundImage = Skins.borderright
pgleft.BackgroundImageLayout = Skins.borderrightlayout
If Skins.borderbottom Is Nothing Then pgbottom.BackColor = Skins.borderbottomcolour Else pgbottom.BackgroundImage = Skins.borderbottom
pgbottom.BackgroundImageLayout = Skins.borderbottomlayout
If enablebordercorners = True Then
If Skins.bottomleftcorner Is Nothing Then pgbottomlcorner.BackColor = Skins.bottomleftcornercolour Else pgbottomlcorner.BackgroundImage = Skins.bottomleftcorner
pgbottomlcorner.BackgroundImageLayout = Skins.bottomleftcornerlayout
If Skins.bottomrightcorner Is Nothing Then pgbottomrcorner.BackColor = Skins.bottomrightcornercolour Else pgbottomrcorner.BackgroundImage = Skins.bottomrightcorner
pgbottomrcorner.BackgroundImageLayout = Skins.bottomrightcornerlayout
Else
pgbottomlcorner.BackColor = Skins.borderrightcolour
pgbottomrcorner.BackColor = Skins.borderrightcolour
pgbottomlcorner.BackgroundImage = Nothing
pgbottomrcorner.BackgroundImage = Nothing
End If
'set bottom border corner size
pgbottomlcorner.Size = New Size(Skins.borderwidth, Skins.borderwidth)
pgbottomrcorner.Size = New Size(Skins.borderwidth, Skins.borderwidth)
pgbottomlcorner.Location = New Point(0, Me.Height - Skins.borderwidth)
pgbottomrcorner.Location = New Point(Me.Width, Me.Height - Skins.borderwidth)
Me.TransparencyKey = ShiftOSDesktop.globaltransparencycolour
End Sub
Private Sub Clock_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen - 1
Me.Hide()
ShiftOSDesktop.setuppanelbuttons()
End Sub
'end of general setup
#End Region
Dim timeleft As Integer
Dim cpearnt As Integer
Dim movex As Integer
Dim movey As Integer
Dim wall(50) As Panel
Dim level As Integer = 1
Private Sub setuplevels(ByVal lvl As Integer, ByVal firstlvl As Boolean)
pnllvl1.Dock = DockStyle.None
pnllvl2.Dock = DockStyle.None
pnllvl3.Dock = DockStyle.None
Select Case lvl
Case 0
cpearnt = 0
level = 0
pnlintro.Dock = DockStyle.Fill
pnlintro.BringToFront()
lbllevel.Text = "Intro"
pnlplayer.Parent = pnlintro
Case 1
If firstlvl = False Then cpearnt = cpearnt + 2
level = 1
pnllvl1.Dock = DockStyle.Fill
pnllvl1.BringToFront()
pnlplayer.Parent = pnllvl1
lbllevel.Text = "Up 'n Down"
Case 2
If firstlvl = False Then cpearnt = cpearnt + 2
level = 2
pnllvl2.Dock = DockStyle.Fill
pnllvl2.BringToFront()
pnlplayer.Parent = pnllvl2
lbllevel.Text = "Mid 'I'"
Case 3
If firstlvl = False Then cpearnt = cpearnt + 2
level = 3
pnllvl3.Dock = DockStyle.Fill
pnllvl3.BringToFront()
pnlplayer.Parent = pnllvl3
lbllevel.Text = "Followin' the Path"
Case 4
If firstlvl = False Then cpearnt = cpearnt + 2
level = 4
pnllvl4.Dock = DockStyle.Fill
pnllvl4.BringToFront()
pnlplayer.Parent = pnllvl4
lbllevel.Text = "BOXES!"
Case 5
If firstlvl = False Then cpearnt = cpearnt + 2
level = 5
pnllvl5.Dock = DockStyle.Fill
pnllvl5.BringToFront()
pnlplayer.Parent = pnllvl5
lbllevel.Text = "Twoway"
End Select
If Not lvl = 0 Then
setupwalls()
pnlplayer.Location = New Point(8, 10)
tmrtimeleft.Start()
tmrgametick.Start()
End If
End Sub
Private Sub randomizelevel(ByVal firstrun As Boolean)
Dim i As Integer = Math.Ceiling(Rnd() * 5)
If i = level Or i = 0 Then
i = Math.Ceiling(Rnd() * 5)
Else
setuplevels(i, firstrun)
End If
End Sub
Private Sub key_press(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.A Then
movex = -2
End If
If e.KeyCode = Keys.D Then
movex = 2
End If
If e.KeyCode = Keys.W Then
movey = -2
End If
If e.KeyCode = Keys.S Then
movey = 2
End If
End Sub
Private Sub key_up(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.A Then
movex = 0
End If
If e.KeyCode = Keys.D Then
movex = 0
End If
If e.KeyCode = Keys.W Then
movey = 0
End If
If e.KeyCode = Keys.S Then
movey = 0
End If
End Sub
Private Sub tmrtimeleft_Tick(sender As Object, e As EventArgs) Handles tmrtimeleft.Tick
If timeleft > 0 Then
timeleft = timeleft - 1
Else
infobox.showinfo("Time Up", "You have run out of time, having completed " & level & " mazes and earnt " & cpearnt & " CP")
setuplevels(0, True)
ShiftOSDesktop.codepoints = +cpearnt
cpearnt = 0
End If
lbltime.Text = timeleft
End Sub
Dim i As Integer = 0
Private Sub tmrgametimer_Tick(sender As Object, e As EventArgs) Handles tmrgametick.Tick
pnlplayer.Location = New Point(pnlplayer.Location.X + movex, pnlplayer.Location.Y + movey)
If Not level = 0 Then
If pnlplayer.Bounds.IntersectsWith(wall(i).Bounds) Then
infobox.showinfo(" Game Over", "You hit a wall, missing out on " & cpearnt & " Code Points")
setuplevels(0, True)
cpearnt = 0
movex = 0
movey = 0
End If
End If
If Not level = 0 Then
If Not pnlplayer.Bounds.IntersectsWith(pnlplayer.Parent.Bounds) Then
infobox.showinfo("Game Over", "No escape, stop being a mazerunner. You just missed out on " & cpearnt & " Code Points")
setuplevels(0, True)
cpearnt = 0
End If
End If
If pnlplayer.Bounds.IntersectsWith(lbllvl1exit.Bounds) Then
randomizelevel(False)
End If
If level = 1 Then
If i <= 9 Then
i = i + 1
Else
i = 0
End If
ElseIf level = 2 Then
If i <= 11 Then
i = i + 1
Else
i = 0
End If
ElseIf level = 3 Then
If i <= 3 Then
i = i + 1
Else
i = 0
End If
ElseIf level = 4 Then
If i <= 7 Then
i = i + 1
Else
i = 0
End If
ElseIf level = 5 Then
If i <= 4 Then
i = i + 1
Else
i = 0
End If
End If
btncashout.Text = "Cashout " & cpearnt & " CP"
End Sub
Private Sub setupwalls()
Select Case level
'Dim j as integer = 0
'For Each ctl As Control In Lvls.Controls
' Dim i as integer = 0
' For Each ctrl As Control In ctl.Controls
' Try
' wallObj(j, i) = ctrl
' Catch ex As Exception
' End Try
' i = i + 1
' Next
'Next
'^^^^^^^^^^ How to code for expandability
Case 1
wall(0) = Panel1
wall(2) = Panel2
wall(3) = Panel3
wall(4) = Panel4
wall(5) = Panel5
wall(6) = Panel6
wall(7) = Panel7
wall(8) = Panel8
wall(9) = Panel9
wall(10) = Panel10
wall(1) = Panel11
Case 2
wall(0) = Panel12
wall(1) = Panel13
wall(2) = Panel14
wall(3) = Panel15
wall(4) = Panel16
wall(5) = Panel17
wall(6) = Panel18
wall(7) = Panel19
wall(8) = Panel20
wall(9) = Panel21
wall(10) = Panel22
wall(11) = Panel23
wall(12) = Panel24
wall(13) = Panel25
Case 3
wall(0) = Panel26
wall(1) = Panel27
wall(2) = Panel28
wall(3) = Panel29
wall(4) = Panel30
wall(5) = Panel31
Case 4
wall(0) = Panel32
wall(1) = Panel33
wall(2) = Panel34
wall(3) = Panel35
wall(4) = Panel36
wall(5) = Panel37
wall(6) = Panel38
wall(7) = Panel39
wall(8) = Panel40
wall(9) = Panel41
Case 5
wall(0) = Panel42
wall(1) = Panel43
wall(2) = Panel44
wall(3) = Panel45
wall(4) = Panel46
wall(5) = Panel47
wall(6) = Panel48
End Select
End Sub
Private Sub btncashout_Click(sender As Object, e As EventArgs) Handles btncashout.Click
ShiftOSDesktop.codepoints = ShiftOSDesktop.codepoints + cpearnt
infobox.showinfo("Cashout Successful", "You have successfully cashed out " & cpearnt & " Code Points")
cpearnt = 0
setuplevels(0, True)
End Sub
Private Sub beginbtn_Click(sender As Object, e As EventArgs) Handles beginbtn.Click
timeleft = 100
randomizelevel(True)
End Sub
End Class
|
TheUltimateHacker/ShiftOS
|
ShiftOS/Labyrinth.vb
|
Visual Basic
|
apache-2.0
| 30,065
|
' 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.RemoveUnnecessaryCast
Imports Microsoft.CodeAnalysis.VisualBasic.Diagnostics.RemoveUnnecessaryCast
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics.RemoveUnnecessaryCast
Partial Public Class RemoveUnnecessaryCastTests
Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, CodeFixProvider)
Return New Tuple(Of DiagnosticAnalyzer, CodeFixProvider)(New VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer(), New RemoveUnnecessaryCastCodeFixProvider())
End Function
<WorkItem(545979)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToErrorType() As Task
Dim markup =
<File>
Module M
Sub Main()
Dim x = [|CType(0, ErrorType)|]
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545148)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestParenthesizeToKeepParseTheSame1() As Task
Dim markup =
<File>
Imports System.Collections
Imports System.Linq
Module Program
Sub Main
Dim a = CType([|CObj(From x In "" Select x)|], IEnumerable)
End Sub
End Module
</File>
Dim expected =
<File>
Imports System.Collections
Imports System.Linq
Module Program
Sub Main
Dim a = CType((From x In "" Select x), IEnumerable)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(530762)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestParenthesizeToKeepParseTheSame2() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim x = 0 < [|CInt(<x/>.GetHashCode)|]
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
Dim x = 0 < (<x/>.GetHashCode)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(530762)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestParenthesizeToKeepParseTheSame3() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim x = 0 < [|CInt(<x/>.GetHashCode)|]
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
Dim x = 0 < (<x/>.GetHashCode)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545149)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestInsertCallKeywordIfNecessary1() As Task
Dim markup =
<File>
Module Program
Sub Main()
[|CInt(1)|].ToString
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
Call 1.ToString
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545150)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestInsertCallKeywordIfNecessary2() As Task
Dim markup =
<File>
Module Program
Sub Main()
[|CStr(Mid())|].GetType
End Sub
Function Mid() As String
End Function
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
[Mid]().GetType
End Sub
Function Mid() As String
End Function
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545229)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInlineTemporary)>
Public Async Function TestInsertCallKeywordIfNecessary3() As Task
Dim code =
<File>
Imports System
Class C1
Sub M()
#If True Then
[|CInt(1)|].ToString()
#End If
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Class C1
Sub M()
#If True Then
Call 1.ToString()
#End If
End Sub
End Class
</File>
Await TestAsync(code, expected)
End Function
<WorkItem(545528)>
<WorkItem(16488, "DevDiv_Projects/Roslyn")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestAddExplicitArgumentListIfNecessary1() As Task
Dim markup =
<File>
Imports System
Module Program
Sub Main()
Dim x As Action = Sub() Console.WriteLine("Hello")
[|CType(x, Action)|] : Console.WriteLine()
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module Program
Sub Main()
Dim x As Action = Sub() Console.WriteLine("Hello")
x() : Console.WriteLine()
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545134)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveConversionFromNullableLongToIComparable() As Task
Dim markup =
<File>
Option Strict On
Class M
Sub Main()
Dim y As System.IComparable(Of Long) = [|CType(1, Long?)|]
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545151)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveArrayLiteralConversion() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim x As Object = [|CType({1}, Long())|]
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545152)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveAddressOfCastToDelegate() As Task
Dim markup =
<File>
Imports System
Module Program
Sub Main()
Dim x As Object = [|CType(AddressOf Console.WriteLine, Action)|]
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545311)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInLambda1() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim f As Func(Of Long) = Function() [|CLng(5)|]
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
Dim f As Func(Of Long) = Function() 5
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545311)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInLambda2() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim f As Func(Of Long) = Function()
Return [|CLng(5)|]
End Function
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
Dim f As Func(Of Long) = Function()
Return 5
End Function
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545311)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInLambda3() As Task
Dim markup =
<File>
Imports System
Module Module1
Sub Main()
Dim lambda As Func(Of Action(Of Integer, Long)) = Function()
Return [|CType(Sub(x As Integer, y As Long)
End Sub, Action(Of Integer, Long))|]
End Function
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module Module1
Sub Main()
Dim lambda As Func(Of Action(Of Integer, Long)) = Function()
Return Sub(x As Integer, y As Long)
End Sub
End Function
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545311)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInFunctionStatement() As Task
Dim markup =
<File>
Module Program
Function M() As Long
Return [|CLng(5)|]
End Function
End Module
</File>
Dim expected =
<File>
Module Program
Function M() As Long
Return 5
End Function
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545311)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInFunctionVariableAssignment() As Task
Dim markup =
<File>
Module Program
Function M() As Long
M = [|CLng(5)|]
End Function
End Module
</File>
Dim expected =
<File>
Module Program
Function M() As Long
M = 5
End Function
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545312)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInBinaryExpression() As Task
Dim markup =
<File>
Module Module1
Sub Main()
Dim m As Integer = 3
Dim n? As Integer = 2
Dim comparer = [|CType(m, Integer?)|] > n
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
Dim m As Integer = 3
Dim n? As Integer = 2
Dim comparer = m > n
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545423)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInsideCaseLabel() As Task
Dim markup =
<File>
Module Module1
Sub Main()
Select Case 5L
Case [|CType(5, Long)|]
End Select
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
Select Case 5L
Case 5
End Select
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545421)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInOptionalParameterValue() As Task
Dim markup =
<File>
Module Program
Function test(Optional ByVal x? As Integer = [|CType(Nothing, Object)|]) As Boolean
Return x.HasValue
End Function
End Module
</File>
Dim expected =
<File>
Module Program
Function test(Optional ByVal x? As Integer = Nothing) As Boolean
Return x.HasValue
End Function
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545579)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInRangeCaseClause1() As Task
Dim markup =
<File>
Module Module1
Sub Main()
Select Case 5L
Case CType(5, Long)
Case [|CType(1, Long)|] To CType(5, Long)
End Select
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
Select Case 5L
Case CType(5, Long)
Case 1 To CType(5, Long)
End Select
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545579)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastInRangeCaseClause2() As Task
Dim markup =
<File>
Module Module1
Sub Main()
Select Case 5L
Case CType(5, Long)
Case CType(1, Long) To [|CType(5, Long)|]
End Select
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
Select Case 5L
Case CType(5, Long)
Case CType(1, Long) To 5
End Select
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545580)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastForLoop1() As Task
Dim markup =
<File>
Module Module1
Sub Main()
For i As Long = [|CLng(0)|] To CLng(4) Step CLng(5)
Next
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
For i As Long = 0 To CLng(4) Step CLng(5)
Next
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545580)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastForLoop2() As Task
Dim markup =
<File>
Module Module1
Sub Main()
For i As Long = CLng(0) To [|CLng(4)|] Step CLng(5)
Next
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
For i As Long = CLng(0) To 4 Step CLng(5)
Next
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545580)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnneededCastForLoop3() As Task
Dim markup =
<File>
Module Module1
Sub Main()
For i As Long = CLng(0) To CLng(4) Step [|CLng(5)|]
Next
End Sub
End Module
</File>
Dim expected =
<File>
Module Module1
Sub Main()
For i As Long = CLng(0) To CLng(4) Step 5
Next
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545599)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNeededCastWithUserDefinedConversionsAndOptionStrictOff() As Task
Dim markup =
<File>
Option Strict Off
Public Class X
Sub Foo()
Dim x As New X()
Dim y As Integer = [|CDbl(x)|]
End Sub
Public Shared Widening Operator CType(ByVal x As X) As Double
End Operator
Public Shared Widening Operator CType(ByVal x As X) As Single?
End Operator
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(529535)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNeededCastWhenResultIsAmbiguous() As Task
Dim markup =
<File>
Option Strict On
Interface IEnumerable(Of Out Tout)
End Interface
Class A : End Class
Class B
Inherits A
End Class
Class ControlList
Implements IEnumerable(Of A)
Implements IEnumerable(Of B)
End Class
Module VarianceExample
Sub Main()
Dim _ctrlList As IEnumerable(Of A) = [|CType(New ControlList, IEnumerable(Of A))|]
End Sub
End Module
</File>
Dim expected =
<File>
Option Strict On
Interface IEnumerable(Of Out Tout)
End Interface
Class A : End Class
Class B
Inherits A
End Class
Class ControlList
Implements IEnumerable(Of A)
Implements IEnumerable(Of B)
End Class
Module VarianceExample
Sub Main()
Dim _ctrlList As IEnumerable(Of A) = New ControlList
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545261)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastToNothingInArrayInitializer() As Task
Dim markup =
<File>
Module Program
Sub Main(args As String())
Dim NothingArray = {([|CType(Nothing, Object)|])}
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main(args As String())
Dim NothingArray = {(Nothing)}
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545526)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastThatResultsInDifferentStringRepresentations() As Task
Dim markup =
<File>
Option Strict Off
Module M
Sub Main()
Foo([|CType(1000000000000000, Double)|]) ' Prints 1E+15
Foo(1000000000000000) ' Prints 1000000000000000
End Sub
Sub Foo(x As String)
Console.WriteLine(x)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545631)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastThatChangesArrayLiteralTypeAndBreaksOverloadResolution() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim a = {[|CLng(Nothing)|]}
Foo(a)
End Sub
Sub Foo(a() As Long)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545456)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastInAttribute() As Task
Dim markup =
<File>
Imports System
Class FooAttribute
Inherits Attribute
Sub New(o As Object)
End Sub
End Class
<Foo([|CObj(1)|])>
Class C
End Class
</File>
Dim expected =
<File>
Imports System
Class FooAttribute
Inherits Attribute
Sub New(o As Object)
End Sub
End Class
<Foo(1)>
Class C
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545701)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestAddParenthesesIfCopyBackAffected1() As Task
Dim markup =
<File>
Module M
Sub Main()
Dim x = 1
Foo([|CInt(x)|])
Console.WriteLine(x)
End Sub
Sub Foo(ByRef x As Integer)
x = 2
End Sub
End Module
</File>
Dim expected =
<File>
Module M
Sub Main()
Dim x = 1
Foo((x))
Console.WriteLine(x)
End Sub
Sub Foo(ByRef x As Integer)
x = 2
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545701)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestAddParenthesesIfCopyBackAffected2() As Task
Dim markup =
<File>
Module M
Private x As Integer = 1
Sub Main()
Foo([|CInt(x)|])
Console.WriteLine(x)
End Sub
Sub Foo(ByRef x As Integer)
x = 2
End Sub
End Module
</File>
Dim expected =
<File>
Module M
Private x As Integer = 1
Sub Main()
Foo((x))
Console.WriteLine(x)
End Sub
Sub Foo(ByRef x As Integer)
x = 2
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545701)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestAddParenthesesIfCopyBackAffected3() As Task
Dim markup =
<File>
Module M
Private Property x As Integer = 1
Sub Main()
Foo([|CInt(x)|])
Console.WriteLine(x)
End Sub
Sub Foo(ByRef x As Integer)
x = 2
End Sub
End Module
</File>
Dim expected =
<File>
Module M
Private Property x As Integer = 1
Sub Main()
Foo((x))
Console.WriteLine(x)
End Sub
Sub Foo(ByRef x As Integer)
x = 2
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastPassedToParamArray1() As Task
Dim markup =
<File>
Module M
Sub Main()
Foo([|CObj(Nothing)|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.Length)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastPassedToParamArray2() As Task
Dim markup =
<File>
Module M
Sub Main()
Foo([|CStr(Nothing)|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.Length)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastPassedToParamArray1() As Task
Dim markup =
<File>
Module M
Sub Main()
Foo([|CObj(New Object)|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.Length)
End Sub
End Module
</File>
Dim expected =
<File>
Module M
Sub Main()
Foo(New Object)
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.Length)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastPassedToParamArray2() As Task
Dim markup =
<File>
Module M
Sub Main()
Foo([|CStr("")|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.Length)
End Sub
End Module
</File>
Dim expected =
<File>
Module M
Sub Main()
Foo("")
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.Length)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastPassedToParamArray3() As Task
Dim markup =
<File>
Imports System
Module M
Sub Main()
Foo([|DirectCast(New Exception, Object)|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module M
Sub Main()
Foo(New Exception)
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastPassedToParamArray4() As Task
Dim markup =
<File>
Imports System
Module M
Sub Main()
Foo([|DirectCast(Nothing, Object())|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module M
Sub Main()
Foo(Nothing)
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545971)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastPassedToParamArray5() As Task
Dim markup =
<File>
Imports System
Module M
Sub Main()
Foo([|DirectCast(Nothing, String())|])
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module M
Sub Main()
Foo(Nothing)
End Sub
Sub Foo(ParamArray x As Object())
Console.WriteLine(x.GetType)
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastToArrayLiteral1() As Task
Dim markup =
<File>
Module M
Sub Main()
Dim i = [|CType({1, 2, 3}, Integer())|]
End Sub
End Module
</File>
Dim expected =
<File>
Module M
Sub Main()
Dim i = {1, 2, 3}
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastToArrayLiteral2() As Task
Dim markup =
<File>
Module Program
Sub Main()
Dim a = {[|CLng(Nothing)|]}
Foo(a)
End Sub
Sub Foo(a() As Long)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastToArrayLiteral() As Task
Dim markup =
<File>
Module M
Sub Main()
Dim i = [|CType({1, 2, 3}, Long())|]
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545972)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastInBinaryIf1() As Task
Dim markup =
<File>
Class Test
Public Shared Sub Main()
Dim a1 As Long = If((0 = 0), [|CType(1, Long)|], CType(2, Long))
End Sub
End Class
</File>
Dim expected =
<File>
Class Test
Public Shared Sub Main()
Dim a1 As Long = If((0 = 0), 1, CType(2, Long))
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545972)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastInBinaryIf2() As Task
Dim markup =
<File>
Class Test
Public Shared Sub Main()
Dim a1 As Long = If((0 = 0), CType(1, Long), [|CType(2, Long)|])
End Sub
End Class
</File>
Dim expected =
<File>
Class Test
Public Shared Sub Main()
Dim a1 As Long = If((0 = 0), CType(1, Long), 2)
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545974)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastInObjectCreationExpression() As Task
Dim markup =
<File>
Imports System
Module M
Sub Main()
Dim t1 As Type = [|CType(New ArgumentException(), Exception)|].GetType()
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module M
Sub Main()
Dim t1 As Type = New ArgumentException().GetType()
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545973)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastInSelectCase() As Task
Dim markup =
<File>
Imports System
Module Module1
Sub Main()
Select Case [|CType(2, Integer)|]
Case 2 To CType(5, Object)
Console.WriteLine("true")
End Select
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module Module1
Sub Main()
Select Case 2
Case 2 To CType(5, Object)
Console.WriteLine("true")
End Select
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545526)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToDoubleInOptionStrictOff() As Task
Dim markup =
<File>
Option Strict Off
Module M
Sub Main()
Foo([|CType(1000000000000000, Double)|]) ' Prints 1E+15
Foo(1000000000000000) ' Prints 1000000000000000
End Sub
Sub Foo(x As String)
Console.WriteLine(x)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545828)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCStrInCharToStringToObjectChain() As Task
Dim markup =
<File>
Imports System
Module Program
Sub Main()
Dim x As Object = [|CStr(" "c)|]
Console.WriteLine(x.GetType())
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545808)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastWithMultipleUserDefinedConversionsAndOptionStrictOff() As Task
Dim markup =
<File>
Option Strict Off
Public Class X
Shared Sub Main()
Dim x As New X()
Dim y As Integer = [|CDbl(x)|]
Console.WriteLine(y)
End Sub
Public Shared Widening Operator CType(ByVal x As X) As Double
Return 1
End Operator
Public Shared Widening Operator CType(ByVal x As X) As Single
Return 2
End Operator
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545998)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastWhichWouldChangeAttributeOverloadResolution() As Task
Dim markup =
<File>
Imports System
<A({[|CLng(0)|]})>
Class A
Inherits Attribute
Sub New(x As Integer())
End Sub
Sub New(x As Long())
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontMoveTrailingComment() As Task
Dim markup =
<File>
Module Program
Sub Main()
With ""
Dim y = [|CInt(1 + 2)|] ' Blah
End With
End Sub
End Module
</File>
Dim expected =
<File>
Module Program
Sub Main()
With ""
Dim y = 1 + 2 ' Blah
End With
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastInFieldInitializer() As Task
Dim markup =
<File>
Imports System.Collections.Generic
Class B
Dim list = [|CObj(GetList())|]
Private Shared Function GetList() As List(Of String)
Return New List(Of String) From {"abc", "def", "ghi"}
End Function
End Class
</File>
Dim expected =
<File>
Imports System.Collections.Generic
Class B
Dim list = GetList()
Private Shared Function GetList() As List(Of String)
Return New List(Of String) From {"abc", "def", "ghi"}
End Function
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontDuplicateTrivia() As Task
Dim markup =
<File>
Imports System
Module M
Sub Main()
[|CType(x(), Action)|] ' Remove redundant cast
End Sub
Function x() As Action
Return Sub() Console.WriteLine(1)
End Function
End Module
</File>
Dim expected =
<File>
Imports System
Module M
Sub Main()
x()() ' Remove redundant cast
End Sub
Function x() As Action
Return Sub() Console.WriteLine(1)
End Function
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(531479)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestEscapeNextStatementIfNeeded() As Task
Dim markup =
<File>
Imports System.Collections.Generic
Imports System.Linq
Module Program
Sub Main()
Dim y = [|CType(From z In "" Distinct, IEnumerable(Of Char))|]
Take()
End Sub
Sub Take()
End Sub
End Module
</File>
Dim expected =
<File>
Imports System.Collections.Generic
Imports System.Linq
Module Program
Sub Main()
Dim y = From z In "" Distinct
[Take]()
End Sub
Sub Take()
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(607749)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestBugfix_607749() As Task
Dim markup =
<File>
Imports System
Interface I
Property A As Action
End Interface
Class C
Implements I
Property A As Action = [|CType(Sub() If True Then, Action)|] Implements I.A
End Class
</File>
Dim expected =
<File>
Imports System
Interface I
Property A As Action
End Interface
Class C
Implements I
Property A As Action = (Sub() If True Then) Implements I.A
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(609477)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestBugfix_609477() As Task
Dim markup =
<File>
Imports System
Module Program
Sub Main()
If True Then : Dim x As Action = [|CType(Sub() If True Then, Action)|] : Else : Return : End If
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module Program
Sub Main()
If True Then : Dim x As Action = (Sub() If True Then) : Else : Return : End If
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(552813)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastWhileNarrowingWithOptionOn() As Task
Dim markup =
<File>
Option Strict On
Module Program
Public Function IsFailFastSuppressed() As Boolean
Dim value = New Object()
Return value IsNot Nothing AndAlso [|DirectCast(value, Boolean)|]
End Function
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(577929)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastWhileDefaultingNullables() As Task
Dim markup =
<File>
Module M
Sub Main()
Dim x? As Date = [|CDate(Nothing)|]
Console.WriteLine(x)
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastAroundAction() As Task
Dim markup =
<File>
Imports System
Module Program
Sub Main()
Dim x As Action = Sub() Console.WriteLine("Hello")
[|CType(x, Action)|] : Console.WriteLine()
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module Program
Sub Main()
Dim x As Action = Sub() Console.WriteLine("Hello")
x() : Console.WriteLine()
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(578016)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCStr() As Task
Dim markup =
<File>Option Strict On
Module M
Sub Main()
Foo()
End Sub
Sub Foo(Optional x As Object = [|CStr|](Chr(1)))
Console.WriteLine(x.GetType())
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(530105)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNumericCast() As Task
Dim markup =
<File>
Interface I
[|Sub Foo(Optional x As Object = CByte(1))|]
End Interface
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(530104)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCTypeFromNumberToEnum() As Task
Dim markup =
<File>
Option Strict On
Interface I
[|Sub Foo(Optional x As DayOfWeek = CType(-1, DayOfWeek))|]
End Interface
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(530077)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastForLambdaToDelegateConversionWithOptionStrictOn() As Task
Dim markup =
<File>
Option Strict On
Imports System
Module Program
Sub Main(args As String())
Dim x = 1
Dim y As Func(Of Integer) = Function()
Return [|CType(x.ToString(), Integer)|]
End Function
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(529966)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveForNarrowingConversionFromObjectWithOptionStrictOnInsideQueryExpression() As Task
Dim markup =
<File>
Option Strict On
Imports System
Imports System.Linq
Module Program
Sub Main(args As String())
Dim o3 As Object = ""hi""
Dim col = {o3, o3}
Dim q3 = From i As String In [|CType(col, String())|]
End Sub
End Module
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(530650)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastFromLambdaToDelegateParenthesizeLambda() As Task
Dim markup =
<File>
Imports System
Module M
Sub Main()
[|CType(Sub() Return, Action)|] : Return
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module M
Sub Main()
Call (Sub() Return) : Return
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(707189)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastFromInvocationStatement() As Task
Dim markup =
<File>
Imports System
Imports System.Collections.Generic
Module Module1
Sub Main()
[|DirectCast(GetEnumerator(), IDisposable).Dispose()|]
End Sub
Function GetEnumerator() As List(Of Integer).Enumerator
Return Nothing
End Function
End Module
</File>
Dim expected =
<File>
Imports System
Imports System.Collections.Generic
Module Module1
Sub Main()
GetEnumerator().Dispose()
End Sub
Function GetEnumerator() As List(Of Integer).Enumerator
Return Nothing
End Function
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(707189)>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastFromInvocationStatement2() As Task
Dim markup =
<File>
Interface I1
Sub Foo()
End Interface
Class M
Implements I1
Shared Sub Main()
[|CType(New M(), I1).Foo()|]
End Sub
Public Sub Foo() Implements I1.Foo
End Sub
End Class
</File>
Dim expected =
<File>
Interface I1
Sub Foo()
End Interface
Class M
Implements I1
Shared Sub Main()
Call New M().Foo()
End Sub
Public Sub Foo() Implements I1.Foo
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(768895)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveUnnecessaryCastInTernary() As Task
Dim markup =
<File>
Class Program
Private Shared Sub Main(args As String())
Dim x As Object = Nothing
Dim y As Integer = If([|CBool(x)|], 1, 0)
End Sub
End Class
</File>
Dim expected =
<File>
Class Program
Private Shared Sub Main(args As String())
Dim x As Object = Nothing
Dim y As Integer = If(x, 1, 0)
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(770187)>
<WpfFact(Skip:="770187"), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastInSelectCaseExpression() As Task
' Cast removal invokes a different user defined operator, hence the cast is necessary.
Dim markup =
<File>
<![CDATA[
Namespace ConsoleApplication23
Class Program
Public Shared Sub Main(args As String())
Dim foo As Integer = 0
Select Case [|CType(0, Short)|]
Case New A
Return
End Select
End Sub
End Class
Class A
Public Shared Operator =(ByVal p1 As Short, ByVal p2 As A) As Boolean
Console.WriteLine("Short =")
Return 0
End Operator
Public Shared Operator <>(ByVal p1 As Short, ByVal p2 As A) As Boolean
Console.WriteLine("Short <>")
Return 0
End Operator
Public Shared Operator =(ByVal p1 As Integer, ByVal p2 As A) As Boolean
Console.WriteLine("Integer =")
Throw New NotImplementedException
End Operator
Public Shared Operator <>(ByVal p1 As Integer, ByVal p2 As A) As Boolean
Console.WriteLine("Integer <>")
Throw New NotImplementedException
End Operator
End Class
End Namespace]]>
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(770187)>
<WpfFact(Skip:="770187"), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastInSelectCaseExpression2() As Task
' Cast removal invokes a different user defined operator, hence the cast is necessary.
Dim markup =
<File>
<![CDATA[
Namespace ConsoleApplication23
Class Program
Public Shared Sub Main(args As String())
Dim foo As Integer = 0
Select Case [|CType(0, Short)|]
Case < New A
Return
End Select
End Sub
End Class
Class A
Public Shared Operator <(ByVal p1 As Short, ByVal p2 As A) As Boolean
Console.WriteLine("Short <")
Return 0
End Operator
Public Shared Operator >(ByVal p1 As Short, ByVal p2 As A) As Boolean
Console.WriteLine("Short >")
Return 0
End Operator
Public Shared Operator <(ByVal p1 As Integer, ByVal p2 As A) As Boolean
Console.WriteLine("Integer <")
Throw New NotImplementedException
End Operator
Public Shared Operator >(ByVal p1 As Integer, ByVal p2 As A) As Boolean
Console.WriteLine("Integer >")
Throw New NotImplementedException
End Operator
End Class
End Namespace]]>
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(770187)>
<WpfFact(Skip:="770187"), Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveNecessaryCastInSelectCaseExpression3() As Task
' Cast removal invokes a different user defined operator, hence the cast is necessary.
Dim markup =
<File>
<![CDATA[
Namespace ConsoleApplication23
Class Program
Public Shared Sub Main(args As String())
Dim foo As Integer = 0
Select Case [|CType(0, Short)|]
Case New A To New A
Return
End Select
End Sub
End Class
Class A
Public Shared Operator <=(ByVal p1 As Short, ByVal p2 As A) As Boolean
Console.WriteLine("Short <=")
Return 0
End Operator
Public Shared Operator >=(ByVal p1 As Short, ByVal p2 As A) As Boolean
Console.WriteLine("Short >=")
Return 0
End Operator
Public Shared Operator <=(ByVal p1 As Integer, ByVal p2 As A) As Boolean
Console.WriteLine("Integer <=")
Throw New NotImplementedException
End Operator
Public Shared Operator >=(ByVal p1 As Integer, ByVal p2 As A) As Boolean
Console.WriteLine("Integer >=")
Throw New NotImplementedException
End Operator
End Class
End Namespace]]>
</File>
Await TestMissingAsync(markup)
End Function
#Region "Interface Casts"
<WorkItem(545889)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToInterfaceForUnsealedType() As Task
Dim markup =
<File>
Imports System
Class X
Implements IDisposable
Private Shared Sub Main()
Dim x As X = New Y()
[|DirectCast(x, IDisposable)|].Dispose()
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
Console.WriteLine("X.Dispose")
End Sub
End Class
Class Y
Inherits X
Implements IDisposable
Private Sub IDisposable_Dispose() Implements IDisposable.Dispose
Console.WriteLine("Y.Dispose")
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545890)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToInterfaceForSealedType1() As Task
' Note: The cast below can be removed because C is sealed and the
' unspecified optional parameters of I.Foo() and C.Foo() have the
' same default values.
Dim markup =
<File>
Imports System
Interface I
Sub Foo(Optional x As Integer = 0)
End Interface
NotInheritable Class C
Implements I
Public Sub Foo(Optional x As Integer = 0) Implements I.Foo
Console.WriteLine(x)
End Sub
Private Shared Sub Main()
[|DirectCast(New C(), I)|].Foo()
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Interface I
Sub Foo(Optional x As Integer = 0)
End Interface
NotInheritable Class C
Implements I
Public Sub Foo(Optional x As Integer = 0) Implements I.Foo
Console.WriteLine(x)
End Sub
Private Shared Sub Main()
Call New C().Foo()
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545890)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToInterfaceForSealedType2() As Task
' Note: The cast below can be removed because C is sealed and the
' interface member has no parameters.
Dim markup =
<File>
Imports System
Interface I
ReadOnly Property Foo() As String
End Interface
NotInheritable Class C
Implements I
Public ReadOnly Property Foo() As String Implements I.Foo
Get
Return "Nikov Rules"
End Get
End Property
Private Shared Sub Main()
Console.WriteLine([|DirectCast(New C(), I)|].Foo)
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Interface I
ReadOnly Property Foo() As String
End Interface
NotInheritable Class C
Implements I
Public ReadOnly Property Foo() As String Implements I.Foo
Get
Return "Nikov Rules"
End Get
End Property
Private Shared Sub Main()
Console.WriteLine(New C().Foo)
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545890)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToInterfaceForSealedType3() As Task
' Note: The cast below can be removed because C is sealed and the
' interface member has no parameters.
Dim markup =
<File>
Imports System
Interface I
ReadOnly Property Foo() As String
End Interface
NotInheritable Class C
Implements I
Public Shared ReadOnly Property Instance() As C
Get
Return New C()
End Get
End Property
Public ReadOnly Property Foo() As String Implements I.Foo
Get
Return "Nikov Rules"
End Get
End Property
Private Shared Sub Main()
Console.WriteLine([|DirectCast(Instance, I)|].Foo)
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Interface I
ReadOnly Property Foo() As String
End Interface
NotInheritable Class C
Implements I
Public Shared ReadOnly Property Instance() As C
Get
Return New C()
End Get
End Property
Public ReadOnly Property Foo() As String Implements I.Foo
Get
Return "Nikov Rules"
End Get
End Property
Private Shared Sub Main()
Console.WriteLine(Instance.Foo)
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545890)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToInterfaceForSealedType4() As Task
' Note: The cast below can't be removed (even though C is sealed)
' because the unspecified optional parameter default values differ.
Dim markup =
<File>
Imports System
Interface I
Sub Foo(Optional x As Integer = 0)
End Interface
NotInheritable Class C
Implements I
Public Sub Foo(Optional x As Integer = 1) Implements I.Foo
Console.WriteLine(x)
End Sub
Private Shared Sub Main()
[|DirectCast(New C(), I)|].Foo()
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545890)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToInterfaceForSealedType5() As Task
' Note: The cast below cannot be removed (even though C is sealed)
' because default values differ for optional parameters and
' hence the method is not considered an implementation.
Dim markup =
<File>
Imports System
Interface I
Sub Foo(Optional x As Integer = 0)
End Interface
NotInheritable Class C
Implements I
Public Sub Foo(Optional x As Integer = 1) Implements I.Foo
Console.WriteLine(x)
End Sub
Private Shared Sub Main()
[|DirectCast(New C(), I)|].Foo(2)
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545888)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToInterfaceForSealedType6() As Task
' Note: The cast below can't be removed (even though C is sealed)
' because the specified named arguments refer to parameters that
' appear at different positions in the member signatures.
Dim markup =
<File>
Imports System
Interface I
Sub Foo(Optional x As Integer = 0, Optional y As Integer = 0)
End Interface
NotInheritable Class C
Implements I
Public Sub Foo(Optional y As Integer = 0, Optional x As Integer = 0) Implements I.Foo
Console.WriteLine(x)
End Sub
Private Shared Sub Main()
[|DirectCast(New C(), I)|].Foo(x:=1)
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545888)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToInterfaceForSealedType7() As Task
' Note: The cast below can be removed as C is sealed and
' because the specified named arguments refer to parameters that
' appear at same positions in the member signatures.
Dim markup =
<File>
Imports System
Interface I
Function Foo(Optional x As Integer = 0, Optional y As Integer = 0) As Integer
End Interface
NotInheritable Class C
Implements I
Public Function Foo(Optional x As Integer = 0, Optional y As Integer = 0) As Integer Implements I.Foo
Return x * 2
End Function
Private Shared Sub Main()
Console.WriteLine([|DirectCast(New C(), I)|].Foo(x:=1))
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Interface I
Function Foo(Optional x As Integer = 0, Optional y As Integer = 0) As Integer
End Interface
NotInheritable Class C
Implements I
Public Function Foo(Optional x As Integer = 0, Optional y As Integer = 0) As Integer Implements I.Foo
Return x * 2
End Function
Private Shared Sub Main()
Console.WriteLine(New C().Foo(x:=1))
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545888)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToInterfaceForSealedType9() As Task
' Note: The cast below can't be removed (even though C is sealed)
' because it would result in binding to a Dispose method that doesn't
' implement IDisposable.Dispose().
Dim markup =
<File>
Imports System
Imports System.IO
NotInheritable Class C
Inherits MemoryStream
Private Shared Sub Main()
Dim s As New C()
[|DirectCast(s, IDisposable)|].Dispose()
End Sub
Public Shadows Sub Dispose()
Console.WriteLine("new Dispose()")
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545887)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToInterfaceForStruct1() As Task
' Note: The cast below can't be removed because the cast boxes 's' and
' unboxing would change program behavior.
Dim markup =
<File>
Imports System
Interface IIncrementable
ReadOnly Property Value() As Integer
Sub Increment()
End Interface
Structure S
Implements IIncrementable
Public Property Value() As Integer Implements IIncrementable.Value
Get
Return m_Value
End Get
Private Set
m_Value = Value
End Set
End Property
Private m_Value As Integer
Public Sub Increment() Implements IIncrementable.Increment
Value += 1
End Sub
Private Shared Sub Main()
Dim s = New S()
[|DirectCast(s, IIncrementable)|].Increment()
Console.WriteLine(s.Value)
End Sub
End Structure
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(545834), WorkItem(530073)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToInterfaceForStruct2() As Task
' Note: The cast below can be removed because we are sure to have
' a fresh copy of the struct from the GetEnumerator() method.
Dim markup =
<File>
Imports System
Imports System.Collections.Generic
Class Program
Private Shared Sub Main()
Call [|DirectCast(GetEnumerator(), IDisposable)|].Dispose()
End Sub
Private Shared Function GetEnumerator() As List(Of Integer).Enumerator
Dim x = New List(Of Integer)() From {1, 2, 3}
Return x.GetEnumerator()
End Function
End Class
</File>
Dim expected =
<File>
Imports System
Imports System.Collections.Generic
Class Program
Private Shared Sub Main()
Call GetEnumerator().Dispose()
End Sub
Private Shared Function GetEnumerator() As List(Of Integer).Enumerator
Dim x = New List(Of Integer)() From {1, 2, 3}
Return x.GetEnumerator()
End Function
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(544655)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToICloneableForDelegate() As Task
' Note: The cast below can be removed because delegates are implicitly sealed.
Dim markup =
<File>
Imports System
Class C
Private Shared Sub Main()
Dim a As Action = Sub()
End Sub
Dim c = [|DirectCast(a, ICloneable)|].Clone()
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Class C
Private Shared Sub Main()
Dim a As Action = Sub()
End Sub
Dim c = a.Clone()
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(545926)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToICloneableForArray() As Task
' Note: The cast below can be removed because arrays are implicitly sealed.
Dim markup =
<File>
Imports System
Class C
Private Shared Sub Main()
Dim a = New Integer() {1, 2, 3}
Dim c = [|DirectCast(a, ICloneable)|].Clone()
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Class C
Private Shared Sub Main()
Dim a = New Integer() {1, 2, 3}
Dim c = a.Clone()
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(529937)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToICloneableForArray2() As Task
' Note: The cast below can be removed because arrays are implicitly sealed.
Dim markup =
<File>
Imports System
Module module1
Sub Main()
Dim c = [|DirectCast({1}, ICloneable)|].Clone
End Sub
End Module
</File>
Dim expected =
<File>
Imports System
Module module1
Sub Main()
Dim c = {1}.Clone
End Sub
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(529897)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastToIConvertibleForEnum() As Task
' Note: The cast below can be removed because enums are implicitly sealed.
Dim markup =
<File>
Imports System
Class Program
Private Shared Sub Main()
Dim e As [Enum] = DayOfWeek.Monday
Dim y = [|DirectCast(e, IConvertible)|].GetTypeCode()
End Sub
End Class
</File>
Dim expected =
<File>
Imports System
Class Program
Private Shared Sub Main()
Dim e As [Enum] = DayOfWeek.Monday
Dim y = e.GetTypeCode()
End Sub
End Class
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(844482)>
<WorkItem(1031406)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDoNotRemoveCastFromDerivedToBaseWithImplicitReference() As Task
' Cast removal changes the runtime behavior of the program.
Dim markup =
<File>
Module Program
Sub Main(args As String())
Dim x As C = new C
Dim y As C = [|DirectCast(x, D)|]
End Sub
End Module
Class C
End Class
Class D
Inherits C
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(995908)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveCastIntroducesDuplicateAnnotations() As Task
Dim markup =
<File>
<![CDATA[
Imports System.Runtime.CompilerServices
Imports N
Interface INamedTypeSymbol
Inherits INamespaceOrTypeSymbol
End Interface
Interface INamespaceOrTypeSymbol
End Interface
Namespace N
Friend Module INamespaceOrTypeSymbolExtensions
<Extension>
Public Sub ExtensionMethod(symbol As INamespaceOrTypeSymbol)
End Sub
End Module
End Namespace
Module Program
Sub Main(args As String())
Dim symbol As INamedTypeSymbol = Nothing
[|DirectCast(symbol, INamespaceOrTypeSymbol).ExtensionMethod()|]
End Sub
End Module
]]>
</File>
Dim expected =
<File>
<![CDATA[
Imports System.Runtime.CompilerServices
Imports N
Interface INamedTypeSymbol
Inherits INamespaceOrTypeSymbol
End Interface
Interface INamespaceOrTypeSymbol
End Interface
Namespace N
Friend Module INamespaceOrTypeSymbolExtensions
<Extension>
Public Sub ExtensionMethod(symbol As INamespaceOrTypeSymbol)
End Sub
End Module
End Namespace
Module Program
Sub Main(args As String())
Dim symbol As INamedTypeSymbol = Nothing
symbol.ExtensionMethod()
End Sub
End Module
]]>
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
#End Region
<WorkItem(739, "#739")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveAroundArrayLiteralInInterpolation1() As Task
Dim markup =
<File>
Module M
Dim x = $"{ [|CObj({})|] }" ' Remove unnecessary cast
End Module
</File>
Dim expected =
<File>
Module M
Dim x = $"{ {} }" ' Remove unnecessary cast
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(739, "#739")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveAroundArrayLiteralInInterpolation2() As Task
Dim markup =
<File>
Module M
Dim x = $"{[|CObj({})|] }" ' Remove unnecessary cast
End Module
</File>
Dim expected =
<File>
Module M
Dim x = $"{({}) }" ' Remove unnecessary cast
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(739, "#739")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestRemoveAroundArrayLiteralInInterpolation3() As Task
Dim markup =
<File>
Module M
Dim x = $"{ [|CObj({})|]}" ' Remove unnecessary cast
End Module
</File>
Dim expected =
<File>
Module M
Dim x = $"{ {}}" ' Remove unnecessary cast
End Module
</File>
Await TestAsync(markup, expected, compareTokens:=False)
End Function
<WorkItem(2761, "https://github.com/dotnet/roslyn/issues/2761")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastFromBaseToDerivedWithNarrowingReference() As Task
Dim markup =
<File>
Module Module1
Private Function NewMethod(base As Base) As Base
Return If([|TryCast(base, Derived1)|], New Derived1())
End Function
End Module
Class Base
End Class
Class Derived1 : Inherits Base
End Class
Class Derived2 : Inherits Base
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(3254, "https://github.com/dotnet/roslyn/issues/3254")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToTypeParameterWithExceptionConstraint() As Task
Dim markup =
<File>
Imports System
Class Program
Private Shared Sub RequiresCondition(Of TException As Exception)(condition As Boolean, messageOnFalseCondition As String)
If Not condition Then
Throw [|DirectCast(Activator.CreateInstance(GetType(TException), messageOnFalseCondition), TException)|]
End If
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(3254, "https://github.com/dotnet/roslyn/issues/3254")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDontRemoveCastToTypeParameterWithExceptionSubTypeConstraint() As Task
Dim markup =
<File>
Imports System
Class Program
Private Shared Sub RequiresCondition(Of TException As ArgumentException)(condition As Boolean, messageOnFalseCondition As String)
If Not condition Then
Throw [|DirectCast(Activator.CreateInstance(GetType(TException), messageOnFalseCondition), TException)|]
End If
End Sub
End Class
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(3163, "https://github.com/dotnet/roslyn/issues/3163")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDoNotRemoveCastInUserDefinedNarrowingConversionStrictOn() As Task
Dim markup =
<File>
Option Strict On
Module Module1
Sub Main()
Dim red = ColorF.FromArgb(255, 255, 0, 0)
Dim c As Color = [|CType(red, Color)|]
End Sub
End Module
Public Structure ColorF
Public A, R, G, B As Single
Public Shared Function FromArgb(a As Double, r As Double, g As Double, b As Double) As ColorF
Return New ColorF With {.A = CSng(a), .R = CSng(r), .G = CSng(g), .B = CSng(b)}
End Function
Public Shared Widening Operator CType(x As Color) As ColorF
Return ColorF.FromArgb(x.A / 255, x.R / 255, x.G / 255, x.B / 255)
End Operator
Public Shared Narrowing Operator CType(x As ColorF) As Color
Return Color.FromArgb(CByte(x.A * 255), CByte(x.R * 255), CByte(x.G * 255), CByte(x.B * 255))
End Operator
End Structure
Public Structure Color
Public A, R, G, B As Byte
Public Shared Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte) As Color
Return New Color With {.A = a, .R = r, .G = g, .B = b}
End Function
End Structure
</File>
Await TestMissingAsync(markup)
End Function
<WorkItem(3163, "https://github.com/dotnet/roslyn/issues/3163")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnnecessaryCast)>
Public Async Function TestDoNotRemoveCastInUserDefinedNarrowingConversionStrictOff() As Task
Dim markup =
<File>
Option Strict Off
Module Module1
Sub Main()
Dim red = ColorF.FromArgb(255, 255, 0, 0)
Dim c As Color = [|CType(red, Color)|]
End Sub
End Module
Public Structure ColorF
Public A, R, G, B As Single
Public Shared Function FromArgb(a As Double, r As Double, g As Double, b As Double) As ColorF
Return New ColorF With {.A = CSng(a), .R = CSng(r), .G = CSng(g), .B = CSng(b)}
End Function
Public Shared Widening Operator CType(x As Color) As ColorF
Return ColorF.FromArgb(x.A / 255, x.R / 255, x.G / 255, x.B / 255)
End Operator
Public Shared Narrowing Operator CType(x As ColorF) As Color
Return Color.FromArgb(CByte(x.A * 255), CByte(x.R * 255), CByte(x.G * 255), CByte(x.B * 255))
End Operator
End Structure
Public Structure Color
Public A, R, G, B As Byte
Public Shared Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte) As Color
Return New Color With {.A = a, .R = r, .G = g, .B = b}
End Function
End Structure
</File>
Await TestMissingAsync(markup)
End Function
End Class
End Namespace
|
HellBrick/roslyn
|
src/EditorFeatures/VisualBasicTest/Diagnostics/RemoveUnnecessaryCast/RemoveUnnecessaryCastTests.vb
|
Visual Basic
|
apache-2.0
| 71,742
|
'********************************************************************************************************
'Filename: mwTaudemBASINSWrapper.vb
'Description: Plugin wrapper for the modified taudem plugin to be used by BASINS
'********************************************************************************************************
'The contents of this file are subject to the Mozilla Public License Version 1.1 (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.mozilla.org/MPL/
'Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
'ANY KIND, either express or implied. See the License for the specificlanguage governing rights and
'limitations under the License.
'
'The Original Code is MapWindow Open Source.
'
'This class implements the MapWindow.Interfaces.Iplugin interface and all of its elements. It defines this
'assembly as a MapWindow plug-in and provides communication between MapWindow and the mwTaudem COM dll in
'order to form a wrapper around the regular TauDEM plugin to provide functionality requested for BASINS
'
'Contributor(s): (Open source contributors should list themselves and their modifications here).
'Last Update: 10/18/05, ARA
'08/23/05 ARA Modified from normal taudem wrapper
'10/18/05 ARA Wrapping up and added mozilla comments
'16/10/09 CWG Modified MapMouseDown section for marking outlets/inlets/reservoirs
'30/1/11 CWG Replaced TKTAUDEMLib.ItkCallback with MapWinGIS.ICallback
' Adapted for Taudem V5
'********************************************************************************************************
Option Explicit On
Imports DotSpatial.Controls.Header
Imports System.IO
Imports System.Reflection
Public Class TaudemPlugin
Inherits Controls.Extension
Private lstDrawPoints As New ArrayList
Public maskShapesIdx As New ArrayList
Public outletShapesIdx As New ArrayList
'For drawing niftiness
Private ReversibleDrawn As New ArrayList
Private LastStartPtX As Integer = -1
Private LastStartPtY As Integer = -1
Private LastEndX As Integer = -1
Private LastEndY As Integer = -1
Private StartPtX As Integer = -1
Private StartPtY As Integer = -1
Private EraseLast As Boolean = False
Private mycolor As New Drawing.Color
'Public Sub ProjectLoading(ByVal ProjectFile As String, ByVal SettingsString As String) Implements MapWindow.Interfaces.IPlugin.ProjectLoading
' 'dpa 4/22/2005 Save the base grid file name to the MW project
' g_BaseDEM = SettingsString
' g_Taudem.SetBASEDEM(g_BaseDEM)
'End Sub
'Public Sub ProjectSaving(ByVal ProjectFile As String, ByRef SettingsString As String) Implements MapWindow.Interfaces.IPlugin.ProjectSaving
' 'dpa 4/22/2005 Save the base grid file name to the MW project
' SettingsString = g_BaseDEM
'End Sub
#Region "Start and Stop Functions"
Public Overrides Sub Activate()
'g_StatusBarItem = App.Map.StatusBar.AddPanel(App.Map.StatusBar.NumPanels - 2)
'g_StatusBarItem.MinWidth = 10
'g_StatusBarItem.AutoSize = True
tdbChoiceList = New tdbChoices_v3
tdbFileList = New tdbFileTypes_v3
tdbChoiceList.SetDefaultTDchoices()
tdbChoiceList.ConfigFileName = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "awd.cfg")
tdbChoiceList.LoadConfig()
App.HeaderControl.Add(New SimpleActionItem("Watershed Delineation", AddressOf AutoWatershedDelineation_Click))
'Dim nil As Object
'nil = Nothing
'With App.Map.Menus
' 'Taudem_BASINS main menu
' .AddMenu("btdmWatershedDelin", nil, "Watershed Delineation")
' .AddMenu("btdmAutomatic", "btdmWatershedDelin", nil, "Automatic")
' .AddMenu("btdmBreak0", "btdmWatershedDelin", nil, "-")
' 'Taudem Advanced Functions
' .AddMenu("btdmTaudem", "btdmWatershedDelin", nil, "Advanced TauDEM Functions")
' .AddMenu("btdmSelectBaseDEM", "btdmTaudem", nil, "Select Base DEM Grid...")
' .AddMenu("btdmDoAllGrid", "btdmTaudem", nil, "Do All DEM Processing")
' .AddMenu("btdmGridSpecific", "btdmTaudem", nil, "DEM Processing Functions")
' .AddMenu("btdmBreak1", "btdmTaudem", nil, "-")
' .AddMenu("btdmOutlets", "btdmTaudem", nil, "Select Outlets Shapefile...")
' .AddMenu("btdmMoveOutlets", "btdmTaudem", nil, "Move Outlets to Streams")
' .AddMenu("btdmDoAllNetwork", "btdmTaudem", nil, "Do All Network and Watershed Steps")
' .AddMenu("btdmNetworkSpecific", "btdmTaudem", nil, "Network and Watershed Processing Functions")
' .AddMenu("btdmBreak2", "btdmTaudem", nil, "-")
' .AddMenu("btdmAncillary", "btdmTaudem", nil, "Ancillary Functions")
' .AddMenu("btdmBreak3", "btdmTaudem", nil, "-")
' .AddMenu("btdmHelp", "btdmTaudem", nil, "TauDEM Help")
' .AddMenu("btdmAbout", "btdmTaudem", nil, "About TauDEM")
' 'Grid Menu Items
' .AddMenu("btdmFillPits", "btdmGridSpecific", nil, "Fill Pits")
' .AddMenu("btdmD8", "btdmGridSpecific", nil, "D8 Flow Directions")
' .AddMenu("btdmDinf", "btdmGridSpecific", nil, "Dinf Flow Directions")
' .AddMenu("btdmAreaD8", "btdmGridSpecific", nil, "D8 Contributing Area")
' .AddMenu("btdmAreaDinf", "btdmGridSpecific", nil, "Dinf Contributing Area")
' .AddMenu("btdmGridNet", "btdmGridSpecific", nil, "Grid Network Order and Flow Path Lengths")
' 'Network Delineation Menu Items
' .AddMenu("btdmPK", "btdmNetworkSpecific", nil, "Peuker Douglas")
' .AddMenu("btdmD8FlowPathExtremeUp", "btdmNetworkSpecific", nil, "D8 Extreme Upslope Value")
' .AddMenu("btdmSlopeArea", "btdmNetworkSpecific", nil, "Slope Area Combination")
' .AddMenu("btdmLengthArea", "btdmNetworkSpecific", nil, "Length Area Stream Source")
' .AddMenu("btdmDropAnalysis", "btdmNetworkSpecific", nil, "Stream Drop Analysis")
' .AddMenu("btdmThreshold", "btdmNetworkSpecific", nil, "Stream Definition by Threshold")
' .AddMenu("btdmDropAnalysisStreamDef", "btdmNetworkSpecific", nil, "Stream Definition with Drop Analysis")
' .AddMenu("btdmPKStreamDef", "btdmNetworkSpecific", nil, "Peuker Douglas Stream Definition")
' .AddMenu("btdmSlopeAreaStreamDef", "btdmNetworkSpecific", nil, "Slope Area Stream Definition")
' .AddMenu("btdmStreamNet", "btdmNetworkSpecific", nil, "Stream Reach and Watershed")
' .AddMenu("btdmWatershedToPoly", "btdmNetworkSpecific", nil, "Watershed Grid to Shapefile")
' .AddMenu("btdmNetworkBreak1", "btdmNetworkSpecific", nil, "-")
' 'Ancillary Functions
' .AddMenu("btdmAvalanche", "btdmAncillary", nil, "D-Infinity Avalanche Runout")
' .AddMenu("btdmCLimAccum", "btdmAncillary", nil, "D-Infinity Concentration Limited Accumulation")
' .AddMenu("btdmADinfDecay", "btdmAncillary", nil, "D-Infinity Decaying Accumulation")
' .AddMenu("btdmDinfDistDown", "btdmAncillary", nil, "D-Infinity Distance Down")
' .AddMenu("btdmDinfDistUp", "btdmAncillary", nil, "D-Infinity Distance Up")
' .AddMenu("btdmRevAccum", "btdmAncillary", nil, "D-Infinity Reverse Accumulation")
' .AddMenu("btdmTLAccum", "btdmAncillary", nil, "D-Infinity Transport Limited Accumulation")
' .AddMenu("btdmDependence", "btdmAncillary", nil, "D-Infinity Upslope Dependence")
' .AddMenu("btdmDistance", "btdmAncillary", nil, "D8 Distance to Streams")
' .AddMenu("btdmSlopeAveDown", "btdmAncillary", nil, "Slope Average Down")
' .AddMenu("btdmSlopeOverArea", "btdmAncillary", nil, "Slope/Area Ratio")
' .AddMenu("btdmAncilBreak1", "btdmAncillary", nil, "-")
'End With
MyBase.Activate()
End Sub
Public Overrides Sub Deactivate()
If g_AutoForm IsNot Nothing AndAlso Not g_AutoForm.IsDisposed Then g_AutoForm.Close()
'todo
' App.Map.StatusBar.RemovePanel(g_StatusBarItem)
App.HeaderControl.RemoveAll()
MyBase.Deactivate()
End Sub
#End Region
#Region "Used Functions"
Private Sub DisplayMessage(ByVal message As String)
App.ProgressHandler.Progress(0, message)
End Sub
'Public Sub ItemClicked(ByVal ItemName As String, ByRef Handled As Boolean)
' 'This sub fires when a menu item is clicked in MapWindow. Here we check if the menu item
' 'is one of the TauDEM related menus, and then take action accordingly. If we handle a menu
' 'click, then we set "handled=true". This tells MapWindow not to pass the event on to any
' 'other plug-ins, or to the base application (in the case that the menu being captured is a
' 'default menu such as "mnuPrint". Note that we are using a naming convention for taudem
' 'related menu items, where the name of the menu is the corresponding taudem function
' 'preceded by "btdm". It is assumed that this will help avoid naming conflicts with other
' 'plugins. - dpa 3/18/2005
' If ItemName.StartsWith("btdm") Then
' 'We're going to run a taudem function. Let's just reset the callback events guy just in case it was lost.
' 'dpa 4/22/2005
' g_Taudem.Initialize(Me, tdbChoiceList.numProcesses)
' End If
' Select Case ItemName
' Case "btdmAutomatic"
' If g_AutoForm Is Nothing Or g_AutoForm.IsDisposed Then
' g_AutoForm = New frmAutomatic_v3
' Dim tempPtr As System.IntPtr = New System.IntPtr(g_handle)
' Dim mapFrm As System.Windows.Forms.Form = System.Windows.Forms.Control.FromHandle(tempPtr)
' mapFrm.AddOwnedForm(g_AutoForm)
' End If
' g_AutoForm.WindowState = Windows.Forms.FormWindowState.Normal
' g_AutoForm.Initialize(Me)
' g_AutoForm.Show()
' 'Taudem Main Menu
' Case "btdmtaudem" ' this occurs every time a button is clicked on TauDEM - put at top to ease debugging
' Exit Select
' Case "btdmSelectBaseDEM"
' DisplayMessage("TauDEM: Waiting for a base DEM.")
' g_Taudem.SelectDEM()
' Handled = True
' DisplayMessage("")
' Case "btdmDoAllGrid"
' DisplayMessage("TauDEM: Doing all grid processing functions.")
' g_Taudem.doAll()
' Handled = True
' DisplayMessage("")
' Case "btdmOutlets"
' DisplayMessage("TauDEM: Waiting for an outlet shapefile.")
' g_Taudem.Outlets()
' Handled = True
' DisplayMessage("")
' Case "btdmDoAllNetwork"
' DisplayMessage("TauDEM: Doing all network and watershed delineation functions.")
' g_Taudem.DoAllwsDelineate()
' App.Map.Refresh()
' Handled = True
' DisplayMessage("")
' Case "btdmHelp"
' g_Taudem.tdHelp()
' Handled = True
' Case "btdmAbout"
' 'Dim f As New frmAbout_v3
' 'f.ShowDialog()
' 'Grid Menu Items
' Case "btdmFillPits"
' DisplayMessage("TauDEM: Filling pits.")
' g_Taudem.FillPits()
' Handled = True
' DisplayMessage("")
' Case "btdmD8"
' DisplayMessage("TauDEM: Computing D8 flow directions.")
' g_Taudem.D8()
' Handled = True
' DisplayMessage("")
' Case "btdmDinf"
' DisplayMessage("TauDEM: Computing D-infinity flow directions.")
' g_Taudem.Dinf()
' Handled = True
' DisplayMessage("")
' Case "btdmAreaD8"
' DisplayMessage("TauDEM: Computing D8 area.")
' g_Taudem.AreaD8()
' Handled = True
' DisplayMessage("")
' Case "btdmAreaDinf"
' DisplayMessage("TauDEM: Computing D-infinity areas.")
' g_Taudem.AreaDinf()
' Handled = True
' DisplayMessage("")
' Case "btdmGridNet"
' DisplayMessage("TauDEM: Computing grid network order and flow path lengths.")
' g_Taudem.Gridnet()
' Handled = True
' DisplayMessage("")
' 'Network Delineation Menu Items
' Case "btdmThreshold"
' DisplayMessage("TauDEM: Computing stream definitiion by threshold.")
' g_Taudem.Threshold()
' Handled = True
' DisplayMessage("")
' Case "btdmPK"
' DisplayMessage("TauDEM: Computing Peuker Douglas.")
' g_Taudem.PK()
' Handled = True
' DisplayMessage("")
' Case "btdmPKStreamDef"
' DisplayMessage("TauDEM: Peuker Douglas Stream Definition.")
' g_Taudem.PKStreamDef()
' Handled = True
' DisplayMessage("")
' Case "btdmSlopeAreaStreamDef"
' DisplayMessage("TauDEM: Slope Area Stream Definition.")
' g_Taudem.SlopeAreaStreamDef()
' Handled = True
' DisplayMessage("")
' Case "btdmDropAnalysisStreamDef"
' DisplayMessage("TauDEM: Drop Analysis Stream Definition.")
' g_Taudem.DropAnalysisStreamDef()
' Handled = True
' DisplayMessage("")
' Case "btdmLengthArea"
' DisplayMessage("TauDEM: Computing length area.")
' g_Taudem.LengthArea()
' Handled = True
' DisplayMessage("")
' Case "btdmSlopeArea"
' DisplayMessage("TauDEM: Computing slope area.")
' g_Taudem.SlopeArea()
' Handled = True
' DisplayMessage("")
' Case "btdmDropAnalysis"
' DisplayMessage("TauDEM: Computing drop analysis.")
' g_Taudem.DropAnalysis()
' Handled = True
' DisplayMessage("")
' Case "btdmD8FlowPathExtremeUp"
' DisplayMessage("TauDEM: Computing D8 extreme upslope value.")
' g_Taudem.D8FlowPathExtremeUp()
' Handled = True
' DisplayMessage("")
' Case "btdmStreamNet"
' DisplayMessage("TauDEM: Computing stream order grid and network files.")
' g_Taudem.StreamNet()
' Handled = True
' DisplayMessage("")
' Case "btdmWatershedToPoly"
' DisplayMessage("TauDEM: Converting watershed to grid to shapefile.")
' g_Taudem.WaterShedtoPoly()
' Handled = True
' DisplayMessage("")
' Case "btdmMoveOutlets"
' DisplayMessage("TauDEM: Moving Outlets to Streams.")
' g_Taudem.MoveOutlets()
' Handled = True
' DisplayMessage("")
' 'Ancillary Functions
' Case "btdmSlopeOverArea"
' DisplayMessage("TauDEM: Computing slope/area ratio.")
' g_Taudem.SlopeOverArea()
' Handled = True
' DisplayMessage("")
' Case "btdmSlopeAveDown"
' DisplayMessage("TauDEM: Computing slope average down.")
' g_Taudem.SlopeAverageDown()
' Handled = True
' DisplayMessage("")
' Case "btdmDistance"
' DisplayMessage("TauDEM: Computing distance to streams.")
' g_Taudem.Distance()
' Handled = True
' DisplayMessage("")
' Case "btdmAvalanche"
' DisplayMessage("TauDEM: Computing avalanche Runout.")
' g_Taudem.Avalanche()
' Handled = True
' DisplayMessage("")
' Case "btdmADinfDecay"
' DisplayMessage("TauDEM: Computing decaying accumulation.")
' g_Taudem.ADinfDecay()
' Handled = True
' DisplayMessage("")
' Case "btdmDinfDistDown"
' DisplayMessage("TauDEM: Computing distance down.")
' g_Taudem.DinfDistDown()
' Handled = True
' DisplayMessage("")
' Case "btdmDinfDistUp"
' DisplayMessage("TauDEM: Computing distance up.")
' g_Taudem.DinfDistUp()
' Handled = True
' DisplayMessage("")
' Case "btdmCLimAccum"
' DisplayMessage("TauDEM: Computing concentration limited accumulation.")
' g_Taudem.CLAccum()
' Handled = True
' DisplayMessage("")
' Case "btdmDependence"
' DisplayMessage("TauDEM: Computing upslope dependence.")
' g_Taudem.Dependence()
' Handled = True
' DisplayMessage("")
' Case "btdmTLAccum"
' DisplayMessage("TauDEM: Computing transport limited accumulation.")
' g_Taudem.TLAccum()
' Handled = True
' DisplayMessage("")
' Case "btdmRevAccum"
' DisplayMessage("TauDEM: Computing reverse accumulation.")
' g_Taudem.RevAccum()
' Handled = True
' DisplayMessage("")
' End Select
'End Sub
#End Region
#Region "SWAT compatibility Stuff"
'Public Sub InitializeAWDPaths(ByVal DEMPath As String, ByVal OutletsPath As String, ByVal RelativeOutputPath As String)
' Progress("Add", 0, DEMPath + "|Base DEM|1")
' lastDem = "Base DEM (" + IO.Path.GetFileName(DEMPath) + ") "
' If OutletsPath <> "" Then
' Progress("Add", 0, OutletsPath + "|Outlets Shapefile|20")
' lastOutlet = "Outlets Shapefile (" + IO.Path.GetFileName(OutletsPath) + ") "
' Dim sf As New MapWinGIS.Shapefile
' sf.Open(OutletsPath)
' App.Map.View.SelectedShapes.ClearSelectedShapes()
' For i As Integer = 0 To sf.NumShapes - 1
' App.Map.View.SelectedShapes.AddByIndex(i, Drawing.Color.Yellow)
' outletShapesIdx.Add(i)
' Next
' g_AutoForm.lblOutletSelected.Text = outletShapesIdx.Count.ToString + " selected"
' sf.Close()
' tdbChoiceList.useOutlets = True
' End If
' tdbChoiceList.OutputPath = RelativeOutputPath
'End Sub
Public Sub InitializeAWDSettings(ByVal useDinf As Boolean, ByVal useEdgeCheck As Boolean, ByVal calcStreamFields As Boolean, ByVal calcWatershedFields As Boolean, ByVal calcMergeShedFields As Boolean, ByVal displayPitFill As Boolean, ByVal displayD8 As Boolean, ByVal displayAreaD8 As Boolean, ByVal displayDinf As Boolean, ByVal displayAreaDinf As Boolean, ByVal displayStrahlOrd As Boolean, ByVal displayNetRaster As Boolean, ByVal displayStreamOrd As Boolean, ByVal displayWatershedGrid As Boolean, ByVal displayStreamShapefile As Boolean, ByVal displayWatershedShapefile As Boolean, ByVal displayMergeWatershed As Boolean)
tdbChoiceList.useDinf = useDinf
tdbChoiceList.EdgeContCheck = useEdgeCheck
tdbChoiceList.CalcSpecialStreamFields = calcStreamFields
tdbChoiceList.CalcSpecialWshedFields = calcWatershedFields
tdbChoiceList.calcSpecialMergeWshedFields = calcMergeShedFields
tdbChoiceList.AddPitfillLayer = displayPitFill
tdbChoiceList.AddD8Layer = displayD8
tdbChoiceList.AddD8AreaLayer = displayAreaD8
tdbChoiceList.AddDinfLayer = displayDinf
tdbChoiceList.AddDinfAreaLayer = displayAreaDinf
tdbChoiceList.AddGridNetLayer = displayStrahlOrd
tdbChoiceList.AddRiverRasterLayer = displayNetRaster
tdbChoiceList.AddOrderGridLayer = displayStreamOrd
tdbChoiceList.AddWShedGridLayer = displayWatershedGrid
tdbChoiceList.AddStreamShapeLayer = displayStreamShapefile
tdbChoiceList.AddWShedShapeLayer = displayWatershedShapefile
tdbChoiceList.AddMergedWShedShapeLayer = displayMergeWatershed
End Sub
Public Function HasBeenDelineated(ByVal demPath As String) As Boolean
tdbFileList.FormFileNames(demPath, "", False)
If IO.File.Exists(tdbFileList.fel) And IO.File.Exists(tdbFileList.mergewshed) And IO.File.Exists(tdbFileList.net) Then
Return True
Else
Return False
End If
End Function
Public Function HasBeenDelineated(ByVal demPath As String, ByVal outputDirectory As String) As Boolean
tdbFileList.FormFileNames(demPath, outputDirectory, False)
If IO.File.Exists(tdbFileList.fel) And IO.File.Exists(tdbFileList.mergewshed) And IO.File.Exists(tdbFileList.net) Then
Return True
Else
Return False
End If
End Function
'Public ReadOnly Property CurrentDEMPath() As String
' Get
' Return g_AutoForm.getPathByName(lastDem)
' End Get
'End Property
Public ReadOnly Property CurrentDEMName() As String
Get
Return lastDem
End Get
End Property
Public ReadOnly Property CurrentOutletPath() As String
Get
Return lastOutlet
End Get
End Property
'Public ReadOnly Property CurrentOutletName() As String
' Get
' Return g_AutoForm.getPathByName(lastOutlet)
' End Get
'End Property
Public ReadOnly Property AutoForm() As frmAutomatic_v3
Get
Return g_AutoForm
End Get
End Property
Public Property AutoFormIcon() As Drawing.Icon
Get
If Not g_AutoForm Is Nothing Then
Return g_AutoForm.Icon
Else
Return Nothing
End If
End Get
Set(ByVal value As Drawing.Icon)
If Not g_AutoForm Is Nothing Then
g_AutoForm.Icon = value
g_AutoForm.ShowIcon = (Not value Is Nothing)
End If
End Set
End Property
Public ReadOnly Property FileList() As tdbFileTypes_v3
Get
Return tdbFileList
End Get
End Property
#End Region
#Region "Drawing and Selecting Events and Functions"
'Public Sub MapMouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Integer, ByVal y As Integer, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.MapMouseDown
' Dim CurrentLayerGood As Boolean = False
' Dim currPoint As New MapWinGIS.Point
' Dim locx, locy As Double
' If App.Map.Layers.NumLayers > 0 Then
' CurrentLayerGood = App.Map.Layers.Item(App.Map.Layers.CurrentLayer).FileName = currDrawPath
' End If
' If App.Map.View.CursorMode = MapWinGIS.tkCursorMode.cmSelection Then
' ElseIf App.Map.View.CursorMode = MapWinGIS.tkCursorMode.cmNone Then
' If g_DrawingMask And CurrentLayerGood Then
' If Button = 2 Then
' AddPolyToShapefile()
' ClearTempLines()
' frmDrawSelect.disableDone(False)
' Else
' ' Get actual location and store it in a point which is added to point list
' App.Map.View.PixelToProj(x, y, locx, locy)
' currPoint.x = locx
' currPoint.y = locy
' lstDrawPoints.Add(currPoint)
' frmDrawSelect.disableDone(True)
' Dim mydraw As MapWindow.Interfaces.Draw = App.Map.View.Draw
' mydraw.DrawPoint(locx, locy, 3, Drawing.Color.Red)
' If (LastStartPtX = -1) Then
' LastStartPtX = System.Windows.Forms.Control.MousePosition.X
' LastStartPtY = System.Windows.Forms.Control.MousePosition.Y
' StartPtX = LastStartPtX
' StartPtY = LastStartPtY
' EraseLast = False
' Else
' 'Reverse the one to the start place
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(StartPtX, StartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' 'Permanently draw line (already drawn, don't erase -- just move it)
' ReversibleDrawn.Add(LastStartPtX)
' ReversibleDrawn.Add(LastStartPtY)
' ReversibleDrawn.Add(System.Windows.Forms.Control.MousePosition.X)
' ReversibleDrawn.Add(System.Windows.Forms.Control.MousePosition.Y)
' 'Update for next loop
' LastStartPtX = System.Windows.Forms.Control.MousePosition.X
' LastStartPtY = System.Windows.Forms.Control.MousePosition.Y
' EraseLast = False
' End If
' End If
' End If
' ' this section revised by cwg 16/10/09 to avoid memory exception when
' ' stoppping editing shapefile, and later error when outlet has null value
' ' for INLET field
' ' - explicit pointIndex and shapeIndex variables rather than pointer
' ' to count of object being added to
' ' - INLET and RES fields always added, so all values set explicitly
' If g_DrawingOutletsOrInlets And CurrentLayerGood Then
' ' Get actual location and store it in a point which is added to point list
' App.Map.View.PixelToProj(x, y, locx, locy)
' currPoint.x = locx
' currPoint.y = locy
' Dim tempPt As New MapWinGIS.Shape
' tempPt.Create(MapWinGIS.ShpfileType.SHP_POINT)
' Dim pointIndex As Integer = tempPt.numPoints
' tempPt.InsertPoint(currPoint, pointIndex)
' Dim sf As MapWinGIS.Shapefile = App.Map.Layers.Item(App.Map.Layers.CurrentLayer).GetObject()
' Dim shapeIndex As Integer = sf.NumShapes
' If sf.StartEditingShapes() Then
' ' Make sure we have ID, INLET, RES and PTSOURCE fields
' Dim idfieldnum As Integer = -1
' For i As Integer = 0 To sf.NumFields - 1
' If sf.Field(i).Name.ToUpper() = "ID" Then
' idfieldnum = i
' Exit For
' End If
' Next i
' If idfieldnum = -1 Then
' Dim idField As New MapWinGIS.Field
' idField.Name = "ID"
' idField.Type = MapWinGIS.FieldType.INTEGER_FIELD
' idfieldnum = sf.NumFields
' sf.EditInsertField(idField, idfieldnum)
' End If
' Dim inletfieldnum As Integer = -1
' For i As Integer = 0 To sf.NumFields - 1
' If sf.Field(i).Name.ToUpper() = "INLET" Then
' inletfieldnum = i
' Exit For
' End If
' Next i
' If inletfieldnum = -1 Then
' Dim inletField As New MapWinGIS.Field
' inletField.Name = "INLET"
' inletField.Type = MapWinGIS.FieldType.INTEGER_FIELD
' inletfieldnum = sf.NumFields
' sf.EditInsertField(inletField, inletfieldnum)
' End If
' Dim resfieldnum As Integer = -1
' For i As Integer = 0 To sf.NumFields - 1
' If sf.Field(i).Name.ToUpper() = "RES" Then
' resfieldnum = i
' Exit For
' End If
' Next
' If resfieldnum = -1 Then
' Dim resField As New MapWinGIS.Field
' resField.Name = "RES"
' resField.Type = MapWinGIS.FieldType.INTEGER_FIELD
' resfieldnum = sf.NumFields
' sf.EditInsertField(resField, resfieldnum)
' End If
' Dim srcfieldnum As Integer = -1
' For i As Integer = 0 To sf.NumFields - 1
' If sf.Field(i).Name.ToUpper() = "PTSOURCE" Then
' srcfieldnum = i
' Exit For
' End If
' Next
' If srcfieldnum = -1 Then
' Dim srcField As New MapWinGIS.Field
' srcField.Name = "PTSOURCE"
' srcField.Type = MapWinGIS.FieldType.INTEGER_FIELD
' srcfieldnum = sf.NumFields
' sf.EditInsertField(srcField, srcfieldnum)
' End If
' sf.EditInsertShape(tempPt, shapeIndex)
' outletShapesIdx.Add(shapeIndex)
' If g_DrawingInlets Then
' sf.EditCellValue(inletfieldnum, shapeIndex, 1)
' Else
' sf.EditCellValue(inletfieldnum, shapeIndex, 0)
' End If
' If g_DrawingReservoir Then
' sf.EditCellValue(resfieldnum, shapeIndex, 1)
' Else
' sf.EditCellValue(resfieldnum, shapeIndex, 0)
' End If
' If g_DrawingPointSource Then
' sf.EditCellValue(srcfieldnum, shapeIndex, 1)
' Else
' sf.EditCellValue(srcfieldnum, shapeIndex, 0)
' End If
' ReNumberMWShapeIDs(sf)
' sf.StopEditingShapes()
' App.Map.Refresh()
' End If
' End If
' End If
'End Sub
'Public Sub MapMouseMove(ByVal ScreenX As Integer, ByVal ScreenY As Integer, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.MapMouseMove
' 'mycolor = System.Drawing.Color.FromArgb(245, 230, 200)
' mycolor = Drawing.Color.White
' If g_DrawingMask Then
' If EraseLast Then
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(LastStartPtX, LastStartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(StartPtX, StartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' End If
' If Not LastStartPtX = -1 Then
' LastEndX = System.Windows.Forms.Control.MousePosition.X
' LastEndY = System.Windows.Forms.Control.MousePosition.Y
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(LastStartPtX, LastStartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(StartPtX, StartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' EraseLast = True
' End If
' End If
'End Sub
'Private Sub ClearTempLines()
' If (EraseLast) Then
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(LastStartPtX, LastStartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(StartPtX, StartPtY), New System.Drawing.Point(LastEndX, LastEndY), mycolor)
' LastStartPtX = -1
' LastStartPtY = -1
' End If
' For i As Integer = 0 To ReversibleDrawn.Count - 1 Step 4
' System.Windows.Forms.ControlPaint.DrawReversibleLine(New System.Drawing.Point(ReversibleDrawn(i), ReversibleDrawn(i + 1)), New System.Drawing.Point(ReversibleDrawn(i + 2), ReversibleDrawn(i + 3)), mycolor)
' Next
' EraseLast = False
' ReversibleDrawn.Clear()
' lstDrawPoints.Clear()
' Dim mydraw As MapWindow.Interfaces.Draw = App.Map.View.Draw
' mydraw.ClearDrawings()
'End Sub
'Private Sub AddPolyToShapefile()
' ' Only try to add if the edit points has something in it
' If lstDrawPoints.Count > 1 Then
' Dim i As Integer
' ' Create poly and set it's type to polyline IMPORTANT
' Dim tempPoly As New MapWinGIS.Shape
' tempPoly.Create(MapWinGIS.ShpfileType.SHP_POLYGON)
' ' Loop the points, inserting them into new poly
' For i = 0 To lstDrawPoints.Count - 1
' tempPoly.InsertPoint(lstDrawPoints(i), tempPoly.numPoints)
' Next
' 'Add the first point to complete the poly
' tempPoly.InsertPoint(lstDrawPoints(0), tempPoly.numPoints)
' Dim sf As MapWinGIS.Shapefile = App.Map.Layers.Item(App.Map.Layers.CurrentLayer).GetObject
' If sf.StartEditingShapes() Then
' maskShapesIdx.Add(sf.NumShapes)
' sf.EditInsertShape(tempPoly, sf.NumShapes)
' sf.StopEditingShapes()
' App.Map.Refresh()
' End If
' End If
'End Sub
'Private Sub ReNumberMWShapeIDs(ByRef sf As MapWinGIS.Shapefile)
' ' CWG 26/1/11 field that was called MWShapeID has to be called ID for Taudem V5
' Dim idfieldnum As Integer = -1
' For i As Integer = 0 To sf.NumFields - 1
' If sf.Field(i).Name.ToUpper() = "ID" Then
' idfieldnum = i
' Exit For
' End If
' Next
' If idfieldnum <> -1 Then
' For i As Integer = 0 To sf.NumShapes - 1
' sf.EditCellValue(idfieldnum, i, i)
' Next
' End If
'End Sub
'<CLSCompliant(False)> _
'Public Sub ShapesSelected(ByVal Handle As Integer, ByVal SelectInfo As MapWindow.Interfaces.SelectInfo) Implements MapWindow.Interfaces.IPlugin.ShapesSelected
' Dim CurrentLayerGood As Boolean
' If g_SelectingMask Or g_DrawingMask Or g_SelectingOutlets Or g_DrawingOutletsOrInlets Then
' If App.Map.Layers.NumLayers > 0 Then
' CurrentLayerGood = App.Map.Layers.Item(App.Map.Layers.CurrentLayer).FileName = currSelectPath
' End If
' If Not CurrentLayerGood Then
' App.Map.View.SelectedShapes.ClearSelectedShapes()
' App.Map.Layers.CurrentLayer = g_AutoForm.getIndexByPath(currSelectPath)
' End If
' End If
'End Sub
#End Region
#Region "Helper Functions"
'' CWG 30/1/11 changed to use MapWinGIS.ICallback instead of Taudem callback
'Public Sub Progress(ByVal KeyOfSender As String, ByVal Percent As Integer, ByVal Message As String) Implements MapWinGIS.ICallback.Progress
' 'This is where we receive the progress events sent from mwTaudem.dll through the g_mwEvents object.
' 'We use this to get instructions from mwTaudem.dll (add/remove layers) and also for progress events.
' 'dpa 4/22/2005 - updated to remove layers by handle not index.
' Dim FileType As Integer
' Dim newlayer As MapWindow.Interfaces.Layer
' Select Case KeyOfSender
' Case "Remove"
' 'mwTaudem.dll wants to remove a layer from the map
' For Each layer As MapWindow.Interfaces.Layer In App.Map.Layers
' If LCase(layer.FileName) = LCase(Message) Then
' App.Map.Layers.Remove(layer.Handle)
' End If
' Next
' Case "Add"
' 'mwTaudem.dll wants to add a layer to the map
' Dim TDGroup As Integer = GetTDGroup()
' Dim Temp() As String = Split(Message, "|")
' Dim FileName As String = Temp(0)
' FileType = CInt(Temp(2))
' If FileType = 1 Then
' 'Make a note that this is the base DEM
' g_BaseDEM = FileName
' End If
' Dim LegendName As String
' LegendName = System.IO.Path.GetFileName(FileName)
' If (LegendName = "sta.adf") Then
' LegendName = System.IO.Path.GetDirectoryName(FileName)
' LegendName = System.IO.Path.GetFileName(LegendName)
' End If
' Dim FileDesc As String = Temp(1) & " (" & LegendName & ") " ' & FileType
' If System.IO.File.Exists(FileName) Then
' If Not InStr(tdbFileList.GetGridFilter(), System.IO.Path.GetExtension(FileName)) = 0 Then
' Dim tmpGrid As New MapWinGIS.Grid
' tmpGrid.Open(FileName)
' ' Paul Meems, 11-Aug-11 Added extra check if projection was not already set:
' If tmpGrid.Header.Projection = String.Empty AndAlso App.Map.Project.ProjectProjection <> String.Empty Then
' tmpGrid.AssignNewProjection(App.Map.Project.ProjectProjection)
' End If
' Dim CS As MapWinGIS.GridColorScheme = GetColorScheme(FileType, CDbl(tmpGrid.Minimum), CDbl(tmpGrid.Maximum))
' newlayer = App.Map.Layers.Add(tmpGrid, CS, FileDesc)
' Else
' newlayer = App.Map.Layers.Add(FileName, FileDesc)
' End If
' newlayer.MoveTo(App.Map.Layers.NumLayers, TDGroup)
' If Not newlayer.LayerType = MapWindow.Interfaces.eLayerType.Grid Then
' Dim shapeFile As MapWinGIS.Shapefile = CType(newlayer.GetObject(), MapWinGIS.Shapefile)
' If FileType = 19 Then 'watershed shapefile
' shapeFile.DefaultDrawingOptions.LineColor = MapWinUtility.Colors.ColorToUInteger(System.Drawing.Color.Red)
' shapeFile.DefaultDrawingOptions.LineWidth = 3
' newlayer.DrawFill = False
' End If
' If FileType = 15 Then 'stream shapefile
' shapeFile.DefaultDrawingOptions.LineColor = MapWinUtility.Colors.ColorToUInteger(System.Drawing.Color.Blue)
' shapeFile.DefaultDrawingOptions.LineWidth = 2
' End If
' If FileType = 43 Then 'mask shapefile
' shapeFile.DefaultDrawingOptions.LineColor = MapWinUtility.Colors.ColorToUInteger(System.Drawing.Color.LightGreen)
' shapeFile.DefaultDrawingOptions.LineWidth = 3
' newlayer.DrawFill = False
' End If
' If FileType = 20 Or FileType = 44 Then 'outletshape
' Dim cats As MapWinGIS.ShapefileCategoriesClass = New MapWinGIS.ShapefileCategoriesClass()
' Dim outletCat As New MapWinGIS.ShapefileCategoryClass()
' outletCat = cats.Add("Outlets")
' outletCat.DrawingOptions.PointShape = MapWinGIS.tkPointShapeType.ptShapeRegular
' outletCat.DrawingOptions.PointSidesCount = 3
' outletCat.DrawingOptions.PointSize = 10
' outletCat.DrawingOptions.FillColor = MapWinUtility.Colors.ColorToUInteger(Drawing.Color.Aqua)
' outletCat.DrawingOptions.LineVisible = False
' outletCat.Expression = "[INLET] = 0 AND [RES] = 0"
' outletCat.DrawingOptions.Visible = True
' Dim resCat As New MapWinGIS.ShapefileCategoryClass()
' resCat = cats.Add("Reservoirs")
' resCat.DrawingOptions.PointShape = MapWinGIS.tkPointShapeType.ptShapeCircle
' resCat.DrawingOptions.PointSize = 10
' resCat.DrawingOptions.FillColor = MapWinUtility.Colors.ColorToUInteger(Drawing.Color.Aqua)
' resCat.DrawingOptions.LineVisible = False
' resCat.Expression = "[INLET] = 0 AND [RES] = 1"
' resCat.DrawingOptions.Visible = True
' Dim inletCat As New MapWinGIS.ShapefileCategoryClass()
' inletCat = cats.Add("Inlets")
' inletCat.DrawingOptions.PointShape = MapWinGIS.tkPointShapeType.ptShapeRegular
' inletCat.DrawingOptions.PointSidesCount = 3
' inletCat.DrawingOptions.PointRotation = 90
' inletCat.DrawingOptions.PointSize = 10
' inletCat.DrawingOptions.FillColor = MapWinUtility.Colors.ColorToUInteger(Drawing.Color.Blue)
' inletCat.DrawingOptions.LineVisible = False
' inletCat.Expression = "[INLET] = 1 AND [PTSOURCE] = 0"
' inletCat.DrawingOptions.Visible = True
' Dim ptsourceCat As New MapWinGIS.ShapefileCategoryClass()
' ptsourceCat = cats.Add("Point sources")
' ptsourceCat.DrawingOptions.PointShape = MapWinGIS.tkPointShapeType.ptShapeRegular
' ptsourceCat.DrawingOptions.PointSidesCount = 3
' ptsourceCat.DrawingOptions.PointRotation = 30
' ptsourceCat.DrawingOptions.PointSize = 10
' ptsourceCat.DrawingOptions.FillColor = MapWinUtility.Colors.ColorToUInteger(Drawing.Color.Blue)
' ptsourceCat.DrawingOptions.LineVisible = False
' ptsourceCat.Expression = "[INLET] = 1 AND [PTSOURCE] = 1"
' ptsourceCat.DrawingOptions.Visible = True
' Dim tmpout As MapWinGIS.Shapefile = CType(newlayer.GetObject(), MapWinGIS.Shapefile)
' tmpout.Categories = cats
' ' Check we have all the columns
' Dim idfieldnum As Integer = -1
' Dim inletfieldnum As Integer = -1
' Dim resfieldnum As Integer = -1
' Dim ptsourcefieldnum As Integer = -1
' For z As Integer = 0 To tmpout.NumFields - 1
' Dim col As String = tmpout.Field(z).Name.ToUpper()
' If col = "ID" Then
' idfieldnum = z
' ElseIf col = "INLET" Then
' inletfieldnum = z
' ElseIf col = "RES" Then
' resfieldnum = z
' ElseIf col = "PTSOURCE" Then
' ptsourcefieldnum = z
' End If
' Next z
' Dim OK As Boolean = True
' If idfieldnum < 0 OrElse inletfieldnum < 0 OrElse resfieldnum < 0 OrElse ptsourcefieldnum < 0 Then
' OK = tmpout.StartEditingTable()
' If OK Then
' If idfieldnum < 0 Then
' Dim idfield As New MapWinGIS.FieldClass()
' idfield.Name = "ID"
' idfield.Type = MapWinGIS.FieldType.INTEGER_FIELD
' OK = tmpout.EditInsertField(idfield, idfieldnum)
' If OK Then
' For s As Integer = 0 To tmpout.NumShapes - 1
' tmpout.EditCellValue(idfieldnum, s, s)
' Next
' End If
' End If
' If inletfieldnum < 0 Then
' Dim inletfield As New MapWinGIS.FieldClass()
' inletfield.Name = "INLET"
' inletfield.Type = MapWinGIS.FieldType.INTEGER_FIELD
' OK = tmpout.EditInsertField(inletfield, inletfieldnum)
' If OK Then
' For s As Integer = 0 To tmpout.NumShapes - 1
' tmpout.EditCellValue(inletfieldnum, s, 0)
' Next
' End If
' End If
' If resfieldnum < 0 Then
' Dim resfield As New MapWinGIS.FieldClass()
' resfield.Name = "res"
' resfield.Type = MapWinGIS.FieldType.INTEGER_FIELD
' OK = tmpout.EditInsertField(resfield, resfieldnum)
' If OK Then
' For s As Integer = 0 To tmpout.NumShapes - 1
' tmpout.EditCellValue(resfieldnum, s, 0)
' Next
' End If
' End If
' If ptsourcefieldnum < 0 Then
' Dim ptsourcefield As New MapWinGIS.FieldClass()
' ptsourcefield.Name = "ptsource"
' ptsourcefield.Type = MapWinGIS.FieldType.INTEGER_FIELD
' OK = tmpout.EditInsertField(ptsourcefield, ptsourcefieldnum)
' If OK Then
' For s As Integer = 0 To tmpout.NumShapes - 1
' tmpout.EditCellValue(ptsourcefieldnum, s, 0)
' Next
' End If
' End If
' End If
' If tmpout.EditingTable Then
' tmpout.StopEditingTable()
' End If
' End If
' If OK Then
' cats.ApplyExpressions()
' End If
' End If
' If FileType = 45 Then
' newlayer.LineOrPointSize = 3
' newlayer.OutlineColor = Drawing.Color.Cyan
' newlayer.Color = Drawing.Color.DarkCyan
' newlayer.DrawFill = True
' newlayer.ShapeLayerFillTransparency = 0.75
' End If
' Else
' ' fix problem with types 12, 46: stream source grid
' ' and 14: watershed grid
' If FileType = 12 OrElse FileType = 14 OrElse FileType = 46 Then
' newlayer.ImageTransparentColor = Drawing.Color.Black
' End If
' End If
' End If
' Case "GetTOC"
' 'mwTaudem.dll wants us to build a string of filenames and layer names for it to choose from
' Dim FilesAndNames As String = ""
' Dim j As Integer
' For i As Integer = 0 To App.Map.Layers.NumLayers - 1
' Dim LyrHandle As Integer = App.Map.Layers.GetHandle(i)
' If App.Map.Layers(LyrHandle).LayerType = MapWindow.Interfaces.eLayerType.Grid Then
' j += 1
' If j > 1 Then FilesAndNames = FilesAndNames & "|" 'add a separator
' FilesAndNames = FilesAndNames & App.Map.Layers(LyrHandle).Name & "," & App.Map.Layers(LyrHandle).FileName
' End If
' Next
' g_Taudem.MapTableOfContents = FilesAndNames
' Case Else
' 'mwTaudem.dll has given us some other message that we will display as a status bar message
' App.Map.StatusBar.ProgressBarValue = Percent
' g_StatusBarItem.Text = Message
' System.Windows.Forms.Application.DoEvents()
' End Select
'End Sub
'Private Function GetColorScheme(ByVal FileType As Integer, ByVal Min As Double, ByVal MAx As Double) As MapWinGIS.GridColorScheme
' 'This function generates a coloring scheme based on the Taudem filetype - dpa 4/23/2005
' Dim CS As New MapWinGIS.GridColorScheme
' Dim BR As New MapWinGIS.GridColorBreak
' Dim R1 As Integer, R2 As Integer, G1 As Integer, G2 As Integer, B1 As Integer, B2 As Integer
' Dim HighVal As Integer, StepVal As Integer, MidVal As Integer, i As Integer
' Try
' Select Case FileType
' Case 1 'Base DEM
' CS.UsePredefined(Min, MAx, MapWinGIS.PredefinedColorScheme.SummerMountains)
' Return CS
' Case 2 'Pit filled DEM
' CS.UsePredefined(Min, MAx, MapWinGIS.PredefinedColorScheme.SummerMountains)
' Return CS
' Case 3 ' D8 Slope - eight unique colors
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 1 : BR.HighValue = 1
' BR.LowColor = System.Convert.ToUInt32(RGB(46, 139, 87))
' BR.HighColor = System.Convert.ToUInt32(RGB(46, 139, 87))
' BR.Caption = "East"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 2 : BR.HighValue = 2
' BR.LowColor = System.Convert.ToUInt32(RGB(0, 0, 255))
' BR.HighColor = System.Convert.ToUInt32(RGB(0, 0, 255))
' BR.Caption = "Northeast"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 3 : BR.HighValue = 3
' BR.LowColor = System.Convert.ToUInt32(RGB(255, 255, 0))
' BR.HighColor = System.Convert.ToUInt32(RGB(255, 255, 0))
' BR.Caption = "North"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 4 : BR.HighValue = 4
' BR.LowColor = System.Convert.ToUInt32(RGB(218, 165, 32))
' BR.HighColor = System.Convert.ToUInt32(RGB(218, 165, 32))
' BR.Caption = "Northwest"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 5 : BR.HighValue = 5
' BR.LowColor = System.Convert.ToUInt32(RGB(222, 184, 135))
' BR.HighColor = System.Convert.ToUInt32(RGB(222, 184, 135))
' BR.Caption = "West"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 6 : BR.HighValue = 6
' BR.LowColor = System.Convert.ToUInt32(RGB(255, 0, 0))
' BR.HighColor = System.Convert.ToUInt32(RGB(255, 0, 0))
' BR.Caption = "Southwest"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 7 : BR.HighValue = 7
' BR.LowColor = System.Convert.ToUInt32(RGB(153, 50, 204))
' BR.HighColor = System.Convert.ToUInt32(RGB(153, 50, 204))
' BR.Caption = "South"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 8 : BR.HighValue = 8
' BR.LowColor = System.Convert.ToUInt32(RGB(123, 104, 238))
' BR.HighColor = System.Convert.ToUInt32(RGB(123, 104, 238))
' BR.Caption = "Southeast"
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' Return CS
' Case 4, 6 'D8 slope, Dinf slope
' BR = New MapWinGIS.GridColorBreak ' white to green
' BR.LowValue = 0 : BR.HighValue = 1
' R1 = 255 : G1 = 255 : B1 = 255 : R2 = 0 : G2 = 255 : B2 = 0
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R2, G2, B2))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak 'green to dark green
' BR.LowValue = 1 : BR.HighValue = MAx
' R1 = 0 : G1 = 255 : B1 = 0 : R2 = 0 : G2 = 100 : B2 = 0
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R2, G2, B2))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' CS.InsertBreak(BR)
' Return CS
' Case 5 'Dinf flow dir - white to brown
' BR.LowValue = Min
' BR.HighValue = MAx
' R1 = 255 : G1 = 255 : B1 = 255 : R2 = 139 : G2 = 69 : B2 = 19
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R2, G2, B2))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' CS.InsertBreak(BR)
' Return CS
' Case 7, 8, 47 'D8 area, Dinf area, ssa - shading from white to red
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = Min : BR.HighValue = MAx
' BR.LowColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' BR.HighColor = System.Convert.ToUInt32(RGB(255, 0, 0))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' BR.GradientModel = MapWinGIS.GradientModel.Logorithmic
' CS.InsertBreak(BR)
' Return CS
' Case 9, 13 'grid order stream order - shading from yellow to green to blue
' 'yellow = RGB(255, 255, 0)
' 'green = RGB(0,255,0)
' 'blue = RGB(0,0,255)
' ' CWG
' HighVal = CInt(MAx)
' If HighVal > 1 Then
' MidVal = CInt(HighVal / 2)
' StepVal = CInt(255 / MidVal)
' Else
' MidVal = 0
' StepVal = 1
' End If
' ' CWG Make first break black (background)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 1 : BR.HighValue = 1
' BR.LowColor = System.Convert.ToUInt32(RGB(0, 0, 0))
' BR.HighColor = System.Convert.ToUInt32(RGB(0, 0, 0))
' BR.Caption = 1
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' For i = 2 To MidVal
' 'color breaks from yellow to green
' R1 = 255 - StepVal * (i - 1) : G1 = 255 : B1 = 0
' ' Guard against invalid colors DGT 10/1/05
' If (R1 < 0) Then R1 = 0
' If (R1 > 255) Then R1 = 255
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = i : BR.HighValue = i
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.Caption = i
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' Next
' For i = MidVal + 1 To HighVal
' 'color breaks from green to blue
' R1 = 0 : G1 = 255 - StepVal * (i - MidVal - 1) : B1 = 0 + StepVal * (i - MidVal - 1)
' ' Guard against invalid colors DGT 10/1/05
' If (G1 < 0) Then G1 = 0
' If (B1 < 0) Then B1 = 0
' If (G1 > 255) Then G1 = 255
' If (B1 > 255) Then B1 = 255
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = i : BR.HighValue = i
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.Caption = i
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' Next
' CS.NoDataColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' Return CS
' Case 10, 11 'Longest upslope path and length
' 'yellow to green
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = Min : BR.HighValue = MAx / 10
' BR.LowColor = System.Convert.ToUInt32(RGB(255, 255, 0))
' BR.HighColor = System.Convert.ToUInt32(RGB(0, 255, 0))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' CS.InsertBreak(BR)
' 'green to blue
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = MAx / 10 : BR.HighValue = MAx
' BR.LowColor = System.Convert.ToUInt32(RGB(0, 255, 0))
' BR.HighColor = System.Convert.ToUInt32(RGB(0, 0, 255))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' CS.InsertBreak(BR)
' Return CS
' Case 12, 46 ' Stream raster src and ss white for 0 and blue elsewhere
' BR = New MapWinGIS.GridColorBreak
' CS.NoDataColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' BR.LowValue = 0 : BR.HighValue = 0
' BR.LowColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' BR.HighColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = 1 : BR.HighValue = 1
' BR.LowColor = System.Convert.ToUInt32(RGB(0, 0, 255))
' BR.HighColor = System.Convert.ToUInt32(RGB(0, 0, 255))
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' Return CS
' Case 14 ' Watershed grid. White for no data random colors elsewhere.
' ' Taudem V5 numbers from 0
' HighVal = CInt(MAx)
' For i = 0 To HighVal
' R1 = Int(Rnd() * 255) : G1 = Int(Rnd() * 255) : B1 = Int(Rnd() * 255)
' BR = New MapWinGIS.GridColorBreak
' BR.LowValue = i : BR.HighValue = i
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.Caption = i
' BR.ColoringType = MapWinGIS.ColoringType.Random
' CS.InsertBreak(BR)
' Next
' CS.NoDataColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' Return CS
' Case 18, 52, 53 'distance grid: gradient white down to black
' BR.HighColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' BR.LowColor = System.Convert.ToUInt32(RGB(1, 1, 1))
' BR.HighValue = MAx
' BR.LowValue = Min
' BR.ColoringType = 1 ' no hillshade
' CS.InsertBreak(BR)
' Return CS
' Case 43 ' mask grid
' BR.HighColor = System.Convert.ToUInt32(RGB(0, 0, 0))
' BR.LowColor = System.Convert.ToUInt32(RGB(0, 0, 0))
' BR.HighValue = MAx
' BR.LowValue = Min
' BR.ColoringType = 1 ' no hillshade
' CS.InsertBreak(BR)
' CS.NoDataColor = System.Convert.ToUInt32(RGB(255, 255, 255))
' Return CS
' Case 48 ' Slope Area
' CS.UsePredefined(Min, MAx, MapWinGIS.PredefinedColorScheme.ValleyFires)
' Return CS
' Case Else
' BR.LowValue = Min
' BR.HighValue = MAx
' R1 = Int(Rnd() * 255) : R2 = Int(Rnd() * 255) : G1 = Int(Rnd() * 255) : G2 = Int(Rnd() * 255) : B1 = Int(Rnd() * 255) : B2 = Int(Rnd() * 255)
' BR.LowColor = System.Convert.ToUInt32(RGB(R1, G1, B1))
' BR.HighColor = System.Convert.ToUInt32(RGB(R2, G2, B2))
' BR.ColoringType = MapWinGIS.ColoringType.Gradient
' CS.InsertBreak(BR)
' Return CS
' End Select
' Catch ex As Exception
' MsgBox(ex.Message)
' End Try
' Return Nothing
'End Function
'Private Function GetTDGroup() As Integer
' 'Returns the handle for the Taudem group. It's looking for the first group named "Terrain Analysis"
' 'dpa 4/22/05
' Dim i As Integer
' For i = 0 To App.Map.Layers.Groups.Count - 1
' If App.Map.Layers.Groups.ItemByPosition(i).Text = "Terrain Analysis" Then
' Return App.Map.Layers.Groups.ItemByPosition(i).Handle
' End If
' Next
' 'if we get here then the group wasn't found, so we can add it and return the handle.
' Return App.Map.Layers.Groups.Add("Terrain Analysis")
'End Function
#End Region
Private Sub AutoWatershedDelineation_Click(ByVal sender As Object, ByVal e As EventArgs)
If g_AutoForm Is Nothing Or g_AutoForm.IsDisposed Then
g_AutoForm = New frmAutomatic_v3
End If
g_AutoForm.WindowState = System.Windows.Forms.FormWindowState.Normal
g_AutoForm.Initialize(Me)
g_AutoForm.Show()
End Sub
End Class
|
DotSpatial/DotSpatial
|
Source/DotSpatial.Plugins.Taudem.Port/TaudemPlugin.vb
|
Visual Basic
|
mit
| 66,149
|
' 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
Imports Microsoft.CodeAnalysis.Completion
Imports Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
Imports Microsoft.CodeAnalysis.Snippets
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.CodeAnalysis.VisualBasic
Imports Roslyn.Test.Utilities
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Completion
<[UseExportProvider]>
Public Class VisualBasicCompletionSnippetNoteTests
Private _markup As XElement = <document>
<![CDATA[Imports System
Class Goo
$$
End Class]]></document>
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function ColonDoesntTriggerSnippetInTupleLiteral() As Task
Using state = CreateVisualBasicSnippetExpansionNoteTestState(_markup, "Interface")
state.SendTypeChars("Dim t = (Interfac")
Await state.AssertNoCompletionSession()
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function SnippetExpansionNoteAddedToDescription_DifferentSnippetShortcutCasing() As Task
Using state = CreateVisualBasicSnippetExpansionNoteTestState(_markup, "intErfaCE")
state.SendTypeChars("Interfac")
Await state.AssertCompletionSession()
Await state.AssertSelectedCompletionItem(description:=String.Format(FeaturesResources._0_Keyword, "Interface") & vbCrLf &
VBFeaturesResources.Declares_the_name_of_an_interface_and_the_definitions_of_the_members_of_the_interface & vbCrLf &
String.Format(FeaturesResources.Note_colon_Tab_twice_to_insert_the_0_snippet, "Interface"))
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function SnippetExpansionNoteNotAddedToDescription_ShortcutIsProperSubstringOfInsertedText() As Task
Using state = CreateVisualBasicSnippetExpansionNoteTestState(_markup, "Interfac")
state.SendTypeChars("Interfac")
Await state.AssertCompletionSession()
Await state.AssertSelectedCompletionItem(description:=String.Format(FeaturesResources._0_Keyword, "Interface") & vbCrLf &
VBFeaturesResources.Declares_the_name_of_an_interface_and_the_definitions_of_the_members_of_the_interface)
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function SnippetExpansionNoteNotAddedToDescription_ShortcutIsProperSuperstringOfInsertedText() As Task
Using state = CreateVisualBasicSnippetExpansionNoteTestState(_markup, "Interfaces")
state.SendTypeChars("Interfac")
Await state.AssertCompletionSession()
Await state.AssertSelectedCompletionItem(description:=String.Format(FeaturesResources._0_Keyword, "Interface") & vbCrLf &
VBFeaturesResources.Declares_the_name_of_an_interface_and_the_definitions_of_the_members_of_the_interface)
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function SnippetExpansionNoteNotAddedToDescription_DisplayTextMatchesShortcutButInsertionTextDoesNot() As Task
Using state = CreateVisualBasicSnippetExpansionNoteTestState(_markup, "DisplayText")
state.SendTypeChars("DisplayTex")
Await state.AssertCompletionSession()
Await state.AssertSelectedCompletionItem(description:="")
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function SnippetExpansionNoteAddedToDescription_DisplayTextDoesNotMatchShortcutButInsertionTextDoes() As Task
Using state = CreateVisualBasicSnippetExpansionNoteTestState(_markup, "InsertionText")
state.SendTypeChars("DisplayTex")
Await state.AssertCompletionSession()
Await state.AssertSelectedCompletionItem(description:=String.Format(FeaturesResources.Note_colon_Tab_twice_to_insert_the_0_snippet, "InsertionText"))
End Using
End Function
Private Function CreateVisualBasicSnippetExpansionNoteTestState(xElement As XElement, ParamArray snippetShortcuts As String()) As TestState
Dim state = TestStateFactory.CreateVisualBasicTestState(
xElement,
New CompletionProvider() {New MockCompletionProvider()},
New List(Of Type) From {GetType(TestVisualBasicSnippetInfoService)})
Dim testSnippetInfoService = DirectCast(state.Workspace.Services.GetLanguageServices(LanguageNames.VisualBasic).GetService(Of ISnippetInfoService)(), TestVisualBasicSnippetInfoService)
testSnippetInfoService.SetSnippetShortcuts(snippetShortcuts)
Return state
End Function
End Class
End Namespace
|
abock/roslyn
|
src/VisualStudio/Core/Test/Completion/VisualBasicCompletionSnippetNoteTests.vb
|
Visual Basic
|
mit
| 5,292
|
Imports bv.winclient.BasePanel
Imports bv.winclient.Core
Imports EIDSS.model.Resources
Imports EIDSS.model.Enums
Public Class AggregateHumanCaseMTXDetail
#Region "Main form interface"
Private Shared m_Parent As Control
Public Shared Sub Register(ByVal ParentControl As System.Windows.Forms.Control)
m_Parent = ParentControl
Dim category As MenuAction = MenuActionManager.Instance.FindAction("MenuConfiguration", MenuActionManager.Instance.System, 960)
Dim ma As MenuAction = New MenuAction(AddressOf ShowMe, MenuActionManager.Instance, category, "MenuAggregateHumanCaseMTXEditor", 960, False, model.Enums.MenuIconsSmall.ReferenceMatrix, -1)
ma.SelectPermission = PermissionHelper.SelectPermission(EIDSS.model.Enums.EIDSSPermissionObject.Reference)
ma.Name = "btnAggregateHumanCaseMTXEditor"
End Sub
Public Shared Sub ShowMe()
BaseFormManager.ShowNormal(New AggregateHumanCaseMTXDetail, Nothing)
'BaseForm.ShowModal(New AggregateProphylacticActionMTXDetail)
End Sub
#End Region
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
AuditObject = New AuditObject(EIDSSAuditObject.daoAggregateMTX, AuditTable.tlbAggrDiagnosticActionMTX)
Me.PermissionObject = EIDSS.model.Enums.EIDSSPermissionObject.Reference
If Not Permissions.CanUpdate Then
Me.ReadOnly = True
End If
Me.m_AggregateMatrixDbService.MatrixKeyField = "idfHumanCaseMtx"
Me.m_AggregateMatrixDbService.SelectProcedure = "spAggregateHumanCaseMatrix_SelectDetail"
Me.m_AggregateMatrixDbService.PostProcedure = "spAggregateHumanCaseMatrix_Post"
Me.m_AggregateMatrixDbService.MatrixEditorName = Me.GetType().Name
Me.MatrixType = AggregateCaseSection.HumanCase
Me.MatrixGrid = Me.gcMTX
End Sub
Public Overrides Function ValidateData() As Boolean
If MyBase.ValidateData() = False Then
Return False
End If
If baseDataSet.Tables.Contains(AggregateMatrix_DB.TableMatrix) Then
For Each dr As DataRow In MatrixTable.Rows
If (dr.RowState = DataRowState.Added Or dr.RowState = DataRowState.Modified) Then
If (Utils.IsEmpty(dr("idfsDiagnosis"))) Then
MessageForm.Show(EidssMessages.Get("mbIncorrectHumanCaseMatrixRow", "Some records of Human Aggregate Case Matrix are not fully defined. Please define or delete undefined records."))
MatrixGrid.Select()
Return False
End If
If MatrixTable.Select(GetUniqueFilter(dr)).Length <> 0 Then
MessageForm.Show(EidssMessages.Get("mbNotUniqueHumanCaseMatrixRows", "Some records of Human Aggregate Case Matrix are not unique. Please change or delete duplicated records."))
MatrixGrid.Select()
Return False
End If
End If
Next
End If
Return True
End Function
Protected Overrides Sub BindView()
MyBase.BindView()
Core.LookupBinder.BindDiagnosisHACodeRepositoryLookup(cbDiagnosis, LookupTables.HumanAggregatedDiagnosis, True, False, , True)
eventManager.AttachDataHandler(AggregateMatrix_DB.TableMatrix + ".idfsDiagnosis", AddressOf Diagnosis_Changed)
End Sub
Private Sub gvMTX_ValidateRow(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs) Handles gvMTX.ValidateRow
Dim r As DataRow = MatrixGridView.GetDataRow(e.RowHandle)
If (Not r Is Nothing) Then
If MatrixTable.Select(GetUniqueFilter(r)).Length <> 0 Then
e.Valid = False
e.ErrorText = EidssMessages.Get("mbNotUniqueHumanCaseMatrixRow", "Current record of Human Aggregate Case Matrix is not unique. Please change or delete it.")
End If
End If
End Sub
Private Sub Diagnosis_Changed(ByVal sender As Object, ByVal e As DataFieldChangeEventArgs)
e.Row("strIDC10") = LookupCache.GetLookupValue(e.Value, LookupTables.HumanAggregatedDiagnosis.ToString, "strIDC10")
MatrixGridView.RefreshRow(MatrixGridView.FocusedRowHandle)
End Sub
Private Function GetUniqueFilter(ByVal r As DataRow) As String
Dim key As Long = -1
If Not r("idfHumanCaseMtx") Is DBNull.Value Then
key = CLng(r("idfHumanCaseMtx"))
End If
Return String.Format("idfsDiagnosis={0} and idfVersion={1} and idfHumanCaseMtx<>{2}", r("idfsDiagnosis"), r("idfVersion"), key)
End Function
End Class
|
EIDSS/EIDSS-Legacy
|
EIDSS v6/vb/EIDSS/EIDSS_Admin/AggregateMTX/AggregateHumanCaseMTXDetail.vb
|
Visual Basic
|
bsd-2-clause
| 4,873
|
'*******************************************************************************************'
' '
' 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.Diagnostics
Imports System.IO
Imports Bytescout.Spreadsheet
Class Program
Friend Shared Sub Main(args As String())
' Open spreadsheet from file
Dim document As New Spreadsheet()
document.LoadFromFile("example.xls")
' Get first worksheet
Dim worksheet As Worksheet = document.Workbook.Worksheets(0)
' Hide formula in B9 cell
worksheet.Cell("B9").HiddenFormula = True
' Protect the worksheet with password
worksheet.Protect("password")
' Delete output file if exists
If File.Exists("changed.xls") Then
File.Delete("changed.xls")
End If
' Save document
document.SaveAs("changed.xls")
' Close spreadsheet
document.Close()
' Open generated XLS document in default program
Process.Start("changed.xls")
End Sub
End Class
|
bytescout/ByteScout-SDK-SourceCode
|
Spreadsheet SDK/VB.NET/Set Hidden Formula/Program.vb
|
Visual Basic
|
apache-2.0
| 1,754
|
' 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.SolutionExplorer
Imports Roslyn.Test.Utilities
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.SolutionExplorer
Public Class RuleSetDocumentExtensionsTests
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub AdjustSingleNonExistentRule()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Alpha.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Error)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Error"/>
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub AdjustSingleExistentRule()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Error"/>
</Rules>
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Alpha.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Warn)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub AdjustSingleRuleUnderDifferentAnalyzer()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Error"/>
</Rules>
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Beta.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Warn)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
<Rules AnalyzerId="Beta.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub AdjustMultipleRules()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
<Rules AnalyzerId="Beta.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Alpha.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Error)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Error"/>
</Rules>
<Rules AnalyzerId="Beta.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Error"/>
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub RemoveSingleNonExistentRule()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Alpha.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Default)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub RemoveSingleExistentRule()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Error"/>
</Rules>
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Alpha.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Default)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.Diagnostics)>
Public Sub RemoveMultipleRules()
Dim startingRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
<Rules AnalyzerId="Beta.Analyzer" RuleNamespace="Alpha.Analyzer">
<Rule Id="Test001" Action="Warn"/>
</Rules>
</RuleSet>
Dim document = New XDocument(startingRuleSet)
document.SetSeverity("Alpha.Analyzer", "Test001", CodeAnalysis.ReportDiagnostic.Default)
Dim expectedRuleSet =
<RuleSet Name="MyRules" Description="A bunch of rules">
<Rules AnalyzerId="Alpha.Analyzer" RuleNamespace="Alpha.Analyzer">
</Rules>
<Rules AnalyzerId="Beta.Analyzer" RuleNamespace="Alpha.Analyzer">
</Rules>
</RuleSet>
Assert.Equal(expectedRuleSet.Value, document.Element("RuleSet").Value)
End Sub
End Class
End Namespace
|
VPashkov/roslyn
|
src/VisualStudio/Core/Test/SolutionExplorer/RuleSetDocumentExtensionsTests.vb
|
Visual Basic
|
apache-2.0
| 7,682
|
' 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.Generic
Imports System.Collections.Immutable
Imports System.Threading
Imports System.Reflection.Metadata
Imports Microsoft.CodeAnalysis.PooledObjects
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports System.Reflection
Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols.Metadata.PE
''' <summary>
''' The class to represent all generic type parameters imported from a PE/module.
''' </summary>
''' <remarks></remarks>
Friend NotInheritable Class PETypeParameterSymbol
Inherits SubstitutableTypeParameterSymbol
Private ReadOnly _containingSymbol As Symbol ' Could be PENamedType or a PEMethod
Private ReadOnly _handle As GenericParameterHandle
Private _lazyCustomAttributes As ImmutableArray(Of VisualBasicAttributeData)
#Region "Metadata"
Private ReadOnly _name As String
Private ReadOnly _ordinal As UShort ' 0 for first, 1 for second, ...
Private ReadOnly _flags As GenericParameterAttributes
#End Region
Private _lazyConstraintTypes As ImmutableArray(Of TypeSymbol)
''' <summary>
''' First error calculating bounds.
''' </summary>
Private _lazyCachedBoundsUseSiteInfo As CachedUseSiteInfo(Of AssemblySymbol) = CachedUseSiteInfo(Of AssemblySymbol).Uninitialized ' Indicates unknown state.
Friend Sub New(
moduleSymbol As PEModuleSymbol,
definingNamedType As PENamedTypeSymbol,
ordinal As UShort,
handle As GenericParameterHandle
)
Me.New(moduleSymbol, DirectCast(definingNamedType, Symbol), ordinal, handle)
End Sub
Friend Sub New(
moduleSymbol As PEModuleSymbol,
definingMethod As PEMethodSymbol,
ordinal As UShort,
handle As GenericParameterHandle
)
Me.New(moduleSymbol, DirectCast(definingMethod, Symbol), ordinal, handle)
End Sub
Private Sub New(
moduleSymbol As PEModuleSymbol,
definingSymbol As Symbol,
ordinal As UShort,
handle As GenericParameterHandle
)
Debug.Assert(moduleSymbol IsNot Nothing)
Debug.Assert(definingSymbol IsNot Nothing)
Debug.Assert(ordinal >= 0)
Debug.Assert(Not handle.IsNil)
_containingSymbol = definingSymbol
Dim flags As GenericParameterAttributes
Try
moduleSymbol.Module.GetGenericParamPropsOrThrow(handle, _name, flags)
Catch mrEx As BadImageFormatException
If _name Is Nothing Then
_name = String.Empty
End If
_lazyCachedBoundsUseSiteInfo.Initialize(ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedType1, Me))
End Try
' Clear the '.ctor' flag if both '.ctor' and 'valuetype' are
' set since '.ctor' is redundant in that case.
_flags = If((flags And GenericParameterAttributes.NotNullableValueTypeConstraint) = 0, flags, flags And Not GenericParameterAttributes.DefaultConstructorConstraint)
_ordinal = ordinal
_handle = handle
End Sub
Public Overrides ReadOnly Property TypeParameterKind As TypeParameterKind
Get
Return If(Me.ContainingSymbol.Kind = SymbolKind.Method,
TypeParameterKind.Method,
TypeParameterKind.Type)
End Get
End Property
Public Overrides ReadOnly Property Ordinal As Integer
Get
Return _ordinal
End Get
End Property
Public Overrides ReadOnly Property Name As String
Get
Return _name
End Get
End Property
Friend ReadOnly Property Handle As GenericParameterHandle
Get
Return Me._handle
End Get
End Property
Public Overrides ReadOnly Property ContainingSymbol As Symbol
Get
Return _containingSymbol
End Get
End Property
Public Overrides ReadOnly Property ContainingAssembly As AssemblySymbol
Get
Return _containingSymbol.ContainingAssembly
End Get
End Property
Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
If _lazyCustomAttributes.IsDefault Then
Dim containingPEModuleSymbol = DirectCast(ContainingModule(), PEModuleSymbol)
containingPEModuleSymbol.LoadCustomAttributes(_handle, _lazyCustomAttributes)
End If
Return _lazyCustomAttributes
End Function
Friend Overrides ReadOnly Property ConstraintTypesNoUseSiteDiagnostics As ImmutableArray(Of TypeSymbol)
Get
EnsureAllConstraintsAreResolved()
Return _lazyConstraintTypes
End Get
End Property
Private Function GetDeclaredConstraints() As ImmutableArray(Of TypeParameterConstraint)
Dim constraintsBuilder = ArrayBuilder(Of TypeParameterConstraint).GetInstance()
If HasConstructorConstraint Then
constraintsBuilder.Add(New TypeParameterConstraint(TypeParameterConstraintKind.Constructor, Nothing))
End If
If HasReferenceTypeConstraint Then
constraintsBuilder.Add(New TypeParameterConstraint(TypeParameterConstraintKind.ReferenceType, Nothing))
End If
If HasValueTypeConstraint Then
constraintsBuilder.Add(New TypeParameterConstraint(TypeParameterConstraintKind.ValueType, Nothing))
End If
Dim containingMethod As PEMethodSymbol = Nothing
Dim containingType As PENamedTypeSymbol
If _containingSymbol.Kind = SymbolKind.Method Then
containingMethod = DirectCast(_containingSymbol, PEMethodSymbol)
containingType = DirectCast(containingMethod.ContainingSymbol, PENamedTypeSymbol)
Else
containingType = DirectCast(_containingSymbol, PENamedTypeSymbol)
End If
Dim moduleSymbol = containingType.ContainingPEModule
Dim metadataReader = moduleSymbol.Module.MetadataReader
Dim constraints As GenericParameterConstraintHandleCollection
Try
constraints = metadataReader.GetGenericParameter(_handle).GetConstraints()
Catch mrEx As BadImageFormatException
constraints = Nothing
_lazyCachedBoundsUseSiteInfo.InterlockedCompareExchange(primaryDependency:=Nothing, New UseSiteInfo(Of AssemblySymbol)(ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedType1, Me)))
End Try
If constraints.Count > 0 Then
Dim tokenDecoder As MetadataDecoder
If containingMethod IsNot Nothing Then
tokenDecoder = New MetadataDecoder(moduleSymbol, containingMethod)
Else
tokenDecoder = New MetadataDecoder(moduleSymbol, containingType)
End If
For Each constraintHandle In constraints
Dim constraint = metadataReader.GetGenericParameterConstraint(constraintHandle)
Dim constraintTypeHandle = constraint.Type
Dim typeSymbol As TypeSymbol = tokenDecoder.GetTypeOfToken(constraintTypeHandle)
' Drop 'System.ValueType' constraint type if the 'valuetype' constraint was also specified.
If ((_flags And GenericParameterAttributes.NotNullableValueTypeConstraint) <> 0) AndAlso
(typeSymbol.SpecialType = Microsoft.CodeAnalysis.SpecialType.System_ValueType) Then
Continue For
End If
typeSymbol = TupleTypeDecoder.DecodeTupleTypesIfApplicable(typeSymbol,
constraintHandle,
moduleSymbol)
constraintsBuilder.Add(New TypeParameterConstraint(typeSymbol, Nothing))
Next
End If
Return constraintsBuilder.ToImmutableAndFree()
End Function
Public Overrides ReadOnly Property Locations As ImmutableArray(Of Location)
Get
Return _containingSymbol.Locations
End Get
End Property
Public Overrides ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference)
Get
Return ImmutableArray(Of SyntaxReference).Empty
End Get
End Property
Public Overrides ReadOnly Property HasConstructorConstraint As Boolean
Get
Return (_flags And GenericParameterAttributes.DefaultConstructorConstraint) <> 0
End Get
End Property
Public Overrides ReadOnly Property HasReferenceTypeConstraint As Boolean
Get
Return (_flags And GenericParameterAttributes.ReferenceTypeConstraint) <> 0
End Get
End Property
Public Overrides ReadOnly Property HasValueTypeConstraint As Boolean
Get
Return (_flags And GenericParameterAttributes.NotNullableValueTypeConstraint) <> 0
End Get
End Property
Public Overrides ReadOnly Property Variance As VarianceKind
Get
Return CType((_flags And GenericParameterAttributes.VarianceMask), VarianceKind)
End Get
End Property
Friend Overrides Sub EnsureAllConstraintsAreResolved()
If _lazyConstraintTypes.IsDefault Then
Dim typeParameters = If(_containingSymbol.Kind = SymbolKind.Method,
DirectCast(_containingSymbol, PEMethodSymbol).TypeParameters,
DirectCast(_containingSymbol, PENamedTypeSymbol).TypeParameters)
EnsureAllConstraintsAreResolved(typeParameters)
End If
End Sub
Friend Overrides Sub ResolveConstraints(inProgress As ConsList(Of TypeParameterSymbol))
Debug.Assert(Not inProgress.Contains(Me))
Debug.Assert(Not inProgress.Any() OrElse inProgress.Head.ContainingSymbol Is ContainingSymbol)
If _lazyConstraintTypes.IsDefault Then
Dim diagnosticsBuilder = ArrayBuilder(Of TypeParameterDiagnosticInfo).GetInstance()
Dim inherited = (_containingSymbol.Kind = SymbolKind.Method) AndAlso DirectCast(_containingSymbol, MethodSymbol).IsOverrides
' Check direct constraints on the type parameter to generate any use-site errors
' (for example, the cycle in ".class public A<(!T)T>"). It's necessary to check for such
' errors because invalid constraints are dropped in those cases so use of such
' types/methods is otherwise valid. It shouldn't be necessary to check indirect
' constraints because any indirect constraints are retained, even if invalid, so
' references to such types/methods cannot be satisfied for specific type arguments.
' (An example of an indirect constraint conflict, U in ".class public C<(A)T, (!T, B)U>",
' which cannot be satisfied if A and B are from different hierarchies.) It also isn't
' necessary to report redundant constraints since redundant constraints are still
' valid. Redundant constraints are dropped silently.
Dim constraints = Me.RemoveDirectConstraintConflicts(GetDeclaredConstraints(), inProgress.Prepend(Me), DirectConstraintConflictKind.None, diagnosticsBuilder)
Dim primaryDependency As AssemblySymbol = Me.PrimaryDependency
Dim useSiteInfo As New UseSiteInfo(Of AssemblySymbol)(primaryDependency)
For Each pair In diagnosticsBuilder
useSiteInfo = MergeUseSiteInfo(useSiteInfo, pair.UseSiteInfo)
If useSiteInfo.DiagnosticInfo IsNot Nothing Then
Exit For
End If
Next
diagnosticsBuilder.Free()
_lazyCachedBoundsUseSiteInfo.InterlockedCompareExchange(primaryDependency, useSiteInfo)
ImmutableInterlocked.InterlockedInitialize(_lazyConstraintTypes, GetConstraintTypesOnly(constraints))
End If
Debug.Assert(_lazyCachedBoundsUseSiteInfo.IsInitialized)
End Sub
Friend Overrides Function GetConstraintsUseSiteInfo() As UseSiteInfo(Of AssemblySymbol)
EnsureAllConstraintsAreResolved()
Debug.Assert(_lazyCachedBoundsUseSiteInfo.IsInitialized)
Return _lazyCachedBoundsUseSiteInfo.ToUseSiteInfo(PrimaryDependency)
End Function
''' <remarks>
''' This is for perf, not for correctness.
''' </remarks>
Friend Overrides ReadOnly Property DeclaringCompilation As VisualBasicCompilation
Get
Return Nothing
End Get
End Property
End Class
End Namespace
|
physhi/roslyn
|
src/Compilers/VisualBasic/Portable/Symbols/Metadata/PE/PETypeParameterSymbol.vb
|
Visual Basic
|
apache-2.0
| 13,739
|
' 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.Reflection.Metadata
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols.Metadata.PE
Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests.Symbols.Metadata.PE
Public Class BaseTypeResolution
Inherits BasicTestBase
<Fact()>
Public Sub Test1()
Dim assembly = MetadataTestHelpers.LoadFromBytes(TestResources.NetFX.v4_0_21006.mscorlib)
TestBaseTypeResolutionHelper1(assembly)
Dim assemblies = MetadataTestHelpers.GetSymbolsForReferences(
{TestResources.General.MDTestLib1,
TestResources.General.MDTestLib2,
TestResources.NetFX.v4_0_21006.mscorlib})
TestBaseTypeResolutionHelper2(assemblies)
assemblies = MetadataTestHelpers.GetSymbolsForReferences(
{TestResources.General.MDTestLib1,
TestResources.General.MDTestLib2})
TestBaseTypeResolutionHelper3(assemblies)
assemblies = MetadataTestHelpers.GetSymbolsForReferences(
{
TestReferences.SymbolsTests.MultiModule.Assembly,
TestReferences.SymbolsTests.MultiModule.Consumer
})
TestBaseTypeResolutionHelper4(assemblies)
End Sub
Private Sub TestBaseTypeResolutionHelper1(assembly As AssemblySymbol)
Dim module0 = assembly.Modules(0)
Dim sys = module0.GlobalNamespace.GetMembers("SYSTEM")
Dim collections = DirectCast(sys(0), NamespaceSymbol).GetMembers("CollectionS")
Dim generic = DirectCast(collections(0), NamespaceSymbol).GetMembers("Generic")
Dim dictionary = DirectCast(generic(0), NamespaceSymbol).GetMembers("Dictionary")
Dim base = DirectCast(dictionary(0), NamedTypeSymbol).BaseType
AssertBaseType(base, "System.Object")
Assert.Null(base.BaseType)
Dim concurrent = DirectCast(collections(0), NamespaceSymbol).GetMembers("Concurrent")
Dim orderablePartitioners = DirectCast(concurrent(0), NamespaceSymbol).GetMembers("OrderablePartitioner")
Dim orderablePartitioner As NamedTypeSymbol = Nothing
For Each p In orderablePartitioners
Dim t = TryCast(p, NamedTypeSymbol)
If t IsNot Nothing AndAlso t.Arity = 1 Then
orderablePartitioner = t
Exit For
End If
Next
base = orderablePartitioner.BaseType
AssertBaseType(base, "System.Collections.Concurrent.Partitioner(Of TSource)")
Assert.Same(DirectCast(base, NamedTypeSymbol).TypeArguments(0), orderablePartitioner.TypeParameters(0))
Dim partitioners = DirectCast(concurrent(0), NamespaceSymbol).GetMembers("Partitioner")
Dim partitioner As NamedTypeSymbol = Nothing
For Each p In partitioners
Dim t = TryCast(p, NamedTypeSymbol)
If t IsNot Nothing AndAlso t.Arity = 0 Then
partitioner = t
Exit For
End If
Next
Assert.NotNull(partitioner)
End Sub
Private Sub TestBaseTypeResolutionHelper2(assemblies() As AssemblySymbol)
Dim module1 = assemblies(0).Modules(0)
Dim module2 = assemblies(1).Modules(0)
Dim TC2 = module1.GlobalNamespace.GetTypeMembers("TC2").Single()
Dim TC3 = module1.GlobalNamespace.GetTypeMembers("TC3").Single()
Dim TC4 = module1.GlobalNamespace.GetTypeMembers("TC4").Single()
AssertBaseType(TC2.BaseType, "C1(Of TC2_T1).C2(Of TC2_T2)")
AssertBaseType(TC3.BaseType, "C1(Of TC3_T1).C3")
AssertBaseType(TC4.BaseType, "C1(Of TC4_T1).C3.C4(Of TC4_T2)")
Dim C1 = module1.GlobalNamespace.GetTypeMembers("C1").Single()
AssertBaseType(C1.BaseType, "System.Object")
Assert.Equal(0, C1.Interfaces.Length())
Dim TC5 = module2.GlobalNamespace.GetTypeMembers("TC5").Single()
Dim TC6 = module2.GlobalNamespace.GetTypeMembers("TC6").Single()
Dim TC7 = module2.GlobalNamespace.GetTypeMembers("TC7").Single()
Dim TC8 = module2.GlobalNamespace.GetTypeMembers("TC8").Single()
Dim TC9 = TC6.GetTypeMembers("TC9").Single()
AssertBaseType(TC5.BaseType, "C1(Of TC5_T1).C2(Of TC5_T2)")
AssertBaseType(TC6.BaseType, "C1(Of TC6_T1).C3")
AssertBaseType(TC7.BaseType, "C1(Of TC7_T1).C3.C4(Of TC7_T2)")
AssertBaseType(TC8.BaseType, "C1(Of System.Type)")
AssertBaseType(TC9.BaseType, "TC6(Of TC6_T1)")
Dim CorTypes = module2.GlobalNamespace.GetMembers("CorTypes").OfType(Of NamespaceSymbol)().Single()
Dim CorTypes_Derived = CorTypes.GetTypeMembers("Derived").Single()
AssertBaseType(CorTypes_Derived.BaseType,
"CorTypes.NS.Base(Of System.Boolean, System.SByte, System.Byte, System.Int16, System.UInt16, System.Int32, System.UInt32, System.Int64, System.UInt64, System.Single, System.Double, System.Char, System.String, System.IntPtr, System.UIntPtr, System.Object)")
Dim CorTypes_Derived1 = CorTypes.GetTypeMembers("Derived1").Single()
AssertBaseType(CorTypes_Derived1.BaseType,
"CorTypes.Base(Of System.Int32(), System.Double(,))")
Dim I101 = module1.GlobalNamespace.GetTypeMembers("I101").Single()
Dim I102 = module1.GlobalNamespace.GetTypeMembers("I102").Single()
Dim C203 = module1.GlobalNamespace.GetTypeMembers("C203").Single()
Assert.Equal(1, C203.Interfaces.Length())
Assert.Same(I101, C203.Interfaces(0))
Dim C204 = module1.GlobalNamespace.GetTypeMembers("C204").Single()
Assert.Equal(2, C204.Interfaces.Length())
Assert.Same(I101, C204.Interfaces(0))
Assert.Same(I102, C204.Interfaces(1))
Return
End Sub
Private Sub TestBaseTypeResolutionHelper3(assemblies() As AssemblySymbol)
Dim module1 = assemblies(0).Modules(0)
Dim module2 = assemblies(1).Modules(0)
Dim CorTypes = module2.GlobalNamespace.GetMembers("CorTypes").OfType(Of NamespaceSymbol)().Single()
Dim CorTypes_Derived = CorTypes.GetTypeMembers("Derived").Single()
AssertBaseType(CorTypes_Derived.BaseType,
"CorTypes.NS.Base(Of System.Boolean[missing], System.SByte[missing], System.Byte[missing], System.Int16[missing], System.UInt16[missing], System.Int32[missing], System.UInt32[missing], System.Int64[missing], System.UInt64[missing], System.Single[missing], System.Double[missing], System.Char[missing], System.String[missing], System.IntPtr[missing], System.UIntPtr[missing], System.Object[missing])")
For Each arg In CorTypes_Derived.BaseType.TypeArguments()
Assert.IsAssignableFrom(Of MissingMetadataTypeSymbol)(arg)
Next
Return
End Sub
Private Sub TestBaseTypeResolutionHelper4(assemblies() As AssemblySymbol)
Dim module1 = assemblies(0).Modules(0)
Dim module2 = assemblies(0).Modules(1)
Dim module3 = assemblies(0).Modules(2)
Dim module0 = assemblies(1).Modules(0)
Dim Derived1 = module0.GlobalNamespace.GetTypeMembers("Derived1").Single()
Dim base1 = Derived1.BaseType
Dim Derived2 = module0.GlobalNamespace.GetTypeMembers("Derived2").Single()
Dim base2 = Derived2.BaseType
Dim Derived3 = module0.GlobalNamespace.GetTypeMembers("Derived3").Single()
Dim base3 = Derived3.BaseType
AssertBaseType(base1, "Class1")
AssertBaseType(base2, "Class2")
AssertBaseType(base3, "Class3")
Assert.Same(base1, module1.GlobalNamespace.GetTypeMembers("Class1").Single())
Assert.Same(base2, module2.GlobalNamespace.GetTypeMembers("Class2").Single())
Assert.Same(base3, module3.GlobalNamespace.GetTypeMembers("Class3").Single())
End Sub
Friend Shared Sub AssertBaseType(base As TypeSymbol, name As String)
Assert.NotEqual(SymbolKind.ErrorType, base.Kind)
Assert.Equal(name, base.ToTestDisplayString())
End Sub
<Fact>
Public Sub Test2()
Dim assemblies = MetadataTestHelpers.GetSymbolsForReferences(
{TestResources.SymbolsTests.DifferByCase.Consumer,
TestResources.SymbolsTests.DifferByCase.TypeAndNamespaceDifferByCase})
Dim module0 = TryCast(assemblies(0).Modules(0), PEModuleSymbol)
Dim module1 = TryCast(assemblies(1).Modules(0), PEModuleSymbol)
Dim bases As New HashSet(Of NamedTypeSymbol)()
Dim TC1 = module0.GlobalNamespace.GetTypeMembers("TC1").Single()
Dim base1 = TC1.BaseType
bases.Add(base1)
Assert.NotEqual(SymbolKind.ErrorType, base1.Kind)
Assert.Equal("SomeName.Dummy", base1.ToTestDisplayString())
Dim TC2 = module0.GlobalNamespace.GetTypeMembers("TC2").Single()
Dim base2 = TC2.BaseType
bases.Add(base2)
Assert.NotEqual(SymbolKind.ErrorType, base2.Kind)
Assert.Equal("somEnamE", base2.ToTestDisplayString())
Dim TC3 = module0.GlobalNamespace.GetTypeMembers("TC3").Single()
Dim base3 = TC3.BaseType
bases.Add(base3)
Assert.NotEqual(SymbolKind.ErrorType, base3.Kind)
Assert.Equal("somEnamE1", base3.ToTestDisplayString())
Dim TC4 = module0.GlobalNamespace.GetTypeMembers("TC4").Single()
Dim base4 = TC4.BaseType
bases.Add(base4)
Assert.NotEqual(SymbolKind.ErrorType, base4.Kind)
Assert.Equal("SomeName1", base4.ToTestDisplayString())
Dim TC5 = module0.GlobalNamespace.GetTypeMembers("TC5").Single()
Dim base5 = TC5.BaseType
bases.Add(base5)
Assert.NotEqual(SymbolKind.ErrorType, base5.Kind)
Assert.Equal("somEnamE2.OtherName", base5.ToTestDisplayString())
Dim TC6 = module0.GlobalNamespace.GetTypeMembers("TC6").Single()
Dim base6 = TC6.BaseType
bases.Add(base6)
Assert.NotEqual(SymbolKind.ErrorType, base6.Kind)
Assert.Equal("SomeName2.OtherName", base6.ToTestDisplayString())
Assert.Equal("SomeName2.OtherName", base6.ToTestDisplayString())
Dim TC7 = module0.GlobalNamespace.GetTypeMembers("TC7").Single()
Dim base7 = TC7.BaseType
bases.Add(base7)
Assert.NotEqual(SymbolKind.ErrorType, base7.Kind)
Assert.Equal("NestingClass.somEnamE3", base7.ToTestDisplayString())
Dim TC8 = module0.GlobalNamespace.GetTypeMembers("TC8").Single()
Dim base8 = TC8.BaseType
bases.Add(base8)
Assert.NotEqual(SymbolKind.ErrorType, base8.Kind)
Assert.Equal("NestingClass.SomeName3", base8.ToTestDisplayString())
Assert.Equal(8, bases.Count)
Assert.Equal(base1, module1.TypeHandleToTypeMap(DirectCast(base1, PENamedTypeSymbol).Handle))
Assert.Equal(base2, module1.TypeHandleToTypeMap(DirectCast(base2, PENamedTypeSymbol).Handle))
Assert.Equal(base3, module1.TypeHandleToTypeMap(DirectCast(base3, PENamedTypeSymbol).Handle))
Assert.Equal(base4, module1.TypeHandleToTypeMap(DirectCast(base4, PENamedTypeSymbol).Handle))
Assert.Equal(base5, module1.TypeHandleToTypeMap(DirectCast(base5, PENamedTypeSymbol).Handle))
Assert.Equal(base6, module1.TypeHandleToTypeMap(DirectCast(base6, PENamedTypeSymbol).Handle))
Assert.Equal(base7, module1.TypeHandleToTypeMap(DirectCast(base7, PENamedTypeSymbol).Handle))
Assert.Equal(base8, module1.TypeHandleToTypeMap(DirectCast(base8, PENamedTypeSymbol).Handle))
Assert.Equal(base1, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC1, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base2, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC2, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base3, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC3, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base4, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC4, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base5, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC5, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base6, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC6, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base7, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC7, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Assert.Equal(base8, module0.TypeRefHandleToTypeMap(CType(module0.Module.GetBaseTypeOfTypeOrThrow(DirectCast(TC8, PENamedTypeSymbol).Handle), TypeReferenceHandle)))
Dim assembly1 = DirectCast(assemblies(1), MetadataOrSourceAssemblySymbol)
Assert.Equal(base1, assembly1.CachedTypeByEmittedName(base1.ToTestDisplayString()))
Assert.Equal(base2, assembly1.CachedTypeByEmittedName(base2.ToTestDisplayString()))
Assert.Equal(base3, assembly1.CachedTypeByEmittedName(base3.ToTestDisplayString()))
Assert.Equal(base4, assembly1.CachedTypeByEmittedName(base4.ToTestDisplayString()))
Assert.Equal(base5, assembly1.CachedTypeByEmittedName(base5.ToTestDisplayString()))
Assert.Equal(base6, assembly1.CachedTypeByEmittedName(base6.ToTestDisplayString()))
Assert.Equal(base7.ContainingType, assembly1.CachedTypeByEmittedName(base7.ContainingType.ToTestDisplayString()))
Assert.Equal(7, assembly1.EmittedNameToTypeMapCount)
End Sub
<Fact()>
Public Sub Test3()
Dim mscorlibRef = TestReferences.NetFx.v4_0_21006.mscorlib
Dim c1 = VisualBasicCompilation.Create("Test", references:={mscorlibRef})
Assert.Equal("System.Object", DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol).GetCorLibType(SpecialType.System_Object).ToTestDisplayString())
Dim MTTestLib1Ref = TestReferences.SymbolsTests.V1.MTTestLib1.dll
Dim c2 = VisualBasicCompilation.Create("Test2", references:={MTTestLib1Ref})
Assert.Equal("System.Object[missing]", DirectCast(c2.Assembly.Modules(0), SourceModuleSymbol).GetCorLibType(SpecialType.System_Object).ToTestDisplayString())
End Sub
<Fact>
Public Sub CrossModuleReferences1()
Dim compilationDef1 =
<compilation name="SimpleTest1">
<file name="a.vb"><![CDATA[
Class Test1
Inherits M3
End Class
Class Test2
Inherits M4
End Class
]]></file>
</compilation>
Dim crossRefModule1 = TestReferences.SymbolsTests.netModule.CrossRefModule1
Dim crossRefModule2 = TestReferences.SymbolsTests.netModule.CrossRefModule2
Dim crossRefLib = TestReferences.SymbolsTests.netModule.CrossRefLib
Dim compilation1 = CreateCompilationWithMscorlib40AndReferences(compilationDef1, {crossRefLib}, TestOptions.ReleaseDll)
AssertNoErrors(compilation1)
Dim test1 = compilation1.GetTypeByMetadataName("Test1")
Dim test2 = compilation1.GetTypeByMetadataName("Test2")
Assert.False(test1.BaseType.IsErrorType())
Assert.False(test1.BaseType.BaseType.IsErrorType())
Assert.False(test2.BaseType.IsErrorType())
Assert.False(test2.BaseType.BaseType.IsErrorType())
Assert.False(test2.BaseType.BaseType.BaseType.IsErrorType())
Dim compilationDef2 =
<compilation name="SimpleTest1">
<file name="a.vb"><![CDATA[
Public Class M3
Inherits M1
End Class
Public Class M4
Inherits M2
End Class
]]></file>
</compilation>
Dim compilation2 = CreateCompilationWithMscorlib40AndReferences(compilationDef2, {crossRefModule1, crossRefModule2}, TestOptions.ReleaseDll)
AssertNoErrors(compilation2)
Dim m3 = compilation2.GetTypeByMetadataName("M3")
Dim m4 = compilation2.GetTypeByMetadataName("M4")
Assert.False(m3.BaseType.IsErrorType())
Assert.False(m3.BaseType.BaseType.IsErrorType())
Assert.False(m4.BaseType.IsErrorType())
Assert.False(m4.BaseType.BaseType.IsErrorType())
Dim compilation3 = CreateCompilationWithMscorlib40AndReferences(compilationDef2, {crossRefModule2}, TestOptions.ReleaseDll)
m3 = compilation3.GetTypeByMetadataName("M3")
m4 = compilation3.GetTypeByMetadataName("M4")
Assert.True(m3.BaseType.IsErrorType())
Assert.False(m4.BaseType.IsErrorType())
Assert.True(m4.BaseType.BaseType.IsErrorType())
AssertTheseDiagnostics(compilation3,
<expected>
BC37221: Reference to 'CrossRefModule1.netmodule' netmodule missing.
BC30002: Type 'M1' is not defined.
Inherits M1
~~
BC30653: Reference required to module 'CrossRefModule1.netmodule' containing the type 'M1'. Add one to your project.
Inherits M2
~~
</expected>)
End Sub
End Class
End Namespace
|
OmarTawfik/roslyn
|
src/Compilers/VisualBasic/Test/Symbol/SymbolsTests/Metadata/PE/BaseTypeResolution.vb
|
Visual Basic
|
apache-2.0
| 18,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 System.Threading
Imports Microsoft.CodeAnalysis.Completion.Providers
Imports Microsoft.CodeAnalysis.VisualBasic.Extensions.ContextQuery
Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.KeywordRecommenders.OnErrorStatements
''' <summary>
''' Recommends "Next" after "On Error Resume" or after the "Resume" statement
''' </summary>
Friend Class NextKeywordRecommender
Inherits AbstractKeywordRecommender
Protected Overrides Function RecommendKeywords(context As VisualBasicSyntaxContext, cancellationToken As CancellationToken) As IEnumerable(Of RecommendedKeyword)
If context.FollowsEndOfStatement Then
Return SpecializedCollections.EmptyEnumerable(Of RecommendedKeyword)()
End If
Dim targetToken = context.TargetToken
If targetToken.IsKind(SyntaxKind.ResumeKeyword) AndAlso Not context.IsInLambda AndAlso
targetToken.Parent.IsKind(SyntaxKind.OnErrorResumeNextStatement, SyntaxKind.ResumeStatement, SyntaxKind.ResumeNextStatement) Then
Return SpecializedCollections.SingletonEnumerable(New RecommendedKeyword("Next",
VBFeaturesResources.When_a_run_time_error_occurs_execution_transfers_to_the_statement_following_the_statement_or_procedure_call_that_resulted_in_the_error))
Else
Return SpecializedCollections.EmptyEnumerable(Of RecommendedKeyword)()
End If
End Function
End Class
End Namespace
|
jeffanders/roslyn
|
src/Features/VisualBasic/Portable/Completion/KeywordRecommenders/OnErrorStatements/NextKeywordRecommender.vb
|
Visual Basic
|
apache-2.0
| 1,740
|
' 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.CodeRefactorings
Imports Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.CodeRefactorings
Imports Microsoft.CodeAnalysis.VisualBasic.SplitOrMergeIfStatements
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.SplitOrMergeIfStatements
<Trait(Traits.Feature, Traits.Features.CodeActionsSplitIntoConsecutiveIfStatements)>
Public NotInheritable Class SplitIntoConsecutiveIfStatementsTests
Inherits AbstractVisualBasicCodeActionTest
Protected Overrides Function CreateCodeRefactoringProvider(workspace As Workspace, parameters As TestParameters) As CodeRefactoringProvider
Return New VisualBasicSplitIntoConsecutiveIfStatementsCodeRefactoringProvider()
End Function
<Theory>
<InlineData("a [||]orelse b")>
<InlineData("a ore[||]lse b")>
<InlineData("a orelse[||] b")>
<InlineData("a [|orelse|] b")>
Public Async Function SplitOnOrElseOperatorSpans(condition As String) As Task
Await TestInRegularAndScriptAsync(
$"class C
sub M(a as boolean, b as boolean)
if {condition} then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
ElseIf b then
end if
end sub
end class")
End Function
<Theory>
<InlineData("a [|or|]else b")>
<InlineData("a[| orelse|] b")>
<InlineData("a[||] orelse b")>
Public Async Function NotSplitOnOrElseOperatorSpans(condition As String) As Task
Await TestMissingInRegularAndScriptAsync(
$"class C
sub M(a as boolean, b as boolean)
if {condition} then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitOnIfKeyword() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
[||]if a orelse b then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitOnAndAlsoOperator() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]andalso b then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitOnBitwiseOrOperator() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]or b then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitOnOrElseOperatorOutsideIfStatement() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
dim v = a [||]orelse b
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitOnOrElseOperatorInIfStatementBody() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a orelse b then
a [||]orelse b
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitOnSingleLineIf() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then System.Console.WriteLine()
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithChainedOrElseExpression1() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a [||]orelse b orelse c orelse d then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a then
ElseIf b orelse c orelse d then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithChainedOrElseExpression2() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse b [||]orelse c orelse d then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse b then
ElseIf c orelse d then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithChainedOrElseExpression3() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse b orelse c [||]orelse d then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse b orelse c then
ElseIf d then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitInsideParentheses1() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if (a [||]orelse b) orelse c orelse d then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitInsideParentheses2() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse b orelse (c [||]orelse d) then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitInsideParentheses3() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if (a orelse b [||]orelse c orelse d) then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithOtherExpressionInsideParentheses1() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a [||]orelse (b orelse c) orelse d then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a then
ElseIf (b orelse c) orelse d then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithOtherExpressionInsideParentheses2() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse (b orelse c) [||]orelse d then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a orelse (b orelse c) then
ElseIf d then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithMixedAndAlsoExpression1() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a [||]orelse b andalso c then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a then
ElseIf b andalso c then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithMixedAndAlsoExpression2() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a andalso b [||]orelse c then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a andalso b then
ElseIf c then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitWithMixedExclusiveOrExpression1() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a [||]orelse b xor c then
end if
end sub
end class")
End Function
<Fact>
Public Async Function NotSplitWithMixedExclusiveOrExpression2() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a xor b [||]orelse c then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithMixedExclusiveOrExpressionInsideParentheses1() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a [||]orelse (b xor c) then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if a then
ElseIf (b xor c) then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithMixedExclusiveOrExpressionInsideParentheses2() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if (a xor b) [||]orelse c then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean, c as boolean, d as boolean)
if (a xor b) then
ElseIf c then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithStatement() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
System.Console.WriteLine(a orelse b)
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
System.Console.WriteLine(a orelse b)
ElseIf b then
System.Console.WriteLine(a orelse b)
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithNestedIfStatement() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
if true
end if
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
if true
end if
ElseIf b then
if true
end if
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithElseStatement() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
System.Console.WriteLine()
else
System.Console.WriteLine(a orelse b)
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
System.Console.WriteLine()
ElseIf b then
System.Console.WriteLine()
else
System.Console.WriteLine(a orelse b)
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithElseNestedIfStatement() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
System.Console.WriteLine()
else
if true
end if
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
System.Console.WriteLine()
ElseIf b then
System.Console.WriteLine()
else
if true
end if
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitWithElseIfElse() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
System.Console.WriteLine()
elseif a then
System.Console.WriteLine(a)
else
System.Console.WriteLine(b)
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
System.Console.WriteLine()
ElseIf b then
System.Console.WriteLine()
elseif a then
System.Console.WriteLine(a)
else
System.Console.WriteLine(b)
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitAsPartOfElseIfElse() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if true then
System.Console.WriteLine()
elseif a [||]orelse b then
System.Console.WriteLine(a)
else
System.Console.WriteLine(b)
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if true then
System.Console.WriteLine()
elseif a then
System.Console.WriteLine(a)
elseif b then
System.Console.WriteLine(a)
else
System.Console.WriteLine(b)
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitIntoSeparateStatementsIfControlFlowQuits1() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
return
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
return
end if
if b then
return
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitIntoSeparateStatementsIfControlFlowQuits2() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
throw new System.Exception()
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
throw new System.Exception()
end if
if b then
throw new System.Exception()
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitIntoSeparateStatementsIfControlFlowQuits3() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
while true
if a [||]orelse b then
continue while
end if
end while
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
while true
if a then
continue while
end if
if b then
continue while
end if
end while
end sub
end class")
End Function
<Fact>
Public Async Function SplitIntoSeparateStatementsIfControlFlowQuits4() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
while true
if a [||]orelse b then
if a then
continue while
else
exit while
end if
end if
end while
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
while true
if a then
if a then
continue while
else
exit while
end if
end if
if b then
if a then
continue while
else
exit while
end if
end if
end while
end sub
end class")
End Function
<Fact>
Public Async Function SplitIntoSeparateStatementsIfControlFlowQuitsInCaseBlock() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
select a
case true
if a [||]orelse b then
exit select
end if
exit select
end select
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
select a
case true
if a then
exit select
end if
if b then
exit select
end if
exit select
end select
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsIfControlFlowContinues1() As Task
' Even though there are no statements inside, we still can't split this into separate statements
' because it would change the semantics from short-circuiting to always evaluating the second condition,
' breaking code like 'If a Is Nothing OrElse a.InstanceMethod()'.
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
ElseIf b then
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsIfControlFlowContinues2() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
if a then
return
end if
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
if a then
return
end if
ElseIf b then
if a then
return
end if
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsIfControlFlowContinues3() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
while a
exit while
end while
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
while a
exit while
end while
ElseIf b then
while a
exit while
end while
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsIfControlFlowContinues4() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
while a <> b
if a [||]orelse b then
while a
continue while
end while
end if
end while
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
while a <> b
if a then
while a
continue while
end while
ElseIf b then
while a
continue while
end while
end if
end while
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsWithElseIfControlFlowQuits() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
return
else
return
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
return
ElseIf b then
return
else
return
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsWithElseIfIfControlFlowQuits() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
return
else if a then
return
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
return
ElseIf b then
return
else if a then
return
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsWithElseIfElseIfControlFlowQuits() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if a [||]orelse b then
return
else if a then
return
else
return
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if a then
return
ElseIf b then
return
else if a then
return
else
return
end if
end sub
end class")
End Function
<Fact>
Public Async Function SplitNotIntoSeparateStatementsAsPartOfElseIfIfControlFlowQuits() As Task
Await TestInRegularAndScriptAsync(
"class C
sub M(a as boolean, b as boolean)
if true then
return
elseif a [||]orelse b then
return
end if
end sub
end class",
"class C
sub M(a as boolean, b as boolean)
if true then
return
elseif a then
return
elseif b then
return
end if
end sub
end class")
End Function
End Class
End Namespace
|
CyrusNajmabadi/roslyn
|
src/EditorFeatures/VisualBasicTest/SplitOrMergeIfStatements/SplitIntoConsecutiveIfStatementsTests.vb
|
Visual Basic
|
mit
| 21,867
|
' 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.Threading
Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
<ExportCodeCleanupProvider(PredefinedCodeCleanupProviderNames.FixIncorrectTokens, LanguageNames.VisualBasic), [Shared]>
<ExtensionOrder(After:=PredefinedCodeCleanupProviderNames.AddMissingTokens, Before:=PredefinedCodeCleanupProviderNames.Format)>
Friend Class FixIncorrectTokensCodeCleanupProvider
Inherits AbstractTokensCodeCleanupProvider
Private Const s_ASCII_LSMART_Q As Char = ChrW(&H91S) '// ASCII left single smart quote
Private Const s_ASCII_RSMART_Q As Char = ChrW(&H92S) '// ASCII right single smart quote
Private Const s_UNICODE_LSMART_Q As Char = ChrW(&H2018S) '// UNICODE left single smart quote
Private Const s_UNICODE_RSMART_Q As Char = ChrW(&H2019S) '// UNICODE right single smart quote
Private Const s_CH_STRGHT_Q As Char = ChrW(&H27S) '// UNICODE straight quote
Private Shared ReadOnly s_smartSingleQuotes As Char() = New Char() {s_ASCII_LSMART_Q, s_ASCII_RSMART_Q, s_UNICODE_LSMART_Q, s_UNICODE_RSMART_Q}
Public Overrides ReadOnly Property Name As String
Get
Return PredefinedCodeCleanupProviderNames.FixIncorrectTokens
End Get
End Property
Protected Overrides Function GetRewriterAsync(document As Document, root As SyntaxNode, spans As ImmutableArray(Of TextSpan), workspace As Workspace, cancellationToken As CancellationToken) As Task(Of Rewriter)
Return FixIncorrectTokensRewriter.CreateAsync(document, spans, cancellationToken)
End Function
Private Class FixIncorrectTokensRewriter
Inherits AbstractTokensCodeCleanupProvider.Rewriter
Private ReadOnly _document As Document
Private ReadOnly _modifiedSpan As TextSpan
Private ReadOnly _semanticModel As SemanticModel
Private Sub New(document As Document,
semanticModel As SemanticModel,
spans As ImmutableArray(Of TextSpan),
modifiedSpan As TextSpan,
cancellationToken As CancellationToken)
MyBase.New(spans, cancellationToken)
_document = document
_semanticModel = semanticModel
_modifiedSpan = modifiedSpan
End Sub
Public Shared Async Function CreateAsync(document As Document, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of Rewriter)
Dim modifiedSpan = spans.Collapse()
Dim semanticModel = If(document Is Nothing,
Nothing,
Await document.GetSemanticModelForSpanAsync(modifiedSpan, cancellationToken).ConfigureAwait(False))
Return New FixIncorrectTokensRewriter(document, semanticModel, spans, modifiedSpan, cancellationToken)
End Function
Public Overrides Function VisitTrivia(trivia As SyntaxTrivia) As SyntaxTrivia
Dim newTrivia = MyBase.VisitTrivia(trivia)
' convert fullwidth single quotes into halfwidth single quotes.
If newTrivia.Kind = SyntaxKind.CommentTrivia Then
Dim triviaText = newTrivia.ToString()
If triviaText.Length > 0 AndAlso s_smartSingleQuotes.Contains(triviaText(0)) Then
triviaText = s_CH_STRGHT_Q + triviaText.Substring(1)
Return SyntaxFactory.CommentTrivia(triviaText)
End If
End If
Return newTrivia
End Function
Public Overrides Function VisitIdentifierName(node As IdentifierNameSyntax) As SyntaxNode
Dim newIdentifierName = DirectCast(MyBase.VisitIdentifierName(node), IdentifierNameSyntax)
' VB Language specification Section 7.3 for Primitive Types states:
' The primitive types are identified through keywords, which are aliases for predefined types in the System namespace.
' A primitive type is completely indistinguishable from the type it aliases: writing the reserved word Byte is exactly
' the same as writing System.Byte.
'
' Language specification defines the following primitive type mappings:
' -------------------------------------------------------------------
' Keyword --> Predefined type in the System namespace
' -------------------------------------------------------------------
' Byte --> Byte
' SByte --> SByte
' * UShort --> UInt16
' * Short --> Int16
' * UInteger --> UInt32
' * Integer --> Int32
' * ULong --> UInt64
' * Long --> Int64
' Single --> Single
' Double --> Double
' Decimal --> Decimal
' Boolean --> Boolean
' * Date --> DateTime
' Char --> Char
' String --> String
'
' * - Keyword string differs from the predefined type name
'
' Here we rewrite the above * marked Keyword identifier tokens to their corresponding predefined type names when following conditions are met:
' (a) It occurs as the RIGHT child of a qualified name "LEFT.RIGHT"
' (b) LEFT child of the qualified name binds to the "System" namespace symbol or an alias to it.
If Not _underStructuredTrivia Then
Dim parent = TryCast(node.Parent, QualifiedNameSyntax)
If parent IsNot Nothing AndAlso _semanticModel IsNot Nothing Then
Dim symbol = _semanticModel.GetSymbolInfo(parent.Left, _cancellationToken).Symbol
If symbol IsNot Nothing AndAlso symbol.IsNamespace AndAlso String.Equals(DirectCast(symbol, INamespaceSymbol).MetadataName, "System", StringComparison.Ordinal) Then
Dim id = newIdentifierName.Identifier
Dim newValueText As String
Select Case id.ValueText.ToUpperInvariant()
Case "USHORT"
newValueText = "UInt16"
Case "SHORT"
newValueText = "Int16"
Case "UINTEGER"
newValueText = "UInt32"
Case "INTEGER"
newValueText = "Int32"
Case "ULONG"
newValueText = "UInt64"
Case "LONG"
newValueText = "Int64"
Case "DATE"
newValueText = "DateTime"
Case Else
Return newIdentifierName
End Select
Return newIdentifierName.ReplaceToken(id, CreateIdentifierToken(id, newValueText))
End If
End If
End If
Return newIdentifierName
End Function
#Region "EndIf Rewriting"
Public Overrides Function VisitEndBlockStatement(node As EndBlockStatementSyntax) As SyntaxNode
Dim newStatement = DirectCast(MyBase.VisitEndBlockStatement(node), EndBlockStatementSyntax)
Return If(newStatement.BlockKeyword.Kind = SyntaxKind.IfKeyword,
RewriteEndIfStatementOrDirectiveSyntax(newStatement, newStatement.EndKeyword, newStatement.BlockKeyword),
newStatement)
End Function
Public Overrides Function VisitEndIfDirectiveTrivia(node As EndIfDirectiveTriviaSyntax) As SyntaxNode
Dim newDirective = DirectCast(MyBase.VisitEndIfDirectiveTrivia(node), EndIfDirectiveTriviaSyntax)
Return RewriteEndIfStatementOrDirectiveSyntax(newDirective, newDirective.EndKeyword, newDirective.IfKeyword)
End Function
''' <summary>
''' Rewrite "EndIf" to "End If" for an EndIfStatementSyntax/EndIfDirectiveSyntax node.
''' </summary>
''' <param name="curNode">Syntax node for the EndIfStatementSyntax or EndIfDirectiveSyntax to be rewritten.</param>
''' <param name="curEndKeyword">"End" keyword token for <paramref name="curNode"/>.</param>
''' <param name="curIfKeyword">"If" keyword token for <paramref name="curNode"/>.</param>
''' <returns>Rewritten EndIfStatementSyntax/EndIfDirectiveSyntax node.</returns>
''' <remarks>
''' This method checks for the following:
''' (a) Both the End keyword and If keyword, <paramref name="curEndKeyword"/> and <paramref name="curIfKeyword"/> respectively, are Missing tokens AND
''' (b) Descendant Trivia under the given <paramref name="curEndKeyword"/> token or <paramref name="curIfKeyword"/> token has an "EndIf" keyword token.
'''
''' If the above conditions are met, it does the following node rewrites:
''' (a) Replace the missing <paramref name="curEndKeyword"/> and <paramref name="curIfKeyword"/> tokens with new "End" and "If" keywords tokens respectively.
''' (b) Remove the first "EndIf" keyword token from the descendant trivia and adjust the leading and trailing trivia appropriately.
''' </remarks>
Private Shared Function RewriteEndIfStatementOrDirectiveSyntax(curNode As SyntaxNode, curEndKeyword As SyntaxToken, curIfKeyword As SyntaxToken) As SyntaxNode
' (a) Are both the curEndKeyword and curIfKeyword Missing tokens?
If curEndKeyword.IsMissing AndAlso curIfKeyword.IsMissing Then
Dim endKeywordTrivia = curEndKeyword.GetAllTrivia()
Dim ifKeywordTrivia = curIfKeyword.GetAllTrivia()
If endKeywordTrivia.Any() OrElse ifKeywordTrivia.Any() Then
Dim endIfKeywordFound As Boolean = False
Dim leadingTriviaBuilder As Queue(Of SyntaxTrivia) = Nothing
Dim trailingTriviaBuilder As Queue(Of SyntaxTrivia) = Nothing
' (b) Descendant Trivia under the given curEndKeyword token or curIfKeyword token has an "EndIf" keyword token?
ProcessTrivia(endKeywordTrivia, endIfKeywordFound, leadingTriviaBuilder, trailingTriviaBuilder)
ProcessTrivia(ifKeywordTrivia, endIfKeywordFound, leadingTriviaBuilder, trailingTriviaBuilder)
If endIfKeywordFound Then
' Rewrites:
' (a) Replace the missing curEndKeyword and curIfKeyword tokens with new "End" and "If" keywords tokens respectively.
' (b) Remove the first "EndIf" keyword token from the descendant trivia and adjust the leading and trailing trivia appropriately.
Dim newEndKeyword = SyntaxFactory.Token(SyntaxKind.EndKeyword).WithTrailingTrivia(SyntaxFactory.WhitespaceTrivia(" "))
If leadingTriviaBuilder IsNot Nothing Then
newEndKeyword = newEndKeyword.WithLeadingTrivia(leadingTriviaBuilder)
End If
Dim newIfKeyword = SyntaxFactory.Token(SyntaxKind.IfKeyword)
If trailingTriviaBuilder IsNot Nothing Then
newIfKeyword = newIfKeyword.WithTrailingTrivia(trailingTriviaBuilder)
End If
Return curNode.ReplaceTokens(SpecializedCollections.SingletonEnumerable(curEndKeyword).Concat(curIfKeyword),
Function(o, m)
If o = curEndKeyword Then
Return newEndKeyword
ElseIf o = curIfKeyword Then
Return newIfKeyword
Else
Return o
End If
End Function)
End If
End If
End If
Return curNode
End Function
' Process trivia looking for an "EndIf" keyword token.
Private Shared Sub ProcessTrivia(triviaList As IEnumerable(Of SyntaxTrivia),
ByRef endIfKeywordFound As Boolean,
ByRef leadingTriviaBuilder As Queue(Of SyntaxTrivia),
ByRef trailingTriviaBuilder As Queue(Of SyntaxTrivia))
For Each trivia In triviaList
If Not endIfKeywordFound Then
If trivia.HasStructure Then
Dim structuredTrivia = DirectCast(trivia.GetStructure(), StructuredTriviaSyntax)
If structuredTrivia.Kind = SyntaxKind.SkippedTokensTrivia Then
Dim skippedTokens = DirectCast(structuredTrivia, SkippedTokensTriviaSyntax).Tokens
If skippedTokens.Count = 1 AndAlso skippedTokens.First.Kind = SyntaxKind.EndIfKeyword Then
endIfKeywordFound = True
Continue For
End If
End If
End If
' Append the trivia to leading trivia and continue processing remaining trivia for EndIf keyword.
If leadingTriviaBuilder Is Nothing Then
leadingTriviaBuilder = New Queue(Of SyntaxTrivia)
End If
leadingTriviaBuilder.Enqueue(trivia)
Else
' EndIf keyword was already found in a prior trivia, so just append this trivia to trailing trivia.
If trailingTriviaBuilder Is Nothing Then
trailingTriviaBuilder = New Queue(Of SyntaxTrivia)
' This is the first trivia encountered after the EndIf keyword.
' If this trivia is neither a WhitespaceTrivia nor an EndOfLineTrivia, then we must insert an extra WhitespaceTrivia here.
Select Case trivia.Kind
Case SyntaxKind.WhitespaceTrivia, SyntaxKind.EndOfLineTrivia
Exit Select
Case Else
trailingTriviaBuilder.Enqueue(SyntaxFactory.WhitespaceTrivia(" "))
End Select
End If
trailingTriviaBuilder.Enqueue(trivia)
End If
Next
End Sub
#End Region
End Class
End Class
End Namespace
|
pdelvo/roslyn
|
src/Workspaces/VisualBasic/Portable/CodeCleanup/Providers/FixIncorrectTokensCodeCleanupProvider.vb
|
Visual Basic
|
apache-2.0
| 16,448
|
' 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.Emit
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Namespace Microsoft.CodeAnalysis.VisualBasic.Emit.NoPia
Friend NotInheritable Class EmbeddedEvent
Inherits EmbeddedTypesManager.CommonEmbeddedEvent
Public Sub New(underlyingEvent As EventSymbol, adder As EmbeddedMethod, remover As EmbeddedMethod, caller As EmbeddedMethod)
MyBase.New(underlyingEvent, adder, remover, caller)
End Sub
Protected Overrides Function GetCustomAttributesToEmit(compilationSatte As ModuleCompilationState) As IEnumerable(Of VisualBasicAttributeData)
Return UnderlyingEvent.GetCustomAttributesToEmit(compilationSatte)
End Function
Protected Overrides ReadOnly Property IsRuntimeSpecial As Boolean
Get
Return UnderlyingEvent.HasRuntimeSpecialName
End Get
End Property
Protected Overrides ReadOnly Property IsSpecialName As Boolean
Get
Return UnderlyingEvent.HasSpecialName
End Get
End Property
Protected Overrides Function [GetType](moduleBuilder As PEModuleBuilder, syntaxNodeOpt As VisualBasicSyntaxNode, diagnostics As DiagnosticBag) As Cci.ITypeReference
Return moduleBuilder.Translate(UnderlyingEvent.Type, syntaxNodeOpt, diagnostics)
End Function
Protected Overrides ReadOnly Property ContainingType As EmbeddedType
Get
Return AnAccessor.ContainingType
End Get
End Property
Protected Overrides ReadOnly Property Visibility As Cci.TypeMemberVisibility
Get
Return PEModuleBuilder.MemberVisibility(UnderlyingEvent)
End Get
End Property
Protected Overrides ReadOnly Property Name As String
Get
Return UnderlyingEvent.MetadataName
End Get
End Property
Protected Overrides Sub EmbedCorrespondingComEventInterfaceMethodInternal(syntaxNodeOpt As VisualBasicSyntaxNode, diagnostics As DiagnosticBag, isUsedForComAwareEventBinding As Boolean)
' If the event happens to belong to a class with a ComEventInterfaceAttribute, there will also be
' a paired method living on its source interface. The ComAwareEventInfo class expects to find this
' method through reflection. If we embed an event, therefore, we must ensure that the associated source
' interface method is also included, even if it is not otherwise referenced in the embedding project.
Dim underlyingContainingType = ContainingType.UnderlyingNamedType
For Each attrData In underlyingContainingType.GetAttributes()
If attrData.IsTargetAttribute(underlyingContainingType, AttributeDescription.ComEventInterfaceAttribute) Then
Dim foundMatch = False
Dim sourceInterface As NamedTypeSymbol = Nothing
If attrData.CommonConstructorArguments.Length = 2 Then
sourceInterface = TryCast(attrData.CommonConstructorArguments(0).Value, NamedTypeSymbol)
If sourceInterface IsNot Nothing Then
foundMatch = EmbedMatchingInterfaceMethods(sourceInterface, syntaxNodeOpt, diagnostics)
For Each source In sourceInterface.AllInterfacesNoUseSiteDiagnostics
If EmbedMatchingInterfaceMethods(source, syntaxNodeOpt, diagnostics) Then
foundMatch = True
End If
Next
End If
End If
If Not foundMatch AndAlso isUsedForComAwareEventBinding Then
If sourceInterface Is Nothing Then
' ERRID_SourceInterfaceMustBeInterface/ERR_MissingSourceInterface
EmbeddedTypesManager.ReportDiagnostic(diagnostics, ERRID.ERR_SourceInterfaceMustBeInterface, syntaxNodeOpt, underlyingContainingType, UnderlyingEvent)
Else
Dim useSiteDiagnostics As HashSet(Of DiagnosticInfo) = Nothing
sourceInterface.AllInterfacesWithDefinitionUseSiteDiagnostics(useSiteDiagnostics)
diagnostics.Add(If(syntaxNodeOpt Is Nothing, NoLocation.Singleton, syntaxNodeOpt.GetLocation()), useSiteDiagnostics)
' ERRID_EventNoPIANoBackingMember/ERR_MissingMethodOnSourceInterface
EmbeddedTypesManager.ReportDiagnostic(diagnostics, ERRID.ERR_EventNoPIANoBackingMember, syntaxNodeOpt, sourceInterface, UnderlyingEvent.MetadataName, UnderlyingEvent)
End If
End If
Exit For
End If
Next
End Sub
Private Function EmbedMatchingInterfaceMethods(sourceInterface As NamedTypeSymbol, syntaxNodeOpt As VisualBasicSyntaxNode, diagnostics As DiagnosticBag) As Boolean
Dim foundMatch = False
For Each m In sourceInterface.GetMembers(UnderlyingEvent.MetadataName)
If m.Kind = SymbolKind.Method Then
TypeManager.EmbedMethodIfNeedTo(DirectCast(m, MethodSymbol), syntaxNodeOpt, diagnostics)
foundMatch = True
End If
Next
Return foundMatch
End Function
End Class
End Namespace
|
MatthieuMEZIL/roslyn
|
src/Compilers/VisualBasic/Portable/Emit/NoPia/EmbeddedEvent.vb
|
Visual Basic
|
apache-2.0
| 5,743
|
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' 組件的一般資訊是由下列的屬性集
' 控制。變更這些屬性值可修改與組件關聯的
' 資訊。
' 檢閱組件屬性的值
<Assembly: AssemblyTitle("kkbruce.tw.Tests")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("kkbruce.tw.Tests")>
<Assembly: AssemblyCopyright("Copyright © 2013")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
<Assembly: Guid("18290fdc-ae4c-4b89-ac72-f1e3e7297d01")>
' 組件的版本資訊是由下列四項值構成:
'
' 主要版本
' 次要版本
' 組建編號
' 修訂編號
'
' 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號
' 指定為預設值:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
kkbruce/Bootstrap2-VB-MVC
|
kkbruce.tw.Tests/My Project/AssemblyInfo.vb
|
Visual Basic
|
mit
| 1,041
|
Namespace Ribbons.Office.Word
Public Class ConverttoDOCM
Inherits RibbonButtonBase
Public Sub New()
_Image = ""
_Order = 1
_Text = "Convert to DOCM"
_ToolTip = ""
End Sub
Protected Friend Overrides Sub OnClick()
End Sub
Protected Friend Overrides Sub OnIsEnabled()
End Sub
End Class
End Namespace
|
nublet/DMS
|
DMS.Forms/Ribbons/Items/Office/Word/ConverttoDOCM.vb
|
Visual Basic
|
mit
| 418
|
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.269
'
' 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("DTISortableTestProject.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
|
Micmaz/DTIControls
|
DTISortable/DTISortableTestProject/My Project/Resources.Designer.vb
|
Visual Basic
|
mit
| 2,726
|
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
' </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", "16.5.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 "Automatische My.Settings-Speicherfunktion"
#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(sender As Global.System.Object, 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.ComAddin.My.MySettings
Get
Return Global.ComAddin.My.MySettings.Default
End Get
End Property
End Module
End Namespace
|
Excel-DNA/Samples
|
ComServerVB/My Project/Settings.Designer.vb
|
Visual Basic
|
mit
| 2,938
|
' 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.Editor.ReferenceHighlighting
Imports Microsoft.CodeAnalysis.Editor.Shared.Extensions
Imports Microsoft.CodeAnalysis.Editor.Shared.Options
Imports Microsoft.CodeAnalysis.Editor.Shared.Tagging
Imports Microsoft.CodeAnalysis.Editor.Tagging
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports Microsoft.CodeAnalysis.Notification
Imports Microsoft.CodeAnalysis.Remote
Imports Microsoft.CodeAnalysis.Shared.TestHooks
Imports Microsoft.CodeAnalysis.Test.Utilities.RemoteHost
Imports Microsoft.VisualStudio.Text
Imports Roslyn.Utilities
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.ReferenceHighlighting
Public MustInherit Class AbstractReferenceHighlightingTests
Protected Async Function VerifyHighlightsAsync(test As XElement, Optional optionIsEnabled As Boolean = True) As Tasks.Task
Await VerifyHighlightsAsync(test, optionIsEnabled, outOfProcess:=False)
Await VerifyHighlightsAsync(test, optionIsEnabled, outOfProcess:=True)
End Function
Private Async Function VerifyHighlightsAsync(test As XElement, optionIsEnabled As Boolean, outOfProcess As Boolean) As Tasks.Task
Using workspace = TestWorkspace.Create(test)
WpfTestCase.RequireWpfFact($"{NameOf(AbstractReferenceHighlightingTests)}.VerifyHighlightsAsync creates asynchronous taggers")
workspace.Options = workspace.Options.WithChangedOption(RemoteHostOptions.RemoteHostTest, outOfProcess).
WithChangedOption(RemoteFeatureOptions.OutOfProcessAllowed, outOfProcess).
WithChangedOption(RemoteFeatureOptions.DocumentHighlightingEnabled, outOfProcess)
Dim tagProducer = New ReferenceHighlightingViewTaggerProvider(
workspace.GetService(Of IForegroundNotificationService),
workspace.GetService(Of ISemanticChangeNotificationService),
AggregateAsynchronousOperationListener.EmptyListeners)
Dim hostDocument = workspace.Documents.Single(Function(d) d.CursorPosition.HasValue)
Dim caretPosition = hostDocument.CursorPosition.Value
Dim snapshot = hostDocument.InitialTextSnapshot
workspace.Options = workspace.Options.WithChangedOption(FeatureOnOffOptions.ReferenceHighlighting, hostDocument.Project.Language, optionIsEnabled)
Dim document = workspace.CurrentSolution.GetDocument(hostDocument.Id)
Dim context = New TaggerContext(Of NavigableHighlightTag)(
document, snapshot, New SnapshotPoint(snapshot, caretPosition))
Await tagProducer.ProduceTagsAsync_ForTestingPurposesOnly(context)
Dim producedTags = From tag In context.tagSpans
Order By tag.Span.Start
Let spanType = If(tag.Tag.Type = DefinitionHighlightTag.TagId, "Definition",
If(tag.Tag.Type = WrittenReferenceHighlightTag.TagId, "WrittenReference", "Reference"))
Select spanType + ":" + tag.Span.Span.ToTextSpan().ToString()
Dim expectedTags As New List(Of String)
For Each hostDocument In workspace.Documents
For Each nameAndSpans In hostDocument.AnnotatedSpans
For Each span In nameAndSpans.Value
expectedTags.Add(nameAndSpans.Key + ":" + span.ToString())
Next
Next
Next
AssertEx.Equal(expectedTags, producedTags)
End Using
End Function
End Class
End Namespace
|
yeaicc/roslyn
|
src/EditorFeatures/Test2/ReferenceHighlighting/AbstractReferenceHighlightingTests.vb
|
Visual Basic
|
apache-2.0
| 3,991
|
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
'//-------------------------------------------------------------------------------------------------
'//
'// Error code and strings for Compiler errors
'//
'// ERRIDs should be defined in the following ranges:
'//
'// 500 - 999 - non localized ERRID (main DLL)
'// 30000 - 59999 - localized ERRID (intl DLL)
'//
'// The convention for naming ERRID's that take replacement strings is to give
'// them a number following the name (from 1-9) that indicates how many
'// arguments they expect.
'//
'// DO NOT USE ANY NUMBERS EXCEPT THOSE EXPLICITLY LISTED AS BEING AVAILABLE.
'// IF YOU REUSE A NUMBER, LOCALIZATION WILL BE SCREWED UP!
'//
'//-------------------------------------------------------------------------------------------------
' //-------------------------------------------------------------------------------------------------
' //
' //
' // Manages the parse and compile errors.
' //
' //-------------------------------------------------------------------------------------------------
Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Enum ERRID
Void = InternalErrorCode.Void
Unknown = InternalErrorCode.Unknown
ERR_None = 0
' ERR_InitError = 2000 unused in Roslyn
ERR_FileNotFound = 2001
' WRN_FileAlreadyIncluded = 2002 'unused in Roslyn.
'ERR_DuplicateResponseFile = 2003 unused in Roslyn.
'ERR_NoMemory = 2004
ERR_ArgumentRequired = 2006
WRN_BadSwitch = 2007
ERR_NoSources = 2008
ERR_SwitchNeedsBool = 2009
'ERR_CompileFailed = 2010 unused in Roslyn.
ERR_NoResponseFile = 2011
ERR_CantOpenFileWrite = 2012
ERR_InvalidSwitchValue = 2014
ERR_BinaryFile = 2015
ERR_BadCodepage = 2016
ERR_LibNotFound = 2017
'ERR_MaximumErrors = 2020 unused in Roslyn.
ERR_IconFileAndWin32ResFile = 2023
'WRN_ReservedReference = 2024 ' unused by native compiler due to bug.
WRN_NoConfigInResponseFile = 2025
' WRN_InvalidWarningId = 2026 ' unused in Roslyn.
'ERR_WatsonSendNotOptedIn = 2027
' WRN_SwitchNoBool = 2028 'unused in Roslyn
ERR_NoSourcesOut = 2029
ERR_NeedModule = 2030
ERR_InvalidAssemblyName = 2031
FTL_InputFileNameTooLong = 2032 ' new in Roslyn
ERR_ConflictingManifestSwitches = 2033
WRN_IgnoreModuleManifest = 2034
'ERR_NoDefaultManifest = 2035
'ERR_InvalidSwitchValue1 = 2036
WRN_BadUILang = 2038 ' new in Roslyn
ERR_VBCoreNetModuleConflict = 2042
ERR_InvalidFormatForGuidForOption = 2043
ERR_MissingGuidForOption = 2044
ERR_BadChecksumAlgorithm = 2045
ERR_MutuallyExclusiveOptions = 2046
'// The naming convention is that if your error requires arguments, to append
'// the number of args taken, e.g. AmbiguousName2
'//
ERR_InvalidInNamespace = 30001
ERR_UndefinedType1 = 30002
ERR_MissingNext = 30003
ERR_IllegalCharConstant = 30004
'//If you make any change involving these errors, such as creating more specific versions for use
'//in other contexts, please make sure to appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember
ERR_UnreferencedAssemblyEvent3 = 30005
ERR_UnreferencedModuleEvent3 = 30006
' ERR_UnreferencedAssemblyBase3 = 30007
' ERR_UnreferencedModuleBase3 = 30008 - This has been superceded by ERR_UnreferencedModuleEvent3
' ERR_UnreferencedAssemblyImplements3 = 30009
'ERR_UnreferencedModuleImplements3 = 30010 - This has been superceded by ERR_UnreferencedModuleEvent3
'ERR_CodegenError = 30011
ERR_LbExpectedEndIf = 30012
ERR_LbNoMatchingIf = 30013
ERR_LbBadElseif = 30014
ERR_InheritsFromRestrictedType1 = 30015
ERR_InvOutsideProc = 30016
ERR_DelegateCantImplement = 30018
ERR_DelegateCantHandleEvents = 30019
ERR_IsOperatorRequiresReferenceTypes1 = 30020
ERR_TypeOfRequiresReferenceType1 = 30021
ERR_ReadOnlyHasSet = 30022
ERR_WriteOnlyHasGet = 30023
ERR_InvInsideProc = 30024
ERR_EndProp = 30025
ERR_EndSubExpected = 30026
ERR_EndFunctionExpected = 30027
ERR_LbElseNoMatchingIf = 30028
ERR_CantRaiseBaseEvent = 30029
ERR_TryWithoutCatchOrFinally = 30030
' ERR_FullyQualifiedNameTooLong1 = 30031 ' Deprecated in favor of ERR_TooLongMetadataName
ERR_EventsCantBeFunctions = 30032
' ERR_IdTooLong = 30033 ' Deprecated in favor of ERR_TooLongMetadataName
ERR_MissingEndBrack = 30034
ERR_Syntax = 30035
ERR_Overflow = 30036
ERR_IllegalChar = 30037
ERR_StrictDisallowsObjectOperand1 = 30038
ERR_LoopControlMustNotBeProperty = 30039
ERR_MethodBodyNotAtLineStart = 30040
ERR_MaximumNumberOfErrors = 30041
ERR_UseOfKeywordNotInInstanceMethod1 = 30043
ERR_UseOfKeywordFromStructure1 = 30044
ERR_BadAttributeConstructor1 = 30045
ERR_ParamArrayWithOptArgs = 30046
ERR_ExpectedArray1 = 30049
ERR_ParamArrayNotArray = 30050
ERR_ParamArrayRank = 30051
ERR_ArrayRankLimit = 30052
ERR_AsNewArray = 30053
ERR_TooManyArgs1 = 30057
ERR_ExpectedCase = 30058
ERR_RequiredConstExpr = 30059
ERR_RequiredConstConversion2 = 30060
ERR_InvalidMe = 30062
ERR_ReadOnlyAssignment = 30064
ERR_ExitSubOfFunc = 30065
ERR_ExitPropNot = 30066
ERR_ExitFuncOfSub = 30067
ERR_LValueRequired = 30068
ERR_ForIndexInUse1 = 30069
ERR_NextForMismatch1 = 30070
ERR_CaseElseNoSelect = 30071
ERR_CaseNoSelect = 30072
ERR_CantAssignToConst = 30074
ERR_NamedSubscript = 30075
ERR_ExpectedEndIf = 30081
ERR_ExpectedEndWhile = 30082
ERR_ExpectedLoop = 30083
ERR_ExpectedNext = 30084
ERR_ExpectedEndWith = 30085
ERR_ElseNoMatchingIf = 30086
ERR_EndIfNoMatchingIf = 30087
ERR_EndSelectNoSelect = 30088
ERR_ExitDoNotWithinDo = 30089
ERR_EndWhileNoWhile = 30090
ERR_LoopNoMatchingDo = 30091
ERR_NextNoMatchingFor = 30092
ERR_EndWithWithoutWith = 30093
ERR_MultiplyDefined1 = 30094
ERR_ExpectedEndSelect = 30095
ERR_ExitForNotWithinFor = 30096
ERR_ExitWhileNotWithinWhile = 30097
ERR_ReadOnlyProperty1 = 30098
ERR_ExitSelectNotWithinSelect = 30099
ERR_BranchOutOfFinally = 30101
ERR_QualNotObjectRecord1 = 30103
ERR_TooFewIndices = 30105
ERR_TooManyIndices = 30106
ERR_EnumNotExpression1 = 30107
ERR_TypeNotExpression1 = 30108
ERR_ClassNotExpression1 = 30109
ERR_StructureNotExpression1 = 30110
ERR_InterfaceNotExpression1 = 30111
ERR_NamespaceNotExpression1 = 30112
ERR_BadNamespaceName1 = 30113
ERR_XmlPrefixNotExpression = 30114
ERR_MultipleExtends = 30121
'ERR_NoStopInDebugger = 30122
'ERR_NoEndInDebugger = 30123
ERR_PropMustHaveGetSet = 30124
ERR_WriteOnlyHasNoWrite = 30125
ERR_ReadOnlyHasNoGet = 30126
ERR_BadAttribute1 = 30127
' ERR_BadSecurityAttribute1 = 30128 ' we're now reporting more detailed diagnostics: ERR_SecurityAttributeMissingAction or ERR_SecurityAttributeInvalidAction
'ERR_BadAssemblyAttribute1 = 30129
'ERR_BadModuleAttribute1 = 30130
' ERR_ModuleSecurityAttributeNotAllowed1 = 30131 ' We now report ERR_SecurityAttributeInvalidTarget instead.
ERR_LabelNotDefined1 = 30132
'ERR_NoGotosInDebugger = 30133
'ERR_NoLabelsInDebugger = 30134
'ERR_NoSyncLocksInDebugger = 30135
ERR_ErrorCreatingWin32ResourceFile = 30136
'ERR_ErrorSavingWin32ResourceFile = 30137 abandoned. no longer "saving" a temporary resource file.
ERR_UnableToCreateTempFile = 30138 'changed from ERR_UnableToCreateTempFileInPath1. now takes only one argument
'ERR_ErrorSettingManifestOption = 30139
'ERR_ErrorCreatingManifest = 30140
'ERR_UnableToCreateALinkAPI = 30141
'ERR_UnableToGenerateRefToMetaDataFile1 = 30142
'ERR_UnableToEmbedResourceFile1 = 30143 ' We now report ERR_UnableToOpenResourceFile1 instead.
'ERR_UnableToLinkResourceFile1 = 30144 ' We now report ERR_UnableToOpenResourceFile1 instead.
'ERR_UnableToEmitAssembly = 30145
'ERR_UnableToSignAssembly = 30146
'ERR_NoReturnsInDebugger = 30147
ERR_RequiredNewCall2 = 30148
ERR_UnimplementedMember3 = 30149
' ERR_UnimplementedProperty3 = 30154
ERR_BadWithRef = 30157
' ERR_ExpectedNewableClass1 = 30166 unused in Roslyn. We now report nothing
' ERR_TypeConflict7 = 30175 unused in Roslyn. We now report BC30179
ERR_DuplicateAccessCategoryUsed = 30176
ERR_DuplicateModifierCategoryUsed = 30177
ERR_DuplicateSpecifier = 30178
ERR_TypeConflict6 = 30179
ERR_UnrecognizedTypeKeyword = 30180
ERR_ExtraSpecifiers = 30181
ERR_UnrecognizedType = 30182
ERR_InvalidUseOfKeyword = 30183
ERR_InvalidEndEnum = 30184
ERR_MissingEndEnum = 30185
'ERR_NoUsingInDebugger = 30186
ERR_ExpectedDeclaration = 30188
ERR_ParamArrayMustBeLast = 30192
ERR_SpecifiersInvalidOnInheritsImplOpt = 30193
ERR_ExpectedSpecifier = 30195
ERR_ExpectedComma = 30196
ERR_ExpectedAs = 30197
ERR_ExpectedRparen = 30198
ERR_ExpectedLparen = 30199
ERR_InvalidNewInType = 30200
ERR_ExpectedExpression = 30201
ERR_ExpectedOptional = 30202
ERR_ExpectedIdentifier = 30203
ERR_ExpectedIntLiteral = 30204
ERR_ExpectedEOS = 30205
ERR_ExpectedForOptionStmt = 30206
ERR_InvalidOptionCompare = 30207
ERR_ExpectedOptionCompare = 30208
ERR_StrictDisallowImplicitObject = 30209
ERR_StrictDisallowsImplicitProc = 30210
ERR_StrictDisallowsImplicitArgs = 30211
ERR_InvalidParameterSyntax = 30213
ERR_ExpectedSubFunction = 30215
ERR_ExpectedStringLiteral = 30217
ERR_MissingLibInDeclare = 30218
ERR_DelegateNoInvoke1 = 30220
ERR_MissingIsInTypeOf = 30224
ERR_DuplicateOption1 = 30225
ERR_ModuleCantInherit = 30230
ERR_ModuleCantImplement = 30231
ERR_BadImplementsType = 30232
ERR_BadConstFlags1 = 30233
ERR_BadWithEventsFlags1 = 30234
ERR_BadDimFlags1 = 30235
ERR_DuplicateParamName1 = 30237
ERR_LoopDoubleCondition = 30238
ERR_ExpectedRelational = 30239
ERR_ExpectedExitKind = 30240
ERR_ExpectedNamedArgument = 30241
ERR_BadMethodFlags1 = 30242
ERR_BadEventFlags1 = 30243
ERR_BadDeclareFlags1 = 30244
ERR_BadLocalConstFlags1 = 30246
ERR_BadLocalDimFlags1 = 30247
ERR_ExpectedConditionalDirective = 30248
ERR_ExpectedEQ = 30249
ERR_ConstructorNotFound1 = 30251
ERR_InvalidEndInterface = 30252
ERR_MissingEndInterface = 30253
ERR_InheritsFrom2 = 30256
ERR_InheritanceCycle1 = 30257
ERR_InheritsFromNonClass = 30258
ERR_MultiplyDefinedType3 = 30260
ERR_BadOverrideAccess2 = 30266
ERR_CantOverrideNotOverridable2 = 30267
ERR_DuplicateProcDef1 = 30269
ERR_BadInterfaceMethodFlags1 = 30270
ERR_NamedParamNotFound2 = 30272
ERR_BadInterfacePropertyFlags1 = 30273
ERR_NamedArgUsedTwice2 = 30274
ERR_InterfaceCantUseEventSpecifier1 = 30275
ERR_TypecharNoMatch2 = 30277
ERR_ExpectedSubOrFunction = 30278
ERR_BadEmptyEnum1 = 30280
ERR_InvalidConstructorCall = 30282
ERR_CantOverrideConstructor = 30283
ERR_OverrideNotNeeded3 = 30284
ERR_ExpectedDot = 30287
ERR_DuplicateLocals1 = 30288
ERR_InvInsideEndsProc = 30289
ERR_LocalSameAsFunc = 30290
ERR_RecordEmbeds2 = 30293
ERR_RecordCycle2 = 30294
ERR_InterfaceCycle1 = 30296
ERR_SubNewCycle2 = 30297
ERR_SubNewCycle1 = 30298
ERR_InheritsFromCantInherit3 = 30299
ERR_OverloadWithOptional2 = 30300
ERR_OverloadWithReturnType2 = 30301
ERR_TypeCharWithType1 = 30302
ERR_TypeCharOnSub = 30303
ERR_OverloadWithDefault2 = 30305
ERR_MissingSubscript = 30306
ERR_OverrideWithDefault2 = 30307
ERR_OverrideWithOptional2 = 30308
ERR_FieldOfValueFieldOfMarshalByRef3 = 30310
ERR_TypeMismatch2 = 30311
ERR_CaseAfterCaseElse = 30321
ERR_ConvertArrayMismatch4 = 30332
ERR_ConvertObjectArrayMismatch3 = 30333
ERR_ForLoopType1 = 30337
ERR_OverloadWithByref2 = 30345
ERR_InheritsFromNonInterface = 30354
ERR_BadInterfaceOrderOnInherits = 30357
ERR_DuplicateDefaultProps1 = 30359
ERR_DefaultMissingFromProperty2 = 30361
ERR_OverridingPropertyKind2 = 30362
ERR_NewInInterface = 30363
ERR_BadFlagsOnNew1 = 30364
ERR_OverloadingPropertyKind2 = 30366
ERR_NoDefaultNotExtend1 = 30367
ERR_OverloadWithArrayVsParamArray2 = 30368
ERR_BadInstanceMemberAccess = 30369
ERR_ExpectedRbrace = 30370
ERR_ModuleAsType1 = 30371
ERR_NewIfNullOnNonClass = 30375
'ERR_NewIfNullOnAbstractClass1 = 30376
ERR_CatchAfterFinally = 30379
ERR_CatchNoMatchingTry = 30380
ERR_FinallyAfterFinally = 30381
ERR_FinallyNoMatchingTry = 30382
ERR_EndTryNoTry = 30383
ERR_ExpectedEndTry = 30384
ERR_BadDelegateFlags1 = 30385
ERR_NoConstructorOnBase2 = 30387
ERR_InaccessibleSymbol2 = 30389
ERR_InaccessibleMember3 = 30390
ERR_CatchNotException1 = 30392
ERR_ExitTryNotWithinTry = 30393
ERR_BadRecordFlags1 = 30395
ERR_BadEnumFlags1 = 30396
ERR_BadInterfaceFlags1 = 30397
ERR_OverrideWithByref2 = 30398
ERR_MyBaseAbstractCall1 = 30399
ERR_IdentNotMemberOfInterface4 = 30401
ERR_ImplementingInterfaceWithDifferentTupleNames5 = 30402
'//We intentionally use argument '3' for the delegate name. This makes generating overload resolution errors
'//easy. To make it more clear that were doing this, we name the message DelegateBindingMismatch3_2.
'//This differentiates its from DelegateBindingMismatch3_3, which actually takes 3 parameters instead of 2.
'//This is a workaround, but it makes the logic for reporting overload resolution errors easier error report more straight forward.
'ERR_DelegateBindingMismatch3_2 = 30408
ERR_WithEventsRequiresClass = 30412
ERR_WithEventsAsStruct = 30413
ERR_ConvertArrayRankMismatch2 = 30414
ERR_RedimRankMismatch = 30415
ERR_StartupCodeNotFound1 = 30420
ERR_ConstAsNonConstant = 30424
ERR_InvalidEndSub = 30429
ERR_InvalidEndFunction = 30430
ERR_InvalidEndProperty = 30431
ERR_ModuleCantUseMethodSpecifier1 = 30433
ERR_ModuleCantUseEventSpecifier1 = 30434
ERR_StructCantUseVarSpecifier1 = 30435
'ERR_ModuleCantUseMemberSpecifier1 = 30436 Now reporting BC30735
ERR_InvalidOverrideDueToReturn2 = 30437
ERR_ConstantWithNoValue = 30438
ERR_ExpressionOverflow1 = 30439
'ERR_ExpectedEndTryCatch = 30441 - No Longer Reported. Removed per bug 926779
'ERR_ExpectedEndTryFinally = 30442 - No Longer Reported. Removed per bug 926779
ERR_DuplicatePropertyGet = 30443
ERR_DuplicatePropertySet = 30444
' ERR_ConstAggregate = 30445 Now giving BC30424
ERR_NameNotDeclared1 = 30451
ERR_BinaryOperands3 = 30452
ERR_ExpectedProcedure = 30454
ERR_OmittedArgument2 = 30455
ERR_NameNotMember2 = 30456
'ERR_NoTypeNamesAvailable = 30458
ERR_EndClassNoClass = 30460
ERR_BadClassFlags1 = 30461
ERR_ImportsMustBeFirst = 30465
ERR_NonNamespaceOrClassOnImport2 = 30467
ERR_TypecharNotallowed = 30468
ERR_ObjectReferenceNotSupplied = 30469
ERR_MyClassNotInClass = 30470
ERR_IndexedNotArrayOrProc = 30471
ERR_EventSourceIsArray = 30476
ERR_SharedConstructorWithParams = 30479
ERR_SharedConstructorIllegalSpec1 = 30480
ERR_ExpectedEndClass = 30481
ERR_UnaryOperand2 = 30487
ERR_BadFlagsWithDefault1 = 30490
ERR_VoidValue = 30491
ERR_ConstructorFunction = 30493
'ERR_LineTooLong = 30494 - No longer reported. Removed per 926916
ERR_InvalidLiteralExponent = 30495
ERR_NewCannotHandleEvents = 30497
ERR_CircularEvaluation1 = 30500
ERR_BadFlagsOnSharedMeth1 = 30501
ERR_BadFlagsOnSharedProperty1 = 30502
ERR_BadFlagsOnStdModuleProperty1 = 30503
ERR_SharedOnProcThatImpl = 30505
ERR_NoWithEventsVarOnHandlesList = 30506
ERR_AccessMismatch6 = 30508
ERR_InheritanceAccessMismatch5 = 30509
ERR_NarrowingConversionDisallowed2 = 30512
ERR_NoArgumentCountOverloadCandidates1 = 30516
ERR_NoViableOverloadCandidates1 = 30517
ERR_NoCallableOverloadCandidates2 = 30518
ERR_NoNonNarrowingOverloadCandidates2 = 30519
ERR_ArgumentNarrowing3 = 30520
ERR_NoMostSpecificOverload2 = 30521
ERR_NotMostSpecificOverload = 30522
ERR_OverloadCandidate2 = 30523
ERR_NoGetProperty1 = 30524
ERR_NoSetProperty1 = 30526
'ERR_ArrayType2 = 30528
ERR_ParamTypingInconsistency = 30529
ERR_ParamNameFunctionNameCollision = 30530
ERR_DateToDoubleConversion = 30532
ERR_DoubleToDateConversion = 30533
ERR_ZeroDivide = 30542
ERR_TryAndOnErrorDoNotMix = 30544
ERR_PropertyAccessIgnored = 30545
ERR_InterfaceNoDefault1 = 30547
ERR_InvalidAssemblyAttribute1 = 30548
ERR_InvalidModuleAttribute1 = 30549
ERR_AmbiguousInUnnamedNamespace1 = 30554
ERR_DefaultMemberNotProperty1 = 30555
ERR_AmbiguousInNamespace2 = 30560
ERR_AmbiguousInImports2 = 30561
ERR_AmbiguousInModules2 = 30562
' ERR_AmbiguousInApplicationObject2 = 30563 ' comment out in Dev10
ERR_ArrayInitializerTooFewDimensions = 30565
ERR_ArrayInitializerTooManyDimensions = 30566
ERR_InitializerTooFewElements1 = 30567
ERR_InitializerTooManyElements1 = 30568
ERR_NewOnAbstractClass = 30569
ERR_DuplicateNamedImportAlias1 = 30572
ERR_DuplicatePrefix = 30573
ERR_StrictDisallowsLateBinding = 30574
' ERR_PropertyMemberSyntax = 30576 unused in Roslyn
ERR_AddressOfOperandNotMethod = 30577
ERR_EndExternalSource = 30578
ERR_ExpectedEndExternalSource = 30579
ERR_NestedExternalSource = 30580
ERR_AddressOfNotDelegate1 = 30581
ERR_SyncLockRequiresReferenceType1 = 30582
ERR_MethodAlreadyImplemented2 = 30583
ERR_DuplicateInInherits1 = 30584
ERR_NamedParamArrayArgument = 30587
ERR_OmittedParamArrayArgument = 30588
ERR_ParamArrayArgumentMismatch = 30589
ERR_EventNotFound1 = 30590
'ERR_NoDefaultSource = 30591
ERR_ModuleCantUseVariableSpecifier1 = 30593
ERR_SharedEventNeedsSharedHandler = 30594
ERR_ExpectedMinus = 30601
ERR_InterfaceMemberSyntax = 30602
ERR_InvInsideInterface = 30603
ERR_InvInsideEndsInterface = 30604
ERR_BadFlagsInNotInheritableClass1 = 30607
ERR_UnimplementedMustOverride = 30609 ' substituted into ERR_BaseOnlyClassesMustBeExplicit2
ERR_BaseOnlyClassesMustBeExplicit2 = 30610
ERR_NegativeArraySize = 30611
ERR_MyClassAbstractCall1 = 30614
ERR_EndDisallowedInDllProjects = 30615
ERR_BlockLocalShadowing1 = 30616
ERR_ModuleNotAtNamespace = 30617
ERR_NamespaceNotAtNamespace = 30618
ERR_InvInsideEndsEnum = 30619
ERR_InvalidOptionStrict = 30620
ERR_EndStructureNoStructure = 30621
ERR_EndModuleNoModule = 30622
ERR_EndNamespaceNoNamespace = 30623
ERR_ExpectedEndStructure = 30624
ERR_ExpectedEndModule = 30625
ERR_ExpectedEndNamespace = 30626
ERR_OptionStmtWrongOrder = 30627
ERR_StructCantInherit = 30628
ERR_NewInStruct = 30629
ERR_InvalidEndGet = 30630
ERR_MissingEndGet = 30631
ERR_InvalidEndSet = 30632
ERR_MissingEndSet = 30633
ERR_InvInsideEndsProperty = 30634
ERR_DuplicateWriteabilityCategoryUsed = 30635
ERR_ExpectedGreater = 30636
ERR_AttributeStmtWrongOrder = 30637
ERR_NoExplicitArraySizes = 30638
ERR_BadPropertyFlags1 = 30639
ERR_InvalidOptionExplicit = 30640
ERR_MultipleParameterSpecifiers = 30641
ERR_MultipleOptionalParameterSpecifiers = 30642
ERR_UnsupportedProperty1 = 30643
ERR_InvalidOptionalParameterUsage1 = 30645
ERR_ReturnFromNonFunction = 30647
ERR_UnterminatedStringLiteral = 30648
ERR_UnsupportedType1 = 30649
ERR_InvalidEnumBase = 30650
ERR_ByRefIllegal1 = 30651
'//If you make any change involving these errors, such as creating more specific versions for use
'//in other contexts, please make sure to appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember
ERR_UnreferencedAssembly3 = 30652
ERR_UnreferencedModule3 = 30653
ERR_ReturnWithoutValue = 30654
' ERR_CantLoadStdLibrary1 = 30655 roslyn doesn't use special messages when well-known assemblies cannot be loaded.
ERR_UnsupportedField1 = 30656
ERR_UnsupportedMethod1 = 30657
ERR_NoNonIndexProperty1 = 30658
ERR_BadAttributePropertyType1 = 30659
ERR_LocalsCannotHaveAttributes = 30660
ERR_PropertyOrFieldNotDefined1 = 30661
ERR_InvalidAttributeUsage2 = 30662
ERR_InvalidMultipleAttributeUsage1 = 30663
ERR_CantThrowNonException = 30665
ERR_MustBeInCatchToRethrow = 30666
ERR_ParamArrayMustBeByVal = 30667
ERR_UseOfObsoleteSymbol2 = 30668
ERR_RedimNoSizes = 30670
ERR_InitWithMultipleDeclarators = 30671
ERR_InitWithExplicitArraySizes = 30672
ERR_EndSyncLockNoSyncLock = 30674
ERR_ExpectedEndSyncLock = 30675
ERR_NameNotEvent2 = 30676
ERR_AddOrRemoveHandlerEvent = 30677
ERR_UnrecognizedEnd = 30678
ERR_ArrayInitForNonArray2 = 30679
ERR_EndRegionNoRegion = 30680
ERR_ExpectedEndRegion = 30681
ERR_InheritsStmtWrongOrder = 30683
ERR_AmbiguousAcrossInterfaces3 = 30685
ERR_DefaultPropertyAmbiguousAcrossInterfaces4 = 30686
ERR_InterfaceEventCantUse1 = 30688
ERR_ExecutableAsDeclaration = 30689
ERR_StructureNoDefault1 = 30690
' ERR_TypeMemberAsExpression2 = 30691 Now giving BC30109
ERR_MustShadow2 = 30695
'ERR_OverloadWithOptionalTypes2 = 30696
ERR_OverrideWithOptionalTypes2 = 30697
'ERR_UnableToGetTempPath = 30698
'ERR_NameNotDeclaredDebug1 = 30699
'// This error should never be seen.
'ERR_NoSideEffects = 30700
'ERR_InvalidNothing = 30701
'ERR_IndexOutOfRange1 = 30702
'ERR_RuntimeException2 = 30703
'ERR_RuntimeException = 30704
'ERR_ObjectReferenceIsNothing1 = 30705
'// This error should never be seen.
'ERR_ExpressionNotValidInEE = 30706
'ERR_UnableToEvaluateExpression = 30707
'ERR_UnableToEvaluateLoops = 30708
'ERR_NoDimsInDebugger = 30709
ERR_ExpectedEndOfExpression = 30710
'ERR_SetValueNotAllowedOnNonLeafFrame = 30711
'ERR_UnableToClassInformation1 = 30712
'ERR_NoExitInDebugger = 30713
'ERR_NoResumeInDebugger = 30714
'ERR_NoCatchInDebugger = 30715
'ERR_NoFinallyInDebugger = 30716
'ERR_NoTryInDebugger = 30717
'ERR_NoSelectInDebugger = 30718
'ERR_NoCaseInDebugger = 30719
'ERR_NoOnErrorInDebugger = 30720
'ERR_EvaluationAborted = 30721
'ERR_EvaluationTimeout = 30722
'ERR_EvaluationNoReturnValue = 30723
'ERR_NoErrorStatementInDebugger = 30724
'ERR_NoThrowStatementInDebugger = 30725
'ERR_NoWithContextInDebugger = 30726
ERR_StructsCannotHandleEvents = 30728
ERR_OverridesImpliesOverridable = 30730
'ERR_NoAddressOfInDebugger = 30731
'ERR_EvaluationOfWebMethods = 30732
ERR_LocalNamedSameAsParam1 = 30734
ERR_ModuleCantUseTypeSpecifier1 = 30735
'ERR_EvaluationBadStartPoint = 30736
ERR_InValidSubMainsFound1 = 30737
ERR_MoreThanOneValidMainWasFound2 = 30738
'ERR_NoRaiseEventOfInDebugger = 30739
'ERR_InvalidCast2 = 30741
ERR_CannotConvertValue2 = 30742
'ERR_ArrayElementIsNothing = 30744
'ERR_InternalCompilerError = 30747
'ERR_InvalidCast1 = 30748
'ERR_UnableToGetValue = 30749
'ERR_UnableToLoadType1 = 30750
'ERR_UnableToGetTypeInformationFor1 = 30751
ERR_OnErrorInSyncLock = 30752
ERR_NarrowingConversionCollection2 = 30753
ERR_GotoIntoTryHandler = 30754
ERR_GotoIntoSyncLock = 30755
ERR_GotoIntoWith = 30756
ERR_GotoIntoFor = 30757
ERR_BadAttributeNonPublicConstructor = 30758
'ERR_ArrayElementIsNothing1 = 30759
'ERR_ObjectReferenceIsNothing = 30760
' ERR_StarliteDisallowsLateBinding = 30762
' ERR_StarliteBadDeclareFlags = 30763
' ERR_NoStarliteOverloadResolution = 30764
'ERR_NoSupportFileIOKeywords1 = 30766
' ERR_NoSupportGetStatement = 30767 - starlite error message
' ERR_NoSupportLineKeyword = 30768 cut from Roslyn
' ERR_StarliteDisallowsEndStatement = 30769 cut from Roslyn
ERR_DefaultEventNotFound1 = 30770
ERR_InvalidNonSerializedUsage = 30772
'ERR_NoContinueInDebugger = 30780
ERR_ExpectedContinueKind = 30781
ERR_ContinueDoNotWithinDo = 30782
ERR_ContinueForNotWithinFor = 30783
ERR_ContinueWhileNotWithinWhile = 30784
ERR_DuplicateParameterSpecifier = 30785
ERR_ModuleCantUseDLLDeclareSpecifier1 = 30786
ERR_StructCantUseDLLDeclareSpecifier1 = 30791
ERR_TryCastOfValueType1 = 30792
ERR_TryCastOfUnconstrainedTypeParam1 = 30793
ERR_AmbiguousDelegateBinding2 = 30794
ERR_SharedStructMemberCannotSpecifyNew = 30795
ERR_GenericSubMainsFound1 = 30796
ERR_GeneralProjectImportsError3 = 30797
ERR_InvalidTypeForAliasesImport2 = 30798
ERR_UnsupportedConstant2 = 30799
ERR_ObsoleteArgumentsNeedParens = 30800
ERR_ObsoleteLineNumbersAreLabels = 30801
ERR_ObsoleteStructureNotType = 30802
'ERR_ObsoleteDecimalNotCurrency = 30803 cut from Roslyn
ERR_ObsoleteObjectNotVariant = 30804
'ERR_ObsoleteArrayBounds = 30805 unused in Roslyn
ERR_ObsoleteLetSetNotNeeded = 30807
ERR_ObsoletePropertyGetLetSet = 30808
ERR_ObsoleteWhileWend = 30809
'ERR_ObsoleteStaticMethod = 30810 cut from Roslyn
ERR_ObsoleteRedimAs = 30811
ERR_ObsoleteOptionalWithoutValue = 30812
ERR_ObsoleteGosub = 30814
'ERR_ObsoleteFileIOKeywords1 = 30815 cut from Roslyn
'ERR_ObsoleteDebugKeyword1 = 30816 cut from Roslyn
ERR_ObsoleteOnGotoGosub = 30817
'ERR_ObsoleteMathCompatKeywords1 = 30818 cut from Roslyn
'ERR_ObsoleteMathKeywords2 = 30819 cut from Roslyn
'ERR_ObsoleteLsetKeyword1 = 30820 cut from Roslyn
'ERR_ObsoleteRsetKeyword1 = 30821 cut from Roslyn
'ERR_ObsoleteNullKeyword1 = 30822 cut from Roslyn
'ERR_ObsoleteEmptyKeyword1 = 30823 cut from Roslyn
ERR_ObsoleteEndIf = 30826
ERR_ObsoleteExponent = 30827
ERR_ObsoleteAsAny = 30828
ERR_ObsoleteGetStatement = 30829
'ERR_ObsoleteLineKeyword = 30830 cut from Roslyn
ERR_OverrideWithArrayVsParamArray2 = 30906
'// CONSIDER :harishk - improve this error message
ERR_CircularBaseDependencies4 = 30907
ERR_NestedBase2 = 30908
ERR_AccessMismatchOutsideAssembly4 = 30909
ERR_InheritanceAccessMismatchOutside3 = 30910
ERR_UseOfObsoletePropertyAccessor3 = 30911
ERR_UseOfObsoletePropertyAccessor2 = 30912
ERR_AccessMismatchImplementedEvent6 = 30914
ERR_AccessMismatchImplementedEvent4 = 30915
ERR_InheritanceCycleInImportedType1 = 30916
ERR_NoNonObsoleteConstructorOnBase3 = 30917
ERR_NoNonObsoleteConstructorOnBase4 = 30918
ERR_RequiredNonObsoleteNewCall3 = 30919
ERR_RequiredNonObsoleteNewCall4 = 30920
ERR_InheritsTypeArgAccessMismatch7 = 30921
ERR_InheritsTypeArgAccessMismatchOutside5 = 30922
'ERR_AccessMismatchTypeArgImplEvent7 = 30923 unused in Roslyn
'ERR_AccessMismatchTypeArgImplEvent5 = 30924 unused in Roslyn
ERR_PartialTypeAccessMismatch3 = 30925
ERR_PartialTypeBadMustInherit1 = 30926
ERR_MustOverOnNotInheritPartClsMem1 = 30927
ERR_BaseMismatchForPartialClass3 = 30928
ERR_PartialTypeTypeParamNameMismatch3 = 30931
ERR_PartialTypeConstraintMismatch1 = 30932
ERR_LateBoundOverloadInterfaceCall1 = 30933
ERR_RequiredAttributeConstConversion2 = 30934
ERR_AmbiguousOverrides3 = 30935
ERR_OverriddenCandidate1 = 30936
ERR_AmbiguousImplements3 = 30937
ERR_AddressOfNotCreatableDelegate1 = 30939
'ERR_ReturnFromEventMethod = 30940 unused in Roslyn
'ERR_BadEmptyStructWithCustomEvent1 = 30941
ERR_ComClassGenericMethod = 30943
ERR_SyntaxInCastOp = 30944
'ERR_UnimplementedBadMemberEvent = 30945 Cut in Roslyn
'ERR_EvaluationStopRequested = 30946
'ERR_EvaluationSuspendRequested = 30947
'ERR_EvaluationUnscheduledFiber = 30948
ERR_ArrayInitializerForNonConstDim = 30949
ERR_DelegateBindingFailure3 = 30950
'ERR_DelegateBindingTypeInferenceFails2 = 30952
'ERR_ConstraintViolationError1 = 30953
'ERR_ConstraintsFailedForInferredArgs2 = 30954
'ERR_TypeMismatchDLLProjectMix6 = 30955
'ERR_EvaluationPriorTimeout = 30957
'ERR_EvaluationENCObjectOutdated = 30958
' Obsolete ERR_TypeRefFromMetadataToVBUndef = 30960
'ERR_TypeMismatchMixedDLLs6 = 30961
'ERR_ReferencedAssemblyCausesCycle3 = 30962
'ERR_AssemblyRefAssembly2 = 30963
'ERR_AssemblyRefProject2 = 30964
'ERR_ProjectRefAssembly2 = 30965
'ERR_ProjectRefProject2 = 30966
'ERR_ReferencedAssembliesAmbiguous4 = 30967
'ERR_ReferencedAssembliesAmbiguous6 = 30968
'ERR_ReferencedProjectsAmbiguous4 = 30969
'ERR_GeneralErrorMixedDLLs5 = 30970
'ERR_GeneralErrorDLLProjectMix5 = 30971
ERR_StructLayoutAttributeNotAllowed = 30972
'ERR_ClassNotLoadedDuringDebugging = 30973
'ERR_UnableToEvaluateComment = 30974
'ERR_ForIndexInUse = 30975
'ERR_NextForMismatch = 30976
ERR_IterationVariableShadowLocal1 = 30978
ERR_InvalidOptionInfer = 30979
ERR_CircularInference1 = 30980
ERR_InAccessibleOverridingMethod5 = 30981
ERR_NoSuitableWidestType1 = 30982
ERR_AmbiguousWidestType3 = 30983
ERR_ExpectedAssignmentOperatorInInit = 30984
ERR_ExpectedQualifiedNameInInit = 30985
ERR_ExpectedLbrace = 30987
ERR_UnrecognizedTypeOrWith = 30988
ERR_DuplicateAggrMemberInit1 = 30989
ERR_NonFieldPropertyAggrMemberInit1 = 30990
ERR_SharedMemberAggrMemberInit1 = 30991
ERR_ParameterizedPropertyInAggrInit1 = 30992
ERR_NoZeroCountArgumentInitCandidates1 = 30993
ERR_AggrInitInvalidForObject = 30994
'ERR_BadWithRefInConstExpr = 30995
ERR_InitializerExpected = 30996
ERR_LineContWithCommentOrNoPrecSpace = 30999
' ERR_MemberNotFoundForNoPia = 31000 not used in Roslyn. This looks to be a VB EE message
ERR_InvInsideEnum = 31001
ERR_InvInsideBlock = 31002
ERR_UnexpectedExpressionStatement = 31003
ERR_WinRTEventWithoutDelegate = 31004
ERR_SecurityCriticalAsyncInClassOrStruct = 31005
ERR_SecurityCriticalAsync = 31006
ERR_BadModuleFile1 = 31007
ERR_BadRefLib1 = 31011
'ERR_UnableToLoadDll1 = 31013
'ERR_BadDllEntrypoint2 = 31014
'ERR_BadOutputFile1 = 31019
'ERR_BadOutputStream = 31020
'ERR_DeadBackgroundThread = 31021
'ERR_XMLParserError = 31023
'ERR_UnableToCreateMetaDataAPI = 31024
'ERR_UnableToOpenFile1 = 31027
ERR_EventHandlerSignatureIncompatible2 = 31029
ERR_ProjectCCError1 = 31030
'ERR_ProjectCCError0 = 31031
ERR_InterfaceImplementedTwice1 = 31033
ERR_InterfaceNotImplemented1 = 31035
ERR_AmbiguousImplementsMember3 = 31040
'ERR_BadInterfaceMember = 31041
ERR_ImplementsOnNew = 31042
ERR_ArrayInitInStruct = 31043
ERR_EventTypeNotDelegate = 31044
ERR_ProtectedTypeOutsideClass = 31047
ERR_DefaultPropertyWithNoParams = 31048
ERR_InitializerInStruct = 31049
ERR_DuplicateImport1 = 31051
ERR_BadModuleFlags1 = 31052
ERR_ImplementsStmtWrongOrder = 31053
ERR_MemberConflictWithSynth4 = 31058
ERR_SynthMemberClashesWithSynth7 = 31059
ERR_SynthMemberClashesWithMember5 = 31060
ERR_MemberClashesWithSynth6 = 31061
ERR_SetHasOnlyOneParam = 31063
ERR_SetValueNotPropertyType = 31064
ERR_SetHasToBeByVal1 = 31065
ERR_StructureCantUseProtected = 31067
ERR_BadInterfaceDelegateSpecifier1 = 31068
ERR_BadInterfaceEnumSpecifier1 = 31069
ERR_BadInterfaceClassSpecifier1 = 31070
ERR_BadInterfaceStructSpecifier1 = 31071
'ERR_WarningTreatedAsError = 31072
'ERR_DelegateConstructorMissing1 = 31074 unused in Roslyn
ERR_UseOfObsoleteSymbolNoMessage1 = 31075
ERR_MetaDataIsNotAssembly = 31076
ERR_MetaDataIsNotModule = 31077
ERR_ReferenceComparison3 = 31080
ERR_CatchVariableNotLocal1 = 31082
ERR_ModuleMemberCantImplement = 31083
ERR_EventDelegatesCantBeFunctions = 31084
ERR_InvalidDate = 31085
ERR_CantOverride4 = 31086
ERR_CantSpecifyArraysOnBoth = 31087
ERR_NotOverridableRequiresOverrides = 31088
ERR_PrivateTypeOutsideType = 31089
ERR_TypeRefResolutionError3 = 31091
ERR_ParamArrayWrongType = 31092
ERR_CoClassMissing2 = 31094
ERR_InvalidMeReference = 31095
ERR_InvalidImplicitMeReference = 31096
ERR_RuntimeMemberNotFound2 = 31097
'ERR_RuntimeClassNotFound1 = 31098
ERR_BadPropertyAccessorFlags = 31099
ERR_BadPropertyAccessorFlagsRestrict = 31100
ERR_OnlyOneAccessorForGetSet = 31101
ERR_NoAccessibleSet = 31102
ERR_NoAccessibleGet = 31103
ERR_WriteOnlyNoAccessorFlag = 31104
ERR_ReadOnlyNoAccessorFlag = 31105
ERR_BadPropertyAccessorFlags1 = 31106
ERR_BadPropertyAccessorFlags2 = 31107
ERR_BadPropertyAccessorFlags3 = 31108
ERR_InAccessibleCoClass3 = 31109
ERR_MissingValuesForArraysInApplAttrs = 31110
ERR_ExitEventMemberNotInvalid = 31111
ERR_InvInsideEndsEvent = 31112
'ERR_EventMemberSyntax = 31113 abandoned per KevinH analysis. Roslyn bug 1637
ERR_MissingEndEvent = 31114
ERR_MissingEndAddHandler = 31115
ERR_MissingEndRemoveHandler = 31116
ERR_MissingEndRaiseEvent = 31117
'ERR_EndAddHandlerNotAtLineStart = 31118
'ERR_EndRemoveHandlerNotAtLineStart = 31119
'ERR_EndRaiseEventNotAtLineStart = 31120
ERR_CustomEventInvInInterface = 31121
ERR_CustomEventRequiresAs = 31122
ERR_InvalidEndEvent = 31123
ERR_InvalidEndAddHandler = 31124
ERR_InvalidEndRemoveHandler = 31125
ERR_InvalidEndRaiseEvent = 31126
ERR_DuplicateAddHandlerDef = 31127
ERR_DuplicateRemoveHandlerDef = 31128
ERR_DuplicateRaiseEventDef = 31129
ERR_MissingAddHandlerDef1 = 31130
ERR_MissingRemoveHandlerDef1 = 31131
ERR_MissingRaiseEventDef1 = 31132
ERR_EventAddRemoveHasOnlyOneParam = 31133
ERR_EventAddRemoveByrefParamIllegal = 31134
ERR_SpecifiersInvOnEventMethod = 31135
ERR_AddRemoveParamNotEventType = 31136
ERR_RaiseEventShapeMismatch1 = 31137
ERR_EventMethodOptionalParamIllegal1 = 31138
ERR_CantReferToMyGroupInsideGroupType1 = 31139
ERR_InvalidUseOfCustomModifier = 31140
ERR_InvalidOptionStrictCustom = 31141
ERR_ObsoleteInvalidOnEventMember = 31142
ERR_DelegateBindingIncompatible2 = 31143
ERR_ExpectedXmlName = 31146
ERR_UndefinedXmlPrefix = 31148
ERR_DuplicateXmlAttribute = 31149
ERR_MismatchedXmlEndTag = 31150
ERR_MissingXmlEndTag = 31151
ERR_ReservedXmlPrefix = 31152
ERR_MissingVersionInXmlDecl = 31153
ERR_IllegalAttributeInXmlDecl = 31154
ERR_QuotedEmbeddedExpression = 31155
ERR_VersionMustBeFirstInXmlDecl = 31156
ERR_AttributeOrder = 31157
'ERR_UnexpectedXmlName = 31158
ERR_ExpectedXmlEndEmbedded = 31159
ERR_ExpectedXmlEndPI = 31160
ERR_ExpectedXmlEndComment = 31161
ERR_ExpectedXmlEndCData = 31162
ERR_ExpectedSQuote = 31163
ERR_ExpectedQuote = 31164
ERR_ExpectedLT = 31165
ERR_StartAttributeValue = 31166
ERR_ExpectedDiv = 31167
ERR_NoXmlAxesLateBinding = 31168
ERR_IllegalXmlStartNameChar = 31169
ERR_IllegalXmlNameChar = 31170
ERR_IllegalXmlCommentChar = 31171
ERR_EmbeddedExpression = 31172
ERR_ExpectedXmlWhiteSpace = 31173
ERR_IllegalProcessingInstructionName = 31174
ERR_DTDNotSupported = 31175
'ERR_IllegalXmlChar = 31176 unused in Dev10
ERR_IllegalXmlWhiteSpace = 31177
ERR_ExpectedSColon = 31178
ERR_ExpectedXmlBeginEmbedded = 31179
ERR_XmlEntityReference = 31180
ERR_InvalidAttributeValue1 = 31181
ERR_InvalidAttributeValue2 = 31182
ERR_ReservedXmlNamespace = 31183
ERR_IllegalDefaultNamespace = 31184
'ERR_RequireAggregateInitializationImpl = 31185
ERR_QualifiedNameNotAllowed = 31186
ERR_ExpectedXmlns = 31187
'ERR_DefaultNamespaceNotSupported = 31188 Not reported by Dev10.
ERR_IllegalXmlnsPrefix = 31189
ERR_XmlFeaturesNotAvailable = 31190
'ERR_UnableToEmbedUacManifest = 31191 now reporting ErrorCreatingWin32ResourceFile
ERR_UnableToReadUacManifest2 = 31192
'ERR_UseValueForXmlExpression3 = 31193 ' Replaced by WRN_UseValueForXmlExpression3
ERR_TypeMismatchForXml3 = 31194
ERR_BinaryOperandsForXml4 = 31195
'ERR_XmlFeaturesNotAvailableDebugger = 31196
ERR_FullWidthAsXmlDelimiter = 31197
'ERR_XmlRequiresParens = 31198 No Longer Reported. Removed per 926946.
ERR_XmlEndCDataNotAllowedInContent = 31198
'ERR_UacALink3Missing = 31199 not used in Roslyn.
'ERR_XmlFeaturesNotSupported = 31200 not detected by the Roslyn compiler
ERR_EventImplRemoveHandlerParamWrong = 31201
ERR_MixingWinRTAndNETEvents = 31202
ERR_AddParamWrongForWinRT = 31203
ERR_RemoveParamWrongForWinRT = 31204
ERR_ReImplementingWinRTInterface5 = 31205
ERR_ReImplementingWinRTInterface4 = 31206
ERR_XmlEndElementNoMatchingStart = 31207
ERR_UndefinedTypeOrNamespace1 = 31208
ERR_BadInterfaceInterfaceSpecifier1 = 31209
ERR_TypeClashesWithVbCoreType4 = 31210
ERR_SecurityAttributeMissingAction = 31211
ERR_SecurityAttributeInvalidAction = 31212
ERR_SecurityAttributeInvalidActionAssembly = 31213
ERR_SecurityAttributeInvalidActionTypeOrMethod = 31214
ERR_PrincipalPermissionInvalidAction = 31215
ERR_PermissionSetAttributeInvalidFile = 31216
ERR_PermissionSetAttributeFileReadError = 31217
ERR_ExpectedWarningKeyword = 31218
'// NOTE: If you add any new errors that may be attached to a symbol during meta-import when it is marked as bad,
'// particularly if it applies to method symbols, please appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember.
'// Failure to do so may break customer code.
'// AVAILABLE 31219-31390
ERR_InvalidSubsystemVersion = 31391
ERR_LibAnycpu32bitPreferredConflict = 31392
ERR_RestrictedAccess = 31393
ERR_RestrictedConversion1 = 31394
ERR_NoTypecharInLabel = 31395
ERR_RestrictedType1 = 31396
ERR_NoTypecharInAlias = 31398
ERR_NoAccessibleConstructorOnBase = 31399
ERR_BadStaticLocalInStruct = 31400
ERR_DuplicateLocalStatic1 = 31401
ERR_ImportAliasConflictsWithType2 = 31403
ERR_CantShadowAMustOverride1 = 31404
'ERR_OptionalsCantBeStructs = 31405
ERR_MultipleEventImplMismatch3 = 31407
ERR_BadSpecifierCombo2 = 31408
ERR_MustBeOverloads2 = 31409
'ERR_CantOverloadOnMultipleInheritance = 31410
ERR_MustOverridesInClass1 = 31411
ERR_HandlesSyntaxInClass = 31412
ERR_SynthMemberShadowsMustOverride5 = 31413
'ERR_CantImplementNonVirtual3 = 31415 unused in Roslyn
' ERR_MemberShadowsSynthMustOverride5 = 31416 unused in Roslyn
ERR_CannotOverrideInAccessibleMember = 31417
ERR_HandlesSyntaxInModule = 31418
ERR_IsNotOpRequiresReferenceTypes1 = 31419
ERR_ClashWithReservedEnumMember1 = 31420
ERR_MultiplyDefinedEnumMember2 = 31421
ERR_BadUseOfVoid = 31422
ERR_EventImplMismatch5 = 31423
ERR_ForwardedTypeUnavailable3 = 31424
ERR_TypeFwdCycle2 = 31425
ERR_BadTypeInCCExpression = 31426
ERR_BadCCExpression = 31427
ERR_VoidArrayDisallowed = 31428
ERR_MetadataMembersAmbiguous3 = 31429
ERR_TypeOfExprAlwaysFalse2 = 31430
ERR_OnlyPrivatePartialMethods1 = 31431
ERR_PartialMethodsMustBePrivate = 31432
ERR_OnlyOnePartialMethodAllowed2 = 31433
ERR_OnlyOneImplementingMethodAllowed3 = 31434
ERR_PartialMethodMustBeEmpty = 31435
ERR_PartialMethodsMustBeSub1 = 31437
ERR_PartialMethodGenericConstraints2 = 31438
ERR_PartialDeclarationImplements1 = 31439
ERR_NoPartialMethodInAddressOf1 = 31440
ERR_ImplementationMustBePrivate2 = 31441
ERR_PartialMethodParamNamesMustMatch3 = 31442
ERR_PartialMethodTypeParamNameMismatch3 = 31443
ERR_PropertyDoesntImplementAllAccessors = 31444
ERR_InvalidAttributeUsageOnAccessor = 31445
ERR_NestedTypeInInheritsClause2 = 31446
ERR_TypeInItsInheritsClause1 = 31447
ERR_BaseTypeReferences2 = 31448
ERR_IllegalBaseTypeReferences3 = 31449
ERR_InvalidCoClass1 = 31450
ERR_InvalidOutputName = 31451
ERR_InvalidFileAlignment = 31452
ERR_InvalidDebugInformationFormat = 31453
'// NOTE: If you add any new errors that may be attached to a symbol during meta-import when it is marked as bad,
'// particularly if it applies to method symbols, please appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember.
'// Failure to do so may break customer code.
'// AVAILABLE 31451 - 31497
ERR_ConstantStringTooLong = 31498
ERR_MustInheritEventNotOverridden = 31499
ERR_BadAttributeSharedProperty1 = 31500
ERR_BadAttributeReadOnlyProperty1 = 31501
ERR_DuplicateResourceName1 = 31502
ERR_AttributeMustBeClassNotStruct1 = 31503
ERR_AttributeMustInheritSysAttr = 31504
'ERR_AttributeMustHaveAttrUsageAttr = 31505 unused in Roslyn.
ERR_AttributeCannotBeAbstract = 31506
' ERR_AttributeCannotHaveMustOverride = 31507 - reported by dev10 but error is redundant. ERR_AttributeCannotBeAbstract covers this case.
'ERR_CantFindCORSystemDirectory = 31508
ERR_UnableToOpenResourceFile1 = 31509
'ERR_BadAttributeConstField1 = 31510
ERR_BadAttributeNonPublicProperty1 = 31511
ERR_STAThreadAndMTAThread0 = 31512
'ERR_STAThreadAndMTAThread1 = 31513
'//If you make any change involving this error, such as creating a more specific version for use
'//in a particular context, please make sure to appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember
ERR_IndirectUnreferencedAssembly4 = 31515
ERR_BadAttributeNonPublicType1 = 31516
ERR_BadAttributeNonPublicContType2 = 31517
'ERR_AlinkManifestFilepathTooLong = 31518 this scenario reports a more generic error
ERR_BadMetaDataReference1 = 31519
' ERR_ErrorApplyingSecurityAttribute1 = 31520 ' ' we're now reporting more detailed diagnostics: ERR_SecurityAttributeMissingAction, ERR_SecurityAttributeInvalidAction, ERR_SecurityAttributeInvalidActionAssembly or ERR_SecurityAttributeInvalidActionTypeOrMethod
'ERR_DuplicateModuleAttribute1 = 31521
ERR_DllImportOnNonEmptySubOrFunction = 31522
ERR_DllImportNotLegalOnDeclare = 31523
ERR_DllImportNotLegalOnGetOrSet = 31524
'ERR_TypeImportedFromDiffAssemVersions3 = 31525
ERR_DllImportOnGenericSubOrFunction = 31526
ERR_ComClassOnGeneric = 31527
'//If you make any change involving this error, such as creating a more specific version for use
'//in a particular context, please make sure to appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember
'ERR_IndirectUnreferencedAssembly3 = 31528
ERR_DllImportOnInstanceMethod = 31529
ERR_DllImportOnInterfaceMethod = 31530
ERR_DllImportNotLegalOnEventMethod = 31531
'//If you make any change involving these errors, such as creating more specific versions for use
'//in other contexts, please make sure to appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember
'ERR_IndirectUnreferencedProject3 = 31532
'ERR_IndirectUnreferencedProject2 = 31533
ERR_FriendAssemblyBadArguments = 31534
ERR_FriendAssemblyStrongNameRequired = 31535
'ERR_FriendAssemblyRejectBinding = 31536 EDMAURER This has been replaced with two, more specific errors ERR_FriendRefNotEqualToThis and ERR_FriendRefSigningMismatch.
ERR_FriendAssemblyNameInvalid = 31537
ERR_FriendAssemblyBadAccessOverride2 = 31538
ERR_AbsentReferenceToPIA1 = 31539
'ERR_CorlibMissingPIAClasses1 = 31540 EDMAURER Roslyn uses the ordinary missing required type message
ERR_CannotLinkClassWithNoPIA1 = 31541
ERR_InvalidStructMemberNoPIA1 = 31542
ERR_NoPIAAttributeMissing2 = 31543
ERR_NestedGlobalNamespace = 31544
'ERR_NewCoClassNoPIA = 31545 EDMAURER Roslyn gives 31541
'ERR_EventNoPIANoDispID = 31546
'ERR_EventNoPIANoGuid1 = 31547
'ERR_EventNoPIANoComEventInterface1 = 31548
ERR_PIAHasNoAssemblyGuid1 = 31549
'ERR_StructureExplicitFieldLacksOffset = 31550
'ERR_CannotLinkEventInterfaceWithNoPIA1 = 31551
ERR_DuplicateLocalTypes3 = 31552
ERR_PIAHasNoTypeLibAttribute1 = 31553
' ERR_NoPiaEventsMissingSystemCore = 31554 use ordinary missing required type
' ERR_SourceInterfaceMustExist = 31555
ERR_SourceInterfaceMustBeInterface = 31556
ERR_EventNoPIANoBackingMember = 31557
ERR_NestedInteropType = 31558 ' used to be ERR_InvalidInteropType
ERR_IsNestedIn2 = 31559
ERR_LocalTypeNameClash2 = 31560
ERR_InteropMethodWithBody1 = 31561
ERR_UseOfLocalBeforeDeclaration1 = 32000
ERR_UseOfKeywordFromModule1 = 32001
'ERR_UseOfKeywordOutsideClass1 = 32002
'ERR_SymbolFromUnreferencedProject3 = 32004
ERR_BogusWithinLineIf = 32005
ERR_CharToIntegralTypeMismatch1 = 32006
ERR_IntegralToCharTypeMismatch1 = 32007
ERR_NoDirectDelegateConstruction1 = 32008
ERR_MethodMustBeFirstStatementOnLine = 32009
ERR_AttrAssignmentNotFieldOrProp1 = 32010
ERR_StrictDisallowsObjectComparison1 = 32013
ERR_NoConstituentArraySizes = 32014
ERR_FileAttributeNotAssemblyOrModule = 32015
ERR_FunctionResultCannotBeIndexed1 = 32016
ERR_ArgumentSyntax = 32017
ERR_ExpectedResumeOrGoto = 32019
ERR_ExpectedAssignmentOperator = 32020
ERR_NamedArgAlsoOmitted2 = 32021
ERR_CannotCallEvent1 = 32022
ERR_ForEachCollectionDesignPattern1 = 32023
ERR_DefaultValueForNonOptionalParam = 32024
' ERR_RegionWithinMethod = 32025 removed this limitation in Roslyn
'ERR_SpecifiersInvalidOnNamespace = 32026 abandoned, now giving 'Specifiers and attributes are not valid on this statement.'
ERR_ExpectedDotAfterMyBase = 32027
ERR_ExpectedDotAfterMyClass = 32028
ERR_StrictArgumentCopyBackNarrowing3 = 32029
ERR_LbElseifAfterElse = 32030
'ERR_EndSubNotAtLineStart = 32031
'ERR_EndFunctionNotAtLineStart = 32032
'ERR_EndGetNotAtLineStart = 32033
'ERR_EndSetNotAtLineStart = 32034
ERR_StandaloneAttribute = 32035
ERR_NoUniqueConstructorOnBase2 = 32036
ERR_ExtraNextVariable = 32037
ERR_RequiredNewCallTooMany2 = 32038
ERR_ForCtlVarArraySizesSpecified = 32039
ERR_BadFlagsOnNewOverloads = 32040
ERR_TypeCharOnGenericParam = 32041
ERR_TooFewGenericArguments1 = 32042
ERR_TooManyGenericArguments1 = 32043
ERR_GenericConstraintNotSatisfied2 = 32044
ERR_TypeOrMemberNotGeneric1 = 32045
ERR_NewIfNullOnGenericParam = 32046
ERR_MultipleClassConstraints1 = 32047
ERR_ConstNotClassInterfaceOrTypeParam1 = 32048
ERR_DuplicateTypeParamName1 = 32049
ERR_UnboundTypeParam2 = 32050
ERR_IsOperatorGenericParam1 = 32052
ERR_ArgumentCopyBackNarrowing3 = 32053
ERR_ShadowingGenericParamWithMember1 = 32054
ERR_GenericParamBase2 = 32055
ERR_ImplementsGenericParam = 32056
'ERR_ExpressionCannotBeGeneric1 = 32058 unused in Roslyn
ERR_OnlyNullLowerBound = 32059
ERR_ClassConstraintNotInheritable1 = 32060
ERR_ConstraintIsRestrictedType1 = 32061
ERR_GenericParamsOnInvalidMember = 32065
ERR_GenericArgsOnAttributeSpecifier = 32066
ERR_AttrCannotBeGenerics = 32067
ERR_BadStaticLocalInGenericMethod = 32068
ERR_SyntMemberShadowsGenericParam3 = 32070
ERR_ConstraintAlreadyExists1 = 32071
ERR_InterfacePossiblyImplTwice2 = 32072
ERR_ModulesCannotBeGeneric = 32073
ERR_GenericClassCannotInheritAttr = 32074
ERR_DeclaresCantBeInGeneric = 32075
'ERR_GenericTypeRequiresTypeArgs1 = 32076
ERR_OverrideWithConstraintMismatch2 = 32077
ERR_ImplementsWithConstraintMismatch3 = 32078
ERR_OpenTypeDisallowed = 32079
ERR_HandlesInvalidOnGenericMethod = 32080
ERR_MultipleNewConstraints = 32081
ERR_MustInheritForNewConstraint2 = 32082
ERR_NoSuitableNewForNewConstraint2 = 32083
ERR_BadGenericParamForNewConstraint2 = 32084
ERR_NewArgsDisallowedForTypeParam = 32085
ERR_DuplicateRawGenericTypeImport1 = 32086
ERR_NoTypeArgumentCountOverloadCand1 = 32087
ERR_TypeArgsUnexpected = 32088
ERR_NameSameAsMethodTypeParam1 = 32089
ERR_TypeParamNameFunctionNameCollision = 32090
'ERR_OverloadsMayUnify2 = 32091 unused in Roslyn
ERR_BadConstraintSyntax = 32092
ERR_OfExpected = 32093
ERR_ArrayOfRawGenericInvalid = 32095
ERR_ForEachAmbiguousIEnumerable1 = 32096
ERR_IsNotOperatorGenericParam1 = 32097
ERR_TypeParamQualifierDisallowed = 32098
ERR_TypeParamMissingCommaOrRParen = 32099
ERR_TypeParamMissingAsCommaOrRParen = 32100
ERR_MultipleReferenceConstraints = 32101
ERR_MultipleValueConstraints = 32102
ERR_NewAndValueConstraintsCombined = 32103
ERR_RefAndValueConstraintsCombined = 32104
ERR_BadTypeArgForStructConstraint2 = 32105
ERR_BadTypeArgForRefConstraint2 = 32106
ERR_RefAndClassTypeConstrCombined = 32107
ERR_ValueAndClassTypeConstrCombined = 32108
ERR_ConstraintClashIndirectIndirect4 = 32109
ERR_ConstraintClashDirectIndirect3 = 32110
ERR_ConstraintClashIndirectDirect3 = 32111
ERR_ConstraintCycleLink2 = 32112
ERR_ConstraintCycle2 = 32113
ERR_TypeParamWithStructConstAsConst = 32114
ERR_NullableDisallowedForStructConstr1 = 32115
'ERR_NoAccessibleNonGeneric1 = 32117
'ERR_NoAccessibleGeneric1 = 32118
ERR_ConflictingDirectConstraints3 = 32119
ERR_InterfaceUnifiesWithInterface2 = 32120
ERR_BaseUnifiesWithInterfaces3 = 32121
ERR_InterfaceBaseUnifiesWithBase4 = 32122
ERR_InterfaceUnifiesWithBase3 = 32123
ERR_OptionalsCantBeStructGenericParams = 32124 'TODO: remove
'ERR_InterfaceMethodImplsUnify3 = 32125
ERR_AddressOfNullableMethod = 32126
ERR_IsOperatorNullable1 = 32127
ERR_IsNotOperatorNullable1 = 32128
'ERR_NullableOnEnum = 32129
'ERR_NoNullableType = 32130 unused in Roslyn
ERR_ClassInheritsBaseUnifiesWithInterfaces3 = 32131
ERR_ClassInheritsInterfaceBaseUnifiesWithBase4 = 32132
ERR_ClassInheritsInterfaceUnifiesWithBase3 = 32133
ERR_ShadowingTypeOutsideClass1 = 32200
ERR_PropertySetParamCollisionWithValue = 32201
'ERR_EventNameTooLong = 32204 ' Deprecated in favor of ERR_TooLongMetadataName
'ERR_WithEventsNameTooLong = 32205 ' Deprecated in favor of ERR_TooLongMetadataName
ERR_SxSIndirectRefHigherThanDirectRef3 = 32207
ERR_DuplicateReference2 = 32208
'ERR_SxSLowerVerIndirectRefNotEmitted4 = 32209 not used in Roslyn
ERR_DuplicateReferenceStrong = 32210
ERR_IllegalCallOrIndex = 32303
ERR_ConflictDefaultPropertyAttribute = 32304
'ERR_ClassCannotCreated = 32400
ERR_BadAttributeUuid2 = 32500
ERR_ComClassAndReservedAttribute1 = 32501
ERR_ComClassRequiresPublicClass2 = 32504
ERR_ComClassReservedDispIdZero1 = 32505
ERR_ComClassReservedDispId1 = 32506
ERR_ComClassDuplicateGuids1 = 32507
ERR_ComClassCantBeAbstract0 = 32508
ERR_ComClassRequiresPublicClass1 = 32509
'ERR_DefaultCharSetAttributeNotSupported = 32510
ERR_UnknownOperator = 33000
ERR_DuplicateConversionCategoryUsed = 33001
ERR_OperatorNotOverloadable = 33002
ERR_InvalidHandles = 33003
ERR_InvalidImplements = 33004
ERR_EndOperatorExpected = 33005
ERR_EndOperatorNotAtLineStart = 33006
ERR_InvalidEndOperator = 33007
ERR_ExitOperatorNotValid = 33008
ERR_ParamArrayIllegal1 = 33009
ERR_OptionalIllegal1 = 33010
ERR_OperatorMustBePublic = 33011
ERR_OperatorMustBeShared = 33012
ERR_BadOperatorFlags1 = 33013
ERR_OneParameterRequired1 = 33014
ERR_TwoParametersRequired1 = 33015
ERR_OneOrTwoParametersRequired1 = 33016
ERR_ConvMustBeWideningOrNarrowing = 33017
ERR_OperatorDeclaredInModule = 33018
ERR_InvalidSpecifierOnNonConversion1 = 33019
ERR_UnaryParamMustBeContainingType1 = 33020
ERR_BinaryParamMustBeContainingType1 = 33021
ERR_ConvParamMustBeContainingType1 = 33022
ERR_OperatorRequiresBoolReturnType1 = 33023
ERR_ConversionToSameType = 33024
ERR_ConversionToInterfaceType = 33025
ERR_ConversionToBaseType = 33026
ERR_ConversionToDerivedType = 33027
ERR_ConversionToObject = 33028
ERR_ConversionFromInterfaceType = 33029
ERR_ConversionFromBaseType = 33030
ERR_ConversionFromDerivedType = 33031
ERR_ConversionFromObject = 33032
ERR_MatchingOperatorExpected2 = 33033
ERR_UnacceptableLogicalOperator3 = 33034
ERR_ConditionOperatorRequired3 = 33035
ERR_CopyBackTypeMismatch3 = 33037
ERR_ForLoopOperatorRequired2 = 33038
ERR_UnacceptableForLoopOperator2 = 33039
ERR_UnacceptableForLoopRelOperator2 = 33040
ERR_OperatorRequiresIntegerParameter1 = 33041
ERR_CantSpecifyNullableOnBoth = 33100
ERR_BadTypeArgForStructConstraintNull = 33101
ERR_CantSpecifyArrayAndNullableOnBoth = 33102
ERR_CantSpecifyTypeCharacterOnIIF = 33103
ERR_IllegalOperandInIIFCount = 33104
ERR_IllegalOperandInIIFName = 33105
ERR_IllegalOperandInIIFConversion = 33106
ERR_IllegalCondTypeInIIF = 33107
ERR_CantCallIIF = 33108
ERR_CantSpecifyAsNewAndNullable = 33109
ERR_IllegalOperandInIIFConversion2 = 33110
ERR_BadNullTypeInCCExpression = 33111
ERR_NullableImplicit = 33112
'// NOTE: If you add any new errors that may be attached to a symbol during meta-import when it is marked as bad,
'// particularly if it applies to method symbols, please appropriately modify Bindable::ResolveOverloadingShouldSkipBadMember.
'// Failure to do so may break customer code.
'// AVAILABLE 33113 - 34999
ERR_MissingRuntimeHelper = 35000
'ERR_NoStdModuleAttribute = 35001 ' Note: we're now reporting a use site error in this case.
'ERR_NoOptionTextAttribute = 35002
ERR_DuplicateResourceFileName1 = 35003
ERR_ExpectedDotAfterGlobalNameSpace = 36000
ERR_NoGlobalExpectedIdentifier = 36001
ERR_NoGlobalInHandles = 36002
ERR_ElseIfNoMatchingIf = 36005
ERR_BadAttributeConstructor2 = 36006
ERR_EndUsingWithoutUsing = 36007
ERR_ExpectedEndUsing = 36008
ERR_GotoIntoUsing = 36009
ERR_UsingRequiresDisposePattern = 36010
ERR_UsingResourceVarNeedsInitializer = 36011
ERR_UsingResourceVarCantBeArray = 36012
ERR_OnErrorInUsing = 36013
ERR_PropertyNameConflictInMyCollection = 36015
ERR_InvalidImplicitVar = 36016
ERR_ObjectInitializerRequiresFieldName = 36530
ERR_ExpectedFrom = 36531
ERR_LambdaBindingMismatch1 = 36532
ERR_CannotLiftByRefParamQuery1 = 36533
ERR_ExpressionTreeNotSupported = 36534
ERR_CannotLiftStructureMeQuery = 36535
ERR_InferringNonArrayType1 = 36536
ERR_ByRefParamInExpressionTree = 36538
'ERR_ObjectInitializerBadValue = 36543
'// If you change this message, make sure to change message for QueryDuplicateAnonTypeMemberName1 as well!
ERR_DuplicateAnonTypeMemberName1 = 36547
ERR_BadAnonymousTypeForExprTree = 36548
ERR_CannotLiftAnonymousType1 = 36549
ERR_ExtensionOnlyAllowedOnModuleSubOrFunction = 36550
ERR_ExtensionMethodNotInModule = 36551
ERR_ExtensionMethodNoParams = 36552
ERR_ExtensionMethodOptionalFirstArg = 36553
ERR_ExtensionMethodParamArrayFirstArg = 36554
'// If you change this message, make sure to change message for QueryAnonymousTypeFieldNameInference as well!
'ERR_BadOrCircularInitializerReference = 36555
ERR_AnonymousTypeFieldNameInference = 36556
ERR_NameNotMemberOfAnonymousType2 = 36557
ERR_ExtensionAttributeInvalid = 36558
ERR_AnonymousTypePropertyOutOfOrder1 = 36559
'// If you change this message, make sure to change message for QueryAnonymousTypeDisallowsTypeChar as well!
ERR_AnonymousTypeDisallowsTypeChar = 36560
ERR_ExtensionMethodUncallable1 = 36561
ERR_ExtensionMethodOverloadCandidate3 = 36562
ERR_DelegateBindingMismatch = 36563
ERR_DelegateBindingTypeInferenceFails = 36564
ERR_TooManyArgs = 36565
ERR_NamedArgAlsoOmitted1 = 36566
ERR_NamedArgUsedTwice1 = 36567
ERR_NamedParamNotFound1 = 36568
ERR_OmittedArgument1 = 36569
ERR_UnboundTypeParam1 = 36572
ERR_ExtensionMethodOverloadCandidate2 = 36573
ERR_AnonymousTypeNeedField = 36574
ERR_AnonymousTypeNameWithoutPeriod = 36575
ERR_AnonymousTypeExpectedIdentifier = 36576
'ERR_NoAnonymousTypeInitializersInDebugger = 36577
'ERR_TooFewGenericArguments = 36578
'ERR_TooManyGenericArguments = 36579
'ERR_DelegateBindingMismatch3_3 = 36580 unused in Roslyn
'ERR_DelegateBindingTypeInferenceFails3 = 36581
ERR_TooManyArgs2 = 36582
ERR_NamedArgAlsoOmitted3 = 36583
ERR_NamedArgUsedTwice3 = 36584
ERR_NamedParamNotFound3 = 36585
ERR_OmittedArgument3 = 36586
ERR_UnboundTypeParam3 = 36589
ERR_TooFewGenericArguments2 = 36590
ERR_TooManyGenericArguments2 = 36591
ERR_ExpectedInOrEq = 36592
ERR_ExpectedQueryableSource = 36593
ERR_QueryOperatorNotFound = 36594
ERR_CannotUseOnErrorGotoWithClosure = 36595
ERR_CannotGotoNonScopeBlocksWithClosure = 36597
ERR_CannotLiftRestrictedTypeQuery = 36598
ERR_QueryAnonymousTypeFieldNameInference = 36599
ERR_QueryDuplicateAnonTypeMemberName1 = 36600
ERR_QueryAnonymousTypeDisallowsTypeChar = 36601
ERR_ReadOnlyInClosure = 36602
ERR_ExprTreeNoMultiDimArrayCreation = 36603
ERR_ExprTreeNoLateBind = 36604
ERR_ExpectedBy = 36605
ERR_QueryInvalidControlVariableName1 = 36606
ERR_ExpectedIn = 36607
'ERR_QueryStartsWithLet = 36608
'ERR_NoQueryExpressionsInDebugger = 36609
ERR_QueryNameNotDeclared = 36610
'// Available 36611
ERR_NestedFunctionArgumentNarrowing3 = 36612
'// If you change this message, make sure to change message for QueryAnonTypeFieldXMLNameInference as well!
ERR_AnonTypeFieldXMLNameInference = 36613
ERR_QueryAnonTypeFieldXMLNameInference = 36614
ERR_ExpectedInto = 36615
'ERR_AggregateStartsWithLet = 36616
ERR_TypeCharOnAggregation = 36617
ERR_ExpectedOn = 36618
ERR_ExpectedEquals = 36619
ERR_ExpectedAnd = 36620
ERR_EqualsTypeMismatch = 36621
ERR_EqualsOperandIsBad = 36622
'// see 30581 (lambda version of addressof)
ERR_LambdaNotDelegate1 = 36625
'// see 30939 (lambda version of addressof)
ERR_LambdaNotCreatableDelegate1 = 36626
'ERR_NoLambdaExpressionsInDebugger = 36627
ERR_CannotInferNullableForVariable1 = 36628
ERR_NullableTypeInferenceNotSupported = 36629
ERR_ExpectedJoin = 36631
ERR_NullableParameterMustSpecifyType = 36632
ERR_IterationVariableShadowLocal2 = 36633
ERR_LambdasCannotHaveAttributes = 36634
ERR_LambdaInSelectCaseExpr = 36635
ERR_AddressOfInSelectCaseExpr = 36636
ERR_NullableCharNotSupported = 36637
'// The follow error messages are paired with other query specific messages above. Please
'// make sure to keep the two in sync
ERR_CannotLiftStructureMeLambda = 36638
ERR_CannotLiftByRefParamLambda1 = 36639
ERR_CannotLiftRestrictedTypeLambda = 36640
ERR_LambdaParamShadowLocal1 = 36641
ERR_StrictDisallowImplicitObjectLambda = 36642
ERR_CantSpecifyParamsOnLambdaParamNoType = 36643
ERR_TypeInferenceFailure1 = 36644
ERR_TypeInferenceFailure2 = 36645
ERR_TypeInferenceFailure3 = 36646
ERR_TypeInferenceFailureNoExplicit1 = 36647
ERR_TypeInferenceFailureNoExplicit2 = 36648
ERR_TypeInferenceFailureNoExplicit3 = 36649
ERR_TypeInferenceFailureAmbiguous1 = 36650
ERR_TypeInferenceFailureAmbiguous2 = 36651
ERR_TypeInferenceFailureAmbiguous3 = 36652
ERR_TypeInferenceFailureNoExplicitAmbiguous1 = 36653
ERR_TypeInferenceFailureNoExplicitAmbiguous2 = 36654
ERR_TypeInferenceFailureNoExplicitAmbiguous3 = 36655
ERR_TypeInferenceFailureNoBest1 = 36656
ERR_TypeInferenceFailureNoBest2 = 36657
ERR_TypeInferenceFailureNoBest3 = 36658
ERR_TypeInferenceFailureNoExplicitNoBest1 = 36659
ERR_TypeInferenceFailureNoExplicitNoBest2 = 36660
ERR_TypeInferenceFailureNoExplicitNoBest3 = 36661
ERR_DelegateBindingMismatchStrictOff2 = 36663
'ERR_TooDeepNestingOfParensInLambdaParam = 36664 - No Longer Reported. Removed per 926942
' ERR_InaccessibleReturnTypeOfSymbol1 = 36665
ERR_InaccessibleReturnTypeOfMember2 = 36666
ERR_LocalNamedSameAsParamInLambda1 = 36667
ERR_MultilineLambdasCannotContainOnError = 36668
'ERR_BranchOutOfMultilineLambda = 36669 obsolete - was not even reported in Dev10 any more.
ERR_LambdaBindingMismatch2 = 36670
'ERR_MultilineLambdaShadowLocal1 = 36671 'unused in Roslyn
ERR_StaticInLambda = 36672
ERR_MultilineLambdaMissingSub = 36673
ERR_MultilineLambdaMissingFunction = 36674
ERR_StatementLambdaInExpressionTree = 36675
' //ERR_StrictDisallowsImplicitLambda = 36676
' // replaced by LambdaNoType and LambdaNoTypeObjectDisallowed and LambdaTooManyTypesObjectDisallowed
ERR_AttributeOnLambdaReturnType = 36677
ERR_ExpectedIdentifierOrGroup = 36707
ERR_UnexpectedGroup = 36708
ERR_DelegateBindingMismatchStrictOff3 = 36709
ERR_DelegateBindingIncompatible3 = 36710
ERR_ArgumentNarrowing2 = 36711
ERR_OverloadCandidate1 = 36712
ERR_AutoPropertyInitializedInStructure = 36713
ERR_InitializedExpandedProperty = 36714
'ERR_NewExpandedProperty = 36715 'unused in Roslyn
ERR_LanguageVersion = 36716
ERR_ArrayInitNoType = 36717
ERR_NotACollection1 = 36718
ERR_NoAddMethod1 = 36719
ERR_CantCombineInitializers = 36720
ERR_EmptyAggregateInitializer = 36721
ERR_VarianceDisallowedHere = 36722
ERR_VarianceInterfaceNesting = 36723
ERR_VarianceOutParamDisallowed1 = 36724
ERR_VarianceInParamDisallowed1 = 36725
ERR_VarianceOutParamDisallowedForGeneric3 = 36726
ERR_VarianceInParamDisallowedForGeneric3 = 36727
ERR_VarianceOutParamDisallowedHere2 = 36728
ERR_VarianceInParamDisallowedHere2 = 36729
ERR_VarianceOutParamDisallowedHereForGeneric4 = 36730
ERR_VarianceInParamDisallowedHereForGeneric4 = 36731
ERR_VarianceTypeDisallowed2 = 36732
ERR_VarianceTypeDisallowedForGeneric4 = 36733
ERR_LambdaTooManyTypesObjectDisallowed = 36734
ERR_VarianceTypeDisallowedHere3 = 36735
ERR_VarianceTypeDisallowedHereForGeneric5 = 36736
ERR_AmbiguousCastConversion2 = 36737
ERR_VariancePreventsSynthesizedEvents2 = 36738
ERR_NestingViolatesCLS1 = 36739
ERR_VarianceOutNullableDisallowed2 = 36740
ERR_VarianceInNullableDisallowed2 = 36741
ERR_VarianceOutByValDisallowed1 = 36742
ERR_VarianceInReturnDisallowed1 = 36743
ERR_VarianceOutConstraintDisallowed1 = 36744
ERR_VarianceInReadOnlyPropertyDisallowed1 = 36745
ERR_VarianceOutWriteOnlyPropertyDisallowed1 = 36746
ERR_VarianceOutPropertyDisallowed1 = 36747
ERR_VarianceInPropertyDisallowed1 = 36748
ERR_VarianceOutByRefDisallowed1 = 36749
ERR_VarianceInByRefDisallowed1 = 36750
ERR_LambdaNoType = 36751
' //ERR_NoReturnStatementsForMultilineLambda = 36752
' // replaced by LambdaNoType and LambdaNoTypeObjectDisallowed
'ERR_CollectionInitializerArity2 = 36753
ERR_VarianceConversionFailedOut6 = 36754
ERR_VarianceConversionFailedIn6 = 36755
ERR_VarianceIEnumerableSuggestion3 = 36756
ERR_VarianceConversionFailedTryOut4 = 36757
ERR_VarianceConversionFailedTryIn4 = 36758
ERR_AutoPropertyCantHaveParams = 36759
ERR_IdentityDirectCastForFloat = 36760
ERR_TypeDisallowsElements = 36807
ERR_TypeDisallowsAttributes = 36808
ERR_TypeDisallowsDescendants = 36809
'ERR_XmlSchemaCompileError = 36810
ERR_TypeOrMemberNotGeneric2 = 36907
ERR_ExtensionMethodCannotBeLateBound = 36908
ERR_TypeInferenceArrayRankMismatch1 = 36909
ERR_QueryStrictDisallowImplicitObject = 36910
ERR_IfNoType = 36911
ERR_IfNoTypeObjectDisallowed = 36912
ERR_IfTooManyTypesObjectDisallowed = 36913
ERR_ArrayInitNoTypeObjectDisallowed = 36914
ERR_ArrayInitTooManyTypesObjectDisallowed = 36915
ERR_LambdaNoTypeObjectDisallowed = 36916
ERR_OverloadsModifierInModule = 36917
ERR_SubRequiresSingleStatement = 36918
ERR_SubDisallowsStatement = 36919
ERR_SubRequiresParenthesesLParen = 36920
ERR_SubRequiresParenthesesDot = 36921
ERR_SubRequiresParenthesesBang = 36922
ERR_CannotEmbedInterfaceWithGeneric = 36923
ERR_CannotUseGenericTypeAcrossAssemblyBoundaries = 36924
ERR_CannotUseGenericBaseTypeAcrossAssemblyBoundaries = 36925
ERR_BadAsyncByRefParam = 36926
ERR_BadIteratorByRefParam = 36927
'ERR_BadAsyncExpressionLambda = 36928 'unused in Roslyn
ERR_BadAsyncInQuery = 36929
ERR_BadGetAwaiterMethod1 = 36930
'ERR_ExpressionTreeContainsAwait = 36931
ERR_RestrictedResumableType1 = 36932
ERR_BadAwaitNothing = 36933
ERR_AsyncSubMain = 36934
ERR_PartialMethodsMustNotBeAsync1 = 36935
ERR_InvalidAsyncIteratorModifiers = 36936
ERR_BadAwaitNotInAsyncMethodOrLambda = 36937
ERR_BadIteratorReturn = 36938
ERR_BadYieldInTryHandler = 36939
ERR_BadYieldInNonIteratorMethod = 36940
'// unused 36941
ERR_BadReturnValueInIterator = 36942
ERR_BadAwaitInTryHandler = 36943
'ERR_BadAwaitObject = 36944 'unused in Roslyn
ERR_BadAsyncReturn = 36945
ERR_BadResumableAccessReturnVariable = 36946
ERR_BadIteratorExpressionLambda = 36947
'ERR_AwaitLibraryMissing = 36948
'ERR_AwaitPattern1 = 36949
ERR_ConstructorAsync = 36950
ERR_InvalidLambdaModifier = 36951
ERR_ReturnFromNonGenericTaskAsync = 36952
'ERR_BadAutoPropertyFlags1 = 36953 'unused in Roslyn
ERR_BadOverloadCandidates2 = 36954
ERR_BadStaticInitializerInResumable = 36955
ERR_ResumablesCannotContainOnError = 36956
ERR_FriendRefNotEqualToThis = 36957
ERR_FriendRefSigningMismatch = 36958
ERR_FailureSigningAssembly = 36960
ERR_SignButNoPrivateKey = 36961
ERR_InvalidVersionFormat = 36962
ERR_ExpectedSingleScript = 36963
ERR_ReferenceDirectiveOnlyAllowedInScripts = 36964
ERR_NamespaceNotAllowedInScript = 36965
ERR_KeywordNotAllowedInScript = 36966
ERR_ReservedAssemblyName = 36968
ERR_ConstructorCannotBeDeclaredPartial = 36969
ERR_ModuleEmitFailure = 36970
ERR_ParameterNotValidForType = 36971
ERR_MarshalUnmanagedTypeNotValidForFields = 36972
ERR_MarshalUnmanagedTypeOnlyValidForFields = 36973
ERR_AttributeParameterRequired1 = 36974
ERR_AttributeParameterRequired2 = 36975
ERR_InvalidVersionFormat2 = 36976
ERR_InvalidAssemblyCultureForExe = 36977
ERR_InvalidMultipleAttributeUsageInNetModule2 = 36978
ERR_SecurityAttributeInvalidTarget = 36979
ERR_PublicKeyFileFailure = 36980
ERR_PublicKeyContainerFailure = 36981
ERR_InvalidAssemblyCulture = 36982
ERR_EncUpdateFailedMissingAttribute = 36983
ERR_CantAwaitAsyncSub1 = 37001
ERR_ResumableLambdaInExpressionTree = 37050
ERR_DllImportOnResumableMethod = 37051
ERR_CannotLiftRestrictedTypeResumable1 = 37052
ERR_BadIsCompletedOnCompletedGetResult2 = 37053
ERR_SynchronizedAsyncMethod = 37054
ERR_BadAsyncReturnOperand1 = 37055
ERR_DoesntImplementAwaitInterface2 = 37056
ERR_BadAwaitInNonAsyncMethod = 37057
ERR_BadAwaitInNonAsyncVoidMethod = 37058
ERR_BadAwaitInNonAsyncLambda = 37059
ERR_LoopControlMustNotAwait = 37060
ERR_MyGroupCollectionAttributeCycle = 37201
ERR_LiteralExpected = 37202
ERR_PartialMethodDefaultParameterValueMismatch2 = 37203
ERR_PartialMethodParamArrayMismatch2 = 37204
ERR_NetModuleNameMismatch = 37205
ERR_BadModuleName = 37206
ERR_CmdOptionConflictsSource = 37207
' unused 37208
ERR_InvalidSignaturePublicKey = 37209
ERR_CollisionWithPublicTypeInModule = 37210
ERR_ExportedTypeConflictsWithDeclaration = 37211
ERR_ExportedTypesConflict = 37212
ERR_AgnosticToMachineModule = 37213
ERR_ConflictingMachineModule = 37214
ERR_CryptoHashFailed = 37215
ERR_CantHaveWin32ResAndManifest = 37216
ERR_ForwardedTypeConflictsWithDeclaration = 37217
ERR_ForwardedTypeConflictsWithExportedType = 37218
ERR_ForwardedTypesConflict = 37219
ERR_TooLongMetadataName = 37220
ERR_MissingNetModuleReference = 37221
ERR_UnsupportedModule1 = 37222
ERR_UnsupportedEvent1 = 37223
ERR_NetModuleNameMustBeUnique = 37224
ERR_PDBWritingFailed = 37225
ERR_ParamDefaultValueDiffersFromAttribute = 37226
ERR_ResourceInModule = 37227
ERR_FieldHasMultipleDistinctConstantValues = 37228
ERR_AmbiguousInNamespaces2 = 37229
ERR_EncNoPIAReference = 37230
ERR_LinkedNetmoduleMetadataMustProvideFullPEImage = 37231
ERR_CantReadRulesetFile = 37232
ERR_MetadataReferencesNotSupported = 37233
ERR_PlatformDoesntSupport = 37234
ERR_CantUseRequiredAttribute = 37235
ERR_EncodinglessSyntaxTree = 37236
ERR_InvalidFormatSpecifier = 37237
ERR_CannotBeMadeNullable1 = 37238
ERR_BadConditionalWithRef = 37239
ERR_NullPropagatingOpInExpressionTree = 37240
ERR_TooLongOrComplexExpression = 37241
ERR_BadPdbData = 37242
ERR_AutoPropertyCantBeWriteOnly = 37243
ERR_ExpressionDoesntHaveName = 37244
ERR_InvalidNameOfSubExpression = 37245
ERR_MethodTypeArgsUnexpected = 37246
ERR_InReferencedAssembly = 37247
ERR_EncReferenceToAddedMember = 37248
ERR_InterpolationFormatWhitespace = 37249
ERR_InterpolationAlignmentOutOfRange = 37250
ERR_InterpolatedStringFactoryError = 37251
ERR_DebugEntryPointNotSourceMethodDefinition = 37252
ERR_InvalidPathMap = 37253
ERR_PublicSignNoKey = 37254
ERR_TooManyUserStrings = 37255
ERR_PeWritingFailure = 37256
ERR_OptionMustBeAbsolutePath = 37257
ERR_DocFileGen = 37258
ERR_TupleTooFewElements = 37259
ERR_TupleReservedElementNameAnyPosition = 37260
ERR_TupleReservedElementName = 37261
ERR_TupleDuplicateElementName = 37262
ERR_RefReturningCallInExpressionTree = 37263
ERR_SourceLinkRequiresPortablePdb = 37264
ERR_CannotEmbedWithoutPdb = 37265
ERR_InvalidInstrumentationKind = 37266
ERR_ValueTupleTypeRefResolutionError1 = 37267
ERR_TupleElementNamesAttributeMissing = 37268
ERR_ExplicitTupleElementNamesAttribute = 37269
ERR_TupleLiteralDisallowsTypeChar = 37270
' Available 37270
ERR_DuplicateProcDefWithDifferentTupleNames2 = 37271
ERR_InterfaceImplementedTwiceWithDifferentTupleNames2 = 37272
ERR_InterfaceImplementedTwiceWithDifferentTupleNames3 = 37273
ERR_InterfaceImplementedTwiceWithDifferentTupleNamesReverse3 = 37274
ERR_InterfaceImplementedTwiceWithDifferentTupleNames4 = 37275
ERR_InterfaceInheritedTwiceWithDifferentTupleNames2 = 37276
ERR_InterfaceInheritedTwiceWithDifferentTupleNames3 = 37277
ERR_InterfaceInheritedTwiceWithDifferentTupleNamesReverse3 = 37278
ERR_InterfaceInheritedTwiceWithDifferentTupleNames4 = 37279
ERR_NewWithTupleTypeSyntax = 37280
ERR_PredefinedValueTupleTypeMustBeStruct = 37281
ERR_PublicSignNetModule = 37282
ERR_BadAssemblyName = 37283
'// WARNINGS BEGIN HERE
WRN_UseOfObsoleteSymbol2 = 40000
WRN_InvalidOverrideDueToTupleNames2 = 40001
WRN_MustOverloadBase4 = 40003
WRN_OverrideType5 = 40004
WRN_MustOverride2 = 40005
WRN_DefaultnessShadowed4 = 40007
WRN_UseOfObsoleteSymbolNoMessage1 = 40008
WRN_AssemblyGeneration0 = 40009
WRN_AssemblyGeneration1 = 40010
WRN_ComClassNoMembers1 = 40011
WRN_SynthMemberShadowsMember5 = 40012
WRN_MemberShadowsSynthMember6 = 40014
WRN_SynthMemberShadowsSynthMember7 = 40018
WRN_UseOfObsoletePropertyAccessor3 = 40019
WRN_UseOfObsoletePropertyAccessor2 = 40020
' WRN_MemberShadowsMemberInModule5 = 40021 ' no repro in legacy test, most probably not reachable. Unused in Roslyn.
' WRN_SynthMemberShadowsMemberInModule5 = 40022 ' no repro in legacy test, most probably not reachable. Unused in Roslyn.
' WRN_MemberShadowsSynthMemberInModule6 = 40023 ' no repro in legacy test, most probably not reachable. Unused in Roslyn.
' WRN_SynthMemberShadowsSynthMemberMod7 = 40024 ' no repro in legacy test, most probably not reachable. Unused in Roslyn.
WRN_FieldNotCLSCompliant1 = 40025
WRN_BaseClassNotCLSCompliant2 = 40026
WRN_ProcTypeNotCLSCompliant1 = 40027
WRN_ParamNotCLSCompliant1 = 40028
WRN_InheritedInterfaceNotCLSCompliant2 = 40029
WRN_CLSMemberInNonCLSType3 = 40030
WRN_NameNotCLSCompliant1 = 40031
WRN_EnumUnderlyingTypeNotCLS1 = 40032
WRN_NonCLSMemberInCLSInterface1 = 40033
WRN_NonCLSMustOverrideInCLSType1 = 40034
WRN_ArrayOverloadsNonCLS2 = 40035
WRN_RootNamespaceNotCLSCompliant1 = 40038
WRN_RootNamespaceNotCLSCompliant2 = 40039
WRN_GenericConstraintNotCLSCompliant1 = 40040
WRN_TypeNotCLSCompliant1 = 40041
WRN_OptionalValueNotCLSCompliant1 = 40042
WRN_CLSAttrInvalidOnGetSet = 40043
WRN_TypeConflictButMerged6 = 40046
' WRN_TypeConflictButMerged7 = 40047 ' deprecated
WRN_ShadowingGenericParamWithParam1 = 40048
WRN_CannotFindStandardLibrary1 = 40049
WRN_EventDelegateTypeNotCLSCompliant2 = 40050
WRN_DebuggerHiddenIgnoredOnProperties = 40051
WRN_SelectCaseInvalidRange = 40052
WRN_CLSEventMethodInNonCLSType3 = 40053
WRN_ExpectedInitComponentCall2 = 40054
WRN_NamespaceCaseMismatch3 = 40055
WRN_UndefinedOrEmptyNamespaceOrClass1 = 40056
WRN_UndefinedOrEmptyProjectNamespaceOrClass1 = 40057
'WRN_InterfacesWithNoPIAMustHaveGuid1 = 40058 ' Not reported by Dev11.
WRN_IndirectRefToLinkedAssembly2 = 40059
WRN_DelaySignButNoKey = 40060
WRN_UnimplementedCommandLineSwitch = 40998
' WRN_DuplicateAssemblyAttribute1 = 41000 'unused in Roslyn
WRN_NoNonObsoleteConstructorOnBase3 = 41001
WRN_NoNonObsoleteConstructorOnBase4 = 41002
WRN_RequiredNonObsoleteNewCall3 = 41003
WRN_RequiredNonObsoleteNewCall4 = 41004
WRN_MissingAsClauseinOperator = 41005
WRN_ConstraintsFailedForInferredArgs2 = 41006
WRN_ConditionalNotValidOnFunction = 41007
WRN_UseSwitchInsteadOfAttribute = 41008
WRN_TupleLiteralNameMismatch = 41009
'// AVAILABLE 41010 - 41199
WRN_ReferencedAssemblyDoesNotHaveStrongName = 41997
WRN_RecursiveAddHandlerCall = 41998
WRN_ImplicitConversionCopyBack = 41999
WRN_MustShadowOnMultipleInheritance2 = 42000
' WRN_ObsoleteClassInitialize = 42001 ' deprecated
' WRN_ObsoleteClassTerminate = 42002 ' deprecated
WRN_RecursiveOperatorCall = 42004
' WRN_IndirectlyImplementedBaseMember5 = 42014 ' deprecated
' WRN_ImplementedBaseMember4 = 42015 ' deprecated
WRN_ImplicitConversionSubst1 = 42016 '// populated by 42350/42332/42336/42337/42338/42339/42340
WRN_LateBindingResolution = 42017
WRN_ObjectMath1 = 42018
WRN_ObjectMath2 = 42019
WRN_ObjectAssumedVar1 = 42020 ' // populated by 42111/42346
WRN_ObjectAssumed1 = 42021 ' // populated by 42347/41005/42341/42342/42344/42345/42334/42343
WRN_ObjectAssumedProperty1 = 42022 ' // populated by 42348
'// AVAILABLE 42023
WRN_UnusedLocal = 42024
WRN_SharedMemberThroughInstance = 42025
WRN_RecursivePropertyCall = 42026
WRN_OverlappingCatch = 42029
WRN_DefAsgUseNullRefByRef = 42030
WRN_DuplicateCatch = 42031
WRN_ObjectMath1Not = 42032
WRN_BadChecksumValExtChecksum = 42033
WRN_MultipleDeclFileExtChecksum = 42034
WRN_BadGUIDFormatExtChecksum = 42035
WRN_ObjectMathSelectCase = 42036
WRN_EqualToLiteralNothing = 42037
WRN_NotEqualToLiteralNothing = 42038
'// AVAILABLE 42039 - 42098
WRN_UnusedLocalConst = 42099
'// UNAVAILABLE 42100
WRN_ComClassInterfaceShadows5 = 42101
WRN_ComClassPropertySetObject1 = 42102
'// only reference types are considered for definite assignment.
'// DefAsg's are all under VB_advanced
WRN_DefAsgUseNullRef = 42104
WRN_DefAsgNoRetValFuncRef1 = 42105
WRN_DefAsgNoRetValOpRef1 = 42106
WRN_DefAsgNoRetValPropRef1 = 42107
WRN_DefAsgUseNullRefByRefStr = 42108
WRN_DefAsgUseNullRefStr = 42109
' WRN_FieldInForNotExplicit = 42110 'unused in Roslyn
WRN_StaticLocalNoInference = 42111
'// AVAILABLE 42112 - 42202
' WRN_SxSHigherIndirectRefEmitted4 = 42203 'unused in Roslyn
' WRN_ReferencedAssembliesAmbiguous6 = 42204 'unused in Roslyn
' WRN_ReferencedAssembliesAmbiguous4 = 42205 'unused in Roslyn
' WRN_MaximumNumberOfWarnings = 42206 'unused in Roslyn
WRN_InvalidAssemblyName = 42207
'// AVAILABLE 42209 - 42299
WRN_XMLDocBadXMLLine = 42300
WRN_XMLDocMoreThanOneCommentBlock = 42301
WRN_XMLDocNotFirstOnLine = 42302
WRN_XMLDocInsideMethod = 42303
WRN_XMLDocParseError1 = 42304
WRN_XMLDocDuplicateXMLNode1 = 42305
WRN_XMLDocIllegalTagOnElement2 = 42306
WRN_XMLDocBadParamTag2 = 42307
WRN_XMLDocParamTagWithoutName = 42308
WRN_XMLDocCrefAttributeNotFound1 = 42309
WRN_XMLMissingFileOrPathAttribute1 = 42310
WRN_XMLCannotWriteToXMLDocFile2 = 42311
WRN_XMLDocWithoutLanguageElement = 42312
WRN_XMLDocReturnsOnWriteOnlyProperty = 42313
WRN_XMLDocOnAPartialType = 42314
WRN_XMLDocReturnsOnADeclareSub = 42315
WRN_XMLDocStartTagWithNoEndTag = 42316
WRN_XMLDocBadGenericParamTag2 = 42317
WRN_XMLDocGenericParamTagWithoutName = 42318
WRN_XMLDocExceptionTagWithoutCRef = 42319
WRN_XMLDocInvalidXMLFragment = 42320
WRN_XMLDocBadFormedXML = 42321
WRN_InterfaceConversion2 = 42322
WRN_LiftControlVariableLambda = 42324
' 42325 unused, was abandoned, now used in unit test "EnsureLegacyWarningsAreMaintained". Please update test if you are going to use this number.
WRN_LambdaPassedToRemoveHandler = 42326
WRN_LiftControlVariableQuery = 42327
WRN_RelDelegatePassedToRemoveHandler = 42328
' WRN_QueryMissingAsClauseinVarDecl = 42329 ' unused in Roslyn.
' WRN_LiftUsingVariableInLambda1 = 42330 ' unused in Roslyn.
' WRN_LiftUsingVariableInQuery1 = 42331 ' unused in Roslyn.
WRN_AmbiguousCastConversion2 = 42332 '// substitutes into 42016
WRN_VarianceDeclarationAmbiguous3 = 42333
WRN_ArrayInitNoTypeObjectAssumed = 42334
WRN_TypeInferenceAssumed3 = 42335
WRN_VarianceConversionFailedOut6 = 42336 '// substitutes into 42016
WRN_VarianceConversionFailedIn6 = 42337 '// substitutes into 42016
WRN_VarianceIEnumerableSuggestion3 = 42338 '// substitutes into 42016
WRN_VarianceConversionFailedTryOut4 = 42339 '// substitutes into 42016
WRN_VarianceConversionFailedTryIn4 = 42340 '// substitutes into 42016
WRN_IfNoTypeObjectAssumed = 42341
WRN_IfTooManyTypesObjectAssumed = 42342
WRN_ArrayInitTooManyTypesObjectAssumed = 42343
WRN_LambdaNoTypeObjectAssumed = 42344
WRN_LambdaTooManyTypesObjectAssumed = 42345
WRN_MissingAsClauseinVarDecl = 42346
WRN_MissingAsClauseinFunction = 42347
WRN_MissingAsClauseinProperty = 42348
WRN_ObsoleteIdentityDirectCastForValueType = 42349
WRN_ImplicitConversion2 = 42350 ' // substitutes into 42016
WRN_MutableStructureInUsing = 42351
WRN_MutableGenericStructureInUsing = 42352
WRN_DefAsgNoRetValFuncVal1 = 42353
WRN_DefAsgNoRetValOpVal1 = 42354
WRN_DefAsgNoRetValPropVal1 = 42355
WRN_AsyncLacksAwaits = 42356
WRN_AsyncSubCouldBeFunction = 42357
WRN_UnobservedAwaitableExpression = 42358
WRN_UnobservedAwaitableDelegate = 42359
WRN_PrefixAndXmlnsLocalName = 42360
WRN_UseValueForXmlExpression3 = 42361 ' Replaces ERR_UseValueForXmlExpression3
'WRN_PDBConstantStringValueTooLong = 42363 we gave up on this warning. See comments in commonCompilation.Emit()
WRN_ReturnTypeAttributeOnWriteOnlyProperty = 42364
' // AVAILABLE 42365
WRN_InvalidVersionFormat = 42366
WRN_MainIgnored = 42367
WRN_EmptyPrefixAndXmlnsLocalName = 42368
WRN_DefAsgNoRetValWinRtEventVal1 = 42369
WRN_AssemblyAttributeFromModuleIsOverridden = 42370
WRN_RefCultureMismatch = 42371
WRN_ConflictingMachineAssembly = 42372
WRN_PdbLocalNameTooLong = 42373
WRN_PdbUsingNameTooLong = 42374
WRN_XMLDocCrefToTypeParameter = 42375
WRN_AnalyzerCannotBeCreated = 42376
WRN_NoAnalyzerInAssembly = 42377
WRN_UnableToLoadAnalyzer = 42378
WRN_AttributeIgnoredWhenPublicSigning = 42379
' // AVAILABLE 42380 - 49998
ERRWRN_Last = WRN_UnableToLoadAnalyzer + 1
'// HIDDENS AND INFOS BEGIN HERE
HDN_UnusedImportClause = 50000
HDN_UnusedImportStatement = 50001
INF_UnableToLoadSomeTypesInAnalyzer = 50002
' // AVAILABLE 50003 - 54999
' Adding diagnostic arguments from resx file
IDS_ProjectSettingsLocationName = 56000
IDS_FunctionReturnType = 56001
IDS_TheSystemCannotFindThePathSpecified = 56002
' available: 56003
IDS_MSG_ADDMODULE = 56004
IDS_MSG_ADDLINKREFERENCE = 56005
IDS_MSG_ADDREFERENCE = 56006
IDS_LogoLine1 = 56007
IDS_LogoLine2 = 56008
IDS_VBCHelp = 56009
IDS_InvalidPreprocessorConstantType = 56010
IDS_ToolName = 56011
' Feature codes
FEATURE_AutoProperties
FEATURE_LineContinuation
FEATURE_StatementLambdas
FEATURE_CoContraVariance
FEATURE_CollectionInitializers
FEATURE_SubLambdas
FEATURE_ArrayLiterals
FEATURE_AsyncExpressions
FEATURE_Iterators
FEATURE_GlobalNamespace
FEATURE_NullPropagatingOperator
FEATURE_NameOfExpressions
FEATURE_ReadonlyAutoProperties
FEATURE_RegionsEverywhere
FEATURE_MultilineStringLiterals
FEATURE_CObjInAttributeArguments
FEATURE_LineContinuationComments
FEATURE_TypeOfIsNot
FEATURE_YearFirstDateLiterals
FEATURE_WarningDirectives
FEATURE_PartialModules
FEATURE_PartialInterfaces
FEATURE_ImplementingReadonlyOrWriteonlyPropertyWithReadwrite
FEATURE_DigitSeparators
FEATURE_BinaryLiterals
FEATURE_Tuples
FEATURE_IOperation
End Enum
End Namespace
|
bbarry/roslyn
|
src/Compilers/VisualBasic/Portable/Errors/Errors.vb
|
Visual Basic
|
apache-2.0
| 89,920
|
Public Class ShellExecute
Public Shared Sub Execute(file As String, workdir As String, args As String)
Dim prc As New Process()
prc.StartInfo.FileName = file
prc.StartInfo.Arguments = args
prc.StartInfo.WorkingDirectory = workdir
prc.Start()
End Sub
End Class
|
Lifemotion/Bwl.GitManager
|
Bwl.GitManager/Utils/ShellExecute.vb
|
Visual Basic
|
apache-2.0
| 311
|
' 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.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic
Public Structure CollectionRangeVariableSymbolInfo
''' <summary>
''' Optional AsQueryable/AsEnumerable/Cast(Of Object) method used
''' to "convert" <see cref="CollectionRangeVariableSyntax.Expression"/> to queryable
''' collection.
''' </summary>
Public ReadOnly Property ToQueryableCollectionConversion As SymbolInfo
''' <summary>
''' Optional Select method to handle AsClause.
''' </summary>
Public ReadOnly Property AsClauseConversion As SymbolInfo
''' <summary>
''' SelectMany method for <see cref="CollectionRangeVariableSyntax"/>, which is not the first
''' <see cref="CollectionRangeVariableSyntax"/> in a <see cref="QueryExpressionSyntax"/>, and is not the first
''' <see cref="CollectionRangeVariableSyntax"/> in <see cref="AggregateClauseSyntax"/>.
''' </summary>
Public ReadOnly Property SelectMany As SymbolInfo
Friend Shared ReadOnly None As New CollectionRangeVariableSymbolInfo(SymbolInfo.None, SymbolInfo.None, SymbolInfo.None)
Friend Sub New(
toQueryableCollectionConversion As SymbolInfo,
asClauseConversion As SymbolInfo,
selectMany As SymbolInfo
)
Me.ToQueryableCollectionConversion = toQueryableCollectionConversion
Me.AsClauseConversion = asClauseConversion
Me.SelectMany = selectMany
End Sub
End Structure
Public Structure AggregateClauseSymbolInfo
''' <summary>
''' The first of the two optional Select methods associated with <see cref="AggregateClauseSyntax"/>.
''' </summary>
Public ReadOnly Property Select1 As SymbolInfo
''' <summary>
''' The second of the two optional Select methods associated with <see cref="AggregateClauseSyntax"/>.
''' </summary>
Public ReadOnly Property Select2 As SymbolInfo
Friend Sub New(select1 As SymbolInfo)
Me.Select1 = select1
Me.Select2 = SymbolInfo.None
End Sub
Friend Sub New(select1 As SymbolInfo, select2 As SymbolInfo)
Me.Select1 = select1
Me.Select2 = select2
End Sub
End Structure
Friend Partial Class VBSemanticModel
''' <summary>
''' Returns information about methods associated with CollectionRangeVariableSyntax.
''' </summary>
Public Function GetCollectionRangeVariableSymbolInfo(
variableSyntax As CollectionRangeVariableSyntax,
Optional cancellationToken As CancellationToken = Nothing
) As CollectionRangeVariableSymbolInfo
If variableSyntax Is Nothing Then
Throw New ArgumentNullException(NameOf(variableSyntax))
End If
If Not IsInTree(variableSyntax) Then
Throw New ArgumentException(VBResources.VariableSyntaxNotWithinSyntaxTree)
End If
Return GetCollectionRangeVariableSymbolInfoWorker(variableSyntax, cancellationToken)
End Function
Friend MustOverride Function GetCollectionRangeVariableSymbolInfoWorker(node As CollectionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As CollectionRangeVariableSymbolInfo
''' <summary>
''' Returns information about methods associated with AggregateClauseSyntax.
''' </summary>
Public Function GetAggregateClauseSymbolInfo(
aggregateSyntax As AggregateClauseSyntax,
Optional cancellationToken As CancellationToken = Nothing
) As AggregateClauseSymbolInfo
If aggregateSyntax Is Nothing Then
Throw New ArgumentNullException(NameOf(aggregateSyntax))
End If
If Not IsInTree(aggregateSyntax) Then
Throw New ArgumentException(VBResources.AggregateSyntaxNotWithinSyntaxTree)
End If
' Stand-alone Aggregate does not use Select methods.
If aggregateSyntax.Parent Is Nothing OrElse
(aggregateSyntax.Parent.Kind = SyntaxKind.QueryExpression AndAlso
DirectCast(aggregateSyntax.Parent, QueryExpressionSyntax).Clauses.FirstOrDefault Is aggregateSyntax) Then
Return New AggregateClauseSymbolInfo(SymbolInfo.None)
End If
Return GetAggregateClauseSymbolInfoWorker(aggregateSyntax, cancellationToken)
End Function
Friend MustOverride Function GetAggregateClauseSymbolInfoWorker(node As AggregateClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As AggregateClauseSymbolInfo
''' <summary>
''' DistinctClauseSyntax - Returns Distinct method associated with DistinctClauseSyntax.
'''
''' WhereClauseSyntax - Returns Where method associated with WhereClauseSyntax.
'''
''' PartitionWhileClauseSyntax - Returns TakeWhile/SkipWhile method associated with PartitionWhileClauseSyntax.
'''
''' PartitionClauseSyntax - Returns Take/Skip method associated with PartitionClauseSyntax.
'''
''' GroupByClauseSyntax - Returns GroupBy method associated with GroupByClauseSyntax.
'''
''' JoinClauseSyntax - Returns Join/GroupJoin method associated with JoinClauseSyntax/GroupJoinClauseSyntax.
'''
''' SelectClauseSyntax - Returns Select method associated with SelectClauseSyntax, if needed.
'''
''' FromClauseSyntax - Returns Select method associated with FromClauseSyntax, which has only one
''' CollectionRangeVariableSyntax and is the only query clause within
''' QueryExpressionSyntax. NotNeeded SymbolInfo otherwise.
''' The method call is injected by the compiler to make sure that query is translated to at
''' least one method call.
'''
''' LetClauseSyntax - NotNeeded SymbolInfo.
'''
''' OrderByClauseSyntax - NotNeeded SymbolInfo.
'''
''' AggregateClauseSyntax - Empty SymbolInfo. GetAggregateClauseInfo should be used instead.
''' </summary>
Public Shadows Function GetSymbolInfo(
clauseSyntax As QueryClauseSyntax,
Optional cancellationToken As CancellationToken = Nothing
) As SymbolInfo
CheckSyntaxNode(clauseSyntax)
If CanGetSemanticInfo(clauseSyntax) Then
Select Case clauseSyntax.Kind
Case SyntaxKind.LetClause, SyntaxKind.OrderByClause
Return SymbolInfo.None
Case SyntaxKind.AggregateClause
Return SymbolInfo.None
End Select
Return GetQueryClauseSymbolInfo(clauseSyntax, cancellationToken)
Else
Return SymbolInfo.None
End If
End Function
Friend MustOverride Function GetQueryClauseSymbolInfo(node As QueryClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
''' <summary>
''' Returns Select method associated with ExpressionRangeVariableSyntax within a LetClauseSyntax, if needed.
''' NotNeeded SymbolInfo otherwise.
''' </summary>
Public Shadows Function GetSymbolInfo(
variableSyntax As ExpressionRangeVariableSyntax,
Optional cancellationToken As CancellationToken = Nothing
) As SymbolInfo
CheckSyntaxNode(variableSyntax)
If CanGetSemanticInfo(variableSyntax) Then
If variableSyntax.Parent Is Nothing OrElse variableSyntax.Parent.Kind <> SyntaxKind.LetClause Then
Return SymbolInfo.None
End If
Return GetLetClauseSymbolInfo(variableSyntax, cancellationToken)
Else
Return SymbolInfo.None
End If
End Function
Friend MustOverride Function GetLetClauseSymbolInfo(node As ExpressionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
''' <summary>
''' Returns aggregate function associated with FunctionAggregationSyntax.
''' </summary>
Public Shadows Function GetSymbolInfo(
functionSyntax As FunctionAggregationSyntax,
Optional cancellationToken As CancellationToken = Nothing
) As SymbolInfo
CheckSyntaxNode(functionSyntax)
If CanGetSemanticInfo(functionSyntax) Then
If Not IsInTree(functionSyntax) Then
Throw New ArgumentException(VBResources.FunctionSyntaxNotWithinSyntaxTree)
End If
Return GetSymbolInfo(DirectCast(functionSyntax, ExpressionSyntax), cancellationToken)
Else
Return SymbolInfo.None
End If
End Function
''' <summary>
''' Returns OrdrBy/OrderByDescending/ThenBy/ThenByDescending method associated with OrderingSyntax.
''' </summary>
Public Shadows Function GetSymbolInfo(
orderingSyntax As OrderingSyntax,
Optional cancellationToken As CancellationToken = Nothing
) As SymbolInfo
CheckSyntaxNode(orderingSyntax)
If CanGetSemanticInfo(orderingSyntax) Then
Return GetOrderingSymbolInfo(orderingSyntax, cancellationToken)
Else
Return SymbolInfo.None
End If
End Function
Friend MustOverride Function GetOrderingSymbolInfo(node As OrderingSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
End Class
End Namespace
|
DinoV/roslyn
|
src/Compilers/VisualBasic/Portable/Compilation/QuerySymbolInfo.vb
|
Visual Basic
|
apache-2.0
| 10,201
|
' 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.Editor.UnitTests.Extensions
Imports Microsoft.CodeAnalysis.VisualBasic.CodeFixes.Spellcheck
Imports Microsoft.CodeAnalysis.VisualBasic.Diagnostics
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics.Spellcheck
Public Class SpellcheckTests
Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, CodeFixProvider)
Return Tuple.Create(Of DiagnosticAnalyzer, CodeFixProvider)(Nothing, New SpellCheckCodeFixProvider())
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestNoSpellcheckForIfOnly2Characters() As Task
Dim text = <File>Class Foo
Sub Bar()
Dim a = new [|Fo|]
End Sub
End Class</File>
Await TestMissingAsync(text)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestAfterNewExpression() As Task
Dim text = <File>Class Foo
Sub Bar()
Dim a = new [|Fooa|].ToString()
End Sub
End Class</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue, {String.Format(FeaturesResources.ChangeTo, "Fooa", "Foo")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestInAsClause() As Task
Dim text = <File>Class Foo
Sub Bar()
Dim a as [|Foa|]
End Sub
End Class</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue,
{String.Format(FeaturesResources.ChangeTo, "Foa", "Foo")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestInSimpleAsClause() As Task
Dim text = <File>Class Foo
Sub Bar()
Dim a as [|Foa|]
End Sub
End Class</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue,
{String.Format(FeaturesResources.ChangeTo, "Foa", "Foo")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestInFunc() As Task
Dim text = <File>Class Foo
Sub Bar(a as Func(Of [|Foa|]))
End Sub
End Class</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue,
{String.Format(FeaturesResources.ChangeTo, "Foa", "Foo")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestCorrectIdentifier() As Task
Dim text = <File>Module Program
Sub Main(args As String())
Dim zzz = 2
Dim y = 2 + [|zza|]
End Sub
End Module</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue, {String.Format(FeaturesResources.ChangeTo, "zza", "zzz")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
<WorkItem(1065708)>
Public Async Function TestInTypeOfIsExpression() As Task
Dim text = <File>Imports System
Public Class Class1
Sub F()
If TypeOf x Is [|Boolea|] Then
End If
End Sub
End Class</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue, {String.Format(FeaturesResources.ChangeTo, "Boolea", "Boolean")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
<WorkItem(1065708)>
Public Async Function TestInTypeOfIsNotExpression() As Task
Dim text = <File>Imports System
Public Class Class1
Sub F()
If TypeOf x IsNot [|Boolea|] Then
End If
End Sub
End Class</File>
Await TestExactActionSetOfferedAsync(text.NormalizedValue, {String.Format(FeaturesResources.ChangeTo, "Boolea", "Boolean")})
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestInvokeCorrectIdentifier() As Task
Dim text = <File>Module Program
Sub Main(args As String())
Dim zzz = 2
Dim y = 2 + [|zza|]
End Sub
End Module</File>
Dim expected = <File>Module Program
Sub Main(args As String())
Dim zzz = 2
Dim y = 2 + zzz
End Sub
End Module</File>
Await TestAsync(text, expected)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestAfterDot() As Task
Dim text = <File>Module Program
Sub Main(args As String())
Program.[|Mair|]
End Sub
End Module</File>
Dim expected = <File>Module Program
Sub Main(args As String())
Program.Main
End Sub
End Module</File>
Await TestAsync(text, expected)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestNotInaccessibleProperty() As Task
Dim text = <File>Module Program
Sub Main(args As String())
Dim z = New c().[|membr|]
End Sub
End Module
Class c
Protected Property member As Integer
Get
Return 0
End Get
End Property
End Class</File>
Await TestMissingAsync(text)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestGenericName1() As Task
Dim text = <File>Class Foo(Of T)
Dim x As [|Foo2(Of T)|]
End Class</File>
Dim expected = <File>Class Foo(Of T)
Dim x As [|Foo(Of T)|]
End Class</File>
Await TestAsync(text, expected)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestGenericName2() As Task
Dim text = <File>Class Foo(Of T)
Dim x As [|Foo2|]
End Class</File>
Dim expected = <File>Class Foo(Of T)
Dim x As [|Foo|]
End Class</File>
Await TestAsync(text, expected)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestQualifiedName1() As Task
Dim text = <File>Module Program
Dim x As New [|Foo2.Bar|]
End Module
Class Foo
Class Bar
End Class
End Class</File>
Dim expected = <File>Module Program
Dim x As New Foo.Bar
End Module
Class Foo
Class Bar
End Class
End Class</File>
Await TestAsync(text, expected)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestQualifiedName2() As Task
Dim text = <File>Module Program
Dim x As New [|Foo.Ba2|]
End Module
Class Foo
Class Bar
End Class
End Class</File>
Dim expected = <File>Module Program
Dim x As New Foo.Bar
End Module
Class Foo
Class Bar
End Class
End Class</File>
Await TestAsync(text, expected)
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestMiddleOfDottedExpression() As Task
Dim text = <File>Module Program
Sub Main(args As String())
Dim z = New c().[|membr|].ToString()
End Sub
End Module
Class c
Public Property member As Integer
Get
Return 0
End Get
End Property
End Class</File>
Dim expected = <File>Module Program
Sub Main(args As String())
Dim z = New c().member.ToString()
End Sub
End Module
Class c
Public Property member As Integer
Get
Return 0
End Get
End Property
End Class</File>
Await TestAsync(text, expected)
End Function
<WorkItem(547161)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestNotForOverloadResolutionFailure() As Task
Dim text = <File>Module Program
Sub Main(args As String())
End Sub
Sub Foo()
[|Method|]()
End Sub
Function Method(argument As Integer) As Integer
Return 0
End Function
End Module</File>
Await TestMissingAsync(text)
End Function
<WorkItem(547169)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestHandlePredefinedTypeKeywordCorrectly() As Task
Dim text = <File>
Imports System
Imports System.Collections.Generic
Imports System.Linq
Module Program
Sub Main(args As String())
Dim x as [|intege|]
End Sub
End Module</File>
Dim expected = <File>
Imports System
Imports System.Collections.Generic
Imports System.Linq
Module Program
Sub Main(args As String())
Dim x as Integer
End Sub
End Module</File>
Await TestActionCountAsync(text.ConvertTestSourceTag(), 2)
Await TestAsync(text, expected, index:=0)
End Function
<WorkItem(547166)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestKeepEscapedIdentifiersEscaped() As Task
Dim text = <File>
Module Program
Sub Main(args As String())
Dim q = From x In args
[|[Taka]|]()
End Sub
Sub Take()
End Sub
End Module</File>
Dim expected = <File>
Module Program
Sub Main(args As String())
Dim q = From x In args
[Take]()
End Sub
Sub Take()
End Sub
End Module</File>
Await TestAsync(text, expected)
End Function
<WorkItem(547166)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestNoDuplicateCorrections() As Task
Dim text = <File>
Module Program
Sub Main(args As String())
Dim q = From x In args
[|[Taka]|]()
End Sub
Sub Take()
End Sub
End Module</File>
Dim expected = <File>
Module Program
Sub Main(args As String())
Dim q = From x In args
[Take]()
End Sub
Sub Take()
End Sub
End Module</File>
Await TestActionCountAsync(text.ConvertTestSourceTag(), 1)
Await TestAsync(text, expected)
End Function
<ConditionalFact(GetType(x86))>
<Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
<WorkItem(5391, "https://github.com/dotnet/roslyn/issues/5391")>
Public Async Function TestSuggestEscapedPredefinedTypes() As Task
Dim text = <File>
Imports System
Imports System.Collections.Generic
Imports System.Linq
Module Program
Class [Integer]
End Class
Sub Main(args As String())
Dim x as [|intege|]
End Sub
End Module</File>
Dim expected0 = <File>
Imports System
Imports System.Collections.Generic
Imports System.Linq
Module Program
Class [Integer]
End Class
Sub Main(args As String())
Dim x as [Integer]
End Sub
End Module</File>
Dim expected1 = <File>
Imports System
Imports System.Collections.Generic
Imports System.Linq
Module Program
Class [Integer]
End Class
Sub Main(args As String())
Dim x as Integer
End Sub
End Module</File>
Await TestActionCountAsync(text.ConvertTestSourceTag(), 3)
Await TestAsync(text, expected0, index:=0)
Await TestAsync(text, expected1, index:=1)
End Function
<WorkItem(775448)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSpellcheck)>
Public Async Function TestShouldTriggerOnBC32045() As Task
' BC32045: 'A' has no type parameters and so cannot have type arguments.
Dim text = <File>
' Import System.Collections to ensure we get BC32045
Imports System.Collections
Interface Enumerable(Of T)
End Interface
Class C
Sub Main(args As String())
Dim x as [|IEnumerable(Of Integer)|]
End Sub
End Class</File>
Dim expected = <File>
' Import System.Collections to ensure we get BC32045
Imports System.Collections
Interface Enumerable(Of T)
End Interface
Class C
Sub Main(args As String())
Dim x as Enumerable(Of Integer)
End Sub
End Class</File>
Await TestActionCountAsync(text.ConvertTestSourceTag(), 1)
Await TestAsync(text, expected, index:=0)
End Function
<WorkItem(908322)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddImport)>
Public Async Function TestTestObjectConstruction() As Task
Await TestAsync(
NewLines("Class AwesomeClass \n Sub M() \n Dim foo = New [|AwesomeClas()|] \n End Sub \n End Class"),
NewLines("Class AwesomeClass \n Sub M() \n Dim foo = New AwesomeClass() \n End Sub \n End Class"),
index:=0)
End Function
<WorkItem(6338, "https://github.com/dotnet/roslyn/issues/6338")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddImport)>
Public Async Function TestTestMissingName() As Task
Await TestMissingAsync(
NewLines("<Assembly: Microsoft.CodeAnalysis.[||]>"))
End Function
Public Class AddImportTestsWithAddImportDiagnosticProvider
Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, CodeFixProvider)
Return Tuple.Create(Of DiagnosticAnalyzer, CodeFixProvider)(
New VisualBasicUnboundIdentifiersDiagnosticAnalyzer(),
New SpellCheckCodeFixProvider())
End Function
<WorkItem(829970)>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddImport)>
Public Async Function TestIncompleteStatement() As Task
Await TestAsync(
NewLines("Class AwesomeClass \n Inherits System.Attribute \n End Class \n Module Program \n <[|AwesomeClas|]> \n End Module"),
NewLines("Class AwesomeClass \n Inherits System.Attribute \n End Class \n Module Program \n <AwesomeClass> \n End Module"),
index:=0)
End Function
End Class
End Class
End Namespace
|
HellBrick/roslyn
|
src/EditorFeatures/VisualBasicTest/Diagnostics/Spellcheck/SpellcheckTests.vb
|
Visual Basic
|
apache-2.0
| 14,788
|
Public Class frmpasshis
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = My.Settings.Passwordbrowser Then
Me.Close()
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.History))
End If
End Sub
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
If TextBox1.Text = My.Settings.Passwordbrowser Then
Me.Close()
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.History))
End If
End If
End Sub
End Class
|
sheikhimran01/xtravo
|
Xtravo/Forms/frmpasshis.vb
|
Visual Basic
|
mit
| 756
|
Imports DlhSoft.Windows.Controls
Imports System.Globalization
''' <summary>
''' Interaction logic for MainWindow.xaml
''' </summary>
Partial Public Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
Dim item0 As GanttChartItem = GanttChartDataGrid.Items(0)
Dim item1 As GanttChartItem = GanttChartDataGrid.Items(1)
item1.Start = Date.Today.Add(TimeSpan.Parse("08:00:00"))
item1.Finish = Date.Today.Add(TimeSpan.Parse("16:00:00"))
item1.CompletedFinish = Date.Today.Add(TimeSpan.Parse("12:00:00"))
item1.AssignmentsContent = "Resource 1"
Dim item2 As GanttChartItem = GanttChartDataGrid.Items(2)
item2.Start = Date.Today.AddDays(1).Add(TimeSpan.Parse("08:00:00"))
item2.Finish = Date.Today.AddDays(2).Add(TimeSpan.Parse("16:00:00"))
item2.AssignmentsContent = "Resource 1, Resource 2"
item2.Predecessors.Add(New PredecessorItem With {.Item = item1})
Dim item3 As GanttChartItem = GanttChartDataGrid.Items(3)
item3.Predecessors.Add(New PredecessorItem With {.Item = item0, .DependencyType = DependencyType.StartStart})
Dim item4 As GanttChartItem = GanttChartDataGrid.Items(4)
item4.Start = Date.Today.Add(TimeSpan.Parse("08:00:00"))
item4.Finish = Date.Today.AddDays(2).Add(TimeSpan.Parse("12:00:00"))
Dim item6 As GanttChartItem = GanttChartDataGrid.Items(6)
item6.Start = Date.Today.Add(TimeSpan.Parse("08:00:00"))
item6.Finish = Date.Today.AddDays(3).Add(TimeSpan.Parse("12:00:00"))
Dim item7 As GanttChartItem = GanttChartDataGrid.Items(7)
item7.Start = Date.Today.AddDays(4)
item7.IsMilestone = True
item7.Predecessors.Add(New PredecessorItem With {.Item = item4})
item7.Predecessors.Add(New PredecessorItem With {.Item = item6})
For i As Integer = 3 To 25
GanttChartDataGrid.Items.Add(New GanttChartItem With {.Content = "Task " & i, .Indentation = If(i Mod 3 = 0, 0, 1), .Start = Date.Today.AddDays(If(i <= 8, (i - 4) * 2, i - 8)), .Finish = Date.Today.AddDays((If(i <= 8, (i - 4) * 2 + (If(i > 8, 6, 1)), i - 2)) + 2), .CompletedFinish = Date.Today.AddDays(If(i <= 8, (i - 4) * 2, i - 8)).AddDays(If(i Mod 6 = 4, 3, 0))})
Next i
End Sub
Private theme As String = "Generic-bright"
Public Sub New(theme As String)
Me.New()
Me.theme = theme
ApplyTemplate()
End Sub
Public Overrides Sub OnApplyTemplate()
LoadTheme()
MyBase.OnApplyTemplate()
End Sub
Private Sub LoadTheme()
If theme Is Nothing OrElse theme = "Default" OrElse theme = "Aero" Then
Return
End If
Dim themeResourceDictionary = New ResourceDictionary With {.Source = New Uri("/" & Me.GetType().Assembly.GetName().Name & ";component/Themes/" & theme & ".xaml", UriKind.Relative)}
GanttChartDataGrid.Resources.MergedDictionaries.Add(themeResourceDictionary)
End Sub
Private Sub Root_Loaded(sender As Object, e As RoutedEventArgs)
MajorScaleTypeComboBox.SelectedItem = ScaleType.Weeks
MinorScaleTypeComboBox.SelectedItem = ScaleType.Days
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.ShortDate
MinorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.DayOfWeekInitial
ZoomLevelTextBox.Text = "5"
UpdateScaleComboBox.SelectedIndex = 1 ' 15min
End Sub
Private Sub MajorScaleTypeComboBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
SetMajorScale()
End Sub
Private Sub SetMajorScale()
If GanttChartDataGrid Is Nothing Then
Return
End If
Dim scaleType As ScaleType = CType(MajorScaleTypeComboBox.SelectedItem, ScaleType)
GanttChartDataGrid.GetScale(0).ScaleType = GetActualScaleType(scaleType)
UpdateFromSelectedMajorScaleType(scaleType)
End Sub
Private Sub UpdateFromSelectedMajorScaleType(scaleType As ScaleType)
Select Case scaleType
Case ScaleType.Years
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Year
MinorScaleTypeComboBox.SelectedItem = ScaleType.Months
Case ScaleType.Quarters
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.YearMonth
MinorScaleTypeComboBox.SelectedItem = ScaleType.Months
Case ScaleType.Months
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Month
MinorScaleTypeComboBox.SelectedItem = ScaleType.Weeks
Case ScaleType.Weeks
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.ShortDate
MinorScaleTypeComboBox.SelectedItem = ScaleType.Days
Case ScaleType.Days
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Day
MinorScaleTypeComboBox.SelectedIndex = 5
Case ScaleType.Hours
MajorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Hour
MinorScaleTypeComboBox.SelectedItem = ScaleType.Days
End Select
End Sub
Private Sub MinorScaleTypeComboBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
SetMinorScale()
End Sub
Private Sub SetMinorScale()
If GanttChartDataGrid Is Nothing OrElse MinorScaleTypeComboBox.SelectedItem Is Nothing Then
Return
End If
Dim scaleType = CType(MinorScaleTypeComboBox.SelectedItem, ScaleType)
GanttChartDataGrid.GetScale(1).ScaleType = GetActualScaleType(scaleType)
UpdateFromSelectedMinorScaleType(scaleType)
End Sub
Private Sub UpdateFromSelectedMinorScaleType(scaleType As ScaleType)
Select Case scaleType
Case ScaleType.Years
MinorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Year
ZoomLevelTextBox.Text = "0.5"
Case ScaleType.Months
MinorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Month
ZoomLevelTextBox.Text = "1"
Case ScaleType.Weeks
MinorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Day
ZoomLevelTextBox.Text = "2"
Case ScaleType.Days
MinorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.DayOfWeekInitial
ZoomLevelTextBox.Text = "5"
Case ScaleType.Hours
MinorScaleHeaderFormatComboBox.SelectedItem = TimeScaleTextFormat.Hour
ZoomLevelTextBox.Text = "25"
End Select
End Sub
Private Function GetActualScaleType(value As ScaleType) As ScaleType
Dim scale As ScaleType
If value <> ScaleType.Weeks OrElse MondayBasedCheckBox.IsChecked <> True Then
scale = value
Else
scale = ScaleType.WeeksStartingMonday
End If
Return scale
End Function
Private Sub MajorScaleHeaderFormatComboBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
Dim headerFormat As TimeScaleTextFormat = CType(MajorScaleHeaderFormatComboBox.SelectedItem, TimeScaleTextFormat)
GanttChartDataGrid.GetScale(0).HeaderContentFormat = headerFormat
End Sub
Private Sub MinorScaleHeaderFormatComboBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
Dim headerFormat As TimeScaleTextFormat = CType(MinorScaleHeaderFormatComboBox.SelectedItem, TimeScaleTextFormat)
GanttChartDataGrid.GetScale(1).HeaderContentFormat = headerFormat
End Sub
Private Sub MajorScaleSeparatorCheckBox_Checked(sender As Object, e As RoutedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
If MajorScaleSeparatorCheckBox.IsChecked = True Then
GanttChartDataGrid.GetScale(0).BorderThickness = New Thickness(0, 0, 1, 0)
Else
GanttChartDataGrid.GetScale(0).BorderThickness = New Thickness(0)
End If
End Sub
Private Sub MinorScaleSeparatorCheckBox_Checked(sender As Object, e As RoutedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
If MinorScaleSeparatorCheckBox.IsChecked = True Then
GanttChartDataGrid.GetScale(1).BorderThickness = New Thickness(0, 0, 1, 0)
GanttChartDataGrid.GetScale(1).BorderBrush = GanttChartDataGrid.GetScale(0).BorderBrush
Else
GanttChartDataGrid.GetScale(1).BorderThickness = New Thickness(0)
End If
End Sub
Private Sub MondayBasedCheckBox_Checked(sender As Object, e As RoutedEventArgs)
SetMajorScale()
SetMinorScale()
End Sub
Private Sub NonworkingDaysCheckBox_Checked(sender As Object, e As RoutedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
If NonworkingDaysCheckBox.IsChecked = True Then
GanttChartDataGrid.IsNonworkingTimeHighlighted = True
Else
GanttChartDataGrid.IsNonworkingTimeHighlighted = False
End If
End Sub
Private Sub CurrentTimeVisibleCheckBox_Checked(sender As Object, e As RoutedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
If CurrentTimeVisibleCheckBox.IsChecked = True Then
GanttChartDataGrid.IsCurrentTimeLineVisible = True
Else
GanttChartDataGrid.IsCurrentTimeLineVisible = False
End If
End Sub
Private Sub ZoomLevelTextBox_TextChanged(sender As Object, e As TextChangedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
Dim hourWidth As Double
If Double.TryParse(ZoomLevelTextBox.Text.Trim(), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, hourWidth) Then
If hourWidth > 0 Then
GanttChartDataGrid.HourWidth = hourWidth
End If
End If
End Sub
Private Sub UpdateScaleComboBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
If GanttChartDataGrid Is Nothing Then
Return
End If
Dim selectedItem = TryCast(UpdateScaleComboBox.SelectedItem, ComboBoxItem)
Select Case TryCast(selectedItem.Content, String)
Case "Free"
GanttChartDataGrid.UpdateScaleInterval = TimeSpan.Zero
Case "15 min"
GanttChartDataGrid.UpdateScaleInterval = TimeSpan.Parse("00:15:00")
Case "Hour"
GanttChartDataGrid.UpdateScaleInterval = TimeSpan.Parse("01:00:00")
Case "Day"
GanttChartDataGrid.UpdateScaleInterval = TimeSpan.Parse("1.00:00:00")
End Select
End Sub
End Class
|
DlhSoftTeam/GanttChartLightLibrary-Demos
|
GanttChartLightLibraryDemos/Demos/Samples/WPF-VisualBasic/GanttChartDataGrid/BuiltInScales/MainWindow.xaml.vb
|
Visual Basic
|
mit
| 11,073
|
' 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.Globalization
Imports System.IO
Imports System.Reflection
Imports Microsoft.CodeAnalysis.Scripting
Imports Microsoft.CodeAnalysis.Scripting.Hosting
Imports Microsoft.CodeAnalysis.Scripting.Test
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting
Imports Roslyn.Test.Utilities
Imports Xunit
Namespace Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests
Public Class CommandLineRunnerTests
Inherits TestBase
Private Shared ReadOnly s_compilerVersion As String =
CommonCompiler.GetProductVersion(GetType(VisualBasicInteractiveCompiler))
Private Shared ReadOnly s_logoAndHelpPrompt As String =
String.Format(VBScriptingResources.LogoLine1, s_compilerVersion) + vbNewLine + VBScriptingResources.LogoLine2 + "
" + ScriptingResources.HelpPrompt
Private Shared ReadOnly s_defaultArgs As String() = {"/R:System"}
Private Shared Function CreateRunner(
Optional args As String() = Nothing,
Optional input As String = "",
Optional responseFile As String = Nothing,
Optional workingDirectory As String = Nothing
) As CommandLineRunner
Dim io = New TestConsoleIO(input)
Dim buildPaths = New BuildPaths(
clientDir:=AppContext.BaseDirectory,
workingDir:=If(workingDirectory, AppContext.BaseDirectory),
sdkDir:=RuntimeMetadataReferenceResolver.GetDesktopFrameworkDirectory(),
tempDir:=Path.GetTempPath())
Dim compiler = New VisualBasicInteractiveCompiler(
responseFile,
buildPaths,
If(args, s_defaultArgs),
New NotImplementedAnalyzerLoader())
Return New CommandLineRunner(
io,
compiler,
VisualBasicScriptCompiler.Instance,
VisualBasicObjectFormatter.Instance)
End Function
<Fact()>
Public Sub TestPrint()
Dim runner = CreateRunner(input:="? 10")
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_logoAndHelpPrompt + "
> ? 10
10
>", runner.Console.Out.ToString())
End Sub
<Fact()>
Public Sub TestImportArgument()
Dim runner = CreateRunner(args:={"/Imports:<xmlns:xmlNamespacePrefix='xmlNamespaceName'>"})
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_logoAndHelpPrompt + "
>", runner.Console.Out.ToString())
End Sub
<Fact()>
Public Sub TestReferenceDirective()
Dim file1 = Temp.CreateFile("1.dll").WriteAllBytes(TestCompilationFactory.CreateVisualBasicCompilationWithCorlib("
public Class C1
Public Function Goo() As String
Return ""Bar""
End Function
End Class", "1").EmitToArray())
Dim runner = CreateRunner(args:={}, input:="#r """ & file1.Path & """" & vbCrLf & "? New C1().Goo()")
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_logoAndHelpPrompt + "
> #r """ & file1.Path & """
> ? New C1().Goo()
""Bar""
>", runner.Console.Out.ToString())
runner = CreateRunner(args:={}, input:="? New C1().Goo()")
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_logoAndHelpPrompt + "
> ? New C1().Goo()
«Red»
(1) : error BC30002: " + String.Format(VBResources.ERR_UndefinedType1, "C1") + "
«Gray»
>", runner.Console.Out.ToString())
End Sub
<Fact()>
Public Sub TestReferenceDirectiveWhenReferenceMissing()
Dim runner = CreateRunner(args:={}, input:="#r ""://invalidfilepath""")
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_logoAndHelpPrompt + "
> #r ""://invalidfilepath""
«Red»
(1) : error BC2017: " + String.Format(ERR_LibNotFound, "://invalidfilepath") + "
«Gray»
>", runner.Console.Out.ToString())
End Sub
<Fact()>
<WorkItem(7133, "https://github.com/dotnet/roslyn/issues/7133")>
Public Sub TestDisplayResultsWithCurrentUICulture1()
' Save the current thread culture as it is changed in the test.
' If the culture is not restored after the test all following tests
' would run in the en-GB culture.
Dim currentCulture = CultureInfo.DefaultThreadCurrentCulture
Dim currentUICulture = CultureInfo.DefaultThreadCurrentUICulture
Try
Dim runner = CreateRunner(args:={}, input:="Imports System.Globalization
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(""en-GB"")
? System.Math.PI
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(""de-DE"")
? System.Math.PI")
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(
s_logoAndHelpPrompt + "
> Imports System.Globalization
> System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(""en-GB"")
> ? System.Math.PI
3.1415926535897931
> System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(""de-DE"")
> ? System.Math.PI
3,1415926535897931
>", runner.Console.Out.ToString())
Finally
CultureInfo.DefaultThreadCurrentCulture = currentCulture
CultureInfo.DefaultThreadCurrentUICulture = currentUICulture
End Try
End Sub
<Fact()>
<WorkItem(7133, "https://github.com/dotnet/roslyn/issues/7133")>
Public Sub TestDisplayResultsWithCurrentUICulture2()
' Save the current thread culture as it is changed in the test.
' If the culture is not restored after the test all following tests
' would run in the en-GB culture.
Dim currentCulture = CultureInfo.DefaultThreadCurrentCulture
Dim currentUICulture = CultureInfo.DefaultThreadCurrentUICulture
Try
' Tests that DefaultThreadCurrentUICulture is respected and not DefaultThreadCurrentCulture.
Dim runner = CreateRunner(args:={}, input:="Imports System.Globalization
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(""en-GB"")
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(""en-GB"")
? System.Math.PI
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(""de-DE"")
? System.Math.PI")
runner.RunInteractive()
AssertEx.AssertEqualToleratingWhitespaceDifferences(
s_logoAndHelpPrompt + "
> Imports System.Globalization
> System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(""en-GB"")
> System.Globalization.CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(""en-GB"")
> ? System.Math.PI
3.1415926535897931
> System.Globalization.CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(""de-DE"")
> ? System.Math.PI
3.1415926535897931
>", runner.Console.Out.ToString())
Finally
CultureInfo.DefaultThreadCurrentCulture = currentCulture
CultureInfo.DefaultThreadCurrentUICulture = currentUICulture
End Try
End Sub
<Fact>
Public Sub Version()
Dim runner = CreateRunner({"/version"})
Assert.Equal(0, runner.RunInteractive())
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_compilerVersion, runner.Console.Out.ToString())
runner = CreateRunner({"/version", "/help"})
Assert.Equal(0, runner.RunInteractive())
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_compilerVersion, runner.Console.Out.ToString())
runner = CreateRunner({"/version", "/r:somefile"})
Assert.Equal(0, runner.RunInteractive())
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_compilerVersion, runner.Console.Out.ToString())
runner = CreateRunner({"/version", "/nologo"})
Assert.Equal(0, runner.RunInteractive())
AssertEx.AssertEqualToleratingWhitespaceDifferences(s_compilerVersion, runner.Console.Out.ToString())
End Sub
End Class
End Namespace
|
aelij/roslyn
|
src/Scripting/VisualBasicTest/CommandLineRunnerTests.vb
|
Visual Basic
|
apache-2.0
| 8,874
|
' Copyright (c) Microsoft Corporation. All rights reserved.
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Forms
Namespace D3D10Tutorial02_WinFormsControl
Friend NotInheritable Class Program
''' <summary>
''' The main entry point for the application.
''' </summary>
Private Sub New()
End Sub
<STAThread> _
Shared Sub Main()
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(False)
Application.Run(New TutorialWindow())
End Sub
End Class
End Namespace
|
devkimchi/Windows-API-Code-Pack-1.1
|
source/Samples/DirectX/VB/Direct3D10/Tutorials/D3D10Tutorial02_WinFormsControl/Program.vb
|
Visual Basic
|
mit
| 532
|
' Copyright (c) 2015 ZZZ Projects. All rights reserved
' Licensed under MIT License (MIT) (https://github.com/zzzprojects/Z.ExtensionMethods)
' Website: http://www.zzzprojects.com/
' Feedback / Feature Requests / Issues : http://zzzprojects.uservoice.com/forums/283927
' All ZZZ Projects products: Entity Framework Extensions / Bulk Operations / Extension Methods /Icon Library
Imports System.Web
Public Module Extensions_863
''' <summary>
''' A HttpResponse extension method that sets the response to status code 406 (Client browser does not accept the
''' MIME type of the requested page.).
''' </summary>
''' <param name="this">The @this to act on.</param>
<System.Runtime.CompilerServices.Extension> _
Public Sub SetStatusClientBrowserDoesNotAcceptMimeType(this As HttpResponse)
this.StatusCode = 406
this.StatusDescription = "Client browser does not accept the MIME type of the requested page."
End Sub
End Module
|
zzzprojects/Z.ExtensionMethods
|
src (VB.NET)/Z.ExtensionMethods.VB/Z.Web/System.Web.HttpResponse/_generated/HttpResponse.SetStatusClientBrowserDoesNotAcceptMimeType.vb
|
Visual Basic
|
mit
| 945
|
'------------------------------------------------------------------------------
' <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
Imports System.Reflection
Namespace Microsoft.CodeAnalysis.VisualBasic
'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", "15.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module VBResources
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("VBResources", GetType(VBResources).GetTypeInfo.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
'''<summary>
''' Looks up a localized string similar to AggregateSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property AggregateSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("AggregateSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to AnonymousObjectCreationExpressionSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property AnonymousObjectCreationExpressionSyntaxNotWithinTree() As String
Get
Return ResourceManager.GetString("AnonymousObjectCreationExpressionSyntaxNotWithinTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Associated type does not have type parameters.
'''</summary>
Friend ReadOnly Property AssociatedTypeDoesNotHaveTypeParameters() As String
Get
Return ResourceManager.GetString("AssociatedTypeDoesNotHaveTypeParameters", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot add compiler special tree.
'''</summary>
Friend ReadOnly Property CannotAddCompilerSpecialTree() As String
Get
Return ResourceManager.GetString("CannotAddCompilerSpecialTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot remove compiler special tree.
'''</summary>
Friend ReadOnly Property CannotRemoveCompilerSpecialTree() As String
Get
Return ResourceManager.GetString("CannotRemoveCompilerSpecialTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Can't reference compilation of type '{0}' from {1} compilation..
'''</summary>
Friend ReadOnly Property CantReferenceCompilationFromTypes() As String
Get
Return ResourceManager.GetString("CantReferenceCompilationFromTypes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Chaining speculative semantic model is not supported. You should create a speculative model from the non-speculative ParentModel..
'''</summary>
Friend ReadOnly Property ChainingSpeculativeModelIsNotSupported() As String
Get
Return ResourceManager.GetString("ChainingSpeculativeModelIsNotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Compilation (Visual Basic): .
'''</summary>
Friend ReadOnly Property CompilationVisualBasic() As String
Get
Return ResourceManager.GetString("CompilationVisualBasic", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to DeclarationSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property DeclarationSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("DeclarationSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to DeclarationSyntax not within tree.
'''</summary>
Friend ReadOnly Property DeclarationSyntaxNotWithinTree() As String
Get
Return ResourceManager.GetString("DeclarationSyntaxNotWithinTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Elements cannot be null..
'''</summary>
Friend ReadOnly Property ElementsCannotBeNull() As String
Get
Return ResourceManager.GetString("ElementsCannotBeNull", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot find the interop type that matches the embedded type '{0}'. Are you missing an assembly reference?.
'''</summary>
Friend ReadOnly Property ERR_AbsentReferenceToPIA1() As String
Get
Return ResourceManager.GetString("ERR_AbsentReferenceToPIA1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot expose type '{1}' in {2} '{3}' through {4} '{5}'..
'''</summary>
Friend ReadOnly Property ERR_AccessMismatch6() As String
Get
Return ResourceManager.GetString("ERR_AccessMismatch6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot expose the underlying delegate type '{1}' of the event it is implementing outside the project through {2} '{3}'..
'''</summary>
Friend ReadOnly Property ERR_AccessMismatchImplementedEvent4() As String
Get
Return ResourceManager.GetString("ERR_AccessMismatchImplementedEvent4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot expose the underlying delegate type '{1}' of the event it is implementing to {2} '{3}' through {4} '{5}'..
'''</summary>
Friend ReadOnly Property ERR_AccessMismatchImplementedEvent6() As String
Get
Return ResourceManager.GetString("ERR_AccessMismatchImplementedEvent6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot expose type '{1}' outside the project through {2} '{3}'..
'''</summary>
Friend ReadOnly Property ERR_AccessMismatchOutsideAssembly4() As String
Get
Return ResourceManager.GetString("ERR_AccessMismatchOutsideAssembly4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' or 'RemoveHandler' statement event operand must be a dot-qualified expression or a simple name..
'''</summary>
Friend ReadOnly Property ERR_AddOrRemoveHandlerEvent() As String
Get
Return ResourceManager.GetString("ERR_AddOrRemoveHandlerEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The type of the 'AddHandler' method's parameter must be the same as the type of the event..
'''</summary>
Friend ReadOnly Property ERR_AddParamWrongForWinRT() As String
Get
Return ResourceManager.GetString("ERR_AddParamWrongForWinRT", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' and 'RemoveHandler' method parameters must have the same delegate type as the containing event..
'''</summary>
Friend ReadOnly Property ERR_AddRemoveParamNotEventType() As String
Get
Return ResourceManager.GetString("ERR_AddRemoveParamNotEventType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddressOf' expressions are not valid in the first expression of a 'Select Case' statement..
'''</summary>
Friend ReadOnly Property ERR_AddressOfInSelectCaseExpr() As String
Get
Return ResourceManager.GetString("ERR_AddressOfInSelectCaseExpr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddressOf' expression cannot be converted to '{0}' because type '{0}' is declared 'MustInherit' and cannot be created..
'''</summary>
Friend ReadOnly Property ERR_AddressOfNotCreatableDelegate1() As String
Get
Return ResourceManager.GetString("ERR_AddressOfNotCreatableDelegate1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddressOf' expression cannot be converted to '{0}' because '{0}' is not a delegate type..
'''</summary>
Friend ReadOnly Property ERR_AddressOfNotDelegate1() As String
Get
Return ResourceManager.GetString("ERR_AddressOfNotDelegate1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Methods of 'System.Nullable(Of T)' cannot be used as operands of the 'AddressOf' operator..
'''</summary>
Friend ReadOnly Property ERR_AddressOfNullableMethod() As String
Get
Return ResourceManager.GetString("ERR_AddressOfNullableMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddressOf' operand must be the name of a method (without parentheses)..
'''</summary>
Friend ReadOnly Property ERR_AddressOfOperandNotMethod() As String
Get
Return ResourceManager.GetString("ERR_AddressOfOperandNotMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Object initializer syntax cannot be used to initialize an instance of 'System.Object'..
'''</summary>
Friend ReadOnly Property ERR_AggrInitInvalidForObject() As String
Get
Return ResourceManager.GetString("ERR_AggrInitInvalidForObject", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Agnostic assembly cannot have a processor specific module '{0}'..
'''</summary>
Friend ReadOnly Property ERR_AgnosticToMachineModule() As String
Get
Return ResourceManager.GetString("ERR_AgnosticToMachineModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous across the inherited interfaces '{1}' and '{2}'..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousAcrossInterfaces3() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousAcrossInterfaces3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On does not allow implicit conversions from '{0}' to '{1}' because the conversion is ambiguous..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousCastConversion2() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousCastConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to No accessible '{0}' is most specific: {1}.
'''</summary>
Friend ReadOnly Property ERR_AmbiguousDelegateBinding2() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousDelegateBinding2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}.{1}' that matches this signature cannot be implemented because the interface '{2}' contains multiple members with this same name and signature:
''' '{3}'
''' '{4}'.
'''</summary>
Friend ReadOnly Property ERR_AmbiguousImplements3() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousImplements3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' exists in multiple base interfaces. Use the name of the interface that declares '{0}' in the 'Implements' clause instead of the name of the derived interface..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousImplementsMember3() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousImplementsMember3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous, imported from the namespaces or types '{1}'..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousInImports2() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousInImports2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous between declarations in Modules '{1}'..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousInModules2() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousInModules2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous in the namespace '{1}'..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousInNamespace2() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousInNamespace2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous between declarations in namespaces '{1}'..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousInNamespaces2() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousInNamespaces2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousInUnnamedNamespace1() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousInUnnamedNamespace1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}' that matches this signature cannot be overridden because the class '{1}' contains multiple members with this same name and signature: {2}.
'''</summary>
Friend ReadOnly Property ERR_AmbiguousOverrides3() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousOverrides3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of '{0}' is ambiguous because the loop bounds and the step clause do not convert to the same type..
'''</summary>
Friend ReadOnly Property ERR_AmbiguousWidestType3() As String
Get
Return ResourceManager.GetString("ERR_AmbiguousWidestType3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type member name cannot be inferred from an XML identifier that is not a valid Visual Basic identifier..
'''</summary>
Friend ReadOnly Property ERR_AnonTypeFieldXMLNameInference() As String
Get
Return ResourceManager.GetString("ERR_AnonTypeFieldXMLNameInference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type characters cannot be used in anonymous type declarations..
'''</summary>
Friend ReadOnly Property ERR_AnonymousTypeDisallowsTypeChar() As String
Get
Return ResourceManager.GetString("ERR_AnonymousTypeDisallowsTypeChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Identifier expected, preceded with a period..
'''</summary>
Friend ReadOnly Property ERR_AnonymousTypeExpectedIdentifier() As String
Get
Return ResourceManager.GetString("ERR_AnonymousTypeExpectedIdentifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type member name can be inferred only from a simple or qualified name with no arguments..
'''</summary>
Friend ReadOnly Property ERR_AnonymousTypeFieldNameInference() As String
Get
Return ResourceManager.GetString("ERR_AnonymousTypeFieldNameInference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type member name must be preceded by a period..
'''</summary>
Friend ReadOnly Property ERR_AnonymousTypeNameWithoutPeriod() As String
Get
Return ResourceManager.GetString("ERR_AnonymousTypeNameWithoutPeriod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type must contain at least one member..
'''</summary>
Friend ReadOnly Property ERR_AnonymousTypeNeedField() As String
Get
Return ResourceManager.GetString("ERR_AnonymousTypeNeedField", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type member property '{0}' cannot be used to infer the type of another member property because the type of '{0}' is not yet established..
'''</summary>
Friend ReadOnly Property ERR_AnonymousTypePropertyOutOfOrder1() As String
Get
Return ResourceManager.GetString("ERR_AnonymousTypePropertyOutOfOrder1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Copying the value of 'ByRef' parameter '{0}' back to the matching argument narrows from type '{1}' to type '{2}'..
'''</summary>
Friend ReadOnly Property ERR_ArgumentCopyBackNarrowing3() As String
Get
Return ResourceManager.GetString("ERR_ArgumentCopyBackNarrowing3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Argument matching parameter '{0}' narrows to '{1}'..
'''</summary>
Friend ReadOnly Property ERR_ArgumentNarrowing2() As String
Get
Return ResourceManager.GetString("ERR_ArgumentNarrowing2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Argument matching parameter '{0}' narrows from '{1}' to '{2}'..
'''</summary>
Friend ReadOnly Property ERR_ArgumentNarrowing3() As String
Get
Return ResourceManager.GetString("ERR_ArgumentNarrowing3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to option '{0}' requires '{1}'.
'''</summary>
Friend ReadOnly Property ERR_ArgumentRequired() As String
Get
Return ResourceManager.GetString("ERR_ArgumentRequired", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Comma, ')', or a valid expression continuation expected..
'''</summary>
Friend ReadOnly Property ERR_ArgumentSyntax() As String
Get
Return ResourceManager.GetString("ERR_ArgumentSyntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array initializers are valid only for arrays, but the type of '{0}' is '{1}'..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitForNonArray2() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitForNonArray2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array initializer cannot be specified for a non constant dimension; use the empty initializer '{}'..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitializerForNonConstDim() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitializerForNonConstDim", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array initializer has too few dimensions..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitializerTooFewDimensions() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitializerTooFewDimensions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array initializer has too many dimensions..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitializerTooManyDimensions() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitializerTooManyDimensions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Arrays declared as structure members cannot be declared with an initial size..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitInStruct() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitInStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type. Specifying the type of the array might correct this error..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitNoType() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitNoType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type, and Option Strict On does not allow 'Object' to be assumed. Specifying the type of the array might correct this error..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitNoTypeObjectDisallowed() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitNoTypeObjectDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type because more than one type is possible. Specifying the type of the array might correct this error..
'''</summary>
Friend ReadOnly Property ERR_ArrayInitTooManyTypesObjectDisallowed() As String
Get
Return ResourceManager.GetString("ERR_ArrayInitTooManyTypesObjectDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '(' unexpected. Arrays of uninstantiated generic types are not allowed..
'''</summary>
Friend ReadOnly Property ERR_ArrayOfRawGenericInvalid() As String
Get
Return ResourceManager.GetString("ERR_ArrayOfRawGenericInvalid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array exceeds the limit of 32 dimensions..
'''</summary>
Friend ReadOnly Property ERR_ArrayRankLimit() As String
Get
Return ResourceManager.GetString("ERR_ArrayRankLimit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Arrays cannot be declared with 'New'..
'''</summary>
Friend ReadOnly Property ERR_AsNewArray() As String
Get
Return ResourceManager.GetString("ERR_AsNewArray", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The 'Main' method cannot be marked 'Async'..
'''</summary>
Friend ReadOnly Property ERR_AsyncSubMain() As String
Get
Return ResourceManager.GetString("ERR_AsyncSubMain", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be named as a parameter in an attribute specifier because it is not a field or property..
'''</summary>
Friend ReadOnly Property ERR_AttrAssignmentNotFieldOrProp1() As String
Get
Return ResourceManager.GetString("ERR_AttrAssignmentNotFieldOrProp1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameters, generic types or types contained in generic types cannot be used as attributes..
'''</summary>
Friend ReadOnly Property ERR_AttrCannotBeGenerics() As String
Get
Return ResourceManager.GetString("ERR_AttrCannotBeGenerics", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be used as an attribute because it is declared 'MustInherit'..
'''</summary>
Friend ReadOnly Property ERR_AttributeCannotBeAbstract() As String
Get
Return ResourceManager.GetString("ERR_AttributeCannotBeAbstract", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be used as an attribute because it is not a class..
'''</summary>
Friend ReadOnly Property ERR_AttributeMustBeClassNotStruct1() As String
Get
Return ResourceManager.GetString("ERR_AttributeMustBeClassNotStruct1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be used as an attribute because it does not inherit from 'System.Attribute'..
'''</summary>
Friend ReadOnly Property ERR_AttributeMustInheritSysAttr() As String
Get
Return ResourceManager.GetString("ERR_AttributeMustInheritSysAttr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attributes cannot be applied to return types of lambda expressions..
'''</summary>
Friend ReadOnly Property ERR_AttributeOnLambdaReturnType() As String
Get
Return ResourceManager.GetString("ERR_AttributeOnLambdaReturnType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML attribute '{0}' must appear before XML attribute '{1}'..
'''</summary>
Friend ReadOnly Property ERR_AttributeOrder() As String
Get
Return ResourceManager.GetString("ERR_AttributeOrder", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute parameter '{0}' must be specified..
'''</summary>
Friend ReadOnly Property ERR_AttributeParameterRequired1() As String
Get
Return ResourceManager.GetString("ERR_AttributeParameterRequired1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute parameter '{0}' or '{1}' must be specified..
'''</summary>
Friend ReadOnly Property ERR_AttributeParameterRequired2() As String
Get
Return ResourceManager.GetString("ERR_AttributeParameterRequired2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Assembly or Module attribute statements must precede any declarations in a file..
'''</summary>
Friend ReadOnly Property ERR_AttributeStmtWrongOrder() As String
Get
Return ResourceManager.GetString("ERR_AttributeStmtWrongOrder", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Auto-implemented properties cannot be WriteOnly..
'''</summary>
Friend ReadOnly Property ERR_AutoPropertyCantBeWriteOnly() As String
Get
Return ResourceManager.GetString("ERR_AutoPropertyCantBeWriteOnly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Auto-implemented properties cannot have parameters..
'''</summary>
Friend ReadOnly Property ERR_AutoPropertyCantHaveParams() As String
Get
Return ResourceManager.GetString("ERR_AutoPropertyCantHaveParams", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Auto-implemented Properties contained in Structures cannot have initializers unless they are marked 'Shared'..
'''</summary>
Friend ReadOnly Property ERR_AutoPropertyInitializedInStructure() As String
Get
Return ResourceManager.GetString("ERR_AutoPropertyInitializedInStructure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot convert anonymous type to an expression tree because a property of the type is used to initialize another property..
'''</summary>
Friend ReadOnly Property ERR_BadAnonymousTypeForExprTree() As String
Get
Return ResourceManager.GetString("ERR_BadAnonymousTypeForExprTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid assembly name: {0}.
'''</summary>
Friend ReadOnly Property ERR_BadAssemblyName() As String
Get
Return ResourceManager.GetString("ERR_BadAssemblyName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Async methods cannot have ByRef parameters..
'''</summary>
Friend ReadOnly Property ERR_BadAsyncByRefParam() As String
Get
Return ResourceManager.GetString("ERR_BadAsyncByRefParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' may only be used in a query expression within the first collection expression of the initial 'From' clause or within the collection expression of a 'Join' clause..
'''</summary>
Friend ReadOnly Property ERR_BadAsyncInQuery() As String
Get
Return ResourceManager.GetString("ERR_BadAsyncInQuery", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The 'Async' modifier can only be used on Subs, or on Functions that return Task or Task(Of T)..
'''</summary>
Friend ReadOnly Property ERR_BadAsyncReturn() As String
Get
Return ResourceManager.GetString("ERR_BadAsyncReturn", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Since this is an async method, the return expression must be of type '{0}' rather than 'Task(Of {0})'..
'''</summary>
Friend ReadOnly Property ERR_BadAsyncReturnOperand1() As String
Get
Return ResourceManager.GetString("ERR_BadAsyncReturnOperand1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' is not valid: Incorrect argument value..
'''</summary>
Friend ReadOnly Property ERR_BadAttribute1() As String
Get
Return ResourceManager.GetString("ERR_BadAttribute1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute constructor has a parameter of type '{0}', which is not an integral, floating-point or Enum type or one of Object, Char, String, Boolean, System.Type or 1-dimensional array of these types..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeConstructor1() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeConstructor1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute constructor has a 'ByRef' parameter of type '{0}'; cannot use constructors with byref parameters to apply the attribute..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeConstructor2() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeConstructor2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute cannot be used because it does not have a Public constructor..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeNonPublicConstructor() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeNonPublicConstructor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in an attribute because its container '{1}' is not declared 'Public'..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeNonPublicContType2() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeNonPublicContType2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute member '{0}' cannot be the target of an assignment because it is not declared 'Public'..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeNonPublicProperty1() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeNonPublicProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in an attribute because it is not declared 'Public'..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeNonPublicType1() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeNonPublicType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property or field '{0}' does not have a valid attribute type..
'''</summary>
Friend ReadOnly Property ERR_BadAttributePropertyType1() As String
Get
Return ResourceManager.GetString("ERR_BadAttributePropertyType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' attribute property '{0}' cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeReadOnlyProperty1() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeReadOnlyProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Shared' attribute property '{0}' cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeSharedProperty1() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeSharedProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be applied because the format of the GUID '{1}' is not correct..
'''</summary>
Friend ReadOnly Property ERR_BadAttributeUuid2() As String
Get
Return ResourceManager.GetString("ERR_BadAttributeUuid2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' can only be used within an Async lambda expression. Consider marking this lambda expression with the 'Async' modifier..
'''</summary>
Friend ReadOnly Property ERR_BadAwaitInNonAsyncLambda() As String
Get
Return ResourceManager.GetString("ERR_BadAwaitInNonAsyncLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' can only be used within an Async method. Consider marking this method with the 'Async' modifier and changing its return type to 'Task(Of {0})'..
'''</summary>
Friend ReadOnly Property ERR_BadAwaitInNonAsyncMethod() As String
Get
Return ResourceManager.GetString("ERR_BadAwaitInNonAsyncMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' can only be used within an Async method. Consider marking this method with the 'Async' modifier and changing its return type to 'Task'..
'''</summary>
Friend ReadOnly Property ERR_BadAwaitInNonAsyncVoidMethod() As String
Get
Return ResourceManager.GetString("ERR_BadAwaitInNonAsyncVoidMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' cannot be used inside a 'Catch' statement, a 'Finally' statement, or a 'SyncLock' statement..
'''</summary>
Friend ReadOnly Property ERR_BadAwaitInTryHandler() As String
Get
Return ResourceManager.GetString("ERR_BadAwaitInTryHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot await Nothing. Consider awaiting 'Task.Yield()' instead..
'''</summary>
Friend ReadOnly Property ERR_BadAwaitNothing() As String
Get
Return ResourceManager.GetString("ERR_BadAwaitNothing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' can only be used when contained within a method or lambda expression marked with the 'Async' modifier..
'''</summary>
Friend ReadOnly Property ERR_BadAwaitNotInAsyncMethodOrLambda() As String
Get
Return ResourceManager.GetString("ERR_BadAwaitNotInAsyncMethodOrLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Syntax error in conditional compilation expression..
'''</summary>
Friend ReadOnly Property ERR_BadCCExpression() As String
Get
Return ResourceManager.GetString("ERR_BadCCExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Algorithm '{0}' is not supported.
'''</summary>
Friend ReadOnly Property ERR_BadChecksumAlgorithm() As String
Get
Return ResourceManager.GetString("ERR_BadChecksumAlgorithm", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Classes cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadClassFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadClassFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to code page '{0}' is invalid or not installed.
'''</summary>
Friend ReadOnly Property ERR_BadCodepage() As String
Get
Return ResourceManager.GetString("ERR_BadCodepage", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Leading '?' can only appear inside a 'With' statement, but not inside an object member initializer..
'''</summary>
Friend ReadOnly Property ERR_BadConditionalWithRef() As String
Get
Return ResourceManager.GetString("ERR_BadConditionalWithRef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a constant declaration..
'''</summary>
Friend ReadOnly Property ERR_BadConstFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadConstFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type or 'New' expected..
'''</summary>
Friend ReadOnly Property ERR_BadConstraintSyntax() As String
Get
Return ResourceManager.GetString("ERR_BadConstraintSyntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a Declare..
'''</summary>
Friend ReadOnly Property ERR_BadDeclareFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadDeclareFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a Delegate declaration..
'''</summary>
Friend ReadOnly Property ERR_BadDelegateFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadDelegateFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a member variable declaration..
'''</summary>
Friend ReadOnly Property ERR_BadDimFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadDimFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Provided documentation mode is unsupported or invalid: '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadDocumentationMode() As String
Get
Return ResourceManager.GetString("ERR_BadDocumentationMode", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enum '{0}' must contain at least one member..
'''</summary>
Friend ReadOnly Property ERR_BadEmptyEnum1() As String
Get
Return ResourceManager.GetString("ERR_BadEmptyEnum1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on an Enum declaration..
'''</summary>
Friend ReadOnly Property ERR_BadEnumFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadEnumFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on an event declaration..
'''</summary>
Friend ReadOnly Property ERR_BadEventFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadEventFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'NotInheritable' classes cannot have members declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsInNotInheritableClass1() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsInNotInheritableClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub New' cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsOnNew1() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsOnNew1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The '{0}' keyword is used to overload inherited members; do not use the '{0}' keyword when overloading 'Sub New'..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsOnNewOverloads() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsOnNewOverloads", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Shared' cannot be combined with '{0}' on a method declaration..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsOnSharedMeth1() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsOnSharedMeth1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Shared' cannot be combined with '{0}' on a property declaration..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsOnSharedProperty1() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsOnSharedProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Properties in a Module cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsOnStdModuleProperty1() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsOnStdModuleProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Default' cannot be combined with '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadFlagsWithDefault1() As String
Get
Return ResourceManager.GetString("ERR_BadFlagsWithDefault1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' must have either a 'New' constraint or a 'Structure' constraint to satisfy the 'New' constraint for type parameter '{1}'..
'''</summary>
Friend ReadOnly Property ERR_BadGenericParamForNewConstraint2() As String
Get
Return ResourceManager.GetString("ERR_BadGenericParamForNewConstraint2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' requires that the type '{0}' have a suitable GetAwaiter method..
'''</summary>
Friend ReadOnly Property ERR_BadGetAwaiterMethod1() As String
Get
Return ResourceManager.GetString("ERR_BadGetAwaiterMethod1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implemented type must be an interface..
'''</summary>
Friend ReadOnly Property ERR_BadImplementsType() As String
Get
Return ResourceManager.GetString("ERR_BadImplementsType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class..
'''</summary>
Friend ReadOnly Property ERR_BadInstanceMemberAccess() As String
Get
Return ResourceManager.GetString("ERR_BadInstanceMemberAccess", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class in an interface cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceClassSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceClassSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegate in an interface cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceDelegateSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceDelegateSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enum in an interface cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceEnumSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceEnumSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on an Interface declaration..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface in an interface cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceInterfaceSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceInterfaceSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on an interface method declaration..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceMethodFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceMethodFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Inherits' statements must precede all declarations in an interface..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceOrderOnInherits() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceOrderOnInherits", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on an interface property declaration..
'''</summary>
Friend ReadOnly Property ERR_BadInterfacePropertyFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfacePropertyFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Structure in an interface cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadInterfaceStructSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_BadInterfaceStructSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Await' requires that the return type '{0}' of '{1}.GetAwaiter()' have suitable IsCompleted, OnCompleted and GetResult members, and implement INotifyCompletion or ICriticalNotifyCompletion..
'''</summary>
Friend ReadOnly Property ERR_BadIsCompletedOnCompletedGetResult2() As String
Get
Return ResourceManager.GetString("ERR_BadIsCompletedOnCompletedGetResult2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Iterator methods cannot have ByRef parameters..
'''</summary>
Friend ReadOnly Property ERR_BadIteratorByRefParam() As String
Get
Return ResourceManager.GetString("ERR_BadIteratorByRefParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Single-line lambdas cannot have the 'Iterator' modifier. Use a multiline lambda instead..
'''</summary>
Friend ReadOnly Property ERR_BadIteratorExpressionLambda() As String
Get
Return ResourceManager.GetString("ERR_BadIteratorExpressionLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Iterator functions must return either IEnumerable(Of T), or IEnumerator(Of T), or the non-generic forms IEnumerable or IEnumerator..
'''</summary>
Friend ReadOnly Property ERR_BadIteratorReturn() As String
Get
Return ResourceManager.GetString("ERR_BadIteratorReturn", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Provided language version is unsupported or invalid: '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadLanguageVersion() As String
Get
Return ResourceManager.GetString("ERR_BadLanguageVersion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a local constant declaration..
'''</summary>
Friend ReadOnly Property ERR_BadLocalConstFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadLocalConstFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a local variable declaration..
'''</summary>
Friend ReadOnly Property ERR_BadLocalDimFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadLocalDimFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be referenced because it is not a valid assembly..
'''</summary>
Friend ReadOnly Property ERR_BadMetaDataReference1() As String
Get
Return ResourceManager.GetString("ERR_BadMetaDataReference1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a method declaration..
'''</summary>
Friend ReadOnly Property ERR_BadMethodFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadMethodFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to load module file '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_BadModuleFile1() As String
Get
Return ResourceManager.GetString("ERR_BadModuleFile1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Modules cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadModuleFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadModuleFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid module name: {0}.
'''</summary>
Friend ReadOnly Property ERR_BadModuleName() As String
Get
Return ResourceManager.GetString("ERR_BadModuleName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a valid name and cannot be used as the root namespace name..
'''</summary>
Friend ReadOnly Property ERR_BadNamespaceName1() As String
Get
Return ResourceManager.GetString("ERR_BadNamespaceName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Named argument '{0}' is used out-of-position but is followed by an unnamed argument.
'''</summary>
Friend ReadOnly Property ERR_BadNonTrailingNamedArgument() As String
Get
Return ResourceManager.GetString("ERR_BadNonTrailingNamedArgument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable types are not allowed in conditional compilation expressions..
'''</summary>
Friend ReadOnly Property ERR_BadNullTypeInCCExpression() As String
Get
Return ResourceManager.GetString("ERR_BadNullTypeInCCExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operators cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadOperatorFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadOperatorFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no accessible '{0}' can be called:{1}.
'''</summary>
Friend ReadOnly Property ERR_BadOverloadCandidates2() As String
Get
Return ResourceManager.GetString("ERR_BadOverloadCandidates2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they have different access levels..
'''</summary>
Friend ReadOnly Property ERR_BadOverrideAccess2() As String
Get
Return ResourceManager.GetString("ERR_BadOverrideAccess2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error reading debug information for '{0}'.
'''</summary>
Friend ReadOnly Property ERR_BadPdbData() As String
Get
Return ResourceManager.GetString("ERR_BadPdbData", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property accessors cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadPropertyAccessorFlags() As String
Get
Return ResourceManager.GetString("ERR_BadPropertyAccessorFlags", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property accessors cannot be declared '{0}' in a 'NotOverridable' property..
'''</summary>
Friend ReadOnly Property ERR_BadPropertyAccessorFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadPropertyAccessorFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property accessors cannot be declared '{0}' in a 'Default' property..
'''</summary>
Friend ReadOnly Property ERR_BadPropertyAccessorFlags2() As String
Get
Return ResourceManager.GetString("ERR_BadPropertyAccessorFlags2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property cannot be declared '{0}' because it contains a 'Private' accessor..
'''</summary>
Friend ReadOnly Property ERR_BadPropertyAccessorFlags3() As String
Get
Return ResourceManager.GetString("ERR_BadPropertyAccessorFlags3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Access modifier '{0}' is not valid. The access modifier of 'Get' and 'Set' should be more restrictive than the property access level..
'''</summary>
Friend ReadOnly Property ERR_BadPropertyAccessorFlagsRestrict() As String
Get
Return ResourceManager.GetString("ERR_BadPropertyAccessorFlagsRestrict", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Properties cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BadPropertyFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadPropertyFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a Structure declaration..
'''</summary>
Friend ReadOnly Property ERR_BadRecordFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadRecordFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to load referenced library '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_BadRefLib1() As String
Get
Return ResourceManager.GetString("ERR_BadRefLib1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The implicit return variable of an Iterator or Async method cannot be accessed..
'''</summary>
Friend ReadOnly Property ERR_BadResumableAccessReturnVariable() As String
Get
Return ResourceManager.GetString("ERR_BadResumableAccessReturnVariable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to To return a value from an Iterator function, use 'Yield' rather than 'Return'..
'''</summary>
Friend ReadOnly Property ERR_BadReturnValueInIterator() As String
Get
Return ResourceManager.GetString("ERR_BadReturnValueInIterator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Provided source code kind is unsupported or invalid: '{0}'.
'''</summary>
Friend ReadOnly Property ERR_BadSourceCodeKind() As String
Get
Return ResourceManager.GetString("ERR_BadSourceCodeKind", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_BadSpecifierCombo2() As String
Get
Return ResourceManager.GetString("ERR_BadSpecifierCombo2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Static variables cannot appear inside Async or Iterator methods..
'''</summary>
Friend ReadOnly Property ERR_BadStaticInitializerInResumable() As String
Get
Return ResourceManager.GetString("ERR_BadStaticInitializerInResumable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variables within generic methods cannot be declared 'Static'..
'''</summary>
Friend ReadOnly Property ERR_BadStaticLocalInGenericMethod() As String
Get
Return ResourceManager.GetString("ERR_BadStaticLocalInGenericMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variables within methods of structures cannot be declared 'Static'..
'''</summary>
Friend ReadOnly Property ERR_BadStaticLocalInStruct() As String
Get
Return ResourceManager.GetString("ERR_BadStaticLocalInStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type argument '{0}' does not satisfy the 'Class' constraint for type parameter '{1}'..
'''</summary>
Friend ReadOnly Property ERR_BadTypeArgForRefConstraint2() As String
Get
Return ResourceManager.GetString("ERR_BadTypeArgForRefConstraint2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type argument '{0}' does not satisfy the 'Structure' constraint for type parameter '{1}'..
'''</summary>
Friend ReadOnly Property ERR_BadTypeArgForStructConstraint2() As String
Get
Return ResourceManager.GetString("ERR_BadTypeArgForStructConstraint2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' must be a value type or a type argument constrained to 'Structure' in order to be used with 'Nullable' or nullable modifier '?'..
'''</summary>
Friend ReadOnly Property ERR_BadTypeArgForStructConstraintNull() As String
Get
Return ResourceManager.GetString("ERR_BadTypeArgForStructConstraintNull", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Non-intrinsic type names are not allowed in conditional compilation expressions..
'''</summary>
Friend ReadOnly Property ERR_BadTypeInCCExpression() As String
Get
Return ResourceManager.GetString("ERR_BadTypeInCCExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Void' can only be used in a GetType expression..
'''</summary>
Friend ReadOnly Property ERR_BadUseOfVoid() As String
Get
Return ResourceManager.GetString("ERR_BadUseOfVoid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on a WithEvents declaration..
'''</summary>
Friend ReadOnly Property ERR_BadWithEventsFlags1() As String
Get
Return ResourceManager.GetString("ERR_BadWithEventsFlags1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Leading '.' or '!' can only appear inside a 'With' statement..
'''</summary>
Friend ReadOnly Property ERR_BadWithRef() As String
Get
Return ResourceManager.GetString("ERR_BadWithRef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Yield' can only be used in a method marked with the 'Iterator' modifier..
'''</summary>
Friend ReadOnly Property ERR_BadYieldInNonIteratorMethod() As String
Get
Return ResourceManager.GetString("ERR_BadYieldInNonIteratorMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Yield' cannot be used inside a 'Catch' statement or a 'Finally' statement..
'''</summary>
Friend ReadOnly Property ERR_BadYieldInTryHandler() As String
Get
Return ResourceManager.GetString("ERR_BadYieldInTryHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Base class '{0}' specified for class '{1}' cannot be different from the base class '{2}' of one of its other partial types..
'''</summary>
Friend ReadOnly Property ERR_BaseMismatchForPartialClass3() As String
Get
Return ResourceManager.GetString("ERR_BaseMismatchForPartialClass3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' must either be declared 'MustInherit' or override the following inherited 'MustOverride' member(s): {1}..
'''</summary>
Friend ReadOnly Property ERR_BaseOnlyClassesMustBeExplicit2() As String
Get
Return ResourceManager.GetString("ERR_BaseOnlyClassesMustBeExplicit2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' Base type of '{0}' needs '{1}' to be resolved..
'''</summary>
Friend ReadOnly Property ERR_BaseTypeReferences2() As String
Get
Return ResourceManager.GetString("ERR_BaseTypeReferences2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot inherit interface '{0}' because the interface '{1}' from which it inherits could be identical to interface '{2}' for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_BaseUnifiesWithInterfaces3() As String
Get
Return ResourceManager.GetString("ERR_BaseUnifiesWithInterfaces3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to the file '{0}' is not a text file.
'''</summary>
Friend ReadOnly Property ERR_BinaryFile() As String
Get
Return ResourceManager.GetString("ERR_BinaryFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' is not defined for types '{1}' and '{2}'..
'''</summary>
Friend ReadOnly Property ERR_BinaryOperands3() As String
Get
Return ResourceManager.GetString("ERR_BinaryOperands3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' is not defined for types '{1}' and '{2}'. You can use the 'Value' property to get the string value of the first element of '{3}'..
'''</summary>
Friend ReadOnly Property ERR_BinaryOperandsForXml4() As String
Get
Return ResourceManager.GetString("ERR_BinaryOperandsForXml4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to At least one parameter of this binary operator must be of the containing type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_BinaryParamMustBeContainingType1() As String
Get
Return ResourceManager.GetString("ERR_BinaryParamMustBeContainingType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable '{0}' hides a variable in an enclosing block..
'''</summary>
Friend ReadOnly Property ERR_BlockLocalShadowing1() As String
Get
Return ResourceManager.GetString("ERR_BlockLocalShadowing1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot end a block outside of a line 'If' statement..
'''</summary>
Friend ReadOnly Property ERR_BogusWithinLineIf() As String
Get
Return ResourceManager.GetString("ERR_BogusWithinLineIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Branching out of a 'Finally' is not valid..
'''</summary>
Friend ReadOnly Property ERR_BranchOutOfFinally() As String
Get
Return ResourceManager.GetString("ERR_BranchOutOfFinally", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} parameters cannot be declared 'ByRef'..
'''</summary>
Friend ReadOnly Property ERR_ByRefIllegal1() As String
Get
Return ResourceManager.GetString("ERR_ByRefIllegal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to References to 'ByRef' parameters cannot be converted to an expression tree..
'''</summary>
Friend ReadOnly Property ERR_ByRefParamInExpressionTree() As String
Get
Return ResourceManager.GetString("ERR_ByRefParamInExpressionTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be made nullable..
'''</summary>
Friend ReadOnly Property ERR_CannotBeMadeNullable1() As String
Get
Return ResourceManager.GetString("ERR_CannotBeMadeNullable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event..
'''</summary>
Friend ReadOnly Property ERR_CannotCallEvent1() As String
Get
Return ResourceManager.GetString("ERR_CannotCallEvent1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value '{0}' cannot be converted to '{1}'..
'''</summary>
Friend ReadOnly Property ERR_CannotConvertValue2() As String
Get
Return ResourceManager.GetString("ERR_CannotConvertValue2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be embedded because it has generic argument. Consider disabling the embedding of interop types..
'''</summary>
Friend ReadOnly Property ERR_CannotEmbedInterfaceWithGeneric() As String
Get
Return ResourceManager.GetString("ERR_CannotEmbedInterfaceWithGeneric", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to /embed switch is only supported when emitting a PDB..
'''</summary>
Friend ReadOnly Property ERR_CannotEmbedWithoutPdb() As String
Get
Return ResourceManager.GetString("ERR_CannotEmbedWithoutPdb", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}{1}' is not valid because '{2}' is inside a scope that defines a variable that is used in a lambda or query expression..
'''</summary>
Friend ReadOnly Property ERR_CannotGotoNonScopeBlocksWithClosure() As String
Get
Return ResourceManager.GetString("ERR_CannotGotoNonScopeBlocksWithClosure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to A nullable type cannot be inferred for variable '{0}'..
'''</summary>
Friend ReadOnly Property ERR_CannotInferNullableForVariable1() As String
Get
Return ResourceManager.GetString("ERR_CannotInferNullableForVariable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type property '{0}' cannot be used in the definition of a lambda expression within the same initialization list..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftAnonymousType1() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftAnonymousType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ByRef' parameter '{0}' cannot be used in a lambda expression..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftByRefParamLambda1() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftByRefParamLambda1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ByRef' parameter '{0}' cannot be used in a query expression..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftByRefParamQuery1() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftByRefParamQuery1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Instance of restricted type '{0}' cannot be used in a lambda expression..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftRestrictedTypeLambda() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftRestrictedTypeLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Instance of restricted type '{0}' cannot be used in a query expression..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftRestrictedTypeQuery() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftRestrictedTypeQuery", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable of restricted type '{0}' cannot be declared in an Async or Iterator method..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftRestrictedTypeResumable1() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftRestrictedTypeResumable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Instance members and 'Me' cannot be used within a lambda expression in structures..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftStructureMeLambda() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftStructureMeLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Instance members and 'Me' cannot be used within query expressions in structures..
'''</summary>
Friend ReadOnly Property ERR_CannotLiftStructureMeQuery() As String
Get
Return ResourceManager.GetString("ERR_CannotLiftStructureMeQuery", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference to class '{0}' is not allowed when its assembly is configured to embed interop types..
'''</summary>
Friend ReadOnly Property ERR_CannotLinkClassWithNoPIA1() As String
Get
Return ResourceManager.GetString("ERR_CannotLinkClassWithNoPIA1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because it is not accessible in this context..
'''</summary>
Friend ReadOnly Property ERR_CannotOverrideInAccessibleMember() As String
Get
Return ResourceManager.GetString("ERR_CannotOverrideInAccessibleMember", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used across assembly boundaries because it has a generic type argument that is an embedded interop type..
'''</summary>
Friend ReadOnly Property ERR_CannotUseGenericTypeAcrossAssemblyBoundaries() As String
Get
Return ResourceManager.GetString("ERR_CannotUseGenericTypeAcrossAssemblyBoundaries", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method cannot contain both a '{0}' statement and a definition of a variable that is used in a lambda or query expression..
'''</summary>
Friend ReadOnly Property ERR_CannotUseOnErrorGotoWithClosure() As String
Get
Return ResourceManager.GetString("ERR_CannotUseOnErrorGotoWithClosure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constant cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_CantAssignToConst() As String
Get
Return ResourceManager.GetString("ERR_CantAssignToConst", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' does not return a Task and cannot be awaited. Consider changing it to an Async Function..
'''</summary>
Friend ReadOnly Property ERR_CantAwaitAsyncSub1() As String
Get
Return ResourceManager.GetString("ERR_CantAwaitAsyncSub1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'If' operator cannot be used in a 'Call' statement..
'''</summary>
Friend ReadOnly Property ERR_CantCallIIF() As String
Get
Return ResourceManager.GetString("ERR_CantCallIIF", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An Object Initializer and a Collection Initializer cannot be combined in the same initialization..
'''</summary>
Friend ReadOnly Property ERR_CantCombineInitializers() As String
Get
Return ResourceManager.GetString("ERR_CantCombineInitializers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conflicting options specified: Win32 resource file; Win32 manifest..
'''</summary>
Friend ReadOnly Property ERR_CantHaveWin32ResAndManifest() As String
Get
Return ResourceManager.GetString("ERR_CantHaveWin32ResAndManifest", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to can't open '{0}' for writing: {1}.
'''</summary>
Friend ReadOnly Property ERR_CantOpenFileWrite() As String
Get
Return ResourceManager.GetString("ERR_CantOpenFileWrite", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because it is not declared 'Overridable'..
'''</summary>
Friend ReadOnly Property ERR_CantOverride4() As String
Get
Return ResourceManager.GetString("ERR_CantOverride4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub New' cannot be declared 'Overrides'..
'''</summary>
Friend ReadOnly Property ERR_CantOverrideConstructor() As String
Get
Return ResourceManager.GetString("ERR_CantOverrideConstructor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because it is declared 'NotOverridable'..
'''</summary>
Friend ReadOnly Property ERR_CantOverrideNotOverridable2() As String
Get
Return ResourceManager.GetString("ERR_CantOverrideNotOverridable2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Derived classes cannot raise base class events..
'''</summary>
Friend ReadOnly Property ERR_CantRaiseBaseEvent() As String
Get
Return ResourceManager.GetString("ERR_CantRaiseBaseEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error reading ruleset file {0} - {1}.
'''</summary>
Friend ReadOnly Property ERR_CantReadRulesetFile() As String
Get
Return ResourceManager.GetString("ERR_CantReadRulesetFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot refer to itself through its default instance; use 'Me' instead..
'''</summary>
Friend ReadOnly Property ERR_CantReferToMyGroupInsideGroupType1() As String
Get
Return ResourceManager.GetString("ERR_CantReferToMyGroupInsideGroupType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot shadow a method declared 'MustOverride'..
'''</summary>
Friend ReadOnly Property ERR_CantShadowAMustOverride1() As String
Get
Return ResourceManager.GetString("ERR_CantShadowAMustOverride1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable modifier '?' and array modifiers '(' and ')' cannot be specified on both a variable and its type..
'''</summary>
Friend ReadOnly Property ERR_CantSpecifyArrayAndNullableOnBoth() As String
Get
Return ResourceManager.GetString("ERR_CantSpecifyArrayAndNullableOnBoth", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array modifiers cannot be specified on both a variable and its type..
'''</summary>
Friend ReadOnly Property ERR_CantSpecifyArraysOnBoth() As String
Get
Return ResourceManager.GetString("ERR_CantSpecifyArraysOnBoth", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable modifier cannot be specified in variable declarations with 'As New'..
'''</summary>
Friend ReadOnly Property ERR_CantSpecifyAsNewAndNullable() As String
Get
Return ResourceManager.GetString("ERR_CantSpecifyAsNewAndNullable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable modifier cannot be specified on both a variable and its type..
'''</summary>
Friend ReadOnly Property ERR_CantSpecifyNullableOnBoth() As String
Get
Return ResourceManager.GetString("ERR_CantSpecifyNullableOnBoth", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array modifiers cannot be specified on lambda expression parameter name. They must be specified on its type..
'''</summary>
Friend ReadOnly Property ERR_CantSpecifyParamsOnLambdaParamNoType() As String
Get
Return ResourceManager.GetString("ERR_CantSpecifyParamsOnLambdaParamNoType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expressions used with an 'If' expression cannot contain type characters..
'''</summary>
Friend ReadOnly Property ERR_CantSpecifyTypeCharacterOnIIF() As String
Get
Return ResourceManager.GetString("ERR_CantSpecifyTypeCharacterOnIIF", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Throw' operand must derive from 'System.Exception'..
'''</summary>
Friend ReadOnly Property ERR_CantThrowNonException() As String
Get
Return ResourceManager.GetString("ERR_CantThrowNonException", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The RequiredAttribute attribute is not permitted on Visual Basic types..
'''</summary>
Friend ReadOnly Property ERR_CantUseRequiredAttribute() As String
Get
Return ResourceManager.GetString("ERR_CantUseRequiredAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Case' cannot follow a 'Case Else' in the same 'Select' statement..
'''</summary>
Friend ReadOnly Property ERR_CaseAfterCaseElse() As String
Get
Return ResourceManager.GetString("ERR_CaseAfterCaseElse", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Case Else' can only appear inside a 'Select Case' statement..
'''</summary>
Friend ReadOnly Property ERR_CaseElseNoSelect() As String
Get
Return ResourceManager.GetString("ERR_CaseElseNoSelect", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Case' can only appear inside a 'Select Case' statement..
'''</summary>
Friend ReadOnly Property ERR_CaseNoSelect() As String
Get
Return ResourceManager.GetString("ERR_CaseNoSelect", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' cannot appear after 'Finally' within a 'Try' statement..
'''</summary>
Friend ReadOnly Property ERR_CatchAfterFinally() As String
Get
Return ResourceManager.GetString("ERR_CatchAfterFinally", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' cannot appear outside a 'Try' statement..
'''</summary>
Friend ReadOnly Property ERR_CatchNoMatchingTry() As String
Get
Return ResourceManager.GetString("ERR_CatchNoMatchingTry", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' cannot catch type '{0}' because it is not 'System.Exception' or a class that inherits from 'System.Exception'..
'''</summary>
Friend ReadOnly Property ERR_CatchNotException1() As String
Get
Return ResourceManager.GetString("ERR_CatchNotException1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a local variable or parameter, and so cannot be used as a 'Catch' variable..
'''</summary>
Friend ReadOnly Property ERR_CatchVariableNotLocal1() As String
Get
Return ResourceManager.GetString("ERR_CatchVariableNotLocal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Char' values cannot be converted to '{0}'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit..
'''</summary>
Friend ReadOnly Property ERR_CharToIntegralTypeMismatch1() As String
Get
Return ResourceManager.GetString("ERR_CharToIntegralTypeMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This inheritance causes circular dependencies between {0} '{1}' and its nested or base type '{2}'..
'''</summary>
Friend ReadOnly Property ERR_CircularBaseDependencies4() As String
Get
Return ResourceManager.GetString("ERR_CircularBaseDependencies4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constant '{0}' cannot depend on its own value..
'''</summary>
Friend ReadOnly Property ERR_CircularEvaluation1() As String
Get
Return ResourceManager.GetString("ERR_CircularEvaluation1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of '{0}' cannot be inferred from an expression containing '{0}'..
'''</summary>
Friend ReadOnly Property ERR_CircularInference1() As String
Get
Return ResourceManager.GetString("ERR_CircularInference1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' conflicts with the reserved member by this name that is implicitly declared in all enums..
'''</summary>
Friend ReadOnly Property ERR_ClashWithReservedEnumMember1() As String
Get
Return ResourceManager.GetString("ERR_ClashWithReservedEnumMember1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type constraint cannot be a 'NotInheritable' class..
'''</summary>
Friend ReadOnly Property ERR_ClassConstraintNotInheritable1() As String
Get
Return ResourceManager.GetString("ERR_ClassConstraintNotInheritable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot implement interface '{0}' because the interface '{1}' from which it inherits could be identical to implemented interface '{2}' for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_ClassInheritsBaseUnifiesWithInterfaces3() As String
Get
Return ResourceManager.GetString("ERR_ClassInheritsBaseUnifiesWithInterfaces3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot implement interface '{0}' because the interface '{1}' from which it inherits could be identical to interface '{2}' from which the implemented interface '{3}' inherits for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_ClassInheritsInterfaceBaseUnifiesWithBase4() As String
Get
Return ResourceManager.GetString("ERR_ClassInheritsInterfaceBaseUnifiesWithBase4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot implement interface '{0}' because it could be identical to interface '{1}' from which the implemented interface '{2}' inherits for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_ClassInheritsInterfaceUnifiesWithBase3() As String
Get
Return ResourceManager.GetString("ERR_ClassInheritsInterfaceUnifiesWithBase3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is a class type and cannot be used as an expression..
'''</summary>
Friend ReadOnly Property ERR_ClassNotExpression1() As String
Get
Return ResourceManager.GetString("ERR_ClassNotExpression1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' given in a source file conflicts with option '{1}'..
'''</summary>
Friend ReadOnly Property ERR_CmdOptionConflictsSource() As String
Get
Return ResourceManager.GetString("ERR_CmdOptionConflictsSource", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implementing class '{0}' for interface '{1}' cannot be found..
'''</summary>
Friend ReadOnly Property ERR_CoClassMissing2() As String
Get
Return ResourceManager.GetString("ERR_CoClassMissing2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' conflicts with public type defined in added module '{1}'..
'''</summary>
Friend ReadOnly Property ERR_CollisionWithPublicTypeInModule() As String
Get
Return ResourceManager.GetString("ERR_CollisionWithPublicTypeInModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' and '{0}' cannot both be applied to the same class..
'''</summary>
Friend ReadOnly Property ERR_ComClassAndReservedAttribute1() As String
Get
Return ResourceManager.GetString("ERR_ComClassAndReservedAttribute1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' cannot be applied to a class that is declared 'MustInherit'..
'''</summary>
Friend ReadOnly Property ERR_ComClassCantBeAbstract0() As String
Get
Return ResourceManager.GetString("ERR_ComClassCantBeAbstract0", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'InterfaceId' and 'EventsId' parameters for 'Microsoft.VisualBasic.ComClassAttribute' on '{0}' cannot have the same value..
'''</summary>
Friend ReadOnly Property ERR_ComClassDuplicateGuids1() As String
Get
Return ResourceManager.GetString("ERR_ComClassDuplicateGuids1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generic methods cannot be exposed to COM..
'''</summary>
Friend ReadOnly Property ERR_ComClassGenericMethod() As String
Get
Return ResourceManager.GetString("ERR_ComClassGenericMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' cannot be applied to a class that is generic or contained inside a generic type..
'''</summary>
Friend ReadOnly Property ERR_ComClassOnGeneric() As String
Get
Return ResourceManager.GetString("ERR_ComClassOnGeneric", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' cannot be applied to '{0}' because it is not declared 'Public'..
'''</summary>
Friend ReadOnly Property ERR_ComClassRequiresPublicClass1() As String
Get
Return ResourceManager.GetString("ERR_ComClassRequiresPublicClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' cannot be applied to '{0}' because its container '{1}' is not declared 'Public'..
'''</summary>
Friend ReadOnly Property ERR_ComClassRequiresPublicClass2() As String
Get
Return ResourceManager.GetString("ERR_ComClassRequiresPublicClass2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DispIdAttribute' cannot be applied to '{0}' because 'Microsoft.VisualBasic.ComClassAttribute' reserves values less than zero..
'''</summary>
Friend ReadOnly Property ERR_ComClassReservedDispId1() As String
Get
Return ResourceManager.GetString("ERR_ComClassReservedDispId1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DispIdAttribute' cannot be applied to '{0}' because 'Microsoft.VisualBasic.ComClassAttribute' reserves zero for the default property..
'''</summary>
Friend ReadOnly Property ERR_ComClassReservedDispIdZero1() As String
Get
Return ResourceManager.GetString("ERR_ComClassReservedDispIdZero1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conditional compilation constant '{1}' is not valid: {0}.
'''</summary>
Friend ReadOnly Property ERR_ConditionalCompilationConstantNotValid() As String
Get
Return ResourceManager.GetString("ERR_ConditionalCompilationConstantNotValid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' must define operator '{1}' to be used in a '{2}' expression..
'''</summary>
Friend ReadOnly Property ERR_ConditionOperatorRequired3() As String
Get
Return ResourceManager.GetString("ERR_ConditionOperatorRequired3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conflict between the default property and the 'DefaultMemberAttribute' defined on '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ConflictDefaultPropertyAttribute() As String
Get
Return ResourceManager.GetString("ERR_ConflictDefaultPropertyAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constraint '{0}' conflicts with the constraint '{1}' already specified for type parameter '{2}'..
'''</summary>
Friend ReadOnly Property ERR_ConflictingDirectConstraints3() As String
Get
Return ResourceManager.GetString("ERR_ConflictingDirectConstraints3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Assembly and module '{0}' cannot target different processors..
'''</summary>
Friend ReadOnly Property ERR_ConflictingMachineModule() As String
Get
Return ResourceManager.GetString("ERR_ConflictingMachineModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error embedding Win32 manifest: Option /win32manifest conflicts with /nowin32manifest..
'''</summary>
Friend ReadOnly Property ERR_ConflictingManifestSwitches() As String
Get
Return ResourceManager.GetString("ERR_ConflictingManifestSwitches", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Length of String constant exceeds current memory limit. Try splitting the string into multiple constants..
'''</summary>
Friend ReadOnly Property ERR_ConstantStringTooLong() As String
Get
Return ResourceManager.GetString("ERR_ConstantStringTooLong", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constants must have a value..
'''</summary>
Friend ReadOnly Property ERR_ConstantWithNoValue() As String
Get
Return ResourceManager.GetString("ERR_ConstantWithNoValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constants must be of an intrinsic or enumerated type, not a class, structure, type parameter, or array type..
'''</summary>
Friend ReadOnly Property ERR_ConstAsNonConstant() As String
Get
Return ResourceManager.GetString("ERR_ConstAsNonConstant", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type constraint '{0}' must be either a class, interface or type parameter..
'''</summary>
Friend ReadOnly Property ERR_ConstNotClassInterfaceOrTypeParam1() As String
Get
Return ResourceManager.GetString("ERR_ConstNotClassInterfaceOrTypeParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constraint type '{0}' already specified for this type parameter..
'''</summary>
Friend ReadOnly Property ERR_ConstraintAlreadyExists1() As String
Get
Return ResourceManager.GetString("ERR_ConstraintAlreadyExists1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constraint '{0}' conflicts with the indirect constraint '{1}' obtained from the type parameter constraint '{2}'..
'''</summary>
Friend ReadOnly Property ERR_ConstraintClashDirectIndirect3() As String
Get
Return ResourceManager.GetString("ERR_ConstraintClashDirectIndirect3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Indirect constraint '{0}' obtained from the type parameter constraint '{1}' conflicts with the constraint '{2}'..
'''</summary>
Friend ReadOnly Property ERR_ConstraintClashIndirectDirect3() As String
Get
Return ResourceManager.GetString("ERR_ConstraintClashIndirectDirect3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Indirect constraint '{0}' obtained from the type parameter constraint '{1}' conflicts with the indirect constraint '{2}' obtained from the type parameter constraint '{3}'..
'''</summary>
Friend ReadOnly Property ERR_ConstraintClashIndirectIndirect4() As String
Get
Return ResourceManager.GetString("ERR_ConstraintClashIndirectIndirect4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' cannot be constrained to itself: {1}.
'''</summary>
Friend ReadOnly Property ERR_ConstraintCycle2() As String
Get
Return ResourceManager.GetString("ERR_ConstraintCycle2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}' is constrained to '{1}'..
'''</summary>
Friend ReadOnly Property ERR_ConstraintCycleLink2() As String
Get
Return ResourceManager.GetString("ERR_ConstraintCycleLink2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be used as a type constraint..
'''</summary>
Friend ReadOnly Property ERR_ConstraintIsRestrictedType1() As String
Get
Return ResourceManager.GetString("ERR_ConstraintIsRestrictedType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constructor must not have the 'Async' modifier..
'''</summary>
Friend ReadOnly Property ERR_ConstructorAsync() As String
Get
Return ResourceManager.GetString("ERR_ConstructorAsync", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub New' cannot be declared 'Partial'..
'''</summary>
Friend ReadOnly Property ERR_ConstructorCannotBeDeclaredPartial() As String
Get
Return ResourceManager.GetString("ERR_ConstructorCannotBeDeclaredPartial", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constructor must be declared as a Sub, not as a Function..
'''</summary>
Friend ReadOnly Property ERR_ConstructorFunction() As String
Get
Return ResourceManager.GetString("ERR_ConstructorFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' has no constructors..
'''</summary>
Friend ReadOnly Property ERR_ConstructorNotFound1() As String
Get
Return ResourceManager.GetString("ERR_ConstructorNotFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Continue Do' can only appear inside a 'Do' statement..
'''</summary>
Friend ReadOnly Property ERR_ContinueDoNotWithinDo() As String
Get
Return ResourceManager.GetString("ERR_ContinueDoNotWithinDo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Continue For' can only appear inside a 'For' statement..
'''</summary>
Friend ReadOnly Property ERR_ContinueForNotWithinFor() As String
Get
Return ResourceManager.GetString("ERR_ContinueForNotWithinFor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Continue While' can only appear inside a 'While' statement..
'''</summary>
Friend ReadOnly Property ERR_ContinueWhileNotWithinWhile() As String
Get
Return ResourceManager.GetString("ERR_ContinueWhileNotWithinWhile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from a base type..
'''</summary>
Friend ReadOnly Property ERR_ConversionFromBaseType() As String
Get
Return ResourceManager.GetString("ERR_ConversionFromBaseType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from a derived type..
'''</summary>
Friend ReadOnly Property ERR_ConversionFromDerivedType() As String
Get
Return ResourceManager.GetString("ERR_ConversionFromDerivedType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from an interface type..
'''</summary>
Friend ReadOnly Property ERR_ConversionFromInterfaceType() As String
Get
Return ResourceManager.GetString("ERR_ConversionFromInterfaceType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from Object..
'''</summary>
Friend ReadOnly Property ERR_ConversionFromObject() As String
Get
Return ResourceManager.GetString("ERR_ConversionFromObject", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from a type to its base type..
'''</summary>
Friend ReadOnly Property ERR_ConversionToBaseType() As String
Get
Return ResourceManager.GetString("ERR_ConversionToBaseType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from a type to its derived type..
'''</summary>
Friend ReadOnly Property ERR_ConversionToDerivedType() As String
Get
Return ResourceManager.GetString("ERR_ConversionToDerivedType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert to an interface type..
'''</summary>
Friend ReadOnly Property ERR_ConversionToInterfaceType() As String
Get
Return ResourceManager.GetString("ERR_ConversionToInterfaceType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert to Object..
'''</summary>
Friend ReadOnly Property ERR_ConversionToObject() As String
Get
Return ResourceManager.GetString("ERR_ConversionToObject", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators cannot convert from a type to the same type..
'''</summary>
Friend ReadOnly Property ERR_ConversionToSameType() As String
Get
Return ResourceManager.GetString("ERR_ConversionToSameType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value of type '{0}' cannot be converted to '{1}' because '{2}' is not derived from '{3}'..
'''</summary>
Friend ReadOnly Property ERR_ConvertArrayMismatch4() As String
Get
Return ResourceManager.GetString("ERR_ConvertArrayMismatch4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value of type '{0}' cannot be converted to '{1}' because the array types have different numbers of dimensions..
'''</summary>
Friend ReadOnly Property ERR_ConvertArrayRankMismatch2() As String
Get
Return ResourceManager.GetString("ERR_ConvertArrayRankMismatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value of type '{0}' cannot be converted to '{1}' because '{2}' is not a reference type..
'''</summary>
Friend ReadOnly Property ERR_ConvertObjectArrayMismatch3() As String
Get
Return ResourceManager.GetString("ERR_ConvertObjectArrayMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion operators must be declared either 'Widening' or 'Narrowing'..
'''</summary>
Friend ReadOnly Property ERR_ConvMustBeWideningOrNarrowing() As String
Get
Return ResourceManager.GetString("ERR_ConvMustBeWideningOrNarrowing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Either the parameter type or the return type of this conversion operator must be of the containing type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ConvParamMustBeContainingType1() As String
Get
Return ResourceManager.GetString("ERR_ConvParamMustBeContainingType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot copy the value of 'ByRef' parameter '{0}' back to the matching argument because type '{1}' cannot be converted to type '{2}'..
'''</summary>
Friend ReadOnly Property ERR_CopyBackTypeMismatch3() As String
Get
Return ResourceManager.GetString("ERR_CopyBackTypeMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cryptographic failure while creating hashes..
'''</summary>
Friend ReadOnly Property ERR_CryptoHashFailed() As String
Get
Return ResourceManager.GetString("ERR_CryptoHashFailed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Custom' modifier is not valid on events declared in interfaces..
'''</summary>
Friend ReadOnly Property ERR_CustomEventInvInInterface() As String
Get
Return ResourceManager.GetString("ERR_CustomEventInvInInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Custom' modifier is not valid on events declared without explicit delegate types..
'''</summary>
Friend ReadOnly Property ERR_CustomEventRequiresAs() As String
Get
Return ResourceManager.GetString("ERR_CustomEventRequiresAs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion from 'Date' to 'Double' requires calling the 'Date.ToOADate' method..
'''</summary>
Friend ReadOnly Property ERR_DateToDoubleConversion() As String
Get
Return ResourceManager.GetString("ERR_DateToDoubleConversion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Debug entry point must be a definition of a method declared in the current compilation..
'''</summary>
Friend ReadOnly Property ERR_DebugEntryPointNotSourceMethodDefinition() As String
Get
Return ResourceManager.GetString("ERR_DebugEntryPointNotSourceMethodDefinition", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Declare' statements are not allowed in generic types or types contained in generic types..
'''</summary>
Friend ReadOnly Property ERR_DeclaresCantBeInGeneric() As String
Get
Return ResourceManager.GetString("ERR_DeclaresCantBeInGeneric", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event '{0}' specified by the 'DefaultEvent' attribute is not a publicly accessible event for this class..
'''</summary>
Friend ReadOnly Property ERR_DefaultEventNotFound1() As String
Get
Return ResourceManager.GetString("ERR_DefaultEventNotFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Default member of '{0}' is not a property..
'''</summary>
Friend ReadOnly Property ERR_DefaultMemberNotProperty1() As String
Get
Return ResourceManager.GetString("ERR_DefaultMemberNotProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because only one is declared 'Default'..
'''</summary>
Friend ReadOnly Property ERR_DefaultMissingFromProperty2() As String
Get
Return ResourceManager.GetString("ERR_DefaultMissingFromProperty2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Default property access is ambiguous between the inherited interface members '{0}' of interface '{1}' and '{2}' of interface '{3}'..
'''</summary>
Friend ReadOnly Property ERR_DefaultPropertyAmbiguousAcrossInterfaces4() As String
Get
Return ResourceManager.GetString("ERR_DefaultPropertyAmbiguousAcrossInterfaces4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Properties with no required parameters cannot be declared 'Default'..
'''</summary>
Friend ReadOnly Property ERR_DefaultPropertyWithNoParams() As String
Get
Return ResourceManager.GetString("ERR_DefaultPropertyWithNoParams", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Default values cannot be supplied for parameters that are not declared 'Optional'..
'''</summary>
Friend ReadOnly Property ERR_DefaultValueForNonOptionalParam() As String
Get
Return ResourceManager.GetString("ERR_DefaultValueForNonOptionalParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to No accessible method '{0}' has a signature compatible with delegate '{1}':{2}.
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingFailure3() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingFailure3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method '{0}' does not have a signature compatible with delegate '{1}'..
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingIncompatible2() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingIncompatible2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Extension Method '{0}' defined in '{2}' does not have a signature compatible with delegate '{1}'..
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingIncompatible3() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingIncompatible3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method does not have a signature compatible with the delegate..
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingMismatch() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On does not allow narrowing in implicit type conversions between method '{0}' and delegate '{1}'..
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingMismatchStrictOff2() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingMismatchStrictOff2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On does not allow narrowing in implicit type conversions between extension method '{0}' defined in '{2}' and delegate '{1}'..
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingMismatchStrictOff3() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingMismatchStrictOff3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type arguments could not be inferred from the delegate..
'''</summary>
Friend ReadOnly Property ERR_DelegateBindingTypeInferenceFails() As String
Get
Return ResourceManager.GetString("ERR_DelegateBindingTypeInferenceFails", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegates cannot handle events..
'''</summary>
Friend ReadOnly Property ERR_DelegateCantHandleEvents() As String
Get
Return ResourceManager.GetString("ERR_DelegateCantHandleEvents", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegates cannot implement interface methods..
'''</summary>
Friend ReadOnly Property ERR_DelegateCantImplement() As String
Get
Return ResourceManager.GetString("ERR_DelegateCantImplement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegate class '{0}' has no Invoke method, so an expression of this type cannot be the target of a method call..
'''</summary>
Friend ReadOnly Property ERR_DelegateNoInvoke1() As String
Get
Return ResourceManager.GetString("ERR_DelegateNoInvoke1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to a Declare..
'''</summary>
Friend ReadOnly Property ERR_DllImportNotLegalOnDeclare() As String
Get
Return ResourceManager.GetString("ERR_DllImportNotLegalOnDeclare", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to 'AddHandler', 'RemoveHandler' or 'RaiseEvent' method..
'''</summary>
Friend ReadOnly Property ERR_DllImportNotLegalOnEventMethod() As String
Get
Return ResourceManager.GetString("ERR_DllImportNotLegalOnEventMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to a Get or Set..
'''</summary>
Friend ReadOnly Property ERR_DllImportNotLegalOnGetOrSet() As String
Get
Return ResourceManager.GetString("ERR_DllImportNotLegalOnGetOrSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to a method that is generic or contained in a generic type..
'''</summary>
Friend ReadOnly Property ERR_DllImportOnGenericSubOrFunction() As String
Get
Return ResourceManager.GetString("ERR_DllImportOnGenericSubOrFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to instance method..
'''</summary>
Friend ReadOnly Property ERR_DllImportOnInstanceMethod() As String
Get
Return ResourceManager.GetString("ERR_DllImportOnInstanceMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to interface methods..
'''</summary>
Friend ReadOnly Property ERR_DllImportOnInterfaceMethod() As String
Get
Return ResourceManager.GetString("ERR_DllImportOnInterfaceMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to a Sub, Function, or Operator with a non-empty body..
'''</summary>
Friend ReadOnly Property ERR_DllImportOnNonEmptySubOrFunction() As String
Get
Return ResourceManager.GetString("ERR_DllImportOnNonEmptySubOrFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to an Async or Iterator method..
'''</summary>
Friend ReadOnly Property ERR_DllImportOnResumableMethod() As String
Get
Return ResourceManager.GetString("ERR_DllImportOnResumableMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error writing to XML documentation file: {0}.
'''</summary>
Friend ReadOnly Property ERR_DocFileGen() As String
Get
Return ResourceManager.GetString("ERR_DocFileGen", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' does not implement '{1}'..
'''</summary>
Friend ReadOnly Property ERR_DoesntImplementAwaitInterface2() As String
Get
Return ResourceManager.GetString("ERR_DoesntImplementAwaitInterface2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion from 'Double' to 'Date' requires calling the 'Date.FromOADate' method..
'''</summary>
Friend ReadOnly Property ERR_DoubleToDateConversion() As String
Get
Return ResourceManager.GetString("ERR_DoubleToDateConversion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML DTDs are not supported..
'''</summary>
Friend ReadOnly Property ERR_DTDNotSupported() As String
Get
Return ResourceManager.GetString("ERR_DTDNotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Only one of 'Public', 'Private', 'Protected', 'Friend', 'Protected Friend', or 'Private Protected' can be specified..
'''</summary>
Friend ReadOnly Property ERR_DuplicateAccessCategoryUsed() As String
Get
Return ResourceManager.GetString("ERR_DuplicateAccessCategoryUsed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicateAddHandlerDef() As String
Get
Return ResourceManager.GetString("ERR_DuplicateAddHandlerDef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Multiple initializations of '{0}'. Fields and properties can be initialized only once in an object initializer expression..
'''</summary>
Friend ReadOnly Property ERR_DuplicateAggrMemberInit1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateAggrMemberInit1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Anonymous type member or property '{0}' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicateAnonTypeMemberName1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateAnonTypeMemberName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Widening' and 'Narrowing' cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_DuplicateConversionCategoryUsed() As String
Get
Return ResourceManager.GetString("ERR_DuplicateConversionCategoryUsed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Default' can be applied to only one property name in a {0}..
'''</summary>
Friend ReadOnly Property ERR_DuplicateDefaultProps1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateDefaultProps1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace or type '{0}' has already been imported..
'''</summary>
Friend ReadOnly Property ERR_DuplicateImport1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateImport1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be inherited more than once..
'''</summary>
Friend ReadOnly Property ERR_DuplicateInInherits1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateInInherits1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable '{0}' is already declared in the current block..
'''</summary>
Friend ReadOnly Property ERR_DuplicateLocals1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateLocals1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Static local variable '{0}' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicateLocalStatic1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateLocalStatic1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot embed interop type '{0}' found in both assembly '{1}' and '{2}'. Consider disabling the embedding of interop types..
'''</summary>
Friend ReadOnly Property ERR_DuplicateLocalTypes3() As String
Get
Return ResourceManager.GetString("ERR_DuplicateLocalTypes3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Only one of 'NotOverridable', 'MustOverride', or 'Overridable' can be specified..
'''</summary>
Friend ReadOnly Property ERR_DuplicateModifierCategoryUsed() As String
Get
Return ResourceManager.GetString("ERR_DuplicateModifierCategoryUsed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Alias '{0}' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicateNamedImportAlias1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateNamedImportAlias1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option {0}' statement can only appear once per file..
'''</summary>
Friend ReadOnly Property ERR_DuplicateOption1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateOption1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter specifier is duplicated..
'''</summary>
Friend ReadOnly Property ERR_DuplicateParameterSpecifier() As String
Get
Return ResourceManager.GetString("ERR_DuplicateParameterSpecifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter already declared with name '{0}'..
'''</summary>
Friend ReadOnly Property ERR_DuplicateParamName1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateParamName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML namespace prefix '{0}' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicatePrefix() As String
Get
Return ResourceManager.GetString("ERR_DuplicatePrefix", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has multiple definitions with identical signatures..
'''</summary>
Friend ReadOnly Property ERR_DuplicateProcDef1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateProcDef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has multiple definitions with identical signatures with different tuple element names, including '{1}'..
'''</summary>
Friend ReadOnly Property ERR_DuplicateProcDefWithDifferentTupleNames2() As String
Get
Return ResourceManager.GetString("ERR_DuplicateProcDefWithDifferentTupleNames2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Get' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicatePropertyGet() As String
Get
Return ResourceManager.GetString("ERR_DuplicatePropertyGet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Set' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicatePropertySet() As String
Get
Return ResourceManager.GetString("ERR_DuplicatePropertySet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RaiseEvent' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicateRaiseEventDef() As String
Get
Return ResourceManager.GetString("ERR_DuplicateRaiseEventDef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generic type '{0}' cannot be imported more than once..
'''</summary>
Friend ReadOnly Property ERR_DuplicateRawGenericTypeImport1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateRawGenericTypeImport1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Project already has a reference to assembly '{0}'. A second reference to '{1}' cannot be added..
'''</summary>
Friend ReadOnly Property ERR_DuplicateReference2() As String
Get
Return ResourceManager.GetString("ERR_DuplicateReference2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Multiple assemblies with equivalent identity have been imported: '{0}' and '{1}'. Remove one of the duplicate references..
'''</summary>
Friend ReadOnly Property ERR_DuplicateReferenceStrong() As String
Get
Return ResourceManager.GetString("ERR_DuplicateReferenceStrong", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RemoveHandler' is already declared..
'''</summary>
Friend ReadOnly Property ERR_DuplicateRemoveHandlerDef() As String
Get
Return ResourceManager.GetString("ERR_DuplicateRemoveHandlerDef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Each linked resource and module must have a unique filename. Filename '{0}' is specified more than once in this assembly..
'''</summary>
Friend ReadOnly Property ERR_DuplicateResourceFileName1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateResourceFileName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Resource name '{0}' cannot be used more than once..
'''</summary>
Friend ReadOnly Property ERR_DuplicateResourceName1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateResourceName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Specifier is duplicated..
'''</summary>
Friend ReadOnly Property ERR_DuplicateSpecifier() As String
Get
Return ResourceManager.GetString("ERR_DuplicateSpecifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter already declared with name '{0}'..
'''</summary>
Friend ReadOnly Property ERR_DuplicateTypeParamName1() As String
Get
Return ResourceManager.GetString("ERR_DuplicateTypeParamName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' and 'WriteOnly' cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_DuplicateWriteabilityCategoryUsed() As String
Get
Return ResourceManager.GetString("ERR_DuplicateWriteabilityCategoryUsed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Duplicate XML attribute '{0}'..
'''</summary>
Friend ReadOnly Property ERR_DuplicateXmlAttribute() As String
Get
Return ResourceManager.GetString("ERR_DuplicateXmlAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ElseIf' must be preceded by a matching 'If' or 'ElseIf'..
'''</summary>
Friend ReadOnly Property ERR_ElseIfNoMatchingIf() As String
Get
Return ResourceManager.GetString("ERR_ElseIfNoMatchingIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Else' must be preceded by a matching 'If' or 'ElseIf'..
'''</summary>
Friend ReadOnly Property ERR_ElseNoMatchingIf() As String
Get
Return ResourceManager.GetString("ERR_ElseNoMatchingIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An embedded expression cannot be used here..
'''</summary>
Friend ReadOnly Property ERR_EmbeddedExpression() As String
Get
Return ResourceManager.GetString("ERR_EmbeddedExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An aggregate collection initializer entry must contain at least one element..
'''</summary>
Friend ReadOnly Property ERR_EmptyAggregateInitializer() As String
Get
Return ResourceManager.GetString("ERR_EmptyAggregateInitializer", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot continue since the edit includes a reference to an embedded type: '{0}'..
'''</summary>
Friend ReadOnly Property ERR_EncNoPIAReference() As String
Get
Return ResourceManager.GetString("ERR_EncNoPIAReference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot emit debug information for a source text without encoding..
'''</summary>
Friend ReadOnly Property ERR_EncodinglessSyntaxTree() As String
Get
Return ResourceManager.GetString("ERR_EncodinglessSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}' added during the current debug session can only be accessed from within its declaring assembly '{1}'..
'''</summary>
Friend ReadOnly Property ERR_EncReferenceToAddedMember() As String
Get
Return ResourceManager.GetString("ERR_EncReferenceToAddedMember", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot update '{0}'; attribute '{1}' is missing..
'''</summary>
Friend ReadOnly Property ERR_EncUpdateFailedMissingAttribute() As String
Get
Return ResourceManager.GetString("ERR_EncUpdateFailedMissingAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Class' must be preceded by a matching 'Class'..
'''</summary>
Friend ReadOnly Property ERR_EndClassNoClass() As String
Get
Return ResourceManager.GetString("ERR_EndClassNoClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End' statement cannot be used in class library projects..
'''</summary>
Friend ReadOnly Property ERR_EndDisallowedInDllProjects() As String
Get
Return ResourceManager.GetString("ERR_EndDisallowedInDllProjects", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#End ExternalSource' must be preceded by a matching '#ExternalSource'..
'''</summary>
Friend ReadOnly Property ERR_EndExternalSource() As String
Get
Return ResourceManager.GetString("ERR_EndExternalSource", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Function' expected..
'''</summary>
Friend ReadOnly Property ERR_EndFunctionExpected() As String
Get
Return ResourceManager.GetString("ERR_EndFunctionExpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End If' must be preceded by a matching 'If'..
'''</summary>
Friend ReadOnly Property ERR_EndIfNoMatchingIf() As String
Get
Return ResourceManager.GetString("ERR_EndIfNoMatchingIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Module' must be preceded by a matching 'Module'..
'''</summary>
Friend ReadOnly Property ERR_EndModuleNoModule() As String
Get
Return ResourceManager.GetString("ERR_EndModuleNoModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Namespace' must be preceded by a matching 'Namespace'..
'''</summary>
Friend ReadOnly Property ERR_EndNamespaceNoNamespace() As String
Get
Return ResourceManager.GetString("ERR_EndNamespaceNoNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Operator' expected..
'''</summary>
Friend ReadOnly Property ERR_EndOperatorExpected() As String
Get
Return ResourceManager.GetString("ERR_EndOperatorExpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Operator' must be the first statement on a line..
'''</summary>
Friend ReadOnly Property ERR_EndOperatorNotAtLineStart() As String
Get
Return ResourceManager.GetString("ERR_EndOperatorNotAtLineStart", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property missing 'End Property'..
'''</summary>
Friend ReadOnly Property ERR_EndProp() As String
Get
Return ResourceManager.GetString("ERR_EndProp", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#End Region' must be preceded by a matching '#Region'..
'''</summary>
Friend ReadOnly Property ERR_EndRegionNoRegion() As String
Get
Return ResourceManager.GetString("ERR_EndRegionNoRegion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Select' must be preceded by a matching 'Select Case'..
'''</summary>
Friend ReadOnly Property ERR_EndSelectNoSelect() As String
Get
Return ResourceManager.GetString("ERR_EndSelectNoSelect", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Structure' must be preceded by a matching 'Structure'..
'''</summary>
Friend ReadOnly Property ERR_EndStructureNoStructure() As String
Get
Return ResourceManager.GetString("ERR_EndStructureNoStructure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Sub' expected..
'''</summary>
Friend ReadOnly Property ERR_EndSubExpected() As String
Get
Return ResourceManager.GetString("ERR_EndSubExpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End SyncLock' must be preceded by a matching 'SyncLock'..
'''</summary>
Friend ReadOnly Property ERR_EndSyncLockNoSyncLock() As String
Get
Return ResourceManager.GetString("ERR_EndSyncLockNoSyncLock", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Try' must be preceded by a matching 'Try'..
'''</summary>
Friend ReadOnly Property ERR_EndTryNoTry() As String
Get
Return ResourceManager.GetString("ERR_EndTryNoTry", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Using' must be preceded by a matching 'Using'..
'''</summary>
Friend ReadOnly Property ERR_EndUsingWithoutUsing() As String
Get
Return ResourceManager.GetString("ERR_EndUsingWithoutUsing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End While' must be preceded by a matching 'While'..
'''</summary>
Friend ReadOnly Property ERR_EndWhileNoWhile() As String
Get
Return ResourceManager.GetString("ERR_EndWhileNoWhile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End With' must be preceded by a matching 'With'..
'''</summary>
Friend ReadOnly Property ERR_EndWithWithoutWith() As String
Get
Return ResourceManager.GetString("ERR_EndWithWithoutWith", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an Enum type and cannot be used as an expression..
'''</summary>
Friend ReadOnly Property ERR_EnumNotExpression1() As String
Get
Return ResourceManager.GetString("ERR_EnumNotExpression1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to You must reference at least one range variable on both sides of the 'Equals' operator. Range variable(s) {0} must appear on one side of the 'Equals' operator, and range variable(s) {1} must appear on the other..
'''</summary>
Friend ReadOnly Property ERR_EqualsOperandIsBad() As String
Get
Return ResourceManager.GetString("ERR_EqualsOperandIsBad", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Equals' cannot compare a value of type '{0}' with a value of type '{1}'..
'''</summary>
Friend ReadOnly Property ERR_EqualsTypeMismatch() As String
Get
Return ResourceManager.GetString("ERR_EqualsTypeMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error creating Win32 resources: {0}.
'''</summary>
Friend ReadOnly Property ERR_ErrorCreatingWin32ResourceFile() As String
Get
Return ResourceManager.GetString("ERR_ErrorCreatingWin32ResourceFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' and 'RemoveHandler' method parameters cannot be declared 'ByRef'..
'''</summary>
Friend ReadOnly Property ERR_EventAddRemoveByrefParamIllegal() As String
Get
Return ResourceManager.GetString("ERR_EventAddRemoveByrefParamIllegal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' and 'RemoveHandler' methods must have exactly one parameter..
'''</summary>
Friend ReadOnly Property ERR_EventAddRemoveHasOnlyOneParam() As String
Get
Return ResourceManager.GetString("ERR_EventAddRemoveHasOnlyOneParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Events cannot be declared with a delegate type that has a return type..
'''</summary>
Friend ReadOnly Property ERR_EventDelegatesCantBeFunctions() As String
Get
Return ResourceManager.GetString("ERR_EventDelegatesCantBeFunctions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method '{0}' cannot handle event '{1}' because they do not have a compatible signature..
'''</summary>
Friend ReadOnly Property ERR_EventHandlerSignatureIncompatible2() As String
Get
Return ResourceManager.GetString("ERR_EventHandlerSignatureIncompatible2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event '{0}' cannot implement event '{1}' on interface '{2}' because their delegate types '{3}' and '{4}' do not match..
'''</summary>
Friend ReadOnly Property ERR_EventImplMismatch5() As String
Get
Return ResourceManager.GetString("ERR_EventImplMismatch5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event '{0}' cannot implement event '{1}' on interface '{2}' because the parameters of their 'RemoveHandler' methods do not match..
'''</summary>
Friend ReadOnly Property ERR_EventImplRemoveHandlerParamWrong() As String
Get
Return ResourceManager.GetString("ERR_EventImplRemoveHandlerParamWrong", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler', 'RemoveHandler' and 'RaiseEvent' method parameters cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_EventMethodOptionalParamIllegal1() As String
Get
Return ResourceManager.GetString("ERR_EventMethodOptionalParamIllegal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Source interface '{0}' is missing method '{1}', which is required to embed event '{2}'..
'''</summary>
Friend ReadOnly Property ERR_EventNoPIANoBackingMember() As String
Get
Return ResourceManager.GetString("ERR_EventNoPIANoBackingMember", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event '{0}' cannot be found..
'''</summary>
Friend ReadOnly Property ERR_EventNotFound1() As String
Get
Return ResourceManager.GetString("ERR_EventNotFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Events cannot have a return type..
'''</summary>
Friend ReadOnly Property ERR_EventsCantBeFunctions() As String
Get
Return ResourceManager.GetString("ERR_EventsCantBeFunctions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'WithEvents' variables cannot be typed as arrays..
'''</summary>
Friend ReadOnly Property ERR_EventSourceIsArray() As String
Get
Return ResourceManager.GetString("ERR_EventSourceIsArray", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Events declared with an 'As' clause must have a delegate type..
'''</summary>
Friend ReadOnly Property ERR_EventTypeNotDelegate() As String
Get
Return ResourceManager.GetString("ERR_EventTypeNotDelegate", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear outside of a method body..
'''</summary>
Friend ReadOnly Property ERR_ExecutableAsDeclaration() As String
Get
Return ResourceManager.GetString("ERR_ExecutableAsDeclaration", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Do' can only appear inside a 'Do' statement..
'''</summary>
Friend ReadOnly Property ERR_ExitDoNotWithinDo() As String
Get
Return ResourceManager.GetString("ERR_ExitDoNotWithinDo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit AddHandler', 'Exit RemoveHandler' and 'Exit RaiseEvent' are not valid. Use 'Return' to exit from event members..
'''</summary>
Friend ReadOnly Property ERR_ExitEventMemberNotInvalid() As String
Get
Return ResourceManager.GetString("ERR_ExitEventMemberNotInvalid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit For' can only appear inside a 'For' statement..
'''</summary>
Friend ReadOnly Property ERR_ExitForNotWithinFor() As String
Get
Return ResourceManager.GetString("ERR_ExitForNotWithinFor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Function' is not valid in a Sub or Property..
'''</summary>
Friend ReadOnly Property ERR_ExitFuncOfSub() As String
Get
Return ResourceManager.GetString("ERR_ExitFuncOfSub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Operator' is not valid. Use 'Return' to exit an operator..
'''</summary>
Friend ReadOnly Property ERR_ExitOperatorNotValid() As String
Get
Return ResourceManager.GetString("ERR_ExitOperatorNotValid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Property' is not valid in a Function or Sub..
'''</summary>
Friend ReadOnly Property ERR_ExitPropNot() As String
Get
Return ResourceManager.GetString("ERR_ExitPropNot", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Select' can only appear inside a 'Select' statement..
'''</summary>
Friend ReadOnly Property ERR_ExitSelectNotWithinSelect() As String
Get
Return ResourceManager.GetString("ERR_ExitSelectNotWithinSelect", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Sub' is not valid in a Function or Property..
'''</summary>
Friend ReadOnly Property ERR_ExitSubOfFunc() As String
Get
Return ResourceManager.GetString("ERR_ExitSubOfFunc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit Try' can only appear inside a 'Try' statement..
'''</summary>
Friend ReadOnly Property ERR_ExitTryNotWithinTry() As String
Get
Return ResourceManager.GetString("ERR_ExitTryNotWithinTry", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit While' can only appear inside a 'While' statement..
'''</summary>
Friend ReadOnly Property ERR_ExitWhileNotWithinWhile() As String
Get
Return ResourceManager.GetString("ERR_ExitWhileNotWithinWhile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'And' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedAnd() As String
Get
Return ResourceManager.GetString("ERR_ExpectedAnd", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' statement requires an array..
'''</summary>
Friend ReadOnly Property ERR_ExpectedArray1() As String
Get
Return ResourceManager.GetString("ERR_ExpectedArray1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'As' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedAs() As String
Get
Return ResourceManager.GetString("ERR_ExpectedAs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '=' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedAssignmentOperator() As String
Get
Return ResourceManager.GetString("ERR_ExpectedAssignmentOperator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '=' expected (object initializer)..
'''</summary>
Friend ReadOnly Property ERR_ExpectedAssignmentOperatorInInit() As String
Get
Return ResourceManager.GetString("ERR_ExpectedAssignmentOperatorInInit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'By' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedBy() As String
Get
Return ResourceManager.GetString("ERR_ExpectedBy", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statements and labels are not valid between 'Select Case' and first 'Case'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedCase() As String
Get
Return ResourceManager.GetString("ERR_ExpectedCase", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Comma expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedComma() As String
Get
Return ResourceManager.GetString("ERR_ExpectedComma", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'If', 'ElseIf', 'Else', 'Const', 'Region', 'ExternalSource', 'ExternalChecksum', 'Enable', 'Disable', 'End' or 'R' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedConditionalDirective() As String
Get
Return ResourceManager.GetString("ERR_ExpectedConditionalDirective", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Continue' must be followed by 'Do', 'For' or 'While'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedContinueKind() As String
Get
Return ResourceManager.GetString("ERR_ExpectedContinueKind", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Declaration expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedDeclaration() As String
Get
Return ResourceManager.GetString("ERR_ExpectedDeclaration", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected '/' for XML end tag..
'''</summary>
Friend ReadOnly Property ERR_ExpectedDiv() As String
Get
Return ResourceManager.GetString("ERR_ExpectedDiv", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '.' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedDot() As String
Get
Return ResourceManager.GetString("ERR_ExpectedDot", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Global' must be followed by '.' and an identifier..
'''</summary>
Friend ReadOnly Property ERR_ExpectedDotAfterGlobalNameSpace() As String
Get
Return ResourceManager.GetString("ERR_ExpectedDotAfterGlobalNameSpace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MyBase' must be followed by '.' and an identifier..
'''</summary>
Friend ReadOnly Property ERR_ExpectedDotAfterMyBase() As String
Get
Return ResourceManager.GetString("ERR_ExpectedDotAfterMyBase", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MyClass' must be followed by '.' and an identifier..
'''</summary>
Friend ReadOnly Property ERR_ExpectedDotAfterMyClass() As String
Get
Return ResourceManager.GetString("ERR_ExpectedDotAfterMyClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Class' statement must end with a matching 'End Class'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndClass() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#ExternalSource' statement must end with a matching '#End ExternalSource'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndExternalSource() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndExternalSource", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'If' must end with a matching 'End If'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndIf() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Module' statement must end with a matching 'End Module'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndModule() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Namespace' statement must end with a matching 'End Namespace'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndNamespace() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to End of expression expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndOfExpression() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndOfExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#Region' statement must end with a matching '#End Region'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndRegion() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndRegion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Select Case' must end with a matching 'End Select'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndSelect() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndSelect", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Structure' statement must end with a matching 'End Structure'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndStructure() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndStructure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'SyncLock' statement must end with a matching 'End SyncLock'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndSyncLock() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndSyncLock", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Try' must end with a matching 'End Try'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndTry() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndTry", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Using' must end with a matching 'End Using'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndUsing() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndUsing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'While' must end with a matching 'End While'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndWhile() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndWhile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'With' must end with a matching 'End With'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEndWith() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEndWith", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to End of statement expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEOS() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEOS", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '=' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEQ() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEQ", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Equals' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedEquals() As String
Get
Return ResourceManager.GetString("ERR_ExpectedEquals", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Exit' must be followed by 'Sub', 'Function', 'Property', 'Do', 'For', 'While', 'Select', or 'Try'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedExitKind() As String
Get
Return ResourceManager.GetString("ERR_ExpectedExitKind", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedExpression() As String
Get
Return ResourceManager.GetString("ERR_ExpectedExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option' must be followed by 'Compare', 'Explicit', 'Infer', or 'Strict'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedForOptionStmt() As String
Get
Return ResourceManager.GetString("ERR_ExpectedForOptionStmt", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'From' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedFrom() As String
Get
Return ResourceManager.GetString("ERR_ExpectedFrom", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '>' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedGreater() As String
Get
Return ResourceManager.GetString("ERR_ExpectedGreater", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Identifier expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedIdentifier() As String
Get
Return ResourceManager.GetString("ERR_ExpectedIdentifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Group' or an identifier expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedIdentifierOrGroup() As String
Get
Return ResourceManager.GetString("ERR_ExpectedIdentifierOrGroup", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'In' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedIn() As String
Get
Return ResourceManager.GetString("ERR_ExpectedIn", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'In' or '=' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedInOrEq() As String
Get
Return ResourceManager.GetString("ERR_ExpectedInOrEq", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Integer constant expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedIntLiteral() As String
Get
Return ResourceManager.GetString("ERR_ExpectedIntLiteral", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Into' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedInto() As String
Get
Return ResourceManager.GetString("ERR_ExpectedInto", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Join' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedJoin() As String
Get
Return ResourceManager.GetString("ERR_ExpectedJoin", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedLbrace() As String
Get
Return ResourceManager.GetString("ERR_ExpectedLbrace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Do' must end with a matching 'Loop'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedLoop() As String
Get
Return ResourceManager.GetString("ERR_ExpectedLoop", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '(' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedLparen() As String
Get
Return ResourceManager.GetString("ERR_ExpectedLparen", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected beginning '<' for an XML tag..
'''</summary>
Friend ReadOnly Property ERR_ExpectedLT() As String
Get
Return ResourceManager.GetString("ERR_ExpectedLT", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '-' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedMinus() As String
Get
Return ResourceManager.GetString("ERR_ExpectedMinus", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Named argument expected. Please use language version {0} or greater to use non-trailing named arguments..
'''</summary>
Friend ReadOnly Property ERR_ExpectedNamedArgument() As String
Get
Return ResourceManager.GetString("ERR_ExpectedNamedArgument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Named argument expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedNamedArgumentInAttributeList() As String
Get
Return ResourceManager.GetString("ERR_ExpectedNamedArgumentInAttributeList", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'For' must end with a matching 'Next'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedNext() As String
Get
Return ResourceManager.GetString("ERR_ExpectedNext", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'On' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedOn() As String
Get
Return ResourceManager.GetString("ERR_ExpectedOn", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Optional' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedOptional() As String
Get
Return ResourceManager.GetString("ERR_ExpectedOptional", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Compare' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedOptionCompare() As String
Get
Return ResourceManager.GetString("ERR_ExpectedOptionCompare", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression is not a method..
'''</summary>
Friend ReadOnly Property ERR_ExpectedProcedure() As String
Get
Return ResourceManager.GetString("ERR_ExpectedProcedure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name of field or property being initialized in an object initializer must start with '.'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedQualifiedNameInInit() As String
Get
Return ResourceManager.GetString("ERR_ExpectedQualifiedNameInInit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression of type '{0}' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider..
'''</summary>
Friend ReadOnly Property ERR_ExpectedQueryableSource() As String
Get
Return ResourceManager.GetString("ERR_ExpectedQueryableSource", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected matching closing double quote for XML attribute value..
'''</summary>
Friend ReadOnly Property ERR_ExpectedQuote() As String
Get
Return ResourceManager.GetString("ERR_ExpectedQuote", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '}' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedRbrace() As String
Get
Return ResourceManager.GetString("ERR_ExpectedRbrace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Relational operator expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedRelational() As String
Get
Return ResourceManager.GetString("ERR_ExpectedRelational", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Resume' or 'GoTo' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedResumeOrGoto() As String
Get
Return ResourceManager.GetString("ERR_ExpectedResumeOrGoto", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ')' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedRparen() As String
Get
Return ResourceManager.GetString("ERR_ExpectedRparen", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected closing ';' for XML entity..
'''</summary>
Friend ReadOnly Property ERR_ExpectedSColon() As String
Get
Return ResourceManager.GetString("ERR_ExpectedSColon", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected a single script (.vbx file).
'''</summary>
Friend ReadOnly Property ERR_ExpectedSingleScript() As String
Get
Return ResourceManager.GetString("ERR_ExpectedSingleScript", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected one of 'Dim', 'Const', 'Public', 'Private', 'Protected', 'Friend', 'Shadows', 'ReadOnly' or 'Shared'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedSpecifier() As String
Get
Return ResourceManager.GetString("ERR_ExpectedSpecifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected matching closing single quote for XML attribute value..
'''</summary>
Friend ReadOnly Property ERR_ExpectedSQuote() As String
Get
Return ResourceManager.GetString("ERR_ExpectedSQuote", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to String constant expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedStringLiteral() As String
Get
Return ResourceManager.GetString("ERR_ExpectedStringLiteral", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub' or 'Function' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedSubFunction() As String
Get
Return ResourceManager.GetString("ERR_ExpectedSubFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub' or 'Function' expected after 'Delegate'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedSubOrFunction() As String
Get
Return ResourceManager.GetString("ERR_ExpectedSubOrFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Warning' expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedWarningKeyword() As String
Get
Return ResourceManager.GetString("ERR_ExpectedWarningKeyword", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected '%=' at start of an embedded expression..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlBeginEmbedded() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlBeginEmbedded", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected closing ']]>' for XML CDATA section..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlEndCData() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlEndCData", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected closing '-->' for XML comment..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlEndComment() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlEndComment", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected closing '%>' for embedded expression..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlEndEmbedded() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlEndEmbedded", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected closing '?>' for XML processor instruction..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlEndPI() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlEndPI", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML name expected..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlName() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace declaration must start with 'xmlns'..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlns() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlns", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Missing required white space..
'''</summary>
Friend ReadOnly Property ERR_ExpectedXmlWhiteSpace() As String
Get
Return ResourceManager.GetString("ERR_ExpectedXmlWhiteSpace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot reference 'System.Runtime.CompilerServices.TupleElementNamesAttribute' explicitly. Use the tuple syntax to define tuple names..
'''</summary>
Friend ReadOnly Property ERR_ExplicitTupleElementNamesAttribute() As String
Get
Return ResourceManager.GetString("ERR_ExplicitTupleElementNamesAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' exported from module '{1}' conflicts with type declared in primary module of this assembly..
'''</summary>
Friend ReadOnly Property ERR_ExportedTypeConflictsWithDeclaration() As String
Get
Return ResourceManager.GetString("ERR_ExportedTypeConflictsWithDeclaration", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' exported from module '{1}' conflicts with type '{2}' exported from module '{3}'..
'''</summary>
Friend ReadOnly Property ERR_ExportedTypesConflict() As String
Get
Return ResourceManager.GetString("ERR_ExportedTypesConflict", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This expression does not have a name..
'''</summary>
Friend ReadOnly Property ERR_ExpressionDoesntHaveName() As String
Get
Return ResourceManager.GetString("ERR_ExpressionDoesntHaveName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constant expression not representable in type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ExpressionOverflow1() As String
Get
Return ResourceManager.GetString("ERR_ExpressionOverflow1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression cannot be converted into an expression tree..
'''</summary>
Friend ReadOnly Property ERR_ExpressionTreeNotSupported() As String
Get
Return ResourceManager.GetString("ERR_ExpressionTreeNotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Late binding operations cannot be converted to an expression tree..
'''</summary>
Friend ReadOnly Property ERR_ExprTreeNoLateBind() As String
Get
Return ResourceManager.GetString("ERR_ExprTreeNoLateBind", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Multi-dimensional array cannot be converted to an expression tree..
'''</summary>
Friend ReadOnly Property ERR_ExprTreeNoMultiDimArrayCreation() As String
Get
Return ResourceManager.GetString("ERR_ExprTreeNoMultiDimArrayCreation", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The custom-designed version of 'System.Runtime.CompilerServices.ExtensionAttribute' found by the compiler is not valid. Its attribute usage flags must be set to allow assemblies, classes, and methods..
'''</summary>
Friend ReadOnly Property ERR_ExtensionAttributeInvalid() As String
Get
Return ResourceManager.GetString("ERR_ExtensionAttributeInvalid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Late-bound extension methods are not supported..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodCannotBeLateBound() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodCannotBeLateBound", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Extension methods must declare at least one parameter. The first parameter specifies which type to extend..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodNoParams() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodNoParams", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Extension methods can be defined only in modules..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodNotInModule() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodNotInModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Optional' cannot be applied to the first parameter of an extension method. The first parameter specifies which type to extend..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodOptionalFirstArg() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodOptionalFirstArg", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' Extension method '{0}' defined in '{1}'..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodOverloadCandidate2() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodOverloadCandidate2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' Extension method '{0}' defined in '{1}': {2}.
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodOverloadCandidate3() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodOverloadCandidate3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ParamArray' cannot be applied to the first parameter of an extension method. The first parameter specifies which type to extend..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodParamArrayFirstArg() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodParamArrayFirstArg", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Extension method '{0}' has type constraints that can never be satisfied..
'''</summary>
Friend ReadOnly Property ERR_ExtensionMethodUncallable1() As String
Get
Return ResourceManager.GetString("ERR_ExtensionMethodUncallable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Extension' attribute can be applied only to 'Module', 'Sub', or 'Function' declarations..
'''</summary>
Friend ReadOnly Property ERR_ExtensionOnlyAllowedOnModuleSubOrFunction() As String
Get
Return ResourceManager.GetString("ERR_ExtensionOnlyAllowedOnModuleSubOrFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Next' statement names more variables than there are matching 'For' statements..
'''</summary>
Friend ReadOnly Property ERR_ExtraNextVariable() As String
Get
Return ResourceManager.GetString("ERR_ExtraNextVariable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Specifiers valid only at the beginning of a declaration..
'''</summary>
Friend ReadOnly Property ERR_ExtraSpecifiers() As String
Get
Return ResourceManager.GetString("ERR_ExtraSpecifiers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error signing assembly '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_FailureSigningAssembly() As String
Get
Return ResourceManager.GetString("ERR_FailureSigningAssembly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The field has multiple distinct constant values..
'''</summary>
Friend ReadOnly Property ERR_FieldHasMultipleDistinctConstantValues() As String
Get
Return ResourceManager.GetString("ERR_FieldHasMultipleDistinctConstantValues", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot refer to '{0}' because it is a member of the value-typed field '{1}' of class '{2}' which has 'System.MarshalByRefObject' as a base class..
'''</summary>
Friend ReadOnly Property ERR_FieldOfValueFieldOfMarshalByRef3() As String
Get
Return ResourceManager.GetString("ERR_FieldOfValueFieldOfMarshalByRef3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Assembly' or 'Module' expected..
'''</summary>
Friend ReadOnly Property ERR_FileAttributeNotAssemblyOrModule() As String
Get
Return ResourceManager.GetString("ERR_FileAttributeNotAssemblyOrModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to file '{0}' could not be found.
'''</summary>
Friend ReadOnly Property ERR_FileNotFound() As String
Get
Return ResourceManager.GetString("ERR_FileNotFound", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Finally' can only appear once in a 'Try' statement..
'''</summary>
Friend ReadOnly Property ERR_FinallyAfterFinally() As String
Get
Return ResourceManager.GetString("ERR_FinallyAfterFinally", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Finally' cannot appear outside a 'Try' statement..
'''</summary>
Friend ReadOnly Property ERR_FinallyNoMatchingTry() As String
Get
Return ResourceManager.GetString("ERR_FinallyNoMatchingTry", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array declared as for loop control variable cannot be declared with an initial size..
'''</summary>
Friend ReadOnly Property ERR_ForCtlVarArraySizesSpecified() As String
Get
Return ResourceManager.GetString("ERR_ForCtlVarArraySizesSpecified", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'For Each' on type '{0}' is ambiguous because the type implements multiple instantiations of 'System.Collections.Generic.IEnumerable(Of T)'..
'''</summary>
Friend ReadOnly Property ERR_ForEachAmbiguousIEnumerable1() As String
Get
Return ResourceManager.GetString("ERR_ForEachAmbiguousIEnumerable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression is of type '{0}', which is not a collection type..
'''</summary>
Friend ReadOnly Property ERR_ForEachCollectionDesignPattern1() As String
Get
Return ResourceManager.GetString("ERR_ForEachCollectionDesignPattern1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to For loop control variable '{0}' already in use by an enclosing For loop..
'''</summary>
Friend ReadOnly Property ERR_ForIndexInUse1() As String
Get
Return ResourceManager.GetString("ERR_ForIndexInUse1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' must define operator '{1}' to be used in a 'For' statement..
'''</summary>
Friend ReadOnly Property ERR_ForLoopOperatorRequired2() As String
Get
Return ResourceManager.GetString("ERR_ForLoopOperatorRequired2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'For' loop control variable cannot be of type '{0}' because the type does not support the required operators..
'''</summary>
Friend ReadOnly Property ERR_ForLoopType1() As String
Get
Return ResourceManager.GetString("ERR_ForLoopType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Forwarded type '{0}' conflicts with type declared in primary module of this assembly..
'''</summary>
Friend ReadOnly Property ERR_ForwardedTypeConflictsWithDeclaration() As String
Get
Return ResourceManager.GetString("ERR_ForwardedTypeConflictsWithDeclaration", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' forwarded to assembly '{1}' conflicts with type '{2}' exported from module '{3}'..
'''</summary>
Friend ReadOnly Property ERR_ForwardedTypeConflictsWithExportedType() As String
Get
Return ResourceManager.GetString("ERR_ForwardedTypeConflictsWithExportedType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' forwarded to assembly '{1}' conflicts with type '{2}' forwarded to assembly '{3}'..
'''</summary>
Friend ReadOnly Property ERR_ForwardedTypesConflict() As String
Get
Return ResourceManager.GetString("ERR_ForwardedTypesConflict", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' in assembly '{1}' has been forwarded to assembly '{2}'. Either a reference to '{2}' is missing from your project or the type '{0}' is missing from assembly '{2}'..
'''</summary>
Friend ReadOnly Property ERR_ForwardedTypeUnavailable3() As String
Get
Return ResourceManager.GetString("ERR_ForwardedTypeUnavailable3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}' cannot override member '{1}' defined in another assembly/project because the access modifier 'Protected Friend' expands accessibility. Use 'Protected' instead..
'''</summary>
Friend ReadOnly Property ERR_FriendAssemblyBadAccessOverride2() As String
Get
Return ResourceManager.GetString("ERR_FriendAssemblyBadAccessOverride2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Friend assembly reference '{0}' is invalid. InternalsVisibleTo declarations cannot have a version, culture, public key token, or processor architecture specified..
'''</summary>
Friend ReadOnly Property ERR_FriendAssemblyBadArguments() As String
Get
Return ResourceManager.GetString("ERR_FriendAssemblyBadArguments", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Friend declaration '{0}' is invalid and cannot be resolved..
'''</summary>
Friend ReadOnly Property ERR_FriendAssemblyNameInvalid() As String
Get
Return ResourceManager.GetString("ERR_FriendAssemblyNameInvalid", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Friend assembly reference '{0}' is invalid. Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations..
'''</summary>
Friend ReadOnly Property ERR_FriendAssemblyStrongNameRequired() As String
Get
Return ResourceManager.GetString("ERR_FriendAssemblyStrongNameRequired", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Friend access was granted by '{0}', but the public key of the output assembly does not match that specified by the attribute in the granting assembly..
'''</summary>
Friend ReadOnly Property ERR_FriendRefNotEqualToThis() As String
Get
Return ResourceManager.GetString("ERR_FriendRefNotEqualToThis", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Friend access was granted by '{0}', but the strong name signing state of the output assembly does not match that of the granting assembly..
'''</summary>
Friend ReadOnly Property ERR_FriendRefSigningMismatch() As String
Get
Return ResourceManager.GetString("ERR_FriendRefSigningMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Full width characters are not valid as XML delimiters..
'''</summary>
Friend ReadOnly Property ERR_FullWidthAsXmlDelimiter() As String
Get
Return ResourceManager.GetString("ERR_FullWidthAsXmlDelimiter", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has no parameters and its return type cannot be indexed..
'''</summary>
Friend ReadOnly Property ERR_FunctionResultCannotBeIndexed1() As String
Get
Return ResourceManager.GetString("ERR_FunctionResultCannotBeIndexed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error in project-level import '{0}' at '{1}' : {2}.
'''</summary>
Friend ReadOnly Property ERR_GeneralProjectImportsError3() As String
Get
Return ResourceManager.GetString("ERR_GeneralProjectImportsError3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type arguments are not valid because attributes cannot be generic..
'''</summary>
Friend ReadOnly Property ERR_GenericArgsOnAttributeSpecifier() As String
Get
Return ResourceManager.GetString("ERR_GenericArgsOnAttributeSpecifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Classes that are generic or contained in a generic type cannot inherit from an attribute class..
'''</summary>
Friend ReadOnly Property ERR_GenericClassCannotInheritAttr() As String
Get
Return ResourceManager.GetString("ERR_GenericClassCannotInheritAttr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type argument '{0}' does not inherit from or implement the constraint type '{1}'..
'''</summary>
Friend ReadOnly Property ERR_GenericConstraintNotSatisfied2() As String
Get
Return ResourceManager.GetString("ERR_GenericConstraintNotSatisfied2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' cannot inherit from a type parameter..
'''</summary>
Friend ReadOnly Property ERR_GenericParamBase2() As String
Get
Return ResourceManager.GetString("ERR_GenericParamBase2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameters cannot be specified on this declaration..
'''</summary>
Friend ReadOnly Property ERR_GenericParamsOnInvalidMember() As String
Get
Return ResourceManager.GetString("ERR_GenericParamsOnInvalidMember", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to None of the accessible 'Main' methods with the appropriate signatures found in '{0}' can be the startup method since they are all either generic or nested in generic types..
'''</summary>
Friend ReadOnly Property ERR_GenericSubMainsFound1() As String
Get
Return ResourceManager.GetString("ERR_GenericSubMainsFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'GoTo {0}' is not valid because '{0}' is inside a 'For' or 'For Each' statement that does not contain this statement..
'''</summary>
Friend ReadOnly Property ERR_GotoIntoFor() As String
Get
Return ResourceManager.GetString("ERR_GotoIntoFor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'GoTo {0}' is not valid because '{0}' is inside a 'SyncLock' statement that does not contain this statement..
'''</summary>
Friend ReadOnly Property ERR_GotoIntoSyncLock() As String
Get
Return ResourceManager.GetString("ERR_GotoIntoSyncLock", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'GoTo {0}' is not valid because '{0}' is inside a 'Try', 'Catch' or 'Finally' statement that does not contain this statement..
'''</summary>
Friend ReadOnly Property ERR_GotoIntoTryHandler() As String
Get
Return ResourceManager.GetString("ERR_GotoIntoTryHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'GoTo {0}' is not valid because '{0}' is inside a 'Using' statement that does not contain this statement..
'''</summary>
Friend ReadOnly Property ERR_GotoIntoUsing() As String
Get
Return ResourceManager.GetString("ERR_GotoIntoUsing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'GoTo {0}' is not valid because '{0}' is inside a 'With' statement that does not contain this statement..
'''</summary>
Friend ReadOnly Property ERR_GotoIntoWith() As String
Get
Return ResourceManager.GetString("ERR_GotoIntoWith", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generic methods cannot use 'Handles' clause..
'''</summary>
Friend ReadOnly Property ERR_HandlesInvalidOnGenericMethod() As String
Get
Return ResourceManager.GetString("ERR_HandlesInvalidOnGenericMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Handles' in classes must specify a 'WithEvents' variable, 'MyBase', 'MyClass' or 'Me' qualified with a single identifier..
'''</summary>
Friend ReadOnly Property ERR_HandlesSyntaxInClass() As String
Get
Return ResourceManager.GetString("ERR_HandlesSyntaxInClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Handles' in modules must specify a 'WithEvents' variable qualified with a single identifier..
'''</summary>
Friend ReadOnly Property ERR_HandlesSyntaxInModule() As String
Get
Return ResourceManager.GetString("ERR_HandlesSyntaxInModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to cannot specify both /win32icon and /win32resource.
'''</summary>
Friend ReadOnly Property ERR_IconFileAndWin32ResFile() As String
Get
Return ResourceManager.GetString("ERR_IconFileAndWin32ResFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using DirectCast operator to cast a floating-point value to the same type is not supported..
'''</summary>
Friend ReadOnly Property ERR_IdentityDirectCastForFloat() As String
Get
Return ResourceManager.GetString("ERR_IdentityDirectCastForFloat", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot implement '{1}' because there is no matching {2} on interface '{3}'..
'''</summary>
Friend ReadOnly Property ERR_IdentNotMemberOfInterface4() As String
Get
Return ResourceManager.GetString("ERR_IdentNotMemberOfInterface4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type..
'''</summary>
Friend ReadOnly Property ERR_IfNoType() As String
Get
Return ResourceManager.GetString("ERR_IfNoType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type, and Option Strict On does not allow 'Object' to be assumed..
'''</summary>
Friend ReadOnly Property ERR_IfNoTypeObjectDisallowed() As String
Get
Return ResourceManager.GetString("ERR_IfNoTypeObjectDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type because more than one type is possible..
'''</summary>
Friend ReadOnly Property ERR_IfTooManyTypesObjectDisallowed() As String
Get
Return ResourceManager.GetString("ERR_IfTooManyTypesObjectDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML declaration does not allow attribute '{0}{1}{2}'..
'''</summary>
Friend ReadOnly Property ERR_IllegalAttributeInXmlDecl() As String
Get
Return ResourceManager.GetString("ERR_IllegalAttributeInXmlDecl", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Inherits clause of {0} '{1}' causes cyclic dependency: {2}.
'''</summary>
Friend ReadOnly Property ERR_IllegalBaseTypeReferences3() As String
Get
Return ResourceManager.GetString("ERR_IllegalBaseTypeReferences3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Illegal call expression or index expression..
'''</summary>
Friend ReadOnly Property ERR_IllegalCallOrIndex() As String
Get
Return ResourceManager.GetString("ERR_IllegalCallOrIndex", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Character is not valid..
'''</summary>
Friend ReadOnly Property ERR_IllegalChar() As String
Get
Return ResourceManager.GetString("ERR_IllegalChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Character constant must contain exactly one character..
'''</summary>
Friend ReadOnly Property ERR_IllegalCharConstant() As String
Get
Return ResourceManager.GetString("ERR_IllegalCharConstant", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First operand in a binary 'If' expression must be nullable or a reference type..
'''</summary>
Friend ReadOnly Property ERR_IllegalCondTypeInIIF() As String
Get
Return ResourceManager.GetString("ERR_IllegalCondTypeInIIF", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace declaration with prefix cannot have an empty value inside an XML literal..
'''</summary>
Friend ReadOnly Property ERR_IllegalDefaultNamespace() As String
Get
Return ResourceManager.GetString("ERR_IllegalDefaultNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type for the second and third operands of the 'If' operator. One must have a widening conversion to the other..
'''</summary>
Friend ReadOnly Property ERR_IllegalOperandInIIFConversion() As String
Get
Return ResourceManager.GetString("ERR_IllegalOperandInIIFConversion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type for the first and second operands of the binary 'If' operator. One must have a widening conversion to the other..
'''</summary>
Friend ReadOnly Property ERR_IllegalOperandInIIFConversion2() As String
Get
Return ResourceManager.GetString("ERR_IllegalOperandInIIFConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'If' operator requires either two or three operands..
'''</summary>
Friend ReadOnly Property ERR_IllegalOperandInIIFCount() As String
Get
Return ResourceManager.GetString("ERR_IllegalOperandInIIFCount", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'If' operands cannot be named arguments..
'''</summary>
Friend ReadOnly Property ERR_IllegalOperandInIIFName() As String
Get
Return ResourceManager.GetString("ERR_IllegalOperandInIIFName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML processing instruction name '{0}' is not valid..
'''</summary>
Friend ReadOnly Property ERR_IllegalProcessingInstructionName() As String
Get
Return ResourceManager.GetString("ERR_IllegalProcessingInstructionName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Character sequence '--' is not allowed in an XML comment..
'''</summary>
Friend ReadOnly Property ERR_IllegalXmlCommentChar() As String
Get
Return ResourceManager.GetString("ERR_IllegalXmlCommentChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Character '{0}' ({1}) is not allowed in an XML name..
'''</summary>
Friend ReadOnly Property ERR_IllegalXmlNameChar() As String
Get
Return ResourceManager.GetString("ERR_IllegalXmlNameChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Element names cannot use the 'xmlns' prefix..
'''</summary>
Friend ReadOnly Property ERR_IllegalXmlnsPrefix() As String
Get
Return ResourceManager.GetString("ERR_IllegalXmlnsPrefix", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Character '{0}' ({1}) is not allowed at the beginning of an XML name..
'''</summary>
Friend ReadOnly Property ERR_IllegalXmlStartNameChar() As String
Get
Return ResourceManager.GetString("ERR_IllegalXmlStartNameChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to White space cannot appear here..
'''</summary>
Friend ReadOnly Property ERR_IllegalXmlWhiteSpace() As String
Get
Return ResourceManager.GetString("ERR_IllegalXmlWhiteSpace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method '{0}' must be declared 'Private' in order to implement partial method '{1}'..
'''</summary>
Friend ReadOnly Property ERR_ImplementationMustBePrivate2() As String
Get
Return ResourceManager.GetString("ERR_ImplementationMustBePrivate2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot implement {1} '{2}' on interface '{3}' because the tuple element names in '{4}' do not match those in '{5}'..
'''</summary>
Friend ReadOnly Property ERR_ImplementingInterfaceWithDifferentTupleNames5() As String
Get
Return ResourceManager.GetString("ERR_ImplementingInterfaceWithDifferentTupleNames5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter not allowed in 'Implements' clause..
'''</summary>
Friend ReadOnly Property ERR_ImplementsGenericParam() As String
Get
Return ResourceManager.GetString("ERR_ImplementsGenericParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub New' cannot implement interface members..
'''</summary>
Friend ReadOnly Property ERR_ImplementsOnNew() As String
Get
Return ResourceManager.GetString("ERR_ImplementsOnNew", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Implements' statements must follow any 'Inherits' statement and precede all declarations in a class..
'''</summary>
Friend ReadOnly Property ERR_ImplementsStmtWrongOrder() As String
Get
Return ResourceManager.GetString("ERR_ImplementsStmtWrongOrder", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot implement '{1}.{2}' because they differ by type parameter constraints..
'''</summary>
Friend ReadOnly Property ERR_ImplementsWithConstraintMismatch3() As String
Get
Return ResourceManager.GetString("ERR_ImplementsWithConstraintMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Imports alias '{0}' conflicts with '{1}' declared in the root namespace..
'''</summary>
Friend ReadOnly Property ERR_ImportAliasConflictsWithType2() As String
Get
Return ResourceManager.GetString("ERR_ImportAliasConflictsWithType2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Imports' statements must precede any declarations..
'''</summary>
Friend ReadOnly Property ERR_ImportsMustBeFirst() As String
Get
Return ResourceManager.GetString("ERR_ImportsMustBeFirst", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implementing class '{0}' for interface '{1}' is not accessible in this context because it is '{2}'..
'''</summary>
Friend ReadOnly Property ERR_InAccessibleCoClass3() As String
Get
Return ResourceManager.GetString("ERR_InAccessibleCoClass3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}.{1}' is not accessible in this context because it is '{2}'..
'''</summary>
Friend ReadOnly Property ERR_InaccessibleMember3() As String
Get
Return ResourceManager.GetString("ERR_InaccessibleMember3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' in class '{1}' cannot override '{2}' in class '{3}' because an intermediate class '{4}' overrides '{2}' in class '{3}' but is not accessible..
'''</summary>
Friend ReadOnly Property ERR_InAccessibleOverridingMethod5() As String
Get
Return ResourceManager.GetString("ERR_InAccessibleOverridingMethod5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not accessible in this context because the return type is not accessible..
'''</summary>
Friend ReadOnly Property ERR_InaccessibleReturnTypeOfMember2() As String
Get
Return ResourceManager.GetString("ERR_InaccessibleReturnTypeOfMember2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not accessible in this context because it is '{1}'..
'''</summary>
Friend ReadOnly Property ERR_InaccessibleSymbol2() As String
Get
Return ResourceManager.GetString("ERR_InaccessibleSymbol2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression is not an array or a method, and cannot have an argument list..
'''</summary>
Friend ReadOnly Property ERR_IndexedNotArrayOrProc() As String
Get
Return ResourceManager.GetString("ERR_IndexedNotArrayOrProc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Project '{0}' makes an indirect reference to assembly '{1}', which contains '{2}'. Add a file reference to '{3}' to your project..
'''</summary>
Friend ReadOnly Property ERR_IndirectUnreferencedAssembly4() As String
Get
Return ResourceManager.GetString("ERR_IndirectUnreferencedAssembly4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable cannot be initialized with non-array type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_InferringNonArrayType1() As String
Get
Return ResourceManager.GetString("ERR_InferringNonArrayType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot inherit from {1} '{2}' because it expands the access of the base {1} to {3} '{4}'..
'''</summary>
Friend ReadOnly Property ERR_InheritanceAccessMismatch5() As String
Get
Return ResourceManager.GetString("ERR_InheritanceAccessMismatch5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot inherit from {1} '{2}' because it expands the access of the base {1} outside the assembly..
'''</summary>
Friend ReadOnly Property ERR_InheritanceAccessMismatchOutside3() As String
Get
Return ResourceManager.GetString("ERR_InheritanceAccessMismatchOutside3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' cannot inherit from itself: {1}.
'''</summary>
Friend ReadOnly Property ERR_InheritanceCycle1() As String
Get
Return ResourceManager.GetString("ERR_InheritanceCycle1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' is not supported because it either directly or indirectly inherits from itself..
'''</summary>
Friend ReadOnly Property ERR_InheritanceCycleInImportedType1() As String
Get
Return ResourceManager.GetString("ERR_InheritanceCycleInImportedType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}' inherits from '{1}'..
'''</summary>
Friend ReadOnly Property ERR_InheritsFrom2() As String
Get
Return ResourceManager.GetString("ERR_InheritsFrom2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot inherit from {2} '{1}' because '{1}' is declared 'NotInheritable'..
'''</summary>
Friend ReadOnly Property ERR_InheritsFromCantInherit3() As String
Get
Return ResourceManager.GetString("ERR_InheritsFromCantInherit3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Classes can inherit only from other classes..
'''</summary>
Friend ReadOnly Property ERR_InheritsFromNonClass() As String
Get
Return ResourceManager.GetString("ERR_InheritsFromNonClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface can inherit only from another interface..
'''</summary>
Friend ReadOnly Property ERR_InheritsFromNonInterface() As String
Get
Return ResourceManager.GetString("ERR_InheritsFromNonInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Inheriting from '{0}' is not valid..
'''</summary>
Friend ReadOnly Property ERR_InheritsFromRestrictedType1() As String
Get
Return ResourceManager.GetString("ERR_InheritsFromRestrictedType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Inherits' statement must precede all declarations in a class..
'''</summary>
Friend ReadOnly Property ERR_InheritsStmtWrongOrder() As String
Get
Return ResourceManager.GetString("ERR_InheritsStmtWrongOrder", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot inherit from {1} '{2}' because it expands the access of type '{3}' to {4} '{5}'..
'''</summary>
Friend ReadOnly Property ERR_InheritsTypeArgAccessMismatch7() As String
Get
Return ResourceManager.GetString("ERR_InheritsTypeArgAccessMismatch7", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot inherit from {1} '{2}' because it expands the access of type '{3}' outside the assembly..
'''</summary>
Friend ReadOnly Property ERR_InheritsTypeArgAccessMismatchOutside5() As String
Get
Return ResourceManager.GetString("ERR_InheritsTypeArgAccessMismatchOutside5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expanded Properties cannot be initialized..
'''</summary>
Friend ReadOnly Property ERR_InitializedExpandedProperty() As String
Get
Return ResourceManager.GetString("ERR_InitializedExpandedProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Initializer expected..
'''</summary>
Friend ReadOnly Property ERR_InitializerExpected() As String
Get
Return ResourceManager.GetString("ERR_InitializerExpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Initializers on structure members are valid only for 'Shared' members and constants..
'''</summary>
Friend ReadOnly Property ERR_InitializerInStruct() As String
Get
Return ResourceManager.GetString("ERR_InitializerInStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array initializer is missing {0} elements..
'''</summary>
Friend ReadOnly Property ERR_InitializerTooFewElements1() As String
Get
Return ResourceManager.GetString("ERR_InitializerTooFewElements1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array initializer has {0} too many elements..
'''</summary>
Friend ReadOnly Property ERR_InitializerTooManyElements1() As String
Get
Return ResourceManager.GetString("ERR_InitializerTooManyElements1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Explicit initialization is not permitted for arrays declared with explicit bounds..
'''</summary>
Friend ReadOnly Property ERR_InitWithExplicitArraySizes() As String
Get
Return ResourceManager.GetString("ERR_InitWithExplicitArraySizes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Explicit initialization is not permitted with multiple variables declared with a single type specifier..
'''</summary>
Friend ReadOnly Property ERR_InitWithMultipleDeclarators() As String
Get
Return ResourceManager.GetString("ERR_InitWithMultipleDeclarators", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to There is an error in a referenced assembly '{0}'..
'''</summary>
Friend ReadOnly Property ERR_InReferencedAssembly() As String
Get
Return ResourceManager.GetString("ERR_InReferencedAssembly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' values cannot be converted to 'Char'. Use 'Microsoft.VisualBasic.ChrW' to interpret a numeric value as a Unicode character or first convert it to 'String' to produce a digit..
'''</summary>
Friend ReadOnly Property ERR_IntegralToCharTypeMismatch1() As String
Get
Return ResourceManager.GetString("ERR_IntegralToCharTypeMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot inherit interface '{0}' because the interface '{1}' from which it inherits could be identical to interface '{2}' from which the interface '{3}' inherits for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_InterfaceBaseUnifiesWithBase4() As String
Get
Return ResourceManager.GetString("ERR_InterfaceBaseUnifiesWithBase4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid on an interface event declaration..
'''</summary>
Friend ReadOnly Property ERR_InterfaceCantUseEventSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceCantUseEventSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' cannot inherit from itself: {1}.
'''</summary>
Friend ReadOnly Property ERR_InterfaceCycle1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceCycle1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Events in interfaces cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_InterfaceEventCantUse1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceEventCantUse1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' can be implemented only once by this type..
'''</summary>
Friend ReadOnly Property ERR_InterfaceImplementedTwice1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceImplementedTwice1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' can be implemented only once by this type, but already appears with different tuple element names, as '{1}'..
'''</summary>
Friend ReadOnly Property ERR_InterfaceImplementedTwiceWithDifferentTupleNames2() As String
Get
Return ResourceManager.GetString("ERR_InterfaceImplementedTwiceWithDifferentTupleNames2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' can be implemented only once by this type, but already appears with different tuple element names, as '{1}' (via '{2}')..
'''</summary>
Friend ReadOnly Property ERR_InterfaceImplementedTwiceWithDifferentTupleNames3() As String
Get
Return ResourceManager.GetString("ERR_InterfaceImplementedTwiceWithDifferentTupleNames3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' (via '{1}') can be implemented only once by this type, but already appears with different tuple element names, as '{2}' (via '{3}')..
'''</summary>
Friend ReadOnly Property ERR_InterfaceImplementedTwiceWithDifferentTupleNames4() As String
Get
Return ResourceManager.GetString("ERR_InterfaceImplementedTwiceWithDifferentTupleNames4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' (via '{1}') can be implemented only once by this type, but already appears with different tuple element names, as '{2}'..
'''</summary>
Friend ReadOnly Property ERR_InterfaceImplementedTwiceWithDifferentTupleNamesReverse3() As String
Get
Return ResourceManager.GetString("ERR_InterfaceImplementedTwiceWithDifferentTupleNamesReverse3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' can be inherited only once by this interface, but already appears with different tuple element names, as '{1}'..
'''</summary>
Friend ReadOnly Property ERR_InterfaceInheritedTwiceWithDifferentTupleNames2() As String
Get
Return ResourceManager.GetString("ERR_InterfaceInheritedTwiceWithDifferentTupleNames2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' can be inherited only once by this interface, but already appears with different tuple element names, as '{1}' (via '{2}')..
'''</summary>
Friend ReadOnly Property ERR_InterfaceInheritedTwiceWithDifferentTupleNames3() As String
Get
Return ResourceManager.GetString("ERR_InterfaceInheritedTwiceWithDifferentTupleNames3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' (via '{1}') can be inherited only once by this interface, but already appears with different tuple element names, as '{2}' (via '{3}')..
'''</summary>
Friend ReadOnly Property ERR_InterfaceInheritedTwiceWithDifferentTupleNames4() As String
Get
Return ResourceManager.GetString("ERR_InterfaceInheritedTwiceWithDifferentTupleNames4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' (via '{1}') can be inherited only once by this interface, but already appears with different tuple element names, as '{2}'..
'''</summary>
Friend ReadOnly Property ERR_InterfaceInheritedTwiceWithDifferentTupleNamesReverse3() As String
Get
Return ResourceManager.GetString("ERR_InterfaceInheritedTwiceWithDifferentTupleNamesReverse3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface members must be methods, properties, events, or type definitions..
'''</summary>
Friend ReadOnly Property ERR_InterfaceMemberSyntax() As String
Get
Return ResourceManager.GetString("ERR_InterfaceMemberSyntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be indexed because it has no default property..
'''</summary>
Friend ReadOnly Property ERR_InterfaceNoDefault1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceNoDefault1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an interface type and cannot be used as an expression..
'''</summary>
Friend ReadOnly Property ERR_InterfaceNotExpression1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceNotExpression1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' is not implemented by this class..
'''</summary>
Friend ReadOnly Property ERR_InterfaceNotImplemented1() As String
Get
Return ResourceManager.GetString("ERR_InterfaceNotImplemented1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot implement interface '{0}' because its implementation could conflict with the implementation of another implemented interface '{1}' for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_InterfacePossiblyImplTwice2() As String
Get
Return ResourceManager.GetString("ERR_InterfacePossiblyImplTwice2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot inherit interface '{0}' because it could be identical to interface '{1}' from which the interface '{2}' inherits for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_InterfaceUnifiesWithBase3() As String
Get
Return ResourceManager.GetString("ERR_InterfaceUnifiesWithBase3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot inherit interface '{0}' because it could be identical to interface '{1}' for some type arguments..
'''</summary>
Friend ReadOnly Property ERR_InterfaceUnifiesWithInterface2() As String
Get
Return ResourceManager.GetString("ERR_InterfaceUnifiesWithInterface2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Embedded interop method '{0}' contains a body..
'''</summary>
Friend ReadOnly Property ERR_InteropMethodWithBody1() As String
Get
Return ResourceManager.GetString("ERR_InteropMethodWithBody1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to There were one or more errors emitting a call to {0}.{1}. Method or its return type may be missing or malformed..
'''</summary>
Friend ReadOnly Property ERR_InterpolatedStringFactoryError() As String
Get
Return ResourceManager.GetString("ERR_InterpolatedStringFactoryError", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Alignment value is outside of the supported range..
'''</summary>
Friend ReadOnly Property ERR_InterpolationAlignmentOutOfRange() As String
Get
Return ResourceManager.GetString("ERR_InterpolationAlignmentOutOfRange", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Format specifier may not contain trailing whitespace..
'''</summary>
Friend ReadOnly Property ERR_InterpolationFormatWhitespace() As String
Get
Return ResourceManager.GetString("ERR_InterpolationFormatWhitespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' cannot be applied to an assembly..
'''</summary>
Friend ReadOnly Property ERR_InvalidAssemblyAttribute1() As String
Get
Return ResourceManager.GetString("ERR_InvalidAssemblyAttribute1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Assembly culture strings may not contain embedded NUL characters..
'''</summary>
Friend ReadOnly Property ERR_InvalidAssemblyCulture() As String
Get
Return ResourceManager.GetString("ERR_InvalidAssemblyCulture", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Executables cannot be satellite assemblies; culture should always be empty.
'''</summary>
Friend ReadOnly Property ERR_InvalidAssemblyCultureForExe() As String
Get
Return ResourceManager.GetString("ERR_InvalidAssemblyCultureForExe", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a valid value for /moduleassemblyname.
'''</summary>
Friend ReadOnly Property ERR_InvalidAssemblyName() As String
Get
Return ResourceManager.GetString("ERR_InvalidAssemblyName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Async' and 'Iterator' modifiers cannot be used together..
'''</summary>
Friend ReadOnly Property ERR_InvalidAsyncIteratorModifiers() As String
Get
Return ResourceManager.GetString("ERR_InvalidAsyncIteratorModifiers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' cannot be applied to '{1}' because the attribute is not valid on this declaration type..
'''</summary>
Friend ReadOnly Property ERR_InvalidAttributeUsage2() As String
Get
Return ResourceManager.GetString("ERR_InvalidAttributeUsage2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' cannot be applied to '{1}' of '{2}' because the attribute is not valid on this declaration type..
'''</summary>
Friend ReadOnly Property ERR_InvalidAttributeUsageOnAccessor() As String
Get
Return ResourceManager.GetString("ERR_InvalidAttributeUsageOnAccessor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute value is not valid; expecting '{0}'..
'''</summary>
Friend ReadOnly Property ERR_InvalidAttributeValue1() As String
Get
Return ResourceManager.GetString("ERR_InvalidAttributeValue1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute value is not valid; expecting '{0}' or '{1}'..
'''</summary>
Friend ReadOnly Property ERR_InvalidAttributeValue2() As String
Get
Return ResourceManager.GetString("ERR_InvalidAttributeValue2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as an implementing class..
'''</summary>
Friend ReadOnly Property ERR_InvalidCoClass1() As String
Get
Return ResourceManager.GetString("ERR_InvalidCoClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constructor call is valid only as the first statement in an instance constructor..
'''</summary>
Friend ReadOnly Property ERR_InvalidConstructorCall() As String
Get
Return ResourceManager.GetString("ERR_InvalidConstructorCall", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Date constant is not valid..
'''</summary>
Friend ReadOnly Property ERR_InvalidDate() As String
Get
Return ResourceManager.GetString("ERR_InvalidDate", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to read debug information of method '{0}' (token 0x{1}) from assembly '{2}'.
'''</summary>
Friend ReadOnly Property ERR_InvalidDebugInfo() As String
Get
Return ResourceManager.GetString("ERR_InvalidDebugInfo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid debug information format: {0}.
'''</summary>
Friend ReadOnly Property ERR_InvalidDebugInformationFormat() As String
Get
Return ResourceManager.GetString("ERR_InvalidDebugInformationFormat", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End AddHandler' must be preceded by a matching 'AddHandler' declaration..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndAddHandler() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndAddHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Enum' must be preceded by a matching 'Enum'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndEnum() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndEnum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Event' must be preceded by a matching 'Custom Event'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndEvent() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Function' must be preceded by a matching 'Function'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndFunction() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Get' must be preceded by a matching 'Get'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndGet() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndGet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Interface' must be preceded by a matching 'Interface'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndInterface() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Operator' must be preceded by a matching 'Operator'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndOperator() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndOperator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Property' must be preceded by a matching 'Property'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndProperty() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End RaiseEvent' must be preceded by a matching 'RaiseEvent' declaration..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndRaiseEvent() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndRaiseEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End RemoveHandler' must be preceded by a matching 'RemoveHandler' declaration..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndRemoveHandler() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndRemoveHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Set' must be preceded by a matching 'Set'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndSet() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End Sub' must be preceded by a matching 'Sub'..
'''</summary>
Friend ReadOnly Property ERR_InvalidEndSub() As String
Get
Return ResourceManager.GetString("ERR_InvalidEndSub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enums must be declared as an integral type..
'''</summary>
Friend ReadOnly Property ERR_InvalidEnumBase() As String
Get
Return ResourceManager.GetString("ERR_InvalidEnumBase", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid file section alignment '{0}'.
'''</summary>
Friend ReadOnly Property ERR_InvalidFileAlignment() As String
Get
Return ResourceManager.GetString("ERR_InvalidFileAlignment", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Command-line syntax error: Invalid Guid format '{0}' for option '{1}'.
'''</summary>
Friend ReadOnly Property ERR_InvalidFormatForGuidForOption() As String
Get
Return ResourceManager.GetString("ERR_InvalidFormatForGuidForOption", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a valid format specifier.
'''</summary>
Friend ReadOnly Property ERR_InvalidFormatSpecifier() As String
Get
Return ResourceManager.GetString("ERR_InvalidFormatSpecifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Handles' is not valid on operator declarations..
'''</summary>
Friend ReadOnly Property ERR_InvalidHandles() As String
Get
Return ResourceManager.GetString("ERR_InvalidHandles", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Implements' is not valid on operator declarations..
'''</summary>
Friend ReadOnly Property ERR_InvalidImplements() As String
Get
Return ResourceManager.GetString("ERR_InvalidImplements", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit reference to object under construction is not valid when calling another constructor..
'''</summary>
Friend ReadOnly Property ERR_InvalidImplicitMeReference() As String
Get
Return ResourceManager.GetString("ERR_InvalidImplicitMeReference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit variable '{0}' is invalid because of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_InvalidImplicitVar() As String
Get
Return ResourceManager.GetString("ERR_InvalidImplicitVar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement is not valid in a namespace..
'''</summary>
Friend ReadOnly Property ERR_InvalidInNamespace() As String
Get
Return ResourceManager.GetString("ERR_InvalidInNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid instrumentation kind: {0}.
'''</summary>
Friend ReadOnly Property ERR_InvalidInstrumentationKind() As String
Get
Return ResourceManager.GetString("ERR_InvalidInstrumentationKind", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Only the 'Async' or 'Iterator' modifier is valid on a lambda..
'''</summary>
Friend ReadOnly Property ERR_InvalidLambdaModifier() As String
Get
Return ResourceManager.GetString("ERR_InvalidLambdaModifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Exponent is not valid..
'''</summary>
Friend ReadOnly Property ERR_InvalidLiteralExponent() As String
Get
Return ResourceManager.GetString("ERR_InvalidLiteralExponent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Me' cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_InvalidMe() As String
Get
Return ResourceManager.GetString("ERR_InvalidMe", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference to object under construction is not valid when calling another constructor..
'''</summary>
Friend ReadOnly Property ERR_InvalidMeReference() As String
Get
Return ResourceManager.GetString("ERR_InvalidMeReference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' cannot be applied to a module..
'''</summary>
Friend ReadOnly Property ERR_InvalidModuleAttribute1() As String
Get
Return ResourceManager.GetString("ERR_InvalidModuleAttribute1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' cannot be applied multiple times..
'''</summary>
Friend ReadOnly Property ERR_InvalidMultipleAttributeUsage1() As String
Get
Return ResourceManager.GetString("ERR_InvalidMultipleAttributeUsage1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' in '{1}' cannot be applied multiple times..
'''</summary>
Friend ReadOnly Property ERR_InvalidMultipleAttributeUsageInNetModule2() As String
Get
Return ResourceManager.GetString("ERR_InvalidMultipleAttributeUsageInNetModule2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This sub-expression cannot be used inside NameOf argument..
'''</summary>
Friend ReadOnly Property ERR_InvalidNameOfSubExpression() As String
Get
Return ResourceManager.GetString("ERR_InvalidNameOfSubExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' is not valid in this context..
'''</summary>
Friend ReadOnly Property ERR_InvalidNewInType() As String
Get
Return ResourceManager.GetString("ERR_InvalidNewInType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'NonSerialized' attribute will not have any effect on this member because its containing class is not exposed as 'Serializable'..
'''</summary>
Friend ReadOnly Property ERR_InvalidNonSerializedUsage() As String
Get
Return ResourceManager.GetString("ERR_InvalidNonSerializedUsage", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' cannot be applied to a method with optional parameters..
'''</summary>
Friend ReadOnly Property ERR_InvalidOptionalParameterUsage1() As String
Get
Return ResourceManager.GetString("ERR_InvalidOptionalParameterUsage1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option Compare' must be followed by 'Text' or 'Binary'..
'''</summary>
Friend ReadOnly Property ERR_InvalidOptionCompare() As String
Get
Return ResourceManager.GetString("ERR_InvalidOptionCompare", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option Explicit' can be followed only by 'On' or 'Off'..
'''</summary>
Friend ReadOnly Property ERR_InvalidOptionExplicit() As String
Get
Return ResourceManager.GetString("ERR_InvalidOptionExplicit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option Infer' can be followed only by 'On' or 'Off'..
'''</summary>
Friend ReadOnly Property ERR_InvalidOptionInfer() As String
Get
Return ResourceManager.GetString("ERR_InvalidOptionInfer", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option Strict' can be followed only by 'On' or 'Off'..
'''</summary>
Friend ReadOnly Property ERR_InvalidOptionStrict() As String
Get
Return ResourceManager.GetString("ERR_InvalidOptionStrict", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict Custom can only be used as an option to the command-line compiler (vbc.exe)..
'''</summary>
Friend ReadOnly Property ERR_InvalidOptionStrictCustom() As String
Get
Return ResourceManager.GetString("ERR_InvalidOptionStrictCustom", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid output name: {0}.
'''</summary>
Friend ReadOnly Property ERR_InvalidOutputName() As String
Get
Return ResourceManager.GetString("ERR_InvalidOutputName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by their return types..
'''</summary>
Friend ReadOnly Property ERR_InvalidOverrideDueToReturn2() As String
Get
Return ResourceManager.GetString("ERR_InvalidOverrideDueToReturn2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Comma or ')' expected..
'''</summary>
Friend ReadOnly Property ERR_InvalidParameterSyntax() As String
Get
Return ResourceManager.GetString("ERR_InvalidParameterSyntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The pathmap option was incorrectly formatted..
'''</summary>
Friend ReadOnly Property ERR_InvalidPathMap() As String
Get
Return ResourceManager.GetString("ERR_InvalidPathMap", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Preprocessor constant '{0}' of type '{1}' is not supported, only primitive types are allowed..
'''</summary>
Friend ReadOnly Property ERR_InvalidPreprocessorConstantType() As String
Get
Return ResourceManager.GetString("ERR_InvalidPreprocessorConstantType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Invalid signature public key specified in AssemblySignatureKeyAttribute..
'''</summary>
Friend ReadOnly Property ERR_InvalidSignaturePublicKey() As String
Get
Return ResourceManager.GetString("ERR_InvalidSignaturePublicKey", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Only conversion operators can be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_InvalidSpecifierOnNonConversion1() As String
Get
Return ResourceManager.GetString("ERR_InvalidSpecifierOnNonConversion1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Embedded interop structure '{0}' can contain only public instance fields..
'''</summary>
Friend ReadOnly Property ERR_InvalidStructMemberNoPIA1() As String
Get
Return ResourceManager.GetString("ERR_InvalidStructMemberNoPIA1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to No accessible 'Main' method with an appropriate signature was found in '{0}'..
'''</summary>
Friend ReadOnly Property ERR_InValidSubMainsFound1() As String
Get
Return ResourceManager.GetString("ERR_InValidSubMainsFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The value '{0}' is not a valid subsystem version. The version must be 6.02 or greater for ARM or AppContainerExe, and 4.00 or greater otherwise..
'''</summary>
Friend ReadOnly Property ERR_InvalidSubsystemVersion() As String
Get
Return ResourceManager.GetString("ERR_InvalidSubsystemVersion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to the value '{1}' is invalid for option '{0}'.
'''</summary>
Friend ReadOnly Property ERR_InvalidSwitchValue() As String
Get
Return ResourceManager.GetString("ERR_InvalidSwitchValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{1}' for the Imports alias to '{0}' does not refer to a Namespace, Class, Structure, Interface, Enum or Module..
'''</summary>
Friend ReadOnly Property ERR_InvalidTypeForAliasesImport2() As String
Get
Return ResourceManager.GetString("ERR_InvalidTypeForAliasesImport2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Custom' modifier can only be used immediately before an 'Event' declaration..
'''</summary>
Friend ReadOnly Property ERR_InvalidUseOfCustomModifier() As String
Get
Return ResourceManager.GetString("ERR_InvalidUseOfCustomModifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Keyword is not valid as an identifier..
'''</summary>
Friend ReadOnly Property ERR_InvalidUseOfKeyword() As String
Get
Return ResourceManager.GetString("ERR_InvalidUseOfKeyword", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The specified version string does not conform to the required format - major[.minor[.build|*[.revision|*]]].
'''</summary>
Friend ReadOnly Property ERR_InvalidVersionFormat() As String
Get
Return ResourceManager.GetString("ERR_InvalidVersionFormat", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The specified version string does not conform to the recommended format - major.minor.build.revision.
'''</summary>
Friend ReadOnly Property ERR_InvalidVersionFormat2() As String
Get
Return ResourceManager.GetString("ERR_InvalidVersionFormat2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement is not valid inside '{0}' block..
'''</summary>
Friend ReadOnly Property ERR_InvInsideBlock() As String
Get
Return ResourceManager.GetString("ERR_InvInsideBlock", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within an Enum body. End of Enum assumed..
'''</summary>
Friend ReadOnly Property ERR_InvInsideEndsEnum() As String
Get
Return ResourceManager.GetString("ERR_InvInsideEndsEnum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within an event body. End of event assumed..
'''</summary>
Friend ReadOnly Property ERR_InvInsideEndsEvent() As String
Get
Return ResourceManager.GetString("ERR_InvInsideEndsEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within an interface body. End of interface assumed..
'''</summary>
Friend ReadOnly Property ERR_InvInsideEndsInterface() As String
Get
Return ResourceManager.GetString("ERR_InvInsideEndsInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within a method body. End of method assumed..
'''</summary>
Friend ReadOnly Property ERR_InvInsideEndsProc() As String
Get
Return ResourceManager.GetString("ERR_InvInsideEndsProc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within a property body. End of property assumed..
'''</summary>
Friend ReadOnly Property ERR_InvInsideEndsProperty() As String
Get
Return ResourceManager.GetString("ERR_InvInsideEndsProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within an Enum body..
'''</summary>
Friend ReadOnly Property ERR_InvInsideEnum() As String
Get
Return ResourceManager.GetString("ERR_InvInsideEnum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement cannot appear within an interface body..
'''</summary>
Friend ReadOnly Property ERR_InvInsideInterface() As String
Get
Return ResourceManager.GetString("ERR_InvInsideInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement is not valid inside a method..
'''</summary>
Friend ReadOnly Property ERR_InvInsideProc() As String
Get
Return ResourceManager.GetString("ERR_InvInsideProc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Labels are not valid outside methods..
'''</summary>
Friend ReadOnly Property ERR_InvOutsideProc() As String
Get
Return ResourceManager.GetString("ERR_InvOutsideProc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}' is nested in '{1}'..
'''</summary>
Friend ReadOnly Property ERR_IsNestedIn2() As String
Get
Return ResourceManager.GetString("ERR_IsNestedIn2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'IsNot' operand of type '{0}' can be compared only to 'Nothing' because '{0}' is a type parameter with no class constraint..
'''</summary>
Friend ReadOnly Property ERR_IsNotOperatorGenericParam1() As String
Get
Return ResourceManager.GetString("ERR_IsNotOperatorGenericParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'IsNot' operand of type '{0}' can be compared only to 'Nothing' because '{0}' is a nullable type..
'''</summary>
Friend ReadOnly Property ERR_IsNotOperatorNullable1() As String
Get
Return ResourceManager.GetString("ERR_IsNotOperatorNullable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'IsNot' requires operands that have reference types, but this operand has the value type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_IsNotOpRequiresReferenceTypes1() As String
Get
Return ResourceManager.GetString("ERR_IsNotOpRequiresReferenceTypes1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Is' operand of type '{0}' can be compared only to 'Nothing' because '{0}' is a type parameter with no class constraint..
'''</summary>
Friend ReadOnly Property ERR_IsOperatorGenericParam1() As String
Get
Return ResourceManager.GetString("ERR_IsOperatorGenericParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Is' operand of type '{0}' can be compared only to 'Nothing' because '{0}' is a nullable type..
'''</summary>
Friend ReadOnly Property ERR_IsOperatorNullable1() As String
Get
Return ResourceManager.GetString("ERR_IsOperatorNullable1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Is' operator does not accept operands of type '{0}'. Operands must be reference or nullable types..
'''</summary>
Friend ReadOnly Property ERR_IsOperatorRequiresReferenceTypes1() As String
Get
Return ResourceManager.GetString("ERR_IsOperatorRequiresReferenceTypes1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable '{0}' hides a variable in an enclosing block or a range variable previously defined in the query expression..
'''</summary>
Friend ReadOnly Property ERR_IterationVariableShadowLocal1() As String
Get
Return ResourceManager.GetString("ERR_IterationVariableShadowLocal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable '{0}' hides a variable in an enclosing block, a previously defined range variable, or an implicitly declared variable in a query expression..
'''</summary>
Friend ReadOnly Property ERR_IterationVariableShadowLocal2() As String
Get
Return ResourceManager.GetString("ERR_IterationVariableShadowLocal2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to You cannot use '{0}' in top-level script code.
'''</summary>
Friend ReadOnly Property ERR_KeywordNotAllowedInScript() As String
Get
Return ResourceManager.GetString("ERR_KeywordNotAllowedInScript", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Label '{0}' is not defined..
'''</summary>
Friend ReadOnly Property ERR_LabelNotDefined1() As String
Get
Return ResourceManager.GetString("ERR_LabelNotDefined1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nested function does not have the same signature as delegate '{0}'..
'''</summary>
Friend ReadOnly Property ERR_LambdaBindingMismatch1() As String
Get
Return ResourceManager.GetString("ERR_LambdaBindingMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nested sub does not have a signature that is compatible with delegate '{0}'..
'''</summary>
Friend ReadOnly Property ERR_LambdaBindingMismatch2() As String
Get
Return ResourceManager.GetString("ERR_LambdaBindingMismatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambda expressions are not valid in the first expression of a 'Select Case' statement..
'''</summary>
Friend ReadOnly Property ERR_LambdaInSelectCaseExpr() As String
Get
Return ResourceManager.GetString("ERR_LambdaInSelectCaseExpr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambda expression cannot be converted to '{0}' because type '{0}' is declared 'MustInherit' and cannot be created..
'''</summary>
Friend ReadOnly Property ERR_LambdaNotCreatableDelegate1() As String
Get
Return ResourceManager.GetString("ERR_LambdaNotCreatableDelegate1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambda expression cannot be converted to '{0}' because '{0}' is not a delegate type..
'''</summary>
Friend ReadOnly Property ERR_LambdaNotDelegate1() As String
Get
Return ResourceManager.GetString("ERR_LambdaNotDelegate1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type. Consider adding an 'As' clause to specify the return type..
'''</summary>
Friend ReadOnly Property ERR_LambdaNoType() As String
Get
Return ResourceManager.GetString("ERR_LambdaNoType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type. Consider adding an 'As' clause to specify the return type..
'''</summary>
Friend ReadOnly Property ERR_LambdaNoTypeObjectDisallowed() As String
Get
Return ResourceManager.GetString("ERR_LambdaNoTypeObjectDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambda parameter '{0}' hides a variable in an enclosing block, a previously defined range variable, or an implicitly declared variable in a query expression..
'''</summary>
Friend ReadOnly Property ERR_LambdaParamShadowLocal1() As String
Get
Return ResourceManager.GetString("ERR_LambdaParamShadowLocal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attributes cannot be applied to parameters of lambda expressions..
'''</summary>
Friend ReadOnly Property ERR_LambdasCannotHaveAttributes() As String
Get
Return ResourceManager.GetString("ERR_LambdasCannotHaveAttributes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type because more than one type is possible. Consider adding an 'As' clause to specify the return type..
'''</summary>
Friend ReadOnly Property ERR_LambdaTooManyTypesObjectDisallowed() As String
Get
Return ResourceManager.GetString("ERR_LambdaTooManyTypesObjectDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Visual Basic {0} does not support {1}..
'''</summary>
Friend ReadOnly Property ERR_LanguageVersion() As String
Get
Return ResourceManager.GetString("ERR_LanguageVersion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Late bound overload resolution cannot be applied to '{0}' because the accessing instance is an interface type..
'''</summary>
Friend ReadOnly Property ERR_LateBoundOverloadInterfaceCall1() As String
Get
Return ResourceManager.GetString("ERR_LateBoundOverloadInterfaceCall1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#ElseIf' must be preceded by a matching '#If' or '#ElseIf'..
'''</summary>
Friend ReadOnly Property ERR_LbBadElseif() As String
Get
Return ResourceManager.GetString("ERR_LbBadElseif", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#ElseIf' cannot follow '#Else' as part of a '#If' block..
'''</summary>
Friend ReadOnly Property ERR_LbElseifAfterElse() As String
Get
Return ResourceManager.GetString("ERR_LbElseifAfterElse", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#Else' must be preceded by a matching '#If' or '#ElseIf'..
'''</summary>
Friend ReadOnly Property ERR_LbElseNoMatchingIf() As String
Get
Return ResourceManager.GetString("ERR_LbElseNoMatchingIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#If' block must end with a matching '#End If'..
'''</summary>
Friend ReadOnly Property ERR_LbExpectedEndIf() As String
Get
Return ResourceManager.GetString("ERR_LbExpectedEndIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#ElseIf', '#Else', or '#End If' must be preceded by a matching '#If'..
'''</summary>
Friend ReadOnly Property ERR_LbNoMatchingIf() As String
Get
Return ResourceManager.GetString("ERR_LbNoMatchingIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to /platform:anycpu32bitpreferred can only be used with /t:exe, /t:winexe and /t:appcontainerexe..
'''</summary>
Friend ReadOnly Property ERR_LibAnycpu32bitPreferredConflict() As String
Get
Return ResourceManager.GetString("ERR_LibAnycpu32bitPreferredConflict", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to could not find library '{0}'.
'''</summary>
Friend ReadOnly Property ERR_LibNotFound() As String
Get
Return ResourceManager.GetString("ERR_LibNotFound", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Line continuation character '_' must be preceded by at least one white space and must be the last character on the line..
'''</summary>
Friend ReadOnly Property ERR_LineContWithCommentOrNoPrecSpace() As String
Get
Return ResourceManager.GetString("ERR_LineContWithCommentOrNoPrecSpace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Linked netmodule metadata must provide a full PE image: '{0}'..
'''</summary>
Friend ReadOnly Property ERR_LinkedNetmoduleMetadataMustProvideFullPEImage() As String
Get
Return ResourceManager.GetString("ERR_LinkedNetmoduleMetadataMustProvideFullPEImage", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Literal expected..
'''</summary>
Friend ReadOnly Property ERR_LiteralExpected() As String
Get
Return ResourceManager.GetString("ERR_LiteralExpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is already declared as a parameter of this method..
'''</summary>
Friend ReadOnly Property ERR_LocalNamedSameAsParam1() As String
Get
Return ResourceManager.GetString("ERR_LocalNamedSameAsParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable '{0}' is already declared as a parameter of this or an enclosing lambda expression..
'''</summary>
Friend ReadOnly Property ERR_LocalNamedSameAsParamInLambda1() As String
Get
Return ResourceManager.GetString("ERR_LocalNamedSameAsParamInLambda1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable cannot have the same name as the function containing it..
'''</summary>
Friend ReadOnly Property ERR_LocalSameAsFunc() As String
Get
Return ResourceManager.GetString("ERR_LocalSameAsFunc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attributes cannot be applied to local variables..
'''</summary>
Friend ReadOnly Property ERR_LocalsCannotHaveAttributes() As String
Get
Return ResourceManager.GetString("ERR_LocalsCannotHaveAttributes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Embedding the interop type '{0}' from assembly '{1}' causes a name clash in the current assembly. Consider disabling the embedding of interop types..
'''</summary>
Friend ReadOnly Property ERR_LocalTypeNameClash2() As String
Get
Return ResourceManager.GetString("ERR_LocalTypeNameClash2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Loop control variable cannot include an 'Await'..
'''</summary>
Friend ReadOnly Property ERR_LoopControlMustNotAwait() As String
Get
Return ResourceManager.GetString("ERR_LoopControlMustNotAwait", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Loop control variable cannot be a property or a late-bound indexed array..
'''</summary>
Friend ReadOnly Property ERR_LoopControlMustNotBeProperty() As String
Get
Return ResourceManager.GetString("ERR_LoopControlMustNotBeProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Loop' cannot have a condition if matching 'Do' has one..
'''</summary>
Friend ReadOnly Property ERR_LoopDoubleCondition() As String
Get
Return ResourceManager.GetString("ERR_LoopDoubleCondition", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Loop' must be preceded by a matching 'Do'..
'''</summary>
Friend ReadOnly Property ERR_LoopNoMatchingDo() As String
Get
Return ResourceManager.GetString("ERR_LoopNoMatchingDo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression is a value and therefore cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_LValueRequired() As String
Get
Return ResourceManager.GetString("ERR_LValueRequired", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unmanaged type '{0}' not valid for fields..
'''</summary>
Friend ReadOnly Property ERR_MarshalUnmanagedTypeNotValidForFields() As String
Get
Return ResourceManager.GetString("ERR_MarshalUnmanagedTypeNotValidForFields", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unmanaged type '{0}' is only valid for fields..
'''</summary>
Friend ReadOnly Property ERR_MarshalUnmanagedTypeOnlyValidForFields() As String
Get
Return ResourceManager.GetString("ERR_MarshalUnmanagedTypeOnlyValidForFields", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Matching '{0}' operator is required for '{1}'..
'''</summary>
Friend ReadOnly Property ERR_MatchingOperatorExpected2() As String
Get
Return ResourceManager.GetString("ERR_MatchingOperatorExpected2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Maximum number of errors has been exceeded..
'''</summary>
Friend ReadOnly Property ERR_MaximumNumberOfErrors() As String
Get
Return ResourceManager.GetString("ERR_MaximumNumberOfErrors", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' conflicts with a member implicitly declared for {2} '{3}' in {4} '{5}'..
'''</summary>
Friend ReadOnly Property ERR_MemberClashesWithSynth6() As String
Get
Return ResourceManager.GetString("ERR_MemberClashesWithSynth6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conflicts with '{0}', which is implicitly declared for '{1}' in {2} '{3}'..
'''</summary>
Friend ReadOnly Property ERR_MemberConflictWithSynth4() As String
Get
Return ResourceManager.GetString("ERR_MemberConflictWithSynth4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Merge conflict marker encountered.
'''</summary>
Friend ReadOnly Property ERR_Merge_conflict_marker_encountered() As String
Get
Return ResourceManager.GetString("ERR_Merge_conflict_marker_encountered", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is a module and cannot be referenced as an assembly..
'''</summary>
Friend ReadOnly Property ERR_MetaDataIsNotAssembly() As String
Get
Return ResourceManager.GetString("ERR_MetaDataIsNotAssembly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an assembly and cannot be referenced as a module..
'''</summary>
Friend ReadOnly Property ERR_MetaDataIsNotModule() As String
Get
Return ResourceManager.GetString("ERR_MetaDataIsNotModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is ambiguous because multiple kinds of members with this name exist in {1} '{2}'..
'''</summary>
Friend ReadOnly Property ERR_MetadataMembersAmbiguous3() As String
Get
Return ResourceManager.GetString("ERR_MetadataMembersAmbiguous3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Metadata references not supported..
'''</summary>
Friend ReadOnly Property ERR_MetadataReferencesNotSupported() As String
Get
Return ResourceManager.GetString("ERR_MetadataReferencesNotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}.{1}' cannot be implemented more than once..
'''</summary>
Friend ReadOnly Property ERR_MethodAlreadyImplemented2() As String
Get
Return ResourceManager.GetString("ERR_MethodAlreadyImplemented2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of a method body cannot be on the same line as the method declaration..
'''</summary>
Friend ReadOnly Property ERR_MethodBodyNotAtLineStart() As String
Get
Return ResourceManager.GetString("ERR_MethodBodyNotAtLineStart", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method declaration statements must be the first statement on a logical line..
'''</summary>
Friend ReadOnly Property ERR_MethodMustBeFirstStatementOnLine() As String
Get
Return ResourceManager.GetString("ERR_MethodMustBeFirstStatementOnLine", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method type arguments unexpected..
'''</summary>
Friend ReadOnly Property ERR_MethodTypeArgsUnexpected() As String
Get
Return ResourceManager.GetString("ERR_MethodTypeArgsUnexpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to End tag </{0}{1}{2}> expected..
'''</summary>
Friend ReadOnly Property ERR_MismatchedXmlEndTag() As String
Get
Return ResourceManager.GetString("ERR_MismatchedXmlEndTag", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' definition missing for event '{0}'..
'''</summary>
Friend ReadOnly Property ERR_MissingAddHandlerDef1() As String
Get
Return ResourceManager.GetString("ERR_MissingAddHandlerDef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddHandler' declaration must end with a matching 'End AddHandler'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndAddHandler() As String
Get
Return ResourceManager.GetString("ERR_MissingEndAddHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bracketed identifier is missing closing ']'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndBrack() As String
Get
Return ResourceManager.GetString("ERR_MissingEndBrack", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Enum' must end with a matching 'End Enum'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndEnum() As String
Get
Return ResourceManager.GetString("ERR_MissingEndEnum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Custom Event' must end with a matching 'End Event'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndEvent() As String
Get
Return ResourceManager.GetString("ERR_MissingEndEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Get' statement must end with a matching 'End Get'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndGet() As String
Get
Return ResourceManager.GetString("ERR_MissingEndGet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Interface' must end with a matching 'End Interface'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndInterface() As String
Get
Return ResourceManager.GetString("ERR_MissingEndInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RaiseEvent' declaration must end with a matching 'End RaiseEvent'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndRaiseEvent() As String
Get
Return ResourceManager.GetString("ERR_MissingEndRaiseEvent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RemoveHandler' declaration must end with a matching 'End RemoveHandler'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndRemoveHandler() As String
Get
Return ResourceManager.GetString("ERR_MissingEndRemoveHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Set' statement must end with a matching 'End Set'..
'''</summary>
Friend ReadOnly Property ERR_MissingEndSet() As String
Get
Return ResourceManager.GetString("ERR_MissingEndSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Command-line syntax error: Missing Guid for option '{1}'.
'''</summary>
Friend ReadOnly Property ERR_MissingGuidForOption() As String
Get
Return ResourceManager.GetString("ERR_MissingGuidForOption", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Is' expected..
'''</summary>
Friend ReadOnly Property ERR_MissingIsInTypeOf() As String
Get
Return ResourceManager.GetString("ERR_MissingIsInTypeOf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Lib' expected..
'''</summary>
Friend ReadOnly Property ERR_MissingLibInDeclare() As String
Get
Return ResourceManager.GetString("ERR_MissingLibInDeclare", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference to '{0}' netmodule missing..
'''</summary>
Friend ReadOnly Property ERR_MissingNetModuleReference() As String
Get
Return ResourceManager.GetString("ERR_MissingNetModuleReference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Next' expected..
'''</summary>
Friend ReadOnly Property ERR_MissingNext() As String
Get
Return ResourceManager.GetString("ERR_MissingNext", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RaiseEvent' definition missing for event '{0}'..
'''</summary>
Friend ReadOnly Property ERR_MissingRaiseEventDef1() As String
Get
Return ResourceManager.GetString("ERR_MissingRaiseEventDef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RemoveHandler' definition missing for event '{0}'..
'''</summary>
Friend ReadOnly Property ERR_MissingRemoveHandlerDef1() As String
Get
Return ResourceManager.GetString("ERR_MissingRemoveHandlerDef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Requested operation is not available because the runtime library function '{0}' is not defined..
'''</summary>
Friend ReadOnly Property ERR_MissingRuntimeHelper() As String
Get
Return ResourceManager.GetString("ERR_MissingRuntimeHelper", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array subscript expression missing..
'''</summary>
Friend ReadOnly Property ERR_MissingSubscript() As String
Get
Return ResourceManager.GetString("ERR_MissingSubscript", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Arrays used as attribute arguments are required to explicitly specify values for all elements..
'''</summary>
Friend ReadOnly Property ERR_MissingValuesForArraysInApplAttrs() As String
Get
Return ResourceManager.GetString("ERR_MissingValuesForArraysInApplAttrs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Required attribute 'version' missing from XML declaration..
'''</summary>
Friend ReadOnly Property ERR_MissingVersionInXmlDecl() As String
Get
Return ResourceManager.GetString("ERR_MissingVersionInXmlDecl", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Element is missing an end tag..
'''</summary>
Friend ReadOnly Property ERR_MissingXmlEndTag() As String
Get
Return ResourceManager.GetString("ERR_MissingXmlEndTag", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event '{0}' cannot implement a Windows Runtime event '{1}' and a regular .NET event '{2}'.
'''</summary>
Friend ReadOnly Property ERR_MixingWinRTAndNETEvents() As String
Get
Return ResourceManager.GetString("ERR_MixingWinRTAndNETEvents", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Module '{0}' cannot be used as a type..
'''</summary>
Friend ReadOnly Property ERR_ModuleAsType1() As String
Get
Return ResourceManager.GetString("ERR_ModuleAsType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Implements' not valid in Modules..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantImplement() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantImplement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Inherits' not valid in Modules..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantInherit() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantInherit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Declare' statements in a Module cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantUseDLLDeclareSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantUseDLLDeclareSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Events in a Module cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantUseEventSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantUseEventSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Methods in a Module cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantUseMethodSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantUseMethodSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type in a Module cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantUseTypeSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantUseTypeSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variables in Modules cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ModuleCantUseVariableSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_ModuleCantUseVariableSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Failed to emit module '{0}'..
'''</summary>
Friend ReadOnly Property ERR_ModuleEmitFailure() As String
Get
Return ResourceManager.GetString("ERR_ModuleEmitFailure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Members in a Module cannot implement interface members..
'''</summary>
Friend ReadOnly Property ERR_ModuleMemberCantImplement() As String
Get
Return ResourceManager.GetString("ERR_ModuleMemberCantImplement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Module' statements can occur only at file or namespace level..
'''</summary>
Friend ReadOnly Property ERR_ModuleNotAtNamespace() As String
Get
Return ResourceManager.GetString("ERR_ModuleNotAtNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Modules cannot be generic..
'''</summary>
Friend ReadOnly Property ERR_ModulesCannotBeGeneric() As String
Get
Return ResourceManager.GetString("ERR_ModulesCannotBeGeneric", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub Main' is declared more than once in '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_MoreThanOneValidMainWasFound2() As String
Get
Return ResourceManager.GetString("ERR_MoreThanOneValidMainWasFound2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Multiline lambda expression is missing 'End Function'..
'''</summary>
Friend ReadOnly Property ERR_MultilineLambdaMissingFunction() As String
Get
Return ResourceManager.GetString("ERR_MultilineLambdaMissingFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Multiline lambda expression is missing 'End Sub'..
'''</summary>
Friend ReadOnly Property ERR_MultilineLambdaMissingSub() As String
Get
Return ResourceManager.GetString("ERR_MultilineLambdaMissingSub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'On Error' and 'Resume' cannot appear inside a lambda expression..
'''</summary>
Friend ReadOnly Property ERR_MultilineLambdasCannotContainOnError() As String
Get
Return ResourceManager.GetString("ERR_MultilineLambdasCannotContainOnError", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' can only have one constraint that is a class..
'''</summary>
Friend ReadOnly Property ERR_MultipleClassConstraints1() As String
Get
Return ResourceManager.GetString("ERR_MultipleClassConstraints1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event '{0}' cannot implement event '{2}.{1}' because its delegate type does not match the delegate type of another event implemented by '{0}'..
'''</summary>
Friend ReadOnly Property ERR_MultipleEventImplMismatch3() As String
Get
Return ResourceManager.GetString("ERR_MultipleEventImplMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Inherits' can appear only once within a 'Class' statement and can only specify one class..
'''</summary>
Friend ReadOnly Property ERR_MultipleExtends() As String
Get
Return ResourceManager.GetString("ERR_MultipleExtends", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' constraint cannot be specified multiple times for the same type parameter..
'''</summary>
Friend ReadOnly Property ERR_MultipleNewConstraints() As String
Get
Return ResourceManager.GetString("ERR_MultipleNewConstraints", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Optional' and 'ParamArray' cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_MultipleOptionalParameterSpecifiers() As String
Get
Return ResourceManager.GetString("ERR_MultipleOptionalParameterSpecifiers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ByVal' and 'ByRef' cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_MultipleParameterSpecifiers() As String
Get
Return ResourceManager.GetString("ERR_MultipleParameterSpecifiers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Class' constraint cannot be specified multiple times for the same type parameter..
'''</summary>
Friend ReadOnly Property ERR_MultipleReferenceConstraints() As String
Get
Return ResourceManager.GetString("ERR_MultipleReferenceConstraints", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Structure' constraint cannot be specified multiple times for the same type parameter..
'''</summary>
Friend ReadOnly Property ERR_MultipleValueConstraints() As String
Get
Return ResourceManager.GetString("ERR_MultipleValueConstraints", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Label '{0}' is already defined in the current method..
'''</summary>
Friend ReadOnly Property ERR_MultiplyDefined1() As String
Get
Return ResourceManager.GetString("ERR_MultiplyDefined1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is already declared in this {1}..
'''</summary>
Friend ReadOnly Property ERR_MultiplyDefinedEnumMember2() As String
Get
Return ResourceManager.GetString("ERR_MultiplyDefinedEnumMember2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is already declared as '{1}' in this {2}..
'''</summary>
Friend ReadOnly Property ERR_MultiplyDefinedType3() As String
Get
Return ResourceManager.GetString("ERR_MultiplyDefinedType3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Throw' statement cannot omit operand outside a 'Catch' statement or inside a 'Finally' statement..
'''</summary>
Friend ReadOnly Property ERR_MustBeInCatchToRethrow() As String
Get
Return ResourceManager.GetString("ERR_MustBeInCatchToRethrow", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' must be declared 'Overloads' because another '{1}' is declared 'Overloads' or 'Overrides'..
'''</summary>
Friend ReadOnly Property ERR_MustBeOverloads2() As String
Get
Return ResourceManager.GetString("ERR_MustBeOverloads2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is a MustOverride event in the base class '{1}'. Visual Basic does not support event overriding. You must either provide an implementation for the event in the base class, or make class '{2}' MustInherit..
'''</summary>
Friend ReadOnly Property ERR_MustInheritEventNotOverridden() As String
Get
Return ResourceManager.GetString("ERR_MustInheritEventNotOverridden", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type argument '{0}' is declared 'MustInherit' and does not satisfy the 'New' constraint for type parameter '{1}'..
'''</summary>
Friend ReadOnly Property ERR_MustInheritForNewConstraint2() As String
Get
Return ResourceManager.GetString("ERR_MustInheritForNewConstraint2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MustOverride' cannot be specified on this member because it is in a partial type that is declared 'NotInheritable' in another partial definition..
'''</summary>
Friend ReadOnly Property ERR_MustOverOnNotInheritPartClsMem1() As String
Get
Return ResourceManager.GetString("ERR_MustOverOnNotInheritPartClsMem1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' must be declared 'MustInherit' because it contains methods declared 'MustOverride'..
'''</summary>
Friend ReadOnly Property ERR_MustOverridesInClass1() As String
Get
Return ResourceManager.GetString("ERR_MustOverridesInClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' must be declared 'Shadows' because another member with this name is declared 'Shadows'..
'''</summary>
Friend ReadOnly Property ERR_MustShadow2() As String
Get
Return ResourceManager.GetString("ERR_MustShadow2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Compilation options '{0}' and '{1}' can't both be specified at the same time..
'''</summary>
Friend ReadOnly Property ERR_MutuallyExclusiveOptions() As String
Get
Return ResourceManager.GetString("ERR_MutuallyExclusiveOptions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MyBase' cannot be used with method '{0}' because it is declared 'MustOverride'..
'''</summary>
Friend ReadOnly Property ERR_MyBaseAbstractCall1() As String
Get
Return ResourceManager.GetString("ERR_MyBaseAbstractCall1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MustOverride' method '{0}' cannot be called with 'MyClass'..
'''</summary>
Friend ReadOnly Property ERR_MyClassAbstractCall1() As String
Get
Return ResourceManager.GetString("ERR_MyClassAbstractCall1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MyClass' cannot be used outside of a class..
'''</summary>
Friend ReadOnly Property ERR_MyClassNotInClass() As String
Get
Return ResourceManager.GetString("ERR_MyClassNotInClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to MyGroupCollectionAttribute cannot be applied to itself..
'''</summary>
Friend ReadOnly Property ERR_MyGroupCollectionAttributeCycle() As String
Get
Return ResourceManager.GetString("ERR_MyGroupCollectionAttributeCycle", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter '{0}' already has a matching omitted argument..
'''</summary>
Friend ReadOnly Property ERR_NamedArgAlsoOmitted1() As String
Get
Return ResourceManager.GetString("ERR_NamedArgAlsoOmitted1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter '{0}' in '{1}' already has a matching omitted argument..
'''</summary>
Friend ReadOnly Property ERR_NamedArgAlsoOmitted2() As String
Get
Return ResourceManager.GetString("ERR_NamedArgAlsoOmitted2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter '{0}' in extension method '{1}' defined in '{2}' already has a matching omitted argument..
'''</summary>
Friend ReadOnly Property ERR_NamedArgAlsoOmitted3() As String
Get
Return ResourceManager.GetString("ERR_NamedArgAlsoOmitted3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Named argument specifications must appear after all fixed arguments have been specified in a late bound invocation..
'''</summary>
Friend ReadOnly Property ERR_NamedArgumentSpecificationBeforeFixedArgumentInLateboundInvocation() As String
Get
Return ResourceManager.GetString("ERR_NamedArgumentSpecificationBeforeFixedArgumentInLateboundInvocation", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter '{0}' already has a matching argument..
'''</summary>
Friend ReadOnly Property ERR_NamedArgUsedTwice1() As String
Get
Return ResourceManager.GetString("ERR_NamedArgUsedTwice1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter '{0}' of '{1}' already has a matching argument..
'''</summary>
Friend ReadOnly Property ERR_NamedArgUsedTwice2() As String
Get
Return ResourceManager.GetString("ERR_NamedArgUsedTwice2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter '{0}' of extension method '{1}' defined in '{2}' already has a matching argument..
'''</summary>
Friend ReadOnly Property ERR_NamedArgUsedTwice3() As String
Get
Return ResourceManager.GetString("ERR_NamedArgUsedTwice3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Named argument cannot match a ParamArray parameter..
'''</summary>
Friend ReadOnly Property ERR_NamedParamArrayArgument() As String
Get
Return ResourceManager.GetString("ERR_NamedParamArrayArgument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a method parameter..
'''</summary>
Friend ReadOnly Property ERR_NamedParamNotFound1() As String
Get
Return ResourceManager.GetString("ERR_NamedParamNotFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a parameter of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_NamedParamNotFound2() As String
Get
Return ResourceManager.GetString("ERR_NamedParamNotFound2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a parameter of extension method '{1}' defined in '{2}'..
'''</summary>
Friend ReadOnly Property ERR_NamedParamNotFound3() As String
Get
Return ResourceManager.GetString("ERR_NamedParamNotFound3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Named arguments are not valid as array subscripts..
'''</summary>
Friend ReadOnly Property ERR_NamedSubscript() As String
Get
Return ResourceManager.GetString("ERR_NamedSubscript", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not declared. It may be inaccessible due to its protection level..
'''</summary>
Friend ReadOnly Property ERR_NameNotDeclared1() As String
Get
Return ResourceManager.GetString("ERR_NameNotDeclared1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not an event of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_NameNotEvent2() As String
Get
Return ResourceManager.GetString("ERR_NameNotEvent2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a member of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_NameNotMember2() As String
Get
Return ResourceManager.GetString("ERR_NameNotMember2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not a member of '{1}'; it does not exist in the current context..
'''</summary>
Friend ReadOnly Property ERR_NameNotMemberOfAnonymousType2() As String
Get
Return ResourceManager.GetString("ERR_NameNotMemberOfAnonymousType2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is already declared as a type parameter of this method..
'''</summary>
Friend ReadOnly Property ERR_NameSameAsMethodTypeParam1() As String
Get
Return ResourceManager.GetString("ERR_NameSameAsMethodTypeParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to You cannot declare Namespace in script code.
'''</summary>
Friend ReadOnly Property ERR_NamespaceNotAllowedInScript() As String
Get
Return ResourceManager.GetString("ERR_NamespaceNotAllowedInScript", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Namespace' statements can occur only at file or namespace level..
'''</summary>
Friend ReadOnly Property ERR_NamespaceNotAtNamespace() As String
Get
Return ResourceManager.GetString("ERR_NamespaceNotAtNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is a namespace and cannot be used as an expression..
'''</summary>
Friend ReadOnly Property ERR_NamespaceNotExpression1() As String
Get
Return ResourceManager.GetString("ERR_NamespaceNotExpression1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On disallows implicit conversions from '{0}' to '{1}'; the Visual Basic 6.0 collection type is not compatible with the .NET Framework collection type..
'''</summary>
Friend ReadOnly Property ERR_NarrowingConversionCollection2() As String
Get
Return ResourceManager.GetString("ERR_NarrowingConversionCollection2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On disallows implicit conversions from '{0}' to '{1}'..
'''</summary>
Friend ReadOnly Property ERR_NarrowingConversionDisallowed2() As String
Get
Return ResourceManager.GetString("ERR_NarrowingConversionDisallowed2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to the /moduleassemblyname option may only be specified when building a target of type 'module'.
'''</summary>
Friend ReadOnly Property ERR_NeedModule() As String
Get
Return ResourceManager.GetString("ERR_NeedModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array dimensions cannot have a negative size..
'''</summary>
Friend ReadOnly Property ERR_NegativeArraySize() As String
Get
Return ResourceManager.GetString("ERR_NegativeArraySize", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' cannot inherit from a type nested within it..
'''</summary>
Friend ReadOnly Property ERR_NestedBase2() As String
Get
Return ResourceManager.GetString("ERR_NestedBase2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '#ExternalSource' directives cannot be nested..
'''</summary>
Friend ReadOnly Property ERR_NestedExternalSource() As String
Get
Return ResourceManager.GetString("ERR_NestedExternalSource", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Return type of nested function matching parameter '{0}' narrows from '{1}' to '{2}'..
'''</summary>
Friend ReadOnly Property ERR_NestedFunctionArgumentNarrowing3() As String
Get
Return ResourceManager.GetString("ERR_NestedFunctionArgumentNarrowing3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Global namespace may not be nested in another namespace..
'''</summary>
Friend ReadOnly Property ERR_NestedGlobalNamespace() As String
Get
Return ResourceManager.GetString("ERR_NestedGlobalNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nested type '{0}' cannot be embedded..
'''</summary>
Friend ReadOnly Property ERR_NestedInteropType() As String
Get
Return ResourceManager.GetString("ERR_NestedInteropType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' cannot reference its nested type '{1}' in Inherits clause..
'''</summary>
Friend ReadOnly Property ERR_NestedTypeInInheritsClause2() As String
Get
Return ResourceManager.GetString("ERR_NestedTypeInInheritsClause2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' does not inherit the generic type parameters of its container..
'''</summary>
Friend ReadOnly Property ERR_NestingViolatesCLS1() As String
Get
Return ResourceManager.GetString("ERR_NestingViolatesCLS1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Module name '{0}' stored in '{1}' must match its filename..
'''</summary>
Friend ReadOnly Property ERR_NetModuleNameMismatch() As String
Get
Return ResourceManager.GetString("ERR_NetModuleNameMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Module '{0}' is already defined in this assembly. Each module must have a unique filename..
'''</summary>
Friend ReadOnly Property ERR_NetModuleNameMustBeUnique() As String
Get
Return ResourceManager.GetString("ERR_NetModuleNameMustBeUnique", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' constraint and 'Structure' constraint cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_NewAndValueConstraintsCombined() As String
Get
Return ResourceManager.GetString("ERR_NewAndValueConstraintsCombined", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Arguments cannot be passed to a 'New' used on a type parameter..
'''</summary>
Friend ReadOnly Property ERR_NewArgsDisallowedForTypeParam() As String
Get
Return ResourceManager.GetString("ERR_NewArgsDisallowedForTypeParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub New' cannot handle events..
'''</summary>
Friend ReadOnly Property ERR_NewCannotHandleEvents() As String
Get
Return ResourceManager.GetString("ERR_NewCannotHandleEvents", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' cannot be used on a type parameter that does not have a 'New' constraint..
'''</summary>
Friend ReadOnly Property ERR_NewIfNullOnGenericParam() As String
Get
Return ResourceManager.GetString("ERR_NewIfNullOnGenericParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' cannot be used on an interface..
'''</summary>
Friend ReadOnly Property ERR_NewIfNullOnNonClass() As String
Get
Return ResourceManager.GetString("ERR_NewIfNullOnNonClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub New' cannot be declared in an interface..
'''</summary>
Friend ReadOnly Property ERR_NewInInterface() As String
Get
Return ResourceManager.GetString("ERR_NewInInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Structures cannot declare a non-shared 'Sub New' with no parameters..
'''</summary>
Friend ReadOnly Property ERR_NewInStruct() As String
Get
Return ResourceManager.GetString("ERR_NewInStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' cannot be used on a class that is declared 'MustInherit'..
'''</summary>
Friend ReadOnly Property ERR_NewOnAbstractClass() As String
Get
Return ResourceManager.GetString("ERR_NewOnAbstractClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'New' cannot be used with tuple type. Use a tuple literal expression instead..
'''</summary>
Friend ReadOnly Property ERR_NewWithTupleTypeSyntax() As String
Get
Return ResourceManager.GetString("ERR_NewWithTupleTypeSyntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Next control variable does not match For loop control variable '{0}'..
'''</summary>
Friend ReadOnly Property ERR_NextForMismatch1() As String
Get
Return ResourceManager.GetString("ERR_NextForMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Next' must be preceded by a matching 'For'..
'''</summary>
Friend ReadOnly Property ERR_NextNoMatchingFor() As String
Get
Return ResourceManager.GetString("ERR_NextNoMatchingFor", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' has no accessible 'Sub New' and cannot be inherited..
'''</summary>
Friend ReadOnly Property ERR_NoAccessibleConstructorOnBase() As String
Get
Return ResourceManager.GetString("ERR_NoAccessibleConstructorOnBase", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Get' accessor of property '{0}' is not accessible..
'''</summary>
Friend ReadOnly Property ERR_NoAccessibleGet() As String
Get
Return ResourceManager.GetString("ERR_NoAccessibleGet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Set' accessor of property '{0}' is not accessible..
'''</summary>
Friend ReadOnly Property ERR_NoAccessibleSet() As String
Get
Return ResourceManager.GetString("ERR_NoAccessibleSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot initialize the type '{0}' with a collection initializer because it does not have an accessible 'Add' method..
'''</summary>
Friend ReadOnly Property ERR_NoAddMethod1() As String
Get
Return ResourceManager.GetString("ERR_NoAddMethod1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no accessible '{0}' accepts this number of arguments..
'''</summary>
Friend ReadOnly Property ERR_NoArgumentCountOverloadCandidates1() As String
Get
Return ResourceManager.GetString("ERR_NoArgumentCountOverloadCandidates1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no accessible '{0}' can be called with these arguments:{1}.
'''</summary>
Friend ReadOnly Property ERR_NoCallableOverloadCandidates2() As String
Get
Return ResourceManager.GetString("ERR_NoCallableOverloadCandidates2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bounds can be specified only for the top-level array when initializing an array of arrays..
'''</summary>
Friend ReadOnly Property ERR_NoConstituentArraySizes() As String
Get
Return ResourceManager.GetString("ERR_NoConstituentArraySizes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' must declare a 'Sub New' because its base class '{1}' does not have an accessible 'Sub New' that can be called with no arguments..
'''</summary>
Friend ReadOnly Property ERR_NoConstructorOnBase2() As String
Get
Return ResourceManager.GetString("ERR_NoConstructorOnBase2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' cannot be indexed because it has no default property..
'''</summary>
Friend ReadOnly Property ERR_NoDefaultNotExtend1() As String
Get
Return ResourceManager.GetString("ERR_NoDefaultNotExtend1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegate '{0}' requires an 'AddressOf' expression or lambda expression as the only argument to its constructor..
'''</summary>
Friend ReadOnly Property ERR_NoDirectDelegateConstruction1() As String
Get
Return ResourceManager.GetString("ERR_NoDirectDelegateConstruction1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array bounds cannot appear in type specifiers..
'''</summary>
Friend ReadOnly Property ERR_NoExplicitArraySizes() As String
Get
Return ResourceManager.GetString("ERR_NoExplicitArraySizes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' is 'WriteOnly'..
'''</summary>
Friend ReadOnly Property ERR_NoGetProperty1() As String
Get
Return ResourceManager.GetString("ERR_NoGetProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Global' not allowed in this context; identifier expected..
'''</summary>
Friend ReadOnly Property ERR_NoGlobalExpectedIdentifier() As String
Get
Return ResourceManager.GetString("ERR_NoGlobalExpectedIdentifier", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Global' not allowed in handles; local name expected..
'''</summary>
Friend ReadOnly Property ERR_NoGlobalInHandles() As String
Get
Return ResourceManager.GetString("ERR_NoGlobalInHandles", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no accessible '{0}' is most specific for these arguments:{1}.
'''</summary>
Friend ReadOnly Property ERR_NoMostSpecificOverload2() As String
Get
Return ResourceManager.GetString("ERR_NoMostSpecificOverload2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot compile net modules when using /refout or /refonly..
'''</summary>
Friend ReadOnly Property ERR_NoNetModuleOutputWhenRefOutOrRefOnly() As String
Get
Return ResourceManager.GetString("ERR_NoNetModuleOutputWhenRefOutOrRefOnly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}' cannot be initialized in an object initializer expression because it is not a field or property..
'''</summary>
Friend ReadOnly Property ERR_NonFieldPropertyAggrMemberInit1() As String
Get
Return ResourceManager.GetString("ERR_NonFieldPropertyAggrMemberInit1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{1}' for the Imports '{0}' does not refer to a Namespace, Class, Structure, Enum or Module..
'''</summary>
Friend ReadOnly Property ERR_NonNamespaceOrClassOnImport2() As String
Get
Return ResourceManager.GetString("ERR_NonNamespaceOrClassOnImport2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' with no parameters cannot be found..
'''</summary>
Friend ReadOnly Property ERR_NoNonIndexProperty1() As String
Get
Return ResourceManager.GetString("ERR_NoNonIndexProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no accessible '{0}' can be called without a narrowing conversion:{1}.
'''</summary>
Friend ReadOnly Property ERR_NoNonNarrowingOverloadCandidates2() As String
Get
Return ResourceManager.GetString("ERR_NoNonNarrowingOverloadCandidates2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' must declare a 'Sub New' because the '{1}' in its base class '{2}' is marked obsolete..
'''</summary>
Friend ReadOnly Property ERR_NoNonObsoleteConstructorOnBase3() As String
Get
Return ResourceManager.GetString("ERR_NoNonObsoleteConstructorOnBase3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' must declare a 'Sub New' because the '{1}' in its base class '{2}' is marked obsolete: '{3}'..
'''</summary>
Friend ReadOnly Property ERR_NoNonObsoleteConstructorOnBase4() As String
Get
Return ResourceManager.GetString("ERR_NoNonObsoleteConstructorOnBase4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'AddressOf' cannot be applied to '{0}' because '{0}' is a partial method without an implementation..
'''</summary>
Friend ReadOnly Property ERR_NoPartialMethodInAddressOf1() As String
Get
Return ResourceManager.GetString("ERR_NoPartialMethodInAddressOf1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interop type '{0}' cannot be embedded because it is missing the required '{1}' attribute..
'''</summary>
Friend ReadOnly Property ERR_NoPIAAttributeMissing2() As String
Get
Return ResourceManager.GetString("ERR_NoPIAAttributeMissing2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Do not use refout when using refonly..
'''</summary>
Friend ReadOnly Property ERR_NoRefOutWhenRefOnly() As String
Get
Return ResourceManager.GetString("ERR_NoRefOutWhenRefOnly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to unable to open response file '{0}'.
'''</summary>
Friend ReadOnly Property ERR_NoResponseFile() As String
Get
Return ResourceManager.GetString("ERR_NoResponseFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' is 'ReadOnly'..
'''</summary>
Friend ReadOnly Property ERR_NoSetProperty1() As String
Get
Return ResourceManager.GetString("ERR_NoSetProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to no input sources specified.
'''</summary>
Friend ReadOnly Property ERR_NoSources() As String
Get
Return ResourceManager.GetString("ERR_NoSources", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to cannot infer an output file name from resource only input files; provide the '/out' option.
'''</summary>
Friend ReadOnly Property ERR_NoSourcesOut() As String
Get
Return ResourceManager.GetString("ERR_NoSourcesOut", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type argument '{0}' must have a public parameterless instance constructor to satisfy the 'New' constraint for type parameter '{1}'..
'''</summary>
Friend ReadOnly Property ERR_NoSuitableNewForNewConstraint2() As String
Get
Return ResourceManager.GetString("ERR_NoSuitableNewForNewConstraint2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of '{0}' cannot be inferred because the loop bounds and the step clause do not convert to the same type..
'''</summary>
Friend ReadOnly Property ERR_NoSuitableWidestType1() As String
Get
Return ResourceManager.GetString("ERR_NoSuitableWidestType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot initialize the type '{0}' with a collection initializer because it is not a collection type..
'''</summary>
Friend ReadOnly Property ERR_NotACollection1() As String
Get
Return ResourceManager.GetString("ERR_NotACollection1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Not most specific..
'''</summary>
Friend ReadOnly Property ERR_NotMostSpecificOverload() As String
Get
Return ResourceManager.GetString("ERR_NotMostSpecificOverload", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'NotOverridable' cannot be specified for methods that do not override another method..
'''</summary>
Friend ReadOnly Property ERR_NotOverridableRequiresOverrides() As String
Get
Return ResourceManager.GetString("ERR_NotOverridableRequiresOverrides", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no accessible '{0}' accepts this number of type arguments..
'''</summary>
Friend ReadOnly Property ERR_NoTypeArgumentCountOverloadCand1() As String
Get
Return ResourceManager.GetString("ERR_NoTypeArgumentCountOverloadCand1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type characters are not allowed on Imports aliases..
'''</summary>
Friend ReadOnly Property ERR_NoTypecharInAlias() As String
Get
Return ResourceManager.GetString("ERR_NoTypecharInAlias", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type characters are not allowed in label identifiers..
'''</summary>
Friend ReadOnly Property ERR_NoTypecharInLabel() As String
Get
Return ResourceManager.GetString("ERR_NoTypecharInLabel", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' must declare a 'Sub New' because its base class '{1}' has more than one accessible 'Sub New' that can be called with no arguments..
'''</summary>
Friend ReadOnly Property ERR_NoUniqueConstructorOnBase2() As String
Get
Return ResourceManager.GetString("ERR_NoUniqueConstructorOnBase2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overload resolution failed because no '{0}' is accessible..
'''</summary>
Friend ReadOnly Property ERR_NoViableOverloadCandidates1() As String
Get
Return ResourceManager.GetString("ERR_NoViableOverloadCandidates1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Handles clause requires a WithEvents variable defined in the containing type or one of its base types..
'''</summary>
Friend ReadOnly Property ERR_NoWithEventsVarOnHandlesList() As String
Get
Return ResourceManager.GetString("ERR_NoWithEventsVarOnHandlesList", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML axis properties do not support late binding..
'''</summary>
Friend ReadOnly Property ERR_NoXmlAxesLateBinding() As String
Get
Return ResourceManager.GetString("ERR_NoXmlAxesLateBinding", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' cannot be initialized in an object initializer expression because all accessible overloads require arguments..
'''</summary>
Friend ReadOnly Property ERR_NoZeroCountArgumentInitCandidates1() As String
Get
Return ResourceManager.GetString("ERR_NoZeroCountArgumentInitCandidates1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The '?' character cannot be used here..
'''</summary>
Friend ReadOnly Property ERR_NullableCharNotSupported() As String
Get
Return ResourceManager.GetString("ERR_NullableCharNotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.Nullable' does not satisfy the 'Structure' constraint for type parameter '{0}'. Only non-nullable 'Structure' types are allowed..
'''</summary>
Friend ReadOnly Property ERR_NullableDisallowedForStructConstr1() As String
Get
Return ResourceManager.GetString("ERR_NullableDisallowedForStructConstr1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable modifier cannot be used with a variable whose implicit type is 'Object'..
'''</summary>
Friend ReadOnly Property ERR_NullableImplicit() As String
Get
Return ResourceManager.GetString("ERR_NullableImplicit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable parameters must specify a type..
'''</summary>
Friend ReadOnly Property ERR_NullableParameterMustSpecifyType() As String
Get
Return ResourceManager.GetString("ERR_NullableParameterMustSpecifyType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Nullable type inference is not supported in this context..
'''</summary>
Friend ReadOnly Property ERR_NullableTypeInferenceNotSupported() As String
Get
Return ResourceManager.GetString("ERR_NullableTypeInferenceNotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to A null propagating operator cannot be converted into an expression tree..
'''</summary>
Friend ReadOnly Property ERR_NullPropagatingOpInExpressionTree() As String
Get
Return ResourceManager.GetString("ERR_NullPropagatingOpInExpressionTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Object initializers require a field name to initialize..
'''</summary>
Friend ReadOnly Property ERR_ObjectInitializerRequiresFieldName() As String
Get
Return ResourceManager.GetString("ERR_ObjectInitializerRequiresFieldName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference to a non-shared member requires an object reference..
'''</summary>
Friend ReadOnly Property ERR_ObjectReferenceNotSupplied() As String
Get
Return ResourceManager.GetString("ERR_ObjectReferenceNotSupplied", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method arguments must be enclosed in parentheses..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteArgumentsNeedParens() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteArgumentsNeedParens", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'As Any' is not supported in 'Declare' statements..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteAsAny() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteAsAny", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'EndIf' statements are no longer supported; use 'End If' instead..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteEndIf() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteEndIf", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'D' can no longer be used to indicate an exponent, use 'E' instead..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteExponent() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteExponent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Get' statements are no longer supported. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteGetStatement() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteGetStatement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'GoSub' statements are no longer supported..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteGosub() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteGosub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be applied to the 'AddHandler', 'RemoveHandler', or 'RaiseEvent' definitions. If required, apply the attribute directly to the event..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteInvalidOnEventMember() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteInvalidOnEventMember", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Let' and 'Set' assignment statements are no longer supported..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteLetSetNotNeeded() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteLetSetNotNeeded", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Labels that are numbers must be followed by colons..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteLineNumbersAreLabels() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteLineNumbersAreLabels", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Variant' is no longer a supported type; use the 'Object' type instead..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteObjectNotVariant() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteObjectNotVariant", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'On GoTo' and 'On GoSub' statements are no longer supported..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteOnGotoGosub() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteOnGotoGosub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Optional parameters must specify a default value..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteOptionalWithoutValue() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteOptionalWithoutValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property Get/Let/Set are no longer supported; use the new Property declaration syntax..
'''</summary>
Friend ReadOnly Property ERR_ObsoletePropertyGetLetSet() As String
Get
Return ResourceManager.GetString("ERR_ObsoletePropertyGetLetSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReDim' statements can no longer be used to declare array variables..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteRedimAs() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteRedimAs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Type' statements are no longer supported; use 'Structure' statements instead..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteStructureNotType() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteStructureNotType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Wend' statements are no longer supported; use 'End While' statements instead..
'''</summary>
Friend ReadOnly Property ERR_ObsoleteWhileWend() As String
Get
Return ResourceManager.GetString("ERR_ObsoleteWhileWend", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Of' required when specifying type arguments for a generic type or method..
'''</summary>
Friend ReadOnly Property ERR_OfExpected() As String
Get
Return ResourceManager.GetString("ERR_OfExpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Argument not specified for parameter '{0}'..
'''</summary>
Friend ReadOnly Property ERR_OmittedArgument1() As String
Get
Return ResourceManager.GetString("ERR_OmittedArgument1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Argument not specified for parameter '{0}' of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_OmittedArgument2() As String
Get
Return ResourceManager.GetString("ERR_OmittedArgument2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Argument not specified for parameter '{0}' of extension method '{1}' defined in '{2}'..
'''</summary>
Friend ReadOnly Property ERR_OmittedArgument3() As String
Get
Return ResourceManager.GetString("ERR_OmittedArgument3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Omitted argument cannot match a ParamArray parameter..
'''</summary>
Friend ReadOnly Property ERR_OmittedParamArrayArgument() As String
Get
Return ResourceManager.GetString("ERR_OmittedParamArrayArgument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' must have either one or two parameters..
'''</summary>
Friend ReadOnly Property ERR_OneOrTwoParametersRequired1() As String
Get
Return ResourceManager.GetString("ERR_OneOrTwoParametersRequired1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' must have one parameter..
'''</summary>
Friend ReadOnly Property ERR_OneParameterRequired1() As String
Get
Return ResourceManager.GetString("ERR_OneParameterRequired1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'On Error' statements are not valid within 'SyncLock' statements..
'''</summary>
Friend ReadOnly Property ERR_OnErrorInSyncLock() As String
Get
Return ResourceManager.GetString("ERR_OnErrorInSyncLock", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'On Error' statements are not valid within 'Using' statements..
'''</summary>
Friend ReadOnly Property ERR_OnErrorInUsing() As String
Get
Return ResourceManager.GetString("ERR_OnErrorInUsing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Array lower bounds can be only '0'..
'''</summary>
Friend ReadOnly Property ERR_OnlyNullLowerBound() As String
Get
Return ResourceManager.GetString("ERR_OnlyNullLowerBound", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Access modifier can only be applied to either 'Get' or 'Set', but not both..
'''</summary>
Friend ReadOnly Property ERR_OnlyOneAccessorForGetSet() As String
Get
Return ResourceManager.GetString("ERR_OnlyOneAccessorForGetSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method '{0}' cannot implement partial method '{1}' because '{2}' already implements it. Only one method can implement a partial method..
'''</summary>
Friend ReadOnly Property ERR_OnlyOneImplementingMethodAllowed3() As String
Get
Return ResourceManager.GetString("ERR_OnlyOneImplementingMethodAllowed3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method '{0}' cannot be declared 'Partial' because only one method '{1}' can be marked 'Partial'..
'''</summary>
Friend ReadOnly Property ERR_OnlyOnePartialMethodAllowed2() As String
Get
Return ResourceManager.GetString("ERR_OnlyOnePartialMethodAllowed2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Partial methods must be declared 'Private' instead of '{0}'..
'''</summary>
Friend ReadOnly Property ERR_OnlyPrivatePartialMethods1() As String
Get
Return ResourceManager.GetString("ERR_OnlyPrivatePartialMethods1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameters or types constructed with type parameters are not allowed in attribute arguments..
'''</summary>
Friend ReadOnly Property ERR_OpenTypeDisallowed() As String
Get
Return ResourceManager.GetString("ERR_OpenTypeDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operators cannot be declared in modules..
'''</summary>
Friend ReadOnly Property ERR_OperatorDeclaredInModule() As String
Get
Return ResourceManager.GetString("ERR_OperatorDeclaredInModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operators must be declared 'Public'..
'''</summary>
Friend ReadOnly Property ERR_OperatorMustBePublic() As String
Get
Return ResourceManager.GetString("ERR_OperatorMustBePublic", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operators must be declared 'Shared'..
'''</summary>
Friend ReadOnly Property ERR_OperatorMustBeShared() As String
Get
Return ResourceManager.GetString("ERR_OperatorMustBeShared", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator is not overloadable. Operator declaration must be one of: +, -, *, \, /, ^, &, Like, Mod, And, Or, Xor, Not, <<, >>, =, <>, <, <=, >, >=, CType, IsTrue, IsFalse..
'''</summary>
Friend ReadOnly Property ERR_OperatorNotOverloadable() As String
Get
Return ResourceManager.GetString("ERR_OperatorNotOverloadable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' must have a return type of Boolean..
'''</summary>
Friend ReadOnly Property ERR_OperatorRequiresBoolReturnType1() As String
Get
Return ResourceManager.GetString("ERR_OperatorRequiresBoolReturnType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' must have a second parameter of type 'Integer' or 'Integer?'..
'''</summary>
Friend ReadOnly Property ERR_OperatorRequiresIntegerParameter1() As String
Get
Return ResourceManager.GetString("ERR_OperatorRequiresIntegerParameter1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' parameters cannot be declared 'Optional'..
'''</summary>
Friend ReadOnly Property ERR_OptionalIllegal1() As String
Get
Return ResourceManager.GetString("ERR_OptionalIllegal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generic parameters used as optional parameter types must be class constrained..
'''</summary>
Friend ReadOnly Property ERR_OptionalsCantBeStructGenericParams() As String
Get
Return ResourceManager.GetString("ERR_OptionalsCantBeStructGenericParams", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option '{0}' must be an absolute path..
'''</summary>
Friend ReadOnly Property ERR_OptionMustBeAbsolutePath() As String
Get
Return ResourceManager.GetString("ERR_OptionMustBeAbsolutePath", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Option' statements must precede any declarations or 'Imports' statements..
'''</summary>
Friend ReadOnly Property ERR_OptionStmtWrongOrder() As String
Get
Return ResourceManager.GetString("ERR_OptionStmtWrongOrder", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Overflow..
'''</summary>
Friend ReadOnly Property ERR_Overflow() As String
Get
Return ResourceManager.GetString("ERR_Overflow", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' {0}.
'''</summary>
Friend ReadOnly Property ERR_OverloadCandidate1() As String
Get
Return ResourceManager.GetString("ERR_OverloadCandidate1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_OverloadCandidate2() As String
Get
Return ResourceManager.GetString("ERR_OverloadCandidate2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because they differ only by 'ReadOnly' or 'WriteOnly'..
'''</summary>
Friend ReadOnly Property ERR_OverloadingPropertyKind2() As String
Get
Return ResourceManager.GetString("ERR_OverloadingPropertyKind2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Inappropriate use of '{0}' keyword in a module..
'''</summary>
Friend ReadOnly Property ERR_OverloadsModifierInModule() As String
Get
Return ResourceManager.GetString("ERR_OverloadsModifierInModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because they differ only by parameters declared 'ParamArray'..
'''</summary>
Friend ReadOnly Property ERR_OverloadWithArrayVsParamArray2() As String
Get
Return ResourceManager.GetString("ERR_OverloadWithArrayVsParamArray2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because they differ only by parameters declared 'ByRef' or 'ByVal'..
'''</summary>
Friend ReadOnly Property ERR_OverloadWithByref2() As String
Get
Return ResourceManager.GetString("ERR_OverloadWithByref2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because they differ only by the default values of optional parameters..
'''</summary>
Friend ReadOnly Property ERR_OverloadWithDefault2() As String
Get
Return ResourceManager.GetString("ERR_OverloadWithDefault2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because they differ only by optional parameters..
'''</summary>
Friend ReadOnly Property ERR_OverloadWithOptional2() As String
Get
Return ResourceManager.GetString("ERR_OverloadWithOptional2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' and '{1}' cannot overload each other because they differ only by return types..
'''</summary>
Friend ReadOnly Property ERR_OverloadWithReturnType2() As String
Get
Return ResourceManager.GetString("ERR_OverloadWithReturnType2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}'.
'''</summary>
Friend ReadOnly Property ERR_OverriddenCandidate1() As String
Get
Return ResourceManager.GetString("ERR_OverriddenCandidate1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' cannot be declared 'Overrides' because it does not override a {0} in a base class..
'''</summary>
Friend ReadOnly Property ERR_OverrideNotNeeded3() As String
Get
Return ResourceManager.GetString("ERR_OverrideNotNeeded3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Methods declared 'Overrides' cannot be declared 'Overridable' because they are implicitly overridable..
'''</summary>
Friend ReadOnly Property ERR_OverridesImpliesOverridable() As String
Get
Return ResourceManager.GetString("ERR_OverridesImpliesOverridable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by parameters declared 'ParamArray'..
'''</summary>
Friend ReadOnly Property ERR_OverrideWithArrayVsParamArray2() As String
Get
Return ResourceManager.GetString("ERR_OverrideWithArrayVsParamArray2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by a parameter that is marked as 'ByRef' versus 'ByVal'..
'''</summary>
Friend ReadOnly Property ERR_OverrideWithByref2() As String
Get
Return ResourceManager.GetString("ERR_OverrideWithByref2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by type parameter constraints..
'''</summary>
Friend ReadOnly Property ERR_OverrideWithConstraintMismatch2() As String
Get
Return ResourceManager.GetString("ERR_OverrideWithConstraintMismatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by the default values of optional parameters..
'''</summary>
Friend ReadOnly Property ERR_OverrideWithDefault2() As String
Get
Return ResourceManager.GetString("ERR_OverrideWithDefault2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by optional parameters..
'''</summary>
Friend ReadOnly Property ERR_OverrideWithOptional2() As String
Get
Return ResourceManager.GetString("ERR_OverrideWithOptional2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by the types of optional parameters..
'''</summary>
Friend ReadOnly Property ERR_OverrideWithOptionalTypes2() As String
Get
Return ResourceManager.GetString("ERR_OverrideWithOptionalTypes2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by 'ReadOnly' or 'WriteOnly'..
'''</summary>
Friend ReadOnly Property ERR_OverridingPropertyKind2() As String
Get
Return ResourceManager.GetString("ERR_OverridingPropertyKind2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Argument cannot match a ParamArray parameter..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayArgumentMismatch() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayArgumentMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' parameters cannot be declared 'ParamArray'..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayIllegal1() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayIllegal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ParamArray parameters must be declared 'ByVal'..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayMustBeByVal() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayMustBeByVal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to End of parameter list expected. Cannot define parameters after a paramarray parameter..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayMustBeLast() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayMustBeLast", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ParamArray parameter must be an array..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayNotArray() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayNotArray", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ParamArray parameter must be a one-dimensional array..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayRank() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayRank", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method cannot have both a ParamArray and Optional parameters..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayWithOptArgs() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayWithOptArgs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ParamArray parameters must have an array type..
'''</summary>
Friend ReadOnly Property ERR_ParamArrayWrongType() As String
Get
Return ResourceManager.GetString("ERR_ParamArrayWrongType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The parameter has multiple distinct default values..
'''</summary>
Friend ReadOnly Property ERR_ParamDefaultValueDiffersFromAttribute() As String
Get
Return ResourceManager.GetString("ERR_ParamDefaultValueDiffersFromAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' cannot be initialized in an object initializer expression because it requires arguments..
'''</summary>
Friend ReadOnly Property ERR_ParameterizedPropertyInAggrInit1() As String
Get
Return ResourceManager.GetString("ERR_ParameterizedPropertyInAggrInit1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter not valid for the specified unmanaged type..
'''</summary>
Friend ReadOnly Property ERR_ParameterNotValidForType() As String
Get
Return ResourceManager.GetString("ERR_ParameterNotValidForType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter cannot have the same name as its defining function..
'''</summary>
Friend ReadOnly Property ERR_ParamNameFunctionNameCollision() As String
Get
Return ResourceManager.GetString("ERR_ParamNameFunctionNameCollision", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to All parameters must be explicitly typed if any of them are explicitly typed..
'''</summary>
Friend ReadOnly Property ERR_ParamTypingInconsistency() As String
Get
Return ResourceManager.GetString("ERR_ParamTypingInconsistency", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Partial method '{0}' cannot use the 'Implements' keyword..
'''</summary>
Friend ReadOnly Property ERR_PartialDeclarationImplements1() As String
Get
Return ResourceManager.GetString("ERR_PartialDeclarationImplements1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Optional parameter of a method '{0}' does not have the same default value as the corresponding parameter of the partial method '{1}'..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodDefaultParameterValueMismatch2() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodDefaultParameterValueMismatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method '{0}' does not have the same generic constraints as the partial method '{1}'..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodGenericConstraints2() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodGenericConstraints2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Partial methods must have empty method bodies..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodMustBeEmpty() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodMustBeEmpty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter of a method '{0}' differs by ParamArray modifier from the corresponding parameter of the partial method '{1}'..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodParamArrayMismatch2() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodParamArrayMismatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter name '{0}' does not match the name of the corresponding parameter, '{1}', defined on the partial method declaration '{2}'..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodParamNamesMustMatch3() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodParamNamesMustMatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Partial methods must be declared 'Private'..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodsMustBePrivate() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodsMustBePrivate", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be declared 'Partial' because partial methods must be Subs..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodsMustBeSub1() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodsMustBeSub1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be declared 'Partial' because it has the 'Async' modifier..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodsMustNotBeAsync1() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodsMustNotBeAsync1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name of type parameter '{0}' does not match '{1}', the corresponding type parameter defined on the partial method declaration '{2}'..
'''</summary>
Friend ReadOnly Property ERR_PartialMethodTypeParamNameMismatch3() As String
Get
Return ResourceManager.GetString("ERR_PartialMethodTypeParamNameMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Specified access '{0}' for '{1}' does not match the access '{2}' specified on one of its other partial types..
'''</summary>
Friend ReadOnly Property ERR_PartialTypeAccessMismatch3() As String
Get
Return ResourceManager.GetString("ERR_PartialTypeAccessMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MustInherit' cannot be specified for partial type '{0}' because it cannot be combined with 'NotInheritable' specified for one of its other partial types..
'''</summary>
Friend ReadOnly Property ERR_PartialTypeBadMustInherit1() As String
Get
Return ResourceManager.GetString("ERR_PartialTypeBadMustInherit1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constraints for this type parameter do not match the constraints on the corresponding type parameter defined on one of the other partial types of '{0}'..
'''</summary>
Friend ReadOnly Property ERR_PartialTypeConstraintMismatch1() As String
Get
Return ResourceManager.GetString("ERR_PartialTypeConstraintMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter name '{0}' does not match the name '{1}' of the corresponding type parameter defined on one of the other partial types of '{2}'..
'''</summary>
Friend ReadOnly Property ERR_PartialTypeTypeParamNameMismatch3() As String
Get
Return ResourceManager.GetString("ERR_PartialTypeTypeParamNameMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Failure writing debug information: {0}.
'''</summary>
Friend ReadOnly Property ERR_PDBWritingFailed() As String
Get
Return ResourceManager.GetString("ERR_PDBWritingFailed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error reading file '{0}' specified for the named argument '{1}' for PermissionSet attribute: '{2}'..
'''</summary>
Friend ReadOnly Property ERR_PermissionSetAttributeFileReadError() As String
Get
Return ResourceManager.GetString("ERR_PermissionSetAttributeFileReadError", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to resolve file path '{0}' specified for the named argument '{1}' for PermissionSet attribute..
'''</summary>
Friend ReadOnly Property ERR_PermissionSetAttributeInvalidFile() As String
Get
Return ResourceManager.GetString("ERR_PermissionSetAttributeInvalidFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An error occurred while writing the output file: {0}.
'''</summary>
Friend ReadOnly Property ERR_PeWritingFailure() As String
Get
Return ResourceManager.GetString("ERR_PeWritingFailure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot embed interop types from assembly '{0}' because it is missing the '{1}' attribute..
'''</summary>
Friend ReadOnly Property ERR_PIAHasNoAssemblyGuid1() As String
Get
Return ResourceManager.GetString("ERR_PIAHasNoAssemblyGuid1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot embed interop types from assembly '{0}' because it is missing either the '{1}' attribute or the '{2}' attribute..
'''</summary>
Friend ReadOnly Property ERR_PIAHasNoTypeLibAttribute1() As String
Get
Return ResourceManager.GetString("ERR_PIAHasNoTypeLibAttribute1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} is not supported in current project type..
'''</summary>
Friend ReadOnly Property ERR_PlatformDoesntSupport() As String
Get
Return ResourceManager.GetString("ERR_PlatformDoesntSupport", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Predefined type '{0}' must be a structure..
'''</summary>
Friend ReadOnly Property ERR_PredefinedValueTupleTypeMustBeStruct() As String
Get
Return ResourceManager.GetString("ERR_PredefinedValueTupleTypeMustBeStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to SecurityAction value '{0}' is invalid for PrincipalPermission attribute..
'''</summary>
Friend ReadOnly Property ERR_PrincipalPermissionInvalidAction() As String
Get
Return ResourceManager.GetString("ERR_PrincipalPermissionInvalidAction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Types declared 'Private' must be inside another type..
'''</summary>
Friend ReadOnly Property ERR_PrivateTypeOutsideType() As String
Get
Return ResourceManager.GetString("ERR_PrivateTypeOutsideType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property access must assign to the property or use its value..
'''</summary>
Friend ReadOnly Property ERR_PropertyAccessIgnored() As String
Get
Return ResourceManager.GetString("ERR_PropertyAccessIgnored", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be implemented by a {1} property..
'''</summary>
Friend ReadOnly Property ERR_PropertyDoesntImplementAllAccessors() As String
Get
Return ResourceManager.GetString("ERR_PropertyDoesntImplementAllAccessors", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has the same name as a member used for type '{1}' exposed in a 'My' group. Rename the type or its enclosing namespace..
'''</summary>
Friend ReadOnly Property ERR_PropertyNameConflictInMyCollection() As String
Get
Return ResourceManager.GetString("ERR_PropertyNameConflictInMyCollection", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Field or property '{0}' is not found..
'''</summary>
Friend ReadOnly Property ERR_PropertyOrFieldNotDefined1() As String
Get
Return ResourceManager.GetString("ERR_PropertyOrFieldNotDefined1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property parameters cannot have the name 'Value'..
'''</summary>
Friend ReadOnly Property ERR_PropertySetParamCollisionWithValue() As String
Get
Return ResourceManager.GetString("ERR_PropertySetParamCollisionWithValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property without a 'ReadOnly' or 'WriteOnly' specifier must provide both a 'Get' and a 'Set'..
'''</summary>
Friend ReadOnly Property ERR_PropMustHaveGetSet() As String
Get
Return ResourceManager.GetString("ERR_PropMustHaveGetSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Protected types can only be declared inside of a class..
'''</summary>
Friend ReadOnly Property ERR_ProtectedTypeOutsideClass() As String
Get
Return ResourceManager.GetString("ERR_ProtectedTypeOutsideClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error extracting public key from container '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_PublicKeyContainerFailure() As String
Get
Return ResourceManager.GetString("ERR_PublicKeyContainerFailure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Error extracting public key from file '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_PublicKeyFileFailure() As String
Get
Return ResourceManager.GetString("ERR_PublicKeyFileFailure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Public signing is not supported for netmodules..
'''</summary>
Friend ReadOnly Property ERR_PublicSignNetModule() As String
Get
Return ResourceManager.GetString("ERR_PublicSignNetModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Public sign was specified and requires a public key, but no public key was specified.
'''</summary>
Friend ReadOnly Property ERR_PublicSignNoKey() As String
Get
Return ResourceManager.GetString("ERR_PublicSignNoKey", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ':' is not allowed. XML qualified names cannot be used in this context..
'''</summary>
Friend ReadOnly Property ERR_QualifiedNameNotAllowed() As String
Get
Return ResourceManager.GetString("ERR_QualifiedNameNotAllowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '!' requires its left operand to have a type parameter, class or interface type, but this operand has the type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_QualNotObjectRecord1() As String
Get
Return ResourceManager.GetString("ERR_QualNotObjectRecord1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable name cannot be inferred from an XML identifier that is not a valid Visual Basic identifier..
'''</summary>
Friend ReadOnly Property ERR_QueryAnonTypeFieldXMLNameInference() As String
Get
Return ResourceManager.GetString("ERR_QueryAnonTypeFieldXMLNameInference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type characters cannot be used in range variable declarations..
'''</summary>
Friend ReadOnly Property ERR_QueryAnonymousTypeDisallowsTypeChar() As String
Get
Return ResourceManager.GetString("ERR_QueryAnonymousTypeDisallowsTypeChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable name can be inferred only from a simple or qualified name with no arguments..
'''</summary>
Friend ReadOnly Property ERR_QueryAnonymousTypeFieldNameInference() As String
Get
Return ResourceManager.GetString("ERR_QueryAnonymousTypeFieldNameInference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable '{0}' is already declared..
'''</summary>
Friend ReadOnly Property ERR_QueryDuplicateAnonTypeMemberName1() As String
Get
Return ResourceManager.GetString("ERR_QueryDuplicateAnonTypeMemberName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable name cannot match the name of a member of the 'Object' class..
'''</summary>
Friend ReadOnly Property ERR_QueryInvalidControlVariableName1() As String
Get
Return ResourceManager.GetString("ERR_QueryInvalidControlVariableName1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name '{0}' is either not declared or not in the current scope..
'''</summary>
Friend ReadOnly Property ERR_QueryNameNotDeclared() As String
Get
Return ResourceManager.GetString("ERR_QueryNameNotDeclared", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Definition of method '{0}' is not accessible in this context..
'''</summary>
Friend ReadOnly Property ERR_QueryOperatorNotFound() As String
Get
Return ResourceManager.GetString("ERR_QueryOperatorNotFound", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of the range variable cannot be inferred, and late binding is not allowed with Option Strict on. Use an 'As' clause to specify the type..
'''</summary>
Friend ReadOnly Property ERR_QueryStrictDisallowImplicitObject() As String
Get
Return ResourceManager.GetString("ERR_QueryStrictDisallowImplicitObject", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Embedded expression cannot appear inside a quoted attribute value. Try removing quotes..
'''</summary>
Friend ReadOnly Property ERR_QuotedEmbeddedExpression() As String
Get
Return ResourceManager.GetString("ERR_QuotedEmbeddedExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'RaiseEvent' method must have the same signature as the containing event's delegate type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_RaiseEventShapeMismatch1() As String
Get
Return ResourceManager.GetString("ERR_RaiseEventShapeMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' variable cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_ReadOnlyAssignment() As String
Get
Return ResourceManager.GetString("ERR_ReadOnlyAssignment", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' property must provide a 'Get'..
'''</summary>
Friend ReadOnly Property ERR_ReadOnlyHasNoGet() As String
Get
Return ResourceManager.GetString("ERR_ReadOnlyHasNoGet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Properties declared 'ReadOnly' cannot have a 'Set'..
'''</summary>
Friend ReadOnly Property ERR_ReadOnlyHasSet() As String
Get
Return ResourceManager.GetString("ERR_ReadOnlyHasSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' variable cannot be the target of an assignment in a lambda expression inside a constructor..
'''</summary>
Friend ReadOnly Property ERR_ReadOnlyInClosure() As String
Get
Return ResourceManager.GetString("ERR_ReadOnlyInClosure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' properties cannot have an access modifier on 'Get'..
'''</summary>
Friend ReadOnly Property ERR_ReadOnlyNoAccessorFlag() As String
Get
Return ResourceManager.GetString("ERR_ReadOnlyNoAccessorFlag", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReadOnly' property '{0}' cannot be the target of an assignment..
'''</summary>
Friend ReadOnly Property ERR_ReadOnlyProperty1() As String
Get
Return ResourceManager.GetString("ERR_ReadOnlyProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Structure '{0}' cannot contain an instance of itself: {1}.
'''</summary>
Friend ReadOnly Property ERR_RecordCycle2() As String
Get
Return ResourceManager.GetString("ERR_RecordCycle2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}' contains '{1}' (variable '{2}')..
'''</summary>
Friend ReadOnly Property ERR_RecordEmbeds2() As String
Get
Return ResourceManager.GetString("ERR_RecordEmbeds2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReDim' statements require a parenthesized list of the new bounds of each dimension of the array..
'''</summary>
Friend ReadOnly Property ERR_RedimNoSizes() As String
Get
Return ResourceManager.GetString("ERR_RedimNoSizes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'ReDim' cannot change the number of dimensions of an array..
'''</summary>
Friend ReadOnly Property ERR_RedimRankMismatch() As String
Get
Return ResourceManager.GetString("ERR_RedimRankMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Class' constraint and a specific class type constraint cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_RefAndClassTypeConstrCombined() As String
Get
Return ResourceManager.GetString("ERR_RefAndClassTypeConstrCombined", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Class' constraint and 'Structure' constraint cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_RefAndValueConstraintsCombined() As String
Get
Return ResourceManager.GetString("ERR_RefAndValueConstraintsCombined", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' is not defined for types '{1}' and '{2}'. Use 'Is' operator to compare two reference types..
'''</summary>
Friend ReadOnly Property ERR_ReferenceComparison3() As String
Get
Return ResourceManager.GetString("ERR_ReferenceComparison3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to #R is only allowed in scripts.
'''</summary>
Friend ReadOnly Property ERR_ReferenceDirectiveOnlyAllowedInScripts() As String
Get
Return ResourceManager.GetString("ERR_ReferenceDirectiveOnlyAllowedInScripts", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An expression tree may not contain a call to a method or property that returns by reference..
'''</summary>
Friend ReadOnly Property ERR_RefReturningCallInExpressionTree() As String
Get
Return ResourceManager.GetString("ERR_RefReturningCallInExpressionTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}.{1}' is already implemented by the base class '{2}'. Re-implementation of Windows Runtime Interface '{3}' is not allowed.
'''</summary>
Friend ReadOnly Property ERR_ReImplementingWinRTInterface4() As String
Get
Return ResourceManager.GetString("ERR_ReImplementingWinRTInterface4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}.{1}' from 'implements {2}' is already implemented by the base class '{3}'. Re-implementation of Windows Runtime Interface '{4}' is not allowed.
'''</summary>
Friend ReadOnly Property ERR_ReImplementingWinRTInterface5() As String
Get
Return ResourceManager.GetString("ERR_ReImplementingWinRTInterface5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to In a Windows Runtime event, the type of the 'RemoveHandler' method parameter must be 'EventRegistrationToken'.
'''</summary>
Friend ReadOnly Property ERR_RemoveParamWrongForWinRT() As String
Get
Return ResourceManager.GetString("ERR_RemoveParamWrongForWinRT", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion from '{0}' to '{1}' cannot occur in a constant expression used as an argument to an attribute..
'''</summary>
Friend ReadOnly Property ERR_RequiredAttributeConstConversion2() As String
Get
Return ResourceManager.GetString("ERR_RequiredAttributeConstConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion from '{0}' to '{1}' cannot occur in a constant expression..
'''</summary>
Friend ReadOnly Property ERR_RequiredConstConversion2() As String
Get
Return ResourceManager.GetString("ERR_RequiredConstConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constant expression is required..
'''</summary>
Friend ReadOnly Property ERR_RequiredConstExpr() As String
Get
Return ResourceManager.GetString("ERR_RequiredConstExpr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' must be a call to 'MyBase.New' or 'MyClass.New' because base class '{0}' of '{1}' does not have an accessible 'Sub New' that can be called with no arguments..
'''</summary>
Friend ReadOnly Property ERR_RequiredNewCall2() As String
Get
Return ResourceManager.GetString("ERR_RequiredNewCall2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' must be a call to 'MyBase.New' or 'MyClass.New' because base class '{0}' of '{1}' has more than one accessible 'Sub New' that can be called with no arguments..
'''</summary>
Friend ReadOnly Property ERR_RequiredNewCallTooMany2() As String
Get
Return ResourceManager.GetString("ERR_RequiredNewCallTooMany2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' must be an explicit call to 'MyBase.New' or 'MyClass.New' because the '{0}' in the base class '{1}' of '{2}' is marked obsolete..
'''</summary>
Friend ReadOnly Property ERR_RequiredNonObsoleteNewCall3() As String
Get
Return ResourceManager.GetString("ERR_RequiredNonObsoleteNewCall3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' must be an explicit call to 'MyBase.New' or 'MyClass.New' because the '{0}' in the base class '{1}' of '{2}' is marked obsolete: '{3}'..
'''</summary>
Friend ReadOnly Property ERR_RequiredNonObsoleteNewCall4() As String
Get
Return ResourceManager.GetString("ERR_RequiredNonObsoleteNewCall4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The assembly name '{0}' is reserved and cannot be used as a reference in an interactive session.
'''</summary>
Friend ReadOnly Property ERR_ReservedAssemblyName() As String
Get
Return ResourceManager.GetString("ERR_ReservedAssemblyName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Prefix '{0}' cannot be bound to namespace name reserved for '{1}'..
'''</summary>
Friend ReadOnly Property ERR_ReservedXmlNamespace() As String
Get
Return ResourceManager.GetString("ERR_ReservedXmlNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML namespace prefix '{0}' is reserved for use by XML and the namespace URI cannot be changed..
'''</summary>
Friend ReadOnly Property ERR_ReservedXmlPrefix() As String
Get
Return ResourceManager.GetString("ERR_ReservedXmlPrefix", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot link resource files when building a module.
'''</summary>
Friend ReadOnly Property ERR_ResourceInModule() As String
Get
Return ResourceManager.GetString("ERR_ResourceInModule", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression has the type '{0}' which is a restricted type and cannot be used to access members inherited from 'Object' or 'ValueType'..
'''</summary>
Friend ReadOnly Property ERR_RestrictedAccess() As String
Get
Return ResourceManager.GetString("ERR_RestrictedAccess", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression of type '{0}' cannot be converted to 'Object' or 'ValueType'..
'''</summary>
Friend ReadOnly Property ERR_RestrictedConversion1() As String
Get
Return ResourceManager.GetString("ERR_RestrictedConversion1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be used as a parameter type for an Iterator or Async method..
'''</summary>
Friend ReadOnly Property ERR_RestrictedResumableType1() As String
Get
Return ResourceManager.GetString("ERR_RestrictedResumableType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be made nullable, and cannot be used as the data type of an array element, field, anonymous type member, type argument, 'ByRef' parameter, or return statement..
'''</summary>
Friend ReadOnly Property ERR_RestrictedType1() As String
Get
Return ResourceManager.GetString("ERR_RestrictedType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambdas with the 'Async' or 'Iterator' modifiers cannot be converted to expression trees..
'''</summary>
Friend ReadOnly Property ERR_ResumableLambdaInExpressionTree() As String
Get
Return ResourceManager.GetString("ERR_ResumableLambdaInExpressionTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'On Error' and 'Resume' cannot appear inside async or iterator methods..
'''</summary>
Friend ReadOnly Property ERR_ResumablesCannotContainOnError() As String
Get
Return ResourceManager.GetString("ERR_ResumablesCannotContainOnError", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Return' statement in a Sub or a Set cannot return a value..
'''</summary>
Friend ReadOnly Property ERR_ReturnFromNonFunction() As String
Get
Return ResourceManager.GetString("ERR_ReturnFromNonFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Return' statements in this Async method cannot return a value since the return type of the function is 'Task'. Consider changing the function's return type to 'Task(Of T)'..
'''</summary>
Friend ReadOnly Property ERR_ReturnFromNonGenericTaskAsync() As String
Get
Return ResourceManager.GetString("ERR_ReturnFromNonGenericTaskAsync", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Return' statement in a Function, Get, or Operator must return a value..
'''</summary>
Friend ReadOnly Property ERR_ReturnWithoutValue() As String
Get
Return ResourceManager.GetString("ERR_ReturnWithoutValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}' cannot be found in class '{1}'. This condition is usually the result of a mismatched 'Microsoft.VisualBasic.dll'..
'''</summary>
Friend ReadOnly Property ERR_RuntimeMemberNotFound2() As String
Get
Return ResourceManager.GetString("ERR_RuntimeMemberNotFound2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Security attribute '{0}' has an invalid SecurityAction value '{1}'..
'''</summary>
Friend ReadOnly Property ERR_SecurityAttributeInvalidAction() As String
Get
Return ResourceManager.GetString("ERR_SecurityAttributeInvalidAction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to SecurityAction value '{0}' is invalid for security attributes applied to an assembly..
'''</summary>
Friend ReadOnly Property ERR_SecurityAttributeInvalidActionAssembly() As String
Get
Return ResourceManager.GetString("ERR_SecurityAttributeInvalidActionAssembly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to SecurityAction value '{0}' is invalid for security attributes applied to a type or a method..
'''</summary>
Friend ReadOnly Property ERR_SecurityAttributeInvalidActionTypeOrMethod() As String
Get
Return ResourceManager.GetString("ERR_SecurityAttributeInvalidActionTypeOrMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Security attribute '{0}' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations..
'''</summary>
Friend ReadOnly Property ERR_SecurityAttributeInvalidTarget() As String
Get
Return ResourceManager.GetString("ERR_SecurityAttributeInvalidTarget", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First argument to a security attribute must be a valid SecurityAction..
'''</summary>
Friend ReadOnly Property ERR_SecurityAttributeMissingAction() As String
Get
Return ResourceManager.GetString("ERR_SecurityAttributeMissingAction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Security attribute '{0}' cannot be applied to an Async or Iterator method..
'''</summary>
Friend ReadOnly Property ERR_SecurityCriticalAsync() As String
Get
Return ResourceManager.GetString("ERR_SecurityCriticalAsync", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Async and Iterator methods are not allowed in a [Class|Structure|Interface|Module] that has the 'SecurityCritical' or 'SecuritySafeCritical' attribute..
'''</summary>
Friend ReadOnly Property ERR_SecurityCriticalAsyncInClassOrStruct() As String
Get
Return ResourceManager.GetString("ERR_SecurityCriticalAsyncInClassOrStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Set' method cannot have more than one parameter..
'''</summary>
Friend ReadOnly Property ERR_SetHasOnlyOneParam() As String
Get
Return ResourceManager.GetString("ERR_SetHasOnlyOneParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Set' parameter cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_SetHasToBeByVal1() As String
Get
Return ResourceManager.GetString("ERR_SetHasToBeByVal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Set' parameter must have the same type as the containing property..
'''</summary>
Friend ReadOnly Property ERR_SetValueNotPropertyType() As String
Get
Return ResourceManager.GetString("ERR_SetValueNotPropertyType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has the same name as a type parameter..
'''</summary>
Friend ReadOnly Property ERR_ShadowingGenericParamWithMember1() As String
Get
Return ResourceManager.GetString("ERR_ShadowingGenericParamWithMember1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be declared 'Shadows' outside of a class, structure, or interface..
'''</summary>
Friend ReadOnly Property ERR_ShadowingTypeOutsideClass1() As String
Get
Return ResourceManager.GetString("ERR_ShadowingTypeOutsideClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Shared 'Sub New' cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_SharedConstructorIllegalSpec1() As String
Get
Return ResourceManager.GetString("ERR_SharedConstructorIllegalSpec1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Shared 'Sub New' cannot have any parameters..
'''</summary>
Friend ReadOnly Property ERR_SharedConstructorWithParams() As String
Get
Return ResourceManager.GetString("ERR_SharedConstructorWithParams", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Events of shared WithEvents variables cannot be handled by non-shared methods..
'''</summary>
Friend ReadOnly Property ERR_SharedEventNeedsSharedHandler() As String
Get
Return ResourceManager.GetString("ERR_SharedEventNeedsSharedHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member '{0}' cannot be initialized in an object initializer expression because it is shared..
'''</summary>
Friend ReadOnly Property ERR_SharedMemberAggrMemberInit1() As String
Get
Return ResourceManager.GetString("ERR_SharedMemberAggrMemberInit1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Methods or events that implement interface members cannot be declared 'Shared'..
'''</summary>
Friend ReadOnly Property ERR_SharedOnProcThatImpl() As String
Get
Return ResourceManager.GetString("ERR_SharedOnProcThatImpl", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Non-shared members in a Structure cannot be declared 'New'..
'''</summary>
Friend ReadOnly Property ERR_SharedStructMemberCannotSpecifyNew() As String
Get
Return ResourceManager.GetString("ERR_SharedStructMemberCannotSpecifyNew", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Key file '{0}' is missing the private key needed for signing..
'''</summary>
Friend ReadOnly Property ERR_SignButNoPrivateKey() As String
Get
Return ResourceManager.GetString("ERR_SignButNoPrivateKey", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' has an invalid source interface which is required to embed event '{1}'..
'''</summary>
Friend ReadOnly Property ERR_SourceInterfaceMustBeInterface() As String
Get
Return ResourceManager.GetString("ERR_SourceInterfaceMustBeInterface", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to /sourcelink switch is only supported when emitting PDB..
'''</summary>
Friend ReadOnly Property ERR_SourceLinkRequiresPdb() As String
Get
Return ResourceManager.GetString("ERR_SourceLinkRequiresPdb", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Specifiers and attributes are not valid on this statement..
'''</summary>
Friend ReadOnly Property ERR_SpecifiersInvalidOnInheritsImplOpt() As String
Get
Return ResourceManager.GetString("ERR_SpecifiersInvalidOnInheritsImplOpt", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Specifiers are not valid on 'AddHandler', 'RemoveHandler' and 'RaiseEvent' methods..
'''</summary>
Friend ReadOnly Property ERR_SpecifiersInvOnEventMethod() As String
Get
Return ResourceManager.GetString("ERR_SpecifiersInvOnEventMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement..
'''</summary>
Friend ReadOnly Property ERR_StandaloneAttribute() As String
Get
Return ResourceManager.GetString("ERR_StandaloneAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected quoted XML attribute value or embedded expression..
'''</summary>
Friend ReadOnly Property ERR_StartAttributeValue() As String
Get
Return ResourceManager.GetString("ERR_StartAttributeValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub Main' was not found in '{0}'..
'''</summary>
Friend ReadOnly Property ERR_StartupCodeNotFound1() As String
Get
Return ResourceManager.GetString("ERR_StartupCodeNotFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement lambdas cannot be converted to expression trees..
'''</summary>
Friend ReadOnly Property ERR_StatementLambdaInExpressionTree() As String
Get
Return ResourceManager.GetString("ERR_StatementLambdaInExpressionTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'System.STAThreadAttribute' and 'System.MTAThreadAttribute' cannot both be applied to the same method..
'''</summary>
Friend ReadOnly Property ERR_STAThreadAndMTAThread0() As String
Get
Return ResourceManager.GetString("ERR_STAThreadAndMTAThread0", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Static local variables cannot be declared inside lambda expressions..
'''</summary>
Friend ReadOnly Property ERR_StaticInLambda() As String
Get
Return ResourceManager.GetString("ERR_StaticInLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On disallows narrowing from type '{1}' to type '{2}' in copying the value of 'ByRef' parameter '{0}' back to the matching argument..
'''</summary>
Friend ReadOnly Property ERR_StrictArgumentCopyBackNarrowing3() As String
Get
Return ResourceManager.GetString("ERR_StrictArgumentCopyBackNarrowing3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On requires all variable declarations to have an 'As' clause..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowImplicitObject() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowImplicitObject", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On requires each lambda expression parameter to be declared with an 'As' clause if its type cannot be inferred..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowImplicitObjectLambda() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowImplicitObjectLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On requires that all method parameters have an 'As' clause..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowsImplicitArgs() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowsImplicitArgs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On requires all Function, Property, and Operator declarations to have an 'As' clause..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowsImplicitProc() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowsImplicitProc", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On disallows late binding..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowsLateBinding() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowsLateBinding", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On disallows operands of type Object for operator '{0}'. Use the 'Is' operator to test for object identity..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowsObjectComparison1() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowsObjectComparison1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option Strict On prohibits operands of type Object for operator '{0}'..
'''</summary>
Friend ReadOnly Property ERR_StrictDisallowsObjectOperand1() As String
Get
Return ResourceManager.GetString("ERR_StrictDisallowsObjectOperand1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Structures cannot have 'Inherits' statements..
'''</summary>
Friend ReadOnly Property ERR_StructCantInherit() As String
Get
Return ResourceManager.GetString("ERR_StructCantInherit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Declare' statements in a structure cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_StructCantUseDLLDeclareSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_StructCantUseDLLDeclareSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Members in a Structure cannot be declared '{0}'..
'''</summary>
Friend ReadOnly Property ERR_StructCantUseVarSpecifier1() As String
Get
Return ResourceManager.GetString("ERR_StructCantUseVarSpecifier1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute 'StructLayout' cannot be applied to a generic type..
'''</summary>
Friend ReadOnly Property ERR_StructLayoutAttributeNotAllowed() As String
Get
Return ResourceManager.GetString("ERR_StructLayoutAttributeNotAllowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Methods declared in structures cannot have 'Handles' clauses..
'''</summary>
Friend ReadOnly Property ERR_StructsCannotHandleEvents() As String
Get
Return ResourceManager.GetString("ERR_StructsCannotHandleEvents", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method in a structure cannot be declared 'Protected', 'Protected Friend', or 'Private Protected'..
'''</summary>
Friend ReadOnly Property ERR_StructureCantUseProtected() As String
Get
Return ResourceManager.GetString("ERR_StructureCantUseProtected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Structure '{0}' cannot be indexed because it has no default property..
'''</summary>
Friend ReadOnly Property ERR_StructureNoDefault1() As String
Get
Return ResourceManager.GetString("ERR_StructureNoDefault1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is a structure type and cannot be used as an expression..
'''</summary>
Friend ReadOnly Property ERR_StructureNotExpression1() As String
Get
Return ResourceManager.GetString("ERR_StructureNotExpression1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement is not valid inside a single-line statement lambda..
'''</summary>
Friend ReadOnly Property ERR_SubDisallowsStatement() As String
Get
Return ResourceManager.GetString("ERR_SubDisallowsStatement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constructor '{0}' cannot call itself: {1}.
'''</summary>
Friend ReadOnly Property ERR_SubNewCycle1() As String
Get
Return ResourceManager.GetString("ERR_SubNewCycle1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' '{0}' calls '{1}'..
'''</summary>
Friend ReadOnly Property ERR_SubNewCycle2() As String
Get
Return ResourceManager.GetString("ERR_SubNewCycle2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This single-line statement lambda must be enclosed in parentheses. For example: (Sub() <statement>)!key.
'''</summary>
Friend ReadOnly Property ERR_SubRequiresParenthesesBang() As String
Get
Return ResourceManager.GetString("ERR_SubRequiresParenthesesBang", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This single-line statement lambda must be enclosed in parentheses. For example: (Sub() <statement>).Invoke().
'''</summary>
Friend ReadOnly Property ERR_SubRequiresParenthesesDot() As String
Get
Return ResourceManager.GetString("ERR_SubRequiresParenthesesDot", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This single-line statement lambda must be enclosed in parentheses. For example: Call (Sub() <statement>) ().
'''</summary>
Friend ReadOnly Property ERR_SubRequiresParenthesesLParen() As String
Get
Return ResourceManager.GetString("ERR_SubRequiresParenthesesLParen", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Single-line statement lambdas must include exactly one statement..
'''</summary>
Friend ReadOnly Property ERR_SubRequiresSingleStatement() As String
Get
Return ResourceManager.GetString("ERR_SubRequiresSingleStatement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to option '{0}' can be followed only by '+' or '-'.
'''</summary>
Friend ReadOnly Property ERR_SwitchNeedsBool() As String
Get
Return ResourceManager.GetString("ERR_SwitchNeedsBool", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The project currently contains references to more than one version of '{0}', a direct reference to version {2} and an indirect reference to version {1}. Change the direct reference to use version {1} (or higher) of {0}..
'''</summary>
Friend ReadOnly Property ERR_SxSIndirectRefHigherThanDirectRef3() As String
Get
Return ResourceManager.GetString("ERR_SxSIndirectRefHigherThanDirectRef3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'MethodImplOptions.Synchronized' cannot be applied to an Async method..
'''</summary>
Friend ReadOnly Property ERR_SynchronizedAsyncMethod() As String
Get
Return ResourceManager.GetString("ERR_SynchronizedAsyncMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'SyncLock' operand cannot be of type '{0}' because '{0}' is not a reference type..
'''</summary>
Friend ReadOnly Property ERR_SyncLockRequiresReferenceType1() As String
Get
Return ResourceManager.GetString("ERR_SyncLockRequiresReferenceType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Syntax error..
'''</summary>
Friend ReadOnly Property ERR_Syntax() As String
Get
Return ResourceManager.GetString("ERR_Syntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Syntax error in cast operator; two arguments separated by comma are required..
'''</summary>
Friend ReadOnly Property ERR_SyntaxInCastOp() As String
Get
Return ResourceManager.GetString("ERR_SyntaxInCastOp", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' implicitly defines '{2}', which conflicts with a member of the same name in {3} '{4}'..
'''</summary>
Friend ReadOnly Property ERR_SynthMemberClashesWithMember5() As String
Get
Return ResourceManager.GetString("ERR_SynthMemberClashesWithMember5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' implicitly defines '{2}', which conflicts with a member implicitly declared for {3} '{4}' in {5} '{6}'..
'''</summary>
Friend ReadOnly Property ERR_SynthMemberClashesWithSynth7() As String
Get
Return ResourceManager.GetString("ERR_SynthMemberClashesWithSynth7", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}', implicitly declared for {1} '{2}', cannot shadow a 'MustOverride' method in the base {3} '{4}'..
'''</summary>
Friend ReadOnly Property ERR_SynthMemberShadowsMustOverride5() As String
Get
Return ResourceManager.GetString("ERR_SynthMemberShadowsMustOverride5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' implicitly defines a member '{2}' which has the same name as a type parameter..
'''</summary>
Friend ReadOnly Property ERR_SyntMemberShadowsGenericParam3() As String
Get
Return ResourceManager.GetString("ERR_SyntMemberShadowsGenericParam3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too few type arguments to '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TooFewGenericArguments1() As String
Get
Return ResourceManager.GetString("ERR_TooFewGenericArguments1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too few type arguments to extension method '{0}' defined in '{1}'..
'''</summary>
Friend ReadOnly Property ERR_TooFewGenericArguments2() As String
Get
Return ResourceManager.GetString("ERR_TooFewGenericArguments2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Number of indices is less than the number of dimensions of the indexed array..
'''</summary>
Friend ReadOnly Property ERR_TooFewIndices() As String
Get
Return ResourceManager.GetString("ERR_TooFewIndices", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name '{0}' exceeds the maximum length allowed in metadata..
'''</summary>
Friend ReadOnly Property ERR_TooLongMetadataName() As String
Get
Return ResourceManager.GetString("ERR_TooLongMetadataName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An expression is too long or complex to compile.
'''</summary>
Friend ReadOnly Property ERR_TooLongOrComplexExpression() As String
Get
Return ResourceManager.GetString("ERR_TooLongOrComplexExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too many arguments..
'''</summary>
Friend ReadOnly Property ERR_TooManyArgs() As String
Get
Return ResourceManager.GetString("ERR_TooManyArgs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too many arguments to '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TooManyArgs1() As String
Get
Return ResourceManager.GetString("ERR_TooManyArgs1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too many arguments to extension method '{0}' defined in '{1}'..
'''</summary>
Friend ReadOnly Property ERR_TooManyArgs2() As String
Get
Return ResourceManager.GetString("ERR_TooManyArgs2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too many type arguments to '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TooManyGenericArguments1() As String
Get
Return ResourceManager.GetString("ERR_TooManyGenericArguments1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Too many type arguments to extension method '{0}' defined in '{1}'..
'''</summary>
Friend ReadOnly Property ERR_TooManyGenericArguments2() As String
Get
Return ResourceManager.GetString("ERR_TooManyGenericArguments2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Number of indices exceeds the number of dimensions of the indexed array..
'''</summary>
Friend ReadOnly Property ERR_TooManyIndices() As String
Get
Return ResourceManager.GetString("ERR_TooManyIndices", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string or XML literals..
'''</summary>
Friend ReadOnly Property ERR_TooManyUserStrings() As String
Get
Return ResourceManager.GetString("ERR_TooManyUserStrings", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method cannot contain both a 'Try' statement and an 'On Error' or 'Resume' statement..
'''</summary>
Friend ReadOnly Property ERR_TryAndOnErrorDoNotMix() As String
Get
Return ResourceManager.GetString("ERR_TryAndOnErrorDoNotMix", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'TryCast' operands must be class-constrained type parameter, but '{0}' has no class constraint..
'''</summary>
Friend ReadOnly Property ERR_TryCastOfUnconstrainedTypeParam1() As String
Get
Return ResourceManager.GetString("ERR_TryCastOfUnconstrainedTypeParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'TryCast' operand must be reference type, but '{0}' is a value type..
'''</summary>
Friend ReadOnly Property ERR_TryCastOfValueType1() As String
Get
Return ResourceManager.GetString("ERR_TryCastOfValueType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Try must have at least one 'Catch' or a 'Finally'..
'''</summary>
Friend ReadOnly Property ERR_TryWithoutCatchOrFinally() As String
Get
Return ResourceManager.GetString("ERR_TryWithoutCatchOrFinally", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tuple element names must be unique..
'''</summary>
Friend ReadOnly Property ERR_TupleDuplicateElementName() As String
Get
Return ResourceManager.GetString("ERR_TupleDuplicateElementName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot define a class or member that utilizes tuples because the compiler required type '{0}' cannot be found. Are you missing a reference?.
'''</summary>
Friend ReadOnly Property ERR_TupleElementNamesAttributeMissing() As String
Get
Return ResourceManager.GetString("ERR_TupleElementNamesAttributeMissing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tuple element name '{0}' is inferred. Please use language version {1} or greater to access an element by its inferred name..
'''</summary>
Friend ReadOnly Property ERR_TupleInferredNamesNotAvailable() As String
Get
Return ResourceManager.GetString("ERR_TupleInferredNamesNotAvailable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type characters cannot be used in tuple literals..
'''</summary>
Friend ReadOnly Property ERR_TupleLiteralDisallowsTypeChar() As String
Get
Return ResourceManager.GetString("ERR_TupleLiteralDisallowsTypeChar", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tuple element name '{0}' is only allowed at position {1}..
'''</summary>
Friend ReadOnly Property ERR_TupleReservedElementName() As String
Get
Return ResourceManager.GetString("ERR_TupleReservedElementName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tuple element name '{0}' is disallowed at any position..
'''</summary>
Friend ReadOnly Property ERR_TupleReservedElementNameAnyPosition() As String
Get
Return ResourceManager.GetString("ERR_TupleReservedElementNameAnyPosition", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tuple must contain at least two elements..
'''</summary>
Friend ReadOnly Property ERR_TupleTooFewElements() As String
Get
Return ResourceManager.GetString("ERR_TupleTooFewElements", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' must have two parameters..
'''</summary>
Friend ReadOnly Property ERR_TwoParametersRequired1() As String
Get
Return ResourceManager.GetString("ERR_TwoParametersRequired1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type arguments unexpected..
'''</summary>
Friend ReadOnly Property ERR_TypeArgsUnexpected() As String
Get
Return ResourceManager.GetString("ERR_TypeArgsUnexpected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type character '{0}' does not match declared data type '{1}'..
'''</summary>
Friend ReadOnly Property ERR_TypecharNoMatch2() As String
Get
Return ResourceManager.GetString("ERR_TypecharNoMatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type declaration characters are not valid in this context..
'''</summary>
Friend ReadOnly Property ERR_TypecharNotallowed() As String
Get
Return ResourceManager.GetString("ERR_TypecharNotallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Aggregate function name cannot be used with a type character..
'''</summary>
Friend ReadOnly Property ERR_TypeCharOnAggregation() As String
Get
Return ResourceManager.GetString("ERR_TypeCharOnAggregation", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type character cannot be used in a type parameter declaration..
'''</summary>
Friend ReadOnly Property ERR_TypeCharOnGenericParam() As String
Get
Return ResourceManager.GetString("ERR_TypeCharOnGenericParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type character cannot be used in a 'Sub' declaration because a 'Sub' doesn't return a value..
'''</summary>
Friend ReadOnly Property ERR_TypeCharOnSub() As String
Get
Return ResourceManager.GetString("ERR_TypeCharOnSub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type character '{0}' cannot be used in a declaration with an explicit type..
'''</summary>
Friend ReadOnly Property ERR_TypeCharWithType1() As String
Get
Return ResourceManager.GetString("ERR_TypeCharWithType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' conflicts with a Visual Basic Runtime {2} '{3}'..
'''</summary>
Friend ReadOnly Property ERR_TypeClashesWithVbCoreType4() As String
Get
Return ResourceManager.GetString("ERR_TypeClashesWithVbCoreType4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' and {2} '{3}' conflict in {4} '{5}'..
'''</summary>
Friend ReadOnly Property ERR_TypeConflict6() As String
Get
Return ResourceManager.GetString("ERR_TypeConflict6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML attributes cannot be selected from type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TypeDisallowsAttributes() As String
Get
Return ResourceManager.GetString("ERR_TypeDisallowsAttributes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML descendant elements cannot be selected from type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TypeDisallowsDescendants() As String
Get
Return ResourceManager.GetString("ERR_TypeDisallowsDescendants", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML elements cannot be selected from type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TypeDisallowsElements() As String
Get
Return ResourceManager.GetString("ERR_TypeDisallowsElements", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Module '{0}' in assembly '{1}' is forwarding the type '{2}' to multiple assemblies: '{3}' and '{4}'..
'''</summary>
Friend ReadOnly Property ERR_TypeForwardedToMultipleAssemblies() As String
Get
Return ResourceManager.GetString("ERR_TypeForwardedToMultipleAssemblies", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' in assembly '{1}' has been forwarded to itself and so is an unsupported type..
'''</summary>
Friend ReadOnly Property ERR_TypeFwdCycle2() As String
Get
Return ResourceManager.GetString("ERR_TypeFwdCycle2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a data type for '{0}' because the array dimensions do not match..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceArrayRankMismatch1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceArrayRankMismatch1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) cannot be inferred from these arguments. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailure1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailure1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in method '{0}' cannot be inferred from these arguments. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailure2() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailure2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in extension method '{0}' defined in '{1}' cannot be inferred from these arguments. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailure3() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailure3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) cannot be inferred from these arguments because more than one type is possible. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureAmbiguous1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureAmbiguous1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in method '{0}' cannot be inferred from these arguments because more than one type is possible. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureAmbiguous2() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureAmbiguous2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in extension method '{0}' defined in '{1}' cannot be inferred from these arguments because more than one type is possible. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureAmbiguous3() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureAmbiguous3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) cannot be inferred from these arguments because they do not convert to the same type. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoBest1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoBest1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in method '{0}' cannot be inferred from these arguments because they do not convert to the same type. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoBest2() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoBest2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in extension method '{0}' defined in '{1}' cannot be inferred from these arguments because they do not convert to the same type. Specifying the data type(s) explicitly might correct this error..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoBest3() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoBest3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) cannot be inferred from these arguments..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicit1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicit1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in method '{0}' cannot be inferred from these arguments..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicit2() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicit2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in extension method '{0}' defined in '{1}' cannot be inferred from these arguments..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicit3() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicit3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) cannot be inferred from these arguments because more than one type is possible..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicitAmbiguous1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicitAmbiguous1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in method '{0}' cannot be inferred from these arguments because more than one type is possible..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicitAmbiguous2() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicitAmbiguous2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in extension method '{0}' defined in '{1}' cannot be inferred from these arguments because more than one type is possible..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicitAmbiguous3() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicitAmbiguous3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) cannot be inferred from these arguments because they do not convert to the same type..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicitNoBest1() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicitNoBest1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in method '{0}' cannot be inferred from these arguments because they do not convert to the same type..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicitNoBest2() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicitNoBest2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type(s) of the type parameter(s) in extension method '{0}' defined in '{1}' cannot be inferred from these arguments because they do not convert to the same type..
'''</summary>
Friend ReadOnly Property ERR_TypeInferenceFailureNoExplicitNoBest3() As String
Get
Return ResourceManager.GetString("ERR_TypeInferenceFailureNoExplicitNoBest3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' cannot reference itself in Inherits clause..
'''</summary>
Friend ReadOnly Property ERR_TypeInItsInheritsClause1() As String
Get
Return ResourceManager.GetString("ERR_TypeInItsInheritsClause1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value of type '{0}' cannot be converted to '{1}'..
'''</summary>
Friend ReadOnly Property ERR_TypeMismatch2() As String
Get
Return ResourceManager.GetString("ERR_TypeMismatch2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value of type '{0}' cannot be converted to '{1}'. You can use the 'Value' property to get the string value of the first element of '{2}'..
'''</summary>
Friend ReadOnly Property ERR_TypeMismatchForXml3() As String
Get
Return ResourceManager.GetString("ERR_TypeMismatchForXml3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is a type and cannot be used as an expression..
'''</summary>
Friend ReadOnly Property ERR_TypeNotExpression1() As String
Get
Return ResourceManager.GetString("ERR_TypeNotExpression1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression of type '{0}' can never be of type '{1}'..
'''</summary>
Friend ReadOnly Property ERR_TypeOfExprAlwaysFalse2() As String
Get
Return ResourceManager.GetString("ERR_TypeOfExprAlwaysFalse2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'TypeOf ... Is' requires its left operand to have a reference type, but this operand has the value type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_TypeOfRequiresReferenceType1() As String
Get
Return ResourceManager.GetString("ERR_TypeOfRequiresReferenceType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has no type parameters and so cannot have type arguments..
'''</summary>
Friend ReadOnly Property ERR_TypeOrMemberNotGeneric1() As String
Get
Return ResourceManager.GetString("ERR_TypeOrMemberNotGeneric1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Extension method '{0}' defined in '{1}' is not generic (or has no free type parameters) and so cannot have type arguments..
'''</summary>
Friend ReadOnly Property ERR_TypeOrMemberNotGeneric2() As String
Get
Return ResourceManager.GetString("ERR_TypeOrMemberNotGeneric2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'As', comma or ')' expected..
'''</summary>
Friend ReadOnly Property ERR_TypeParamMissingAsCommaOrRParen() As String
Get
Return ResourceManager.GetString("ERR_TypeParamMissingAsCommaOrRParen", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Comma or ')' expected..
'''</summary>
Friend ReadOnly Property ERR_TypeParamMissingCommaOrRParen() As String
Get
Return ResourceManager.GetString("ERR_TypeParamMissingCommaOrRParen", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter cannot have the same name as its defining function..
'''</summary>
Friend ReadOnly Property ERR_TypeParamNameFunctionNameCollision() As String
Get
Return ResourceManager.GetString("ERR_TypeParamNameFunctionNameCollision", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameters cannot be used as qualifiers..
'''</summary>
Friend ReadOnly Property ERR_TypeParamQualifierDisallowed() As String
Get
Return ResourceManager.GetString("ERR_TypeParamQualifierDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter with a 'Structure' constraint cannot be used as a constraint..
'''</summary>
Friend ReadOnly Property ERR_TypeParamWithStructConstAsConst() As String
Get
Return ResourceManager.GetString("ERR_TypeParamWithStructConstAsConst", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Import of type '{0}' from assembly or module '{1}' failed..
'''</summary>
Friend ReadOnly Property ERR_TypeRefResolutionError3() As String
Get
Return ResourceManager.GetString("ERR_TypeRefResolutionError3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot create temporary file: {0}.
'''</summary>
Friend ReadOnly Property ERR_UnableToCreateTempFile() As String
Get
Return ResourceManager.GetString("ERR_UnableToCreateTempFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to open resource file '{0}': {1}.
'''</summary>
Friend ReadOnly Property ERR_UnableToOpenResourceFile1() As String
Get
Return ResourceManager.GetString("ERR_UnableToOpenResourceFile1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to open Win32 manifest file '{0}' : {1}.
'''</summary>
Friend ReadOnly Property ERR_UnableToReadUacManifest2() As String
Get
Return ResourceManager.GetString("ERR_UnableToReadUacManifest2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Return and parameter types of '{0}' must be '{1}' to be used in a 'For' statement..
'''</summary>
Friend ReadOnly Property ERR_UnacceptableForLoopOperator2() As String
Get
Return ResourceManager.GetString("ERR_UnacceptableForLoopOperator2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter types of '{0}' must be '{1}' to be used in a 'For' statement..
'''</summary>
Friend ReadOnly Property ERR_UnacceptableForLoopRelOperator2() As String
Get
Return ResourceManager.GetString("ERR_UnacceptableForLoopRelOperator2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Return and parameter types of '{0}' must be '{1}' to be used in a '{2}' expression..
'''</summary>
Friend ReadOnly Property ERR_UnacceptableLogicalOperator3() As String
Get
Return ResourceManager.GetString("ERR_UnacceptableLogicalOperator3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' is not defined for type '{1}'..
'''</summary>
Friend ReadOnly Property ERR_UnaryOperand2() As String
Get
Return ResourceManager.GetString("ERR_UnaryOperand2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter of this unary operator must be of the containing type '{0}'..
'''</summary>
Friend ReadOnly Property ERR_UnaryParamMustBeContainingType1() As String
Get
Return ResourceManager.GetString("ERR_UnaryParamMustBeContainingType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' cannot be inferred..
'''</summary>
Friend ReadOnly Property ERR_UnboundTypeParam1() As String
Get
Return ResourceManager.GetString("ERR_UnboundTypeParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' for '{1}' cannot be inferred..
'''</summary>
Friend ReadOnly Property ERR_UnboundTypeParam2() As String
Get
Return ResourceManager.GetString("ERR_UnboundTypeParam2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' for extension method '{1}' defined in '{2}' cannot be inferred..
'''</summary>
Friend ReadOnly Property ERR_UnboundTypeParam3() As String
Get
Return ResourceManager.GetString("ERR_UnboundTypeParam3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' is not defined..
'''</summary>
Friend ReadOnly Property ERR_UndefinedType1() As String
Get
Return ResourceManager.GetString("ERR_UndefinedType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type or namespace '{0}' is not defined..
'''</summary>
Friend ReadOnly Property ERR_UndefinedTypeOrNamespace1() As String
Get
Return ResourceManager.GetString("ERR_UndefinedTypeOrNamespace1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML namespace prefix '{0}' is not defined..
'''</summary>
Friend ReadOnly Property ERR_UndefinedXmlPrefix() As String
Get
Return ResourceManager.GetString("ERR_UndefinedXmlPrefix", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression statement is only allowed at the end of an interactive submission..
'''</summary>
Friend ReadOnly Property ERR_UnexpectedExpressionStatement() As String
Get
Return ResourceManager.GetString("ERR_UnexpectedExpressionStatement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Group' not allowed in this context; identifier expected..
'''</summary>
Friend ReadOnly Property ERR_UnexpectedGroup() As String
Get
Return ResourceManager.GetString("ERR_UnexpectedGroup", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' must implement '{2}' for interface '{3}'..
'''</summary>
Friend ReadOnly Property ERR_UnimplementedMember3() As String
Get
Return ResourceManager.GetString("ERR_UnimplementedMember3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to
''' {0}: {1}.
'''</summary>
Friend ReadOnly Property ERR_UnimplementedMustOverride() As String
Get
Return ResourceManager.GetString("ERR_UnimplementedMustOverride", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator declaration must be one of: +, -, *, \, /, ^, &, Like, Mod, And, Or, Xor, Not, <<, >>, =, <>, <, <=, >, >=, CType, IsTrue, IsFalse..
'''</summary>
Friend ReadOnly Property ERR_UnknownOperator() As String
Get
Return ResourceManager.GetString("ERR_UnknownOperator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'End' statement not valid..
'''</summary>
Friend ReadOnly Property ERR_UnrecognizedEnd() As String
Get
Return ResourceManager.GetString("ERR_UnrecognizedEnd", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type expected..
'''</summary>
Friend ReadOnly Property ERR_UnrecognizedType() As String
Get
Return ResourceManager.GetString("ERR_UnrecognizedType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Keyword does not name a type..
'''</summary>
Friend ReadOnly Property ERR_UnrecognizedTypeKeyword() As String
Get
Return ResourceManager.GetString("ERR_UnrecognizedTypeKeyword", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type or 'With' expected..
'''</summary>
Friend ReadOnly Property ERR_UnrecognizedTypeOrWith() As String
Get
Return ResourceManager.GetString("ERR_UnrecognizedTypeOrWith", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference required to assembly '{0}' containing the type '{1}'. Add one to your project..
'''</summary>
Friend ReadOnly Property ERR_UnreferencedAssembly3() As String
Get
Return ResourceManager.GetString("ERR_UnreferencedAssembly3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference required to assembly '{0}' containing the definition for event '{1}'. Add one to your project..
'''</summary>
Friend ReadOnly Property ERR_UnreferencedAssemblyEvent3() As String
Get
Return ResourceManager.GetString("ERR_UnreferencedAssemblyEvent3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference required to module '{0}' containing the type '{1}'. Add one to your project..
'''</summary>
Friend ReadOnly Property ERR_UnreferencedModule3() As String
Get
Return ResourceManager.GetString("ERR_UnreferencedModule3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Reference required to module '{0}' containing the definition for event '{1}'. Add one to your project..
'''</summary>
Friend ReadOnly Property ERR_UnreferencedModuleEvent3() As String
Get
Return ResourceManager.GetString("ERR_UnreferencedModuleEvent3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Field '{0}.{1}' has an invalid constant value..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedConstant2() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedConstant2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an unsupported event..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedEvent1() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedEvent1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Field '{0}' is of an unsupported type..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedField1() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedField1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' has a return type that is not supported or parameter types that are not supported..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedMethod1() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedMethod1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an unsupported .NET module..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedModule1() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedModule1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' is of an unsupported type..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedProperty1() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an unsupported type..
'''</summary>
Friend ReadOnly Property ERR_UnsupportedType1() As String
Get
Return ResourceManager.GetString("ERR_UnsupportedType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to String constants must end with a double quote..
'''</summary>
Friend ReadOnly Property ERR_UnterminatedStringLiteral() As String
Get
Return ResourceManager.GetString("ERR_UnterminatedStringLiteral", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid within a Module..
'''</summary>
Friend ReadOnly Property ERR_UseOfKeywordFromModule1() As String
Get
Return ResourceManager.GetString("ERR_UseOfKeywordFromModule1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not valid within a structure..
'''</summary>
Friend ReadOnly Property ERR_UseOfKeywordFromStructure1() As String
Get
Return ResourceManager.GetString("ERR_UseOfKeywordFromStructure1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is valid only within an instance method..
'''</summary>
Friend ReadOnly Property ERR_UseOfKeywordNotInInstanceMethod1() As String
Get
Return ResourceManager.GetString("ERR_UseOfKeywordNotInInstanceMethod1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable '{0}' cannot be referred to before it is declared..
'''</summary>
Friend ReadOnly Property ERR_UseOfLocalBeforeDeclaration1() As String
Get
Return ResourceManager.GetString("ERR_UseOfLocalBeforeDeclaration1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' accessor of '{1}' is obsolete..
'''</summary>
Friend ReadOnly Property ERR_UseOfObsoletePropertyAccessor2() As String
Get
Return ResourceManager.GetString("ERR_UseOfObsoletePropertyAccessor2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' accessor of '{1}' is obsolete: '{2}'..
'''</summary>
Friend ReadOnly Property ERR_UseOfObsoletePropertyAccessor3() As String
Get
Return ResourceManager.GetString("ERR_UseOfObsoletePropertyAccessor3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is obsolete: '{1}'..
'''</summary>
Friend ReadOnly Property ERR_UseOfObsoleteSymbol2() As String
Get
Return ResourceManager.GetString("ERR_UseOfObsoleteSymbol2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is obsolete..
'''</summary>
Friend ReadOnly Property ERR_UseOfObsoleteSymbolNoMessage1() As String
Get
Return ResourceManager.GetString("ERR_UseOfObsoleteSymbolNoMessage1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Using' operand of type '{0}' must implement 'System.IDisposable'..
'''</summary>
Friend ReadOnly Property ERR_UsingRequiresDisposePattern() As String
Get
Return ResourceManager.GetString("ERR_UsingRequiresDisposePattern", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Using' resource variable type can not be array type..
'''</summary>
Friend ReadOnly Property ERR_UsingResourceVarCantBeArray() As String
Get
Return ResourceManager.GetString("ERR_UsingResourceVarCantBeArray", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Using' resource variable must have an explicit initialization..
'''</summary>
Friend ReadOnly Property ERR_UsingResourceVarNeedsInitializer() As String
Get
Return ResourceManager.GetString("ERR_UsingResourceVarNeedsInitializer", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Structure' constraint and a specific class type constraint cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_ValueAndClassTypeConstrCombined() As String
Get
Return ResourceManager.GetString("ERR_ValueAndClassTypeConstrCombined", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Predefined type '{0}' is not defined or imported..
'''</summary>
Friend ReadOnly Property ERR_ValueTupleTypeRefResolutionError1() As String
Get
Return ResourceManager.GetString("ERR_ValueTupleTypeRefResolutionError1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{4}' cannot be converted to '{5}' because '{0}' is not derived from '{1}', as required for the 'In' generic parameter '{2}' in '{3}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceConversionFailedIn6() As String
Get
Return ResourceManager.GetString("ERR_VarianceConversionFailedIn6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{4}' cannot be converted to '{5}' because '{0}' is not derived from '{1}', as required for the 'Out' generic parameter '{2}' in '{3}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceConversionFailedOut6() As String
Get
Return ResourceManager.GetString("ERR_VarianceConversionFailedOut6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be converted to '{1}'. Consider changing the '{2}' in the definition of '{3}' to an In type parameter, 'In {2}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceConversionFailedTryIn4() As String
Get
Return ResourceManager.GetString("ERR_VarianceConversionFailedTryIn4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be converted to '{1}'. Consider changing the '{2}' in the definition of '{3}' to an Out type parameter, 'Out {2}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceConversionFailedTryOut4() As String
Get
Return ResourceManager.GetString("ERR_VarianceConversionFailedTryOut4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Keywords 'Out' and 'In' can only be used in interface and delegate declarations..
'''</summary>
Friend ReadOnly Property ERR_VarianceDisallowedHere() As String
Get
Return ResourceManager.GetString("ERR_VarianceDisallowedHere", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be converted to '{1}'. Consider using '{2}' instead..
'''</summary>
Friend ReadOnly Property ERR_VarianceIEnumerableSuggestion3() As String
Get
Return ResourceManager.GetString("ERR_VarianceIEnumerableSuggestion3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in this context because 'In' and 'Out' type parameters cannot be used for ByRef parameter types, and '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInByRefDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceInByRefDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in '{1}' because 'In' and 'Out' type parameters cannot be made nullable, and '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInNullableDisallowed2() As String
Get
Return ResourceManager.GetString("ERR_VarianceInNullableDisallowed2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in this context because '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInParamDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceInParamDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used for the '{1}' in '{2}' in this context because '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInParamDisallowedForGeneric3() As String
Get
Return ResourceManager.GetString("ERR_VarianceInParamDisallowedForGeneric3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in '{1}' in this context because '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInParamDisallowedHere2() As String
Get
Return ResourceManager.GetString("ERR_VarianceInParamDisallowedHere2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used for the '{2}' of '{3}' in '{1}' in this context because '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInParamDisallowedHereForGeneric4() As String
Get
Return ResourceManager.GetString("ERR_VarianceInParamDisallowedHereForGeneric4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a property type in this context because '{0}' is an 'In' type parameter and the property is not marked WriteOnly..
'''</summary>
Friend ReadOnly Property ERR_VarianceInPropertyDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceInPropertyDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a ReadOnly property type because '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInReadOnlyPropertyDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceInReadOnlyPropertyDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a return type because '{0}' is an 'In' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInReturnDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceInReturnDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enumerations, classes, and structures cannot be declared in an interface that has an 'In' or 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceInterfaceNesting() As String
Get
Return ResourceManager.GetString("ERR_VarianceInterfaceNesting", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in this context because 'In' and 'Out' type parameters cannot be used for ByRef parameter types, and '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutByRefDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutByRefDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a ByVal parameter type because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutByValDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutByValDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a generic type constraint because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutConstraintDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutConstraintDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in '{1}' because 'In' and 'Out' type parameters cannot be made nullable, and '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutNullableDisallowed2() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutNullableDisallowed2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in this context because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutParamDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutParamDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used for the '{1}' in '{2}' in this context because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutParamDisallowedForGeneric3() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutParamDisallowedForGeneric3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in '{1}' in this context because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutParamDisallowedHere2() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutParamDisallowedHere2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used for the '{2}' of '{3}' in '{1}' in this context because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutParamDisallowedHereForGeneric4() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutParamDisallowedHereForGeneric4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a property type in this context because '{0}' is an 'Out' type parameter and the property is not marked ReadOnly..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutPropertyDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutPropertyDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used as a WriteOnly property type because '{0}' is an 'Out' type parameter..
'''</summary>
Friend ReadOnly Property ERR_VarianceOutWriteOnlyPropertyDisallowed1() As String
Get
Return ResourceManager.GetString("ERR_VarianceOutWriteOnlyPropertyDisallowed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event definitions with parameters are not allowed in an interface such as '{0}' that has 'In' or 'Out' type parameters. Consider declaring the event by using a delegate type which is not defined within '{0}'. For example, 'Event {1} As Action(Of ...)'..
'''</summary>
Friend ReadOnly Property ERR_VariancePreventsSynthesizedEvents2() As String
Get
Return ResourceManager.GetString("ERR_VariancePreventsSynthesizedEvents2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in this context because both the context and the definition of '{0}' are nested within interface '{1}', and '{1}' has 'In' or 'Out' type parameters. Consider moving the definition of '{0}' outside of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceTypeDisallowed2() As String
Get
Return ResourceManager.GetString("ERR_VarianceTypeDisallowed2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used for the '{2}' in '{3}' in this context because both the context and the definition of '{0}' are nested within interface '{1}', and '{1}' has 'In' or 'Out' type parameters. Consider moving the definition of '{0}' outside of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceTypeDisallowedForGeneric4() As String
Get
Return ResourceManager.GetString("ERR_VarianceTypeDisallowedForGeneric4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used in '{2}' in this context because both the context and the definition of '{0}' are nested within interface '{1}', and '{1}' has 'In' or 'Out' type parameters. Consider moving the definition of '{0}' outside of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceTypeDisallowedHere3() As String
Get
Return ResourceManager.GetString("ERR_VarianceTypeDisallowedHere3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' cannot be used for the '{3}' of '{4}' in '{2}' in this context because both the context and the definition of '{0}' are nested within interface '{1}', and '{1}' has 'In' or 'Out' type parameters. Consider moving the definition of '{0}' outside of '{1}'..
'''</summary>
Friend ReadOnly Property ERR_VarianceTypeDisallowedHereForGeneric5() As String
Get
Return ResourceManager.GetString("ERR_VarianceTypeDisallowedHereForGeneric5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The options /vbruntime* and /target:module cannot be combined..
'''</summary>
Friend ReadOnly Property ERR_VBCoreNetModuleConflict() As String
Get
Return ResourceManager.GetString("ERR_VBCoreNetModuleConflict", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML attribute 'version' must be the first attribute in XML declaration..
'''</summary>
Friend ReadOnly Property ERR_VersionMustBeFirstInXmlDecl() As String
Get
Return ResourceManager.GetString("ERR_VersionMustBeFirstInXmlDecl", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Arrays of type 'System.Void' are not allowed in this expression..
'''</summary>
Friend ReadOnly Property ERR_VoidArrayDisallowed() As String
Get
Return ResourceManager.GetString("ERR_VoidArrayDisallowed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression does not produce a value..
'''</summary>
Friend ReadOnly Property ERR_VoidValue() As String
Get
Return ResourceManager.GetString("ERR_VoidValue", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Event declarations that target WinMD must specify a delegate type. Add an As clause to the event declaration..
'''</summary>
Friend ReadOnly Property ERR_WinRTEventWithoutDelegate() As String
Get
Return ResourceManager.GetString("ERR_WinRTEventWithoutDelegate", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'WithEvents' variables can only be typed as classes, interfaces or type parameters with class constraints..
'''</summary>
Friend ReadOnly Property ERR_WithEventsAsStruct() As String
Get
Return ResourceManager.GetString("ERR_WithEventsAsStruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'WithEvents' variables must have an 'As' clause..
'''</summary>
Friend ReadOnly Property ERR_WithEventsRequiresClass() As String
Get
Return ResourceManager.GetString("ERR_WithEventsRequiresClass", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Properties declared 'WriteOnly' cannot have a 'Get'..
'''</summary>
Friend ReadOnly Property ERR_WriteOnlyHasGet() As String
Get
Return ResourceManager.GetString("ERR_WriteOnlyHasGet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'WriteOnly' property must provide a 'Set'..
'''</summary>
Friend ReadOnly Property ERR_WriteOnlyHasNoWrite() As String
Get
Return ResourceManager.GetString("ERR_WriteOnlyHasNoWrite", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'WriteOnly' properties cannot have an access modifier on 'Set'..
'''</summary>
Friend ReadOnly Property ERR_WriteOnlyNoAccessorFlag() As String
Get
Return ResourceManager.GetString("ERR_WriteOnlyNoAccessorFlag", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The literal string ']]>' is not allowed in element content..
'''</summary>
Friend ReadOnly Property ERR_XmlEndCDataNotAllowedInContent() As String
Get
Return ResourceManager.GetString("ERR_XmlEndCDataNotAllowedInContent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML end element must be preceded by a matching start element..
'''</summary>
Friend ReadOnly Property ERR_XmlEndElementNoMatchingStart() As String
Get
Return ResourceManager.GetString("ERR_XmlEndElementNoMatchingStart", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML entity references are not supported..
'''</summary>
Friend ReadOnly Property ERR_XmlEntityReference() As String
Get
Return ResourceManager.GetString("ERR_XmlEntityReference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML literals and XML axis properties are not available. Add references to System.Xml, System.Xml.Linq, and System.Core or other assemblies declaring System.Linq.Enumerable, System.Xml.Linq.XElement, System.Xml.Linq.XName, System.Xml.Linq.XAttribute and System.Xml.Linq.XNamespace types..
'''</summary>
Friend ReadOnly Property ERR_XmlFeaturesNotAvailable() As String
Get
Return ResourceManager.GetString("ERR_XmlFeaturesNotAvailable", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is an XML prefix and cannot be used as an expression. Use the GetXmlNamespace operator to create a namespace object..
'''</summary>
Friend ReadOnly Property ERR_XmlPrefixNotExpression() As String
Get
Return ResourceManager.GetString("ERR_XmlPrefixNotExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Division by zero occurred while evaluating this expression..
'''</summary>
Friend ReadOnly Property ERR_ZeroDivide() As String
Get
Return ResourceManager.GetString("ERR_ZeroDivide", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to array literal expressions.
'''</summary>
Friend ReadOnly Property FEATURE_ArrayLiterals() As String
Get
Return ResourceManager.GetString("FEATURE_ArrayLiterals", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to async methods or lambdas.
'''</summary>
Friend ReadOnly Property FEATURE_AsyncExpressions() As String
Get
Return ResourceManager.GetString("FEATURE_AsyncExpressions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to auto-implemented properties.
'''</summary>
Friend ReadOnly Property FEATURE_AutoProperties() As String
Get
Return ResourceManager.GetString("FEATURE_AutoProperties", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to binary literals.
'''</summary>
Friend ReadOnly Property FEATURE_BinaryLiterals() As String
Get
Return ResourceManager.GetString("FEATURE_BinaryLiterals", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to CObj in attribute arguments.
'''</summary>
Friend ReadOnly Property FEATURE_CObjInAttributeArguments() As String
Get
Return ResourceManager.GetString("FEATURE_CObjInAttributeArguments", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to variance.
'''</summary>
Friend ReadOnly Property FEATURE_CoContraVariance() As String
Get
Return ResourceManager.GetString("FEATURE_CoContraVariance", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to collection initializers.
'''</summary>
Friend ReadOnly Property FEATURE_CollectionInitializers() As String
Get
Return ResourceManager.GetString("FEATURE_CollectionInitializers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to digit separators.
'''</summary>
Friend ReadOnly Property FEATURE_DigitSeparators() As String
Get
Return ResourceManager.GetString("FEATURE_DigitSeparators", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to declaring a Global namespace.
'''</summary>
Friend ReadOnly Property FEATURE_GlobalNamespace() As String
Get
Return ResourceManager.GetString("FEATURE_GlobalNamespace", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to implementing read-only or write-only property with read-write property.
'''</summary>
Friend ReadOnly Property FEATURE_ImplementingReadonlyOrWriteonlyPropertyWithReadwrite() As String
Get
Return ResourceManager.GetString("FEATURE_ImplementingReadonlyOrWriteonlyPropertyWithReadwrite", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to iterators.
'''</summary>
Friend ReadOnly Property FEATURE_Iterators() As String
Get
Return ResourceManager.GetString("FEATURE_Iterators", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to leading digit separator.
'''</summary>
Friend ReadOnly Property FEATURE_LeadingDigitSeparator() As String
Get
Return ResourceManager.GetString("FEATURE_LeadingDigitSeparator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to implicit line continuation.
'''</summary>
Friend ReadOnly Property FEATURE_LineContinuation() As String
Get
Return ResourceManager.GetString("FEATURE_LineContinuation", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to line continuation comments.
'''</summary>
Friend ReadOnly Property FEATURE_LineContinuationComments() As String
Get
Return ResourceManager.GetString("FEATURE_LineContinuationComments", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to multiline string literals.
'''</summary>
Friend ReadOnly Property FEATURE_MultilineStringLiterals() As String
Get
Return ResourceManager.GetString("FEATURE_MultilineStringLiterals", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'nameof' expressions.
'''</summary>
Friend ReadOnly Property FEATURE_NameOfExpressions() As String
Get
Return ResourceManager.GetString("FEATURE_NameOfExpressions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to null conditional operations.
'''</summary>
Friend ReadOnly Property FEATURE_NullPropagatingOperator() As String
Get
Return ResourceManager.GetString("FEATURE_NullPropagatingOperator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to partial interfaces.
'''</summary>
Friend ReadOnly Property FEATURE_PartialInterfaces() As String
Get
Return ResourceManager.GetString("FEATURE_PartialInterfaces", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to partial modules.
'''</summary>
Friend ReadOnly Property FEATURE_PartialModules() As String
Get
Return ResourceManager.GetString("FEATURE_PartialModules", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Private Protected.
'''</summary>
Friend ReadOnly Property FEATURE_PrivateProtected() As String
Get
Return ResourceManager.GetString("FEATURE_PrivateProtected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to readonly auto-implemented properties.
'''</summary>
Friend ReadOnly Property FEATURE_ReadonlyAutoProperties() As String
Get
Return ResourceManager.GetString("FEATURE_ReadonlyAutoProperties", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to region directives within method bodies or regions crossing boundaries of declaration blocks.
'''</summary>
Friend ReadOnly Property FEATURE_RegionsEverywhere() As String
Get
Return ResourceManager.GetString("FEATURE_RegionsEverywhere", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to multi-line lambda expressions.
'''</summary>
Friend ReadOnly Property FEATURE_StatementLambdas() As String
Get
Return ResourceManager.GetString("FEATURE_StatementLambdas", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Sub' lambda expressions.
'''</summary>
Friend ReadOnly Property FEATURE_SubLambdas() As String
Get
Return ResourceManager.GetString("FEATURE_SubLambdas", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to tuples.
'''</summary>
Friend ReadOnly Property FEATURE_Tuples() As String
Get
Return ResourceManager.GetString("FEATURE_Tuples", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to TypeOf IsNot expression.
'''</summary>
Friend ReadOnly Property FEATURE_TypeOfIsNot() As String
Get
Return ResourceManager.GetString("FEATURE_TypeOfIsNot", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to warning directives.
'''</summary>
Friend ReadOnly Property FEATURE_WarningDirectives() As String
Get
Return ResourceManager.GetString("FEATURE_WarningDirectives", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to year-first date literals.
'''</summary>
Friend ReadOnly Property FEATURE_YearFirstDateLiterals() As String
Get
Return ResourceManager.GetString("FEATURE_YearFirstDateLiterals", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to FieldInitializerSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property FieldInitializerSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("FieldInitializerSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to File name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long.
'''</summary>
Friend ReadOnly Property FTL_InputFileNameTooLong() As String
Get
Return ResourceManager.GetString("FTL_InputFileNameTooLong", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to FunctionSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property FunctionSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("FunctionSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused import clause..
'''</summary>
Friend ReadOnly Property HDN_UnusedImportClause() As String
Get
Return ResourceManager.GetString("HDN_UnusedImportClause", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused import clause.
'''</summary>
Friend ReadOnly Property HDN_UnusedImportClause_Title() As String
Get
Return ResourceManager.GetString("HDN_UnusedImportClause_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused import statement..
'''</summary>
Friend ReadOnly Property HDN_UnusedImportStatement() As String
Get
Return ResourceManager.GetString("HDN_UnusedImportStatement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused import statement.
'''</summary>
Friend ReadOnly Property HDN_UnusedImportStatement_Title() As String
Get
Return ResourceManager.GetString("HDN_UnusedImportStatement_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} is not a valid Visual Basic argument.
'''</summary>
Friend ReadOnly Property IArgumentIsNotVisualBasicArgument() As String
Get
Return ResourceManager.GetString("IArgumentIsNotVisualBasicArgument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} is not a valid Visual Basic conversion expression.
'''</summary>
Friend ReadOnly Property IConversionExpressionIsNotVisualBasicConversion() As String
Get
Return ResourceManager.GetString("IConversionExpressionIsNotVisualBasicConversion", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to IdentifierSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property IdentifierSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("IdentifierSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to function return type.
'''</summary>
Friend ReadOnly Property IDS_FunctionReturnType() As String
Get
Return ResourceManager.GetString("IDS_FunctionReturnType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Supported language versions:.
'''</summary>
Friend ReadOnly Property IDS_LangVersions() As String
Get
Return ResourceManager.GetString("IDS_LangVersions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} version {1}.
'''</summary>
Friend ReadOnly Property IDS_LogoLine1() As String
Get
Return ResourceManager.GetString("IDS_LogoLine1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Copyright (C) Microsoft Corporation. All rights reserved..
'''</summary>
Friend ReadOnly Property IDS_LogoLine2() As String
Get
Return ResourceManager.GetString("IDS_LogoLine2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Adding embedded assembly reference '{0}'.
'''</summary>
Friend ReadOnly Property IDS_MSG_ADDLINKREFERENCE() As String
Get
Return ResourceManager.GetString("IDS_MSG_ADDLINKREFERENCE", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Adding module reference '{0}'.
'''</summary>
Friend ReadOnly Property IDS_MSG_ADDMODULE() As String
Get
Return ResourceManager.GetString("IDS_MSG_ADDMODULE", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Adding assembly reference '{0}'.
'''</summary>
Friend ReadOnly Property IDS_MSG_ADDREFERENCE() As String
Get
Return ResourceManager.GetString("IDS_MSG_ADDREFERENCE", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to <project settings>.
'''</summary>
Friend ReadOnly Property IDS_ProjectSettingsLocationName() As String
Get
Return ResourceManager.GetString("IDS_ProjectSettingsLocationName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The system cannot find the path specified.
'''</summary>
Friend ReadOnly Property IDS_TheSystemCannotFindThePathSpecified() As String
Get
Return ResourceManager.GetString("IDS_TheSystemCannotFindThePathSpecified", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Microsoft (R) Visual Basic Compiler.
'''</summary>
Friend ReadOnly Property IDS_ToolName() As String
Get
Return ResourceManager.GetString("IDS_ToolName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Visual Basic Compiler Options
'''
''' - OUTPUT FILE -
'''/out:<file> Specifies the output file name.
'''/target:exe Create a console application (default).
''' (Short form: /t)
'''/target:winexe Create a Windows application.
'''/target:library Create a library assembly.
'''/target:module Create a module that can be added to an
''' [rest of string was truncated]";.
'''</summary>
Friend ReadOnly Property IDS_VBCHelp() As String
Get
Return ResourceManager.GetString("IDS_VBCHelp", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Skipping some types in analyzer assembly {0} due to a ReflectionTypeLoadException : {1}..
'''</summary>
Friend ReadOnly Property INF_UnableToLoadSomeTypesInAnalyzer() As String
Get
Return ResourceManager.GetString("INF_UnableToLoadSomeTypesInAnalyzer", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Skip loading types in analyzer assembly that fail due to a ReflectionTypeLoadException.
'''</summary>
Friend ReadOnly Property INF_UnableToLoadSomeTypesInAnalyzer_Title() As String
Get
Return ResourceManager.GetString("INF_UnableToLoadSomeTypesInAnalyzer_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Location must be provided in order to provide minimal type qualification..
'''</summary>
Friend ReadOnly Property LocationMustBeProvided() As String
Get
Return ResourceManager.GetString("LocationMustBeProvided", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Node is not within syntax tree.
'''</summary>
Friend ReadOnly Property NodeIsNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("NodeIsNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to SearchCriteria is expected..
'''</summary>
Friend ReadOnly Property NoNoneSearchCriteria() As String
Get
Return ResourceManager.GetString("NoNoneSearchCriteria", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Not a VB symbol..
'''</summary>
Friend ReadOnly Property NotAVbSymbol() As String
Get
Return ResourceManager.GetString("NotAVbSymbol", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to not within tree.
'''</summary>
Friend ReadOnly Property NotWithinTree() As String
Get
Return ResourceManager.GetString("NotWithinTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to the number of type parameters and arguments should be the same.
'''</summary>
Friend ReadOnly Property NumberOfTypeParametersAndArgumentsMustMatch() As String
Get
Return ResourceManager.GetString("NumberOfTypeParametersAndArgumentsMustMatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Position is not within syntax tree.
'''</summary>
Friend ReadOnly Property PositionIsNotWithinSyntax() As String
Get
Return ResourceManager.GetString("PositionIsNotWithinSyntax", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Position must be within span of the syntax tree..
'''</summary>
Friend ReadOnly Property PositionNotWithinTree() As String
Get
Return ResourceManager.GetString("PositionNotWithinTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to position of type parameter too large.
'''</summary>
Friend ReadOnly Property PositionOfTypeParameterTooLarge() As String
Get
Return ResourceManager.GetString("PositionOfTypeParameterTooLarge", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Properties can not have type arguments.
'''</summary>
Friend ReadOnly Property PropertiesCanNotHaveTypeArguments() As String
Get
Return ResourceManager.GetString("PropertiesCanNotHaveTypeArguments", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to RangeVariableSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property RangeVariableSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("RangeVariableSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to SemanticModel must be provided in order to provide minimal type qualification..
'''</summary>
Friend ReadOnly Property SemanticModelMustBeProvided() As String
Get
Return ResourceManager.GetString("SemanticModelMustBeProvided", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Syntax node to be speculated cannot belong to a syntax tree from the current compilation..
'''</summary>
Friend ReadOnly Property SpeculatedSyntaxNodeCannotBelongToCurrentCompilation() As String
Get
Return ResourceManager.GetString("SpeculatedSyntaxNodeCannotBelongToCurrentCompilation", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to StatementOrExpression is not an ExecutableStatementSyntax or an ExpressionSyntax.
'''</summary>
Friend ReadOnly Property StatementOrExpressionIsNotAValidType() As String
Get
Return ResourceManager.GetString("StatementOrExpressionIsNotAValidType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Submission can have at most one syntax tree..
'''</summary>
Friend ReadOnly Property SubmissionCanHaveAtMostOneSyntaxTree() As String
Get
Return ResourceManager.GetString("SubmissionCanHaveAtMostOneSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Syntax tree already present.
'''</summary>
Friend ReadOnly Property SyntaxTreeAlreadyPresent() As String
Get
Return ResourceManager.GetString("SyntaxTreeAlreadyPresent", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Syntax tree should be created from a submission..
'''</summary>
Friend ReadOnly Property SyntaxTreeIsNotASubmission() As String
Get
Return ResourceManager.GetString("SyntaxTreeIsNotASubmission", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to SyntaxTree '{0}' not found to remove.
'''</summary>
Friend ReadOnly Property SyntaxTreeNotFoundToRemove() As String
Get
Return ResourceManager.GetString("SyntaxTreeNotFoundToRemove", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to There are no pointer types in VB..
'''</summary>
Friend ReadOnly Property ThereAreNoPointerTypesInVB() As String
Get
Return ResourceManager.GetString("ThereAreNoPointerTypesInVB", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to There is no dynamic type in VB..
'''</summary>
Friend ReadOnly Property ThereIsNoDynamicTypeInVB() As String
Get
Return ResourceManager.GetString("ThereIsNoDynamicTypeInVB", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tree must have a root node with SyntaxKind.CompilationUnit.
'''</summary>
Friend ReadOnly Property TreeMustHaveARootNodeWithCompilationUnit() As String
Get
Return ResourceManager.GetString("TreeMustHaveARootNodeWithCompilationUnit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to trees({0}).
'''</summary>
Friend ReadOnly Property Trees0() As String
Get
Return ResourceManager.GetString("Trees0", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to trees({0}) must have root node with SyntaxKind.CompilationUnit..
'''</summary>
Friend ReadOnly Property TreesMustHaveRootNode() As String
Get
Return ResourceManager.GetString("TreesMustHaveRootNode", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type argument cannot be Nothing.
'''</summary>
Friend ReadOnly Property TypeArgumentCannotBeNothing() As String
Get
Return ResourceManager.GetString("TypeArgumentCannotBeNothing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to TypeParameter not within tree.
'''</summary>
Friend ReadOnly Property TypeParameterNotWithinTree() As String
Get
Return ResourceManager.GetString("TypeParameterNotWithinTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to variableSyntax not within syntax tree.
'''</summary>
Friend ReadOnly Property VariableSyntaxNotWithinSyntaxTree() As String
Get
Return ResourceManager.GetString("VariableSyntaxNotWithinSyntaxTree", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion from '{0}' to '{1}' may be ambiguous..
'''</summary>
Friend ReadOnly Property WRN_AmbiguousCastConversion2() As String
Get
Return ResourceManager.GetString("WRN_AmbiguousCastConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Conversion may be ambiguous.
'''</summary>
Friend ReadOnly Property WRN_AmbiguousCastConversion2_Title() As String
Get
Return ResourceManager.GetString("WRN_AmbiguousCastConversion2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An instance of analyzer {0} cannot be created from {1} : {2}..
'''</summary>
Friend ReadOnly Property WRN_AnalyzerCannotBeCreated() As String
Get
Return ResourceManager.GetString("WRN_AnalyzerCannotBeCreated", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Instance of analyzer cannot be created.
'''</summary>
Friend ReadOnly Property WRN_AnalyzerCannotBeCreated_Title() As String
Get
Return ResourceManager.GetString("WRN_AnalyzerCannotBeCreated_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type; 'Object' assumed..
'''</summary>
Friend ReadOnly Property WRN_ArrayInitNoTypeObjectAssumed() As String
Get
Return ResourceManager.GetString("WRN_ArrayInitNoTypeObjectAssumed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type.
'''</summary>
Friend ReadOnly Property WRN_ArrayInitNoTypeObjectAssumed_Title() As String
Get
Return ResourceManager.GetString("WRN_ArrayInitNoTypeObjectAssumed_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type because more than one type is possible; 'Object' assumed..
'''</summary>
Friend ReadOnly Property WRN_ArrayInitTooManyTypesObjectAssumed() As String
Get
Return ResourceManager.GetString("WRN_ArrayInitTooManyTypesObjectAssumed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer an element type because more than one type is possible.
'''</summary>
Friend ReadOnly Property WRN_ArrayInitTooManyTypesObjectAssumed_Title() As String
Get
Return ResourceManager.GetString("WRN_ArrayInitTooManyTypesObjectAssumed_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not CLS-compliant because it overloads '{1}' which differs from it only by array of array parameter types or by the rank of the array parameter types..
'''</summary>
Friend ReadOnly Property WRN_ArrayOverloadsNonCLS2() As String
Get
Return ResourceManager.GetString("WRN_ArrayOverloadsNonCLS2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method is not CLS-compliant because it overloads method which differs from it only by array of array parameter types or by the rank of the array parameter types.
'''</summary>
Friend ReadOnly Property WRN_ArrayOverloadsNonCLS2_Title() As String
Get
Return ResourceManager.GetString("WRN_ArrayOverloadsNonCLS2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' from module '{1}' will be ignored in favor of the instance appearing in source..
'''</summary>
Friend ReadOnly Property WRN_AssemblyAttributeFromModuleIsOverridden() As String
Get
Return ResourceManager.GetString("WRN_AssemblyAttributeFromModuleIsOverridden", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute from module will be ignored in favor of the instance appearing in source.
'''</summary>
Friend ReadOnly Property WRN_AssemblyAttributeFromModuleIsOverridden_Title() As String
Get
Return ResourceManager.GetString("WRN_AssemblyAttributeFromModuleIsOverridden_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Possible problem detected while building assembly: {0}.
'''</summary>
Friend ReadOnly Property WRN_AssemblyGeneration0() As String
Get
Return ResourceManager.GetString("WRN_AssemblyGeneration0", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Possible problem detected while building assembly.
'''</summary>
Friend ReadOnly Property WRN_AssemblyGeneration0_Title() As String
Get
Return ResourceManager.GetString("WRN_AssemblyGeneration0_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Possible problem detected while building assembly '{0}': {1}.
'''</summary>
Friend ReadOnly Property WRN_AssemblyGeneration1() As String
Get
Return ResourceManager.GetString("WRN_AssemblyGeneration1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Possible problem detected while building assembly.
'''</summary>
Friend ReadOnly Property WRN_AssemblyGeneration1_Title() As String
Get
Return ResourceManager.GetString("WRN_AssemblyGeneration1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This async method lacks 'Await' operators and so will run synchronously. Consider using the 'Await' operator to await non-blocking API calls, or 'Await Task.Run(...)' to do CPU-bound work on a background thread..
'''</summary>
Friend ReadOnly Property WRN_AsyncLacksAwaits() As String
Get
Return ResourceManager.GetString("WRN_AsyncLacksAwaits", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This async method lacks 'Await' operators and so will run synchronously.
'''</summary>
Friend ReadOnly Property WRN_AsyncLacksAwaits_Title() As String
Get
Return ResourceManager.GetString("WRN_AsyncLacksAwaits_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Some overloads here take an Async Function rather than an Async Sub. Consider either using an Async Function, or casting this Async Sub explicitly to the desired type..
'''</summary>
Friend ReadOnly Property WRN_AsyncSubCouldBeFunction() As String
Get
Return ResourceManager.GetString("WRN_AsyncSubCouldBeFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Some overloads here take an Async Function rather than an Async Sub.
'''</summary>
Friend ReadOnly Property WRN_AsyncSubCouldBeFunction_Title() As String
Get
Return ResourceManager.GetString("WRN_AsyncSubCouldBeFunction_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute '{0}' is ignored when public signing is specified..
'''</summary>
Friend ReadOnly Property WRN_AttributeIgnoredWhenPublicSigning() As String
Get
Return ResourceManager.GetString("WRN_AttributeIgnoredWhenPublicSigning", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute is ignored when public signing is specified..
'''</summary>
Friend ReadOnly Property WRN_AttributeIgnoredWhenPublicSigning_Title() As String
Get
Return ResourceManager.GetString("WRN_AttributeIgnoredWhenPublicSigning_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bad checksum value, non hex digits or odd number of hex digits..
'''</summary>
Friend ReadOnly Property WRN_BadChecksumValExtChecksum() As String
Get
Return ResourceManager.GetString("WRN_BadChecksumValExtChecksum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bad checksum value, non hex digits or odd number of hex digits.
'''</summary>
Friend ReadOnly Property WRN_BadChecksumValExtChecksum_Title() As String
Get
Return ResourceManager.GetString("WRN_BadChecksumValExtChecksum_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bad GUID format..
'''</summary>
Friend ReadOnly Property WRN_BadGUIDFormatExtChecksum() As String
Get
Return ResourceManager.GetString("WRN_BadGUIDFormatExtChecksum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bad GUID format.
'''</summary>
Friend ReadOnly Property WRN_BadGUIDFormatExtChecksum_Title() As String
Get
Return ResourceManager.GetString("WRN_BadGUIDFormatExtChecksum_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to unrecognized option '{0}'; ignored.
'''</summary>
Friend ReadOnly Property WRN_BadSwitch() As String
Get
Return ResourceManager.GetString("WRN_BadSwitch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unrecognized command-line option.
'''</summary>
Friend ReadOnly Property WRN_BadSwitch_Title() As String
Get
Return ResourceManager.GetString("WRN_BadSwitch_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The language name '{0}' is invalid..
'''</summary>
Friend ReadOnly Property WRN_BadUILang() As String
Get
Return ResourceManager.GetString("WRN_BadUILang", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The language name for /preferreduilang is invalid.
'''</summary>
Friend ReadOnly Property WRN_BadUILang_Title() As String
Get
Return ResourceManager.GetString("WRN_BadUILang_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not CLS-compliant because it derives from '{1}', which is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_BaseClassNotCLSCompliant2() As String
Get
Return ResourceManager.GetString("WRN_BaseClassNotCLSCompliant2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type is not CLS-compliant because it derives from base type that is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_BaseClassNotCLSCompliant2_Title() As String
Get
Return ResourceManager.GetString("WRN_BaseClassNotCLSCompliant2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Could not find standard library '{0}'..
'''</summary>
Friend ReadOnly Property WRN_CannotFindStandardLibrary1() As String
Get
Return ResourceManager.GetString("WRN_CannotFindStandardLibrary1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Could not find standard library.
'''</summary>
Friend ReadOnly Property WRN_CannotFindStandardLibrary1_Title() As String
Get
Return ResourceManager.GetString("WRN_CannotFindStandardLibrary1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to System.CLSCompliantAttribute cannot be applied to property 'Get' or 'Set'..
'''</summary>
Friend ReadOnly Property WRN_CLSAttrInvalidOnGetSet() As String
Get
Return ResourceManager.GetString("WRN_CLSAttrInvalidOnGetSet", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to System.CLSCompliantAttribute cannot be applied to property 'Get' or 'Set'.
'''</summary>
Friend ReadOnly Property WRN_CLSAttrInvalidOnGetSet_Title() As String
Get
Return ResourceManager.GetString("WRN_CLSAttrInvalidOnGetSet_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' method for event '{1}' cannot be marked CLS compliant because its containing type '{2}' is not CLS compliant..
'''</summary>
Friend ReadOnly Property WRN_CLSEventMethodInNonCLSType3() As String
Get
Return ResourceManager.GetString("WRN_CLSEventMethodInNonCLSType3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to AddHandler or RemoveHandler method for event cannot be marked CLS compliant because its containing type is not CLS compliant.
'''</summary>
Friend ReadOnly Property WRN_CLSEventMethodInNonCLSType3_Title() As String
Get
Return ResourceManager.GetString("WRN_CLSEventMethodInNonCLSType3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' cannot be marked CLS-compliant because its containing type '{2}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_CLSMemberInNonCLSType3() As String
Get
Return ResourceManager.GetString("WRN_CLSMemberInNonCLSType3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member cannot be marked CLS-compliant because its containing type is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_CLSMemberInNonCLSType3_Title() As String
Get
Return ResourceManager.GetString("WRN_CLSMemberInNonCLSType3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' on class '{0}' implicitly declares {1} '{2}', which conflicts with a member of the same name in {3} '{4}'. Use 'Microsoft.VisualBasic.ComClassAttribute(InterfaceShadows:=True)' if you want to hide the name on the base {4}..
'''</summary>
Friend ReadOnly Property WRN_ComClassInterfaceShadows5() As String
Get
Return ResourceManager.GetString("WRN_ComClassInterfaceShadows5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' on class implicitly declares member, which conflicts with a member of the same name.
'''</summary>
Friend ReadOnly Property WRN_ComClassInterfaceShadows5_Title() As String
Get
Return ResourceManager.GetString("WRN_ComClassInterfaceShadows5_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' is specified for class '{0}' but '{0}' has no public members that can be exposed to COM; therefore, no COM interfaces are generated..
'''</summary>
Friend ReadOnly Property WRN_ComClassNoMembers1() As String
Get
Return ResourceManager.GetString("WRN_ComClassNoMembers1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Microsoft.VisualBasic.ComClassAttribute' is specified for class but class has no public members that can be exposed to COM.
'''</summary>
Friend ReadOnly Property WRN_ComClassNoMembers1_Title() As String
Get
Return ResourceManager.GetString("WRN_ComClassNoMembers1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be exposed to COM as a property 'Let'. You will not be able to assign non-object values (such as numbers or strings) to this property from Visual Basic 6.0 using a 'Let' statement..
'''</summary>
Friend ReadOnly Property WRN_ComClassPropertySetObject1() As String
Get
Return ResourceManager.GetString("WRN_ComClassPropertySetObject1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property cannot be exposed to COM as a property 'Let'.
'''</summary>
Friend ReadOnly Property WRN_ComClassPropertySetObject1_Title() As String
Get
Return ResourceManager.GetString("WRN_ComClassPropertySetObject1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute 'Conditional' is only valid on 'Sub' declarations..
'''</summary>
Friend ReadOnly Property WRN_ConditionalNotValidOnFunction() As String
Get
Return ResourceManager.GetString("WRN_ConditionalNotValidOnFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attribute 'Conditional' is only valid on 'Sub' declarations.
'''</summary>
Friend ReadOnly Property WRN_ConditionalNotValidOnFunction_Title() As String
Get
Return ResourceManager.GetString("WRN_ConditionalNotValidOnFunction_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Referenced assembly '{0}' targets a different processor..
'''</summary>
Friend ReadOnly Property WRN_ConflictingMachineAssembly() As String
Get
Return ResourceManager.GetString("WRN_ConflictingMachineAssembly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Referenced assembly targets a different processor.
'''</summary>
Friend ReadOnly Property WRN_ConflictingMachineAssembly_Title() As String
Get
Return ResourceManager.GetString("WRN_ConflictingMachineAssembly_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type arguments inferred for method '{0}' result in the following warnings :{1}.
'''</summary>
Friend ReadOnly Property WRN_ConstraintsFailedForInferredArgs2() As String
Get
Return ResourceManager.GetString("WRN_ConstraintsFailedForInferredArgs2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type arguments inferred for method result in warnings.
'''</summary>
Friend ReadOnly Property WRN_ConstraintsFailedForInferredArgs2_Title() As String
Get
Return ResourceManager.GetString("WRN_ConstraintsFailedForInferredArgs2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to System.Diagnostics.DebuggerHiddenAttribute does not affect 'Get' or 'Set' when applied to the Property definition. Apply the attribute directly to the 'Get' and 'Set' procedures as appropriate..
'''</summary>
Friend ReadOnly Property WRN_DebuggerHiddenIgnoredOnProperties() As String
Get
Return ResourceManager.GetString("WRN_DebuggerHiddenIgnoredOnProperties", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to System.Diagnostics.DebuggerHiddenAttribute does not affect 'Get' or 'Set' when applied to the Property definition.
'''</summary>
Friend ReadOnly Property WRN_DebuggerHiddenIgnoredOnProperties_Title() As String
Get
Return ResourceManager.GetString("WRN_DebuggerHiddenIgnoredOnProperties_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function '{0}' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used..
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValFuncRef1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValFuncRef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValFuncRef1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValFuncRef1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function '{0}' doesn't return a value on all code paths. Are you missing a 'Return' statement?.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValFuncVal1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValFuncVal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValFuncVal1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValFuncVal1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used..
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValOpRef1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValOpRef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValOpRef1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValOpRef1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator '{0}' doesn't return a value on all code paths. Are you missing a 'Return' statement?.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValOpVal1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValOpVal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValOpVal1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValOpVal1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used..
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValPropRef1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValPropRef1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValPropRef1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValPropRef1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property '{0}' doesn't return a value on all code paths. Are you missing a 'Return' statement?.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValPropVal1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValPropVal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValPropVal1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValPropVal1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The AddHandler for Windows Runtime event '{0}' doesn't return a value on all code paths. Are you missing a 'Return' statement?.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValWinRtEventVal1() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValWinRtEventVal1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The AddHandler for Windows Runtime event doesn't return a value on all code paths.
'''</summary>
Friend ReadOnly Property WRN_DefAsgNoRetValWinRtEventVal1_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgNoRetValWinRtEventVal1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable '{0}' is used before it has been assigned a value. A null reference exception could result at runtime..
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRef() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable is used before it has been assigned a value.
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRef_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRef_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable '{0}' is passed by reference before it has been assigned a value. A null reference exception could result at runtime..
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRefByRef() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRefByRef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable is passed by reference before it has been assigned a value.
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRefByRef_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRefByRef_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable '{0}' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. Make sure the structure or all the reference members are initialized before use.
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRefByRefStr() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRefByRefStr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable is passed by reference before it has been assigned a value.
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRefByRefStr_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRefByRefStr_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable '{0}' is used before it has been assigned a value. A null reference exception could result at runtime. Make sure the structure or all the reference members are initialized before use.
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRefStr() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRefStr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable is used before it has been assigned a value.
'''</summary>
Friend ReadOnly Property WRN_DefAsgUseNullRefStr_Title() As String
Get
Return ResourceManager.GetString("WRN_DefAsgUseNullRefStr_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Default property '{0}' conflicts with the default property '{1}' in the base {2} '{3}'. '{0}' will be the default property. '{0}' should be declared 'Shadows'..
'''</summary>
Friend ReadOnly Property WRN_DefaultnessShadowed4() As String
Get
Return ResourceManager.GetString("WRN_DefaultnessShadowed4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Default property conflicts with the default property in the base type.
'''</summary>
Friend ReadOnly Property WRN_DefaultnessShadowed4_Title() As String
Get
Return ResourceManager.GetString("WRN_DefaultnessShadowed4_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delay signing was specified and requires a public key, but no public key was specified..
'''</summary>
Friend ReadOnly Property WRN_DelaySignButNoKey() As String
Get
Return ResourceManager.GetString("WRN_DelaySignButNoKey", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delay signing was specified and requires a public key, but no public key was specified.
'''</summary>
Friend ReadOnly Property WRN_DelaySignButNoKey_Title() As String
Get
Return ResourceManager.GetString("WRN_DelaySignButNoKey_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' block never reached; '{0}' handled above in the same Try statement..
'''</summary>
Friend ReadOnly Property WRN_DuplicateCatch() As String
Get
Return ResourceManager.GetString("WRN_DuplicateCatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' block never reached; exception type handled above in the same Try statement.
'''</summary>
Friend ReadOnly Property WRN_DuplicateCatch_Title() As String
Get
Return ResourceManager.GetString("WRN_DuplicateCatch_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The xmlns attribute has special meaning and should not be written with a prefix..
'''</summary>
Friend ReadOnly Property WRN_EmptyPrefixAndXmlnsLocalName() As String
Get
Return ResourceManager.GetString("WRN_EmptyPrefixAndXmlnsLocalName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The xmlns attribute has special meaning and should not be written with a prefix.
'''</summary>
Friend ReadOnly Property WRN_EmptyPrefixAndXmlnsLocalName_Title() As String
Get
Return ResourceManager.GetString("WRN_EmptyPrefixAndXmlnsLocalName_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Underlying type '{0}' of Enum is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_EnumUnderlyingTypeNotCLS1() As String
Get
Return ResourceManager.GetString("WRN_EnumUnderlyingTypeNotCLS1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Underlying type of Enum is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_EnumUnderlyingTypeNotCLS1_Title() As String
Get
Return ResourceManager.GetString("WRN_EnumUnderlyingTypeNotCLS1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This expression will always evaluate to Nothing (due to null propagation from the equals operator). To check if the value is null consider using 'Is Nothing'..
'''</summary>
Friend ReadOnly Property WRN_EqualToLiteralNothing() As String
Get
Return ResourceManager.GetString("WRN_EqualToLiteralNothing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This expression will always evaluate to Nothing.
'''</summary>
Friend ReadOnly Property WRN_EqualToLiteralNothing_Title() As String
Get
Return ResourceManager.GetString("WRN_EqualToLiteralNothing_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegate type '{0}' of event '{1}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_EventDelegateTypeNotCLSCompliant2() As String
Get
Return ResourceManager.GetString("WRN_EventDelegateTypeNotCLSCompliant2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Delegate type of event is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_EventDelegateTypeNotCLSCompliant2_Title() As String
Get
Return ResourceManager.GetString("WRN_EventDelegateTypeNotCLSCompliant2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' in designer-generated type '{1}' should call InitializeComponent method..
'''</summary>
Friend ReadOnly Property WRN_ExpectedInitComponentCall2() As String
Get
Return ResourceManager.GetString("WRN_ExpectedInitComponentCall2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Constructor in designer-generated type should call InitializeComponent method.
'''</summary>
Friend ReadOnly Property WRN_ExpectedInitComponentCall2_Title() As String
Get
Return ResourceManager.GetString("WRN_ExpectedInitComponentCall2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is for evaluation purposes only and is subject to change or removal in future updates..
'''</summary>
Friend ReadOnly Property WRN_Experimental() As String
Get
Return ResourceManager.GetString("WRN_Experimental", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type is for evaluation purposes only and is subject to change or removal in future updates..
'''</summary>
Friend ReadOnly Property WRN_Experimental_Title() As String
Get
Return ResourceManager.GetString("WRN_Experimental_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of member '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_FieldNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_FieldNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of member is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_FieldNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_FieldNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to source file '{0}' specified multiple times.
'''</summary>
Friend ReadOnly Property WRN_FileAlreadyIncluded() As String
Get
Return ResourceManager.GetString("WRN_FileAlreadyIncluded", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Source file specified multiple times.
'''</summary>
Friend ReadOnly Property WRN_FileAlreadyIncluded_Title() As String
Get
Return ResourceManager.GetString("WRN_FileAlreadyIncluded_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generic parameter constraint type '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_GenericConstraintNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_GenericConstraintNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generic parameter constraint type is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_GenericConstraintNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_GenericConstraintNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type; 'Object' assumed..
'''</summary>
Friend ReadOnly Property WRN_IfNoTypeObjectAssumed() As String
Get
Return ResourceManager.GetString("WRN_IfNoTypeObjectAssumed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type.
'''</summary>
Friend ReadOnly Property WRN_IfNoTypeObjectAssumed_Title() As String
Get
Return ResourceManager.GetString("WRN_IfNoTypeObjectAssumed_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type because more than one type is possible; 'Object' assumed..
'''</summary>
Friend ReadOnly Property WRN_IfTooManyTypesObjectAssumed() As String
Get
Return ResourceManager.GetString("WRN_IfTooManyTypesObjectAssumed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a common type because more than one type is possible.
'''</summary>
Friend ReadOnly Property WRN_IfTooManyTypesObjectAssumed_Title() As String
Get
Return ResourceManager.GetString("WRN_IfTooManyTypesObjectAssumed_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option /win32manifest ignored. It can be specified only when the target is an assembly..
'''</summary>
Friend ReadOnly Property WRN_IgnoreModuleManifest() As String
Get
Return ResourceManager.GetString("WRN_IgnoreModuleManifest", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Option /win32manifest ignored.
'''</summary>
Friend ReadOnly Property WRN_IgnoreModuleManifest_Title() As String
Get
Return ResourceManager.GetString("WRN_IgnoreModuleManifest_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion from '{0}' to '{1}'..
'''</summary>
Friend ReadOnly Property WRN_ImplicitConversion2() As String
Get
Return ResourceManager.GetString("WRN_ImplicitConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion.
'''</summary>
Friend ReadOnly Property WRN_ImplicitConversion2_Title() As String
Get
Return ResourceManager.GetString("WRN_ImplicitConversion2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion from '{1}' to '{2}' in copying the value of 'ByRef' parameter '{0}' back to the matching argument..
'''</summary>
Friend ReadOnly Property WRN_ImplicitConversionCopyBack() As String
Get
Return ResourceManager.GetString("WRN_ImplicitConversionCopyBack", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion in copying the value of 'ByRef' parameter back to the matching argument.
'''</summary>
Friend ReadOnly Property WRN_ImplicitConversionCopyBack_Title() As String
Get
Return ResourceManager.GetString("WRN_ImplicitConversionCopyBack_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0}.
'''</summary>
Friend ReadOnly Property WRN_ImplicitConversionSubst1() As String
Get
Return ResourceManager.GetString("WRN_ImplicitConversionSubst1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion.
'''</summary>
Friend ReadOnly Property WRN_ImplicitConversionSubst1_Title() As String
Get
Return ResourceManager.GetString("WRN_ImplicitConversionSubst1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to A reference was created to embedded interop assembly '{0}' because of an indirect reference to that assembly from assembly '{1}'. Consider changing the 'Embed Interop Types' property on either assembly..
'''</summary>
Friend ReadOnly Property WRN_IndirectRefToLinkedAssembly2() As String
Get
Return ResourceManager.GetString("WRN_IndirectRefToLinkedAssembly2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to A reference was created to embedded interop assembly because of an indirect reference to that assembly.
'''</summary>
Friend ReadOnly Property WRN_IndirectRefToLinkedAssembly2_Title() As String
Get
Return ResourceManager.GetString("WRN_IndirectRefToLinkedAssembly2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is not CLS-compliant because the interface '{1}' it inherits from is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_InheritedInterfaceNotCLSCompliant2() As String
Get
Return ResourceManager.GetString("WRN_InheritedInterfaceNotCLSCompliant2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type is not CLS-compliant because the interface it inherits from is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_InheritedInterfaceNotCLSCompliant2_Title() As String
Get
Return ResourceManager.GetString("WRN_InheritedInterfaceNotCLSCompliant2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Runtime errors might occur when converting '{0}' to '{1}'..
'''</summary>
Friend ReadOnly Property WRN_InterfaceConversion2() As String
Get
Return ResourceManager.GetString("WRN_InterfaceConversion2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Runtime errors might occur when converting to or from interface type.
'''</summary>
Friend ReadOnly Property WRN_InterfaceConversion2_Title() As String
Get
Return ResourceManager.GetString("WRN_InterfaceConversion2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Assembly reference '{0}' is invalid and cannot be resolved..
'''</summary>
Friend ReadOnly Property WRN_InvalidAssemblyName() As String
Get
Return ResourceManager.GetString("WRN_InvalidAssemblyName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Assembly reference is invalid and cannot be resolved.
'''</summary>
Friend ReadOnly Property WRN_InvalidAssemblyName_Title() As String
Get
Return ResourceManager.GetString("WRN_InvalidAssemblyName_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot override '{1}' because they differ by their tuple element names..
'''</summary>
Friend ReadOnly Property WRN_InvalidOverrideDueToTupleNames2() As String
Get
Return ResourceManager.GetString("WRN_InvalidOverrideDueToTupleNames2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member cannot override because it differs by its tuple element names..
'''</summary>
Friend ReadOnly Property WRN_InvalidOverrideDueToTupleNames2_Title() As String
Get
Return ResourceManager.GetString("WRN_InvalidOverrideDueToTupleNames2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The specified version string does not conform to the recommended format - major.minor.build.revision.
'''</summary>
Friend ReadOnly Property WRN_InvalidVersionFormat() As String
Get
Return ResourceManager.GetString("WRN_InvalidVersionFormat", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The specified version string does not conform to the recommended format.
'''</summary>
Friend ReadOnly Property WRN_InvalidVersionFormat_Title() As String
Get
Return ResourceManager.GetString("WRN_InvalidVersionFormat_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to warning number '{0}' for the option '{1}' is either not configurable or not valid.
'''</summary>
Friend ReadOnly Property WRN_InvalidWarningId() As String
Get
Return ResourceManager.GetString("WRN_InvalidWarningId", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Warning number is either not configurable or not valid.
'''</summary>
Friend ReadOnly Property WRN_InvalidWarningId_Title() As String
Get
Return ResourceManager.GetString("WRN_InvalidWarningId_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type; 'Object' assumed..
'''</summary>
Friend ReadOnly Property WRN_LambdaNoTypeObjectAssumed() As String
Get
Return ResourceManager.GetString("WRN_LambdaNoTypeObjectAssumed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type.
'''</summary>
Friend ReadOnly Property WRN_LambdaNoTypeObjectAssumed_Title() As String
Get
Return ResourceManager.GetString("WRN_LambdaNoTypeObjectAssumed_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambda expression will not be removed from this event handler. Assign the lambda expression to a variable and use the variable to add and remove the event..
'''</summary>
Friend ReadOnly Property WRN_LambdaPassedToRemoveHandler() As String
Get
Return ResourceManager.GetString("WRN_LambdaPassedToRemoveHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lambda expression will not be removed from this event handler.
'''</summary>
Friend ReadOnly Property WRN_LambdaPassedToRemoveHandler_Title() As String
Get
Return ResourceManager.GetString("WRN_LambdaPassedToRemoveHandler_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type because more than one type is possible; 'Object' assumed..
'''</summary>
Friend ReadOnly Property WRN_LambdaTooManyTypesObjectAssumed() As String
Get
Return ResourceManager.GetString("WRN_LambdaTooManyTypesObjectAssumed", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot infer a return type because more than one type is possible.
'''</summary>
Friend ReadOnly Property WRN_LambdaTooManyTypesObjectAssumed_Title() As String
Get
Return ResourceManager.GetString("WRN_LambdaTooManyTypesObjectAssumed_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Late bound resolution; runtime errors could occur..
'''</summary>
Friend ReadOnly Property WRN_LateBindingResolution() As String
Get
Return ResourceManager.GetString("WRN_LateBindingResolution", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Late bound resolution.
'''</summary>
Friend ReadOnly Property WRN_LateBindingResolution_Title() As String
Get
Return ResourceManager.GetString("WRN_LateBindingResolution_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using the iteration variable in a lambda expression may have unexpected results. Instead, create a local variable within the loop and assign it the value of the iteration variable..
'''</summary>
Friend ReadOnly Property WRN_LiftControlVariableLambda() As String
Get
Return ResourceManager.GetString("WRN_LiftControlVariableLambda", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using the iteration variable in a lambda expression may have unexpected results.
'''</summary>
Friend ReadOnly Property WRN_LiftControlVariableLambda_Title() As String
Get
Return ResourceManager.GetString("WRN_LiftControlVariableLambda_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using the iteration variable in a query expression may have unexpected results. Instead, create a local variable within the loop and assign it the value of the iteration variable..
'''</summary>
Friend ReadOnly Property WRN_LiftControlVariableQuery() As String
Get
Return ResourceManager.GetString("WRN_LiftControlVariableQuery", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using the iteration variable in a query expression may have unexpected results.
'''</summary>
Friend ReadOnly Property WRN_LiftControlVariableQuery_Title() As String
Get
Return ResourceManager.GetString("WRN_LiftControlVariableQuery_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The entry point of the program is global script code; ignoring '{0}' entry point..
'''</summary>
Friend ReadOnly Property WRN_MainIgnored() As String
Get
Return ResourceManager.GetString("WRN_MainIgnored", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The entry point of the program is global script code; ignoring entry point.
'''</summary>
Friend ReadOnly Property WRN_MainIgnored_Title() As String
Get
Return ResourceManager.GetString("WRN_MainIgnored_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' conflicts with a member implicitly declared for {2} '{3}' in the base {4} '{5}' and should be declared 'Shadows'..
'''</summary>
Friend ReadOnly Property WRN_MemberShadowsSynthMember6() As String
Get
Return ResourceManager.GetString("WRN_MemberShadowsSynthMember6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member conflicts with a member implicitly declared for property or event in the base type.
'''</summary>
Friend ReadOnly Property WRN_MemberShadowsSynthMember6_Title() As String
Get
Return ResourceManager.GetString("WRN_MemberShadowsSynthMember6_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function without an 'As' clause; return type of Object assumed..
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinFunction() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinFunction", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinFunction_Title() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinFunction_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator without an 'As' clause; type of Object assumed..
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinOperator() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinOperator", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operator without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinOperator_Title() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinOperator_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property without an 'As' clause; type of Object assumed..
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinProperty() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinProperty_Title() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinProperty_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable declaration without an 'As' clause; type of Object assumed..
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinVarDecl() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinVarDecl", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable declaration without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_MissingAsClauseinVarDecl_Title() As String
Get
Return ResourceManager.GetString("WRN_MissingAsClauseinVarDecl_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to File name already declared with a different GUID and checksum value..
'''</summary>
Friend ReadOnly Property WRN_MultipleDeclFileExtChecksum() As String
Get
Return ResourceManager.GetString("WRN_MultipleDeclFileExtChecksum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to File name already declared with a different GUID and checksum value.
'''</summary>
Friend ReadOnly Property WRN_MultipleDeclFileExtChecksum_Title() As String
Get
Return ResourceManager.GetString("WRN_MultipleDeclFileExtChecksum_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' shadows an overloadable member declared in the base {2} '{3}'. If you want to overload the base method, this method must be declared 'Overloads'..
'''</summary>
Friend ReadOnly Property WRN_MustOverloadBase4() As String
Get
Return ResourceManager.GetString("WRN_MustOverloadBase4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member shadows an overloadable member declared in the base type.
'''</summary>
Friend ReadOnly Property WRN_MustOverloadBase4_Title() As String
Get
Return ResourceManager.GetString("WRN_MustOverloadBase4_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' shadows an overridable method in the base {2} '{3}'. To override the base method, this method must be declared 'Overrides'..
'''</summary>
Friend ReadOnly Property WRN_MustOverride2() As String
Get
Return ResourceManager.GetString("WRN_MustOverride2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member shadows an overridable method in the base type.
'''</summary>
Friend ReadOnly Property WRN_MustOverride2_Title() As String
Get
Return ResourceManager.GetString("WRN_MustOverride2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' conflicts with other members of the same name across the inheritance hierarchy and so should be declared 'Shadows'..
'''</summary>
Friend ReadOnly Property WRN_MustShadowOnMultipleInheritance2() As String
Get
Return ResourceManager.GetString("WRN_MustShadowOnMultipleInheritance2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Method conflicts with other members of the same name across the inheritance hierarchy and so should be declared 'Shadows'.
'''</summary>
Friend ReadOnly Property WRN_MustShadowOnMultipleInheritance2_Title() As String
Get
Return ResourceManager.GetString("WRN_MustShadowOnMultipleInheritance2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable '{0}' is read-only. When its type is a structure, invoking its members or passing it ByRef does not change its content and might lead to unexpected results. Consider declaring this variable outside of the 'Using' block..
'''</summary>
Friend ReadOnly Property WRN_MutableGenericStructureInUsing() As String
Get
Return ResourceManager.GetString("WRN_MutableGenericStructureInUsing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable declared by Using statement is read-only and its type may be a structure.
'''</summary>
Friend ReadOnly Property WRN_MutableGenericStructureInUsing_Title() As String
Get
Return ResourceManager.GetString("WRN_MutableGenericStructureInUsing_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable '{0}' is read-only and its type is a structure. Invoking its members or passing it ByRef does not change its content and might lead to unexpected results. Consider declaring this variable outside of the 'Using' block..
'''</summary>
Friend ReadOnly Property WRN_MutableStructureInUsing() As String
Get
Return ResourceManager.GetString("WRN_MutableStructureInUsing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local variable declared by Using statement is read-only and its type is a structure.
'''</summary>
Friend ReadOnly Property WRN_MutableStructureInUsing_Title() As String
Get
Return ResourceManager.GetString("WRN_MutableStructureInUsing_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_NameNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_NameNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_NameNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_NameNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Casing of namespace name '{0}' does not match casing of namespace name '{1}' in '{2}'..
'''</summary>
Friend ReadOnly Property WRN_NamespaceCaseMismatch3() As String
Get
Return ResourceManager.GetString("WRN_NamespaceCaseMismatch3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Casing of namespace name does not match.
'''</summary>
Friend ReadOnly Property WRN_NamespaceCaseMismatch3_Title() As String
Get
Return ResourceManager.GetString("WRN_NamespaceCaseMismatch3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The assembly {0} does not contain any analyzers..
'''</summary>
Friend ReadOnly Property WRN_NoAnalyzerInAssembly() As String
Get
Return ResourceManager.GetString("WRN_NoAnalyzerInAssembly", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Assembly does not contain any analyzers.
'''</summary>
Friend ReadOnly Property WRN_NoAnalyzerInAssembly_Title() As String
Get
Return ResourceManager.GetString("WRN_NoAnalyzerInAssembly_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ignoring /noconfig option because it was specified in a response file.
'''</summary>
Friend ReadOnly Property WRN_NoConfigInResponseFile() As String
Get
Return ResourceManager.GetString("WRN_NoConfigInResponseFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Ignoring /noconfig option because it was specified in a response file.
'''</summary>
Friend ReadOnly Property WRN_NoConfigInResponseFile_Title() As String
Get
Return ResourceManager.GetString("WRN_NoConfigInResponseFile_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Non CLS-compliant '{0}' is not allowed in a CLS-compliant interface..
'''</summary>
Friend ReadOnly Property WRN_NonCLSMemberInCLSInterface1() As String
Get
Return ResourceManager.GetString("WRN_NonCLSMemberInCLSInterface1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Non CLS-compliant member is not allowed in a CLS-compliant interface.
'''</summary>
Friend ReadOnly Property WRN_NonCLSMemberInCLSInterface1_Title() As String
Get
Return ResourceManager.GetString("WRN_NonCLSMemberInCLSInterface1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Non CLS-compliant 'MustOverride' member is not allowed in CLS-compliant type '{0}'..
'''</summary>
Friend ReadOnly Property WRN_NonCLSMustOverrideInCLSType1() As String
Get
Return ResourceManager.GetString("WRN_NonCLSMustOverrideInCLSType1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Non CLS-compliant 'MustOverride' member is not allowed in CLS-compliant type.
'''</summary>
Friend ReadOnly Property WRN_NonCLSMustOverrideInCLSType1_Title() As String
Get
Return ResourceManager.GetString("WRN_NonCLSMustOverrideInCLSType1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' should declare a 'Sub New' because the '{1}' in its base class '{2}' is marked obsolete..
'''</summary>
Friend ReadOnly Property WRN_NoNonObsoleteConstructorOnBase3() As String
Get
Return ResourceManager.GetString("WRN_NoNonObsoleteConstructorOnBase3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class should declare a 'Sub New' because the constructor in its base class is marked obsolete.
'''</summary>
Friend ReadOnly Property WRN_NoNonObsoleteConstructorOnBase3_Title() As String
Get
Return ResourceManager.GetString("WRN_NoNonObsoleteConstructorOnBase3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class '{0}' should declare a 'Sub New' because the '{1}' in its base class '{2}' is marked obsolete: '{3}'..
'''</summary>
Friend ReadOnly Property WRN_NoNonObsoleteConstructorOnBase4() As String
Get
Return ResourceManager.GetString("WRN_NoNonObsoleteConstructorOnBase4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Class should declare a 'Sub New' because the constructor in its base class is marked obsolete.
'''</summary>
Friend ReadOnly Property WRN_NoNonObsoleteConstructorOnBase4_Title() As String
Get
Return ResourceManager.GetString("WRN_NoNonObsoleteConstructorOnBase4_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This expression will always evaluate to Nothing (due to null propagation from the equals operator). To check if the value is not null consider using 'IsNot Nothing'..
'''</summary>
Friend ReadOnly Property WRN_NotEqualToLiteralNothing() As String
Get
Return ResourceManager.GetString("WRN_NotEqualToLiteralNothing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This expression will always evaluate to Nothing.
'''</summary>
Friend ReadOnly Property WRN_NotEqualToLiteralNothing_Title() As String
Get
Return ResourceManager.GetString("WRN_NotEqualToLiteralNothing_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0}.
'''</summary>
Friend ReadOnly Property WRN_ObjectAssumed1() As String
Get
Return ResourceManager.GetString("WRN_ObjectAssumed1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Function without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_ObjectAssumed1_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectAssumed1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0}.
'''</summary>
Friend ReadOnly Property WRN_ObjectAssumedProperty1() As String
Get
Return ResourceManager.GetString("WRN_ObjectAssumedProperty1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_ObjectAssumedProperty1_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectAssumedProperty1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0}.
'''</summary>
Friend ReadOnly Property WRN_ObjectAssumedVar1() As String
Get
Return ResourceManager.GetString("WRN_ObjectAssumedVar1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Variable declaration without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_ObjectAssumedVar1_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectAssumedVar1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used for operator '{0}'; use the 'Is' operator to test object identity..
'''</summary>
Friend ReadOnly Property WRN_ObjectMath1() As String
Get
Return ResourceManager.GetString("WRN_ObjectMath1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used for operator.
'''</summary>
Friend ReadOnly Property WRN_ObjectMath1_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectMath1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used for operator '{0}'; use the 'IsNot' operator to test object identity..
'''</summary>
Friend ReadOnly Property WRN_ObjectMath1Not() As String
Get
Return ResourceManager.GetString("WRN_ObjectMath1Not", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used for operator <>.
'''</summary>
Friend ReadOnly Property WRN_ObjectMath1Not_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectMath1Not_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used for operator '{0}'; runtime errors could occur..
'''</summary>
Friend ReadOnly Property WRN_ObjectMath2() As String
Get
Return ResourceManager.GetString("WRN_ObjectMath2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used for operator.
'''</summary>
Friend ReadOnly Property WRN_ObjectMath2_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectMath2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used in expressions for 'Select', 'Case' statements; runtime errors could occur..
'''</summary>
Friend ReadOnly Property WRN_ObjectMathSelectCase() As String
Get
Return ResourceManager.GetString("WRN_ObjectMathSelectCase", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Operands of type Object used in expressions for 'Select', 'Case' statements.
'''</summary>
Friend ReadOnly Property WRN_ObjectMathSelectCase_Title() As String
Get
Return ResourceManager.GetString("WRN_ObjectMathSelectCase_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using DirectCast operator to cast a value-type to the same type is obsolete..
'''</summary>
Friend ReadOnly Property WRN_ObsoleteIdentityDirectCastForValueType() As String
Get
Return ResourceManager.GetString("WRN_ObsoleteIdentityDirectCastForValueType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Using DirectCast operator to cast a value-type to the same type is obsolete.
'''</summary>
Friend ReadOnly Property WRN_ObsoleteIdentityDirectCastForValueType_Title() As String
Get
Return ResourceManager.GetString("WRN_ObsoleteIdentityDirectCastForValueType_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of optional value for optional parameter '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_OptionalValueNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_OptionalValueNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of optional value for optional parameter is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_OptionalValueNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_OptionalValueNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' block never reached, because '{0}' inherits from '{1}'..
'''</summary>
Friend ReadOnly Property WRN_OverlappingCatch() As String
Get
Return ResourceManager.GetString("WRN_OverlappingCatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to 'Catch' block never reached; exception type's base type handled above in the same Try statement.
'''</summary>
Friend ReadOnly Property WRN_OverlappingCatch_Title() As String
Get
Return ResourceManager.GetString("WRN_OverlappingCatch_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' conflicts with {2} '{1}' in the base {3} '{4}' and should be declared 'Shadows'..
'''</summary>
Friend ReadOnly Property WRN_OverrideType5() As String
Get
Return ResourceManager.GetString("WRN_OverrideType5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Member conflicts with member in the base type and should be declared 'Shadows'.
'''</summary>
Friend ReadOnly Property WRN_OverrideType5_Title() As String
Get
Return ResourceManager.GetString("WRN_OverrideType5_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of parameter '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_ParamNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_ParamNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type of parameter is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_ParamNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_ParamNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local name '{0}' is too long for PDB. Consider shortening or compiling without /debug..
'''</summary>
Friend ReadOnly Property WRN_PdbLocalNameTooLong() As String
Get
Return ResourceManager.GetString("WRN_PdbLocalNameTooLong", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Local name is too long for PDB.
'''</summary>
Friend ReadOnly Property WRN_PdbLocalNameTooLong_Title() As String
Get
Return ResourceManager.GetString("WRN_PdbLocalNameTooLong_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Import string '{0}' is too long for PDB. Consider shortening or compiling without /debug..
'''</summary>
Friend ReadOnly Property WRN_PdbUsingNameTooLong() As String
Get
Return ResourceManager.GetString("WRN_PdbUsingNameTooLong", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Import string is too long for PDB.
'''</summary>
Friend ReadOnly Property WRN_PdbUsingNameTooLong_Title() As String
Get
Return ResourceManager.GetString("WRN_PdbUsingNameTooLong_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to It is not recommended to have attributes named xmlns. Did you mean to write 'xmlns:{0}' to define a prefix named '{0}'?.
'''</summary>
Friend ReadOnly Property WRN_PrefixAndXmlnsLocalName() As String
Get
Return ResourceManager.GetString("WRN_PrefixAndXmlnsLocalName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to It is not recommended to have attributes named xmlns.
'''</summary>
Friend ReadOnly Property WRN_PrefixAndXmlnsLocalName_Title() As String
Get
Return ResourceManager.GetString("WRN_PrefixAndXmlnsLocalName_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Return type of function '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_ProcTypeNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_ProcTypeNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Return type of function is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_ProcTypeNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_ProcTypeNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable is assumed to be of type Object because its type cannot be inferred. Use an 'As' clause to specify a different type..
'''</summary>
Friend ReadOnly Property WRN_QueryMissingAsClauseinVarDecl() As String
Get
Return ResourceManager.GetString("WRN_QueryMissingAsClauseinVarDecl", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range variable is assumed to be of type Object because its type cannot be inferred.
'''</summary>
Friend ReadOnly Property WRN_QueryMissingAsClauseinVarDecl_Title() As String
Get
Return ResourceManager.GetString("WRN_QueryMissingAsClauseinVarDecl_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement recursively calls the containing '{0}' for event '{1}'..
'''</summary>
Friend ReadOnly Property WRN_RecursiveAddHandlerCall() As String
Get
Return ResourceManager.GetString("WRN_RecursiveAddHandlerCall", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Statement recursively calls the event's containing AddHandler.
'''</summary>
Friend ReadOnly Property WRN_RecursiveAddHandlerCall_Title() As String
Get
Return ResourceManager.GetString("WRN_RecursiveAddHandlerCall_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression recursively calls the containing Operator '{0}'..
'''</summary>
Friend ReadOnly Property WRN_RecursiveOperatorCall() As String
Get
Return ResourceManager.GetString("WRN_RecursiveOperatorCall", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression recursively calls the containing Operator.
'''</summary>
Friend ReadOnly Property WRN_RecursiveOperatorCall_Title() As String
Get
Return ResourceManager.GetString("WRN_RecursiveOperatorCall_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression recursively calls the containing property '{0}'..
'''</summary>
Friend ReadOnly Property WRN_RecursivePropertyCall() As String
Get
Return ResourceManager.GetString("WRN_RecursivePropertyCall", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expression recursively calls the containing property.
'''</summary>
Friend ReadOnly Property WRN_RecursivePropertyCall_Title() As String
Get
Return ResourceManager.GetString("WRN_RecursivePropertyCall_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Referenced assembly '{0}' has different culture setting of '{1}'..
'''</summary>
Friend ReadOnly Property WRN_RefCultureMismatch() As String
Get
Return ResourceManager.GetString("WRN_RefCultureMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Referenced assembly has different culture setting.
'''</summary>
Friend ReadOnly Property WRN_RefCultureMismatch_Title() As String
Get
Return ResourceManager.GetString("WRN_RefCultureMismatch_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Referenced assembly '{0}' does not have a strong name..
'''</summary>
Friend ReadOnly Property WRN_ReferencedAssemblyDoesNotHaveStrongName() As String
Get
Return ResourceManager.GetString("WRN_ReferencedAssemblyDoesNotHaveStrongName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Referenced assembly does not have a strong name.
'''</summary>
Friend ReadOnly Property WRN_ReferencedAssemblyDoesNotHaveStrongName_Title() As String
Get
Return ResourceManager.GetString("WRN_ReferencedAssemblyDoesNotHaveStrongName_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The 'AddressOf' expression has no effect in this context because the method argument to 'AddressOf' requires a relaxed conversion to the delegate type of the event. Assign the 'AddressOf' expression to a variable, and use the variable to add or remove the method as the handler..
'''</summary>
Friend ReadOnly Property WRN_RelDelegatePassedToRemoveHandler() As String
Get
Return ResourceManager.GetString("WRN_RelDelegatePassedToRemoveHandler", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The 'AddressOf' expression has no effect in this context because the method argument to 'AddressOf' requires a relaxed conversion to the delegate type of the event.
'''</summary>
Friend ReadOnly Property WRN_RelDelegatePassedToRemoveHandler_Title() As String
Get
Return ResourceManager.GetString("WRN_RelDelegatePassedToRemoveHandler_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' should be an explicit call to 'MyBase.New' or 'MyClass.New' because the '{0}' in the base class '{1}' of '{2}' is marked obsolete..
'''</summary>
Friend ReadOnly Property WRN_RequiredNonObsoleteNewCall3() As String
Get
Return ResourceManager.GetString("WRN_RequiredNonObsoleteNewCall3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' should be an explicit call to 'MyBase.New' or 'MyClass.New' because the constructor in the base class is marked obsolete.
'''</summary>
Friend ReadOnly Property WRN_RequiredNonObsoleteNewCall3_Title() As String
Get
Return ResourceManager.GetString("WRN_RequiredNonObsoleteNewCall3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' should be an explicit call to 'MyBase.New' or 'MyClass.New' because the '{0}' in the base class '{1}' of '{2}' is marked obsolete: '{3}'.
'''</summary>
Friend ReadOnly Property WRN_RequiredNonObsoleteNewCall4() As String
Get
Return ResourceManager.GetString("WRN_RequiredNonObsoleteNewCall4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to First statement of this 'Sub New' should be an explicit call to 'MyBase.New' or 'MyClass.New' because the constructor in the base class is marked obsolete.
'''</summary>
Friend ReadOnly Property WRN_RequiredNonObsoleteNewCall4_Title() As String
Get
Return ResourceManager.GetString("WRN_RequiredNonObsoleteNewCall4_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attributes applied on a return type of a WriteOnly Property have no effect..
'''</summary>
Friend ReadOnly Property WRN_ReturnTypeAttributeOnWriteOnlyProperty() As String
Get
Return ResourceManager.GetString("WRN_ReturnTypeAttributeOnWriteOnlyProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Attributes applied on a return type of a WriteOnly Property have no effect.
'''</summary>
Friend ReadOnly Property WRN_ReturnTypeAttributeOnWriteOnlyProperty_Title() As String
Get
Return ResourceManager.GetString("WRN_ReturnTypeAttributeOnWriteOnlyProperty_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Root namespace '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_RootNamespaceNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_RootNamespaceNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Root namespace is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_RootNamespaceNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_RootNamespaceNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name '{0}' in the root namespace '{1}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_RootNamespaceNotCLSCompliant2() As String
Get
Return ResourceManager.GetString("WRN_RootNamespaceNotCLSCompliant2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Part of the root namespace is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_RootNamespaceNotCLSCompliant2_Title() As String
Get
Return ResourceManager.GetString("WRN_RootNamespaceNotCLSCompliant2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range specified for 'Case' statement is not valid. Make sure that the lower bound is less than or equal to the upper bound..
'''</summary>
Friend ReadOnly Property WRN_SelectCaseInvalidRange() As String
Get
Return ResourceManager.GetString("WRN_SelectCaseInvalidRange", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Range specified for 'Case' statement is not valid.
'''</summary>
Friend ReadOnly Property WRN_SelectCaseInvalidRange_Title() As String
Get
Return ResourceManager.GetString("WRN_SelectCaseInvalidRange_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter '{0}' has the same name as a type parameter of an enclosing type. Enclosing type's type parameter will be shadowed..
'''</summary>
Friend ReadOnly Property WRN_ShadowingGenericParamWithParam1() As String
Get
Return ResourceManager.GetString("WRN_ShadowingGenericParamWithParam1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type parameter has the same name as a type parameter of an enclosing type.
'''</summary>
Friend ReadOnly Property WRN_ShadowingGenericParamWithParam1_Title() As String
Get
Return ResourceManager.GetString("WRN_ShadowingGenericParamWithParam1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated..
'''</summary>
Friend ReadOnly Property WRN_SharedMemberThroughInstance() As String
Get
Return ResourceManager.GetString("WRN_SharedMemberThroughInstance", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Access of shared member, constant member, enum member or nested type through an instance.
'''</summary>
Friend ReadOnly Property WRN_SharedMemberThroughInstance_Title() As String
Get
Return ResourceManager.GetString("WRN_SharedMemberThroughInstance_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Static variable declared without an 'As' clause; type of Object assumed..
'''</summary>
Friend ReadOnly Property WRN_StaticLocalNoInference() As String
Get
Return ResourceManager.GetString("WRN_StaticLocalNoInference", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Static variable declared without an 'As' clause.
'''</summary>
Friend ReadOnly Property WRN_StaticLocalNoInference_Title() As String
Get
Return ResourceManager.GetString("WRN_StaticLocalNoInference_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' implicitly declares '{2}', which conflicts with a member in the base {3} '{4}', and so the {0} should be declared 'Shadows'..
'''</summary>
Friend ReadOnly Property WRN_SynthMemberShadowsMember5() As String
Get
Return ResourceManager.GetString("WRN_SynthMemberShadowsMember5", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property or event implicitly declares type or member that conflicts with a member in the base type.
'''</summary>
Friend ReadOnly Property WRN_SynthMemberShadowsMember5_Title() As String
Get
Return ResourceManager.GetString("WRN_SynthMemberShadowsMember5_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' implicitly declares '{2}', which conflicts with a member implicitly declared for {3} '{4}' in the base {5} '{6}'. {0} should be declared 'Shadows'..
'''</summary>
Friend ReadOnly Property WRN_SynthMemberShadowsSynthMember7() As String
Get
Return ResourceManager.GetString("WRN_SynthMemberShadowsSynthMember7", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property or event implicitly declares member, which conflicts with a member implicitly declared for property or event in the base type.
'''</summary>
Friend ReadOnly Property WRN_SynthMemberShadowsSynthMember7_Title() As String
Get
Return ResourceManager.GetString("WRN_SynthMemberShadowsSynthMember7_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The tuple element name '{0}' is ignored because a different name or no name is specified by the target type '{1}'..
'''</summary>
Friend ReadOnly Property WRN_TupleLiteralNameMismatch() As String
Get
Return ResourceManager.GetString("WRN_TupleLiteralNameMismatch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The tuple element name is ignored because a different name or no name is specified by the assignment target..
'''</summary>
Friend ReadOnly Property WRN_TupleLiteralNameMismatch_Title() As String
Get
Return ResourceManager.GetString("WRN_TupleLiteralNameMismatch_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to {0} '{1}' and partial {2} '{3}' conflict in {4} '{5}', but are being merged because one of them is declared partial..
'''</summary>
Friend ReadOnly Property WRN_TypeConflictButMerged6() As String
Get
Return ResourceManager.GetString("WRN_TypeConflictButMerged6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type and partial type conflict, but are being merged because one of them is declared partial.
'''</summary>
Friend ReadOnly Property WRN_TypeConflictButMerged6_Title() As String
Get
Return ResourceManager.GetString("WRN_TypeConflictButMerged6_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type of '{0}' in '{1}' could not be inferred. '{2}' assumed..
'''</summary>
Friend ReadOnly Property WRN_TypeInferenceAssumed3() As String
Get
Return ResourceManager.GetString("WRN_TypeInferenceAssumed3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Data type could not be inferred.
'''</summary>
Friend ReadOnly Property WRN_TypeInferenceAssumed3_Title() As String
Get
Return ResourceManager.GetString("WRN_TypeInferenceAssumed3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type '{0}' is not CLS-compliant..
'''</summary>
Friend ReadOnly Property WRN_TypeNotCLSCompliant1() As String
Get
Return ResourceManager.GetString("WRN_TypeNotCLSCompliant1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type is not CLS-compliant.
'''</summary>
Friend ReadOnly Property WRN_TypeNotCLSCompliant1_Title() As String
Get
Return ResourceManager.GetString("WRN_TypeNotCLSCompliant1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to load analyzer assembly {0} : {1}..
'''</summary>
Friend ReadOnly Property WRN_UnableToLoadAnalyzer() As String
Get
Return ResourceManager.GetString("WRN_UnableToLoadAnalyzer", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to load analyzer assembly.
'''</summary>
Friend ReadOnly Property WRN_UnableToLoadAnalyzer_Title() As String
Get
Return ResourceManager.GetString("WRN_UnableToLoadAnalyzer_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace or type specified in the Imports '{0}' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases..
'''</summary>
Friend ReadOnly Property WRN_UndefinedOrEmptyNamespaceOrClass1() As String
Get
Return ResourceManager.GetString("WRN_UndefinedOrEmptyNamespaceOrClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace or type specified in Imports statement doesn't contain any public member or cannot be found.
'''</summary>
Friend ReadOnly Property WRN_UndefinedOrEmptyNamespaceOrClass1_Title() As String
Get
Return ResourceManager.GetString("WRN_UndefinedOrEmptyNamespaceOrClass1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace or type specified in the project-level Imports '{0}' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases..
'''</summary>
Friend ReadOnly Property WRN_UndefinedOrEmptyProjectNamespaceOrClass1() As String
Get
Return ResourceManager.GetString("WRN_UndefinedOrEmptyProjectNamespaceOrClass1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Namespace or type imported at project level doesn't contain any public member or cannot be found.
'''</summary>
Friend ReadOnly Property WRN_UndefinedOrEmptyProjectNamespaceOrClass1_Title() As String
Get
Return ResourceManager.GetString("WRN_UndefinedOrEmptyProjectNamespaceOrClass1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The command line switch '{0}' is not yet implemented and was ignored..
'''</summary>
Friend ReadOnly Property WRN_UnimplementedCommandLineSwitch() As String
Get
Return ResourceManager.GetString("WRN_UnimplementedCommandLineSwitch", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Command line switch is not yet implemented.
'''</summary>
Friend ReadOnly Property WRN_UnimplementedCommandLineSwitch_Title() As String
Get
Return ResourceManager.GetString("WRN_UnimplementedCommandLineSwitch_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The Task returned from this Async Function will be dropped, and any exceptions in it ignored. Consider changing it to an Async Sub so its exceptions are propagated..
'''</summary>
Friend ReadOnly Property WRN_UnobservedAwaitableDelegate() As String
Get
Return ResourceManager.GetString("WRN_UnobservedAwaitableDelegate", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The Task returned from this Async Function will be dropped, and any exceptions in it ignored.
'''</summary>
Friend ReadOnly Property WRN_UnobservedAwaitableDelegate_Title() As String
Get
Return ResourceManager.GetString("WRN_UnobservedAwaitableDelegate_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the Await operator to the result of the call..
'''</summary>
Friend ReadOnly Property WRN_UnobservedAwaitableExpression() As String
Get
Return ResourceManager.GetString("WRN_UnobservedAwaitableExpression", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Because this call is not awaited, execution of the current method continues before the call is completed.
'''</summary>
Friend ReadOnly Property WRN_UnobservedAwaitableExpression_Title() As String
Get
Return ResourceManager.GetString("WRN_UnobservedAwaitableExpression_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unreachable code detected..
'''</summary>
Friend ReadOnly Property WRN_UnreachableCode() As String
Get
Return ResourceManager.GetString("WRN_UnreachableCode", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unreachable code detected.
'''</summary>
Friend ReadOnly Property WRN_UnreachableCode_Title() As String
Get
Return ResourceManager.GetString("WRN_UnreachableCode_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused local variable: '{0}'..
'''</summary>
Friend ReadOnly Property WRN_UnusedLocal() As String
Get
Return ResourceManager.GetString("WRN_UnusedLocal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused local variable.
'''</summary>
Friend ReadOnly Property WRN_UnusedLocal_Title() As String
Get
Return ResourceManager.GetString("WRN_UnusedLocal_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused local constant: '{0}'..
'''</summary>
Friend ReadOnly Property WRN_UnusedLocalConst() As String
Get
Return ResourceManager.GetString("WRN_UnusedLocalConst", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unused local constant.
'''</summary>
Friend ReadOnly Property WRN_UnusedLocalConst_Title() As String
Get
Return ResourceManager.GetString("WRN_UnusedLocalConst_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' accessor of '{1}' is obsolete..
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoletePropertyAccessor2() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoletePropertyAccessor2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property accessor is obsolete.
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoletePropertyAccessor2_Title() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoletePropertyAccessor2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' accessor of '{1}' is obsolete: '{2}'..
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoletePropertyAccessor3() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoletePropertyAccessor3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Property accessor is obsolete.
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoletePropertyAccessor3_Title() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoletePropertyAccessor3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is obsolete: '{1}'..
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoleteSymbol2() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoleteSymbol2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type or member is obsolete.
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoleteSymbol2_Title() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoleteSymbol2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' is obsolete..
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoleteSymbolNoMessage1() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoleteSymbolNoMessage1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type or member is obsolete.
'''</summary>
Friend ReadOnly Property WRN_UseOfObsoleteSymbolNoMessage1_Title() As String
Get
Return ResourceManager.GetString("WRN_UseOfObsoleteSymbolNoMessage1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Use command-line option '{0}' or appropriate project settings instead of '{1}'..
'''</summary>
Friend ReadOnly Property WRN_UseSwitchInsteadOfAttribute() As String
Get
Return ResourceManager.GetString("WRN_UseSwitchInsteadOfAttribute", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Use command-line option /keyfile, /keycontainer, or /delaysign instead of AssemblyKeyFileAttribute, AssemblyKeyNameAttribute, or AssemblyDelaySignAttribute.
'''</summary>
Friend ReadOnly Property WRN_UseSwitchInsteadOfAttribute_Title() As String
Get
Return ResourceManager.GetString("WRN_UseSwitchInsteadOfAttribute_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot convert '{0}' to '{1}'. You can use the 'Value' property to get the string value of the first element of '{2}'..
'''</summary>
Friend ReadOnly Property WRN_UseValueForXmlExpression3() As String
Get
Return ResourceManager.GetString("WRN_UseValueForXmlExpression3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Cannot convert IEnumerable(Of XElement) to String.
'''</summary>
Friend ReadOnly Property WRN_UseValueForXmlExpression3_Title() As String
Get
Return ResourceManager.GetString("WRN_UseValueForXmlExpression3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion from '{4}' to '{5}'; this conversion may fail because '{0}' is not derived from '{1}', as required for the 'In' generic parameter '{2}' in '{3}'..
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedIn6() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedIn6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion; this conversion may fail because the target type is not derived from the source type, as required for 'In' generic parameter.
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedIn6_Title() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedIn6_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion from '{4}' to '{5}'; this conversion may fail because '{0}' is not derived from '{1}', as required for the 'Out' generic parameter '{2}' in '{3}'..
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedOut6() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedOut6", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Implicit conversion; this conversion may fail because the target type is not derived from the source type, as required for 'Out' generic parameter.
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedOut6_Title() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedOut6_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be converted to '{1}'. Consider changing the '{2}' in the definition of '{3}' to an In type parameter, 'In {2}'..
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedTryIn4() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedTryIn4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type cannot be converted to target type.
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedTryIn4_Title() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedTryIn4_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be converted to '{1}'. Consider changing the '{2}' in the definition of '{3}' to an Out type parameter, 'Out {2}'..
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedTryOut4() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedTryOut4", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type cannot be converted to target type.
'''</summary>
Friend ReadOnly Property WRN_VarianceConversionFailedTryOut4_Title() As String
Get
Return ResourceManager.GetString("WRN_VarianceConversionFailedTryOut4_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface '{0}' is ambiguous with another implemented interface '{1}' due to the 'In' and 'Out' parameters in '{2}'..
'''</summary>
Friend ReadOnly Property WRN_VarianceDeclarationAmbiguous3() As String
Get
Return ResourceManager.GetString("WRN_VarianceDeclarationAmbiguous3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Interface is ambiguous with another implemented interface due to 'In' and 'Out' parameters.
'''</summary>
Friend ReadOnly Property WRN_VarianceDeclarationAmbiguous3_Title() As String
Get
Return ResourceManager.GetString("WRN_VarianceDeclarationAmbiguous3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to '{0}' cannot be converted to '{1}'. Consider using '{2}' instead..
'''</summary>
Friend ReadOnly Property WRN_VarianceIEnumerableSuggestion3() As String
Get
Return ResourceManager.GetString("WRN_VarianceIEnumerableSuggestion3", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type cannot be converted to target collection type.
'''</summary>
Friend ReadOnly Property WRN_VarianceIEnumerableSuggestion3_Title() As String
Get
Return ResourceManager.GetString("WRN_VarianceIEnumerableSuggestion3_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to create XML documentation file '{0}': {1}.
'''</summary>
Friend ReadOnly Property WRN_XMLCannotWriteToXMLDocFile2() As String
Get
Return ResourceManager.GetString("WRN_XMLCannotWriteToXMLDocFile2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to create XML documentation file.
'''</summary>
Friend ReadOnly Property WRN_XMLCannotWriteToXMLDocFile2_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLCannotWriteToXMLDocFile2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to include XML fragment '{1}' of file '{0}'. {2}.
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadFormedXML() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadFormedXML", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to include XML fragment.
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadFormedXML_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadFormedXML_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment type parameter '{0}' does not match a type parameter on the corresponding '{1}' statement..
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadGenericParamTag2() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadGenericParamTag2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment type parameter does not match a type parameter on the corresponding declaration statement.
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadGenericParamTag2_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadGenericParamTag2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment parameter '{0}' does not match a parameter on the corresponding '{1}' statement..
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadParamTag2() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadParamTag2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment parameter does not match a parameter on the corresponding declaration statement.
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadParamTag2_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadParamTag2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment block must immediately precede the language element to which it applies. XML comment will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadXMLLine() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadXMLLine", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment block must immediately precede the language element to which it applies.
'''</summary>
Friend ReadOnly Property WRN_XMLDocBadXMLLine_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocBadXMLLine_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment has a tag with a 'cref' attribute '{0}' that could not be resolved..
'''</summary>
Friend ReadOnly Property WRN_XMLDocCrefAttributeNotFound1() As String
Get
Return ResourceManager.GetString("WRN_XMLDocCrefAttributeNotFound1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment has a tag with a 'cref' attribute that could not be resolved.
'''</summary>
Friend ReadOnly Property WRN_XMLDocCrefAttributeNotFound1_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocCrefAttributeNotFound1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment has a tag with a 'cref' attribute '{0}' that bound to a type parameter. Use the <typeparamref> tag instead..
'''</summary>
Friend ReadOnly Property WRN_XMLDocCrefToTypeParameter() As String
Get
Return ResourceManager.GetString("WRN_XMLDocCrefToTypeParameter", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment has a tag with a 'cref' attribute that bound to a type parameter.
'''</summary>
Friend ReadOnly Property WRN_XMLDocCrefToTypeParameter_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocCrefToTypeParameter_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag '{0}' appears with identical attributes more than once in the same XML comment block..
'''</summary>
Friend ReadOnly Property WRN_XMLDocDuplicateXMLNode1() As String
Get
Return ResourceManager.GetString("WRN_XMLDocDuplicateXMLNode1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag appears with identical attributes more than once in the same XML comment block.
'''</summary>
Friend ReadOnly Property WRN_XMLDocDuplicateXMLNode1_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocDuplicateXMLNode1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment exception must have a 'cref' attribute..
'''</summary>
Friend ReadOnly Property WRN_XMLDocExceptionTagWithoutCRef() As String
Get
Return ResourceManager.GetString("WRN_XMLDocExceptionTagWithoutCRef", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment exception must have a 'cref' attribute.
'''</summary>
Friend ReadOnly Property WRN_XMLDocExceptionTagWithoutCRef_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocExceptionTagWithoutCRef_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment type parameter must have a 'name' attribute..
'''</summary>
Friend ReadOnly Property WRN_XMLDocGenericParamTagWithoutName() As String
Get
Return ResourceManager.GetString("WRN_XMLDocGenericParamTagWithoutName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment type parameter must have a 'name' attribute.
'''</summary>
Friend ReadOnly Property WRN_XMLDocGenericParamTagWithoutName_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocGenericParamTagWithoutName_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag '{0}' is not permitted on a '{1}' language element..
'''</summary>
Friend ReadOnly Property WRN_XMLDocIllegalTagOnElement2() As String
Get
Return ResourceManager.GetString("WRN_XMLDocIllegalTagOnElement2", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag is not permitted on language element.
'''</summary>
Friend ReadOnly Property WRN_XMLDocIllegalTagOnElement2_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocIllegalTagOnElement2_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment cannot appear within a method or a property. XML comment will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLDocInsideMethod() As String
Get
Return ResourceManager.GetString("WRN_XMLDocInsideMethod", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment cannot appear within a method or a property.
'''</summary>
Friend ReadOnly Property WRN_XMLDocInsideMethod_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocInsideMethod_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to include XML fragment '{0}' of file '{1}'..
'''</summary>
Friend ReadOnly Property WRN_XMLDocInvalidXMLFragment() As String
Get
Return ResourceManager.GetString("WRN_XMLDocInvalidXMLFragment", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Unable to include XML fragment.
'''</summary>
Friend ReadOnly Property WRN_XMLDocInvalidXMLFragment_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocInvalidXMLFragment_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Only one XML comment block is allowed per language element..
'''</summary>
Friend ReadOnly Property WRN_XMLDocMoreThanOneCommentBlock() As String
Get
Return ResourceManager.GetString("WRN_XMLDocMoreThanOneCommentBlock", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Only one XML comment block is allowed per language element.
'''</summary>
Friend ReadOnly Property WRN_XMLDocMoreThanOneCommentBlock_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocMoreThanOneCommentBlock_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment must be the first statement on a line. XML comment will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLDocNotFirstOnLine() As String
Get
Return ResourceManager.GetString("WRN_XMLDocNotFirstOnLine", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment must be the first statement on a line.
'''</summary>
Friend ReadOnly Property WRN_XMLDocNotFirstOnLine_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocNotFirstOnLine_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment cannot be applied more than once on a partial {0}. XML comments for this {0} will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLDocOnAPartialType() As String
Get
Return ResourceManager.GetString("WRN_XMLDocOnAPartialType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment cannot be applied more than once on a partial type.
'''</summary>
Friend ReadOnly Property WRN_XMLDocOnAPartialType_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocOnAPartialType_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment parameter must have a 'name' attribute..
'''</summary>
Friend ReadOnly Property WRN_XMLDocParamTagWithoutName() As String
Get
Return ResourceManager.GetString("WRN_XMLDocParamTagWithoutName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment parameter must have a 'name' attribute.
'''</summary>
Friend ReadOnly Property WRN_XMLDocParamTagWithoutName_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocParamTagWithoutName_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML documentation parse error: {0} XML comment will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLDocParseError1() As String
Get
Return ResourceManager.GetString("WRN_XMLDocParseError1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML documentation parse error.
'''</summary>
Friend ReadOnly Property WRN_XMLDocParseError1_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocParseError1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag 'returns' is not permitted on a 'declare sub' language element..
'''</summary>
Friend ReadOnly Property WRN_XMLDocReturnsOnADeclareSub() As String
Get
Return ResourceManager.GetString("WRN_XMLDocReturnsOnADeclareSub", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag 'returns' is not permitted on a 'declare sub' language element.
'''</summary>
Friend ReadOnly Property WRN_XMLDocReturnsOnADeclareSub_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocReturnsOnADeclareSub_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag 'returns' is not permitted on a 'WriteOnly' Property..
'''</summary>
Friend ReadOnly Property WRN_XMLDocReturnsOnWriteOnlyProperty() As String
Get
Return ResourceManager.GetString("WRN_XMLDocReturnsOnWriteOnlyProperty", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag 'returns' is not permitted on a 'WriteOnly' Property.
'''</summary>
Friend ReadOnly Property WRN_XMLDocReturnsOnWriteOnlyProperty_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocReturnsOnWriteOnlyProperty_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML documentation parse error: Start tag '{0}' doesn't have a matching end tag. XML comment will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLDocStartTagWithNoEndTag() As String
Get
Return ResourceManager.GetString("WRN_XMLDocStartTagWithNoEndTag", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML documentation parse error: Start tag doesn't have a matching end tag.
'''</summary>
Friend ReadOnly Property WRN_XMLDocStartTagWithNoEndTag_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocStartTagWithNoEndTag_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML documentation comments must precede member or type declarations..
'''</summary>
Friend ReadOnly Property WRN_XMLDocWithoutLanguageElement() As String
Get
Return ResourceManager.GetString("WRN_XMLDocWithoutLanguageElement", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML documentation comments must precede member or type declarations.
'''</summary>
Friend ReadOnly Property WRN_XMLDocWithoutLanguageElement_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLDocWithoutLanguageElement_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag 'include' must have a '{0}' attribute. XML comment will be ignored..
'''</summary>
Friend ReadOnly Property WRN_XMLMissingFileOrPathAttribute1() As String
Get
Return ResourceManager.GetString("WRN_XMLMissingFileOrPathAttribute1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to XML comment tag 'include' must have 'file' and 'path' attributes.
'''</summary>
Friend ReadOnly Property WRN_XMLMissingFileOrPathAttribute1_Title() As String
Get
Return ResourceManager.GetString("WRN_XMLMissingFileOrPathAttribute1_Title", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Wrong number of type arguments.
'''</summary>
Friend ReadOnly Property WrongNumberOfTypeArguments() As String
Get
Return ResourceManager.GetString("WrongNumberOfTypeArguments", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Expected a {0} SemanticModel..
'''</summary>
Friend ReadOnly Property WrongSemanticModelType() As String
Get
Return ResourceManager.GetString("WrongSemanticModelType", resourceCulture)
End Get
End Property
End Module
End Namespace
|
jkotas/roslyn
|
src/Compilers/VisualBasic/Portable/VBResources.Designer.vb
|
Visual Basic
|
apache-2.0
| 738,416
|
' 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.Threading
Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis.Editor.Implementation.InlineRename
Imports Microsoft.CodeAnalysis.Options
Imports Microsoft.CodeAnalysis.Remote.Testing
Imports Microsoft.CodeAnalysis.Rename
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename
<[UseExportProvider]>
Public Class DashboardTests
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithNoOverload(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameOverloads, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
class Program
{
public void $$goo()
{
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="",
searchResultText:=EditorFeaturesResources.Rename_will_update_1_reference_in_1_file,
changedOptionSet:=changingOptions)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithOverload(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameOverloads, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
class Program
{
public void $$goo()
{
}
public void goo(int i)
{
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 2),
hasRenameOverload:=True,
changedOptionSet:=changingOptions)
End Function
<WpfTheory>
<WorkItem(883263, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/883263")>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithInvalidOverload(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameOverloads, True)
Await VerifyDashboard(
<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
class Program
{
void $$X(int x)
{
X();
}
void X(int x, int y)
{
}
}
</Document>
</Project>
</Workspace>,
host:=host,
newName:="Bar",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 2),
changedOptionSet:=changingOptions,
hasRenameOverload:=True,
unresolvableConflictText:=String.Format(EditorFeaturesResources._0_unresolvable_conflict_s, 1),
severity:=DashboardSeverity.Error)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
<WorkItem(853839, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/853839")>
Public Async Function RenameAttributeAlias(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
using $$Evil = AttributeAttribute;
[AttributeAttribute]
class AttributeAttribute : System.Attribute { }
</Document>
</Project>
</Workspace>), host:=host,
newName:="AttributeAttributeAttribute",
searchResultText:=EditorFeaturesResources.Rename_will_update_1_reference_in_1_file,
resolvableConflictText:=String.Format(EditorFeaturesResources._0_conflict_s_will_be_resolved, 1),
severity:=DashboardSeverity.Info)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
<WorkItem(700923, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700923"), WorkItem(700925, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700925")>
Public Async Function RenameWithOverloadAndInStringsAndComments(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameOverloads, True)
changingOptions.Add(RenameOptions.RenameInStrings, True)
changingOptions.Add(RenameOptions.RenameInComments, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
class Program
{
public void $$goo()
{
}
/// goo
public void goo(int i)
{
// goo
var a = "goo";
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 5),
hasRenameOverload:=True,
changedOptionSet:=changingOptions)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
<WorkItem(700923, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700923"), WorkItem(700925, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700925")>
Public Async Function RenameInComments(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameInComments, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
<![CDATA[
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
class $$Program
{
/// <summary>
/// <Program></Program>
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
// Program
/* Program!
Program
*/
var a = "Program";
}
}
]]>
</Document>
</Project>
</Workspace>), host:=host,
newName:="P",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 6),
changedOptionSet:=changingOptions)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
<WorkItem(700923, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700923"), WorkItem(700925, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700925")>
Public Async Function RenameInStrings(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameInStrings, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
<![CDATA[
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
class $$Program
{
/// <summary>
/// <Program></Program>
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
// Program
/* Program!
Program
*/
var a = "Program";
}
}
]]>
</Document>
</Project>
</Workspace>), host:=host,
newName:="P",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 2),
changedOptionSet:=changingOptions)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
<WorkItem(700923, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700923"), WorkItem(700925, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/700925")>
Public Async Function RenameInCommentsAndStrings(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameInComments, True)
changingOptions.Add(RenameOptions.RenameInStrings, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
<![CDATA[
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
class $$Program
{
/// <summary>
/// <Program></Program>
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
// Program
/* Program!
Program
*/
var a = "Program";
}
}
]]>
</Document>
</Project>
</Workspace>), host:=host,
newName:="P",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 7),
changedOptionSet:=changingOptions)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function NonConflictingEditWithMultipleLocations(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
class $$Goo
{
void Blah()
{
Goo f = new Goo();
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 3))
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function NonConflictingEditWithSingleLocation(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
class $$UniqueClassName
{
void Blah()
{
Goo f = new Goo();
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="",
searchResultText:=EditorFeaturesResources.Rename_will_update_1_reference_in_1_file)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function ParameterConflictingWithInstanceField(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#">
<Document>
class Goo
{
int goo;
void Blah(int [|$$bar|])
{
goo = [|bar|];
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="goo",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 2),
resolvableConflictText:=String.Format(EditorFeaturesResources._0_conflict_s_will_be_resolved, 1),
severity:=DashboardSeverity.Info)
End Function
<WorkItem(5923, "DevDiv_Projects/Roslyn")>
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function ParameterConflictingWithInstanceFieldMoreThanOnce(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#">
<Document>
class Goo
{
int goo;
void Blah(int [|$$bar|])
{
goo = goo + [|bar|];
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="goo",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 2),
resolvableConflictText:=String.Format(EditorFeaturesResources._0_conflict_s_will_be_resolved, 2),
severity:=DashboardSeverity.Info)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function ParameterConflictingWithLocal_Unresolvable(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#">
<Document>
class Goo
{
void Blah(int [|$$bar|])
{
int goo;
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="goo",
searchResultText:=EditorFeaturesResources.Rename_will_update_1_reference_in_1_file,
unresolvableConflictText:=String.Format(EditorFeaturesResources._0_unresolvable_conflict_s, 1),
severity:=DashboardSeverity.Error)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function MoreThanOneUnresolvableConflicts(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#">
<Document>
class Goo
{
void Blah(int [|$$bar|])
{
int goo;
goo = [|bar|];
goo = [|bar|];
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="goo",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 3),
unresolvableConflictText:=String.Format(EditorFeaturesResources._0_unresolvable_conflict_s, 3),
severity:=DashboardSeverity.Error)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function ConflictsAcrossLanguages_Resolvable(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" AssemblyName="CSharpAssembly" CommonReferences="true">
<Document>
namespace N
{
public class [|$$Goo|]
{
void Blah()
{
[|Goo|] f = new [|Goo|]();
}
}
}
</Document>
</Project>
<Project Language="Visual Basic" CommonReferences="true">
<ProjectReference>CSharpAssembly</ProjectReference>
<Document>
Imports N
Class Bar
Sub Blah()
Dim f = new {|N.Goo:Goo|}()
End Sub
End Class
</Document>
</Project>
</Workspace>), host:=host,
newName:="Bar",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_files, 4, 2),
resolvableConflictText:=String.Format(EditorFeaturesResources._0_conflict_s_will_be_resolved, 1),
severity:=DashboardSeverity.Info)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithNameof_FromDefinition_DoesNotForceRenameOverloadsOption(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" AssemblyName="CSharpAssembly" CommonReferences="true">
<Document>
class C
{
void M$$()
{
nameof(M).ToString();
}
void M(int x) { }
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="Mo",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_1_reference_in_1_file),
hasRenameOverload:=True,
isRenameOverloadsEditable:=True)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithNameof_FromReference_DoesForceRenameOverloadsOption(host As RenameTestHost) As Task
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" AssemblyName="CSharpAssembly" CommonReferences="true">
<Document>
class C
{
void M()
{
nameof(M$$).ToString();
}
void M(int x) { }
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="Mo",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 3),
hasRenameOverload:=True,
isRenameOverloadsEditable:=False)
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithNameof_FromDefinition_WithRenameOverloads_Cascading(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameOverloads, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#" AssemblyName="CSharpAssembly" CommonReferences="true">
<Document>
class B
{
public virtual void [|M|](int x)
{
nameof([|M|]).ToString();
}
}
class D : B
{
public void $$[|M|]()
{
nameof([|M|]).ToString();
}
public override void [|M|](int x)
{
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="Mo",
searchResultText:=String.Format(EditorFeaturesResources.Rename_will_update_0_references_in_1_file, 5),
changedOptionSet:=changingOptions,
hasRenameOverload:=True)
End Function
Friend Shared Async Function VerifyDashboard(
test As XElement,
newName As String,
searchResultText As String,
host As RenameTestHost,
Optional hasRenameOverload As Boolean = False,
Optional isRenameOverloadsEditable As Boolean = True,
Optional changedOptionSet As Dictionary(Of OptionKey, Object) = Nothing,
Optional resolvableConflictText As String = Nothing,
Optional unresolvableConflictText As String = Nothing,
Optional severity As DashboardSeverity = DashboardSeverity.None
) As Tasks.Task
Using workspace = CreateWorkspaceWithWaiter(test, host)
Dim cursorDocument = workspace.Documents.Single(Function(d) d.CursorPosition.HasValue)
Dim cursorPosition = cursorDocument.CursorPosition.Value
Dim document = workspace.CurrentSolution.GetDocument(cursorDocument.Id)
Assert.NotNull(document)
Dim token = document.GetSyntaxTreeAsync().Result.GetRoot().FindToken(cursorPosition)
Dim renameService = DirectCast(workspace.GetService(Of IInlineRenameService)(), InlineRenameService)
' Create views for all documents to ensure that undo is hooked up properly
For Each d In workspace.Documents
d.GetTextView()
Next
Dim optionSet = workspace.Options
If changedOptionSet IsNot Nothing Then
For Each entry In changedOptionSet
optionSet = optionSet.WithChangedOption(entry.Key, entry.Value)
Next
End If
workspace.TryApplyChanges(workspace.CurrentSolution.WithOptions(optionSet))
Dim sessionInfo = renameService.StartInlineSession(
document, document.GetSyntaxTreeAsync().Result.GetRoot().FindToken(cursorPosition).Span, CancellationToken.None)
' Perform the edit in the buffer
Using edit = cursorDocument.GetTextBuffer().CreateEdit()
edit.Replace(token.SpanStart, token.Span.Length, newName)
edit.Apply()
End Using
Using dashboard = New Dashboard(
New DashboardViewModel(DirectCast(sessionInfo.Session, InlineRenameSession)),
editorFormatMapService:=Nothing,
textView:=cursorDocument.GetTextView())
Await WaitForRename(workspace)
Dim model = DirectCast(dashboard.DataContext, DashboardViewModel)
Assert.Equal(searchResultText, model.SearchText)
If String.IsNullOrEmpty(resolvableConflictText) Then
Assert.False(model.HasResolvableConflicts, "Expected no resolvable conflicts")
Assert.Null(model.ResolvableConflictText)
Else
Assert.True(model.HasResolvableConflicts, "Expected resolvable conflicts")
Assert.Equal(resolvableConflictText, model.ResolvableConflictText)
End If
If String.IsNullOrEmpty(unresolvableConflictText) Then
Assert.False(model.HasUnresolvableConflicts, "Expected no unresolvable conflicts")
Assert.Null(model.UnresolvableConflictText)
Else
Assert.True(model.HasUnresolvableConflicts, "Expected unresolvable conflicts")
Assert.Equal(unresolvableConflictText, model.UnresolvableConflictText)
End If
Assert.Equal(hasRenameOverload, model.Session.HasRenameOverloads)
Assert.Equal(isRenameOverloadsEditable, model.IsRenameOverloadsEditable)
If Not isRenameOverloadsEditable Then
Assert.True(model.DefaultRenameOverloadFlag)
End If
Assert.Equal(severity, model.Severity)
End Using
sessionInfo.Session.Cancel()
End Using
End Function
<WpfTheory>
<CombinatorialData, Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function RenameWithReferenceInUnchangeableDocument(host As RenameTestHost) As Task
Dim changingOptions = New Dictionary(Of OptionKey, Object)()
changingOptions.Add(RenameOptions.RenameOverloads, True)
Await VerifyDashboard(
(<Workspace>
<Project Language="C#">
<Document>
public class $$A
{
}
</Document>
<Document CanApplyChange="false">
class B
{
void M()
{
A a;
}
}
</Document>
</Project>
</Workspace>), host:=host,
newName:="C",
searchResultText:=EditorFeaturesResources.Rename_will_update_1_reference_in_1_file,
changedOptionSet:=changingOptions)
End Function
End Class
End Namespace
|
physhi/roslyn
|
src/EditorFeatures/Test2/Rename/DashboardTests.vb
|
Visual Basic
|
apache-2.0
| 28,954
|
' 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.Threading.Tasks
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.VisualStudio.GraphModel
Imports Microsoft.VisualStudio.GraphModel.Schemas
Imports Microsoft.VisualStudio.LanguageServices.Implementation.Progression
Imports Roslyn.Test.Utilities
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Progression
<UseExportProvider, Trait(Traits.Feature, Traits.Features.Progression)>
Public Class ContainsChildrenGraphQueryTests
<WpfFact>
Public Async Function ContainsChildrenForDocument() As Task
Using testState = ProgressionTestState.Create(
<Workspace>
<Project Language="C#" CommonReferences="true" FilePath="Z:\Project.csproj">
<Document FilePath="Z:\Project.cs">
class C { }
</Document>
</Project>
</Workspace>)
Dim inputGraph = testState.GetGraphWithDocumentNode(filePath:="Z:\Project.cs")
Dim outputContext = Await testState.GetGraphContextAfterQuery(inputGraph, New ContainsChildrenGraphQuery(), GraphContextDirection.Self)
Dim node = outputContext.Graph.Nodes.Single()
AssertSimplifiedGraphIs(
outputContext.Graph,
<DirectedGraph xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="(@1 @2)" Category="CodeSchema_ProjectItem" ContainsChildren="True" Label="Project.cs"/>
</Nodes>
<Links/>
<IdentifierAliases>
<Alias n="1" Uri="Assembly=file:///Z:/Project.csproj"/>
<Alias n="2" Uri="File=file:///Z:/Project.cs"/>
</IdentifierAliases>
</DirectedGraph>)
End Using
End Function
<WpfFact>
Public Async Function ContainsChildrenForEmptyDocument() As Task
Using testState = ProgressionTestState.Create(
<Workspace>
<Project Language="C#" CommonReferences="true" FilePath="Z:\Project.csproj">
<Document FilePath="Z:\Project.cs">
</Document>
</Project>
</Workspace>)
Dim inputGraph = testState.GetGraphWithDocumentNode(filePath:="Z:\Project.cs")
Dim outputContext = Await testState.GetGraphContextAfterQuery(inputGraph, New ContainsChildrenGraphQuery(), GraphContextDirection.Self)
AssertSimplifiedGraphIs(
outputContext.Graph,
<DirectedGraph xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="(@1 @2)" Category="CodeSchema_ProjectItem" ContainsChildren="False" Label="Project.cs"/>
</Nodes>
<Links/>
<IdentifierAliases>
<Alias n="1" Uri="Assembly=file:///Z:/Project.csproj"/>
<Alias n="2" Uri="File=file:///Z:/Project.cs"/>
</IdentifierAliases>
</DirectedGraph>)
End Using
End Function
<WorkItem(27805, "https://github.com/dotnet/roslyn/issues/27805")>
<WorkItem(233666, "https://devdiv.visualstudio.com/DevDiv/_workitems/edit/233666")>
<WpfFact>
Public Async Function ContainsChildrenForFileWithIllegalPath() As Task
Using testState = ProgressionTestState.Create(<Workspace/>)
Dim graph = New Graph
graph.Nodes.GetOrCreate(
GraphNodeId.GetNested(GraphNodeId.GetPartial(CodeGraphNodeIdName.File, New Uri("C:\path\to\""some folder\App.config""", UriKind.RelativeOrAbsolute))),
label:=String.Empty,
CodeNodeCategories.File)
' Just making sure it doesn't throw.
Dim outputContext = Await testState.GetGraphContextAfterQuery(graph, New ContainsChildrenGraphQuery(), GraphContextDirection.Self)
End Using
End Function
<WorkItem(789685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/789685")>
<WorkItem(794846, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/794846")>
<WpfFact>
Public Async Function ContainsChildrenForNotYetLoadedSolution() As Task
Using testState = ProgressionTestState.Create(
<Workspace>
<Project Language="C#" CommonReferences="true" FilePath="Z:\Project.csproj">
<Document FilePath="Z:\Project.cs">
class C { }
</Document>
</Project>
</Workspace>)
Dim inputGraph = testState.GetGraphWithDocumentNode(filePath:="Z:\Project.cs")
' To simulate the situation where a solution is not yet loaded and project info is not available,
' remove a project from the solution.
Dim oldSolution = testState.GetSolution()
Dim newSolution = oldSolution.RemoveProject(oldSolution.ProjectIds.FirstOrDefault())
Dim outputContext = Await testState.GetGraphContextAfterQueryWithSolution(inputGraph, newSolution, New ContainsChildrenGraphQuery(), GraphContextDirection.Self)
' ContainsChildren should be set to false, so following updates will be tractable.
AssertSimplifiedGraphIs(
outputContext.Graph,
<DirectedGraph xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="(@1 @2)" Category="CodeSchema_ProjectItem" ContainsChildren="False" Label="Project.cs"/>
</Nodes>
<Links/>
<IdentifierAliases>
<Alias n="1" Uri="Assembly=file:///Z:/Project.csproj"/>
<Alias n="2" Uri="File=file:///Z:/Project.cs"/>
</IdentifierAliases>
</DirectedGraph>)
End Using
End Function
<WorkItem(165369, "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/165369")>
<WpfFact>
Public Async Function ContainsChildrenForNodeWithRelativeUriPath() As Task
Using testState = ProgressionTestState.Create(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true" FilePath="Z:\Project.vbproj">
<Document FilePath="Z:\Project.vb">
Class C
End Class
</Document>
</Project>
</Workspace>)
' Force creation of a graph node that has a nested relative URI file path. This simulates nodes that
' other project types can give us for non-code files. E.g., `favicon.ico` for web projects.
Dim nodeId = GraphNodeId.GetNested(GraphNodeId.GetPartial(CodeGraphNodeIdName.File, New Uri("/Z:/Project.vb", UriKind.Relative)))
Dim inputGraph = New Graph()
Dim node = inputGraph.Nodes.GetOrCreate(nodeId)
node.AddCategory(CodeNodeCategories.File)
Dim outputContext = Await testState.GetGraphContextAfterQuery(inputGraph, New ContainsChildrenGraphQuery(), GraphContextDirection.Any)
AssertSimplifiedGraphIs(
outputContext.Graph,
<DirectedGraph xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="(@1)" Category="File" ContainsChildren="False"/>
</Nodes>
<Links/>
<IdentifierAliases>
<Alias n="1" Uri="File=/Z:/Project.vb"/>
</IdentifierAliases>
</DirectedGraph>)
End Using
End Function
End Class
End Namespace
|
CyrusNajmabadi/roslyn
|
src/VisualStudio/Core/Test/Progression/ContainsChildrenGraphQueryTests.vb
|
Visual Basic
|
mit
| 8,650
|
' 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.Text
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
Friend Class TestSignatureHelpPresenterSession
Implements ISignatureHelpPresenterSession
Private ReadOnly _testState As IIntelliSenseTestState
Public TriggerSpan As ITrackingSpan
Public SignatureHelpItems As IList(Of SignatureHelpItem)
Public SelectedItem As SignatureHelpItem
Public SelectedParameter As Integer?
Public Event Dismissed As EventHandler(Of EventArgs) Implements ISignatureHelpPresenterSession.Dismissed
Public Event ItemSelected As EventHandler(Of SignatureHelpItemEventArgs) Implements ISignatureHelpPresenterSession.ItemSelected
Public Sub New(testState As IIntelliSenseTestState)
Me._testState = testState
End Sub
Public Sub PresentItems(triggerSpan As ITrackingSpan,
signatureHelpItems As IList(Of SignatureHelpItem),
selectedItem As SignatureHelpItem,
selectedParameter As Integer?) Implements ISignatureHelpPresenterSession.PresentItems
_testState.CurrentSignatureHelpPresenterSession = Me
Me.TriggerSpan = triggerSpan
Me.SignatureHelpItems = signatureHelpItems
Me.SelectedItem = selectedItem
Me.SelectedParameter = selectedParameter
End Sub
Public Sub Dismiss() Implements ISignatureHelpPresenterSession.Dismiss
_testState.CurrentSignatureHelpPresenterSession = Nothing
End Sub
Public Sub SetSelectedItem(item As SignatureHelpItem)
Me.SelectedItem = item
RaiseEvent ItemSelected(Me, New SignatureHelpItemEventArgs(item))
End Sub
Public Sub SelectPreviousItem() Implements ISignatureHelpPresenterSession.SelectPreviousItem
Navigate(-1)
End Sub
Public Sub SelectNextItem() Implements ISignatureHelpPresenterSession.SelectNextItem
Navigate(1)
End Sub
Private Sub Navigate(count As Integer)
SetSelectedItem(SignatureHelpItems((SignatureHelpItems.IndexOf(Me.SelectedItem) + count + SignatureHelpItems.Count) Mod SignatureHelpItems.Count))
End Sub
End Class
End Namespace
|
droyad/roslyn
|
src/EditorFeatures/Test2/IntelliSense/TestSignatureHelpPresenterSession.vb
|
Visual Basic
|
apache-2.0
| 2,485
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class InitForm
Inherits System.Windows.Forms.Form
'Form esegue l'override del metodo Dispose per pulire l'elenco dei componenti.
<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
'Richiesto da Progettazione Windows Form
Private components As System.ComponentModel.IContainer
'NOTA: la procedura che segue è richiesta da Progettazione Windows Form
'Può essere modificata in Progettazione Windows Form.
'Non modificarla nell'editor del codice.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(InitForm))
Me.ComboBox_Ports = New System.Windows.Forms.ComboBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'ComboBox_Ports
'
Me.ComboBox_Ports.FormattingEnabled = True
Me.ComboBox_Ports.Location = New System.Drawing.Point(52, 34)
Me.ComboBox_Ports.Name = "ComboBox_Ports"
Me.ComboBox_Ports.Size = New System.Drawing.Size(121, 21)
Me.ComboBox_Ports.Sorted = True
Me.ComboBox_Ports.TabIndex = 0
'
'Button1
'
Me.Button1.Enabled = False
Me.Button1.Location = New System.Drawing.Point(288, 12)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(147, 63)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Connect"
Me.Button1.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(49, 18)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(62, 13)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Select Port:"
'
'InitForm
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(447, 89)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.ComboBox_Ports)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "InitForm"
Me.Text = "Connection Setup"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents ComboBox_Ports As System.Windows.Forms.ComboBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
End Class
|
biosan/RaDAS
|
VB/RaDAS/InitForm.Designer.vb
|
Visual Basic
|
mit
| 3,031
|
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.269
'
' 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("EnumerationExample.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
|
jakubjenis/lecture.net
|
Vb.Net/Skolenie/EnumerationExample/My Project/Resources.Designer.vb
|
Visual Basic
|
mit
| 2,725
|
Namespace Security.SystemOptions_Benchmarks
Public Class Open
Inherits SecurityItemBase
Public Sub New()
_ConceptItemName = "Open"
_ConceptName = "System Options_Benchmarks"
_Description = "Allow access to 'Benchmarks' 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/Benchmarks/Open.vb
|
Visual Basic
|
mit
| 490
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> Partial Class frmKeyboardList
#Region "Windows Form Designer generated code "
<System.Diagnostics.DebuggerNonUserCode()> Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
End Sub
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
Public ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents cmdNew As System.Windows.Forms.Button
Public WithEvents DataList1 As myDataGridView
Public WithEvents txtSearch As System.Windows.Forms.TextBox
Public WithEvents cmdExit As System.Windows.Forms.Button
Public WithEvents lbl As System.Windows.Forms.Label
'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()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmKeyboardList))
Me.components = New System.ComponentModel.Container()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
Me.cmdNew = New System.Windows.Forms.Button
Me.DataList1 = New myDataGridView
Me.txtSearch = New System.Windows.Forms.TextBox
Me.cmdExit = New System.Windows.Forms.Button
Me.lbl = New System.Windows.Forms.Label
Me.SuspendLayout()
Me.ToolTip1.Active = True
CType(Me.DataList1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.BackColor = System.Drawing.Color.FromARGB(224, 224, 224)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Text = "Select a Keyboard"
Me.ClientSize = New System.Drawing.Size(259, 433)
Me.Location = New System.Drawing.Point(3, 22)
Me.ControlBox = False
Me.KeyPreview = True
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Enabled = True
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.HelpButton = False
Me.WindowState = System.Windows.Forms.FormWindowState.Normal
Me.Name = "frmKeyboardList"
Me.cmdNew.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdNew.Text = "&New"
Me.cmdNew.Size = New System.Drawing.Size(97, 52)
Me.cmdNew.Location = New System.Drawing.Point(6, 375)
Me.cmdNew.TabIndex = 4
Me.cmdNew.TabStop = False
Me.cmdNew.BackColor = System.Drawing.SystemColors.Control
Me.cmdNew.CausesValidation = True
Me.cmdNew.Enabled = True
Me.cmdNew.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdNew.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdNew.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdNew.Name = "cmdNew"
''DataList1.OcxState = CType(resources.GetObject("'DataList1.OcxState"), System.Windows.Forms.AxHost.State)
Me.DataList1.Size = New System.Drawing.Size(244, 342)
Me.DataList1.Location = New System.Drawing.Point(6, 27)
Me.DataList1.TabIndex = 2
Me.DataList1.Name = "DataList1"
Me.txtSearch.AutoSize = False
Me.txtSearch.Size = New System.Drawing.Size(199, 19)
Me.txtSearch.Location = New System.Drawing.Point(51, 3)
Me.txtSearch.TabIndex = 1
Me.txtSearch.AcceptsReturn = True
Me.txtSearch.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
Me.txtSearch.BackColor = System.Drawing.SystemColors.Window
Me.txtSearch.CausesValidation = True
Me.txtSearch.Enabled = True
Me.txtSearch.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtSearch.HideSelection = True
Me.txtSearch.ReadOnly = False
Me.txtSearch.Maxlength = 0
Me.txtSearch.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtSearch.MultiLine = False
Me.txtSearch.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtSearch.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.txtSearch.TabStop = True
Me.txtSearch.Visible = True
Me.txtSearch.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.txtSearch.Name = "txtSearch"
Me.cmdExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.cmdExit.Text = "E&xit"
Me.cmdExit.Size = New System.Drawing.Size(97, 52)
Me.cmdExit.Location = New System.Drawing.Point(153, 375)
Me.cmdExit.TabIndex = 3
Me.cmdExit.TabStop = False
Me.cmdExit.BackColor = System.Drawing.SystemColors.Control
Me.cmdExit.CausesValidation = True
Me.cmdExit.Enabled = True
Me.cmdExit.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdExit.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdExit.Name = "cmdExit"
Me.lbl.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.lbl.Text = "&Search :"
Me.lbl.Size = New System.Drawing.Size(40, 13)
Me.lbl.Location = New System.Drawing.Point(8, 6)
Me.lbl.TabIndex = 0
Me.lbl.BackColor = System.Drawing.Color.Transparent
Me.lbl.Enabled = True
Me.lbl.ForeColor = System.Drawing.SystemColors.ControlText
Me.lbl.Cursor = System.Windows.Forms.Cursors.Default
Me.lbl.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lbl.UseMnemonic = True
Me.lbl.Visible = True
Me.lbl.AutoSize = True
Me.lbl.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lbl.Name = "lbl"
Me.Controls.Add(cmdNew)
Me.Controls.Add(DataList1)
Me.Controls.Add(txtSearch)
Me.Controls.Add(cmdExit)
Me.Controls.Add(lbl)
CType(Me.DataList1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
End Class
|
nodoid/PointOfSale
|
VB/4PosBackOffice.NET/frmKeyboardList.Designer.vb
|
Visual Basic
|
mit
| 6,128
|
Imports WordSearch.ViewModel
Imports Windows.Storage.Streams
Imports Windows.Storage
Imports WordSearch.Model
Namespace View
Public NotInheritable Class Main : Inherits Common.LayoutAwarePage
#Region " Initializations "
''' <summary>
''' Invoked when this page is about to be displayed in a Frame.
''' </summary>
''' <param name="e">Event data that describes how this page was reached. The Parameter
''' property is typically used to configure the page.</param>
Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
'get view model and submit command
Dim viewModel = CType(DataContext, MainPageViewModel)
viewModel.LoadWordsCommand.Execute(Nothing)
End Sub
#End Region
#Region " State Management "
''' <summary>
''' Populates the page with content passed during navigation. Any saved state is also
''' provided when recreating a page from a prior session.
''' </summary>
''' <param name="navigationParameter">The parameter value passed to
''' <see cref="Frame.Navigate"/> when this page was initially requested.
''' </param>
''' <param name="pageState">A dictionary of state preserved by this page during an earlier
''' session. This will be null the first time a page is visited.</param>
Protected Overrides Sub LoadState(navigationParameter As Object, pageState As Dictionary(Of String, Object))
End Sub
''' <summary>
''' Preserves state associated with this page in case the application is suspended or the
''' page is discarded from the navigation cache. Values must conform to the serialization
''' requirements of <see cref="Common.SuspensionManager.SessionState"/>.
''' </summary>
''' <param name="pageState">An empty dictionary to be populated with serializable state.</param>
Protected Overrides Sub SaveState(pageState As Dictionary(Of String, Object))
End Sub
#End Region
#Region " Page Events "
Private Sub KeyDownEntered(sender As Object, e As KeyRoutedEventArgs) Handles pageRoot.KeyDown
'check if enter key hit
If e.Key = Windows.System.VirtualKey.Enter Then
'get view model and submit command
Dim viewModel = CType(DataContext, MainPageViewModel)
viewModel.WordSubmitCommand.Execute(Nothing)
e.Handled = True
End If
End Sub
#End Region
End Class
End Namespace
|
KyleMit/WordGuess
|
SourceCode/WordSearch/View/Main.xaml.vb
|
Visual Basic
|
mit
| 2,631
|
Imports SistFoncreagro.Report
Public Class ReporteSaldoCuenta46
Inherits System.Web.UI.Page
Dim IdProveedor As String
Dim IdMoneda As String
Dim FechaFin As String
Dim IdProyecto As String
Dim Proyecto As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
IdProveedor = Request.QueryString("IdProveedor")
IdMoneda = Request.QueryString("IdMoneda")
FechaFin = Request.QueryString("FechaFin")
IdProyecto = Request.QueryString("IdProyecto")
Proyecto = Request.QueryString("Proyecto")
Me.ReportViewer1.Report = New RepSaldoCuenta46
Me.ReportViewer1.Report.ReportParameters(0).Value = FechaFin
Me.ReportViewer1.Report.ReportParameters(1).Value = IdProveedor
Me.ReportViewer1.Report.ReportParameters(2).Value = IdMoneda
Me.ReportViewer1.Report.ReportParameters(3).Value = IdProyecto
Me.ReportViewer1.Report.ReportParameters(4).Value = Proyecto
End Sub
End Class
|
crackper/SistFoncreagro
|
SistFoncreagro.WebSite/Contabilidad/Formularios/ReporteSaldoCuenta46.aspx.vb
|
Visual Basic
|
mit
| 1,029
|
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 statusBarPartCount = application.StatusBarPartCount
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.StatusBarPartCount.vb
|
Visual Basic
|
mit
| 902
|
Namespace BasicAnalyzers
Public Module DiagnosticIds
' Stateless analyzer IDs.
Public Const SymbolAnalyzerRuleId As String = "VBS0001"
Public Const SyntaxNodeAnalyzerRuleId As String = "VBS0002"
Public Const SyntaxTreeAnalyzerRuleId As String = "VBS0003"
Public Const SemanticModelAnalyzerRuleId As String = "VBS0004"
Public Const CodeBlockAnalyzerRuleId As String = "VBS0005"
Public Const CompilationAnalyzerRuleId As String = "VBS0006"
' Stateful analyzer IDs.
Public Const CodeBlockStartedAnalyzerRuleId As String = "VBS0101"
Public Const CompilationStartedAnalyzerRuleId As String = "VBS0102"
Public Const CompilationStartedAnalyzerWithCompilationWideAnalysisRuleId As String = "VBS0103"
End Module
End Namespace
|
stjeong/roslyn
|
src/Samples/VisualBasic/Analyzers/BasicAnalyzers/BasicAnalyzers/DiagnosticIds.vb
|
Visual Basic
|
apache-2.0
| 817
|
'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 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("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("19E43142-58B4-4A2D-B9FD-932FB4D0C645")>
' 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.*")>
|
Esri/arcobjects-sdk-community-samples
|
Net/Controls/MapViewerWalkthrough/VBNet/Controls/AssemblyInfo.vb
|
Visual Basic
|
apache-2.0
| 1,568
|
'*******************************************************************************************'
' '
' 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("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("e93ed127-59aa-49e6-ae88-49bbdd602c76")>
' 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/Additional caption with barcode sdk/My Project/AssemblyInfo.vb
|
Visual Basic
|
apache-2.0
| 2,076
|
' 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
Imports Microsoft.CodeAnalysis.Debugging
Imports Microsoft.CodeAnalysis.ErrorReporting
Imports Microsoft.CodeAnalysis.Host.Mef
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic.Debugging
<ExportLanguageService(GetType(IBreakpointResolutionService), LanguageNames.VisualBasic), [Shared]>
Partial Friend Class VisualBasicBreakpointResolutionService
Implements IBreakpointResolutionService
<ImportingConstructor>
<Obsolete(MefConstruction.ImportingConstructorMessage, True)>
Public Sub New()
End Sub
Friend Shared Async Function GetBreakpointAsync(document As Document, position As Integer, length As Integer, cancellationToken As CancellationToken) As Task(Of BreakpointResolutionResult)
Try
Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
' Non-zero length means that the span is passed by the debugger and we may need validate it.
' In a rare VB case, this span may contain multiple methods, e.g.,
'
' [Sub Goo() Handles A
'
' End Sub
'
' Sub Bar() Handles B]
'
' End Sub
'
' It happens when IDE services (e.g., NavBar or CodeFix) inserts a new method at the beginning of the existing one
' which happens to have a breakpoint on its head. In this situation, we should attempt to validate the span of the existing method,
' not that of a newly-prepended method.
Dim descendIntoChildren As Func(Of SyntaxNode, Boolean) =
Function(n)
Return (Not n.IsKind(SyntaxKind.ConstructorBlock)) _
AndAlso (Not n.IsKind(SyntaxKind.SubBlock))
End Function
If length > 0 Then
Dim root = Await tree.GetRootAsync(cancellationToken).ConfigureAwait(False)
Dim item = root.DescendantNodes(New TextSpan(position, length), descendIntoChildren:=descendIntoChildren).OfType(Of MethodBlockSyntax).Skip(1).LastOrDefault()
If item IsNot Nothing Then
position = item.SpanStart
End If
End If
Dim span As TextSpan
If Not BreakpointSpans.TryGetBreakpointSpan(tree, position, cancellationToken, span) Then
Return Nothing
End If
If span.Length = 0 Then
Return BreakpointResolutionResult.CreateLineResult(document)
End If
Return BreakpointResolutionResult.CreateSpanResult(document, span)
Catch e As Exception When FatalError.ReportWithoutCrashUnlessCanceled(e)
Return Nothing
End Try
End Function
Public Function ResolveBreakpointAsync(document As Document, textSpan As TextSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of BreakpointResolutionResult) Implements IBreakpointResolutionService.ResolveBreakpointAsync
Return GetBreakpointAsync(document, textSpan.Start, textSpan.Length, cancellationToken)
End Function
Public Function ResolveBreakpointsAsync(
solution As Solution,
name As String,
Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of BreakpointResolutionResult)) Implements IBreakpointResolutionService.ResolveBreakpointsAsync
Return New BreakpointResolver(solution, name).DoAsync(cancellationToken)
End Function
End Class
End Namespace
|
jmarolf/roslyn
|
src/Features/VisualBasic/Portable/Debugging/VisualBasicBreakpointService.vb
|
Visual Basic
|
mit
| 4,185
|
' 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.Completion
Imports Microsoft.CodeAnalysis.Completion.Providers
Imports Microsoft.CodeAnalysis.Options
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports Roslyn.Utilities.DocumentationCommentXmlNames
Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
Partial Friend Class XmlDocCommentCompletionProvider
Inherits AbstractDocCommentCompletionProvider(Of DocumentationCommentTriviaSyntax)
Public Sub New()
MyBase.New(s_defaultRules)
End Sub
Friend Overrides Function IsInsertionTrigger(text As SourceText, characterPosition As Integer, options As OptionSet) As Boolean
Dim isStartOfTag = text(characterPosition) = "<"c
Dim isClosingTag = (text(characterPosition) = "/"c AndAlso characterPosition > 0 AndAlso text(characterPosition - 1) = "<"c)
Dim isDoubleQuote = text(characterPosition) = """"c
Return isStartOfTag OrElse isClosingTag OrElse isDoubleQuote OrElse
IsTriggerAfterSpaceOrStartOfWordCharacter(text, characterPosition, options)
End Function
Public Function GetPreviousTokenIfTouchingText(token As SyntaxToken, position As Integer) As SyntaxToken
Return If(token.IntersectsWith(position) AndAlso IsText(token),
token.GetPreviousToken(includeSkipped:=True),
token)
End Function
Private Function IsText(token As SyntaxToken) As Boolean
Return token.IsKind(SyntaxKind.XmlNameToken, SyntaxKind.XmlTextLiteralToken, SyntaxKind.IdentifierToken)
End Function
Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CompletionItem))
Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Dim token = tree.FindTokenOnLeftOfPosition(position, cancellationToken, includeDocumentationComments:=True)
Dim parent = token.GetAncestor(Of DocumentationCommentTriviaSyntax)()
If parent Is Nothing Then
Return Nothing
End If
' If the user is typing in xml text, don't trigger on backspace.
If token.IsKind(SyntaxKind.XmlTextLiteralToken) AndAlso
trigger.Kind = CompletionTriggerKind.Deletion Then
Return Nothing
End If
' Never provide any items inside a cref
If token.Parent.IsKind(SyntaxKind.XmlString) AndAlso token.Parent.Parent.IsKind(SyntaxKind.XmlAttribute) Then
Dim attribute = DirectCast(token.Parent.Parent, XmlAttributeSyntax)
Dim name = TryCast(attribute.Name, XmlNameSyntax)
Dim value = TryCast(attribute.Value, XmlStringSyntax)
If name?.LocalName.ValueText = CrefAttributeName AndAlso Not token = value?.EndQuoteToken Then
Return Nothing
End If
End If
If token.Parent.GetAncestor(Of XmlCrefAttributeSyntax)() IsNot Nothing Then
Return Nothing
End If
Dim items = New List(Of CompletionItem)()
Dim attachedToken = parent.ParentTrivia.Token
If attachedToken.Kind = SyntaxKind.None Then
Return items
End If
Dim declaration = attachedToken.GetAncestor(Of DeclarationStatementSyntax)()
' Maybe we're going to suggest the close tag
If token.Kind = SyntaxKind.LessThanSlashToken Then
Return GetCloseTagItem(token)
ElseIf token.IsKind(SyntaxKind.XmlNameToken) AndAlso token.GetPreviousToken().IsKind(SyntaxKind.LessThanSlashToken) Then
Return GetCloseTagItem(token.GetPreviousToken())
End If
Dim semanticModel = Await document.GetSemanticModelForNodeAsync(attachedToken.Parent, cancellationToken).ConfigureAwait(False)
Dim symbol As ISymbol = Nothing
If declaration IsNot Nothing Then
symbol = semanticModel.GetDeclaredSymbol(declaration, cancellationToken)
End If
If symbol IsNot Nothing Then
' Maybe we're going to do attribute completion
TryGetAttributes(token, position, items, symbol)
If items.Any() Then
Return items
End If
End If
If trigger.Kind = CompletionTriggerKind.Insertion AndAlso
Not trigger.Character = """"c AndAlso
Not trigger.Character = "<"c Then
' With the use of IsTriggerAfterSpaceOrStartOfWordCharacter, the code below is much
' too aggressive at suggesting tags, so exit early before degrading the experience
Return items
End If
items.AddRange(GetAlwaysVisibleItems())
Dim parentElement = token.GetAncestor(Of XmlElementSyntax)()
Dim grandParent = parentElement?.Parent
If grandParent.IsKind(SyntaxKind.XmlElement) Then
items.AddRange(GetNestedItems(symbol))
If GetStartTagName(grandParent) = ListElementName Then
items.AddRange(GetListItems())
End If
If GetStartTagName(grandParent) = ListHeaderElementName Then
items.AddRange(GetListHeaderItems())
End If
ElseIf token.Parent.IsKind(SyntaxKind.XmlText) Then
If token.Parent.IsParentKind(SyntaxKind.DocumentationCommentTrivia) Then
' Top level, without tag:
' ''' $$
items.AddRange(GetTopLevelItems(symbol, parent))
ElseIf token.Parent.IsParentKind(SyntaxKind.XmlElement) Then
items.AddRange(GetNestedItems(symbol))
If GetStartTagName(token.Parent.Parent) = ListElementName Then
items.AddRange(GetListItems())
End If
If GetStartTagName(token.Parent.Parent) = ListHeaderElementName Then
items.AddRange(GetListHeaderItems())
End If
End If
ElseIf grandParent.IsKind(SyntaxKind.DocumentationCommentTrivia) Then
' Top level, with tag:
' ''' <$$
' ''' <tag$$
items.AddRange(GetTopLevelItems(symbol, parent))
End If
If token.Parent.IsKind(SyntaxKind.XmlElementStartTag, SyntaxKind.XmlName) Then
If parentElement.IsParentKind(SyntaxKind.XmlElement) Then
If GetStartTagName(parentElement.Parent) = ListElementName Then
items.AddRange(GetListItems())
End If
If GetStartTagName(parentElement.Parent) = ListHeaderElementName Then
items.AddRange(GetListHeaderItems())
End If
End If
End If
Return items
End Function
Private Function GetCloseTagItem(token As SyntaxToken) As IEnumerable(Of CompletionItem)
Dim endTag = TryCast(token.Parent, XmlElementEndTagSyntax)
If endTag Is Nothing Then
Return Nothing
End If
Dim element = TryCast(endTag.Parent, XmlElementSyntax)
If element Is Nothing Then
Return Nothing
End If
Dim startElement = element.StartTag
Dim name = TryCast(startElement.Name, XmlNameSyntax)
If name Is Nothing Then
Return Nothing
End If
Dim nameToken = name.LocalName
If Not nameToken.IsMissing AndAlso nameToken.ValueText.Length > 0 Then
Return SpecializedCollections.SingletonEnumerable(CreateCompletionItem(nameToken.ValueText, nameToken.ValueText & ">", String.Empty))
End If
Return Nothing
End Function
Private Shared Function GetStartTagName(element As SyntaxNode) As String
Return DirectCast(DirectCast(element, XmlElementSyntax).StartTag.Name, XmlNameSyntax).LocalName.ValueText
End Function
Private Sub TryGetAttributes(token As SyntaxToken,
position As Integer,
items As List(Of CompletionItem),
symbol As ISymbol)
Dim tagNameSyntax As XmlNameSyntax = Nothing
Dim tagAttributes As SyntaxList(Of XmlNodeSyntax) = Nothing
Dim startTagSyntax = token.GetAncestor(Of XmlElementStartTagSyntax)()
If startTagSyntax IsNot Nothing Then
tagNameSyntax = TryCast(startTagSyntax.Name, XmlNameSyntax)
tagAttributes = startTagSyntax.Attributes
Else
Dim emptyElementSyntax = token.GetAncestor(Of XmlEmptyElementSyntax)()
If emptyElementSyntax IsNot Nothing Then
tagNameSyntax = TryCast(emptyElementSyntax.Name, XmlNameSyntax)
tagAttributes = emptyElementSyntax.Attributes
End If
End If
If tagNameSyntax IsNot Nothing Then
Dim targetToken = GetPreviousTokenIfTouchingText(token, position)
Dim tagName = tagNameSyntax.LocalName.ValueText
If targetToken.IsChildToken(Function(n As XmlNameSyntax) n.LocalName) AndAlso targetToken.Parent Is tagNameSyntax Then
' <exception |
items.AddRange(GetAttributes(tagName, tagAttributes))
End If
'<exception a|
If targetToken.IsChildToken(Function(n As XmlNameSyntax) n.LocalName) AndAlso targetToken.Parent.IsParentKind(SyntaxKind.XmlAttribute) Then
' <exception |
items.AddRange(GetAttributes(tagName, tagAttributes))
End If
'<exception a=""|
If (targetToken.IsChildToken(Function(s As XmlStringSyntax) s.EndQuoteToken) AndAlso targetToken.Parent.IsParentKind(SyntaxKind.XmlAttribute)) OrElse
targetToken.IsChildToken(Function(a As XmlNameAttributeSyntax) a.EndQuoteToken) OrElse
targetToken.IsChildToken(Function(a As XmlCrefAttributeSyntax) a.EndQuoteToken) Then
items.AddRange(GetAttributes(tagName, tagAttributes))
End If
' <param name="|"
If (targetToken.IsChildToken(Function(s As XmlStringSyntax) s.StartQuoteToken) AndAlso targetToken.Parent.IsParentKind(SyntaxKind.XmlAttribute)) OrElse
targetToken.IsChildToken(Function(a As XmlNameAttributeSyntax) a.StartQuoteToken) Then
Dim attributeName As String
Dim xmlAttributeName = targetToken.GetAncestor(Of XmlNameAttributeSyntax)()
If xmlAttributeName IsNot Nothing Then
attributeName = xmlAttributeName.Name.LocalName.ValueText
Else
attributeName = DirectCast(targetToken.GetAncestor(Of XmlAttributeSyntax)().Name, XmlNameSyntax).LocalName.ValueText
End If
items.AddRange(GetAttributeValueItems(symbol, tagName, attributeName))
End If
End If
End Sub
Protected Overrides Iterator Function GetKeywordNames() As IEnumerable(Of String)
Yield SyntaxFacts.GetText(SyntaxKind.NothingKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.SharedKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.OverridableKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.TrueKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.FalseKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.MustInheritKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.NotOverridableKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.AsyncKeyword)
Yield SyntaxFacts.GetText(SyntaxKind.AwaitKeyword)
End Function
Protected Overrides Function GetExistingTopLevelElementNames(parentTrivia As DocumentationCommentTriviaSyntax) As IEnumerable(Of String)
Return parentTrivia.Content _
.Select(Function(node) GetElementNameAndAttributes(node).Name) _
.WhereNotNull()
End Function
Protected Overrides Function GetExistingTopLevelAttributeValues(syntax As DocumentationCommentTriviaSyntax, elementName As String, attributeName As String) As IEnumerable(Of String)
Dim attributeValues = SpecializedCollections.EmptyEnumerable(Of String)()
For Each node In syntax.Content
Dim nameAndAttributes = GetElementNameAndAttributes(node)
If nameAndAttributes.Name = elementName Then
attributeValues = attributeValues.Concat(
nameAndAttributes.Attributes _
.Where(Function(attribute) GetAttributeName(attribute) = attributeName) _
.Select(AddressOf GetAttributeValue))
End If
Next
Return attributeValues
End Function
Private Function GetElementNameAndAttributes(node As XmlNodeSyntax) As (Name As String, Attributes As SyntaxList(Of XmlNodeSyntax))
Dim nameSyntax As XmlNameSyntax = Nothing
Dim attributes As SyntaxList(Of XmlNodeSyntax) = Nothing
If node.IsKind(SyntaxKind.XmlEmptyElement) Then
Dim emptyElementSyntax = DirectCast(node, XmlEmptyElementSyntax)
nameSyntax = TryCast(emptyElementSyntax.Name, XmlNameSyntax)
attributes = emptyElementSyntax.Attributes
ElseIf node.IsKind(SyntaxKind.XmlElement) Then
Dim elementSyntax = DirectCast(node, XmlElementSyntax)
nameSyntax = TryCast(elementSyntax.StartTag.Name, XmlNameSyntax)
attributes = elementSyntax.StartTag.Attributes
End If
Return (nameSyntax?.LocalName.ValueText, attributes)
End Function
Private Function GetAttributeValue(attribute As XmlNodeSyntax) As String
If TypeOf attribute Is XmlAttributeSyntax Then
' Decode any XML enities and concatentate the results
Return DirectCast(DirectCast(attribute, XmlAttributeSyntax).Value, XmlStringSyntax).TextTokens.GetValueText()
End If
Return TryCast(attribute, XmlNameAttributeSyntax)?.Reference?.Identifier.ValueText
End Function
Private Function GetAttributes(tagName As String, attributes As SyntaxList(Of XmlNodeSyntax)) As IEnumerable(Of CompletionItem)
Dim existingAttributeNames = attributes.Select(AddressOf GetAttributeName).WhereNotNull().ToSet()
Return GetAttributeItems(tagName, existingAttributeNames)
End Function
Private Shared Function GetAttributeName(node As XmlNodeSyntax) As String
Dim nameSyntax As XmlNameSyntax = node.TypeSwitch(
Function(attribute As XmlAttributeSyntax) TryCast(attribute.Name, XmlNameSyntax),
Function(attribute As XmlNameAttributeSyntax) attribute.Name,
Function(attribute As XmlCrefAttributeSyntax) attribute.Name)
Return nameSyntax?.LocalName.ValueText
End Function
Private Shared s_defaultRules As CompletionItemRules =
CompletionItemRules.Create(
filterCharacterRules:=FilterRules,
enterKeyRule:=EnterKeyRule.Never)
End Class
End Namespace
|
pdelvo/roslyn
|
src/Features/VisualBasic/Portable/Completion/CompletionProviders/XmlDocCommentCompletionProvider.vb
|
Visual Basic
|
apache-2.0
| 16,236
|
' 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.Runtime.InteropServices
Imports Microsoft.CodeAnalysis.PooledObjects
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Namespace Microsoft.CodeAnalysis.VisualBasic
''' <summary>
''' The only public entry point is the Infer method.
''' </summary>
Friend MustInherit Class TypeArgumentInference
Public Shared Function Infer(
candidate As MethodSymbol,
arguments As ImmutableArray(Of BoundExpression),
parameterToArgumentMap As ArrayBuilder(Of Integer),
paramArrayItems As ArrayBuilder(Of Integer),
delegateReturnType As TypeSymbol,
delegateReturnTypeReferenceBoundNode As BoundNode,
ByRef typeArguments As ImmutableArray(Of TypeSymbol),
ByRef inferenceLevel As InferenceLevel,
ByRef allFailedInferenceIsDueToObject As Boolean,
ByRef someInferenceFailed As Boolean,
ByRef inferenceErrorReasons As InferenceErrorReasons,
<Out> ByRef inferredTypeByAssumption As BitVector,
<Out> ByRef typeArgumentsLocation As ImmutableArray(Of SyntaxNodeOrToken),
<[In](), Out()> ByRef asyncLambdaSubToFunctionMismatch As HashSet(Of BoundExpression),
<[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol),
ByRef diagnostic As BindingDiagnosticBag,
Optional inferTheseTypeParameters As BitVector = Nothing
) As Boolean
Debug.Assert(candidate Is candidate.ConstructedFrom)
Return InferenceGraph.Infer(candidate, arguments, parameterToArgumentMap, paramArrayItems, delegateReturnType, delegateReturnTypeReferenceBoundNode,
typeArguments, inferenceLevel, allFailedInferenceIsDueToObject, someInferenceFailed, inferenceErrorReasons,
inferredTypeByAssumption, typeArgumentsLocation, asyncLambdaSubToFunctionMismatch,
useSiteInfo, diagnostic, inferTheseTypeParameters)
End Function
' No-one should create instances of this class.
Private Sub New()
End Sub
Public Enum InferenceLevel As Byte
None = 0
' None is used to indicate uninitialized but semantically it should not matter if there is a whidbey delegate
' or no delegate in the overload resolution hence both have value 0 such that overload resolution
' will not prefer a non inferred method over an inferred one.
Whidbey = 0
Orcas = 1
' Keep invalid the biggest number
Invalid = 2
End Enum
' MatchGenericArgumentParameter:
' This is used in type inference, when matching an argument e.g. Arg(Of String) against a parameter Parm(Of T).
' In covariant contexts e.g. Action(Of _), the two match if Arg <= Parm (i.e. Arg inherits/implements Parm).
' In contravariant contexts e.g. IEnumerable(Of _), the two match if Parm <= Arg (i.e. Parm inherits/implements Arg).
' In invariant contexts e.g. List(Of _), the two match only if Arg and Parm are identical.
' Note: remember that rank-1 arrays T() implement IEnumerable(Of T), IList(Of T) and ICollection(Of T).
Public Enum MatchGenericArgumentToParameter
MatchBaseOfGenericArgumentToParameter
MatchArgumentToBaseOfGenericParameter
MatchGenericArgumentToParameterExactly
End Enum
Private Enum InferenceNodeType As Byte
ArgumentNode
TypeParameterNode
End Enum
Private MustInherit Class InferenceNode
Inherits GraphNode(Of InferenceNode)
Public ReadOnly NodeType As InferenceNodeType
Public InferenceComplete As Boolean
Protected Sub New(graph As InferenceGraph, nodeType As InferenceNodeType)
MyBase.New(graph)
Me.NodeType = nodeType
End Sub
Public Shadows ReadOnly Property Graph As InferenceGraph
Get
Return DirectCast(MyBase.Graph, InferenceGraph)
End Get
End Property
''' <summary>
''' Returns True if the inference algorithm should be restarted.
''' </summary>
Public MustOverride Function InferTypeAndPropagateHints() As Boolean
<Conditional("DEBUG")>
Public Sub VerifyIncomingInferenceComplete(
ByVal nodeType As InferenceNodeType
)
If Not Graph.SomeInferenceHasFailed() Then
For Each current As InferenceNode In IncomingEdges
Debug.Assert(current.NodeType = nodeType, "Should only have expected incoming edges.")
Debug.Assert(current.InferenceComplete, "Should have inferred type already")
Next
End If
End Sub
End Class
Private Class DominantTypeDataTypeInference
Inherits DominantTypeData
' Fields needed for error reporting
Public ByAssumption As Boolean ' was ResultType chosen by assumption or intention?
Public Parameter As ParameterSymbol
Public InferredFromObject As Boolean
Public TypeParameter As TypeParameterSymbol
Public ArgumentLocation As SyntaxNode
End Class
Private Class TypeParameterNode
Inherits InferenceNode
Public ReadOnly DeclaredTypeParam As TypeParameterSymbol
Public ReadOnly InferenceTypeCollection As TypeInferenceCollection(Of DominantTypeDataTypeInference)
Private _inferredType As TypeSymbol
Private _inferredFromLocation As SyntaxNodeOrToken
Private _inferredTypeByAssumption As Boolean
' TODO: Dev10 has two locations to track type inferred so far.
' One that can be changed with time and the other one that cannot be changed.
' This one, cannot be changed once set. We need to clean this up later.
Private _candidateInferredType As TypeSymbol
Private _parameter As ParameterSymbol
Public Sub New(graph As InferenceGraph, typeParameter As TypeParameterSymbol)
MyBase.New(graph, InferenceNodeType.TypeParameterNode)
DeclaredTypeParam = typeParameter
InferenceTypeCollection = New TypeInferenceCollection(Of DominantTypeDataTypeInference)()
End Sub
Public ReadOnly Property InferredType As TypeSymbol
Get
Return _inferredType
End Get
End Property
Public ReadOnly Property CandidateInferredType As TypeSymbol
Get
Return _candidateInferredType
End Get
End Property
Public ReadOnly Property InferredFromLocation As SyntaxNodeOrToken
Get
Return _inferredFromLocation
End Get
End Property
Public ReadOnly Property InferredTypeByAssumption As Boolean
Get
Return _inferredTypeByAssumption
End Get
End Property
Public Sub RegisterInferredType(inferredType As TypeSymbol, inferredFromLocation As SyntaxNodeOrToken, inferredTypeByAssumption As Boolean)
' Make sure ArrayLiteralTypeSymbol does not leak out
Dim arrayLiteralType = TryCast(inferredType, ArrayLiteralTypeSymbol)
If arrayLiteralType IsNot Nothing Then
Dim arrayLiteral = arrayLiteralType.ArrayLiteral
Dim arrayType = arrayLiteral.InferredType
If Not (arrayLiteral.HasDominantType AndAlso arrayLiteral.NumberOfCandidates = 1) AndAlso
arrayType.ElementType.SpecialType = SpecialType.System_Object Then
' ReportArrayLiteralInferredTypeDiagnostics in ReclassifyArrayLiteralExpression reports an error
' when option strict is on and the array type is object() and there wasn't a dominant type. However,
' Dev10 does not report this error when inferring a type parameter's type. Create a new object() type
' to suppress the error.
inferredType = ArrayTypeSymbol.CreateVBArray(arrayType.ElementType, Nothing, arrayType.Rank, arrayLiteral.Binder.Compilation.Assembly)
Else
inferredType = arrayLiteral.InferredType
End If
End If
Debug.Assert(Not (TypeOf inferredType Is ArrayLiteralTypeSymbol))
_inferredType = inferredType
_inferredFromLocation = inferredFromLocation
_inferredTypeByAssumption = inferredTypeByAssumption
' TODO: Dev10 has two locations to track type inferred so far.
' One that can be changed with time and the other one that cannot be changed.
' We need to clean this up.
If _candidateInferredType Is Nothing Then
_candidateInferredType = inferredType
End If
End Sub
Public ReadOnly Property Parameter As ParameterSymbol
Get
Return _parameter
End Get
End Property
Public Sub SetParameter(parameter As ParameterSymbol)
Debug.Assert(_parameter Is Nothing)
_parameter = parameter
End Sub
Public Overrides Function InferTypeAndPropagateHints() As Boolean
Dim numberOfIncomingEdges As Integer = IncomingEdges.Count
Dim restartAlgorithm As Boolean = False
Dim argumentLocation As SyntaxNode
Dim numberOfIncomingWithNothing As Integer = 0
If numberOfIncomingEdges > 0 Then
argumentLocation = DirectCast(IncomingEdges(0), ArgumentNode).Expression.Syntax
Else
argumentLocation = Nothing
End If
Dim numberOfAssertions As Integer = 0
Dim incomingFromObject As Boolean = False
Dim list As ArrayBuilder(Of InferenceNode) = IncomingEdges
For Each currentGraphNode As InferenceNode In IncomingEdges
Debug.Assert(currentGraphNode.NodeType = InferenceNodeType.ArgumentNode, "Should only have named nodes as incoming edges.")
Dim currentNamedNode = DirectCast(currentGraphNode, ArgumentNode)
If currentNamedNode.Expression.Type IsNot Nothing AndAlso
currentNamedNode.Expression.Type.IsObjectType() Then
incomingFromObject = True
End If
If Not currentNamedNode.InferenceComplete Then
Graph.RemoveEdge(currentNamedNode, Me)
restartAlgorithm = True
numberOfAssertions += 1
Else
' We should not infer from a Nothing literal.
If currentNamedNode.Expression.IsStrictNothingLiteral() Then
numberOfIncomingWithNothing += 1
End If
End If
Next
If numberOfIncomingEdges > 0 AndAlso numberOfIncomingEdges = numberOfIncomingWithNothing Then
' !! Inference has failed: All incoming type hints, were based on 'Nothing'
Graph.MarkInferenceFailure()
Graph.ReportNotFailedInferenceDueToObject()
End If
Dim numberOfTypeHints As Integer = InferenceTypeCollection.GetTypeDataList().Count()
If numberOfTypeHints = 0 Then
If numberOfAssertions = numberOfIncomingEdges Then
Graph.MarkInferenceLevel(InferenceLevel.Orcas)
Else
' !! Inference has failed. No Type hints, and some, not all were assertions, otherwise we would have picked object for strict.
RegisterInferredType(Nothing, Nothing, False)
Graph.MarkInferenceFailure()
If Not incomingFromObject Then
Graph.ReportNotFailedInferenceDueToObject()
End If
End If
ElseIf numberOfTypeHints = 1 Then
Dim typeData As DominantTypeDataTypeInference = InferenceTypeCollection.GetTypeDataList()(0)
If argumentLocation Is Nothing AndAlso typeData.ArgumentLocation IsNot Nothing Then
argumentLocation = typeData.ArgumentLocation
End If
RegisterInferredType(typeData.ResultType, argumentLocation, typeData.ByAssumption)
Else
' Run the whidbey algorithm to see if we are smarter now.
Dim firstInferredType As TypeSymbol = Nothing
Dim allTypeData As ArrayBuilder(Of DominantTypeDataTypeInference) = InferenceTypeCollection.GetTypeDataList()
For Each currentTypeInfo As DominantTypeDataTypeInference In allTypeData
If firstInferredType Is Nothing Then
firstInferredType = currentTypeInfo.ResultType
ElseIf Not firstInferredType.IsSameTypeIgnoringAll(currentTypeInfo.ResultType) Then
' Whidbey failed hard here, in Orcas we added dominant type information.
Graph.MarkInferenceLevel(InferenceLevel.Orcas)
End If
Next
Dim dominantTypeDataList = ArrayBuilder(Of DominantTypeDataTypeInference).GetInstance()
Dim errorReasons As InferenceErrorReasons = InferenceErrorReasons.Other
InferenceTypeCollection.FindDominantType(dominantTypeDataList, errorReasons, Graph.UseSiteInfo)
If dominantTypeDataList.Count = 1 Then
' //consider: scottwis
' // This seems dangerous to me, that we
' // remove error reasons here.
' // Instead of clearing these, what we should be doing is
' // asserting that they are not set.
' // If for some reason they get set, but
' // we enter this path, then we have a bug.
' // This code is just masking any such bugs.
errorReasons = errorReasons And (Not (InferenceErrorReasons.Ambiguous Or InferenceErrorReasons.NoBest))
Dim typeData As DominantTypeDataTypeInference = dominantTypeDataList(0)
RegisterInferredType(typeData.ResultType, typeData.ArgumentLocation, typeData.ByAssumption)
' // Also update the location of the argument for constraint error reporting later on.
Else
If (errorReasons And InferenceErrorReasons.Ambiguous) <> 0 Then
' !! Inference has failed. Dominant type algorithm found ambiguous types.
Graph.ReportAmbiguousInferenceError(dominantTypeDataList)
Else
' //consider: scottwis
' // This code appears to be operating under the assumption that if the error reason is not due to an
' // ambiguity then it must be because there was no best match.
' // We should be asserting here to verify that assertion.
' !! Inference has failed. Dominant type algorithm could not find a dominant type.
Graph.ReportIncompatibleInferenceError(allTypeData)
End If
RegisterInferredType(allTypeData(0).ResultType, argumentLocation, False)
Graph.MarkInferenceFailure()
End If
Graph.RegisterErrorReasons(errorReasons)
dominantTypeDataList.Free()
End If
InferenceComplete = True
Return restartAlgorithm
End Function
Public Sub AddTypeHint(
type As TypeSymbol,
typeByAssumption As Boolean,
argumentLocation As SyntaxNode,
parameter As ParameterSymbol,
inferredFromObject As Boolean,
inferenceRestrictions As RequiredConversion
)
Debug.Assert(Not typeByAssumption OrElse type.IsObjectType() OrElse TypeOf type Is ArrayLiteralTypeSymbol, "unexpected: a type which was 'by assumption', but isn't object or array literal")
' Don't add error types to the type argument inference collection.
If type.IsErrorType Then
Return
End If
Dim foundInList As Boolean = False
' Do not merge array literals with other expressions
If TypeOf type IsNot ArrayLiteralTypeSymbol Then
For Each competitor As DominantTypeDataTypeInference In InferenceTypeCollection.GetTypeDataList()
' Do not merge array literals with other expressions
If TypeOf competitor.ResultType IsNot ArrayLiteralTypeSymbol AndAlso type.IsSameTypeIgnoringAll(competitor.ResultType) Then
competitor.ResultType = TypeInferenceCollection.MergeTupleNames(competitor.ResultType, type)
competitor.InferenceRestrictions = Conversions.CombineConversionRequirements(
competitor.InferenceRestrictions,
inferenceRestrictions)
competitor.ByAssumption = competitor.ByAssumption AndAlso typeByAssumption
Debug.Assert(Not foundInList, "List is supposed to be unique: how can we already find two of the same type in this list.")
foundInList = True
' TODO: Should we simply exit the loop for RELEASE build?
End If
Next
End If
If Not foundInList Then
Dim typeData As DominantTypeDataTypeInference = New DominantTypeDataTypeInference()
typeData.ResultType = type
typeData.ByAssumption = typeByAssumption
typeData.InferenceRestrictions = inferenceRestrictions
typeData.ArgumentLocation = argumentLocation
typeData.Parameter = parameter
typeData.InferredFromObject = inferredFromObject
typeData.TypeParameter = DeclaredTypeParam
InferenceTypeCollection.GetTypeDataList().Add(typeData)
End If
End Sub
End Class
Private Class ArgumentNode
Inherits InferenceNode
Public ReadOnly ParameterType As TypeSymbol
Public ReadOnly Expression As BoundExpression
Public ReadOnly Parameter As ParameterSymbol
Public Sub New(graph As InferenceGraph, expression As BoundExpression, parameterType As TypeSymbol, parameter As ParameterSymbol)
MyBase.New(graph, InferenceNodeType.ArgumentNode)
Me.Expression = expression
Me.ParameterType = parameterType
Me.Parameter = parameter
End Sub
Public Overrides Function InferTypeAndPropagateHints() As Boolean
#If DEBUG Then
VerifyIncomingInferenceComplete(InferenceNodeType.TypeParameterNode)
#End If
' Check if all incoming are ok, otherwise skip inference.
For Each currentGraphNode As InferenceNode In IncomingEdges
Debug.Assert(currentGraphNode.NodeType = InferenceNodeType.TypeParameterNode, "Should only have typed nodes as incoming edges.")
Dim currentTypedNode As TypeParameterNode = DirectCast(currentGraphNode, TypeParameterNode)
If currentTypedNode.InferredType Is Nothing Then
Dim skipThisNode As Boolean = True
If Expression.Kind = BoundKind.UnboundLambda AndAlso ParameterType.IsDelegateType() Then
' Check here if we need to infer Object for some of the parameters of the Lambda if we weren't able
' to infer these otherwise. This is only the case for arguments of the lambda that have a GenericParam
' of the method we are inferring that is not yet inferred.
' Now find the invoke method of the delegate
Dim delegateType = DirectCast(ParameterType, NamedTypeSymbol)
Dim invokeMethod As MethodSymbol = delegateType.DelegateInvokeMethod
If invokeMethod IsNot Nothing AndAlso invokeMethod.GetUseSiteInfo().DiagnosticInfo Is Nothing Then
Dim unboundLambda = DirectCast(Expression, UnboundLambda)
Dim lambdaParameters As ImmutableArray(Of ParameterSymbol) = unboundLambda.Parameters
Dim delegateParameters As ImmutableArray(Of ParameterSymbol) = invokeMethod.Parameters
For i As Integer = 0 To Math.Min(lambdaParameters.Length, delegateParameters.Length) - 1 Step 1
Dim lambdaParameter = DirectCast(lambdaParameters(i), UnboundLambdaParameterSymbol)
Dim delegateParam As ParameterSymbol = delegateParameters(i)
If lambdaParameter.Type Is Nothing AndAlso
delegateParam.Type.Equals(currentTypedNode.DeclaredTypeParam) Then
If Graph.Diagnostic Is Nothing Then
Graph.Diagnostic = BindingDiagnosticBag.Create(withDiagnostics:=True, Graph.UseSiteInfo.AccumulatesDependencies)
End If
' If this was an argument to the unbound Lambda, infer Object.
If Graph.ObjectType Is Nothing Then
Debug.Assert(Graph.Diagnostic IsNot Nothing)
Graph.ObjectType = unboundLambda.Binder.GetSpecialType(SpecialType.System_Object, lambdaParameter.IdentifierSyntax, Graph.Diagnostic)
End If
currentTypedNode.RegisterInferredType(Graph.ObjectType,
lambdaParameter.TypeSyntax,
currentTypedNode.InferredTypeByAssumption)
'
' Port SP1 CL 2941063 to VS10
' Bug 153317
' Report an error if Option Strict On or a warning if Option Strict Off
' because we have no hints about the lambda parameter
' and we are assuming that it is an object.
' e.g. "Sub f(Of T, U)(ByVal x As Func(Of T, U))" invoked with "f(function(z)z)"
' needs to put the squiggly on the first "z".
Debug.Assert(Graph.Diagnostic IsNot Nothing)
unboundLambda.Binder.ReportLambdaParameterInferredToBeObject(lambdaParameter, Graph.Diagnostic)
skipThisNode = False
Exit For
End If
Next
End If
End If
If skipThisNode Then
InferenceComplete = True
Return False ' DOn't restart the algorithm.
End If
End If
Next
Dim argumentType As TypeSymbol = Nothing
Dim inferenceOk As Boolean = False
Select Case Expression.Kind
Case BoundKind.AddressOfOperator
inferenceOk = Graph.InferTypeArgumentsFromAddressOfArgument(
Expression,
ParameterType,
Parameter)
Case BoundKind.LateAddressOfOperator
' We can not infer anything for this addressOf, AddressOf can never be of type Object, so mark inference
' as not failed due to object.
Graph.ReportNotFailedInferenceDueToObject()
inferenceOk = True
Case BoundKind.QueryLambda, BoundKind.GroupTypeInferenceLambda, BoundKind.UnboundLambda
' TODO: Not sure if this is applicable to Roslyn, need to try this out when all required features are available.
' BUG: 131359 If the lambda is wrapped in a delegate constructor the resultType
' will be set and not be Void. In this case the lambda argument should be treated as a regular
' argument so fall through in this case.
Debug.Assert(Expression.Type Is Nothing)
' TODO: We are setting inference level before
' even trying to infer something from the lambda. It is possible
' that we won't infer anything, should consider changing the
' inference level after.
Graph.MarkInferenceLevel(InferenceLevel.Orcas)
inferenceOk = Graph.InferTypeArgumentsFromLambdaArgument(
Expression,
ParameterType,
Parameter)
Case Else
HandleAsAGeneralExpression:
' We should not infer from a Nothing literal.
If Expression.IsStrictNothingLiteral() Then
InferenceComplete = True
' continue without restarting, if all hints are Nothing the InferenceTypeNode will mark
' the inference as failed.
Return False
End If
Dim inferenceRestrictions As RequiredConversion = RequiredConversion.Any
If Parameter IsNot Nothing AndAlso
Parameter.IsByRef AndAlso
(Expression.IsLValue() OrElse Expression.IsPropertySupportingAssignment()) Then
' A ByRef parameter needs (if the argument was an lvalue) to be copy-backable into
' that argument.
Debug.Assert(inferenceRestrictions = RequiredConversion.Any, "there should have been no prior restrictions by the time we encountered ByRef")
inferenceRestrictions = Conversions.CombineConversionRequirements(
inferenceRestrictions,
Conversions.InvertConversionRequirement(inferenceRestrictions))
Debug.Assert(inferenceRestrictions = RequiredConversion.AnyAndReverse, "expected ByRef to require AnyAndReverseConversion")
End If
Dim arrayLiteral As BoundArrayLiteral = Nothing
Dim argumentTypeByAssumption As Boolean = False
Dim expressionType As TypeSymbol
If Expression.Kind = BoundKind.ArrayLiteral Then
arrayLiteral = DirectCast(Expression, BoundArrayLiteral)
argumentTypeByAssumption = arrayLiteral.NumberOfCandidates <> 1
expressionType = New ArrayLiteralTypeSymbol(arrayLiteral)
ElseIf Expression.Kind = BoundKind.TupleLiteral Then
expressionType = DirectCast(Expression, BoundTupleLiteral).InferredType
Else
expressionType = Expression.Type
End If
' Need to create an ArrayLiteralTypeSymbol
inferenceOk = Graph.InferTypeArgumentsFromArgument(
Expression.Syntax,
expressionType,
argumentTypeByAssumption,
ParameterType,
Parameter,
MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter,
inferenceRestrictions)
End Select
If Not inferenceOk Then
' !! Inference has failed. Mismatch of Argument and Parameter signature, so could not find type hints.
Graph.MarkInferenceFailure()
If Not (Expression.Type IsNot Nothing AndAlso Expression.Type.IsObjectType()) Then
Graph.ReportNotFailedInferenceDueToObject()
End If
End If
InferenceComplete = True
Return False ' // Don't restart the algorithm;
End Function
End Class
Private Class InferenceGraph
Inherits Graph(Of InferenceNode)
Public Diagnostic As BindingDiagnosticBag
Public ObjectType As NamedTypeSymbol
Public ReadOnly Candidate As MethodSymbol
Public ReadOnly Arguments As ImmutableArray(Of BoundExpression)
Public ReadOnly ParameterToArgumentMap As ArrayBuilder(Of Integer)
Public ReadOnly ParamArrayItems As ArrayBuilder(Of Integer)
Public ReadOnly DelegateReturnType As TypeSymbol
Public ReadOnly DelegateReturnTypeReferenceBoundNode As BoundNode
Public UseSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)
Private _someInferenceFailed As Boolean
Private _inferenceErrorReasons As InferenceErrorReasons
Private _allFailedInferenceIsDueToObject As Boolean = True ' remains true until proven otherwise.
Private _typeInferenceLevel As InferenceLevel = InferenceLevel.None
Private _asyncLambdaSubToFunctionMismatch As HashSet(Of BoundExpression)
Private ReadOnly _typeParameterNodes As ImmutableArray(Of TypeParameterNode)
Private ReadOnly _verifyingAssertions As Boolean
Private Sub New(
diagnostic As BindingDiagnosticBag,
candidate As MethodSymbol,
arguments As ImmutableArray(Of BoundExpression),
parameterToArgumentMap As ArrayBuilder(Of Integer),
paramArrayItems As ArrayBuilder(Of Integer),
delegateReturnType As TypeSymbol,
delegateReturnTypeReferenceBoundNode As BoundNode,
asyncLambdaSubToFunctionMismatch As HashSet(Of BoundExpression),
useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol)
)
Debug.Assert(delegateReturnType Is Nothing OrElse delegateReturnTypeReferenceBoundNode IsNot Nothing)
Me.Diagnostic = diagnostic
Me.Candidate = candidate
Me.Arguments = arguments
Me.ParameterToArgumentMap = parameterToArgumentMap
Me.ParamArrayItems = paramArrayItems
Me.DelegateReturnType = delegateReturnType
Me.DelegateReturnTypeReferenceBoundNode = delegateReturnTypeReferenceBoundNode
Me._asyncLambdaSubToFunctionMismatch = asyncLambdaSubToFunctionMismatch
Me.UseSiteInfo = useSiteInfo
' Allocate the array of TypeParameter nodes.
Dim arity As Integer = candidate.Arity
Dim typeParameterNodes(arity - 1) As TypeParameterNode
For i As Integer = 0 To arity - 1 Step 1
typeParameterNodes(i) = New TypeParameterNode(Me, candidate.TypeParameters(i))
Next
_typeParameterNodes = typeParameterNodes.AsImmutableOrNull()
End Sub
Public ReadOnly Property SomeInferenceHasFailed As Boolean
Get
Return _someInferenceFailed
End Get
End Property
Public Sub MarkInferenceFailure()
_someInferenceFailed = True
End Sub
Public ReadOnly Property AllFailedInferenceIsDueToObject As Boolean
Get
Return _allFailedInferenceIsDueToObject
End Get
End Property
Public ReadOnly Property InferenceErrorReasons As InferenceErrorReasons
Get
Return _inferenceErrorReasons
End Get
End Property
Public Sub ReportNotFailedInferenceDueToObject()
_allFailedInferenceIsDueToObject = False
End Sub
Public ReadOnly Property TypeInferenceLevel As InferenceLevel
Get
Return _typeInferenceLevel
End Get
End Property
Public Sub MarkInferenceLevel(typeInferenceLevel As InferenceLevel)
If _typeInferenceLevel < typeInferenceLevel Then
_typeInferenceLevel = typeInferenceLevel
End If
End Sub
Public Shared Function Infer(
candidate As MethodSymbol,
arguments As ImmutableArray(Of BoundExpression),
parameterToArgumentMap As ArrayBuilder(Of Integer),
paramArrayItems As ArrayBuilder(Of Integer),
delegateReturnType As TypeSymbol,
delegateReturnTypeReferenceBoundNode As BoundNode,
ByRef typeArguments As ImmutableArray(Of TypeSymbol),
ByRef inferenceLevel As InferenceLevel,
ByRef allFailedInferenceIsDueToObject As Boolean,
ByRef someInferenceFailed As Boolean,
ByRef inferenceErrorReasons As InferenceErrorReasons,
<Out> ByRef inferredTypeByAssumption As BitVector,
<Out> ByRef typeArgumentsLocation As ImmutableArray(Of SyntaxNodeOrToken),
<[In](), Out()> ByRef asyncLambdaSubToFunctionMismatch As HashSet(Of BoundExpression),
<[In], Out> ByRef useSiteInfo As CompoundUseSiteInfo(Of AssemblySymbol),
ByRef diagnostic As BindingDiagnosticBag,
inferTheseTypeParameters As BitVector
) As Boolean
Dim graph As New InferenceGraph(diagnostic, candidate, arguments, parameterToArgumentMap, paramArrayItems,
delegateReturnType, delegateReturnTypeReferenceBoundNode, asyncLambdaSubToFunctionMismatch,
useSiteInfo)
' Build a graph describing the flow of type inference data.
' This creates edges from "regular" arguments to type parameters and from type parameters to lambda arguments.
' In the rest of this function that graph is then processed (see below for more details). Essentially, for each
' "type parameter" node a list of "type hints" (possible candidates for type inference) is collected. The dominant
' type algorithm is then performed over the list of hints associated with each node.
'
' The process of populating the graph also seeds type hints for type parameters referenced by explicitly typed
' lambda parameters. Also, hints sometimes have restrictions placed on them that limit what conversions the dominant type
' algorithm can consider when it processes them. The restrictions are generally driven by the context in which type
' parameters are used. For example if a type parameter is used as a type parameter of another type (something like IGoo(of T)),
' then the dominant type algorithm is not allowed to consider any conversions. There are similar restrictions for
' Array co-variance.
graph.PopulateGraph()
Dim topoSortedGraph = ArrayBuilder(Of StronglyConnectedComponent(Of InferenceNode)).GetInstance()
' This is the restart point of the algorithm
Do
Dim restartAlgorithm As Boolean = False
Dim stronglyConnectedComponents As Graph(Of StronglyConnectedComponent(Of InferenceNode)) =
graph.BuildStronglyConnectedComponents()
topoSortedGraph.Clear()
stronglyConnectedComponents.TopoSort(topoSortedGraph)
' We now iterate over the topologically-sorted strongly connected components of the graph, and generate
' type hints as appropriate.
'
' When we find a node for an argument (or an ArgumentNode as it's referred to in the code), we infer
' types for all type parameters referenced by that argument and then propagate those types as hints
' to the referenced type parameters. If there are incoming edges into the argument node, they correspond
' to parameters of lambda arguments that get their value from the delegate type that contains type
' parameters that would have been inferred during a previous iteration of the loop. Those types are
' flowed into the lambda argument.
'
' When we encounter a "type parameter" node (or TypeParameterNode as it is called in the code), we run
' the dominant type algorithm over all of it's hints and use the resulting type as the value for the
' referenced type parameter.
'
' If we find a strongly connected component with more than one node, it means we
' have a cycle and cannot simply run the inference algorithm. When this happens,
' we look through the nodes in the cycle for a type parameter node with at least
' one type hint. If we find one, we remove all incoming edges to that node,
' infer the type using its hints, and then restart the whole algorithm from the
' beginning (recompute the strongly connected components, resort them, and then
' iterate over the graph again). The source nodes of the incoming edges we
' removed are added to an "assertion list". After graph traversal is done we
' then run inference on any "assertion nodes" we may have created.
For Each sccNode As StronglyConnectedComponent(Of InferenceNode) In topoSortedGraph
Dim childNodes As ArrayBuilder(Of InferenceNode) = sccNode.ChildNodes
' Small optimization if one node
If childNodes.Count = 1 Then
If childNodes(0).InferTypeAndPropagateHints() Then
' consider: scottwis
' We should be asserting here, because this code is unreachable..
' There are two implementations of InferTypeAndPropagateHints,
' one for "named nodes" (nodes corresponding to arguments) and another
' for "type nodes" (nodes corresponding to types).
' The implementation for "named nodes" always returns false, which means
' "don't restart the algorithm". The implementation for "type nodes" only returns true
' if a node has incoming edges that have not been visited previously. In order for that
' to happen the node must be inside a strongly connected component with more than one node
' (i.e. it must be involved in a cycle). If it wasn't we would be visiting it in
' topological order, which means all incoming edges should have already been visited.
' That means that if we reach this code, there is probably a bug in the traversal process. We
' don't want to silently mask the bug. At a minimum we should either assert or generate a compiler error.
'
' An argument could be made that it is good to have this because
' InferTypeAndPropagateHints is virtual, and should some new node type be
' added it's implementation may return true, and so this would follow that
' path. That argument does make some tiny amount of sense, and so we
' should keep this code here to make it easier to make any such
' modifications in the future. However, we still need an assert to guard
' against graph traversal bugs, and in the event that such changes are
' made, leave it to the modifier to remove the assert if necessary.
Throw ExceptionUtilities.Unreachable
End If
Else
Dim madeInferenceProgress As Boolean = False
For Each child As InferenceNode In childNodes
If child.NodeType = InferenceNodeType.TypeParameterNode AndAlso
DirectCast(child, TypeParameterNode).InferenceTypeCollection.GetTypeDataList().Count > 0 Then
If child.InferTypeAndPropagateHints() Then
' If edges were broken, restart algorithm to recompute strongly connected components.
restartAlgorithm = True
End If
madeInferenceProgress = True
End If
Next
If Not madeInferenceProgress Then
' Did not make progress trying to force incoming edges for nodes with TypesHints, just inferring all now,
' will infer object if no type hints.
For Each child As InferenceNode In childNodes
If child.NodeType = InferenceNodeType.TypeParameterNode AndAlso
child.InferTypeAndPropagateHints() Then
' If edges were broken, restart algorithm to recompute strongly connected components.
restartAlgorithm = True
End If
Next
End If
If restartAlgorithm Then
Exit For ' For Each sccNode
End If
End If
Next
If restartAlgorithm Then
Continue Do
End If
Exit Do
Loop
'The commented code below is from Dev10, but it looks like
'it doesn't do anything useful because topoSortedGraph contains
'StronglyConnectedComponents, which have NodeType=None.
'
'graph.m_VerifyingAssertions = True
'GraphNodeListIterator assertionIter(&topoSortedGraph);
' While (assertionIter.MoveNext())
'{
' GraphNode* currentNode = assertionIter.Current();
' if (currentNode->m_NodeType == TypedNodeType)
' {
' InferenceTypeNode* currentTypeNode = (InferenceTypeNode*)currentNode;
' currentTypeNode->VerifyTypeAssertions();
' }
'}
'graph.m_VerifyingAssertions = False
topoSortedGraph.Free()
Dim succeeded As Boolean = Not graph.SomeInferenceHasFailed
someInferenceFailed = graph.SomeInferenceHasFailed
allFailedInferenceIsDueToObject = graph.AllFailedInferenceIsDueToObject
inferenceErrorReasons = graph.InferenceErrorReasons
' Make sure that allFailedInferenceIsDueToObject only stays set,
' if there was an actual inference failure.
If Not someInferenceFailed OrElse delegateReturnType IsNot Nothing Then
allFailedInferenceIsDueToObject = False
End If
Dim arity As Integer = candidate.Arity
Dim inferredTypes(arity - 1) As TypeSymbol
Dim inferredFromLocation(arity - 1) As SyntaxNodeOrToken
For i As Integer = 0 To arity - 1 Step 1
' TODO: Should we use InferredType or CandidateInferredType here? It looks like Dev10 is using the latter,
' it might not be cleaned in case of a failure. Will use the former for now.
Dim typeParameterNode = graph._typeParameterNodes(i)
Dim inferredType As TypeSymbol = typeParameterNode.InferredType
If inferredType Is Nothing AndAlso
(inferTheseTypeParameters.IsNull OrElse inferTheseTypeParameters(i)) Then
succeeded = False
End If
If typeParameterNode.InferredTypeByAssumption Then
If inferredTypeByAssumption.IsNull Then
inferredTypeByAssumption = BitVector.Create(arity)
End If
inferredTypeByAssumption(i) = True
End If
inferredTypes(i) = inferredType
inferredFromLocation(i) = typeParameterNode.InferredFromLocation
Next
typeArguments = inferredTypes.AsImmutableOrNull()
typeArgumentsLocation = inferredFromLocation.AsImmutableOrNull()
inferenceLevel = graph._typeInferenceLevel
Debug.Assert(diagnostic Is Nothing OrElse diagnostic Is graph.Diagnostic)
diagnostic = graph.Diagnostic
asyncLambdaSubToFunctionMismatch = graph._asyncLambdaSubToFunctionMismatch
useSiteInfo = graph.UseSiteInfo
Return succeeded
End Function
Private Sub PopulateGraph()
Dim candidate As MethodSymbol = Me.Candidate
Dim arguments As ImmutableArray(Of BoundExpression) = Me.Arguments
Dim parameterToArgumentMap As ArrayBuilder(Of Integer) = Me.ParameterToArgumentMap
Dim paramArrayItems As ArrayBuilder(Of Integer) = Me.ParamArrayItems
Dim isExpandedParamArrayForm As Boolean = (paramArrayItems IsNot Nothing)
Dim argIndex As Integer
For paramIndex = 0 To candidate.ParameterCount - 1 Step 1
Dim param As ParameterSymbol = candidate.Parameters(paramIndex)
Dim targetType As TypeSymbol = param.Type
If param.IsParamArray AndAlso paramIndex = candidate.ParameterCount - 1 Then
If targetType.Kind <> SymbolKind.ArrayType Then
Continue For
End If
If Not isExpandedParamArrayForm Then
argIndex = parameterToArgumentMap(paramIndex)
Dim paramArrayArgument = If(argIndex = -1, Nothing, arguments(argIndex))
Debug.Assert(paramArrayArgument Is Nothing OrElse paramArrayArgument.Kind <> BoundKind.OmittedArgument)
'§11.8.2 Applicable Methods
'If the conversion from the type of the argument expression to the paramarray type is narrowing,
'then the method is only applicable in its expanded form.
'!!! However, there is an exception to that rule - narrowing conversion from semantical Nothing literal is Ok. !!!
If paramArrayArgument Is Nothing OrElse paramArrayArgument.HasErrors OrElse
Not ArgumentTypePossiblyMatchesParamarrayShape(paramArrayArgument, targetType) Then
Continue For
End If
RegisterArgument(paramArrayArgument, targetType, param)
Else
Debug.Assert(isExpandedParamArrayForm)
'§11.8.2 Applicable Methods
'If the argument expression is the literal Nothing, then the method is only applicable in its unexpanded form.
' Note, that explicitly converted NOTHING is treated the same way by Dev10.
If paramArrayItems.Count = 1 AndAlso arguments(paramArrayItems(0)).IsNothingLiteral() Then
Continue For
End If
' Otherwise, for a ParamArray parameter, all the matching arguments are passed
' ByVal as instances of the element type of the ParamArray.
' Perform the conversions to the element type of the ParamArray here.
Dim arrayType = DirectCast(targetType, ArrayTypeSymbol)
If Not arrayType.IsSZArray Then
Continue For
End If
targetType = arrayType.ElementType
If targetType.Kind = SymbolKind.ErrorType Then
Continue For
End If
For j As Integer = 0 To paramArrayItems.Count - 1 Step 1
If arguments(paramArrayItems(j)).HasErrors Then
Continue For
End If
RegisterArgument(arguments(paramArrayItems(j)), targetType, param)
Next
End If
Continue For
End If
argIndex = parameterToArgumentMap(paramIndex)
Dim argument = If(argIndex = -1, Nothing, arguments(argIndex))
If argument Is Nothing OrElse argument.HasErrors OrElse targetType.IsErrorType() OrElse argument.Kind = BoundKind.OmittedArgument Then
Continue For
End If
RegisterArgument(argument, targetType, param)
Next
AddDelegateReturnTypeToGraph()
End Sub
Private Sub AddDelegateReturnTypeToGraph()
If Me.DelegateReturnType IsNot Nothing AndAlso Not Me.DelegateReturnType.IsVoidType() Then
Dim fakeArgument As New BoundRValuePlaceholder(Me.DelegateReturnTypeReferenceBoundNode.Syntax,
Me.DelegateReturnType)
Dim returnNode As New ArgumentNode(Me, fakeArgument, Me.Candidate.ReturnType, parameter:=Nothing)
' Add the edges from all the current generic parameters to this named node.
For Each current As InferenceNode In Vertices
If current.NodeType = InferenceNodeType.TypeParameterNode Then
AddEdge(current, returnNode)
End If
Next
' Add the edges from the resultType outgoing to the generic parameters.
AddTypeToGraph(returnNode, isOutgoingEdge:=True)
End If
End Sub
Private Sub RegisterArgument(
argument As BoundExpression,
targetType As TypeSymbol,
param As ParameterSymbol
)
' Dig through parenthesized.
If Not argument.IsNothingLiteral Then
argument = argument.GetMostEnclosedParenthesizedExpression()
End If
Dim argNode As New ArgumentNode(Me, argument, targetType, param)
Select Case argument.Kind
Case BoundKind.UnboundLambda, BoundKind.QueryLambda, BoundKind.GroupTypeInferenceLambda
AddLambdaToGraph(argNode, argument.GetBinderFromLambda())
Case BoundKind.AddressOfOperator
AddAddressOfToGraph(argNode, DirectCast(argument, BoundAddressOfOperator).Binder)
Case BoundKind.TupleLiteral
AddTupleLiteralToGraph(argNode)
Case Else
AddTypeToGraph(argNode, isOutgoingEdge:=True)
End Select
End Sub
Private Sub AddTypeToGraph(
node As ArgumentNode,
isOutgoingEdge As Boolean
)
AddTypeToGraph(node.ParameterType, node, isOutgoingEdge, BitVector.Create(_typeParameterNodes.Length))
End Sub
Private Function FindTypeParameterNode(typeParameter As TypeParameterSymbol) As TypeParameterNode
Dim ordinal As Integer = typeParameter.Ordinal
If ordinal < _typeParameterNodes.Length AndAlso
_typeParameterNodes(ordinal) IsNot Nothing AndAlso
typeParameter.Equals(_typeParameterNodes(ordinal).DeclaredTypeParam) Then
Return _typeParameterNodes(ordinal)
End If
Return Nothing
End Function
Private Sub AddTypeToGraph(
parameterType As TypeSymbol,
argNode As ArgumentNode,
isOutgoingEdge As Boolean,
ByRef haveSeenTypeParameters As BitVector
)
Select Case parameterType.Kind
Case SymbolKind.TypeParameter
Dim typeParameter = DirectCast(parameterType, TypeParameterSymbol)
Dim typeParameterNode As TypeParameterNode = FindTypeParameterNode(typeParameter)
If typeParameterNode IsNot Nothing AndAlso
Not haveSeenTypeParameters(typeParameter.Ordinal) Then
If typeParameterNode.Parameter Is Nothing Then
typeParameterNode.SetParameter(argNode.Parameter)
End If
If (isOutgoingEdge) Then
AddEdge(argNode, typeParameterNode)
Else
AddEdge(typeParameterNode, argNode)
End If
haveSeenTypeParameters(typeParameter.Ordinal) = True
End If
Case SymbolKind.ArrayType
AddTypeToGraph(DirectCast(parameterType, ArrayTypeSymbol).ElementType, argNode, isOutgoingEdge, haveSeenTypeParameters)
Case SymbolKind.NamedType
Dim possiblyGenericType = DirectCast(parameterType, NamedTypeSymbol)
Dim elementTypes As ImmutableArray(Of TypeSymbol) = Nothing
If possiblyGenericType.TryGetElementTypesIfTupleOrCompatible(elementTypes) Then
For Each elementType In elementTypes
AddTypeToGraph(elementType, argNode, isOutgoingEdge, haveSeenTypeParameters)
Next
Else
Do
For Each typeArgument In possiblyGenericType.TypeArgumentsWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
AddTypeToGraph(typeArgument, argNode, isOutgoingEdge, haveSeenTypeParameters)
Next
possiblyGenericType = possiblyGenericType.ContainingType
Loop While possiblyGenericType IsNot Nothing
End If
End Select
End Sub
Private Sub AddTupleLiteralToGraph(argNode As ArgumentNode)
AddTupleLiteralToGraph(argNode.ParameterType, argNode)
End Sub
Private Sub AddTupleLiteralToGraph(
parameterType As TypeSymbol,
argNode As ArgumentNode
)
Debug.Assert(argNode.Expression.Kind = BoundKind.TupleLiteral)
Dim tupleLiteral = DirectCast(argNode.Expression, BoundTupleLiteral)
Dim tupleArguments = tupleLiteral.Arguments
If parameterType.IsTupleOrCompatibleWithTupleOfCardinality(tupleArguments.Length) Then
Dim parameterElementTypes = parameterType.GetElementTypesOfTupleOrCompatible
For i As Integer = 0 To tupleArguments.Length - 1
RegisterArgument(tupleArguments(i), parameterElementTypes(i), argNode.Parameter)
Next
Return
End If
AddTypeToGraph(argNode, isOutgoingEdge:=True)
End Sub
Private Sub AddAddressOfToGraph(argNode As ArgumentNode, binder As Binder)
AddAddressOfToGraph(argNode.ParameterType, argNode, binder)
End Sub
Private Sub AddAddressOfToGraph(
parameterType As TypeSymbol,
argNode As ArgumentNode,
binder As Binder
)
Debug.Assert(argNode.Expression.Kind = BoundKind.AddressOfOperator)
If parameterType.IsTypeParameter() Then
AddTypeToGraph(parameterType, argNode, isOutgoingEdge:=True, haveSeenTypeParameters:=BitVector.Create(_typeParameterNodes.Length))
ElseIf parameterType.IsDelegateType() Then
Dim delegateType As NamedTypeSymbol = DirectCast(parameterType, NamedTypeSymbol)
Dim invoke As MethodSymbol = delegateType.DelegateInvokeMethod
If invoke IsNot Nothing AndAlso invoke.GetUseSiteInfo().DiagnosticInfo Is Nothing AndAlso delegateType.IsGenericType Then
Dim haveSeenTypeParameters = BitVector.Create(_typeParameterNodes.Length)
AddTypeToGraph(invoke.ReturnType, argNode, isOutgoingEdge:=True, haveSeenTypeParameters:=haveSeenTypeParameters) ' outgoing (name->type) edge
haveSeenTypeParameters.Clear()
For Each delegateParameter As ParameterSymbol In invoke.Parameters
AddTypeToGraph(delegateParameter.Type, argNode, isOutgoingEdge:=False, haveSeenTypeParameters:=haveSeenTypeParameters) ' incoming (type->name) edge
Next
End If
ElseIf TypeSymbol.Equals(parameterType.OriginalDefinition, binder.Compilation.GetWellKnownType(WellKnownType.System_Linq_Expressions_Expression_T), TypeCompareKind.ConsiderEverything) Then
' If we've got an Expression(Of T), skip through to T
AddAddressOfToGraph(DirectCast(parameterType, NamedTypeSymbol).TypeArgumentWithDefinitionUseSiteDiagnostics(0, Me.UseSiteInfo), argNode, binder)
End If
End Sub
Private Sub AddLambdaToGraph(argNode As ArgumentNode, binder As Binder)
AddLambdaToGraph(argNode.ParameterType, argNode, binder)
End Sub
Private Sub AddLambdaToGraph(
parameterType As TypeSymbol,
argNode As ArgumentNode,
binder As Binder
)
If parameterType.IsTypeParameter() Then
' Lambda is bound to a generic typeParam, just infer anonymous delegate
AddTypeToGraph(parameterType, argNode, isOutgoingEdge:=True, haveSeenTypeParameters:=BitVector.Create(_typeParameterNodes.Length))
ElseIf parameterType.IsDelegateType() Then
Dim delegateType As NamedTypeSymbol = DirectCast(parameterType, NamedTypeSymbol)
Dim invoke As MethodSymbol = delegateType.DelegateInvokeMethod
If invoke IsNot Nothing AndAlso invoke.GetUseSiteInfo().DiagnosticInfo Is Nothing AndAlso delegateType.IsGenericType Then
Dim delegateParameters As ImmutableArray(Of ParameterSymbol) = invoke.Parameters
Dim lambdaParameters As ImmutableArray(Of ParameterSymbol)
Select Case argNode.Expression.Kind
Case BoundKind.QueryLambda
lambdaParameters = DirectCast(argNode.Expression, BoundQueryLambda).LambdaSymbol.Parameters
Case BoundKind.GroupTypeInferenceLambda
lambdaParameters = DirectCast(argNode.Expression, GroupTypeInferenceLambda).Parameters
Case BoundKind.UnboundLambda
lambdaParameters = DirectCast(argNode.Expression, UnboundLambda).Parameters
Case Else
Throw ExceptionUtilities.UnexpectedValue(argNode.Expression.Kind)
End Select
Dim haveSeenTypeParameters = BitVector.Create(_typeParameterNodes.Length)
For i As Integer = 0 To Math.Min(delegateParameters.Length, lambdaParameters.Length) - 1 Step 1
If lambdaParameters(i).Type IsNot Nothing Then
' Prepopulate the hint from the lambda's parameter.
' !!! Unlike Dev10, we are using MatchArgumentToBaseOfGenericParameter because a value of generic
' !!! parameter will be passed into the parameter of argument type.
' TODO: Consider using location for the type declaration.
InferTypeArgumentsFromArgument(
argNode.Expression.Syntax,
lambdaParameters(i).Type,
argumentTypeByAssumption:=False,
parameterType:=delegateParameters(i).Type,
param:=delegateParameters(i),
digThroughToBasesAndImplements:=MatchGenericArgumentToParameter.MatchArgumentToBaseOfGenericParameter,
inferenceRestrictions:=RequiredConversion.Any)
End If
AddTypeToGraph(delegateParameters(i).Type, argNode, isOutgoingEdge:=False, haveSeenTypeParameters:=haveSeenTypeParameters)
Next
haveSeenTypeParameters.Clear()
AddTypeToGraph(invoke.ReturnType, argNode, isOutgoingEdge:=True, haveSeenTypeParameters:=haveSeenTypeParameters)
End If
ElseIf TypeSymbol.Equals(parameterType.OriginalDefinition, binder.Compilation.GetWellKnownType(WellKnownType.System_Linq_Expressions_Expression_T), TypeCompareKind.ConsiderEverything) Then
' If we've got an Expression(Of T), skip through to T
AddLambdaToGraph(DirectCast(parameterType, NamedTypeSymbol).TypeArgumentWithDefinitionUseSiteDiagnostics(0, Me.UseSiteInfo), argNode, binder)
End If
End Sub
Private Shared Function ArgumentTypePossiblyMatchesParamarrayShape(argument As BoundExpression, paramType As TypeSymbol) As Boolean
Dim argumentType As TypeSymbol = argument.Type
Dim isArrayLiteral As Boolean = False
If argumentType Is Nothing Then
If argument.Kind = BoundKind.ArrayLiteral Then
isArrayLiteral = True
argumentType = DirectCast(argument, BoundArrayLiteral).InferredType
Else
Return False
End If
End If
While paramType.IsArrayType()
If Not argumentType.IsArrayType() Then
Return False
End If
Dim argumentArray = DirectCast(argumentType, ArrayTypeSymbol)
Dim paramArrayType = DirectCast(paramType, ArrayTypeSymbol)
' We can ignore IsSZArray value for an inferred type of an array literal as long as its rank matches.
If argumentArray.Rank <> paramArrayType.Rank OrElse
(Not isArrayLiteral AndAlso argumentArray.IsSZArray <> paramArrayType.IsSZArray) Then
Return False
End If
isArrayLiteral = False
argumentType = argumentArray.ElementType
paramType = paramArrayType.ElementType
End While
Return True
End Function
Public Sub RegisterTypeParameterHint(
genericParameter As TypeParameterSymbol,
inferredType As TypeSymbol,
inferredTypeByAssumption As Boolean,
argumentLocation As SyntaxNode,
parameter As ParameterSymbol,
inferredFromObject As Boolean,
inferenceRestrictions As RequiredConversion
)
Dim typeNode As TypeParameterNode = FindTypeParameterNode(genericParameter)
If typeNode IsNot Nothing Then
typeNode.AddTypeHint(inferredType, inferredTypeByAssumption, argumentLocation, parameter, inferredFromObject, inferenceRestrictions)
End If
End Sub
Private Function RefersToGenericParameterToInferArgumentFor(
parameterType As TypeSymbol
) As Boolean
Select Case parameterType.Kind
Case SymbolKind.TypeParameter
Dim typeParameter = DirectCast(parameterType, TypeParameterSymbol)
Dim typeNode As TypeParameterNode = FindTypeParameterNode(typeParameter)
' TODO: It looks like this check can give us a false positive. For example,
' if we are resolving a recursive call we might already bind a type
' parameter to itself (to the same type parameter of the containing method).
' So, the fact that we ran into this type parameter doesn't necessary mean
' that there is anything to infer. I am not sure if this can lead to some
' negative effect. Dev10 appears to have the same behavior, from what I see
' in the code.
If typeNode IsNot Nothing Then
Return True
End If
Case SymbolKind.ArrayType
Return RefersToGenericParameterToInferArgumentFor(DirectCast(parameterType, ArrayTypeSymbol).ElementType)
Case SymbolKind.NamedType
Dim possiblyGenericType = DirectCast(parameterType, NamedTypeSymbol)
Dim elementTypes As ImmutableArray(Of TypeSymbol) = Nothing
If possiblyGenericType.TryGetElementTypesIfTupleOrCompatible(elementTypes) Then
For Each elementType In elementTypes
If RefersToGenericParameterToInferArgumentFor(elementType) Then
Return True
End If
Next
Else
Do
For Each typeArgument In possiblyGenericType.TypeArgumentsWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
If RefersToGenericParameterToInferArgumentFor(typeArgument) Then
Return True
End If
Next
possiblyGenericType = possiblyGenericType.ContainingType
Loop While possiblyGenericType IsNot Nothing
End If
End Select
Return False
End Function
' Given an argument type, a parameter type, and a set of (possibly unbound) type arguments
' to a generic method, infer type arguments corresponding to type parameters that occur
' in the parameter type.
'
' A return value of false indicates that inference fails.
'
' If a generic method is parameterized by T, an argument of type A matches a parameter of type
' P, this function tries to infer type for T by using these patterns:
'
' -- If P is T, then infer A for T
' -- If P is G(Of T) and A is G(Of X), then infer X for T
' -- If P is Array Of T, and A is Array Of X, then infer X for T
' -- If P is ByRef T, then infer A for T
Private Function InferTypeArgumentsFromArgumentDirectly(
argumentLocation As SyntaxNode,
argumentType As TypeSymbol,
argumentTypeByAssumption As Boolean,
parameterType As TypeSymbol,
param As ParameterSymbol,
digThroughToBasesAndImplements As MatchGenericArgumentToParameter,
inferenceRestrictions As RequiredConversion
) As Boolean
If argumentType Is Nothing OrElse argumentType.IsVoidType() Then
' We should never be able to infer a value from something that doesn't provide a value, e.g:
' Goo(Of T) can't be passed Sub bar(), as in Goo(Bar())
Return False
End If
' If a generic method is parameterized by T, an argument of type A matching a parameter of type
' P can be used to infer a type for T by these patterns:
'
' -- If P is T, then infer A for T
' -- If P is G(Of T) and A is G(Of X), then infer X for T
' -- If P is Array Of T, and A is Array Of X, then infer X for T
' -- If P is ByRef T, then infer A for T
' -- If P is (T, T) and A is (X, X), then infer X for T
If parameterType.IsTypeParameter() Then
RegisterTypeParameterHint(
DirectCast(parameterType, TypeParameterSymbol),
argumentType,
argumentTypeByAssumption,
argumentLocation,
param,
False,
inferenceRestrictions)
Return True
End If
Dim parameterElementTypes As ImmutableArray(Of TypeSymbol) = Nothing
Dim argumentElementTypes As ImmutableArray(Of TypeSymbol) = Nothing
If parameterType.GetNullableUnderlyingTypeOrSelf().TryGetElementTypesIfTupleOrCompatible(parameterElementTypes) AndAlso
If(parameterType.IsNullableType(), argumentType.GetNullableUnderlyingTypeOrSelf(), argumentType).
TryGetElementTypesIfTupleOrCompatible(argumentElementTypes) Then
If parameterElementTypes.Length <> argumentElementTypes.Length Then
Return False
End If
For typeArgumentIndex As Integer = 0 To parameterElementTypes.Length - 1
Dim parameterElementType = parameterElementTypes(typeArgumentIndex)
Dim argumentElementType = argumentElementTypes(typeArgumentIndex)
' propagate restrictions to the elements
If Not InferTypeArgumentsFromArgument(
argumentLocation,
argumentElementType,
argumentTypeByAssumption,
parameterElementType,
param,
digThroughToBasesAndImplements,
inferenceRestrictions
) Then
Return False
End If
Next
Return True
ElseIf parameterType.Kind = SymbolKind.NamedType Then
' e.g. handle goo(of T)(x as Bar(Of T)) We need to dig into Bar(Of T)
Dim parameterTypeAsNamedType = DirectCast(parameterType.GetTupleUnderlyingTypeOrSelf(), NamedTypeSymbol)
If parameterTypeAsNamedType.IsGenericType Then
Dim argumentTypeAsNamedType = If(argumentType.Kind = SymbolKind.NamedType, DirectCast(argumentType.GetTupleUnderlyingTypeOrSelf(), NamedTypeSymbol), Nothing)
If argumentTypeAsNamedType IsNot Nothing AndAlso argumentTypeAsNamedType.IsGenericType Then
If argumentTypeAsNamedType.OriginalDefinition.IsSameTypeIgnoringAll(parameterTypeAsNamedType.OriginalDefinition) Then
Do
For typeArgumentIndex As Integer = 0 To parameterTypeAsNamedType.Arity - 1 Step 1
' The following code is subtle. Let's recap what's going on...
' We've so far encountered some context, e.g. "_" or "ICovariant(_)"
' or "ByRef _" or the like. This context will have given us some TypeInferenceRestrictions.
' Now, inside the context, we've discovered a generic binding "G(Of _,_,_)"
' and we have to apply extra restrictions to each of those subcontexts.
' For non-variant parameters it's easy: the subcontexts just acquire the Identity constraint.
' For variant parameters it's more subtle. First, we have to strengthen the
' restrictions to require reference conversion (rather than just VB conversion or
' whatever it was). Second, if it was an In parameter, then we have to invert
' the sense.
'
' Processing of generics is tricky in the case that we've already encountered
' a "ByRef _". From that outer "ByRef _" we will have inferred the restriction
' "AnyConversionAndReverse", so that the argument could be copied into the parameter
' and back again. But now consider if we find a generic inside that ByRef, e.g.
' if it had been "ByRef x as G(Of T)" then what should we do? More specifically, consider a case
' "Sub f(Of T)(ByRef x as G(Of T))" invoked with some "dim arg as G(Of Hint)".
' What's needed for any candidate for T is that G(Of Hint) be convertible to
' G(Of Candidate), and vice versa for the copyback.
'
' But then what should we write down for the hints? The problem is that hints inhere
' to the generic parameter T, not to the function parameter G(Of T). So we opt for a
' safe approximation: we just require CLR identity between a candidate and the hint.
' This is safe but is a little overly-strict. For example:
' Class G(Of T)
' Public Shared Widening Operator CType(ByVal x As G(Of T)) As G(Of Animal)
' Public Shared Widening Operator CType(ByVal x As G(Of Animal)) As G(Of T)
' Sub inf(Of T)(ByRef x as G(Of T), ByVal y as T)
' ...
' inf(New G(Of Car), New Animal)
' inf(Of Animal)(New G(Of Car), New Animal)
' Then the hints will be "T:{Car=, Animal+}" and they'll result in inference-failure,
' even though the explicitly-provided T=Animal ends up working.
'
' Well, it's the best we can do without some major re-architecting of the way
' hints and type-inference works. That's because all our hints inhere to the
' type parameter T; in an ideal world, the ByRef hint would inhere to the parameter.
' But I don't think we'll ever do better than this, just because trying to do
' type inference inferring to arguments/parameters becomes exponential.
' Variance generic parameters will work the same.
' Dev10#595234: each Param'sInferenceRestriction is found as a modification of the surrounding InferenceRestriction:
Dim paramInferenceRestrictions As RequiredConversion
Select Case parameterTypeAsNamedType.TypeParameters(typeArgumentIndex).Variance
Case VarianceKind.In
paramInferenceRestrictions = Conversions.InvertConversionRequirement(
Conversions.StrengthenConversionRequirementToReference(inferenceRestrictions))
Case VarianceKind.Out
paramInferenceRestrictions = Conversions.StrengthenConversionRequirementToReference(inferenceRestrictions)
Case Else
Debug.Assert(VarianceKind.None = parameterTypeAsNamedType.TypeParameters(typeArgumentIndex).Variance)
paramInferenceRestrictions = RequiredConversion.Identity
End Select
Dim _DigThroughToBasesAndImplements As MatchGenericArgumentToParameter
If paramInferenceRestrictions = RequiredConversion.Reference Then
_DigThroughToBasesAndImplements = MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter
ElseIf paramInferenceRestrictions = RequiredConversion.ReverseReference Then
_DigThroughToBasesAndImplements = MatchGenericArgumentToParameter.MatchArgumentToBaseOfGenericParameter
Else
_DigThroughToBasesAndImplements = MatchGenericArgumentToParameter.MatchGenericArgumentToParameterExactly
End If
If Not InferTypeArgumentsFromArgument(
argumentLocation,
argumentTypeAsNamedType.TypeArgumentWithDefinitionUseSiteDiagnostics(typeArgumentIndex, Me.UseSiteInfo),
argumentTypeByAssumption,
parameterTypeAsNamedType.TypeArgumentWithDefinitionUseSiteDiagnostics(typeArgumentIndex, Me.UseSiteInfo),
param,
_DigThroughToBasesAndImplements,
paramInferenceRestrictions
) Then
' TODO: Would it make sense to continue through other type arguments even if inference failed for
' the current one?
Return False
End If
Next
' Do not forget about type parameters of containing type
parameterTypeAsNamedType = parameterTypeAsNamedType.ContainingType
argumentTypeAsNamedType = argumentTypeAsNamedType.ContainingType
Loop While parameterTypeAsNamedType IsNot Nothing
Debug.Assert(parameterTypeAsNamedType Is Nothing AndAlso argumentTypeAsNamedType Is Nothing)
Return True
End If
ElseIf parameterTypeAsNamedType.IsNullableType() Then
' we reach here when the ParameterType is an instantiation of Nullable,
' and the argument type is NOT a generic type.
' lwischik: ??? what do array elements have to do with nullables?
Return InferTypeArgumentsFromArgument(
argumentLocation,
argumentType,
argumentTypeByAssumption,
parameterTypeAsNamedType.GetNullableUnderlyingType(),
param,
digThroughToBasesAndImplements,
Conversions.CombineConversionRequirements(inferenceRestrictions, RequiredConversion.ArrayElement))
End If
Return False
End If
ElseIf parameterType.IsArrayType() Then
If argumentType.IsArrayType() Then
Dim parameterArray = DirectCast(parameterType, ArrayTypeSymbol)
Dim argumentArray = DirectCast(argumentType, ArrayTypeSymbol)
Dim argumentIsAarrayLiteral = TypeOf argumentArray Is ArrayLiteralTypeSymbol
' We can ignore IsSZArray value for an inferred type of an array literal as long as its rank matches.
If parameterArray.Rank = argumentArray.Rank AndAlso
(argumentIsAarrayLiteral OrElse parameterArray.IsSZArray = argumentArray.IsSZArray) Then
Return InferTypeArgumentsFromArgument(
argumentLocation,
argumentArray.ElementType,
argumentTypeByAssumption,
parameterArray.ElementType,
param,
digThroughToBasesAndImplements,
Conversions.CombineConversionRequirements(inferenceRestrictions, If(argumentIsAarrayLiteral, RequiredConversion.Any, RequiredConversion.ArrayElement)))
End If
End If
Return False
End If
Return True
End Function
' Given an argument type, a parameter type, and a set of (possibly unbound) type arguments
' to a generic method, infer type arguments corresponding to type parameters that occur
' in the parameter type.
'
' A return value of false indicates that inference fails.
'
' This routine is given an argument e.g. "List(Of IEnumerable(Of Int))",
' and a parameter e.g. "IEnumerable(Of IEnumerable(Of T))".
' The task is to infer hints for T, e.g. "T=int".
' This function takes care of allowing (in this example) List(Of _) to match IEnumerable(Of _).
' As for the real work, i.e. matching the contents, we invoke "InferTypeArgumentsFromArgumentDirectly"
' to do that.
'
' Note: this function returns "false" if it failed to pattern-match between argument and parameter type,
' and "true" if it succeeded.
' Success in pattern-matching may or may not produce type-hints for generic parameters.
' If it happened not to produce any type-hints, then maybe other argument/parameter pairs will have produced
' their own type hints that allow inference to succeed, or maybe no-one else will have produced type hints,
' or maybe other people will have produced conflicting type hints. In those cases, we'd return True from
' here (to show success at pattern-matching) and leave the downstream code to produce an error message about
' failing to infer T.
Friend Function InferTypeArgumentsFromArgument(
argumentLocation As SyntaxNode,
argumentType As TypeSymbol,
argumentTypeByAssumption As Boolean,
parameterType As TypeSymbol,
param As ParameterSymbol,
digThroughToBasesAndImplements As MatchGenericArgumentToParameter,
inferenceRestrictions As RequiredConversion
) As Boolean
If Not RefersToGenericParameterToInferArgumentFor(parameterType) Then
Return True
End If
' First try to the things directly. Only if this fails will we bother searching for things like List->IEnumerable.
Dim Inferred As Boolean = InferTypeArgumentsFromArgumentDirectly(
argumentLocation,
argumentType,
argumentTypeByAssumption,
parameterType,
param,
digThroughToBasesAndImplements,
inferenceRestrictions)
If Inferred Then
Return True
End If
If parameterType.IsTypeParameter() Then
' If we failed to match an argument against a generic parameter T, it means that the
' argument was something unmatchable, e.g. an AddressOf.
Return False
End If
' If we didn't find a direct match, we will have to look in base classes for a match.
' We'll either fix ParameterType and look amongst the bases of ArgumentType,
' or we'll fix ArgumentType and look amongst the bases of ParameterType,
' depending on the "DigThroughToBasesAndImplements" flag. This flag is affected by
' covariance and contravariance...
If digThroughToBasesAndImplements = MatchGenericArgumentToParameter.MatchGenericArgumentToParameterExactly Then
Return False
End If
' Special handling for Anonymous Delegates.
If argumentType IsNot Nothing AndAlso argumentType.IsDelegateType() AndAlso parameterType.IsDelegateType() AndAlso
digThroughToBasesAndImplements = MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter AndAlso
(inferenceRestrictions = RequiredConversion.Any OrElse inferenceRestrictions = RequiredConversion.AnyReverse OrElse
inferenceRestrictions = RequiredConversion.AnyAndReverse) Then
Dim argumentDelegateType = DirectCast(argumentType, NamedTypeSymbol)
Dim argumentInvokeProc As MethodSymbol = argumentDelegateType.DelegateInvokeMethod
Dim parameterDelegateType = DirectCast(parameterType, NamedTypeSymbol)
Dim parameterInvokeProc As MethodSymbol = parameterDelegateType.DelegateInvokeMethod
Debug.Assert(argumentInvokeProc IsNot Nothing OrElse Not argumentDelegateType.IsAnonymousType)
' Note, null check for parameterInvokeDeclaration should also filter out MultiCastDelegate type.
If argumentDelegateType.IsAnonymousType AndAlso Not parameterDelegateType.IsAnonymousType AndAlso
parameterInvokeProc IsNot Nothing AndAlso parameterInvokeProc.GetUseSiteInfo().DiagnosticInfo Is Nothing Then
' Some trickery relating to the fact that anonymous delegates can be converted to any delegate type.
' We are trying to match the anonymous delegate "BaseSearchType" onto the delegate "FixedType". e.g.
' Dim f = function(i as integer) i // ArgumentType = VB$AnonymousDelegate`2(Of Integer,Integer)
' inf(f) // ParameterType might be e.g. D(Of T) for some function inf(Of T)(f as D(Of T))
' // maybe defined as Delegate Function D(Of T)(x as T) as T.
' We're looking to achieve the same functionality in pattern-matching these types as we already
' have for calling "inf(function(i as integer) i)" directly.
' It allows any VB conversion from param-of-fixed-type to param-of-base-type (not just reference conversions).
' But it does allow a zero-argument BaseSearchType to be used for a FixedType with more.
' And it does allow a function BaseSearchType to be used for a sub FixedType.
'
' Anyway, the plan is to match each of the parameters in the ArgumentType delegate
' to the equivalent parameters in the ParameterType delegate, and also match the return types.
'
' This only works for "ConversionRequired::Any", i.e. using VB conversion semantics. It doesn't work for
' reference conversions. As for the AnyReverse/AnyAndReverse, well, in Orcas that was guaranteed
' to fail type inference (i.e. return a false from this function). In Dev10 we will let it succeed
' with some inferred types, for the sake of better error messages, even though we know that ultimately
' it will fail (because no non-anonymous delegate type can be converted to a delegate type).
Dim argumentParams As ImmutableArray(Of ParameterSymbol) = argumentInvokeProc.Parameters
Dim parameterParams As ImmutableArray(Of ParameterSymbol) = parameterInvokeProc.Parameters
If parameterParams.Length <> argumentParams.Length AndAlso argumentParams.Length <> 0 Then
' If parameter-counts are mismatched then it's a failure.
' Exception: Zero-argument relaxation: we allow a parameterless VB$AnonymousDelegate argument
' to be supplied to a function which expects a parameterfull delegate.
Return False
End If
' First we'll check that the argument types all match.
For i As Integer = 0 To argumentParams.Length - 1
If argumentParams(i).IsByRef <> parameterParams(i).IsByRef Then
' Require an exact match between ByRef/ByVal, since that's how type inference of lambda expressions works.
Return False
End If
If Not InferTypeArgumentsFromArgument(
argumentLocation,
argumentParams(i).Type,
argumentTypeByAssumption,
parameterParams(i).Type,
param,
MatchGenericArgumentToParameter.MatchArgumentToBaseOfGenericParameter,
RequiredConversion.AnyReverse) Then ' AnyReverse: contravariance in delegate arguments
Return False
End If
Next
' Now check that the return type matches.
' Note: we allow a *function* VB$AnonymousDelegate to be supplied to a function which expects a *sub* delegate.
If parameterInvokeProc.IsSub Then
' A *sub* delegate parameter can accept either a *function* or a *sub* argument:
Return True
ElseIf argumentInvokeProc.IsSub Then
' A *function* delegate parameter cannot accept a *sub* argument.
Return False
Else
' Otherwise, a function argument VB$AnonymousDelegate was supplied to a function parameter:
Return InferTypeArgumentsFromArgument(
argumentLocation,
argumentInvokeProc.ReturnType,
argumentTypeByAssumption,
parameterInvokeProc.ReturnType,
param,
MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter,
RequiredConversion.Any) ' Any: covariance in delegate returns
End If
End If
End If
' MatchBaseOfGenericArgumentToParameter: used for covariant situations,
' e.g. matching argument "List(Of _)" to parameter "ByVal x as IEnumerable(Of _)".
'
' Otherwise, MatchArgumentToBaseOfGenericParameter, used for contravariant situations,
' e.g. when matching argument "Action(Of IEnumerable(Of _))" to parameter "ByVal x as Action(Of List(Of _))".
Dim fContinue As Boolean = False
If digThroughToBasesAndImplements = MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter Then
fContinue = FindMatchingBase(argumentType, parameterType)
Else
fContinue = FindMatchingBase(parameterType, argumentType)
End If
If Not fContinue Then
Return False
End If
' NOTE: baseSearchType was a REFERENCE, to either ArgumentType or ParameterType.
' Therefore the above statement has altered either ArgumentType or ParameterType.
Return InferTypeArgumentsFromArgumentDirectly(
argumentLocation,
argumentType,
argumentTypeByAssumption,
parameterType,
param,
digThroughToBasesAndImplements,
inferenceRestrictions)
End Function
Private Function FindMatchingBase(
ByRef baseSearchType As TypeSymbol,
ByRef fixedType As TypeSymbol
) As Boolean
Dim fixedTypeAsNamedType = If(fixedType.Kind = SymbolKind.NamedType, DirectCast(fixedType, NamedTypeSymbol), Nothing)
If fixedTypeAsNamedType Is Nothing OrElse Not fixedTypeAsNamedType.IsGenericType Then
' If the fixed candidate isn't a generic (e.g. matching argument IList(Of String) to non-generic parameter IList),
' then we won't learn anything about generic type parameters here:
Return False
End If
Dim fixedTypeTypeKind As TypeKind = fixedType.TypeKind
If fixedTypeTypeKind <> TypeKind.Class AndAlso fixedTypeTypeKind <> TypeKind.Interface Then
' Whatever "BaseSearchType" is, it can only inherit from "FixedType" if FixedType is a class/interface.
' (it's impossible to inherit from anything else).
Return False
End If
Dim baseSearchTypeKind As SymbolKind = baseSearchType.Kind
If baseSearchTypeKind <> SymbolKind.NamedType AndAlso baseSearchTypeKind <> SymbolKind.TypeParameter AndAlso
Not (baseSearchTypeKind = SymbolKind.ArrayType AndAlso DirectCast(baseSearchType, ArrayTypeSymbol).IsSZArray) Then
' The things listed above are the only ones that have bases that could ever lead anywhere useful.
' NamedType is satisfied by interfaces, structures, enums, delegates and modules as well as just classes.
Return False
End If
If baseSearchType.IsSameTypeIgnoringAll(fixedType) Then
' If the types checked were already identical, then exit
Return False
End If
' Otherwise, if we got through all the above tests, then it really is worth searching through the base
' types to see if that helps us find a match.
Dim matchingBase As TypeSymbol = Nothing
If fixedTypeTypeKind = TypeKind.Class Then
FindMatchingBaseClass(baseSearchType, fixedType, matchingBase)
Else
Debug.Assert(fixedTypeTypeKind = TypeKind.Interface)
FindMatchingBaseInterface(baseSearchType, fixedType, matchingBase)
End If
If matchingBase Is Nothing Then
Return False
End If
' And this is what we found
baseSearchType = matchingBase
Return True
End Function
Private Shared Function SetMatchIfNothingOrEqual(type As TypeSymbol, ByRef match As TypeSymbol) As Boolean
If match Is Nothing Then
match = type
Return True
ElseIf match.IsSameTypeIgnoringAll(type) Then
Return True
Else
match = Nothing
Return False
End If
End Function
''' <summary>
''' Returns False if the search should be cancelled.
''' </summary>
Private Function FindMatchingBaseInterface(derivedType As TypeSymbol, baseInterface As TypeSymbol, ByRef match As TypeSymbol) As Boolean
Select Case derivedType.Kind
Case SymbolKind.TypeParameter
For Each constraint In DirectCast(derivedType, TypeParameterSymbol).ConstraintTypesWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
If constraint.OriginalDefinition.IsSameTypeIgnoringAll(baseInterface.OriginalDefinition) Then
If Not SetMatchIfNothingOrEqual(constraint, match) Then
Return False
End If
End If
If Not FindMatchingBaseInterface(constraint, baseInterface, match) Then
Return False
End If
Next
Case Else
For Each [interface] In derivedType.AllInterfacesWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
If [interface].OriginalDefinition.IsSameTypeIgnoringAll(baseInterface.OriginalDefinition) Then
If Not SetMatchIfNothingOrEqual([interface], match) Then
Return False
End If
End If
Next
End Select
Return True
End Function
''' <summary>
''' Returns False if the search should be cancelled.
''' </summary>
Private Function FindMatchingBaseClass(derivedType As TypeSymbol, baseClass As TypeSymbol, ByRef match As TypeSymbol) As Boolean
Select Case derivedType.Kind
Case SymbolKind.TypeParameter
For Each constraint In DirectCast(derivedType, TypeParameterSymbol).ConstraintTypesWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
If constraint.OriginalDefinition.IsSameTypeIgnoringAll(baseClass.OriginalDefinition) Then
If Not SetMatchIfNothingOrEqual(constraint, match) Then
Return False
End If
End If
' TODO: Do we need to continue even if we already have a matching base class?
' It looks like Dev10 continues.
If Not FindMatchingBaseClass(constraint, baseClass, match) Then
Return False
End If
Next
Case Else
Dim baseType As NamedTypeSymbol = derivedType.BaseTypeWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
While baseType IsNot Nothing
If baseType.OriginalDefinition.IsSameTypeIgnoringAll(baseClass.OriginalDefinition) Then
If Not SetMatchIfNothingOrEqual(baseType, match) Then
Return False
End If
Exit While
End If
baseType = baseType.BaseTypeWithDefinitionUseSiteDiagnostics(Me.UseSiteInfo)
End While
End Select
Return True
End Function
Public Function InferTypeArgumentsFromAddressOfArgument(
argument As BoundExpression,
parameterType As TypeSymbol,
param As ParameterSymbol
) As Boolean
If parameterType.IsDelegateType() Then
Dim delegateType = DirectCast(ConstructParameterTypeIfNeeded(parameterType), NamedTypeSymbol)
' Now find the invoke method of the delegate
Dim invokeMethod As MethodSymbol = delegateType.DelegateInvokeMethod
If invokeMethod Is Nothing OrElse invokeMethod.GetUseSiteInfo().DiagnosticInfo IsNot Nothing Then
' If we don't have an Invoke method, just bail.
Return False
End If
Dim returnType As TypeSymbol = invokeMethod.ReturnType
' If the return type doesn't refer to parameters, no inference required.
If Not RefersToGenericParameterToInferArgumentFor(returnType) Then
Return True
End If
Dim addrOf = DirectCast(argument, BoundAddressOfOperator)
Dim fromMethod As MethodSymbol = Nothing
Dim methodConversions As MethodConversionKind = MethodConversionKind.Identity
Dim matchingMethod As KeyValuePair(Of MethodSymbol, MethodConversionKind) = Binder.ResolveMethodForDelegateInvokeFullAndRelaxed(
addrOf,
invokeMethod,
ignoreMethodReturnType:=True,
diagnostics:=BindingDiagnosticBag.Discarded)
fromMethod = matchingMethod.Key
methodConversions = matchingMethod.Value
If fromMethod Is Nothing OrElse (methodConversions And MethodConversionKind.AllErrorReasons) <> 0 OrElse
(addrOf.Binder.OptionStrict = OptionStrict.On AndAlso Conversions.IsNarrowingMethodConversion(methodConversions, isForAddressOf:=True)) Then
Return False
End If
If fromMethod.IsSub Then
ReportNotFailedInferenceDueToObject()
Return True
End If
Dim targetReturnType As TypeSymbol = fromMethod.ReturnType
If RefersToGenericParameterToInferArgumentFor(targetReturnType) Then
' Return false if we didn't make any inference progress.
Return False
End If
Return InferTypeArgumentsFromArgument(
argument.Syntax,
targetReturnType,
argumentTypeByAssumption:=False,
parameterType:=returnType,
param:=param,
digThroughToBasesAndImplements:=MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter,
inferenceRestrictions:=RequiredConversion.Any)
End If
' We did not infer anything for this addressOf, AddressOf can never be of type Object, so mark inference
' as not failed due to object.
ReportNotFailedInferenceDueToObject()
Return True
End Function
Public Function InferTypeArgumentsFromLambdaArgument(
argument As BoundExpression,
parameterType As TypeSymbol,
param As ParameterSymbol
) As Boolean
Debug.Assert(argument.Kind = BoundKind.UnboundLambda OrElse
argument.Kind = BoundKind.QueryLambda OrElse
argument.Kind = BoundKind.GroupTypeInferenceLambda)
If parameterType.IsTypeParameter() Then
Dim anonymousLambdaType As TypeSymbol = Nothing
Select Case argument.Kind
Case BoundKind.QueryLambda
' Do not infer Anonymous Delegate type from query lambda.
Case BoundKind.GroupTypeInferenceLambda
' Can't infer from this lambda.
Case BoundKind.UnboundLambda
' Infer Anonymous Delegate type from unbound lambda.
Dim inferredAnonymousDelegate As KeyValuePair(Of NamedTypeSymbol, ImmutableBindingDiagnostic(Of AssemblySymbol)) = DirectCast(argument, UnboundLambda).InferredAnonymousDelegate
If (inferredAnonymousDelegate.Value.Diagnostics.IsDefault OrElse Not inferredAnonymousDelegate.Value.Diagnostics.HasAnyErrors()) Then
Dim delegateInvokeMethod As MethodSymbol = Nothing
If inferredAnonymousDelegate.Key IsNot Nothing Then
delegateInvokeMethod = inferredAnonymousDelegate.Key.DelegateInvokeMethod
End If
If delegateInvokeMethod IsNot Nothing AndAlso delegateInvokeMethod.ReturnType IsNot LambdaSymbol.ReturnTypeIsUnknown Then
anonymousLambdaType = inferredAnonymousDelegate.Key
End If
End If
Case Else
Throw ExceptionUtilities.UnexpectedValue(argument.Kind)
End Select
If anonymousLambdaType IsNot Nothing Then
Return InferTypeArgumentsFromArgument(
argument.Syntax,
anonymousLambdaType,
argumentTypeByAssumption:=False,
parameterType:=parameterType,
param:=param,
digThroughToBasesAndImplements:=MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter,
inferenceRestrictions:=RequiredConversion.Any)
Else
Return True
End If
ElseIf parameterType.IsDelegateType() Then
Dim parameterDelegateType = DirectCast(parameterType, NamedTypeSymbol)
' First, we need to build a partial type substitution using the type of
' arguments as they stand right now, with some of them still being uninferred.
' TODO: Doesn't this make the inference algorithm order dependent? For example, if we were to
' infer more stuff from other non-lambda arguments, we might have a better chance to have
' more type information for the lambda, allowing successful lambda interpretation.
' Perhaps the graph doesn't allow us to get here until all "inputs" for lambda parameters
' are inferred.
Dim delegateType = DirectCast(ConstructParameterTypeIfNeeded(parameterDelegateType), NamedTypeSymbol)
' Now find the invoke method of the delegate
Dim invokeMethod As MethodSymbol = delegateType.DelegateInvokeMethod
If invokeMethod Is Nothing OrElse invokeMethod.GetUseSiteInfo().DiagnosticInfo IsNot Nothing Then
' If we don't have an Invoke method, just bail.
Return True
End If
Dim returnType As TypeSymbol = invokeMethod.ReturnType
' If the return type doesn't refer to parameters, no inference required.
If Not RefersToGenericParameterToInferArgumentFor(returnType) Then
Return True
End If
Dim lambdaParams As ImmutableArray(Of ParameterSymbol)
Select Case argument.Kind
Case BoundKind.QueryLambda
lambdaParams = DirectCast(argument, BoundQueryLambda).LambdaSymbol.Parameters
Case BoundKind.GroupTypeInferenceLambda
lambdaParams = DirectCast(argument, GroupTypeInferenceLambda).Parameters
Case BoundKind.UnboundLambda
lambdaParams = DirectCast(argument, UnboundLambda).Parameters
Case Else
Throw ExceptionUtilities.UnexpectedValue(argument.Kind)
End Select
Dim delegateParams As ImmutableArray(Of ParameterSymbol) = invokeMethod.Parameters
If lambdaParams.Length > delegateParams.Length Then
Return True
End If
For i As Integer = 0 To lambdaParams.Length - 1 Step 1
Dim lambdaParam As ParameterSymbol = lambdaParams(i)
Dim delegateParam As ParameterSymbol = delegateParams(i)
If lambdaParam.Type Is Nothing Then
' If a lambda parameter has no type and the delegate parameter refers
' to an unbound generic parameter, we can't infer yet.
If RefersToGenericParameterToInferArgumentFor(delegateParam.Type) Then
' Skip this type argument and other parameters will infer it or
' if that doesn't happen it will report an error.
' TODO: Why does it make sense to continue here? It looks like we can infer something from
' lambda's return type based on incomplete information. Also, this 'if' is redundant,
' there is nothing left to do in this loop anyway, and "continue" doesn't change anything.
Continue For
End If
Else
' report the type of the lambda parameter to the delegate parameter.
' !!! Unlike Dev10, we are using MatchArgumentToBaseOfGenericParameter because a value of generic
' !!! parameter will be passed into the parameter of argument type.
InferTypeArgumentsFromArgument(
argument.Syntax,
lambdaParam.Type,
argumentTypeByAssumption:=False,
parameterType:=delegateParam.Type,
param:=param,
digThroughToBasesAndImplements:=MatchGenericArgumentToParameter.MatchArgumentToBaseOfGenericParameter,
inferenceRestrictions:=RequiredConversion.Any)
End If
Next
' OK, now try to infer delegates return type from the lambda.
Dim lambdaReturnType As TypeSymbol
Select Case argument.Kind
Case BoundKind.QueryLambda
Dim queryLambda = DirectCast(argument, BoundQueryLambda)
lambdaReturnType = queryLambda.LambdaSymbol.ReturnType
If lambdaReturnType Is LambdaSymbol.ReturnTypePendingDelegate Then
lambdaReturnType = queryLambda.Expression.Type
If lambdaReturnType Is Nothing Then
If Me.Diagnostic Is Nothing Then
Me.Diagnostic = BindingDiagnosticBag.Create(withDiagnostics:=True, Me.UseSiteInfo.AccumulatesDependencies)
End If
Debug.Assert(Me.Diagnostic IsNot Nothing)
lambdaReturnType = queryLambda.LambdaSymbol.ContainingBinder.MakeRValue(queryLambda.Expression, Me.Diagnostic).Type
End If
End If
Case BoundKind.GroupTypeInferenceLambda
lambdaReturnType = DirectCast(argument, GroupTypeInferenceLambda).InferLambdaReturnType(delegateParams)
Case BoundKind.UnboundLambda
Dim unboundLambda = DirectCast(argument, UnboundLambda)
If unboundLambda.IsFunctionLambda Then
Dim inferenceSignature As New UnboundLambda.TargetSignature(delegateParams, unboundLambda.Binder.Compilation.GetSpecialType(SpecialType.System_Void), returnsByRef:=False)
Dim returnTypeInfo As KeyValuePair(Of TypeSymbol, ImmutableBindingDiagnostic(Of AssemblySymbol)) = unboundLambda.InferReturnType(inferenceSignature)
If Not returnTypeInfo.Value.Diagnostics.IsDefault AndAlso returnTypeInfo.Value.Diagnostics.HasAnyErrors() Then
lambdaReturnType = Nothing
' Let's keep return type inference errors
If Me.Diagnostic Is Nothing Then
Me.Diagnostic = BindingDiagnosticBag.Create(withDiagnostics:=True, Me.UseSiteInfo.AccumulatesDependencies)
End If
Me.Diagnostic.AddRange(returnTypeInfo.Value)
ElseIf returnTypeInfo.Key Is LambdaSymbol.ReturnTypeIsUnknown Then
lambdaReturnType = Nothing
Else
Dim boundLambda As BoundLambda = unboundLambda.Bind(New UnboundLambda.TargetSignature(inferenceSignature.ParameterTypes,
inferenceSignature.ParameterIsByRef,
returnTypeInfo.Key,
returnsByRef:=False))
Debug.Assert(boundLambda.LambdaSymbol.ReturnType Is returnTypeInfo.Key)
If Not boundLambda.HasErrors AndAlso Not boundLambda.Diagnostics.Diagnostics.HasAnyErrors Then
lambdaReturnType = returnTypeInfo.Key
' Let's keep return type inference warnings, if any.
If Me.Diagnostic Is Nothing Then
Me.Diagnostic = BindingDiagnosticBag.Create(withDiagnostics:=True, Me.UseSiteInfo.AccumulatesDependencies)
End If
Me.Diagnostic.AddRange(returnTypeInfo.Value)
Me.Diagnostic.AddDependencies(boundLambda.Diagnostics.Dependencies)
Else
lambdaReturnType = Nothing
' Let's preserve diagnostics that caused the failure
If Not boundLambda.Diagnostics.Diagnostics.IsDefaultOrEmpty Then
If Me.Diagnostic Is Nothing Then
Me.Diagnostic = BindingDiagnosticBag.Create(withDiagnostics:=True, Me.UseSiteInfo.AccumulatesDependencies)
End If
Me.Diagnostic.AddRange(boundLambda.Diagnostics)
End If
End If
End If
' But in the case of async/iterator lambdas, e.g. pass "Async Function() 1" to a parameter
' of type "Func(Of Task(Of T))" then we have to dig in further and match 1 to T...
If (unboundLambda.Flags And (SourceMemberFlags.Async Or SourceMemberFlags.Iterator)) <> 0 AndAlso
lambdaReturnType IsNot Nothing AndAlso lambdaReturnType.Kind = SymbolKind.NamedType AndAlso
returnType IsNot Nothing AndAlso returnType.Kind = SymbolKind.NamedType Then
' By this stage we know that
' * we have an async/iterator lambda argument
' * the parameter-to-match is a delegate type whose result type refers to generic parameters
' The parameter might be a delegate with result type e.g. "Task(Of T)" in which case we have
' to dig in. Or it might be a delegate with result type "T" in which case we
' don't dig in.
Dim lambdaReturnNamedType = DirectCast(lambdaReturnType, NamedTypeSymbol)
Dim returnNamedType = DirectCast(returnType, NamedTypeSymbol)
If lambdaReturnNamedType.Arity = 1 AndAlso
IsSameTypeIgnoringAll(lambdaReturnNamedType.OriginalDefinition,
returnNamedType.OriginalDefinition) Then
' We can assume that the lambda will have return type Task(Of T) or IEnumerable(Of T)
' or IEnumerator(Of T) as appropriate. That's already been ensured by the lambda-interpretation.
Debug.Assert(TypeSymbol.Equals(lambdaReturnNamedType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything) OrElse
TypeSymbol.Equals(lambdaReturnNamedType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T), TypeCompareKind.ConsiderEverything) OrElse
TypeSymbol.Equals(lambdaReturnNamedType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T), TypeCompareKind.ConsiderEverything))
lambdaReturnType = lambdaReturnNamedType.TypeArgumentWithDefinitionUseSiteDiagnostics(0, Me.UseSiteInfo)
returnType = returnNamedType.TypeArgumentWithDefinitionUseSiteDiagnostics(0, Me.UseSiteInfo)
End If
End If
Else
lambdaReturnType = Nothing
If Not invokeMethod.IsSub AndAlso (unboundLambda.Flags And SourceMemberFlags.Async) <> 0 Then
Dim boundLambda As BoundLambda = unboundLambda.Bind(New UnboundLambda.TargetSignature(delegateParams,
unboundLambda.Binder.Compilation.GetSpecialType(SpecialType.System_Void),
returnsByRef:=False))
If Not boundLambda.HasErrors AndAlso Not boundLambda.Diagnostics.Diagnostics.HasAnyErrors() Then
If _asyncLambdaSubToFunctionMismatch Is Nothing Then
_asyncLambdaSubToFunctionMismatch = New HashSet(Of BoundExpression)(ReferenceEqualityComparer.Instance)
End If
_asyncLambdaSubToFunctionMismatch.Add(unboundLambda)
End If
End If
End If
Case Else
Throw ExceptionUtilities.UnexpectedValue(argument.Kind)
End Select
If lambdaReturnType Is Nothing Then
' Inference failed, give up.
Return False
End If
If lambdaReturnType.IsErrorType() Then
Return True
End If
' Now infer from the result type
' not ArgumentTypeByAssumption ??? lwischik: but maybe it should...
Return InferTypeArgumentsFromArgument(
argument.Syntax,
lambdaReturnType,
argumentTypeByAssumption:=False,
parameterType:=returnType,
param:=param, digThroughToBasesAndImplements:=MatchGenericArgumentToParameter.MatchBaseOfGenericArgumentToParameter,
inferenceRestrictions:=RequiredConversion.Any)
ElseIf TypeSymbol.Equals(parameterType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetWellKnownType(WellKnownType.System_Linq_Expressions_Expression_T), TypeCompareKind.ConsiderEverything) Then
' If we've got an Expression(Of T), skip through to T
Return InferTypeArgumentsFromLambdaArgument(argument, DirectCast(parameterType, NamedTypeSymbol).TypeArgumentWithDefinitionUseSiteDiagnostics(0, Me.UseSiteInfo), param)
End If
Return True
End Function
Public Function ConstructParameterTypeIfNeeded(parameterType As TypeSymbol) As TypeSymbol
' First, we need to build a partial type substitution using the type of
' arguments as they stand right now, with some of them still being uninferred.
Dim methodSymbol As MethodSymbol = Candidate
Dim typeArguments = ArrayBuilder(Of TypeWithModifiers).GetInstance(_typeParameterNodes.Length)
For i As Integer = 0 To _typeParameterNodes.Length - 1 Step 1
Dim typeNode As TypeParameterNode = _typeParameterNodes(i)
Dim newType As TypeSymbol
If typeNode Is Nothing OrElse typeNode.CandidateInferredType Is Nothing Then
'No substitution
newType = methodSymbol.TypeParameters(i)
Else
newType = typeNode.CandidateInferredType
End If
typeArguments.Add(New TypeWithModifiers(newType))
Next
Dim partialSubstitution = TypeSubstitution.CreateAdditionalMethodTypeParameterSubstitution(methodSymbol.ConstructedFrom, typeArguments.ToImmutableAndFree())
' Now we apply the partial substitution to the delegate type, leaving uninferred type parameters as is
Return parameterType.InternalSubstituteTypeParameters(partialSubstitution).Type
End Function
Public Sub ReportAmbiguousInferenceError(typeInfos As ArrayBuilder(Of DominantTypeDataTypeInference))
Debug.Assert(typeInfos.Count() >= 2, "Must have at least 2 elements in the list")
' Since they get added fifo, we need to walk the list backward.
For i As Integer = 1 To typeInfos.Count - 1 Step 1
Dim currentTypeInfo As DominantTypeDataTypeInference = typeInfos(i)
If Not currentTypeInfo.InferredFromObject Then
ReportNotFailedInferenceDueToObject()
' TODO: Should we exit the loop? For some reason Dev10 keeps going.
End If
Next
End Sub
Public Sub ReportIncompatibleInferenceError(
typeInfos As ArrayBuilder(Of DominantTypeDataTypeInference))
If typeInfos.Count < 1 Then
Return
End If
' Since they get added fifo, we need to walk the list backward.
For i As Integer = 1 To typeInfos.Count - 1 Step 1
Dim currentTypeInfo As DominantTypeDataTypeInference = typeInfos(i)
If Not currentTypeInfo.InferredFromObject Then
ReportNotFailedInferenceDueToObject()
' TODO: Should we exit the loop? For some reason Dev10 keeps going.
End If
Next
End Sub
Public Sub RegisterErrorReasons(inferenceErrorReasons As InferenceErrorReasons)
_inferenceErrorReasons = _inferenceErrorReasons Or inferenceErrorReasons
End Sub
End Class
End Class
End Namespace
|
AmadeusW/roslyn
|
src/Compilers/VisualBasic/Portable/Semantics/TypeInference/TypeArgumentInference.vb
|
Visual Basic
|
apache-2.0
| 132,564
|
' 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.Linq
Imports System.Runtime.InteropServices
Imports System.Threading
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' <summary>
''' Represents a named type symbol whose members are declared in source.
''' </summary>
Friend MustInherit Class SourceMemberContainerTypeSymbol
Inherits InstanceTypeSymbol
''' <summary>
''' Holds information about a SourceType in a compact form.
''' </summary>
<Flags>
Friend Enum SourceTypeFlags As UShort
[Private] = CUShort(Accessibility.Private)
[Protected] = CUShort(Accessibility.Protected)
[Friend] = CUShort(Accessibility.Friend)
ProtectedFriend = CUShort(Accessibility.ProtectedOrFriend)
[Public] = CUShort(Accessibility.Public)
AccessibilityMask = &H7
[Class] = CUShort(TypeKind.Class) << TypeKindShift
[Structure] = CUShort(TypeKind.Structure) << TypeKindShift
[Interface] = CUShort(TypeKind.Interface) << TypeKindShift
[Enum] = CUShort(TypeKind.Enum) << TypeKindShift
[Delegate] = CUShort(TypeKind.Delegate) << TypeKindShift
[Module] = CUShort(TypeKind.Module) << TypeKindShift
Submission = CUShort(TypeKind.Submission) << TypeKindShift
TypeKindMask = &HF0
TypeKindShift = 4
[MustInherit] = 1 << 8
[NotInheritable] = 1 << 9
[Shadows] = 1 << 10
[Partial] = 1 << 11
End Enum
' Flags about the type
Private ReadOnly _flags As SourceTypeFlags
' Misc flags defining the state of this symbol (StateFlags)
Protected m_lazyState As Integer
<Flags>
Protected Enum StateFlags As Integer
FlattenedMembersIsSortedMask = &H1 ' Set if "m_lazyMembersFlattened" is sorted.
ReportedVarianceDiagnostics = &H2 ' Set if variance diagnostics have been reported.
ReportedBaseClassConstraintsDiagnostics = &H4 ' Set if base class constraints diagnostics have been reported.
ReportedInterfacesConstraintsDiagnostics = &H8 ' Set if constraints diagnostics for base/implemented interfaces have been reported.
End Enum
' Containing symbol
Private ReadOnly _containingSymbol As NamespaceOrTypeSymbol
' Containing source module
Protected ReadOnly m_containingModule As SourceModuleSymbol
' The declaration for this type.
Private ReadOnly _declaration As MergedTypeDeclaration
' The name of the type, might be different than m_decl.Name depending on lexical sort order.
Private ReadOnly _name As String
' The name of the default property if any.
' GetMembersAndInitializers must be called before accessing field.
Private _defaultPropertyName As String
' The different kinds of members of this type
Private _lazyMembersAndInitializers As MembersAndInitializers
' Maps names to nested type symbols.
Private Shared ReadOnly s_emptyTypeMembers As New Dictionary(Of String, ImmutableArray(Of NamedTypeSymbol))(IdentifierComparison.Comparer)
Private _lazyTypeMembers As Dictionary(Of String, ImmutableArray(Of NamedTypeSymbol))
' An array of members in declaration order.
Private _lazyMembersFlattened As ImmutableArray(Of Symbol)
' Type parameters (Nothing if not created yet)
Private _lazyTypeParameters As ImmutableArray(Of TypeParameterSymbol)
Private _lazyEmitExtensionAttribute As ThreeState = ThreeState.Unknown
Private _lazyContainsExtensionMethods As ThreeState = ThreeState.Unknown
Private _lazyAnyMemberHasAttributes As ThreeState = ThreeState.Unknown
Private _lazyStructureCycle As Integer = ThreeState.Unknown ' Interlocked
Private _lazyLexicalSortKey As LexicalSortKey = LexicalSortKey.NotInitialized
#Region "Construction"
' Create the type symbol and associated type parameter symbols. Most information
' is deferred until later.
Protected Sub New(declaration As MergedTypeDeclaration,
containingSymbol As NamespaceOrTypeSymbol,
containingModule As SourceModuleSymbol)
m_containingModule = containingModule
_containingSymbol = containingSymbol
_declaration = declaration
_name = GetBestName(declaration, containingModule.ContainingSourceAssembly.DeclaringCompilation)
_flags = ComputeTypeFlags(declaration, containingSymbol.IsNamespace)
End Sub
' Figure out the "right" name spelling, it should come from lexically first declaration.
Private Shared Function GetBestName(declaration As MergedTypeDeclaration, compilation As VisualBasicCompilation) As String
Dim declarations As ImmutableArray(Of SingleTypeDeclaration) = declaration.Declarations
Dim best As SingleTypeDeclaration = declarations(0)
For i As Integer = 1 To declarations.Length - 1
Dim bestLocation As Location = best.Location
If compilation.FirstSourceLocation(bestLocation, declarations(i).Location) IsNot bestLocation Then
best = declarations(i)
End If
Next
Return best.Name
End Function
''' <summary>
''' Compute the type flags from the declaration.
''' This function DOES NOT diagnose errors in the modifiers. Given the set of modifiers,
''' it produces the flags, even in the case of potentially conflicting modifiers. We have to
''' return some answer even in the case of errors.
''' </summary>
Private Function ComputeTypeFlags(declaration As MergedTypeDeclaration, isTopLevel As Boolean) As SourceTypeFlags
Dim mergedModifiers As DeclarationModifiers = DeclarationModifiers.None
For i = 0 To declaration.Declarations.Length - 1
mergedModifiers = mergedModifiers Or declaration.Declarations(i).Modifiers
Next
Dim modifiers = mergedModifiers
Dim flags As SourceTypeFlags = 0
' compute type kind, inheritability
Select Case declaration.Kind
Case DeclarationKind.Class
flags = SourceTypeFlags.Class
If (modifiers And DeclarationModifiers.NotInheritable) <> 0 Then
flags = flags Or SourceTypeFlags.NotInheritable
ElseIf (modifiers And DeclarationModifiers.MustInherit) <> 0 Then
flags = flags Or SourceTypeFlags.MustInherit
End If
Case DeclarationKind.Script, DeclarationKind.ImplicitClass
flags = SourceTypeFlags.Class Or SourceTypeFlags.NotInheritable
Case DeclarationKind.Submission
flags = SourceTypeFlags.Submission Or SourceTypeFlags.NotInheritable
Case DeclarationKind.Structure
flags = SourceTypeFlags.Structure Or SourceTypeFlags.NotInheritable
Case DeclarationKind.Interface
flags = SourceTypeFlags.Interface Or SourceTypeFlags.MustInherit
Case DeclarationKind.Enum
flags = SourceTypeFlags.Enum Or SourceTypeFlags.NotInheritable
Case DeclarationKind.Delegate,
DeclarationKind.EventSyntheticDelegate
flags = SourceTypeFlags.Delegate Or SourceTypeFlags.NotInheritable
Case DeclarationKind.Module
flags = SourceTypeFlags.Module Or SourceTypeFlags.NotInheritable
Case Else
Throw ExceptionUtilities.UnexpectedValue(declaration.Kind)
End Select
' compute accessibility
If isTopLevel Then
' top-level types (types in namespaces) can only be Friend or Public, and the default is friend
If (modifiers And DeclarationModifiers.Friend) <> 0 Then
flags = flags Or SourceTypeFlags.Friend
ElseIf (modifiers And DeclarationModifiers.Public) <> 0 Then
flags = flags Or SourceTypeFlags.Public
Else
flags = flags Or SourceTypeFlags.Friend
End If
Else
' Nested types (including types in modules) can be any accessibility, and the default is public
If (modifiers And DeclarationModifiers.Private) <> 0 Then
flags = flags Or SourceTypeFlags.Private
ElseIf (modifiers And (DeclarationModifiers.Protected Or DeclarationModifiers.Friend)) =
(DeclarationModifiers.Protected Or DeclarationModifiers.Friend) Then
flags = flags Or SourceTypeFlags.ProtectedFriend
ElseIf (modifiers And DeclarationModifiers.Protected) <> 0 Then
flags = flags Or SourceTypeFlags.Protected
ElseIf (modifiers And DeclarationModifiers.Friend) <> 0 Then
flags = flags Or SourceTypeFlags.Friend
Else
flags = flags Or SourceTypeFlags.Public
End If
End If
' Compute partial
If (modifiers And DeclarationModifiers.Partial) <> 0 Then
flags = flags Or SourceTypeFlags.Partial
End If
' Compute Shadows
If (modifiers And DeclarationModifiers.Shadows) <> 0 Then
flags = flags Or SourceTypeFlags.Shadows
End If
Return flags
End Function
Public Shared Function Create(declaration As MergedTypeDeclaration,
containingSymbol As NamespaceOrTypeSymbol,
containingModule As SourceModuleSymbol) As SourceMemberContainerTypeSymbol
Dim kind = declaration.SyntaxReferences.First.SyntaxTree.GetEmbeddedKind()
If kind <> EmbeddedSymbolKind.None Then
Return New EmbeddedSymbolManager.EmbeddedNamedTypeSymbol(declaration, containingSymbol, containingModule, kind)
End If
Select Case declaration.Kind
Case DeclarationKind.ImplicitClass,
DeclarationKind.Script,
DeclarationKind.Submission
Return New ImplicitNamedTypeSymbol(declaration, containingSymbol, containingModule)
Case Else
Dim type = New SourceNamedTypeSymbol(declaration, containingSymbol, containingModule)
' In case Vb Core Runtime is being embedded, we should mark attribute
' 'Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute'
' as being referenced if the named type just created is a module
If type.TypeKind = TypeKind.Module Then
type.DeclaringCompilation.EmbeddedSymbolManager.RegisterModuleDeclaration()
End If
Return type
End Select
End Function
' Create a nested type with the given declaration.
Private Function CreateNestedType(declaration As MergedTypeDeclaration) As NamedTypeSymbol
#If DEBUG Then
' Ensure that the type declaration is either from user code or embedded
' code, but not merged across embedded code/user code boundary.
Dim embedded = EmbeddedSymbolKind.Unset
For Each ref In declaration.SyntaxReferences
Dim refKind = ref.SyntaxTree.GetEmbeddedKind()
If embedded <> EmbeddedSymbolKind.Unset Then
Debug.Assert(embedded = refKind)
Else
embedded = refKind
End If
Next
Debug.Assert(embedded <> EmbeddedSymbolKind.Unset)
#End If
If declaration.Kind = DeclarationKind.Delegate Then
Debug.Assert(Not declaration.SyntaxReferences.First.SyntaxTree.IsEmbeddedSyntaxTree)
Return New SourceNamedTypeSymbol(declaration, Me, m_containingModule)
ElseIf declaration.Kind = DeclarationKind.EventSyntheticDelegate Then
Debug.Assert(Not declaration.SyntaxReferences.First.SyntaxTree.IsEmbeddedSyntaxTree)
Return New SynthesizedEventDelegateSymbol(declaration.SyntaxReferences(0), Me)
Else
Return Create(declaration, Me, m_containingModule)
End If
End Function
#End Region
#Region "Completion"
''' <summary>
''' Force all declaration errors to be generated.
''' </summary>
Friend NotOverridable Overrides Sub GenerateDeclarationErrors(cancellationToken As CancellationToken)
GenerateAllDeclarationErrorsImpl(cancellationToken)
End Sub
Protected Overridable Sub GenerateAllDeclarationErrorsImpl(cancellationToken As CancellationToken)
cancellationToken.ThrowIfCancellationRequested()
Dim membersAndInitializers = GetMembersAndInitializers()
cancellationToken.ThrowIfCancellationRequested()
For Each member In Me.GetMembers()
' we already visited types
If member.Kind <> SymbolKind.NamedType Then
member.GenerateDeclarationErrors(cancellationToken)
End If
Next
cancellationToken.ThrowIfCancellationRequested()
Dim unused1 = BaseTypeNoUseSiteDiagnostics
cancellationToken.ThrowIfCancellationRequested()
Dim unused2 = InterfacesNoUseSiteDiagnostics
cancellationToken.ThrowIfCancellationRequested()
Dim unused3 = ExplicitInterfaceImplementationMap
cancellationToken.ThrowIfCancellationRequested()
Dim typeParams = TypeParameters
If Not typeParams.IsEmpty Then
TypeParameterSymbol.EnsureAllConstraintsAreResolved(typeParams)
End If
cancellationToken.ThrowIfCancellationRequested()
Dim unused4 = GetAttributes()
cancellationToken.ThrowIfCancellationRequested()
BindAllMemberAttributes(cancellationToken)
cancellationToken.ThrowIfCancellationRequested()
GenerateVarianceDiagnostics()
End Sub
Private Sub GenerateVarianceDiagnostics()
If (m_lazyState And StateFlags.ReportedVarianceDiagnostics) <> 0 Then
Return
End If
Dim diagnostics As DiagnosticBag = Nothing
Dim infosBuffer As ArrayBuilder(Of DiagnosticInfo) = Nothing
Select Case Me.TypeKind
Case TypeKind.Interface
GenerateVarianceDiagnosticsForInterface(diagnostics, infosBuffer)
Case TypeKind.Delegate
GenerateVarianceDiagnosticsForDelegate(diagnostics, infosBuffer)
Case TypeKind.Class, TypeKind.Enum, TypeKind.Structure
ReportNestingIntoVariantInterface(diagnostics)
Case TypeKind.Module, TypeKind.Submission
Case Else
Throw ExceptionUtilities.UnexpectedValue(Me.TypeKind)
End Select
m_containingModule.AtomicSetFlagAndStoreDiagnostics(m_lazyState,
StateFlags.ReportedVarianceDiagnostics,
0,
diagnostics,
CompilationStage.Declare)
If diagnostics IsNot Nothing Then
diagnostics.Free()
End If
If infosBuffer IsNot Nothing Then
' all diagnostics were reported to diagnostic bag:
Debug.Assert(infosBuffer.Count = 0)
infosBuffer.Free()
End If
End Sub
Private Sub ReportNestingIntoVariantInterface(<[In], Out> ByRef diagnostics As DiagnosticBag)
If Not _containingSymbol.IsType Then
Return
End If
' Check for illegal nesting into variant interface.
Dim container = DirectCast(_containingSymbol, NamedTypeSymbol)
Do
If Not container.IsInterfaceType() Then
Debug.Assert(Not container.IsDelegateType())
' The same validation will be performed for the container and
' there is no reason to duplicate the same errors, if any, on this type.
container = Nothing
Exit Do
End If
If container.TypeParameters.HaveVariance() Then
' We are inside of a variant interface
Exit Do
End If
' This interface isn't variant, but its containing interface might be.
container = container.ContainingType
Loop While container IsNot Nothing
If container IsNot Nothing Then
Debug.Assert(container.IsInterfaceType() AndAlso container.HasVariance())
If diagnostics Is Nothing Then
diagnostics = DiagnosticBag.GetInstance()
End If
diagnostics.Add(New VBDiagnostic(ErrorFactory.ErrorInfo(ERRID.ERR_VarianceInterfaceNesting), Locations(0)))
End If
End Sub
Private Sub GenerateVarianceDiagnosticsForInterface(
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
' Dev10 didn't do this shortcut, but I and Lucian believe that the checks below
' can be safely skipped for an invariant interface.
If Not Me.HasVariance() Then
Return
End If
' Variance spec $2:
' An interface I is valid if and only if
' * every method signature in I is valid and has no variant generic parameters (no variant generic
' parameters part is handled by SourceMethodSymbol.BindTypeParameterConstraints), and
' * every property in I is valid, and
' * every event in I is valid, and
' * every immediate base interface type of I is valid covariantly, and
' * the interface is either invariant or it lacks nested classes and structs, and
' * every nested type is valid.
'
' A property "Property Foo as T" is valid if and only if either
' * The property is read-only and T is valid covariantly, or
' * The property is write-only and T is valid invariantly, or
' * The property is readable and writable and T is invariant.
'
' An event "Event e as D" is valid if and only if
' * the delegate type D is valid contravariantly
'
' An event "Event e(Signature)" is valid if and only if
' * it is not contained (not even nested) in a variant interface,
' this is handled by SynthesizedEventDelegateSymbol.
'
' The test that nested types are valid isn't needed, since GenerateVarianceDiagnostics
' will anyways be called on them all. (and for any invalid nested type, we report the
' error on it, rather than on this container.)
'
' The check that an interface lacks nested classes and structs is done inside
' ReportNestingIntoVariantInterface. Why? Because we have to look for indirectly
' nested classes/structs, not just immediate ones. And it seemed nicer for classes/structs
' to look UP for variant containers, rather than for interfaces to look DOWN for class/struct contents.
For Each batch As ImmutableArray(Of Symbol) In GetMembersAndInitializers().Members.Values
For Each member As Symbol In batch
If Not member.IsImplicitlyDeclared Then
Select Case member.Kind
Case SymbolKind.Method
GenerateVarianceDiagnosticsForMethod(DirectCast(member, MethodSymbol), diagnostics, infosBuffer)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
Case SymbolKind.Property
GenerateVarianceDiagnosticsForProperty(DirectCast(member, PropertySymbol), diagnostics, infosBuffer)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
Case SymbolKind.Event
GenerateVarianceDiagnosticsForEvent(DirectCast(member, EventSymbol), diagnostics, infosBuffer)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
End Select
End If
Next
Next
' 3. every immediate base interface is valid covariantly.
' Actually, the only type that's invalid covariantly and allowable as a base interface,
' is a generic instantiation X(T1,...) where we've instantiated it wrongly (e.g. given it "Out Ti"
' for a generic parameter that was declared as an "In"). Look what happens:
' Interface IZoo(Of In T) | Dim x as IZoo(Of Animal)
' Inherits IReadOnly(Of T) | Dim y as IZoo(Of Mammal) = x ' through contravariance of IZoo
' End Interface | Dim z as IReadOnly(Of Mammal) = y ' through inheritance from IZoo
' Now we might give "z" to someone who's expecting to read only Mammals, even though we know the zoo
' contains all kinds of animals.
For Each implemented As NamedTypeSymbol In Me.InterfacesNoUseSiteDiagnostics
If Not implemented.IsErrorType() Then
Debug.Assert(Not HaveDiagnostics(infosBuffer))
GenerateVarianceDiagnosticsForType(implemented, VarianceKind.Out, VarianceContext.Complex, infosBuffer)
If HaveDiagnostics(infosBuffer) Then
ReportDiagnostics(diagnostics, GetInheritsOrImplementsLocation(implemented, getInherits:=True), infosBuffer)
End If
End If
Next
End Sub
' Gets the implements location for a particular interface, which must be implemented but might be indirectly implemented.
' Also gets the direct interface it was inherited through
Private Function GetImplementsLocation(implementedInterface As NamedTypeSymbol, ByRef directInterface As NamedTypeSymbol) As Location
Debug.Assert(Me.InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics.Contains(implementedInterface))
' Find the directly implemented interface that "implementedIface" was inherited through.
directInterface = Nothing
For Each iface In Me.InterfacesNoUseSiteDiagnostics
If iface = implementedInterface Then
directInterface = iface
Exit For
ElseIf directInterface Is Nothing AndAlso iface.ImplementsInterface(implementedInterface, useSiteDiagnostics:=Nothing) Then
directInterface = iface
End If
Next
Debug.Assert(directInterface IsNot Nothing)
Return GetInheritsOrImplementsLocation(directInterface, Me.IsInterfaceType())
End Function
Private Function GetImplementsLocation(implementedInterface As NamedTypeSymbol) As Location
Dim dummy As NamedTypeSymbol = Nothing
Return GetImplementsLocation(implementedInterface, dummy)
End Function
Protected MustOverride Function GetInheritsOrImplementsLocation(base As NamedTypeSymbol, getInherits As Boolean) As Location
Private Sub GenerateVarianceDiagnosticsForDelegate(
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
' Dev10 didn't do this shortcut, but I and Lucian believe that the checks below
' can be safely skipped for an invariant interface.
If Not Me.HasVariance() Then
Return
End If
' Variance spec $2
' A delegate "Delegate Function/Sub Foo(Of T1, ... Tn)Signature" is valid if and only if
' * the signature is valid.
'
' That delegate becomes "Class Foo(Of T1, ... Tn) : Function Invoke(...) As ... : End Class
' So we just need to pick up the "Invoke" method and check that it's valid.
' NB. that delegates can have variance in their generic params, and hence so can e.g. "Class Foo(Of Out T1)"
' This is the only place in the CLI where a class can have variant generic params.
'
' Note: delegates that are synthesized from events are already dealt with in
' SynthesizedEventDelegateSymbol.GenerateAllDeclarationErrors, so we won't run into them here.
Dim invoke As MethodSymbol = Me.DelegateInvokeMethod
If invoke IsNot Nothing Then
GenerateVarianceDiagnosticsForMethod(invoke, diagnostics, infosBuffer)
End If
End Sub
Private Shared Sub ReportDiagnostics(
<[In], Out> ByRef diagnostics As DiagnosticBag,
location As Location,
infos As ArrayBuilder(Of DiagnosticInfo)
)
If diagnostics Is Nothing Then
diagnostics = DiagnosticBag.GetInstance()
End If
For Each info In infos
diagnostics.Add(info, location)
Next
infos.Clear()
End Sub
Private Shared Function HaveDiagnostics(diagnostics As ArrayBuilder(Of DiagnosticInfo)) As Boolean
Return diagnostics IsNot Nothing AndAlso diagnostics.Count > 0
End Function
''' <summary>
''' Following enum is used just to help give more specific error messages.
''' </summary>
Private Enum VarianceContext
' We'll give specific error messages in these simple contexts:
[ByVal]
[ByRef]
[Return]
[Constraint]
Nullable
ReadOnlyProperty
WriteOnlyProperty
[Property]
' Otherwise (e.g. nested inside a generic) we use the following as a catch-all:
Complex
End Enum
Private Sub GenerateVarianceDiagnosticsForType(
type As TypeSymbol,
requiredVariance As VarianceKind,
context As VarianceContext,
<[In], Out> ByRef diagnostics As ArrayBuilder(Of DiagnosticInfo)
)
GenerateVarianceDiagnosticsForTypeRecursively(type, requiredVariance, context, Nothing, 0, diagnostics)
End Sub
Private Shared Sub AppendVarianceDiagnosticInfo(
<[In], Out> ByRef diagnostics As ArrayBuilder(Of DiagnosticInfo),
info As DiagnosticInfo
)
If diagnostics Is Nothing Then
diagnostics = ArrayBuilder(Of DiagnosticInfo).GetInstance()
End If
diagnostics.Add(info)
End Sub
Private Structure VarianceDiagnosticsTargetTypeParameter
Public ReadOnly ConstructedType As NamedTypeSymbol
Private ReadOnly _typeParameterIndex As Integer
Public ReadOnly Property TypeParameter As TypeParameterSymbol
Get
Return ConstructedType.TypeParameters(_typeParameterIndex)
End Get
End Property
Public Sub New(constructedType As NamedTypeSymbol, typeParameterIndex As Integer)
Debug.Assert(typeParameterIndex >= 0 AndAlso typeParameterIndex < constructedType.Arity)
Me.ConstructedType = constructedType
_typeParameterIndex = typeParameterIndex
End Sub
End Structure
Private Sub GenerateVarianceDiagnosticsForTypeRecursively(
type As TypeSymbol,
requiredVariance As VarianceKind,
context As VarianceContext,
typeParameterInfo As VarianceDiagnosticsTargetTypeParameter,
constructionDepth As Integer,
<[In], Out> ByRef diagnostics As ArrayBuilder(Of DiagnosticInfo)
)
' Variance spec $2:
'
' A type T is valid invariantly if and only if:
' * it is valid covariantly, and
' * it is valid contravariantly.
'
' A type T is valid covariantly if and only if one of the following hold: either
' * T is a generic parameter which was not declared contravariant, or
' * T is an array type U() where U is valid covariantly, or
' * T is a construction X1(Of T11...)...Xn(Of Tn1...) of some generic struct/class/interface/delegate Xn
' declared as X1(Of X11...)...Xn(Of Xn1...) such that for each i and j,
' - if Xij was declared covariant then Tij is valid covariantly
' - if Xij was declared contravariant then Tij is valid contravariantly
' - if Xij was declared invariant then Tij is valid invariantly
' * or T is a non-generic struct/class/interface/delegate/enum.
'
' A type T is valid contravariantly if and only if one of the following hold: either
' * T is a generic parameter which was not declared covariant, or
' * T is an array type U() where U is valid contravariantly, or
' * T is a construction X1(Of T11...)...Xn(Of Tn1...) of some generic struct/class/interface/delegate Xn
' declared as X1(Of X11...)...Xn(Of Xn1...) such that for each i and j,
' - if Xij was declared covariant then Tij is valid contravariantly
' - if Xij was declared contravariant then Tij is valid covariantly
' - if Xij was declared invariant then Tij is valid invariantly
' * or T is a non-generic struct/class/interface/delegate/enum.
'
'
' In all cases, if a type fails a variance validity check, then it ultimately failed
' because somewhere there were one or more generic parameters "T" which were declared with
' the wrong kind of variance. In particular, they were either declared In when they'd have
' to be Out or InOut, or they were declared Out when they'd have to be In or InOut.
' We mark all these as errors.
'
' BUT... CLS restrictions say that in any generic type, all nested types first copy their
' containers's generic parameters. This restriction is embodied in the BCSYM structure.
' SOURCE: BCSYM: IL:
' Interface I(Of Out T1) Interface"I"/genericparams=T1 .interface I(Of Out T1)
' Interface J : End Interface Interface"J"/no genericparams .interface J(Of Out T1)
' Sub f(ByVal x as J) ... GenericTypeBinding(J,args=[], .proc f(x As J(Of T1))
' End Interface parentargs=I[T1])
' Observe that, by construction, any time we use a nested type like J in a contravariant position
' then it's bound to be invalid. If we simply applied the previous paragraph then we'd emit a
' confusing error to the user like "J is invalid because T1 is an Out parameter". So we want
' to do a better job of reporting errors. In particular,
' * If we are checking a GenericTypeBinding (e.g. x as J(Of T1)) for contravariant validity, look up
' to find the outermost ancestor binding (e.g. parentargs=I[T1]) which is of a variant interface.
' If this is also the outermost variant container of the current context, then it's an error.
Select Case type.Kind
Case SymbolKind.TypeParameter
' 1. if T is a generic parameter which was declared wrongly
Dim typeParam = DirectCast(type, TypeParameterSymbol)
If (typeParam.Variance = VarianceKind.Out AndAlso requiredVariance <> VarianceKind.Out) OrElse
(typeParam.Variance = VarianceKind.In AndAlso requiredVariance <> VarianceKind.In) Then
' The error is either because we have an "Out" param and Out is inappropriate here,
' or we used an "In" param and In is inappropriate here. This flag says which:
Dim inappropriateOut As Boolean = (typeParam.Variance = VarianceKind.Out)
' OKAY, so now we need to report an error. Simple enough, but we've tried to give helpful
' context-specific error messages to the user, and so the code has to work through a lot
' of special cases.
Select Case context
Case VarianceContext.ByVal
' "Type '|1' cannot be used as a ByVal parameter type because '|1' is an 'Out' type parameter."
Debug.Assert(inappropriateOut, "unexpected: an variance error in ByVal must be due to an inappropriate out")
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceOutByValDisallowed1, type.Name))
Case VarianceContext.ByRef
' "Type '|1' cannot be used in this context because 'In' and 'Out' type parameters cannot be used for ByRef parameter types, and '|1' is an 'Out/In' type parameter."
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutByRefDisallowed1,
ERRID.ERR_VarianceInByRefDisallowed1),
type.Name))
Case VarianceContext.Return
' "Type '|1' cannot be used as a return type because '|1' is an 'In' type parameter."
Debug.Assert(Not inappropriateOut, "unexpected: a variance error in Return Type must be due to an inappropriate in")
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceInReturnDisallowed1, type.Name))
Case VarianceContext.Constraint
' "Type '|1' cannot be used as a generic type constraint because '|1' is an 'Out' type parameter."
Debug.Assert(inappropriateOut, "unexpected: a variance error in Constraint must be due to an inappropriate out")
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceOutConstraintDisallowed1, type.Name))
Case VarianceContext.Nullable
' "Type '|1' cannot be used in '|2' because 'In' and 'Out' type parameters cannot be made nullable, and '|1' is an 'In/Out' type parameter."
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutNullableDisallowed2,
ERRID.ERR_VarianceInNullableDisallowed2),
type.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType)))
Case VarianceContext.ReadOnlyProperty
' "Type '|1' cannot be used as a ReadOnly property type because '|1' is an 'In' type parameter."
Debug.Assert(Not inappropriateOut, "unexpected: a variance error in ReadOnlyProperty must be due to an inappropriate in")
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceInReadOnlyPropertyDisallowed1, type.Name))
Case VarianceContext.WriteOnlyProperty
' "Type '|1' cannot be used as a WriteOnly property type because '|1' is an 'Out' type parameter."
Debug.Assert(inappropriateOut, "unexpected: a variance error in WriteOnlyProperty must be due to an inappropriate out")
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceOutWriteOnlyPropertyDisallowed1, type.Name))
Case VarianceContext.Property
' "Type '|1' cannot be used as a property type in this context because '|1' is an 'Out/In' type parameter and the property is not marked ReadOnly/WriteOnly.")
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutPropertyDisallowed1,
ERRID.ERR_VarianceInPropertyDisallowed1),
type.Name))
Case VarianceContext.Complex
' Otherwise, we're in "VarianceContextComplex" property. And so the error message needs
' to spell out precisely where in the context we are:
' "Type '|1' cannot be used in this context because '|1' is an 'Out|In' type parameter."
' "Type '|1' cannot be used for the '|2' in '|3' in this context because '|1' is an 'Out|In' type parameter."
' "Type '|1' cannot be used in '|2' in this context because '|1' is an 'Out|In' type parameter."
' "Type '|1' cannot be used in '|2' for the '|3' in '|4' in this context because '|1' is an 'Out' type parameter."
' We need the "in '|2' here" clause when ErrorBindingIsNested, to show which instantiation we're talking about.
' We need the "for the '|3' in '|4'" when ErrorBinding->GetGenericParamCount()>1
If typeParameterInfo.ConstructedType Is Nothing Then
' "Type '|1' cannot be used in this context because '|1' is an 'Out|In' type parameter."
' Used for simple errors where the erroneous generic-param is NOT inside a generic binding:
' e.g. "Sub f(ByVal a as O)" for some parameter declared as "Out O"
' gives the error "An 'Out' parameter like 'O' cannot be user here".
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutParamDisallowed1,
ERRID.ERR_VarianceInParamDisallowed1),
type.Name))
ElseIf constructionDepth <= 1 Then
If typeParameterInfo.ConstructedType.Arity <= 1 Then
' "Type '|1' cannot be used in this context because '|1' is an 'Out|In' type parameter."
' e.g. "Sub f(ByVal a As IEnumerable(Of O))" yields
' "An 'Out' parameter like 'O' cannot be used here."
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutParamDisallowed1,
ERRID.ERR_VarianceInParamDisallowed1),
type.Name))
Else
Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
' "Type '|1' cannot be used for the '|2' in '|3' in this context because '|1' is an 'Out|In' type parameter."
' e.g. "Sub f(ByVal a As IDoubleEnumerable(Of O,I)) yields
' "An 'Out' parameter like 'O' cannot be used for type parameter 'T1' of 'IDoubleEnumerable(Of T1,T2)'."
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutParamDisallowedForGeneric3,
ERRID.ERR_VarianceInParamDisallowedForGeneric3),
type.Name,
typeParameterInfo.TypeParameter.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType.OriginalDefinition)))
End If
Else
Debug.Assert(constructionDepth > 1)
If typeParameterInfo.ConstructedType.Arity <= 1 Then
' "Type '|1' cannot be used in '|2' in this context because '|1' is an 'Out|In' type parameter."
' e.g. "Sub f(ByVal a as Func(Of IEnumerable(Of O), IEnumerable(Of O))" yields
' "In 'IEnumerable(Of O)' here, an 'Out' parameter like 'O' cannot be used."
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutParamDisallowedHere2,
ERRID.ERR_VarianceInParamDisallowedHere2),
type.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType)))
Else
Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
' "Type '|1' cannot be used in '|2' for the '|3' in '|4' in this context because '|1' is an 'Out' type parameter."
' e.g. "Sub f(ByVal a as IEnumerable(Of Func(Of O,O))" yields
' "In 'Func(Of O,O)' here, an 'Out' parameter like 'O' cannot be used for type parameter 'Tresult' of 'Func(Of Tresult,T)'."
AppendVarianceDiagnosticInfo(diagnostics,
ErrorFactory.ErrorInfo(If(inappropriateOut,
ERRID.ERR_VarianceOutParamDisallowedHereForGeneric4,
ERRID.ERR_VarianceInParamDisallowedHereForGeneric4),
type.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType),
typeParameterInfo.TypeParameter.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType.OriginalDefinition)))
End If
End If
Case Else
Throw ExceptionUtilities.UnexpectedValue(context)
End Select
End If
Case SymbolKind.ArrayType
' 2. if T is an array U():
GenerateVarianceDiagnosticsForTypeRecursively(DirectCast(type, ArrayTypeSymbol).ElementType,
requiredVariance,
context,
typeParameterInfo,
constructionDepth,
diagnostics)
Case SymbolKind.NamedType
Dim namedType = DirectCast(type, NamedTypeSymbol)
If Not namedType.IsGenericType Then
Return
End If
' 3. T is a construction X1(Of T11...)...Xn(Of Tn1...) of some generic struct/class/interface/delegate X1(Of X11...)...Xn(Of Xn1...)
' Special check, discussed above, for better error-reporting when we find a generic binding in an
' illegal contravariant position
If requiredVariance <> VarianceKind.Out Then
Dim outermostVarianceContainerOfType As NamedTypeSymbol = Nothing
Dim container As NamedTypeSymbol = type.ContainingType
While container IsNot Nothing
If container.TypeParameters.HaveVariance() Then
outermostVarianceContainerOfType = container.OriginalDefinition
End If
container = container.ContainingType
End While
Dim outermostVarianceContainerOfContext As NamedTypeSymbol = Nothing
container = Me
Do
If container.TypeParameters.HaveVariance() Then
outermostVarianceContainerOfContext = container
End If
container = container.ContainingType
Loop While container IsNot Nothing
If outermostVarianceContainerOfType IsNot Nothing AndAlso outermostVarianceContainerOfType Is outermostVarianceContainerOfContext Then
' ERRID_VarianceTypeDisallowed2. "Type '|1' cannot be used in this context because both the context and the definition of '|1' are nested within type '|2', and '|2' has 'In' or 'Out' type parameters. Consider moving '|1' outside of '|2'."
' ERRID_VarianceTypeDisallowedForGeneric4. "Type '|1' cannot be used for the '|3' in '|4' in this context because both the context and the definition of '|1' are nested within type '|2', and '|2' has 'In' or 'Out' type parameters. Consider moving '|1' outside of '|2'."
' ERRID_VarianceTypeDisallowedHere3. "Type '|1' cannot be used in '|3' in this context because both the context and the definition of '|1' are nested within type '|2', and '|2' has 'In' or 'Out' type parameters. Consider moving '|1' outside of '|2'."
' ERRID_VarianceTypeDisallowedHereForGeneric5. "Type '|1' cannot be used for the '|4' of '|5' in '|3' in this context because both the context and the definition of '|1' are nested within type '|2', and '|2' has 'In' or 'Out' type parameters. Consider moving '|1' outside of '|2'."
If typeParameterInfo.ConstructedType Is Nothing Then
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceTypeDisallowed2,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(type.OriginalDefinition),
CustomSymbolDisplayFormatter.QualifiedName(outermostVarianceContainerOfType)))
ElseIf constructionDepth <= 1 Then
If typeParameterInfo.ConstructedType.Arity <= 1 Then
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceTypeDisallowed2,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(type.OriginalDefinition),
CustomSymbolDisplayFormatter.QualifiedName(outermostVarianceContainerOfType)))
Else
Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceTypeDisallowedForGeneric4,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(type.OriginalDefinition),
CustomSymbolDisplayFormatter.QualifiedName(outermostVarianceContainerOfType),
typeParameterInfo.TypeParameter.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType.OriginalDefinition)))
End If
Else
Debug.Assert(constructionDepth > 1)
If typeParameterInfo.ConstructedType.Arity <= 1 Then
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceTypeDisallowedHere3,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(type.OriginalDefinition),
CustomSymbolDisplayFormatter.QualifiedName(outermostVarianceContainerOfType),
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType)))
Else
Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
AppendVarianceDiagnosticInfo(diagnostics, ErrorFactory.ErrorInfo(ERRID.ERR_VarianceTypeDisallowedHereForGeneric5,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(type.OriginalDefinition),
CustomSymbolDisplayFormatter.QualifiedName(outermostVarianceContainerOfType),
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType),
typeParameterInfo.TypeParameter.Name,
CustomSymbolDisplayFormatter.QualifiedName(typeParameterInfo.ConstructedType.OriginalDefinition)))
End If
End If
Return
End If
End If
' The general code below will catch the case of nullables "T?" or "Nullable(Of T)", which require T to
' be invariant. But we want more specific error reporting for this case, so we check for it first.
If namedType.IsNullableType() Then
Debug.Assert(namedType.TypeParameters(0).Variance = VarianceKind.None, "unexpected: a nullable type should have one generic parameter with no variance")
If namedType.TypeArgumentsNoUseSiteDiagnostics(0).IsValueType Then
GenerateVarianceDiagnosticsForTypeRecursively(namedType.TypeArgumentsNoUseSiteDiagnostics(0),
VarianceKind.None,
VarianceContext.Nullable,
New VarianceDiagnosticsTargetTypeParameter(namedType, 0),
constructionDepth,
diagnostics)
End If
Return
End If
' "Type" will refer to the last generic binding, Xn(Of Tn1...). So we have to check all the way up to X1.
Do
For argumentIndex As Integer = 0 To namedType.Arity - 1
' nb. the InvertVariance() here is the only difference between covariantly-valid and contravariantly-valid
' for generic constructions.
Dim argumentRequiredVariance As VarianceKind
Select Case requiredVariance
Case VarianceKind.In
Select Case namedType.TypeParameters(argumentIndex).Variance
Case VarianceKind.In
argumentRequiredVariance = VarianceKind.Out
Case VarianceKind.Out
argumentRequiredVariance = VarianceKind.In
Case Else
argumentRequiredVariance = VarianceKind.None
End Select
Case VarianceKind.Out
argumentRequiredVariance = namedType.TypeParameters(argumentIndex).Variance
Case Else
argumentRequiredVariance = VarianceKind.None
End Select
GenerateVarianceDiagnosticsForTypeRecursively(namedType.TypeArgumentsNoUseSiteDiagnostics(argumentIndex),
argumentRequiredVariance,
VarianceContext.Complex,
New VarianceDiagnosticsTargetTypeParameter(namedType, argumentIndex),
constructionDepth + 1,
diagnostics)
Next
namedType = namedType.ContainingType
Loop While namedType IsNot Nothing
Case SymbolKind.ErrorType
Case Else
Throw ExceptionUtilities.UnexpectedValue(type.Kind)
End Select
End Sub
Private Sub GenerateVarianceDiagnosticsForMethod(
method As MethodSymbol,
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
Select Case method.MethodKind
Case MethodKind.EventAdd, MethodKind.EventRemove, MethodKind.PropertyGet, MethodKind.PropertySet
Return
End Select
GenerateVarianceDiagnosticsForParameters(method.Parameters, diagnostics, infosBuffer)
' Return type is valid covariantly
Debug.Assert(Not HaveDiagnostics(infosBuffer))
GenerateVarianceDiagnosticsForType(method.ReturnType, VarianceKind.Out, VarianceContext.Return, infosBuffer)
If HaveDiagnostics(infosBuffer) Then
Dim location As location
Dim syntax As MethodBaseSyntax = method.GetDeclaringSyntaxNode(Of MethodBaseSyntax)()
If syntax Is Nothing AndAlso method.MethodKind = MethodKind.DelegateInvoke Then
syntax = method.ContainingType.GetDeclaringSyntaxNode(Of MethodBaseSyntax)()
End If
Dim asClause As AsClauseSyntax = If(syntax IsNot Nothing, syntax.AsClauseInternal, Nothing)
If asClause IsNot Nothing Then
location = asClause.Type.GetLocation()
Else
location = method.Locations(0)
End If
ReportDiagnostics(diagnostics, location, infosBuffer)
End If
GenerateVarianceDiagnosticsForConstraints(method.TypeParameters, diagnostics, infosBuffer)
End Sub
Private Sub GenerateVarianceDiagnosticsForParameters(
parameters As ImmutableArray(Of ParameterSymbol),
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
' Each ByVal Pi is valid contravariantly, and each ByRef Pi is valid invariantly
For Each param As ParameterSymbol In parameters
Dim requiredVariance As VarianceKind
Dim context As VarianceContext
If param.IsByRef Then
requiredVariance = VarianceKind.None
context = VarianceContext.ByRef
Else
requiredVariance = VarianceKind.In
context = VarianceContext.ByVal
End If
GenerateVarianceDiagnosticsForType(param.Type, requiredVariance, context, infosBuffer)
If HaveDiagnostics(infosBuffer) Then
Dim location As location
Dim syntax As ParameterSyntax = param.GetDeclaringSyntaxNode(Of ParameterSyntax)()
If syntax IsNot Nothing AndAlso syntax.AsClause IsNot Nothing Then
location = syntax.AsClause.Type.GetLocation()
Else
location = param.Locations(0)
End If
ReportDiagnostics(diagnostics, location, infosBuffer)
End If
Next
End Sub
Private Sub GenerateVarianceDiagnosticsForConstraints(
parameters As ImmutableArray(Of TypeParameterSymbol),
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
' Each constraint on U1...Un is valid contravariantly
' "It is character-building to consider why this is required" [Eric Lippert, 2008]
' Interface IReadOnly(Of Out T) | Class Zoo(Of T) | Dim m As IReadOnly(Of Mammal) = new Zoo(Of Mammal) ' OK through inheritance
' Sub Fun(Of U As T)() | Implements IReadOnly(Of T) | Dim a as IReadOnly(Of Animal) = m ' OK through covariance
' End Interface | End Class | a.Fun(Of Fish)() ' BAD: Fish is an Animal (satisfies "U as T"), but fun is expecting a mammal!
For Each param As TypeParameterSymbol In parameters
For Each constraint As TypeSymbol In param.ConstraintTypesNoUseSiteDiagnostics
GenerateVarianceDiagnosticsForType(constraint, VarianceKind.In, VarianceContext.Constraint, infosBuffer)
If HaveDiagnostics(infosBuffer) Then
Dim location As location = param.Locations(0)
For Each constraintInfo As TypeParameterConstraint In param.GetConstraints()
If constraintInfo.TypeConstraint IsNot Nothing AndAlso
constraintInfo.TypeConstraint.IsSameTypeIgnoringCustomModifiers(constraint) Then
location = constraintInfo.LocationOpt
Exit For
End If
Next
ReportDiagnostics(diagnostics, location, infosBuffer)
End If
Next
Next
End Sub
Private Sub GenerateVarianceDiagnosticsForProperty(
[property] As PropertySymbol,
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
' Gettable: requires covariance. Settable: requires contravariance. Gettable and settable: requires invariance.
Dim requiredVariance As VarianceKind
Dim context As VarianceContext
If [property].IsReadOnly Then
requiredVariance = VarianceKind.Out
context = VarianceContext.ReadOnlyProperty
ElseIf [property].IsWriteOnly Then
requiredVariance = VarianceKind.In
context = VarianceContext.WriteOnlyProperty
Else
requiredVariance = VarianceKind.None
context = VarianceContext.Property
End If
GenerateVarianceDiagnosticsForType([property].Type, requiredVariance, context, infosBuffer)
If HaveDiagnostics(infosBuffer) Then
Dim location As location
Dim syntax As PropertyStatementSyntax = [property].GetDeclaringSyntaxNode(Of PropertyStatementSyntax)()
If syntax IsNot Nothing AndAlso syntax.AsClause IsNot Nothing Then
location = syntax.AsClause.Type.GetLocation()
Else
location = [property].Locations(0)
End If
ReportDiagnostics(diagnostics, location, infosBuffer)
End If
' A property might be declared with extra parameters, so we have to check that these are variance-valid.
GenerateVarianceDiagnosticsForParameters([property].Parameters, diagnostics, infosBuffer)
End Sub
Private Sub GenerateVarianceDiagnosticsForEvent(
[event] As EventSymbol,
<[In], Out> ByRef diagnostics As DiagnosticBag,
<[In], Out> ByRef infosBuffer As ArrayBuilder(Of DiagnosticInfo)
)
Debug.Assert(Not HaveDiagnostics(infosBuffer))
Dim type As TypeSymbol = [event].Type
If Not type.IsDelegateType() Then
Return
End If
If type.ImplicitlyDefinedBy() Is [event] Then
Return
End If
GenerateVarianceDiagnosticsForType(type, VarianceKind.In, VarianceContext.Complex, infosBuffer)
If HaveDiagnostics(infosBuffer) Then
Dim location As location
Dim syntax As EventStatementSyntax = [event].GetDeclaringSyntaxNode(Of EventStatementSyntax)()
If syntax IsNot Nothing AndAlso syntax.AsClause IsNot Nothing Then
location = syntax.AsClause.Type.GetLocation()
Else
location = [event].Locations(0)
End If
ReportDiagnostics(diagnostics, location, infosBuffer)
End If
End Sub
''' <summary>
''' Ensure all attributes on all members in the named type are bound.
''' </summary>
Private Sub BindAllMemberAttributes(cancellationToken As CancellationToken)
' Ensure all members are declared
Dim lookup = Me.MemberAndInitializerLookup
Dim haveExtensionMethods As Boolean = False
' Now bind all attributes on all members. This must be done after the members are declared to avoid
' infinite recursion.
For Each syms In lookup.Members.Values
For Each sym In syms
sym.GetAttributes()
' Make a note of extension methods
If Not haveExtensionMethods Then
haveExtensionMethods = (sym.Kind = SymbolKind.Method AndAlso DirectCast(sym, MethodSymbol).IsExtensionMethod)
End If
cancellationToken.ThrowIfCancellationRequested()
Next
Next
If haveExtensionMethods Then
Debug.Assert(Me.MightContainExtensionMethods)
m_containingModule.RecordPresenceOfExtensionMethods()
Debug.Assert(_lazyContainsExtensionMethods <> ThreeState.False)
_lazyContainsExtensionMethods = ThreeState.True
' At this point we already processed all the attributes on the type.
' and should know whether there is an explicit Extension attribute on it.
' If there is an explicit attribute, or we passed through this code before,
' m_lazyEmitExtensionAttribute should have known value.
If _lazyEmitExtensionAttribute = ThreeState.Unknown Then
' We need to emit an Extension attribute on the type.
' Can we locate it?
Dim useSiteError As DiagnosticInfo = Nothing
m_containingModule.ContainingSourceAssembly.DeclaringCompilation.GetExtensionAttributeConstructor(useSiteError:=useSiteError)
If useSiteError IsNot Nothing Then
' Note, we are storing false because, even though we should emit the attribute,
' we can't do that due to the use site error.
_lazyEmitExtensionAttribute = ThreeState.False
' also notify the containing assembly to not use the extension attribute
m_containingModule.ContainingSourceAssembly.AnErrorHasBeenReportedAboutExtensionAttribute()
Else
' We have extension methods, we don't have explicit Extension attribute
' on the type, which we were able to locate. Should emit it.
Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.False)
_lazyEmitExtensionAttribute = ThreeState.True
End If
End If
Else
Debug.Assert(_lazyContainsExtensionMethods <> ThreeState.True)
_lazyContainsExtensionMethods = ThreeState.False
Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.True)
_lazyEmitExtensionAttribute = ThreeState.False
End If
Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.Unknown)
Debug.Assert(_lazyContainsExtensionMethods <> ThreeState.Unknown)
Debug.Assert(_lazyEmitExtensionAttribute = ThreeState.False OrElse _lazyContainsExtensionMethods = ThreeState.True)
End Sub
#End Region
#Region "Containers"
Public Overrides ReadOnly Property ContainingSymbol As Symbol
Get
Return _containingSymbol
End Get
End Property
Public Overrides ReadOnly Property ContainingType As NamedTypeSymbol
Get
Return TryCast(_containingSymbol, NamedTypeSymbol)
End Get
End Property
Public Overrides ReadOnly Property ContainingModule As ModuleSymbol
Get
Return m_containingModule
End Get
End Property
Public ReadOnly Property ContainingSourceModule As SourceModuleSymbol
Get
Return m_containingModule
End Get
End Property
#End Region
#Region "Flags Encoded Properties"
Public Overrides ReadOnly Property DeclaredAccessibility As Accessibility
Get
Return CType((_flags And SourceTypeFlags.AccessibilityMask), Accessibility)
End Get
End Property
Public Overrides ReadOnly Property IsMustInherit As Boolean
Get
Return (_flags And SourceTypeFlags.MustInherit) <> 0
End Get
End Property
Public Overrides ReadOnly Property IsNotInheritable As Boolean
Get
Return (_flags And SourceTypeFlags.NotInheritable) <> 0
End Get
End Property
Friend Overrides ReadOnly Property ShadowsExplicitly As Boolean
Get
Return (_flags And SourceTypeFlags.Shadows) <> 0
End Get
End Property
Public Overrides ReadOnly Property TypeKind As TypeKind
Get
Return CType((_flags And SourceTypeFlags.TypeKindMask) >> CUInt(SourceTypeFlags.TypeKindShift), TypeKind)
End Get
End Property
Friend Overrides ReadOnly Property IsInterface As Boolean
Get
Return Me.TypeKind = TypeKind.Interface
End Get
End Property
Friend ReadOnly Property IsPartial As Boolean
Get
Return (_flags And SourceTypeFlags.Partial) <> 0
End Get
End Property
#End Region
#Region "Syntax"
Friend ReadOnly Property TypeDeclaration As MergedTypeDeclaration
Get
Return _declaration
End Get
End Property
Public Overrides ReadOnly Property IsImplicitlyDeclared As Boolean
Get
Return False
End Get
End Property
Public NotOverridable Overrides ReadOnly Property IsScriptClass As Boolean
Get
Dim kind = _declaration.Declarations(0).Kind
Return kind = DeclarationKind.Script OrElse kind = DeclarationKind.Submission
End Get
End Property
Public NotOverridable Overrides ReadOnly Property IsImplicitClass As Boolean
Get
Return _declaration.Declarations(0).Kind = DeclarationKind.ImplicitClass
End Get
End Property
Public NotOverridable Overrides ReadOnly Property Arity As Integer
Get
Return _declaration.Arity
End Get
End Property
' Get the declaration kind. Used to match up symbols with declarations in the BinderCache.
' Name, Arity, and DeclarationKind must match to exactly one source symbol, even in the presence
' of errors.
Friend ReadOnly Property DeclarationKind As DeclarationKind
Get
Return _declaration.Kind
End Get
End Property
Public NotOverridable Overrides ReadOnly Property Name As String
Get
Return _name
End Get
End Property
Friend NotOverridable Overrides ReadOnly Property MangleName As Boolean
Get
Return Arity > 0
End Get
End Property
''' <summary>
''' Should return full emitted namespace name for a top level type if the name
''' might be different in case from containing namespace symbol full name, Nothing otherwise.
'''
''' Although namespaces unify based on case-insensitive name, VB uses the casing the namespace
''' declaration surround the class definition for the name emitted to metadata.
'''
''' Namespace FOO
''' Class X
''' End Class
''' ENd Namespace
''' Namespace foo
''' Class Y
''' End Class
''' ENd Namespace
'''
''' In metadata, these are classes "FOO.X" and "foo.Y" (and thus appear in different namespaces
''' when imported into C#.) This function determines the casing of the namespace part of a class, if needed
''' to override the namespace name.
''' </summary>
Friend Overrides Function GetEmittedNamespaceName() As String
Dim containingSourceNamespace = TryCast(_containingSymbol, SourceNamespaceSymbol)
If containingSourceNamespace IsNot Nothing AndAlso containingSourceNamespace.HasMultipleSpellings Then
' Find the namespace spelling surrounding the first declaration.
Debug.Assert(Locations.Length > 0)
Dim firstLocation = Me.DeclaringCompilation.FirstSourceLocation(Locations)
Debug.Assert(firstLocation.IsInSource)
Return containingSourceNamespace.GetDeclarationSpelling(firstLocation.SourceTree, firstLocation.SourceSpan.Start)
End If
Return Nothing
End Function
Friend NotOverridable Overrides Function GetLexicalSortKey() As LexicalSortKey
' WARNING: this should not allocate memory!
If Not _lazyLexicalSortKey.IsInitialized Then
_lazyLexicalSortKey.SetFrom(_declaration.GetLexicalSortKey(DeclaringCompilation))
End If
Return _lazyLexicalSortKey
End Function
Public NotOverridable Overrides ReadOnly Property Locations As ImmutableArray(Of Location)
Get
Return _declaration.NameLocations
End Get
End Property
''' <summary>
''' Syntax references of all parts of the type declaration.
''' Submission and script classes are represented by their containing <see cref="CompilationUnitSyntax"/>,
''' implicit class can be represented by <see cref="CompilationUnitSyntax"/> or <see cref="NamespaceBlockSyntax"/>.
''' </summary>
Public ReadOnly Property SyntaxReferences As ImmutableArray(Of SyntaxReference)
Get
Return _declaration.SyntaxReferences
End Get
End Property
Public NotOverridable Overrides ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference)
Get
Return GetDeclaringSyntaxReferenceHelper(SyntaxReferences)
End Get
End Property
#End Region
#Region "Member from Syntax"
' Types defined in source code go through the following states, described here.
' The data that is computed by each state is stored in a contained immutable object, for storage efficiency
' and ease of lock-free implementation.
' 1) Created. Only the name, accessibility, arity, typekind, type parameters (but not their names),
' and references to the source code declarations are known.
' No access to the syntax tree is needed for this state, only the declaration.
' 2) Nested types created. No errors are diagnosed yet. Still no access to the syntax tree is
' needed for this state.
' 3) Type parameters names, variance, and constraints are known. Errors relating to type parameters
' are diagnosed. This needs to be done before resolving inheritance, because the base type can
' involve the type parameters.
' 4) Inheritance resolved. The base type, interfaces, type parameter names, variance, and
' constraints are known. Errors relating to partial types are reported.
' 5) Members declared. All members of the type are created, and errors with them reported.
' Errors relating to nested type are reported here also.
'
' Which phases have been completed is tracked by whether the state data for that
' that phase has been initialized. This allows us to update phases in a lock-free
' manner, which avoids many deadlock possibilities. It also makes sure that diagnostics are
' reported once and only once.
'
' The states are not visible outside the class, the class moves to the given
' state on demand. Care must be given in implementing the transitions to avoid
' deadlock or infinite recursion.
' Given the syntax declaration, and a container, get the symbol relating to that syntax.
' This is done by looking up the name from the declaration in the container, handling duplicates, arity, and
' so forth correctly.
Friend Shared Function FindSymbolFromSyntax(declarationSyntax As TypeStatementSyntax,
container As NamespaceOrTypeSymbol,
sourceModule As ModuleSymbol) As SourceNamedTypeSymbol
Dim childName As String = declarationSyntax.Identifier.ValueText
Dim childArity As Integer = DeclarationTreeBuilder.GetArity(declarationSyntax.TypeParameterList)
Dim childDeclKind As DeclarationKind = DeclarationTreeBuilder.GetKind(declarationSyntax.Kind)
Return FindSymbolInContainer(childName, childArity, childDeclKind, container, sourceModule)
End Function
' Given the syntax declaration, and a container, get the symbol relating to that syntax.
' This is done by lookup up the name from the declaration in the container, handling duplicates, arity, and
' so forth correctly.
Friend Shared Function FindSymbolFromSyntax(declarationSyntax As EnumStatementSyntax,
container As NamespaceOrTypeSymbol,
sourceModule As ModuleSymbol) As SourceNamedTypeSymbol
Dim childName As String = declarationSyntax.Identifier.ValueText
Dim childArity As Integer = 0
Dim childDeclKind As DeclarationKind = DeclarationTreeBuilder.GetKind(declarationSyntax.Kind)
Return FindSymbolInContainer(childName, childArity, childDeclKind, container, sourceModule)
End Function
' Given the syntax declaration, and a container, get the symbol relating to that syntax.
' This is done by lookup up the name from the declaration in the container, handling duplicates, arity, and
' so forth correctly.
Friend Shared Function FindSymbolFromSyntax(declarationSyntax As DelegateStatementSyntax,
container As NamespaceOrTypeSymbol,
sourceModule As ModuleSymbol) As SourceNamedTypeSymbol
Dim childName As String = declarationSyntax.Identifier.ValueText
Dim childArity As Integer = DeclarationTreeBuilder.GetArity(declarationSyntax.TypeParameterList)
Dim childDeclKind As DeclarationKind = VisualBasic.Symbols.DeclarationKind.Delegate
Return FindSymbolInContainer(childName, childArity, childDeclKind, container, sourceModule)
End Function
' Helper for FindSymbolFromSyntax. Finds a child source type based on name, arity, DeclarationKind.
Private Shared Function FindSymbolInContainer(childName As String,
childArity As Integer,
childDeclKind As DeclarationKind,
container As NamespaceOrTypeSymbol,
sourceModule As ModuleSymbol) As SourceNamedTypeSymbol
' We need to find the correct symbol, even in error cases. There must be only one
' symbol that is a source symbol, defined in our module, with the given name, arity,
' and declaration kind. The declaration table merges together symbols with the same
' arity, name, and declaration kind (regardless of the Partial modifier).
For Each child In container.GetTypeMembers(childName, childArity)
Dim sourceType = TryCast(child, SourceNamedTypeSymbol)
If sourceType IsNot Nothing Then
If (sourceType.ContainingModule Is sourceModule AndAlso
sourceType.DeclarationKind = childDeclKind) Then
Return sourceType
End If
End If
Next
Return Nothing
End Function
#End Region
#Region "Members (phase 5)"
''' <summary>
''' Structure to wrap the different arrays of members.
''' </summary>
Friend Class MembersAndInitializers
Friend ReadOnly Members As Dictionary(Of String, ImmutableArray(Of Symbol))
Friend ReadOnly StaticInitializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer))
Friend ReadOnly InstanceInitializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer))
Friend ReadOnly StaticInitializersSyntaxLength As Integer
Friend ReadOnly InstanceInitializersSyntaxLength As Integer
''' <summary>
''' Initializes a new instance of the <see cref="MembersAndInitializers" /> class.
''' </summary>
''' <param name="members">The members.</param>
''' <param name="staticInitializers">The static initializers.</param>
''' <param name="instanceInitializers">The instance initializers.</param>
Friend Sub New(
members As Dictionary(Of String, ImmutableArray(Of Symbol)),
staticInitializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer)),
instanceInitializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer)),
staticInitializersSyntaxLength As Integer,
instanceInitializersSyntaxLength As Integer)
Me.Members = members
Me.StaticInitializers = staticInitializers
Me.InstanceInitializers = instanceInitializers
Debug.Assert(staticInitializersSyntaxLength = If(staticInitializers.IsDefaultOrEmpty, 0, staticInitializers.Sum(Function(s) s.Sum(Function(i) If(Not i.IsMetadataConstant, i.Syntax.Span.Length, 0)))))
Debug.Assert(instanceInitializersSyntaxLength = If(instanceInitializers.IsDefaultOrEmpty, 0, instanceInitializers.Sum(Function(s) s.Sum(Function(i) i.Syntax.Span.Length))))
Me.StaticInitializersSyntaxLength = staticInitializersSyntaxLength
Me.InstanceInitializersSyntaxLength = instanceInitializersSyntaxLength
End Sub
End Class
''' <summary>
''' Accumulates different members kinds used while building the members.
''' </summary>
Friend NotInheritable Class MembersAndInitializersBuilder
Friend ReadOnly Members As Dictionary(Of String, ArrayBuilder(Of Symbol)) = New Dictionary(Of String, ArrayBuilder(Of Symbol))(IdentifierComparison.Comparer)
Friend Property StaticInitializers As ArrayBuilder(Of ImmutableArray(Of FieldOrPropertyInitializer))
Friend Property InstanceInitializers As ArrayBuilder(Of ImmutableArray(Of FieldOrPropertyInitializer))
Friend ReadOnly DeferredMemberDiagnostic As ArrayBuilder(Of ValueTuple(Of Symbol, Binder)) = ArrayBuilder(Of ValueTuple(Of Symbol, Binder)).GetInstance()
Friend StaticSyntaxLength As Integer = 0
Friend InstanceSyntaxLength As Integer = 0
Friend Function ToReadOnlyAndFree() As MembersAndInitializers
DeferredMemberDiagnostic.Free()
Dim readonlyMembers = New Dictionary(Of String, ImmutableArray(Of Symbol))(IdentifierComparison.Comparer)
For Each memberList In Members.Values
readonlyMembers.Add(memberList(0).Name, memberList.ToImmutableAndFree())
Next
Return New MembersAndInitializers(
readonlyMembers,
If(StaticInitializers IsNot Nothing, StaticInitializers.ToImmutableAndFree(), Nothing),
If(InstanceInitializers IsNot Nothing, InstanceInitializers.ToImmutableAndFree(), Nothing),
StaticSyntaxLength,
InstanceSyntaxLength)
End Function
End Class
''' <summary>
''' Adds a field initializer for the field to list of field initializers
''' </summary>
''' <param name="initializers">All initializers.</param>
''' <param name="computeInitializer">Compute the field initializer to add to the list of initializers.</param>
Friend Shared Sub AddInitializer(ByRef initializers As ArrayBuilder(Of FieldOrPropertyInitializer), computeInitializer As Func(Of Integer, FieldOrPropertyInitializer), ByRef aggregateSyntaxLength As Integer)
Dim initializer = computeInitializer(aggregateSyntaxLength)
If initializers Is Nothing Then
initializers = ArrayBuilder(Of FieldOrPropertyInitializer).GetInstance()
Else
' initializers should be added in syntax order
Debug.Assert(initializer.Syntax.SyntaxTree Is initializers.Last().Syntax.SyntaxTree)
Debug.Assert(initializer.Syntax.Span.Start > initializers.Last().Syntax.Span.Start)
End If
initializers.Add(initializer)
' A constant field of type decimal needs a field initializer, so
' check if it is a metadata constant, not just a constant to exclude
' decimals. Other constants do not need field initializers.
If Not initializer.IsMetadataConstant Then
' ignore leading and trailing trivia of the node
aggregateSyntaxLength += initializer.Syntax.Span.Length
End If
End Sub
''' <summary>
''' Adds an array of initializers to the member collections structure
''' </summary>
''' <param name="allInitializers">All initializers.</param>
''' <param name="siblings">The siblings.</param>
Friend Shared Sub AddInitializers(ByRef allInitializers As ArrayBuilder(Of ImmutableArray(Of FieldOrPropertyInitializer)), siblings As ArrayBuilder(Of FieldOrPropertyInitializer))
If siblings IsNot Nothing Then
If allInitializers Is Nothing Then
allInitializers = New ArrayBuilder(Of ImmutableArray(Of FieldOrPropertyInitializer))()
End If
allInitializers.Add(siblings.ToImmutableAndFree())
End If
End Sub
Protected Function GetTypeMembersDictionary() As Dictionary(Of String, ImmutableArray(Of NamedTypeSymbol))
If _lazyTypeMembers Is Nothing Then
Interlocked.CompareExchange(_lazyTypeMembers, MakeTypeMembers(), Nothing)
Debug.Assert(_lazyTypeMembers IsNot Nothing)
End If
Return _lazyTypeMembers
End Function
' Create symbols for all the nested types, and put them in a lookup indexed by (case-insensitive) name.
Private Function MakeTypeMembers() As Dictionary(Of String, ImmutableArray(Of NamedTypeSymbol))
Dim children As ImmutableArray(Of MergedTypeDeclaration) = _declaration.Children
Debug.Assert(s_emptyTypeMembers.Count = 0)
If children.IsEmpty Then
Return s_emptyTypeMembers
End If
Return children.Select(Function(decl) CreateNestedType(decl)).ToDictionary(
Function(decl) decl.Name,
IdentifierComparison.Comparer)
End Function
Friend Overrides Function GetTypeMembersUnordered() As ImmutableArray(Of NamedTypeSymbol)
Return GetTypeMembersDictionary().Flatten()
End Function
Public Overloads Overrides Function GetTypeMembers() As ImmutableArray(Of NamedTypeSymbol)
Return GetTypeMembersDictionary().Flatten(LexicalOrderSymbolComparer.Instance)
End Function
Public Overloads Overrides Function GetTypeMembers(name As String) As ImmutableArray(Of NamedTypeSymbol)
Dim members As ImmutableArray(Of NamedTypeSymbol) = Nothing
If GetTypeMembersDictionary().TryGetValue(name, members) Then
Return members
End If
Return ImmutableArray(Of NamedTypeSymbol).Empty
End Function
Public Overrides Function GetTypeMembers(name As String, arity As Integer) As ImmutableArray(Of NamedTypeSymbol)
Return GetTypeMembers(name).WhereAsArray(Function(t) t.Arity = arity)
End Function
Friend Overrides ReadOnly Property DefaultPropertyName As String
Get
If TypeKind <> TypeKind.Delegate Then
GetMembersAndInitializers() ' Ensure m_defaultPropertyName is set.
Else
Debug.Assert(_defaultPropertyName Is Nothing)
End If
Return _defaultPropertyName
End Get
End Property
Private ReadOnly Property MemberAndInitializerLookup As MembersAndInitializers
Get
Return GetMembersAndInitializers()
End Get
End Property
Private Function GetMembersAndInitializers() As MembersAndInitializers
If _lazyMembersAndInitializers Is Nothing Then
Dim diagBag = DiagnosticBag.GetInstance()
Dim membersAndInitializers = BuildMembersAndInitializers(diagBag)
m_containingModule.AtomicStoreReferenceAndDiagnostics(_lazyMembersAndInitializers, membersAndInitializers, diagBag, CompilationStage.Declare)
Debug.Assert(_lazyMembersAndInitializers IsNot Nothing)
diagBag.Free()
Dim unused = Me.KnownCircularStruct
#If DEBUG Then
VerifyMembers()
#End If
End If
Return _lazyMembersAndInitializers
End Function
#If DEBUG Then
Protected Overridable Sub VerifyMembers()
End Sub
#End If
Friend ReadOnly Property MembersHaveBeenCreated As Boolean
Get
Return _lazyMembersAndInitializers IsNot Nothing
End Get
End Property
#If DEBUG Then
' A thread local hash table to catch cases when BuildMembersAndInitializers
' is called recursively for the same symbol.
<ThreadStatic>
Private Shared s_SymbolsBuildingMembersAndInitializers As HashSet(Of SourceMemberContainerTypeSymbol)
#End If
Private Function BuildMembersAndInitializers(diagBag As DiagnosticBag) As MembersAndInitializers
Dim membersAndInitializers As MembersAndInitializers
#If DEBUG Then
If s_SymbolsBuildingMembersAndInitializers Is Nothing Then
s_SymbolsBuildingMembersAndInitializers = New HashSet(Of SourceMemberContainerTypeSymbol)(ReferenceEqualityComparer.Instance)
End If
Dim added As Boolean = s_SymbolsBuildingMembersAndInitializers.Add(Me)
Debug.Assert(added)
Try
#End If
' Get type members
Dim typeMembers = GetTypeMembersDictionary()
' Get non-type members
membersAndInitializers = BuildNonTypeMembers(diagBag)
_defaultPropertyName = DetermineDefaultPropertyName(membersAndInitializers.Members, diagBag)
' Find/process partial methods
ProcessPartialMethodsIfAny(membersAndInitializers.Members, diagBag)
' Merge types with non-types
For Each typeSymbols In typeMembers.Values
Dim nontypeSymbols As ImmutableArray(Of Symbol) = Nothing
Dim name = typeSymbols(0).Name
If Not membersAndInitializers.Members.TryGetValue(name, nontypeSymbols) Then
membersAndInitializers.Members.Add(name, StaticCast(Of Symbol).From(typeSymbols))
Else
membersAndInitializers.Members(name) = nontypeSymbols.Concat(StaticCast(Of Symbol).From(typeSymbols))
End If
Next
#If DEBUG Then
Finally
If added Then
s_SymbolsBuildingMembersAndInitializers.Remove(Me)
End If
End Try
#End If
Return membersAndInitializers
End Function
''' <summary> Examines the members collection and builds a set of partial methods if any, otherwise returns nothing </summary>
Private Function FindPartialMethodDeclarations(diagnostics As DiagnosticBag, members As Dictionary(Of String, ImmutableArray(Of Symbol))) As HashSet(Of SourceMemberMethodSymbol)
Dim partialMethods As HashSet(Of SourceMemberMethodSymbol) = Nothing
For Each memberGroup In members
For Each member In memberGroup.Value
Dim method = TryCast(member, SourceMemberMethodSymbol)
If method IsNot Nothing AndAlso method.IsPartial AndAlso method.MethodKind = MethodKind.Ordinary Then
If Not method.IsSub Then
Debug.Assert(method.Locations.Length = 1)
diagnostics.Add(ERRID.ERR_PartialMethodsMustBeSub1, method.NonMergedLocation, method.Name)
Else
If partialMethods Is Nothing Then
partialMethods = New HashSet(Of SourceMemberMethodSymbol)(ReferenceEqualityComparer.Instance)
End If
partialMethods.Add(method)
End If
End If
Next
Next
Return partialMethods
End Function
Private Sub ProcessPartialMethodsIfAny(members As Dictionary(Of String, ImmutableArray(Of Symbol)), diagnostics As DiagnosticBag)
' Detect all partial method declarations
Dim partialMethods As HashSet(Of SourceMemberMethodSymbol) = FindPartialMethodDeclarations(diagnostics, members)
If partialMethods Is Nothing Then
Return
End If
' we have at least one partial method, note that the methods we
' found may have the same names and/or signatures
' NOTE: we process partial methods one-by-one which is not optimal for the
' case where we have a bunch of partial methods with the same name.
' TODO: revise
While partialMethods.Count > 0
Dim originalPartialMethod As SourceMemberMethodSymbol = partialMethods.First()
partialMethods.Remove(originalPartialMethod)
' The best partial method
Dim bestPartialMethod As SourceMemberMethodSymbol = originalPartialMethod
Dim bestPartialMethodLocation As Location = bestPartialMethod.NonMergedLocation
Debug.Assert(bestPartialMethodLocation IsNot Nothing)
' The best partial method implementation
Dim bestImplMethod As SourceMemberMethodSymbol = Nothing
Dim bestImplLocation As Location = Nothing
' Process the members group by name
Dim memberGroup As ImmutableArray(Of Symbol) = members(originalPartialMethod.Name)
For Each member In memberGroup
Dim candidate As SourceMemberMethodSymbol = TryCast(member, SourceMemberMethodSymbol)
If candidate IsNot Nothing AndAlso candidate IsNot originalPartialMethod AndAlso candidate.MethodKind = MethodKind.Ordinary Then
If ComparePartialMethodSignatures(originalPartialMethod, candidate) Then
' candidate location
Dim candidateLocation As Location = candidate.NonMergedLocation
Debug.Assert(candidateLocation IsNot Nothing)
If partialMethods.Contains(candidate) Then
' partial-partial conflict
partialMethods.Remove(candidate)
' the 'best' partial method is the one with the 'smallest'
' location, we should report errors on the other
Dim candidateIsBigger As Boolean = Me.DeclaringCompilation.CompareSourceLocations(bestPartialMethodLocation, candidateLocation) < 0
Dim reportOnMethod As SourceMemberMethodSymbol = If(candidateIsBigger, candidate, bestPartialMethod)
Dim nameToReport As String = reportOnMethod.Name
diagnostics.Add(ERRID.ERR_OnlyOnePartialMethodAllowed2,
If(candidateIsBigger, candidateLocation, bestPartialMethodLocation),
nameToReport, nameToReport)
reportOnMethod.SuppressDuplicateProcDefDiagnostics = True
' change the best partial method if needed
If Not candidateIsBigger Then
bestPartialMethod = candidate
bestPartialMethodLocation = candidateLocation
End If
ElseIf Not candidate.IsPartial Then
' if there are more than one method
If bestImplMethod Is Nothing Then
bestImplMethod = candidate
bestImplLocation = candidateLocation
Else
' the 'best' implementation method is the one with the 'smallest'
' location, we should report errors on the others
Dim candidateIsBigger = Me.DeclaringCompilation.CompareSourceLocations(bestImplLocation, candidateLocation) < 0
Dim reportOnMethod As SourceMemberMethodSymbol = If(candidateIsBigger, candidate, bestImplMethod)
Dim reportedName As String = reportOnMethod.Name
diagnostics.Add(ERRID.ERR_OnlyOneImplementingMethodAllowed3,
If(candidateIsBigger, candidateLocation, bestImplLocation),
reportedName, reportedName, reportedName)
reportOnMethod.SuppressDuplicateProcDefDiagnostics = True
' change the best implementation if needed
If Not candidateIsBigger Then
bestImplMethod = candidate
bestImplLocation = candidateLocation
End If
End If
End If
' NOTE: the rest of partial methods are already processed, those can be safely ignored
End If
End If
Next
' Report ERR_PartialMethodMustBeEmpty
If bestPartialMethod.BlockSyntax IsNot Nothing AndAlso bestPartialMethod.BlockSyntax.Statements.Count > 0 Then
diagnostics.Add(ERRID.ERR_PartialMethodMustBeEmpty, bestPartialMethodLocation)
End If
If bestImplMethod IsNot Nothing Then
' We found the partial method implementation
' Remove the best implementation from members
' NOTE: conflicting partial method declarations and implementations are NOT removed
Dim newMembers = ArrayBuilder(Of Symbol).GetInstance()
For i = 0 To memberGroup.Length - 1
Dim member As Symbol = memberGroup(i)
If bestImplMethod IsNot member Then
newMembers.Add(member)
End If
Next
members(originalPartialMethod.Name) = newMembers.ToImmutableAndFree()
' Assign implementation to best partial method
SourceMemberMethodSymbol.InitializePartialMethodParts(bestPartialMethod, bestImplMethod)
' Report errors on partial method implementation
ReportErrorsOnPartialMethodImplementation(bestPartialMethod, bestImplMethod, bestImplLocation, diagnostics)
Else
' There is no implementation
SourceMemberMethodSymbol.InitializePartialMethodParts(bestPartialMethod, Nothing)
End If
End While
End Sub
Private Sub ReportErrorsOnPartialMethodImplementation(partialMethod As SourceMethodSymbol,
implMethod As SourceMethodSymbol,
implMethodLocation As Location,
diagnostics As DiagnosticBag)
' Report 'Method '...' must be declared 'Private' in order to implement partial method '...'
If implMethod.DeclaredAccessibility <> Accessibility.Private Then
diagnostics.Add(ERRID.ERR_ImplementationMustBePrivate2,
implMethodLocation,
implMethod.Name, partialMethod.Name)
End If
' Check method parameters' names
If partialMethod.ParameterCount > 0 Then
Debug.Assert(partialMethod.ParameterCount = implMethod.ParameterCount)
Dim declMethodParams As ImmutableArray(Of ParameterSymbol) = partialMethod.Parameters
Dim implMethodParams As ImmutableArray(Of ParameterSymbol) = implMethod.Parameters
For index = 0 To declMethodParams.Length - 1
Dim declParameter As ParameterSymbol = declMethodParams(index)
Dim implParameter As ParameterSymbol = implMethodParams(index)
' Check type parameter name
If Not CaseInsensitiveComparison.Equals(declParameter.Name, implParameter.Name) Then
Debug.Assert(implParameter.Locations.Length = 1)
diagnostics.Add(ERRID.ERR_PartialMethodParamNamesMustMatch3,
implParameter.Locations(0),
implParameter.Name, declParameter.Name, implMethod.Name)
End If
Next
End If
' Generic type names/constraints
If implMethod.Arity > 0 Then
Dim declTypeParams As ImmutableArray(Of TypeParameterSymbol) = partialMethod.TypeParameters
Dim implTypeParams As ImmutableArray(Of TypeParameterSymbol) = implMethod.TypeParameters
Debug.Assert(declTypeParams.Length = implTypeParams.Length)
For index = 0 To declTypeParams.Length - 1
Dim declParameter As TypeParameterSymbol = declTypeParams(index)
Dim implParameter As TypeParameterSymbol = implTypeParams(index)
' Check parameter name
If Not CaseInsensitiveComparison.Equals(declParameter.Name, implParameter.Name) Then
Debug.Assert(implParameter.Locations.Length = 1)
diagnostics.Add(ERRID.ERR_PartialMethodTypeParamNameMismatch3,
implParameter.Locations(0),
implParameter.Name, declParameter.Name, implMethod.Name)
End If
Next
' If type parameters constraints don't match at least on one of type
' parameters, report an error on the implementation method
Dim options = SymbolComparisonResults.ArityMismatch Or SymbolComparisonResults.ConstraintMismatch
If MethodSignatureComparer.DetailedCompare(partialMethod, implMethod, options) <> Nothing Then
diagnostics.Add(ERRID.ERR_PartialMethodGenericConstraints2,
implMethodLocation,
implMethod.Name, partialMethod.Name)
End If
End If
End Sub
''' <summary>
''' Compares two methods to check if the 'candidate' can be an implementation of the 'partialDeclaration'.
''' </summary>
Private Function ComparePartialMethodSignatures(partialDeclaration As SourceMethodSymbol, candidate As SourceMethodSymbol) As Boolean
' Don't check values of optional parameters yet, this might cause an infinite cycle.
' Don't check ParamArray mismatch either, might cause us to bind attributes too early.
Dim comparisons = SymbolComparisonResults.AllMismatches And
Not (SymbolComparisonResults.CallingConventionMismatch Or
SymbolComparisonResults.ConstraintMismatch Or
SymbolComparisonResults.OptionalParameterValueMismatch Or
SymbolComparisonResults.ParamArrayMismatch)
Dim result As SymbolComparisonResults = MethodSignatureComparer.DetailedCompare(partialDeclaration, candidate, comparisons)
If result <> Nothing Then
Return False
End If
' Dev10 also compares EQ_Flags { Shared|Overrides|MustOverride|Overloads }, but ignores 'Overloads'
Return partialDeclaration.IsShared = candidate.IsShared AndAlso
partialDeclaration.IsOverrides = candidate.IsOverrides AndAlso
partialDeclaration.IsMustOverride = candidate.IsMustOverride
End Function
Friend Overrides ReadOnly Property KnownCircularStruct As Boolean
Get
If _lazyStructureCycle = ThreeState.Unknown Then
If Not Me.IsStructureType Then
_lazyStructureCycle = ThreeState.False
Else
Dim diagnostics = DiagnosticBag.GetInstance()
Dim hasCycle = Me.CheckStructureCircularity(diagnostics)
' In either case we use AtomicStoreIntegerAndDiagnostics.
m_containingModule.AtomicStoreIntegerAndDiagnostics(_lazyStructureCycle,
If(hasCycle, ThreeState.True, ThreeState.False),
ThreeState.Unknown,
diagnostics,
CompilationStage.Declare)
diagnostics.Free()
End If
End If
Return _lazyStructureCycle = ThreeState.True
End Get
End Property
''' <summary>
''' Poolable data set to be used in structure circularity detection.
''' </summary>
Private Class StructureCircularityDetectionDataSet
''' <summary>
''' Following C# implementation we keep up to 32 data sets so that we do not need to allocate
''' them over and over. In this implementation though, circularity detection in one type can trigger
''' circularity detection in other types while it traverses the types tree. The traversal is being
''' performed breadth-first, so the number of data sets used by one thread is not longer than the
''' length of the longest structure-in-structure nesting chain.
''' </summary>
Private Shared ReadOnly s_pool As New ObjectPool(Of StructureCircularityDetectionDataSet)(
Function() New StructureCircularityDetectionDataSet(), 32)
''' <summary> Set of processed structure types </summary>
Public ReadOnly ProcessedTypes As HashSet(Of NamedTypeSymbol)
''' <summary> Queue element structure </summary>
Public Structure QueueElement
Public ReadOnly Type As NamedTypeSymbol
Public ReadOnly Path As ConsList(Of FieldSymbol)
Public Sub New(type As NamedTypeSymbol, path As ConsList(Of FieldSymbol))
Debug.Assert(type IsNot Nothing)
Debug.Assert(path IsNot Nothing)
Me.Type = type
Me.Path = path
End Sub
End Structure
''' <summary> Queue of the types to be processed </summary>
Public ReadOnly Queue As Queue(Of QueueElement)
Private Sub New()
ProcessedTypes = New HashSet(Of NamedTypeSymbol)()
Queue = New Queue(Of QueueElement)
End Sub
Public Shared Function GetInstance() As StructureCircularityDetectionDataSet
Return s_pool.Allocate()
End Function
Public Sub Free()
Me.Queue.Clear()
Me.ProcessedTypes.Clear()
s_pool.Free(Me)
End Sub
End Class
''' <summary>
''' Analyzes structure type for circularities. Reports only errors relevant for 'structBeingAnalyzed' type.
''' </summary>
''' <remarks>
''' When VB Dev10 detects circularity it reports the error only once for each cycle. Thus, if the cycle
''' is {S1 --> S2 --> S3 --> S1}, only one error will be reported, which one of S1/S2/S3 will have error
''' is non-deterministic (depends on the order of symbols in a hash table).
'''
''' Moreover, Dev10 analyzes the type graph and reports only one error in case S1 --> S2 --> S1 even if
''' there are two fields referencing S2 from S1.
'''
''' Example:
''' Structure S2
''' Dim s1 As S1
''' End Structure
'''
''' Structure S3
''' Dim s1 As S1
''' End Structure
'''
''' Structure S1
''' Dim s2 As S2 ' ERROR
''' Dim s2_ As S2 ' NO ERROR
''' Dim s3 As S3 ' ERROR
''' End Structure
'''
''' Dev10 also reports only one error for all the cycles starting with the same field, which one is reported
''' depends on the declaration order. Current implementation reports all of the cycles for consistency.
''' See testcases MultiplyCyclesInStructure03 and MultiplyCyclesInStructure04 (report different errors in Dev10).
''' </remarks>
Private Function CheckStructureCircularity(diagnostics As DiagnosticBag) As Boolean
' Must be a structure
Debug.Assert(Me.IsValueType AndAlso Not Me.IsTypeParameter)
' Allocate data set
Dim data = StructureCircularityDetectionDataSet.GetInstance()
data.Queue.Enqueue(New StructureCircularityDetectionDataSet.QueueElement(Me, ConsList(Of FieldSymbol).Empty))
Dim hasCycle = False
Try
While data.Queue.Count > 0
Dim current = data.Queue.Dequeue()
If Not data.ProcessedTypes.Add(current.Type) Then
' In some cases the queue may contain two same types which are not processed yet
Continue While
End If
Dim cycleReportedForCurrentType As Boolean = False
' iterate over non-static fields of structure data type
For Each member In current.Type.GetMembers()
Dim field = TryCast(member, FieldSymbol)
If field IsNot Nothing AndAlso Not field.IsShared Then
Dim fieldType = TryCast(field.Type, NamedTypeSymbol)
If fieldType IsNot Nothing AndAlso fieldType.IsValueType Then
' if the type is constructed from a generic structure, we should
' process ONLY fields which types are instantiated from type arguments
If Not field.IsDefinition AndAlso field.Type.Equals(field.OriginalDefinition.Type) Then
Continue For
End If
If fieldType.OriginalDefinition.Equals(Me) Then
' a cycle detected
If Not cycleReportedForCurrentType Then
' the cycle includes 'current.Path' and ends with 'field'; the order is reversed in the list
Dim cycleFields = New ConsList(Of FieldSymbol)(field, current.Path)
' generate a message info
Dim diagnosticInfos = ArrayBuilder(Of DiagnosticInfo).GetInstance()
Dim firstField As FieldSymbol = Nothing ' after the cycle is processed this will hold the last element in the list
While Not cycleFields.IsEmpty
firstField = cycleFields.Head
' generate next field description
diagnosticInfos.Add(ErrorFactory.ErrorInfo(ERRID.ERR_RecordEmbeds2,
firstField.ContainingType,
firstField.Type,
firstField.Name))
cycleFields = cycleFields.Tail
End While
diagnosticInfos.ReverseContents()
Debug.Assert(firstField IsNot Nothing)
' Report an error
Dim symbolToReportErrorOn As Symbol = If(firstField.AssociatedSymbol, DirectCast(firstField, Symbol))
Debug.Assert(symbolToReportErrorOn.Locations.Length > 0)
diagnostics.Add(ERRID.ERR_RecordCycle2,
symbolToReportErrorOn.Locations(0),
firstField.ContainingType.Name,
New CompoundDiagnosticInfo(diagnosticInfos.ToArrayAndFree()))
' Don't report errors for other fields of this type referencing 'structBeingAnalyzed'
cycleReportedForCurrentType = True
hasCycle = True
End If
ElseIf Not data.ProcessedTypes.Contains(fieldType) Then
' Add to the queue if we don't know yet if it was processed
If Not fieldType.IsDefinition Then
' Types constructed from generic types are considered to be a separate types. We never report
' errors on such types. We also process only fields actually changed compared to original generic type.
data.Queue.Enqueue(New StructureCircularityDetectionDataSet.QueueElement(
fieldType, New ConsList(Of FieldSymbol)(field, current.Path)))
' The original Generic type is added using regular rules (see next note).
fieldType = fieldType.OriginalDefinition
End If
' NOTE: we want to make sure we report the same error for the same types
' consistently and don't depend on the call order; this solution uses
' the following approach:
' (a) for each cycle we report the error only on the type which is
' 'smaller' than the other types in this cycle; the criteria
' used for detection of the 'smallest' type does not matter;
' (b) thus, this analysis only considers the cycles consisting of the
' types which are 'bigger' than 'structBeingAnalyzed' because we will not
' report the error regarding this cycle for this type anyway
Dim stepIntoType As Boolean = DetectTypeCircularity_ShouldStepIntoType(fieldType)
If stepIntoType Then
' enqueue to be processed
data.Queue.Enqueue(New StructureCircularityDetectionDataSet.QueueElement(
fieldType, New ConsList(Of FieldSymbol)(field, current.Path)))
Else
' should not process
data.ProcessedTypes.Add(fieldType)
End If
End If
End If
End If
Next
End While
Finally
data.Free()
End Try
Return hasCycle
End Function
''' <summary>
''' Simple check of whether or not we should step into the type 'typeToTest' during
''' type graph traversal inside 'DetectStructureCircularity' or 'GetDependenceChain'.
'''
''' The following rules are in place:
''' (a) we order all symbols according their first source location
''' comparison rules: first, source file names are compared,
''' then SourceSpan.Start is used for symbols inside the same file;
''' (b) given this order we enter the loop if only 'typeToTest' is 'less' than
''' 'structBeingAnalyzed';
''' (c) we also always enter types from other modules
'''
''' !!! To be ONLY used in 'CheckStructureCircularity'.
''' </summary>
''' <returns>True if detect type circularity code should step into 'typeToTest' type </returns>
Friend Function DetectTypeCircularity_ShouldStepIntoType(typeToTest As NamedTypeSymbol) As Boolean
If typeToTest.ContainingModule Is Nothing OrElse Not typeToTest.ContainingModule.Equals(Me.ContainingModule) Then
' Types from other modules should never be considered target types
Return True
End If
' We use simple comparison based on source location
Debug.Assert(typeToTest.Locations.Length > 0)
Dim typeToTestLocation = typeToTest.Locations(0)
Debug.Assert(Me.Locations.Length > 0)
Dim structBeingAnalyzedLocation = Me.Locations(0)
Dim compilation = Me.DeclaringCompilation
Dim fileCompResult = compilation.CompareSourceLocations(typeToTestLocation, structBeingAnalyzedLocation)
' NOTE: we use '>=' for locations comparison; this is a safeguard against the case where two different
' types are declared in the files with same file name (if possible) and have the same location;
' if we used '>' we would not report the cycle, with '>=' we will report the cycle twice.
Return (fileCompResult > 0) OrElse
((fileCompResult = 0) AndAlso typeToTestLocation.SourceSpan.Start >= structBeingAnalyzedLocation.SourceSpan.Start)
End Function
Private Function DetermineDefaultPropertyName(membersByName As Dictionary(Of String, ImmutableArray(Of Symbol)), diagBag As DiagnosticBag) As String
Dim defaultPropertyName As String = Nothing
For Each pair In membersByName
Dim name = pair.Key
Dim members = pair.Value
Dim defaultProperty As PropertySymbol = Nothing
' Check if any of the properties are marked default.
For Each member In members
If member.Kind = SymbolKind.Property Then
Dim propertySymbol = DirectCast(member, PropertySymbol)
If propertySymbol.IsDefault Then
If defaultPropertyName Is Nothing Then
defaultProperty = propertySymbol
defaultPropertyName = name
If Not defaultProperty.ShadowsExplicitly Then
CheckDefaultPropertyAgainstAllBases(Me, defaultPropertyName, propertySymbol.Locations(0), diagBag)
End If
Else
' "'Default' can be applied to only one property name in a {0}."
diagBag.Add(ERRID.ERR_DuplicateDefaultProps1, propertySymbol.Locations(0), GetKindText())
End If
Exit For
End If
End If
Next
If defaultPropertyName IsNot Nothing AndAlso defaultPropertyName = name Then
Debug.Assert(defaultProperty IsNot Nothing)
' Report an error for any property with this name not marked as default.
For Each member In members
If (member.Kind = SymbolKind.Property) Then
Dim propertySymbol = DirectCast(member, SourcePropertySymbol)
If Not propertySymbol.IsDefault Then
' "'{0}' and '{1}' cannot overload each other because only one is declared 'Default'."
diagBag.Add(ERRID.ERR_DefaultMissingFromProperty2, propertySymbol.Locations(0), defaultProperty, propertySymbol)
End If
End If
Next
End If
Next
Return defaultPropertyName
End Function
' Check all bases of "namedType" and warn if they have a default property named "defaultPropertyName".
Private Sub CheckDefaultPropertyAgainstAllBases(namedType As NamedTypeSymbol, defaultPropertyName As String, location As Location, diagBag As DiagnosticBag)
If namedType.IsInterfaceType() Then
For Each iface In namedType.InterfacesNoUseSiteDiagnostics
CheckDefaultPropertyAgainstBase(defaultPropertyName, iface, location, diagBag)
Next
Else
CheckDefaultPropertyAgainstBase(defaultPropertyName, namedType.BaseTypeNoUseSiteDiagnostics, location, diagBag)
End If
End Sub
' Check and warn if "baseType" has a default property named "defaultProperty Name.
' If "baseType" doesn't have a default property, check its base types.
Private Sub CheckDefaultPropertyAgainstBase(defaultPropertyName As String, baseType As NamedTypeSymbol, location As Location, diagBag As DiagnosticBag)
If baseType IsNot Nothing Then
Dim baseDefaultPropertyName = baseType.DefaultPropertyName
If baseDefaultPropertyName IsNot Nothing Then
If Not CaseInsensitiveComparison.Equals(defaultPropertyName, baseDefaultPropertyName) Then
' BC40007: Default property '{0}' conflicts with the default property '{1}' in the base {2} '{3}'. '{0}' will be the default property
diagBag.Add(ERRID.WRN_DefaultnessShadowed4, location,
defaultPropertyName, baseDefaultPropertyName, baseType.GetKindText(), CustomSymbolDisplayFormatter.ShortErrorName(baseType))
End If
Else
' If this type didn't have a default property name, recursively check base(s) of this base.
' If this type did have a default property name, don't go any further.
CheckDefaultPropertyAgainstAllBases(baseType, defaultPropertyName, location, diagBag)
End If
End If
End Sub
''' <summary>
''' Returns true if at least one of the elements of this list needs to be injected into a
''' constructor because it's not a const or it is a const and it's type is either decimal
''' or date. Non const fields always require a constructor, so this function should be called to
''' determine if a synthesized constructor is needed that is not listed in members list.
''' </summary>
Friend Function AnyInitializerToBeInjectedIntoConstructor(
initializerSet As IEnumerable(Of ImmutableArray(Of FieldOrPropertyInitializer)),
includingNonMetadataConstants As Boolean
) As Boolean
If initializerSet IsNot Nothing Then
For Each initializers In initializerSet
For Each initializer In initializers
Dim fieldOrPropertyArray As ImmutableArray(Of Symbol) = initializer.FieldsOrProperty
If Not fieldOrPropertyArray.IsDefault Then
Debug.Assert(fieldOrPropertyArray.Length > 0)
Dim fieldOrProperty As Symbol = fieldOrPropertyArray.First
If fieldOrProperty.Kind = SymbolKind.Property Then
' All properties require initializers to be injected
Return True
Else
Dim fieldSymbol = DirectCast(fieldOrProperty, FieldSymbol)
If Not fieldSymbol.IsConst OrElse includingNonMetadataConstants AndAlso fieldSymbol.IsConstButNotMetadataConstant Then
Return True
End If
End If
End If
Next
Next
End If
Return False
End Function
''' <summary>
''' Performs a check for overloads/overrides/shadows conflicts, generates diagnostics.
''' </summary>
''' <param name="membersAndInitializers"></param>
''' <param name="diagBag"></param>
''' <remarks></remarks>
Private Sub CheckForOverloadOverridesShadowsClashesInSameType(membersAndInitializers As MembersAndInitializers, diagBag As DiagnosticBag)
For Each member In membersAndInitializers.Members
' list may contain both properties and methods
Dim checkProperties As Boolean = True
Dim checkMethods As Boolean = True
' result
Dim explicitlyShadows As Boolean = False
Dim explicitlyOverloads As Boolean = False
' symbol flags
Dim shadowsExplicitly As Boolean
Dim overloadsExplicitly As Boolean
Dim overridesExplicitly As Boolean
For Each symbol In member.Value
' only ordinary methods
Select Case symbol.Kind
Case SymbolKind.Method
If Not checkMethods Then
Continue For
End If
' skip properties from with this name if any
checkProperties = False
Case SymbolKind.Property
If Not checkProperties Then
Continue For
End If
' skip methods from with this name if any
checkMethods = False
Case Else
' other kind of member cancels the analysis
explicitlyShadows = False
explicitlyOverloads = False
Exit For
End Select
' initialize symbol flags
If (GetExplicitSymbolFlags(symbol, shadowsExplicitly, overloadsExplicitly, overridesExplicitly)) Then
If shadowsExplicitly Then
' if the method/property shadows explicitly the rest of the methods may be skipped
explicitlyShadows = True
Exit For
ElseIf overloadsExplicitly OrElse overridesExplicitly Then
explicitlyOverloads = True
' continue search
End If
End If
Next
' skip the whole name
If explicitlyShadows OrElse explicitlyOverloads Then
' all symbols are SourceMethodSymbol
For Each symbol In member.Value
If (symbol.Kind = SymbolKind.Method AndAlso checkMethods) OrElse (symbol.IsPropertyAndNotWithEvents AndAlso checkProperties) Then
' initialize symbol flags
If (GetExplicitSymbolFlags(symbol, shadowsExplicitly, overloadsExplicitly, overridesExplicitly)) Then
If explicitlyShadows Then
If Not shadowsExplicitly Then
Debug.Assert(symbol.Locations.Length > 0)
diagBag.Add(ERRID.ERR_MustShadow2, symbol.Locations(0), symbol.GetKindText(), symbol.Name)
End If
ElseIf explicitlyOverloads Then
If Not overridesExplicitly AndAlso Not overloadsExplicitly Then
Debug.Assert(symbol.Locations.Length > 0)
diagBag.Add(ERRID.ERR_MustBeOverloads2, symbol.Locations(0), symbol.GetKindText(), symbol.Name)
End If
End If
End If
End If
Next
End If
Next
End Sub
Private Function GetExplicitSymbolFlags(symbol As Symbol, ByRef shadowsExplicitly As Boolean, ByRef overloadsExplicitly As Boolean, ByRef overridesExplicitly As Boolean) As Boolean
Select Case symbol.Kind
Case SymbolKind.Method
Dim sourceMethodSymbol As SourceMethodSymbol = TryCast(symbol, SourceMethodSymbol)
If (sourceMethodSymbol Is Nothing) Then
Return False
End If
shadowsExplicitly = sourceMethodSymbol.ShadowsExplicitly
overloadsExplicitly = sourceMethodSymbol.OverloadsExplicitly
overridesExplicitly = sourceMethodSymbol.OverridesExplicitly
Return sourceMethodSymbol.MethodKind = MethodKind.Ordinary OrElse sourceMethodSymbol.MethodKind = MethodKind.DeclareMethod
Case SymbolKind.Property
Dim sourcePropertySymbol As SourcePropertySymbol = TryCast(symbol, SourcePropertySymbol)
If (sourcePropertySymbol Is Nothing) Then
Return False
End If
shadowsExplicitly = sourcePropertySymbol.ShadowsExplicitly
overloadsExplicitly = sourcePropertySymbol.OverloadsExplicitly
overridesExplicitly = sourcePropertySymbol.OverridesExplicitly
Return True
Case Else
Throw ExceptionUtilities.UnexpectedValue(symbol.Kind)
End Select
End Function
' Declare all the non-type members and put them in a list.
Private Function BuildNonTypeMembers(diagnostics As DiagnosticBag) As MembersAndInitializers
Dim membersBuilder As New MembersAndInitializersBuilder()
AddDeclaredNonTypeMembers(membersBuilder, diagnostics)
' Add the default constructor, if needed.
AddDefaultConstructorIfNeeded(membersBuilder, False, membersBuilder.InstanceInitializers, diagnostics)
' If there is a shared field, a shared constructor must be synthesized and added to the member list.
' Const fields of type Date or Decimal also require a synthesized shared constructor, but there was a decision
' to not add this to the member list in this case.
AddDefaultConstructorIfNeeded(membersBuilder, True, membersBuilder.StaticInitializers, diagnostics)
' If there are any "Handles" methods, optimistically create methods/ctors that would be hosting
' hookup code.
AddWithEventsHookupConstructorsIfNeeded(membersBuilder, diagnostics)
' Add "Group Class" members.
AddGroupClassMembersIfNeeded(membersBuilder, diagnostics)
' Add synthetic Main method, if needed.
AddEntryPointIfNeeded(membersBuilder)
CheckMemberDiagnostics(membersBuilder, diagnostics)
Dim membersAndInitializers = membersBuilder.ToReadOnlyAndFree()
' Check for overloads, overrides, shadows and implicit shadows clashes
CheckForOverloadOverridesShadowsClashesInSameType(membersAndInitializers, diagnostics)
Return membersAndInitializers
End Function
Protected Overridable Sub AddEntryPointIfNeeded(membersBuilder As MembersAndInitializersBuilder)
End Sub
Protected MustOverride Sub AddDeclaredNonTypeMembers(membersBuilder As MembersAndInitializersBuilder, diagnostics As DiagnosticBag)
Protected Overridable Sub AddGroupClassMembersIfNeeded(membersBuilder As MembersAndInitializersBuilder, diagnostics As DiagnosticBag)
End Sub
' Create symbol(s) for member syntax and add them to the member list
Protected Sub AddMember(memberSyntax As StatementSyntax,
binder As Binder,
diagBag As DiagnosticBag,
members As MembersAndInitializersBuilder,
ByRef staticInitializers As ArrayBuilder(Of FieldOrPropertyInitializer),
ByRef instanceInitializers As ArrayBuilder(Of FieldOrPropertyInitializer),
reportAsInvalid As Boolean)
' Currently partial methods are not implemented. Here's my current thinking about the
' right way to implement them:
' There's an accessor on a Method symbol that indicates its fully partial (no definition). After
' calling DeclareMethodMember, we check to see if the signature matches another already defined method.
' If a partial is declared and we already have a method with the same sig, the second partial is ignored and the first
' partial is updated to add the syntax ref from the second.
' If a non-partial is declared and we already have a partial with the same sig, the existing partial is removed
' and its syntax refs are added to the non-partial.
' This should probably be combined with the logic for detecting duplicate signatures in general.
'
' Comparing of signature is a bit tricky when generic methods are taken into account. E.g.:
' f(Of T)(a as T)
' f(Of U)(b as U)
' have the same signature, even though a and b have different types.
' The MethodSignatureComparer class takes care of that, so be sure to use it!
Select Case memberSyntax.Kind
Case SyntaxKind.FieldDeclaration
Dim fieldDecl = DirectCast(memberSyntax, FieldDeclarationSyntax)
If reportAsInvalid Then
diagBag.Add(ERRID.ERR_InvalidInNamespace, fieldDecl.GetLocation())
End If
' Declare all variables that a declared by this syntax, and add them to the list.
SourceMemberFieldSymbol.Create(Me, fieldDecl, binder, members, staticInitializers, instanceInitializers, diagBag)
Case _
SyntaxKind.SubBlock,
SyntaxKind.FunctionBlock,
SyntaxKind.ConstructorBlock,
SyntaxKind.OperatorBlock
Dim methodDecl = DirectCast(memberSyntax, MethodBlockBaseSyntax).BlockStatement
If reportAsInvalid Then
diagBag.Add(ERRID.ERR_InvalidInNamespace, methodDecl.GetLocation())
End If
Dim methodSymbol = CreateMethodMember(methodDecl, binder, diagBag)
If methodSymbol IsNot Nothing Then
AddMember(methodSymbol, binder, members, omitDiagnostics:=False)
End If
Case _
SyntaxKind.SubStatement,
SyntaxKind.FunctionStatement,
SyntaxKind.SubNewStatement,
SyntaxKind.DeclareSubStatement,
SyntaxKind.DeclareFunctionStatement,
SyntaxKind.OperatorStatement
Dim methodDecl = DirectCast(memberSyntax, MethodBaseSyntax)
If reportAsInvalid Then
diagBag.Add(ERRID.ERR_InvalidInNamespace, methodDecl.GetLocation())
End If
Dim methodSymbol = CreateMethodMember(DirectCast(memberSyntax, MethodBaseSyntax), binder, diagBag)
If methodSymbol IsNot Nothing Then
AddMember(methodSymbol, binder, members, omitDiagnostics:=False)
End If
Case SyntaxKind.PropertyBlock
Dim propertyDecl = DirectCast(memberSyntax, PropertyBlockSyntax)
If reportAsInvalid Then
diagBag.Add(ERRID.ERR_InvalidInNamespace, propertyDecl.PropertyStatement.GetLocation())
End If
CreateProperty(propertyDecl.PropertyStatement, propertyDecl, binder, diagBag, members, staticInitializers, instanceInitializers)
Case SyntaxKind.PropertyStatement
Dim propertyDecl = DirectCast(memberSyntax, PropertyStatementSyntax)
If reportAsInvalid Then
diagBag.Add(ERRID.ERR_InvalidInNamespace, propertyDecl.GetLocation())
End If
CreateProperty(propertyDecl, Nothing, binder, diagBag, members, staticInitializers, instanceInitializers)
Case SyntaxKind.LabelStatement
' TODO (tomat): should be added to the initializers
Exit Select
Case SyntaxKind.EventStatement
Dim eventDecl = DirectCast(memberSyntax, EventStatementSyntax)
CreateEvent(eventDecl, Nothing, binder, diagBag, members)
Case SyntaxKind.EventBlock
Dim eventDecl = DirectCast(memberSyntax, EventBlockSyntax)
CreateEvent(eventDecl.EventStatement, eventDecl, binder, diagBag, members)
Case Else
If binder.BindingTopLevelScriptCode Then
If memberSyntax.Kind = SyntaxKind.EmptyStatement OrElse TypeOf memberSyntax Is ExecutableStatementSyntax Then
If reportAsInvalid Then
diagBag.Add(ERRID.ERR_InvalidInNamespace, memberSyntax.GetLocation())
End If
Dim initializer = Function(precedingInitializersLength As Integer)
Return New FieldOrPropertyInitializer(binder.GetSyntaxReference(memberSyntax), precedingInitializersLength)
End Function
SourceNamedTypeSymbol.AddInitializer(instanceInitializers, initializer, members.InstanceSyntaxLength)
End If
End If
End Select
End Sub
Private Sub CreateProperty(syntax As PropertyStatementSyntax,
blockSyntaxOpt As PropertyBlockSyntax,
binder As Binder,
diagBag As DiagnosticBag,
members As MembersAndInitializersBuilder,
ByRef staticInitializers As ArrayBuilder(Of FieldOrPropertyInitializer),
ByRef instanceInitializers As ArrayBuilder(Of FieldOrPropertyInitializer))
Dim propertySymbol = SourcePropertySymbol.Create(Me, binder, syntax, blockSyntaxOpt, diagBag)
AddPropertyAndAccessors(propertySymbol, binder, members)
' initialization can happen because of a "= value" (InitializerOpt) or a "As New Type(...)" (AsClauseOpt)
Dim initializerOpt = syntax.Initializer
Dim asClauseOpt = syntax.AsClause
Dim equalsValueOrAsNewSyntax As VisualBasicSyntaxNode
If asClauseOpt IsNot Nothing AndAlso asClauseOpt.Kind = SyntaxKind.AsNewClause Then
equalsValueOrAsNewSyntax = asClauseOpt
Else
equalsValueOrAsNewSyntax = initializerOpt
End If
If equalsValueOrAsNewSyntax IsNot Nothing Then
Dim initializerOptRef = binder.GetSyntaxReference(equalsValueOrAsNewSyntax)
Dim initializer = Function(precedingInitializersLength As Integer)
Return New FieldOrPropertyInitializer(propertySymbol, initializerOptRef, precedingInitializersLength)
End Function
If propertySymbol.IsShared Then
AddInitializer(staticInitializers, initializer, members.StaticSyntaxLength)
Else
' auto implemented properties inside of structures can only have an initialization value
' if they are shared.
If propertySymbol.IsAutoProperty AndAlso
propertySymbol.ContainingType.TypeKind = TypeKind.Structure Then
Binder.ReportDiagnostic(diagBag, syntax.Identifier, ERRID.ERR_AutoPropertyInitializedInStructure)
End If
AddInitializer(instanceInitializers, initializer, members.InstanceSyntaxLength)
End If
End If
End Sub
Private Sub CreateEvent(syntax As EventStatementSyntax,
blockSyntaxOpt As EventBlockSyntax,
binder As Binder,
diagBag As DiagnosticBag,
members As MembersAndInitializersBuilder)
Dim propertySymbol = New SourceEventSymbol(Me, binder, syntax, blockSyntaxOpt, diagBag)
AddEventAndAccessors(propertySymbol, binder, members)
End Sub
Private Function CreateMethodMember(methodBaseSyntax As MethodBaseSyntax,
binder As Binder,
diagBag As DiagnosticBag) As SourceMethodSymbol
Select Case methodBaseSyntax.Kind
Case SyntaxKind.SubStatement, SyntaxKind.FunctionStatement
Return SourceMethodSymbol.CreateRegularMethod(Me, DirectCast(methodBaseSyntax, MethodStatementSyntax), binder, diagBag)
Case SyntaxKind.SubNewStatement
Return SourceMethodSymbol.CreateConstructor(Me, DirectCast(methodBaseSyntax, SubNewStatementSyntax), binder, diagBag)
Case SyntaxKind.OperatorStatement
Return SourceMethodSymbol.CreateOperator(Me, DirectCast(methodBaseSyntax, OperatorStatementSyntax), binder, diagBag)
Case SyntaxKind.DeclareSubStatement, SyntaxKind.DeclareFunctionStatement
Return SourceMethodSymbol.CreateDeclareMethod(Me, DirectCast(methodBaseSyntax, DeclareStatementSyntax), binder, diagBag)
Case Else
Throw ExceptionUtilities.UnexpectedValue(methodBaseSyntax.Kind)
End Select
End Function
''' <summary>
''' Check to see if we need a default instance|shared constructor, and if so, create it.
'''
''' NOTE: we only need a shared constructor if there are any initializers to be
''' injected into it, we don't create a constructor otherwise. In this case we also
''' ignore const fields which will still require to be injected, because in this case
''' we don't see the constructor to be visible in symbol table.
''' </summary>
Private Sub AddDefaultConstructorIfNeeded(members As MembersAndInitializersBuilder,
isShared As Boolean,
initializers As ArrayBuilder(Of ImmutableArray(Of FieldOrPropertyInitializer)),
diagnostics As DiagnosticBag)
If TypeKind = TypeKind.Submission Then
' Only add an constructor if it is not shared OR if there are shared initializers
If Not isShared OrElse Me.AnyInitializerToBeInjectedIntoConstructor(initializers, False) Then
' a submission can only have a single declaration:
Dim syntaxRef = SyntaxReferences.Single()
Dim binder As Binder = BinderBuilder.CreateBinderForType(m_containingModule, syntaxRef.SyntaxTree, Me)
Dim constructor As New SynthesizedSubmissionConstructorSymbol(syntaxRef, Me, isShared, binder, diagnostics)
AddMember(constructor, binder, members, omitDiagnostics:=False)
End If
ElseIf TypeKind = TypeKind.Class OrElse
TypeKind = TypeKind.Structure OrElse
TypeKind = TypeKind.Enum OrElse
(TypeKind = TypeKind.Module AndAlso isShared) Then
' Do we need to create a constructor? We need a constructor if this is
' an instance constructor, or if this is a shared constructor and
' there is at least one non-constant initializers
Dim anyInitializersToInject As Boolean =
Me.AnyInitializerToBeInjectedIntoConstructor(initializers, Not isShared)
' NOTE: for shared constructor we DO NOT check for non-metadata-const
' initializers, those will be addressed later
If isShared AndAlso Not anyInitializersToInject Then
Return
End If
Dim isDebuggable As Boolean = anyInitializersToInject
EnsureCtor(members, isShared, isDebuggable, diagnostics)
End If
If Not isShared AndAlso IsScriptClass Then
' a submission can only have a single declaration:
Dim syntaxRef = SyntaxReferences.Single()
Dim scriptInitializer = New SynthesizedInteractiveInitializerMethod(syntaxRef, Me, diagnostics)
AddSymbolToMembers(scriptInitializer, members.Members)
Dim scriptEntryPoint = SynthesizedEntryPointSymbol.Create(Me, scriptInitializer.ReturnType, diagnostics)
AddSymbolToMembers(scriptEntryPoint, members.Members)
End If
End Sub
Private Sub EnsureCtor(members As MembersAndInitializersBuilder, isShared As Boolean, isDebuggable As Boolean, diagBag As DiagnosticBag)
Dim constructorName = If(isShared, WellKnownMemberNames.StaticConstructorName, WellKnownMemberNames.InstanceConstructorName)
' Check to see if we have already declared an instance|shared constructor.
Dim symbols As ArrayBuilder(Of Symbol) = Nothing
If members.Members.TryGetValue(constructorName, symbols) Then
Debug.Assert(symbols.Where(Function(sym) sym.Kind = SymbolKind.Method AndAlso
(DirectCast(sym, MethodSymbol).MethodKind = MethodKind.Constructor OrElse
DirectCast(sym, MethodSymbol).MethodKind = MethodKind.SharedConstructor)
).Any)
For Each method As MethodSymbol In symbols
If method.MethodKind = MethodKind.Constructor AndAlso method.ParameterCount = 0 Then
Return ' definitely don't need to synthesize a constructor
End If
Next
' have to synthesize a constructor if this is a non-shared struct
If TypeKind <> TypeKind.Structure OrElse isShared Then
Return ' already have an instance|shared constructor. Don't add another one.
End If
End If
' Add a new instance|shared constructor.
Dim syntaxRef = SyntaxReferences.First() ' use arbitrary part
' TODO: does it need to be deterministic?
Dim binder As Binder = BinderBuilder.CreateBinderForType(m_containingModule, syntaxRef.SyntaxTree, Me)
Dim constructor As New SynthesizedConstructorSymbol(syntaxRef, Me, isShared, isDebuggable, binder, diagBag)
AddMember(constructor, binder, members, omitDiagnostics:=False)
End Sub
Private Sub AddWithEventsHookupConstructorsIfNeeded(members As MembersAndInitializersBuilder, diagBag As DiagnosticBag)
If TypeKind = TypeKind.Submission Then
'TODO: anything to do here?
ElseIf TypeKind = TypeKind.Class OrElse TypeKind = TypeKind.Module Then
' we need a separate list of methods since we may need to modify the members dictionary.
Dim sourceMethodsWithHandles As ArrayBuilder(Of SourceMethodSymbol) = Nothing
For Each membersOfSameName In members.Members.Values
For Each member In membersOfSameName
Dim sourceMethod = TryCast(member, SourceMethodSymbol)
If sourceMethod IsNot Nothing Then
If Not sourceMethod.HandlesEvents Then
Continue For
End If
If sourceMethodsWithHandles Is Nothing Then
sourceMethodsWithHandles = ArrayBuilder(Of SourceMethodSymbol).GetInstance
End If
sourceMethodsWithHandles.Add(sourceMethod)
End If
Next
Next
If sourceMethodsWithHandles Is Nothing Then
' no source methods with Handles - we are done
Return
End If
' binder used if we need to find something in the base. will be created when needed
Dim baseBinder As Binder = Nothing
For Each sourceMethod In sourceMethodsWithHandles
Dim methodStatement = DirectCast(sourceMethod.DeclarationSyntax, MethodStatementSyntax)
For Each handlesClause In methodStatement.HandlesClause.Events
If handlesClause.EventContainer.Kind = SyntaxKind.KeywordEventContainer Then
If Not sourceMethod.IsShared Then
' if the method is not shared, we will be hooking up in the instance ctor
EnsureCtor(members, isShared:=False, isDebuggable:=False, diagBag:=diagBag)
Else
' if both event and handler are shared, then hookup goes into shared ctor
' otherwise into instance ctor
' find our event
Dim eventName = handlesClause.EventMember.Identifier.ValueText
Dim eventSym As EventSymbol = Nothing
' look in current members
If handlesClause.EventContainer.Kind <> SyntaxKind.MyBaseKeyword Then
Dim candidates As ArrayBuilder(Of Symbol) = Nothing
If members.Members.TryGetValue(eventName, candidates) Then
If candidates.Count = 1 AndAlso candidates(0).Kind = SymbolKind.Event Then
eventSym = DirectCast(candidates(0), EventSymbol)
End If
End If
End If
' try find in base
If eventSym Is Nothing Then
' Set up a binder.
baseBinder = If(baseBinder, BinderBuilder.CreateBinderForType(m_containingModule, methodStatement.SyntaxTree, Me))
Dim useSiteDiagnostics As HashSet(Of DiagnosticInfo) = Nothing
eventSym = SourceMemberMethodSymbol.FindEvent(Me.BaseTypeNoUseSiteDiagnostics, baseBinder, eventName, isThroughMyBase:=True, useSiteDiagnostics:=useSiteDiagnostics)
diagBag.Add(handlesClause.EventMember, useSiteDiagnostics)
End If
' still nothing?
If eventSym Is Nothing Then
Continue For
End If
EnsureCtor(members, eventSym.IsShared, isDebuggable:=False, diagBag:=diagBag)
End If
End If
Next
Next
sourceMethodsWithHandles.Free()
End If
End Sub
Private Sub AddPropertyAndAccessors(propertySymbol As SourcePropertySymbol,
binder As Binder,
members As MembersAndInitializersBuilder)
AddMember(propertySymbol, binder, members, omitDiagnostics:=False)
If propertySymbol.GetMethod IsNot Nothing Then
AddMember(propertySymbol.GetMethod, binder, members, omitDiagnostics:=False)
End If
If propertySymbol.SetMethod IsNot Nothing Then
AddMember(propertySymbol.SetMethod, binder, members, omitDiagnostics:=False)
End If
If propertySymbol.AssociatedField IsNot Nothing Then
AddMember(propertySymbol.AssociatedField, binder, members, omitDiagnostics:=False)
End If
End Sub
Private Sub AddEventAndAccessors(eventSymbol As SourceEventSymbol,
binder As Binder,
members As MembersAndInitializersBuilder)
AddMember(eventSymbol, binder, members, omitDiagnostics:=False)
If eventSymbol.AddMethod IsNot Nothing Then
AddMember(eventSymbol.AddMethod, binder, members, omitDiagnostics:=False)
End If
If eventSymbol.RemoveMethod IsNot Nothing Then
AddMember(eventSymbol.RemoveMethod, binder, members, omitDiagnostics:=False)
End If
If eventSymbol.RaiseMethod IsNot Nothing Then
AddMember(eventSymbol.RaiseMethod, binder, members, omitDiagnostics:=False)
End If
If eventSymbol.AssociatedField IsNot Nothing Then
AddMember(eventSymbol.AssociatedField, binder, members, omitDiagnostics:=False)
End If
End Sub
Private Sub CheckMemberDiagnostics(
members As MembersAndInitializersBuilder,
diagBag As DiagnosticBag)
If Me.Locations.Length > 1 AndAlso Not Me.IsPartial Then
' Suppress conflict member diagnostics when the enclosing type is an accidental duplicate
Return
End If
For Each pair In members.DeferredMemberDiagnostic
Dim sym As Symbol = pair.Item1
Dim binder As Binder = pair.Item2
' Check name for duplicate type declarations
' First check if the member name conflicts with a type declaration in the container then
' Check if the member name conflicts with another member in the container.
If Not CheckIfMemberNameConflictsWithTypeMember(sym, members, diagBag) Then
CheckIfMemberNameIsDuplicate(sym, diagBag, members)
End If
If sym.CanBeReferencedByName AndAlso
TypeParameters.MatchesAnyName(sym.Name) Then
If sym.IsImplicitlyDeclared Then
Dim symImplicitlyDefinedBy = sym.ImplicitlyDefinedBy(members.Members)
Debug.Assert(symImplicitlyDefinedBy IsNot Nothing)
' "{0} '{1}' implicitly defines a member '{2}' which has the same name as a type parameter."
Binder.ReportDiagnostic(diagBag,
symImplicitlyDefinedBy.Locations(0),
ERRID.ERR_SyntMemberShadowsGenericParam3,
symImplicitlyDefinedBy.GetKindText(),
symImplicitlyDefinedBy.Name,
sym.Name)
Else
' "'{0}' has the same name as a type parameter."
Binder.ReportDiagnostic(diagBag, sym.Locations(0), ERRID.ERR_ShadowingGenericParamWithMember1, sym.Name)
End If
End If
Next
End Sub
Friend Sub AddMember(sym As Symbol,
binder As Binder,
members As MembersAndInitializersBuilder,
omitDiagnostics As Boolean)
If Not omitDiagnostics Then
members.DeferredMemberDiagnostic.Add(ValueTuple.Create(sym, binder))
End If
AddSymbolToMembers(sym, members.Members)
End Sub
Friend Sub AddSymbolToMembers(memberSymbol As Symbol,
members As Dictionary(Of String, ArrayBuilder(Of Symbol)))
Dim symbols As ArrayBuilder(Of Symbol) = Nothing
If members.TryGetValue(memberSymbol.Name, symbols) Then
symbols.Add(memberSymbol)
Else
symbols = New ArrayBuilder(Of Symbol)
symbols.Add(memberSymbol)
members(memberSymbol.Name) = symbols
End If
End Sub
Private Function CheckIfMemberNameConflictsWithTypeMember(sym As Symbol,
members As MembersAndInitializersBuilder,
diagBag As DiagnosticBag) As Boolean
' Check name for conflicts with type members
Dim definedTypes = Me.GetTypeMembers(sym.Name)
If definedTypes.Length > 0 Then
Dim type = definedTypes(0)
If sym <> type Then
Return CheckIfMemberNameIsDuplicate(sym, type, members, diagBag, includeKind:=True)
End If
End If
Return False
End Function
Private Function CheckIfMemberNameIsDuplicate(sym As Symbol,
diagBag As DiagnosticBag,
members As MembersAndInitializersBuilder) As Boolean
' Check name for duplicate declarations
Dim definedSymbols As ArrayBuilder(Of Symbol) = Nothing
If members.Members.TryGetValue(sym.Name, definedSymbols) Then
Debug.Assert(definedSymbols.Count > 0)
Dim other = definedSymbols(0)
If (sym <> other) Then
Return CheckIfMemberNameIsDuplicate(sym, other, members, diagBag, includeKind:=False)
End If
End If
Return False
End Function
Private Function CheckIfMemberNameIsDuplicate(firstSymbol As Symbol,
secondSymbol As Symbol,
members As MembersAndInitializersBuilder,
diagBag As DiagnosticBag,
includeKind As Boolean) As Boolean
Dim firstAssociatedSymbol = secondSymbol.ImplicitlyDefinedBy(members.Members)
If firstAssociatedSymbol Is Nothing AndAlso secondSymbol.IsUserDefinedOperator() Then
' For the purpose of this check, operator methods are treated as implicitly defined by themselves.
firstAssociatedSymbol = secondSymbol
End If
Dim secondAssociatedSymbol = firstSymbol.ImplicitlyDefinedBy(members.Members)
If secondAssociatedSymbol Is Nothing AndAlso firstSymbol.IsUserDefinedOperator() Then
' For the purpose of this check, operator methods are treated as implicitly defined by themselves.
secondAssociatedSymbol = firstSymbol
End If
If firstAssociatedSymbol IsNot Nothing Then
If secondAssociatedSymbol Is Nothing Then
Dim asType = TryCast(firstAssociatedSymbol, TypeSymbol)
If asType IsNot Nothing AndAlso asType.IsEnumType Then
' enum members may conflict only with __Value and that produces a special diagnostics.
Return True
End If
' "{0} '{1}' implicitly defines '{2}', which conflicts with a member of the same name in {3} '{4}'."
Binder.ReportDiagnostic(
diagBag,
firstAssociatedSymbol.Locations(0),
ERRID.ERR_SynthMemberClashesWithMember5,
firstAssociatedSymbol.GetKindText(),
OverrideHidingHelper.AssociatedSymbolName(firstAssociatedSymbol),
secondSymbol.Name,
Me.GetKindText(),
Me.Name)
Return True
Else
' If both symbols are implicitly defined (say an overloaded property P where each
' overload implicitly defines get_P), no error is reported.
' If there are any errors in cases if defining members have same names.
' In such cases, the errors should be reported on the defining symbols.
If Not CaseInsensitiveComparison.Equals(firstAssociatedSymbol.Name,
secondAssociatedSymbol.Name) Then
'{0} '{1}' implicitly defines '{2}', which conflicts with a member implicitly declared for {3} '{4}' in {5} '{6}'.
Binder.ReportDiagnostic(
diagBag,
firstAssociatedSymbol.Locations(0),
ERRID.ERR_SynthMemberClashesWithSynth7,
firstAssociatedSymbol.GetKindText(),
OverrideHidingHelper.AssociatedSymbolName(firstAssociatedSymbol),
secondSymbol.Name,
secondAssociatedSymbol.GetKindText(),
OverrideHidingHelper.AssociatedSymbolName(secondAssociatedSymbol),
Me.GetKindText(),
Me.Name)
End If
End If
ElseIf secondAssociatedSymbol IsNot Nothing Then
' "{0} '{1}' conflicts with a member implicitly declared for {2} '{3}' in {4} '{5}'."
Binder.ReportDiagnostic(
diagBag,
secondSymbol.Locations(0),
ERRID.ERR_MemberClashesWithSynth6,
secondSymbol.GetKindText(),
secondSymbol.Name,
secondAssociatedSymbol.GetKindText(),
OverrideHidingHelper.AssociatedSymbolName(secondAssociatedSymbol),
Me.GetKindText(),
Me.Name)
Return True
ElseIf ((firstSymbol.Kind <> SymbolKind.Method) AndAlso (Not firstSymbol.IsPropertyAndNotWithEvents)) OrElse
(firstSymbol.Kind <> secondSymbol.Kind) Then
If Me.IsEnumType() Then
' For Enum members, give more specific simpler errors.
' "'{0}' is already declared in this {1}."
Binder.ReportDiagnostic(
diagBag,
firstSymbol.Locations(0),
ERRID.ERR_MultiplyDefinedEnumMember2,
firstSymbol.Name,
Me.GetKindText())
Else
' the formatting of this error message is quite special and needs special treatment
' e.g. 'foo' is already declared as 'Class Foo' in this class.
' "'{0}' is already declared as '{1}' in this {2}."
Binder.ReportDiagnostic(
diagBag,
firstSymbol.Locations(0),
ERRID.ERR_MultiplyDefinedType3,
firstSymbol.Name,
If(includeKind,
DirectCast(CustomSymbolDisplayFormatter.ErrorNameWithKind(secondSymbol), Object),
secondSymbol),
Me.GetKindText())
End If
Return True
End If
Return False
End Function
Public Overrides ReadOnly Property MemberNames As IEnumerable(Of String)
Get
Return _declaration.MemberNames
End Get
End Property
Friend Overrides Function GetMembersUnordered() As ImmutableArray(Of Symbol)
If _lazyMembersFlattened.IsDefault Then
Dim lookup = Me.MemberAndInitializerLookup
Dim result = lookup.Members.Flatten(Nothing) ' Do Not sort right now.
ImmutableInterlocked.InterlockedInitialize(Me._lazyMembersFlattened, result)
End If
#If DEBUG Then
' In DEBUG, swap first And last elements so that use of Unordered in a place it isn't warranted is caught
' more obviously.
Return _lazyMembersFlattened.DeOrder()
#Else
Return _lazyMembersFlattened
#End If
End Function
Public Overloads Overrides Function GetMembers() As ImmutableArray(Of Symbol)
If (m_lazyState And StateFlags.FlattenedMembersIsSortedMask) <> 0 Then
Return _lazyMembersFlattened
Else
Dim allMembers = Me.GetMembersUnordered()
If allMembers.Length >= 2 Then
allMembers = allMembers.Sort(LexicalOrderSymbolComparer.Instance)
ImmutableInterlocked.InterlockedExchange(_lazyMembersFlattened, allMembers)
End If
ThreadSafeFlagOperations.Set(m_lazyState, StateFlags.FlattenedMembersIsSortedMask)
Return allMembers
End If
End Function
Public Overloads Overrides Function GetMembers(name As String) As ImmutableArray(Of Symbol)
Dim lookup = Me.MemberAndInitializerLookup
Dim members As ImmutableArray(Of Symbol) = Nothing
If lookup.Members.TryGetValue(name, members) Then
Return members
End If
Return ImmutableArray(Of Symbol).Empty
End Function
Friend Overrides Function GetSimpleNonTypeMembers(name As String) As ImmutableArray(Of Symbol)
If _lazyMembersAndInitializers IsNot Nothing OrElse MemberNames.Contains(name) Then
Return GetMembers(name)
End If
Return ImmutableArray(Of Symbol).Empty
End Function
''' <summary>
''' In case the passed initializers require a shared constructor, this method returns a new MethodSymbol instance for the
''' shared constructor if there is not already an explicit shared constructor
''' </summary>
Friend Function CreateSharedConstructorsForConstFieldsIfRequired(binder As Binder, diagnostics As DiagnosticBag) As MethodSymbol
Dim lookup = Me.MemberAndInitializerLookup
Dim staticInitializers = lookup.StaticInitializers
If Not staticInitializers.IsDefaultOrEmpty Then
Dim symbols As ImmutableArray(Of Symbol) = Nothing
If Not MemberAndInitializerLookup.Members.TryGetValue(WellKnownMemberNames.StaticConstructorName, symbols) Then
' call AnyInitializerToBeInjectedIntoConstructor if only there is no static constructor
If Me.AnyInitializerToBeInjectedIntoConstructor(staticInitializers, True) Then
Dim syntaxRef = SyntaxReferences.First() ' use arbitrary part
Return New SynthesizedConstructorSymbol(syntaxRef, Me,
isShared:=True, isDebuggable:=True,
binder:=binder, diagnostics:=diagnostics)
End If
End If
End If
Return Nothing
End Function
Friend Overrides Iterator Function GetFieldsToEmit() As IEnumerable(Of FieldSymbol)
For Each member In GetMembersForCci()
If member.Kind = SymbolKind.Field Then
Yield DirectCast(member, FieldSymbol)
End If
Next
End Function
''' <summary>
''' Gets the static initializers.
''' </summary>
Public ReadOnly Property StaticInitializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer))
Get
Return Me.MemberAndInitializerLookup.StaticInitializers
End Get
End Property
''' <summary>
''' Gets the instance initializers.
''' </summary>
Public ReadOnly Property InstanceInitializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer))
Get
Return Me.MemberAndInitializerLookup.InstanceInitializers
End Get
End Property
Friend Function CalculateSyntaxOffsetInSynthesizedConstructor(position As Integer, tree As SyntaxTree, isShared As Boolean) As Integer
If IsScriptClass AndAlso Not isShared Then
Dim aggregateLength As Integer = 0
For Each declaration In Me._declaration.Declarations
Dim syntaxRef = declaration.SyntaxReference
If tree Is syntaxRef.SyntaxTree Then
Return aggregateLength + position
End If
aggregateLength += syntaxRef.Span.Length
Next
' This point should not be reachable.
Throw ExceptionUtilities.Unreachable
End If
Dim syntaxOffset As Integer
If TryCalculateSyntaxOffsetOfPositionInInitializer(position, tree, isShared, syntaxOffset:=syntaxOffset) Then
Return syntaxOffset
End If
' This point should not be reachable. An implicit constructor has no body and no initializer,
' so the variable has to be declared in a member initializer.
Throw ExceptionUtilities.Unreachable
End Function
' Calculates a syntax offset of a syntax position that is contained in a property or field initializer (if it is in fact contained in one).
Friend Function TryCalculateSyntaxOffsetOfPositionInInitializer(position As Integer, tree As SyntaxTree, isShared As Boolean, ByRef syntaxOffset As Integer) As Boolean
Dim membersAndInitializers = GetMembersAndInitializers()
Dim allInitializers = If(isShared, membersAndInitializers.StaticInitializers, membersAndInitializers.InstanceInitializers)
Dim siblingInitializers = GetInitializersInSourceTree(tree, allInitializers)
Dim index = IndexOfInitializerContainingPosition(siblingInitializers, position)
If index < 0 Then
syntaxOffset = 0
Return False
End If
' |<-----------distanceFromCtorBody---------->|
' [ initializer 0 ][ initializer 1 ][ initializer 2 ][ initializer 3 ][ctor body]
' |<--preceding init len-->| ^
' position
Dim initializersLength = If(isShared, membersAndInitializers.StaticInitializersSyntaxLength, membersAndInitializers.InstanceInitializersSyntaxLength)
Dim distanceFromInitializerStart = position - siblingInitializers(index).Syntax.Span.Start
Dim distanceFromCtorBody = initializersLength - (siblingInitializers(index).PrecedingInitializersLength + distanceFromInitializerStart)
Debug.Assert(distanceFromCtorBody > 0)
' syntax offset 0 is at the start of the ctor body:
syntaxOffset = -distanceFromCtorBody
Return True
End Function
Private Shared Function GetInitializersInSourceTree(tree As SyntaxTree, initializers As ImmutableArray(Of ImmutableArray(Of FieldOrPropertyInitializer))) As ImmutableArray(Of FieldOrPropertyInitializer)
Dim builder = ArrayBuilder(Of FieldOrPropertyInitializer).GetInstance()
For Each siblingInitializers As ImmutableArray(Of FieldOrPropertyInitializer) In initializers
If (siblingInitializers.First().Syntax.SyntaxTree Is tree) Then
builder.AddRange(siblingInitializers)
End If
Next
Return builder.ToImmutableAndFree()
End Function
Private Shared Function IndexOfInitializerContainingPosition(initializers As ImmutableArray(Of FieldOrPropertyInitializer), position As Integer) As Integer
' Search for the start of the span (the spans are non-overlapping and sorted)
Dim index = initializers.BinarySearch(position, Function(initializer, pos) initializer.Syntax.Span.Start.CompareTo(pos))
' Binary search returns non-negative result if the position is exactly the start of some span.
If index >= 0 Then
Return index
End If
' Otherwise, "Not index" is the closest span whose start is greater than the position.
' Make sure that this closest span contains the position.
index = (Not index) - 1
If index >= 0 AndAlso initializers(index).Syntax.Span.Contains(position) Then
Return index
End If
Return -1
End Function
Public Overrides ReadOnly Property MightContainExtensionMethods As Boolean
Get
' Only Modules can declare extension methods.
If _lazyContainsExtensionMethods = ThreeState.Unknown Then
If Not (_containingSymbol.Kind = SymbolKind.Namespace AndAlso Me.AllowsExtensionMethods() AndAlso Me.AnyMemberHasAttributes) Then
_lazyContainsExtensionMethods = ThreeState.False
End If
End If
Return _lazyContainsExtensionMethods <> ThreeState.False
End Get
End Property
Friend Overrides Sub BuildExtensionMethodsMap(map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol)),
appendThrough As NamespaceSymbol)
If Me.MightContainExtensionMethods Then
Dim lookup = Me.MemberAndInitializerLookup
If Not appendThrough.BuildExtensionMethodsMap(map, lookup.Members) Then
' Didn't find any extension methods, record the fact.
_lazyContainsExtensionMethods = ThreeState.False
End If
End If
End Sub
Friend Overrides Sub AddExtensionMethodLookupSymbolsInfo(nameSet As LookupSymbolsInfo,
options As LookupOptions,
originalBinder As Binder,
appendThrough As NamedTypeSymbol)
If Me.MightContainExtensionMethods Then
Dim lookup = Me.MemberAndInitializerLookup
If Not appendThrough.AddExtensionMethodLookupSymbolsInfo(nameSet, options, originalBinder, lookup.Members) Then
' Didn't find any extension methods, record the fact.
_lazyContainsExtensionMethods = ThreeState.False
End If
End If
End Sub
' Build the explicit interface map for this type.
'
' Also diagnoses the following errors and places diagnostics in the diagnostic bag:
' Same symbol implemented twice
' Interface symbol that should have been implemented wasn't.
' Generic interfaces might unify.
Private Function MakeExplicitInterfaceImplementationMap(diagnostics As DiagnosticBag) As Dictionary(Of Symbol, Symbol)
If Me.IsClassType() OrElse Me.IsStructureType() OrElse Me.IsInterfaceType() Then
CheckInterfaceUnificationAndVariance(diagnostics)
End If
If Me.IsClassType() OrElse Me.IsStructureType() Then
' Go through all explicit interface implementations and record them.
Dim map = New Dictionary(Of Symbol, Symbol)()
For Each implementingMember In Me.GetMembers()
For Each interfaceMember In GetExplicitInterfaceImplementations(implementingMember)
If Not map.ContainsKey(interfaceMember) Then
map.Add(interfaceMember, implementingMember)
Else
'the same symbol was implemented twice.
If ShouldReportImplementationError(interfaceMember) Then
Dim diag = ErrorFactory.ErrorInfo(ERRID.ERR_MethodAlreadyImplemented2,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(interfaceMember.ContainingType),
CustomSymbolDisplayFormatter.ShortErrorName(interfaceMember))
diagnostics.Add(New VBDiagnostic(diag, GetImplementingLocation(implementingMember, interfaceMember)))
End If
End If
Next
Next
' Check to make sure all members of interfaces were implemented. Note that if our base class implemented
' an interface, we do not have to implemented those members again (although we can).
For Each iface In InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics
' Only check interfaces that our base type does NOT implement.
If Not Me.BaseTypeNoUseSiteDiagnostics.ImplementsInterface(iface, useSiteDiagnostics:=Nothing) Then
For Each ifaceMember In iface.GetMembers()
If ifaceMember.RequiresImplementation() AndAlso ShouldReportImplementationError(ifaceMember) Then
Dim implementingMember As Symbol = Nothing
Dim useSiteErrorInfo = ifaceMember.GetUseSiteErrorInfo()
If Not map.TryGetValue(ifaceMember, implementingMember) Then
'member was not implemented.
Dim diag = If(useSiteErrorInfo, ErrorFactory.ErrorInfo(ERRID.ERR_UnimplementedMember3,
If(Me.IsStructureType(), "Structure", "Class"),
CustomSymbolDisplayFormatter.ShortErrorName(Me),
ifaceMember,
CustomSymbolDisplayFormatter.ShortNameWithTypeArgs(iface)))
diagnostics.Add(New VBDiagnostic(diag, GetImplementsLocation(iface)))
Else
If useSiteErrorInfo IsNot Nothing Then
diagnostics.Add(New VBDiagnostic(useSiteErrorInfo, implementingMember.Locations(0)))
End If
End If
End If
Next
End If
Next
If map.Count > 0 Then
Return map
Else
Return EmptyExplicitImplementationMap ' Better to use singleton and garbage collection the empty dictionary we just created.
End If
Else
Return EmptyExplicitImplementationMap
End If
End Function
' Should we report implementation errors for this member?
' We don't report errors on accessors, because we already report the errors on their containing property/event.
Private Function ShouldReportImplementationError(interfaceMember As Symbol) As Boolean
If interfaceMember.Kind = SymbolKind.Method AndAlso DirectCast(interfaceMember, MethodSymbol).MethodKind <> MethodKind.Ordinary Then
Return False
Else
Return True
End If
End Function
' Get a dictionary with all the explicitly implemented interface symbols declared on this type. key = interface
' method/property/event, value = explicitly implementing method/property/event declared on this type
'
' Getting this property also ensures that diagnostics relating to interface implementation, overriding, hiding and
' overloading are created.
Friend Overrides ReadOnly Property ExplicitInterfaceImplementationMap As Dictionary(Of Symbol, Symbol)
Get
If m_lazyExplicitInterfaceImplementationMap Is Nothing Then
Dim diagnostics As DiagnosticBag = DiagnosticBag.GetInstance()
Dim implementationMap = MakeExplicitInterfaceImplementationMap(diagnostics)
OverrideHidingHelper.CheckHidingAndOverridingForType(Me, diagnostics)
' checking the overloads accesses the parameter types. The parameters are now lazily created to not happen at
' method/property symbol creation time. That's the reason why this check is delayed until here.
CheckForOverloadsErrors(diagnostics)
m_containingModule.AtomicStoreReferenceAndDiagnostics(m_lazyExplicitInterfaceImplementationMap, implementationMap, diagnostics, CompilationStage.Declare)
diagnostics.Free()
End If
Return m_lazyExplicitInterfaceImplementationMap
End Get
End Property
''' <summary>
''' Reports the overloads error for this type.
''' </summary>
''' <param name="diagnostics">The diagnostics.</param>
Private Sub CheckForOverloadsErrors(diagnostics As DiagnosticBag)
Debug.Assert(Me.IsDefinition) ' Don't do this on constructed types
' Enums and Delegates have nothing to do.
Dim myTypeKind As TypeKind = Me.TypeKind
Dim operatorsKnownToHavePair As HashSet(Of MethodSymbol) = Nothing
If myTypeKind = TypeKind.Class OrElse myTypeKind = TypeKind.Interface OrElse myTypeKind = TypeKind.Structure OrElse myTypeKind = TypeKind.Module Then
Dim lookup = MemberAndInitializerLookup
Dim structEnumerator As Dictionary(Of String, ImmutableArray(Of Symbol)).Enumerator = lookup.Members.GetEnumerator
Dim canDeclareOperators As Boolean = (myTypeKind <> TypeKind.Module AndAlso myTypeKind <> TypeKind.Interface)
While structEnumerator.MoveNext()
Dim memberList As ImmutableArray(Of Symbol) = structEnumerator.Current.Value
' only proceed if there are multiple declarations of methods with the same name
If memberList.Length < 2 Then
' Validate operator overloading
If canDeclareOperators AndAlso CheckForOperatorOverloadingErrors(memberList, 0, structEnumerator, operatorsKnownToHavePair, diagnostics) Then
Continue While
End If
Continue While
End If
For Each memberKind In {SymbolKind.Method, SymbolKind.Property}
For memberIndex = 0 To memberList.Length - 2
Dim member As Symbol = memberList(memberIndex)
If member.Kind <> memberKind OrElse member.IsAccessor OrElse member.IsWithEventsProperty Then
Continue For
End If
' Validate operator overloading
If canDeclareOperators AndAlso memberKind = SymbolKind.Method AndAlso
CheckForOperatorOverloadingErrors(memberList, memberIndex, structEnumerator, operatorsKnownToHavePair, diagnostics) Then
Continue For
End If
Dim sourceMethod = TryCast(member, SourceMemberMethodSymbol)
If sourceMethod IsNot Nothing Then
Debug.Assert(Not sourceMethod.IsUserDefinedOperator())
If sourceMethod.IsUserDefinedOperator() Then
Continue For
End If
If sourceMethod.SuppressDuplicateProcDefDiagnostics Then
Continue For
End If
End If
' TODO: this is O(N^2), maybe this can be improved.
For nextMemberIndex = memberIndex + 1 To memberList.Length - 1
Dim nextMember = memberList(nextMemberIndex)
If nextMember.Kind <> memberKind OrElse nextMember.IsAccessor OrElse nextMember.IsWithEventsProperty Then
Continue For
End If
sourceMethod = TryCast(nextMember, SourceMemberMethodSymbol)
If sourceMethod IsNot Nothing Then
If sourceMethod.IsUserDefinedOperator() Then
Continue For
End If
If sourceMethod.SuppressDuplicateProcDefDiagnostics Then
Continue For
End If
End If
' only process non synthesized symbols
If Not member.IsImplicitlyDeclared AndAlso
Not nextMember.IsImplicitlyDeclared Then
' Overload resolution (CollectOverloadedCandidates) does similar check for imported members
' from the same container. Both places should be in sync. CheckForOperatorOverloadingErrors too.
Dim comparisonResults As SymbolComparisonResults = OverrideHidingHelper.DetailedSignatureCompare(
member,
nextMember,
SymbolComparisonResults.AllMismatches And Not (SymbolComparisonResults.CallingConventionMismatch Or SymbolComparisonResults.ConstraintMismatch))
' only report diagnostics if the signature is considered equal following VB rules.
If (comparisonResults And Not SymbolComparisonResults.MismatchesForConflictingMethods) = 0 Then
ReportOverloadsErrors(comparisonResults, member, nextMember, member.Locations(0), diagnostics)
Exit For
End If
End If
Next
Next
' Validate operator overloading for the last operator, it is not handled by the loop
If canDeclareOperators AndAlso memberKind = SymbolKind.Method AndAlso
CheckForOperatorOverloadingErrors(memberList, memberList.Length - 1, structEnumerator, operatorsKnownToHavePair, diagnostics) Then
Continue For
End If
Next
End While
End If
End Sub
''' <summary>
''' Returns True if memberList(memberIndex) is an operator.
''' Also performs operator overloading validation and reports appropriate errors.
''' </summary>
Private Function CheckForOperatorOverloadingErrors(
memberList As ImmutableArray(Of Symbol),
memberIndex As Integer,
membersEnumerator As Dictionary(Of String, ImmutableArray(Of Symbol)).Enumerator,
<[In](), Out()> ByRef operatorsKnownToHavePair As HashSet(Of MethodSymbol),
diagnostics As DiagnosticBag
) As Boolean
Dim member As Symbol = memberList(memberIndex)
If member.Kind <> SymbolKind.Method Then
Return False
End If
Dim method = DirectCast(member, MethodSymbol)
Dim significantDiff As SymbolComparisonResults = Not SymbolComparisonResults.MismatchesForConflictingMethods
Dim methodMethodKind As MethodKind = method.MethodKind
Select Case methodMethodKind
Case MethodKind.Conversion
significantDiff = significantDiff Or SymbolComparisonResults.ReturnTypeMismatch
Case MethodKind.UserDefinedOperator
Case Else
' Not an operator.
Return False
End Select
Dim opInfo As OverloadResolution.OperatorInfo = OverloadResolution.GetOperatorInfo(method.Name)
If Not OverloadResolution.ValidateOverloadedOperator(method, opInfo, diagnostics) Then
' Malformed operator, but still an operator.
Return True
End If
' Check conflicting overloading with other operators.
If IsConflictingOperatorOverloading(method, significantDiff, memberList, memberIndex + 1, diagnostics) Then
Return True
End If
' CType overloads across Widening and Narrowing, which use different metadata names.
' Need to handle this specially.
If methodMethodKind = MethodKind.Conversion Then
Dim otherName As String = If(IdentifierComparison.Equals(WellKnownMemberNames.ImplicitConversionName, method.Name),
WellKnownMemberNames.ExplicitConversionName, WellKnownMemberNames.ImplicitConversionName)
Dim otherMembers As ImmutableArray(Of Symbol) = Nothing
If MemberAndInitializerLookup.Members.TryGetValue(otherName, otherMembers) Then
While membersEnumerator.MoveNext()
If membersEnumerator.Current.Value = otherMembers Then
If IsConflictingOperatorOverloading(method, significantDiff, otherMembers, 0, diagnostics) Then
Return True
End If
Exit While
End If
End While
End If
End If
' Check for operators that must be declared in pairs.
Dim nameOfThePair As String = Nothing
If opInfo.IsUnary Then
Select Case opInfo.UnaryOperatorKind
Case UnaryOperatorKind.IsTrue
nameOfThePair = WellKnownMemberNames.FalseOperatorName
Case UnaryOperatorKind.IsFalse
nameOfThePair = WellKnownMemberNames.TrueOperatorName
End Select
Else
Select Case opInfo.BinaryOperatorKind
Case BinaryOperatorKind.Equals
nameOfThePair = WellKnownMemberNames.InequalityOperatorName
Case BinaryOperatorKind.NotEquals
nameOfThePair = WellKnownMemberNames.EqualityOperatorName
Case BinaryOperatorKind.LessThan
nameOfThePair = WellKnownMemberNames.GreaterThanOperatorName
Case BinaryOperatorKind.GreaterThan
nameOfThePair = WellKnownMemberNames.LessThanOperatorName
Case BinaryOperatorKind.LessThanOrEqual
nameOfThePair = WellKnownMemberNames.GreaterThanOrEqualOperatorName
Case BinaryOperatorKind.GreaterThanOrEqual
nameOfThePair = WellKnownMemberNames.LessThanOrEqualOperatorName
End Select
End If
If nameOfThePair IsNot Nothing AndAlso
(operatorsKnownToHavePair Is Nothing OrElse Not operatorsKnownToHavePair.Contains(method)) Then
Dim otherMembers As ImmutableArray(Of Symbol) = Nothing
If MemberAndInitializerLookup.Members.TryGetValue(nameOfThePair, otherMembers) Then
For Each other As Symbol In otherMembers
If other.IsUserDefinedOperator() Then
Dim otherMethod = DirectCast(other, MethodSymbol)
Dim comparisonResults As SymbolComparisonResults = MethodSignatureComparer.DetailedCompare(
method,
otherMethod,
SymbolComparisonResults.AllMismatches And
Not (SymbolComparisonResults.CallingConventionMismatch Or
SymbolComparisonResults.ConstraintMismatch Or
SymbolComparisonResults.CustomModifierMismatch Or
SymbolComparisonResults.NameMismatch))
If (comparisonResults And (Not SymbolComparisonResults.MismatchesForConflictingMethods Or SymbolComparisonResults.ReturnTypeMismatch)) = 0 Then
' Found the pair
If operatorsKnownToHavePair Is Nothing Then
operatorsKnownToHavePair = New HashSet(Of MethodSymbol)(ReferenceEqualityComparer.Instance)
End If
operatorsKnownToHavePair.Add(otherMethod)
Return True
End If
End If
Next
End If
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_MatchingOperatorExpected2,
SyntaxFacts.GetText(OverloadResolution.GetOperatorTokenKind(nameOfThePair)),
method), method.Locations(0))
End If
Return True
End Function
''' <summary>
''' See if any member in [memberList] starting with [memberIndex] conflict with [method],
''' report appropriate error and return true.
''' </summary>
Private Function IsConflictingOperatorOverloading(
method As MethodSymbol,
significantDiff As SymbolComparisonResults,
memberList As ImmutableArray(Of Symbol),
memberIndex As Integer,
diagnostics As DiagnosticBag
) As Boolean
For nextMemberIndex = memberIndex To memberList.Length - 1
Dim nextMember = memberList(nextMemberIndex)
If nextMember.Kind <> SymbolKind.Method Then
Continue For
End If
Dim nextMethod = DirectCast(nextMember, MethodSymbol)
If nextMethod.MethodKind <> method.MethodKind Then
Continue For
End If
Dim comparisonResults As SymbolComparisonResults = MethodSignatureComparer.DetailedCompare(
method,
nextMethod,
SymbolComparisonResults.AllMismatches And
Not (SymbolComparisonResults.CallingConventionMismatch Or
SymbolComparisonResults.ConstraintMismatch Or
SymbolComparisonResults.CustomModifierMismatch Or
SymbolComparisonResults.NameMismatch))
' only report diagnostics if the signature is considered equal following VB rules.
If (comparisonResults And significantDiff) = 0 Then
ReportOverloadsErrors(comparisonResults, method, nextMethod, method.Locations(0), diagnostics)
Return True
End If
Next
Return False
End Function
''' <summary>
''' Check for two different diagnostics on the set of implemented interfaces:
''' 1) It is invalid for a type to directly (vs through a base class) implement two interfaces that
''' unify (i.e. are the same for some substitution of type parameters).
'''
''' 2) It is a warning to implement variant interfaces twice with type arguments that could cause
''' ambiguity during method dispatch.
''' </summary>
Private Sub CheckInterfaceUnificationAndVariance(diagnostics As DiagnosticBag)
Dim interfaces = Me.InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics
If interfaces.Count < 2 Then
Return ' can't have any conflicts
End If
' We only need to check pairs of generic interfaces that have the same original definition. Put the interfaces
' into buckets by original definition.
Dim originalDefinitionBuckets As New MultiDictionary(Of NamedTypeSymbol, NamedTypeSymbol)
For Each iface In interfaces
If iface.IsGenericType Then
originalDefinitionBuckets.Add(iface.OriginalDefinition, iface)
End If
Next
' Compare all pairs of interfaces in each bucket.
For Each kvp In originalDefinitionBuckets
If kvp.Value.Count >= 2 Then
Dim i1 As Integer = 0
For Each interface1 In kvp.Value
Dim i2 As Integer = 0
For Each interface2 In kvp.Value
If i2 > i1 Then
Debug.Assert(interface2.IsGenericType AndAlso interface1.OriginalDefinition = interface2.OriginalDefinition)
' Check for interface unification, then variance ambiguity
If TypeUnification.CanUnify(Me, interface1, interface2) Then
ReportInterfaceUnificationError(diagnostics, interface1, interface2)
ElseIf VarianceAmbiguity.HasVarianceAmbiguity(Me, interface1, interface2, Nothing) Then
ReportVarianceAmbiguityWarning(diagnostics, interface1, interface2)
End If
End If
i2 += 1
Next
i1 += 1
Next
End If
Next
End Sub
Private Sub ReportOverloadsErrors(comparisonResults As SymbolComparisonResults, firstMember As Symbol, secondMember As Symbol, location As Location, diagnostics As DiagnosticBag)
If (Me.Locations.Length > 1 AndAlso Not Me.IsPartial) Then
' if there was an error with the enclosing class, suppress these diagnostics
ElseIf comparisonResults = 0 Then
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_DuplicateProcDef1, firstMember), location)
Else
' TODO: maybe rewrite these diagnostics to if/elseifs to report just one diagnostic per
' symbol. This would reduce the error count, but may lead to a new diagnostics once the
' previous one was fixed (byref + return type).
If (comparisonResults And SymbolComparisonResults.ParameterByrefMismatch) <> 0 Then
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadWithByref2, firstMember, secondMember), location)
End If
If (comparisonResults And SymbolComparisonResults.ReturnTypeMismatch) <> 0 Then
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadWithReturnType2, firstMember, secondMember), location)
End If
If (comparisonResults And SymbolComparisonResults.ParamArrayMismatch) <> 0 Then
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadWithArrayVsParamArray2, firstMember, secondMember), location)
End If
If (comparisonResults And SymbolComparisonResults.OptionalParameterMismatch) <> 0 AndAlso (comparisonResults And SymbolComparisonResults.TotalParameterCountMismatch) = 0 Then
' We have Optional/Required parameter disparity AND the same number of parameters
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadWithOptional2, firstMember, secondMember), location)
End If
' With changes in overloading with optional parameters this should never happen
Debug.Assert((comparisonResults And SymbolComparisonResults.OptionalParameterTypeMismatch) = 0)
'If (comparisonResults And SymbolComparisonResults.OptionalParameterTypeMismatch) <> 0 Then
' diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadWithOptionalTypes2, firstMember, secondMember), location)
' ...
' Dev10 only checks the equality of the default values if the types match in
' CompareParams, so we need to suppress the diagnostic here.
If (comparisonResults And SymbolComparisonResults.OptionalParameterValueMismatch) <> 0 Then
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadWithDefault2, firstMember, secondMember), location)
End If
If (comparisonResults And SymbolComparisonResults.PropertyAccessorMismatch) <> 0 Then
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_OverloadingPropertyKind2, firstMember, secondMember), location)
End If
End If
End Sub
''' <summary>
''' Interface1 and Interface2 conflict for some type arguments. Report the correct error in the correct location.
''' </summary>
Private Sub ReportInterfaceUnificationError(diagnostics As DiagnosticBag, interface1 As NamedTypeSymbol, interface2 As NamedTypeSymbol)
If GetImplementsLocation(interface1).SourceSpan.Start > GetImplementsLocation(interface2).SourceSpan.Start Then
' Report error on second implement, for consistency.
Dim temp = interface1
interface1 = interface2
interface2 = temp
End If
' The direct base interfaces that interface1/2 were inherited through.
Dim directInterface1 As NamedTypeSymbol = Nothing
Dim directInterface2 As NamedTypeSymbol = Nothing
Dim location1, location2 As Location
location1 = GetImplementsLocation(interface1, directInterface1)
location2 = GetImplementsLocation(interface2, directInterface2)
Dim isInterface As Boolean = Me.IsInterfaceType()
Dim diag As DiagnosticInfo
If (directInterface1 = interface1 AndAlso directInterface2 = interface2) Then
diag = ErrorFactory.ErrorInfo(If(isInterface, ERRID.ERR_InterfaceUnifiesWithInterface2, ERRID.ERR_InterfacePossiblyImplTwice2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface1))
ElseIf (directInterface1 <> interface1 AndAlso directInterface2 = interface2) Then
diag = ErrorFactory.ErrorInfo(If(isInterface, ERRID.ERR_InterfaceUnifiesWithBase3, ERRID.ERR_ClassInheritsInterfaceUnifiesWithBase3),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface1),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(directInterface1))
ElseIf (directInterface1 = interface1 AndAlso directInterface2 <> interface2) Then
diag = ErrorFactory.ErrorInfo(If(isInterface, ERRID.ERR_BaseUnifiesWithInterfaces3, ERRID.ERR_ClassInheritsBaseUnifiesWithInterfaces3),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(directInterface2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface1))
Else
Debug.Assert(directInterface1 <> interface1 AndAlso directInterface2 <> interface2)
diag = ErrorFactory.ErrorInfo(If(isInterface, ERRID.ERR_InterfaceBaseUnifiesWithBase4, ERRID.ERR_ClassInheritsInterfaceBaseUnifiesWithBase4),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(directInterface2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface2),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(interface1),
CustomSymbolDisplayFormatter.ShortNameWithTypeArgsAndContainingTypes(directInterface1))
End If
diagnostics.Add(New VBDiagnostic(diag, location2))
End Sub
''' <summary>
''' Interface1 and Interface2 have variable ambiguity. Report the warning in the correct location.
''' </summary>
Private Sub ReportVarianceAmbiguityWarning(diagnostics As DiagnosticBag, interface1 As NamedTypeSymbol, interface2 As NamedTypeSymbol)
Dim useSiteDiagnostics As HashSet(Of DiagnosticInfo) = Nothing
Dim hasVarianceAmbiguity As Boolean = VarianceAmbiguity.HasVarianceAmbiguity(Me, interface1, interface2, useSiteDiagnostics)
If hasVarianceAmbiguity OrElse Not useSiteDiagnostics.IsNullOrEmpty Then
If GetImplementsLocation(interface1).SourceSpan.Start > GetImplementsLocation(interface2).SourceSpan.Start Then
' Report error on second implement, for consistency.
Dim temp = interface1
interface1 = interface2
interface2 = temp
End If
' The direct base interfaces that interface1/2 were inherited through.
Dim directInterface1 As NamedTypeSymbol = Nothing
Dim directInterface2 As NamedTypeSymbol = Nothing
Dim location1, location2 As Location
location1 = GetImplementsLocation(interface1, directInterface1)
location2 = GetImplementsLocation(interface2, directInterface2)
If Not diagnostics.Add(location2, useSiteDiagnostics) AndAlso hasVarianceAmbiguity Then
Dim diag As DiagnosticInfo
diag = ErrorFactory.ErrorInfo(ERRID.WRN_VarianceDeclarationAmbiguous3,
CustomSymbolDisplayFormatter.QualifiedName(directInterface2),
CustomSymbolDisplayFormatter.QualifiedName(directInterface1),
CustomSymbolDisplayFormatter.ErrorNameWithKind(interface1.OriginalDefinition))
diagnostics.Add(New VBDiagnostic(diag, location2))
End If
End If
End Sub
#End Region
#Region "Attributes"
Protected Sub SuppressExtensionAttributeSynthesis()
Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.True)
_lazyEmitExtensionAttribute = ThreeState.False
End Sub
Private ReadOnly Property EmitExtensionAttribute As Boolean
Get
If _lazyEmitExtensionAttribute = ThreeState.Unknown Then
BindAllMemberAttributes(cancellationToken:=Nothing)
End If
Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.Unknown)
Return _lazyEmitExtensionAttribute = ThreeState.True
End Get
End Property
Friend Overrides Sub AddSynthesizedAttributes(compilationState As ModuleCompilationState, ByRef attributes As ArrayBuilder(Of SynthesizedAttributeData))
MyBase.AddSynthesizedAttributes(compilationState, attributes)
If EmitExtensionAttribute Then
AddSynthesizedAttribute(attributes, Me.DeclaringCompilation.SynthesizeExtensionAttribute())
End If
End Sub
#End Region
Friend ReadOnly Property AnyMemberHasAttributes As Boolean
Get
If (Not Me._lazyAnyMemberHasAttributes.HasValue()) Then
Me._lazyAnyMemberHasAttributes = Me._declaration.AnyMemberHasAttributes.ToThreeState()
End If
Return Me._lazyAnyMemberHasAttributes.Value()
End Get
End Property
End Class
End Namespace
|
nagyistoce/roslyn
|
src/Compilers/VisualBasic/Portable/Symbols/Source/SourceMemberContainerTypeSymbol.vb
|
Visual Basic
|
apache-2.0
| 218,108
|
' 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.ExpressionEvaluator
Imports Microsoft.VisualStudio.Debugger.Clr
Imports Microsoft.VisualStudio.Debugger.Evaluation
Imports Xunit
Namespace Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.UnitTests
Public Class FormatSpecifierTests
Inherits VisualBasicResultProviderTestBase
<Fact>
Public Sub NoQuotes_String()
Dim runtime = New DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlib())
Dim inspectionContext = CreateDkmInspectionContext(DkmEvaluationFlags.NoQuotes)
Dim stringType = runtime.GetType(GetType(String))
' Nothing
Dim value = CreateDkmClrValue(Nothing, type:=stringType)
Dim result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", "Nothing", "String", "s", editableValue:=Nothing, flags:=DkmEvaluationResultFlags.None))
' ""
value = CreateDkmClrValue(String.Empty, type:=stringType)
result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", "", "String", "s", editableValue:="""""", flags:=DkmEvaluationResultFlags.RawString))
' "'"
value = CreateDkmClrValue("'", type:=stringType)
result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", "'", "String", "s", editableValue:="""'""", flags:=DkmEvaluationResultFlags.RawString))
' """"
value = CreateDkmClrValue("""", type:=stringType)
result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", """", "String", "s", editableValue:="""""""""", flags:=DkmEvaluationResultFlags.RawString))
' "a" & vbCrLf & "b" & vbTab & vbVerticalTab & vbBack & "c"
value = CreateDkmClrValue("a" & vbCrLf & "b" & vbTab & vbVerticalTab & vbBack & "c", type:=stringType)
result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", "a" & vbCrLf & "b" & vbTab & vbVerticalTab & vbBack & "c", "String", "s", editableValue:="""a"" & vbCrLf & ""b"" & vbTab & vbVerticalTab & vbBack & ""c""", flags:=DkmEvaluationResultFlags.RawString))
' "a" & vbNullChar & "b"
value = CreateDkmClrValue("a" & vbNullChar & "b", type:=stringType)
result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", "a" & vbNullChar & "b", "String", "s", editableValue:="""a"" & vbNullChar & ""b""", flags:=DkmEvaluationResultFlags.RawString))
' " " with alias
value = CreateDkmClrValue(" ", type:=stringType, [alias]:="$1", evalFlags:=DkmEvaluationResultFlags.HasObjectId)
result = FormatResult("s", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("s", " {$1}", "String", "s", editableValue:=""" """, flags:=DkmEvaluationResultFlags.RawString Or DkmEvaluationResultFlags.HasObjectId))
' array
value = CreateDkmClrValue({"1"}, type:=stringType.MakeArrayType())
result = FormatResult("a", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("a", "{Length=1}", "String()", "a", editableValue:=Nothing, flags:=DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
' DkmInspectionContext should not be inherited.
Verify(children,
EvalResult("(0)", """1""", "String", "a(0)", editableValue:="""1""", flags:=DkmEvaluationResultFlags.RawString))
End Sub
<Fact>
Public Sub NoQuotes_Char()
Dim runtime = New DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlib())
Dim inspectionContext = CreateDkmInspectionContext(DkmEvaluationFlags.NoQuotes)
Dim charType = runtime.GetType(GetType(Char))
' 0
Dim value = CreateDkmClrValue(ChrW(0), type:=charType)
Dim result = FormatResult("c", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("c", vbNullChar, "Char", "c", editableValue:="vbNullChar", flags:=DkmEvaluationResultFlags.None))
' "'"c
value = CreateDkmClrValue("'"c, type:=charType)
result = FormatResult("c", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("c", "'", "Char", "c", editableValue:="""'""c", flags:=DkmEvaluationResultFlags.None))
' """"c
value = CreateDkmClrValue(""""c, type:=charType)
result = FormatResult("c", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("c", """"c, "Char", "c", editableValue:="""""""""c", flags:=DkmEvaluationResultFlags.None))
' "\"c
value = CreateDkmClrValue("\"c, type:=charType)
result = FormatResult("c", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("c", "\"c, "Char", "c", editableValue:="""\""c", flags:=DkmEvaluationResultFlags.None))
' vbLf
value = CreateDkmClrValue(ChrW(10), type:=charType)
result = FormatResult("c", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("c", vbLf, "Char", "c", editableValue:="vbLf", flags:=DkmEvaluationResultFlags.None))
' ChrW(&H001E)
value = CreateDkmClrValue(ChrW(&H001E), type:=charType)
result = FormatResult("c", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("c", New String({ChrW(&H001E)}), "Char", "c", editableValue:="ChrW(30)", flags:=DkmEvaluationResultFlags.None))
' array
value = CreateDkmClrValue({"1"c}, type:=charType.MakeArrayType())
result = FormatResult("a", value, inspectionContext:=inspectionContext)
Verify(result,
EvalResult("a", "{Length=1}", "Char()", "a", editableValue:=Nothing, flags:=DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
' DkmInspectionContext should not be inherited.
Verify(children,
EvalResult("(0)", """1""c", "Char", "a(0)", editableValue:="""1""c", flags:=DkmEvaluationResultFlags.None))
End Sub
End Class
End Namespace
|
michalhosala/roslyn
|
src/ExpressionEvaluator/VisualBasic/Test/ResultProvider/FormatSpecifierTests.vb
|
Visual Basic
|
apache-2.0
| 6,917
|
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename.CSharp
Public Class GenericTypeParameterTests
<WorkItem(403671)>
<Fact, Trait(Traits.Feature, Traits.Features.Rename)>
Public Sub CustomerReported_ErrorTolerance()
Using result = RenameEngineResult.Create(
<Workspace>
<Project Language="C#" CommonReferences="true">
<Document>
class A {
void F<[|$$T|]>() { G<{|stmt1:T|}>(); }
}
</Document>
</Project>
</Workspace>, renameTo:="U")
result.AssertLabeledSpansAre("stmt1", "U", Microsoft.CodeAnalysis.Rename.ConflictEngine.RelatedLocationType.NoConflict)
End Using
End Sub
End Class
End Namespace
|
v-codeel/roslyn
|
src/EditorFeatures/Test2/Rename/CSharp/GenericTypeParameterTests.vb
|
Visual Basic
|
apache-2.0
| 981
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ScriptureDisplay
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()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.BtnSubVerse = New System.Windows.Forms.Button()
Me.BtnAddVerse = New System.Windows.Forms.Button()
Me.Bible1 = New System.Windows.Forms.ComboBox()
Me.Sync4 = New System.Windows.Forms.CheckBox()
Me.Sync3 = New System.Windows.Forms.CheckBox()
Me.Sync2 = New System.Windows.Forms.CheckBox()
Me.Bible4 = New System.Windows.Forms.ComboBox()
Me.Label13 = New System.Windows.Forms.Label()
Me.Verse4 = New System.Windows.Forms.TextBox()
Me.Label14 = New System.Windows.Forms.Label()
Me.Label15 = New System.Windows.Forms.Label()
Me.Chapter4 = New System.Windows.Forms.ComboBox()
Me.Book4 = New System.Windows.Forms.ComboBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.FourthVerseCheckBox = New System.Windows.Forms.CheckBox()
Me.Bible3 = New System.Windows.Forms.ComboBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.Verse3 = New System.Windows.Forms.TextBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Chapter3 = New System.Windows.Forms.ComboBox()
Me.Book3 = New System.Windows.Forms.ComboBox()
Me.Label8 = New System.Windows.Forms.Label()
Me.ThirdVerseCheckBox = New System.Windows.Forms.CheckBox()
Me.Bible2 = New System.Windows.Forms.ComboBox()
Me.Label9 = New System.Windows.Forms.Label()
Me.Verse2 = New System.Windows.Forms.TextBox()
Me.Label10 = New System.Windows.Forms.Label()
Me.Label11 = New System.Windows.Forms.Label()
Me.Chapter2 = New System.Windows.Forms.ComboBox()
Me.Book2 = New System.Windows.Forms.ComboBox()
Me.Label12 = New System.Windows.Forms.Label()
Me.SecondVerseCheckBox = New System.Windows.Forms.CheckBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.Verse1 = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.ChapterComboBox = New System.Windows.Forms.ComboBox()
Me.BibleBooksComboBox = New System.Windows.Forms.ComboBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.CheckBox2 = New System.Windows.Forms.CheckBox()
Me.Label21 = New System.Windows.Forms.Label()
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.BtnSubVerse)
Me.GroupBox1.Controls.Add(Me.BtnAddVerse)
Me.GroupBox1.Controls.Add(Me.Bible1)
Me.GroupBox1.Controls.Add(Me.Sync4)
Me.GroupBox1.Controls.Add(Me.Sync3)
Me.GroupBox1.Controls.Add(Me.Sync2)
Me.GroupBox1.Controls.Add(Me.Bible4)
Me.GroupBox1.Controls.Add(Me.Label13)
Me.GroupBox1.Controls.Add(Me.Verse4)
Me.GroupBox1.Controls.Add(Me.Label14)
Me.GroupBox1.Controls.Add(Me.Label15)
Me.GroupBox1.Controls.Add(Me.Chapter4)
Me.GroupBox1.Controls.Add(Me.Book4)
Me.GroupBox1.Controls.Add(Me.Label16)
Me.GroupBox1.Controls.Add(Me.FourthVerseCheckBox)
Me.GroupBox1.Controls.Add(Me.Bible3)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Verse3)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Chapter3)
Me.GroupBox1.Controls.Add(Me.Book3)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.ThirdVerseCheckBox)
Me.GroupBox1.Controls.Add(Me.Bible2)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Verse2)
Me.GroupBox1.Controls.Add(Me.Label10)
Me.GroupBox1.Controls.Add(Me.Label11)
Me.GroupBox1.Controls.Add(Me.Chapter2)
Me.GroupBox1.Controls.Add(Me.Book2)
Me.GroupBox1.Controls.Add(Me.Label12)
Me.GroupBox1.Controls.Add(Me.SecondVerseCheckBox)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Verse1)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.ChapterComboBox)
Me.GroupBox1.Controls.Add(Me.BibleBooksComboBox)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(9, 41)
Me.GroupBox1.Margin = New System.Windows.Forms.Padding(4)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Padding = New System.Windows.Forms.Padding(4)
Me.GroupBox1.Size = New System.Drawing.Size(360, 594)
Me.GroupBox1.TabIndex = 6
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Select scripture verse(s) to display"
'
'BtnSubVerse
'
Me.BtnSubVerse.Location = New System.Drawing.Point(248, 94)
Me.BtnSubVerse.Name = "BtnSubVerse"
Me.BtnSubVerse.Size = New System.Drawing.Size(23, 23)
Me.BtnSubVerse.TabIndex = 50
Me.BtnSubVerse.Text = "-"
Me.ToolTip1.SetToolTip(Me.BtnSubVerse, "Decrement verse or verse range")
Me.BtnSubVerse.UseVisualStyleBackColor = True
'
'BtnAddVerse
'
Me.BtnAddVerse.Location = New System.Drawing.Point(322, 94)
Me.BtnAddVerse.Name = "BtnAddVerse"
Me.BtnAddVerse.Size = New System.Drawing.Size(23, 23)
Me.BtnAddVerse.TabIndex = 49
Me.BtnAddVerse.Text = "+"
Me.ToolTip1.SetToolTip(Me.BtnAddVerse, "Increment verse or verse range")
Me.BtnAddVerse.UseVisualStyleBackColor = True
'
'Bible1
'
Me.Bible1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Bible1.FormattingEnabled = True
Me.Bible1.Location = New System.Drawing.Point(93, 27)
Me.Bible1.Margin = New System.Windows.Forms.Padding(4)
Me.Bible1.Name = "Bible1"
Me.Bible1.Size = New System.Drawing.Size(252, 24)
Me.Bible1.TabIndex = 48
'
'Sync4
'
Me.Sync4.Appearance = System.Windows.Forms.Appearance.Button
Me.Sync4.AutoSize = True
Me.Sync4.Location = New System.Drawing.Point(292, 457)
Me.Sync4.Margin = New System.Windows.Forms.Padding(4)
Me.Sync4.Name = "Sync4"
Me.Sync4.Size = New System.Drawing.Size(49, 27)
Me.Sync4.TabIndex = 47
Me.Sync4.Text = "Sync"
Me.Sync4.UseVisualStyleBackColor = True
'
'Sync3
'
Me.Sync3.Appearance = System.Windows.Forms.Appearance.Button
Me.Sync3.AutoSize = True
Me.Sync3.Location = New System.Drawing.Point(292, 304)
Me.Sync3.Margin = New System.Windows.Forms.Padding(4)
Me.Sync3.Name = "Sync3"
Me.Sync3.Size = New System.Drawing.Size(49, 27)
Me.Sync3.TabIndex = 46
Me.Sync3.Text = "Sync"
Me.Sync3.UseVisualStyleBackColor = True
'
'Sync2
'
Me.Sync2.Appearance = System.Windows.Forms.Appearance.Button
Me.Sync2.AutoSize = True
Me.Sync2.Location = New System.Drawing.Point(292, 150)
Me.Sync2.Margin = New System.Windows.Forms.Padding(4)
Me.Sync2.Name = "Sync2"
Me.Sync2.Size = New System.Drawing.Size(49, 27)
Me.Sync2.TabIndex = 45
Me.Sync2.Text = "Sync"
Me.Sync2.UseVisualStyleBackColor = True
'
'Bible4
'
Me.Bible4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Bible4.Enabled = False
Me.Bible4.FormattingEnabled = True
Me.Bible4.Location = New System.Drawing.Point(93, 490)
Me.Bible4.Margin = New System.Windows.Forms.Padding(4)
Me.Bible4.Name = "Bible4"
Me.Bible4.Size = New System.Drawing.Size(252, 24)
Me.Bible4.TabIndex = 44
'
'Label13
'
Me.Label13.AutoSize = True
Me.Label13.Location = New System.Drawing.Point(8, 494)
Me.Label13.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(39, 17)
Me.Label13.TabIndex = 43
Me.Label13.Text = "Bible"
'
'Verse4
'
Me.Verse4.Enabled = False
Me.Verse4.Location = New System.Drawing.Point(276, 556)
Me.Verse4.Margin = New System.Windows.Forms.Padding(4)
Me.Verse4.Name = "Verse4"
Me.Verse4.Size = New System.Drawing.Size(69, 22)
Me.Verse4.TabIndex = 42
Me.Verse4.Text = "1"
'
'Label14
'
Me.Label14.AutoSize = True
Me.Label14.Location = New System.Drawing.Point(223, 560)
Me.Label14.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(45, 17)
Me.Label14.TabIndex = 41
Me.Label14.Text = "Verse"
'
'Label15
'
Me.Label15.AutoSize = True
Me.Label15.Location = New System.Drawing.Point(8, 560)
Me.Label15.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(58, 17)
Me.Label15.TabIndex = 40
Me.Label15.Text = "Chapter"
'
'Chapter4
'
Me.Chapter4.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.Chapter4.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Chapter4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Chapter4.Enabled = False
Me.Chapter4.FormattingEnabled = True
Me.Chapter4.Location = New System.Drawing.Point(93, 555)
Me.Chapter4.Margin = New System.Windows.Forms.Padding(4)
Me.Chapter4.Name = "Chapter4"
Me.Chapter4.Size = New System.Drawing.Size(69, 24)
Me.Chapter4.TabIndex = 39
'
'Book4
'
Me.Book4.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.Book4.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Book4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Book4.Enabled = False
Me.Book4.FormattingEnabled = True
Me.Book4.Location = New System.Drawing.Point(93, 523)
Me.Book4.Margin = New System.Windows.Forms.Padding(4)
Me.Book4.Name = "Book4"
Me.Book4.Size = New System.Drawing.Size(252, 24)
Me.Book4.TabIndex = 38
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Location = New System.Drawing.Point(8, 527)
Me.Label16.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(75, 17)
Me.Label16.TabIndex = 37
Me.Label16.Text = "Bible Book"
'
'FourthVerseCheckBox
'
Me.FourthVerseCheckBox.AutoSize = True
Me.FourthVerseCheckBox.Location = New System.Drawing.Point(12, 462)
Me.FourthVerseCheckBox.Margin = New System.Windows.Forms.Padding(4)
Me.FourthVerseCheckBox.Name = "FourthVerseCheckBox"
Me.FourthVerseCheckBox.Size = New System.Drawing.Size(160, 21)
Me.FourthVerseCheckBox.TabIndex = 36
Me.FourthVerseCheckBox.Text = "Enable Fourth Verse"
Me.FourthVerseCheckBox.UseVisualStyleBackColor = True
'
'Bible3
'
Me.Bible3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Bible3.Enabled = False
Me.Bible3.FormattingEnabled = True
Me.Bible3.Location = New System.Drawing.Point(93, 337)
Me.Bible3.Margin = New System.Windows.Forms.Padding(4)
Me.Bible3.Name = "Bible3"
Me.Bible3.Size = New System.Drawing.Size(252, 24)
Me.Bible3.TabIndex = 35
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(8, 341)
Me.Label5.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(39, 17)
Me.Label5.TabIndex = 34
Me.Label5.Text = "Bible"
'
'Verse3
'
Me.Verse3.Enabled = False
Me.Verse3.Location = New System.Drawing.Point(276, 404)
Me.Verse3.Margin = New System.Windows.Forms.Padding(4)
Me.Verse3.Name = "Verse3"
Me.Verse3.Size = New System.Drawing.Size(69, 22)
Me.Verse3.TabIndex = 33
Me.Verse3.Text = "1"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(223, 407)
Me.Label6.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(45, 17)
Me.Label6.TabIndex = 32
Me.Label6.Text = "Verse"
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(8, 407)
Me.Label7.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(58, 17)
Me.Label7.TabIndex = 31
Me.Label7.Text = "Chapter"
'
'Chapter3
'
Me.Chapter3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.Chapter3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Chapter3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Chapter3.Enabled = False
Me.Chapter3.FormattingEnabled = True
Me.Chapter3.Location = New System.Drawing.Point(93, 402)
Me.Chapter3.Margin = New System.Windows.Forms.Padding(4)
Me.Chapter3.Name = "Chapter3"
Me.Chapter3.Size = New System.Drawing.Size(69, 24)
Me.Chapter3.TabIndex = 30
'
'Book3
'
Me.Book3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.Book3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Book3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Book3.Enabled = False
Me.Book3.FormattingEnabled = True
Me.Book3.Location = New System.Drawing.Point(93, 370)
Me.Book3.Margin = New System.Windows.Forms.Padding(4)
Me.Book3.Name = "Book3"
Me.Book3.Size = New System.Drawing.Size(252, 24)
Me.Book3.TabIndex = 29
'
'Label8
'
Me.Label8.AutoSize = True
Me.Label8.Location = New System.Drawing.Point(8, 374)
Me.Label8.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(75, 17)
Me.Label8.TabIndex = 28
Me.Label8.Text = "Bible Book"
'
'ThirdVerseCheckBox
'
Me.ThirdVerseCheckBox.AutoSize = True
Me.ThirdVerseCheckBox.Location = New System.Drawing.Point(12, 309)
Me.ThirdVerseCheckBox.Margin = New System.Windows.Forms.Padding(4)
Me.ThirdVerseCheckBox.Name = "ThirdVerseCheckBox"
Me.ThirdVerseCheckBox.Size = New System.Drawing.Size(152, 21)
Me.ThirdVerseCheckBox.TabIndex = 27
Me.ThirdVerseCheckBox.Text = "Enable Third Verse"
Me.ThirdVerseCheckBox.UseVisualStyleBackColor = True
'
'Bible2
'
Me.Bible2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Bible2.Enabled = False
Me.Bible2.FormattingEnabled = True
Me.Bible2.Location = New System.Drawing.Point(93, 183)
Me.Bible2.Margin = New System.Windows.Forms.Padding(4)
Me.Bible2.Name = "Bible2"
Me.Bible2.Size = New System.Drawing.Size(252, 24)
Me.Bible2.TabIndex = 25
'
'Label9
'
Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(8, 187)
Me.Label9.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(39, 17)
Me.Label9.TabIndex = 24
Me.Label9.Text = "Bible"
'
'Verse2
'
Me.Verse2.Enabled = False
Me.Verse2.Location = New System.Drawing.Point(276, 250)
Me.Verse2.Margin = New System.Windows.Forms.Padding(4)
Me.Verse2.Name = "Verse2"
Me.Verse2.Size = New System.Drawing.Size(69, 22)
Me.Verse2.TabIndex = 23
Me.Verse2.Text = "1"
'
'Label10
'
Me.Label10.AutoSize = True
Me.Label10.Location = New System.Drawing.Point(223, 254)
Me.Label10.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(45, 17)
Me.Label10.TabIndex = 22
Me.Label10.Text = "Verse"
'
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.Location = New System.Drawing.Point(8, 254)
Me.Label11.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(58, 17)
Me.Label11.TabIndex = 21
Me.Label11.Text = "Chapter"
'
'Chapter2
'
Me.Chapter2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.Chapter2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Chapter2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Chapter2.Enabled = False
Me.Chapter2.FormattingEnabled = True
Me.Chapter2.Location = New System.Drawing.Point(93, 249)
Me.Chapter2.Margin = New System.Windows.Forms.Padding(4)
Me.Chapter2.Name = "Chapter2"
Me.Chapter2.Size = New System.Drawing.Size(69, 24)
Me.Chapter2.TabIndex = 20
'
'Book2
'
Me.Book2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.Book2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Book2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Book2.Enabled = False
Me.Book2.FormattingEnabled = True
Me.Book2.Location = New System.Drawing.Point(93, 217)
Me.Book2.Margin = New System.Windows.Forms.Padding(4)
Me.Book2.Name = "Book2"
Me.Book2.Size = New System.Drawing.Size(252, 24)
Me.Book2.TabIndex = 19
'
'Label12
'
Me.Label12.AutoSize = True
Me.Label12.Location = New System.Drawing.Point(8, 220)
Me.Label12.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(75, 17)
Me.Label12.TabIndex = 18
Me.Label12.Text = "Bible Book"
'
'SecondVerseCheckBox
'
Me.SecondVerseCheckBox.AutoSize = True
Me.SecondVerseCheckBox.Location = New System.Drawing.Point(12, 155)
Me.SecondVerseCheckBox.Margin = New System.Windows.Forms.Padding(4)
Me.SecondVerseCheckBox.Name = "SecondVerseCheckBox"
Me.SecondVerseCheckBox.Size = New System.Drawing.Size(167, 21)
Me.SecondVerseCheckBox.TabIndex = 17
Me.SecondVerseCheckBox.Text = "Enable Second Verse"
Me.SecondVerseCheckBox.UseVisualStyleBackColor = True
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(8, 31)
Me.Label4.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(39, 17)
Me.Label4.TabIndex = 15
Me.Label4.Text = "Bible"
'
'Verse1
'
Me.Verse1.Location = New System.Drawing.Point(271, 94)
Me.Verse1.Margin = New System.Windows.Forms.Padding(4)
Me.Verse1.Name = "Verse1"
Me.Verse1.Size = New System.Drawing.Size(51, 22)
Me.Verse1.TabIndex = 14
Me.Verse1.Text = "1"
Me.ToolTip1.SetToolTip(Me.Verse1, "Enter the verse number (or) a verse range." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "e.g," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " 1" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & " 2-5 ")
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(181, 98)
Me.Label3.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(45, 17)
Me.Label3.TabIndex = 10
Me.Label3.Text = "Verse"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(8, 97)
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(58, 17)
Me.Label2.TabIndex = 9
Me.Label2.Text = "Chapter"
'
'ChapterComboBox
'
Me.ChapterComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.ChapterComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.ChapterComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ChapterComboBox.FormattingEnabled = True
Me.ChapterComboBox.Location = New System.Drawing.Point(93, 94)
Me.ChapterComboBox.Margin = New System.Windows.Forms.Padding(4)
Me.ChapterComboBox.Name = "ChapterComboBox"
Me.ChapterComboBox.Size = New System.Drawing.Size(69, 24)
Me.ChapterComboBox.TabIndex = 8
'
'BibleBooksComboBox
'
Me.BibleBooksComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.BibleBooksComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.BibleBooksComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.BibleBooksComboBox.FormattingEnabled = True
Me.BibleBooksComboBox.Location = New System.Drawing.Point(93, 60)
Me.BibleBooksComboBox.Margin = New System.Windows.Forms.Padding(4)
Me.BibleBooksComboBox.Name = "BibleBooksComboBox"
Me.BibleBooksComboBox.Size = New System.Drawing.Size(252, 24)
Me.BibleBooksComboBox.TabIndex = 7
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(8, 64)
Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(75, 17)
Me.Label1.TabIndex = 6
Me.Label1.Text = "Bible Book"
'
'CheckBox2
'
Me.CheckBox2.Appearance = System.Windows.Forms.Appearance.Button
Me.CheckBox2.AutoSize = True
Me.CheckBox2.Checked = True
Me.CheckBox2.CheckState = System.Windows.Forms.CheckState.Checked
Me.CheckBox2.Location = New System.Drawing.Point(331, 5)
Me.CheckBox2.Margin = New System.Windows.Forms.Padding(4)
Me.CheckBox2.Name = "CheckBox2"
Me.CheckBox2.Size = New System.Drawing.Size(28, 27)
Me.CheckBox2.TabIndex = 51
Me.CheckBox2.Text = "→"
Me.CheckBox2.UseVisualStyleBackColor = True
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.Location = New System.Drawing.Point(12, 11)
Me.Label21.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(44, 17)
Me.Label21.TabIndex = 50
Me.Label21.Text = "Quick"
'
'ComboBox1
'
Me.ComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.ComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.ComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.ComboBox1.FormattingEnabled = True
Me.ComboBox1.Location = New System.Drawing.Point(67, 7)
Me.ComboBox1.Margin = New System.Windows.Forms.Padding(4)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(255, 24)
Me.ComboBox1.TabIndex = 49
'
'ToolTip1
'
Me.ToolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info
'
'Timer1
'
'
'ScriptureDisplay
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1056, 705)
Me.ControlBox = False
Me.Controls.Add(Me.CheckBox2)
Me.Controls.Add(Me.Label21)
Me.Controls.Add(Me.ComboBox1)
Me.Controls.Add(Me.GroupBox1)
Me.Margin = New System.Windows.Forms.Padding(4)
Me.Name = "ScriptureDisplay"
Me.Text = "Scripture Projector Display"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents ChapterComboBox As System.Windows.Forms.ComboBox
Friend WithEvents BibleBooksComboBox As System.Windows.Forms.ComboBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Verse1 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents SecondVerseCheckBox As System.Windows.Forms.CheckBox
Friend WithEvents Bible2 As System.Windows.Forms.ComboBox
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Verse2 As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Chapter2 As System.Windows.Forms.ComboBox
Friend WithEvents Book2 As System.Windows.Forms.ComboBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Bible4 As System.Windows.Forms.ComboBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents Verse4 As System.Windows.Forms.TextBox
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Chapter4 As System.Windows.Forms.ComboBox
Friend WithEvents Book4 As System.Windows.Forms.ComboBox
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents FourthVerseCheckBox As System.Windows.Forms.CheckBox
Friend WithEvents Bible3 As System.Windows.Forms.ComboBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Verse3 As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Chapter3 As System.Windows.Forms.ComboBox
Friend WithEvents Book3 As System.Windows.Forms.ComboBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents ThirdVerseCheckBox As System.Windows.Forms.CheckBox
Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents Sync4 As System.Windows.Forms.CheckBox
Friend WithEvents Sync3 As System.Windows.Forms.CheckBox
Friend WithEvents Sync2 As System.Windows.Forms.CheckBox
Friend WithEvents Bible1 As System.Windows.Forms.ComboBox
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents BtnSubVerse As System.Windows.Forms.Button
Friend WithEvents BtnAddVerse As System.Windows.Forms.Button
End Class
|
fiidau/Church-Projector
|
Church Projector/ScriptureDisplay.designer.vb
|
Visual Basic
|
mit
| 30,342
|
' 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.Composition
Imports Microsoft.NetCore.Analyzers.Runtime
Imports System.Threading
Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.CodeFixes
Imports Microsoft.CodeAnalysis.Editing
Imports Microsoft.CodeAnalysis.Formatting
Imports Microsoft.CodeAnalysis.VisualBasic
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.NetCore.VisualBasic.Analyzers.Runtime
<ExportCodeFixProvider(LanguageNames.VisualBasic), [Shared]>
Public Class BasicUseOrdinalStringComparisonFixer
Inherits UseOrdinalStringComparisonFixerBase
Protected Overrides Function IsInArgumentContext(node As SyntaxNode) As Boolean
Return node.IsKind(SyntaxKind.SimpleArgument) AndAlso
Not DirectCast(node, SimpleArgumentSyntax).IsNamed AndAlso
DirectCast(node, SimpleArgumentSyntax).Expression.IsKind(SyntaxKind.SimpleMemberAccessExpression)
End Function
Protected Overrides Function FixArgument(document As Document, generator As SyntaxGenerator, root As SyntaxNode, argument As SyntaxNode) As Task(Of Document)
Dim memberAccess = TryCast(TryCast(argument, SimpleArgumentSyntax)?.Expression, MemberAccessExpressionSyntax)
If memberAccess IsNot Nothing Then
' preserve the "IgnoreCase" suffix if present
Dim isIgnoreCase = memberAccess.Name.GetText().ToString().EndsWith(UseOrdinalStringComparisonAnalyzer.IgnoreCaseText, StringComparison.Ordinal)
Dim newOrdinalText = If(isIgnoreCase, UseOrdinalStringComparisonAnalyzer.OrdinalIgnoreCaseText, UseOrdinalStringComparisonAnalyzer.OrdinalText)
Dim newIdentifier = generator.IdentifierName(newOrdinalText)
Dim newMemberAccess = memberAccess.WithName(CType(newIdentifier, SimpleNameSyntax)).WithAdditionalAnnotations(Formatter.Annotation)
Dim newRoot = root.ReplaceNode(memberAccess, newMemberAccess)
Return Task.FromResult(document.WithSyntaxRoot(newRoot))
End If
Return Task.FromResult(document)
End Function
Protected Overrides Function IsInIdentifierNameContext(node As SyntaxNode) As Boolean
Return node.IsKind(SyntaxKind.IdentifierName) AndAlso
node?.Parent?.FirstAncestorOrSelf(Of InvocationExpressionSyntax)() IsNot Nothing
End Function
Protected Overrides Async Function FixIdentifierName(document As Document, generator As SyntaxGenerator, root As SyntaxNode, identifier As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Document)
Dim invokeParent = identifier.Parent?.FirstAncestorOrSelf(Of InvocationExpressionSyntax)()
If invokeParent IsNot Nothing Then
Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Dim methodSymbol = TryCast(model.GetSymbolInfo(identifier).Symbol, IMethodSymbol)
If methodSymbol IsNot Nothing AndAlso CanAddStringComparison(methodSymbol, model) Then
' append a New StringComparison.Ordinal argument
Dim newArg = generator.Argument(CreateOrdinalMemberAccess(generator, model)).
WithAdditionalAnnotations(Formatter.Annotation)
Dim newInvoke = invokeParent.AddArgumentListArguments(CType(newArg, ArgumentSyntax)).WithAdditionalAnnotations(Formatter.Annotation)
Dim newRoot = root.ReplaceNode(invokeParent, newInvoke)
Return document.WithSyntaxRoot(newRoot)
End If
End If
Return document
End Function
Protected Overrides Function IsInEqualsContext(node As SyntaxNode) As Boolean
Return node.IsKind(SyntaxKind.EqualsExpression) OrElse node.IsKind(SyntaxKind.NotEqualsExpression)
End Function
Protected Overrides Async Function FixEquals(document As Document, generator As SyntaxGenerator, root As SyntaxNode, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Document)
Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Dim binaryExpression = CType(node, BinaryExpressionSyntax)
Dim fixedExpr = CreateEqualsExpression(generator, model, binaryExpression.Left, binaryExpression.Right, binaryExpression.IsKind(SyntaxKind.EqualsExpression)).WithAdditionalAnnotations(Formatter.Annotation)
Dim newRoot = root.ReplaceNode(node, fixedExpr)
Return document.WithSyntaxRoot(newRoot)
End Function
End Class
End Namespace
|
heejaechang/roslyn-analyzers
|
src/Microsoft.NetCore.Analyzers/VisualBasic/Runtime/BasicUseOrdinalStringComparison.Fixer.vb
|
Visual Basic
|
apache-2.0
| 4,898
|
Imports NUnit.Framework
Imports System.Configuration
Imports Gears
Imports Gears.DataSource
Namespace GearsTest
<TestFixture()>
Public Class SqlBuilderTest
<TestFixtureSetUp()>
Public Sub setup()
End Sub
<TestFixtureTearDown()>
Public Sub tearDown()
End Sub
Private Shared DbServers As DbServerType() = {DbServerType.Oracle, DbServerType.SQLServer, DbServerType.OLEDB}
<Test(), TestCaseSource("DbServers")>
Public Sub sqlSelectBasic(ds As DbServerType)
Dim sqlbd = New SqlBuilder(ds, ActionType.SEL)
sqlbd.IsMultiByte = True
Dim answer As String = ""
Select Case ds
Case DbServerType.Oracle
answer = " SELECT t.""COL1"" AS ""COL1_IS_COLUMN1"", t.""COL2"",count(*) AS ""件数"" FROM SCHEMA.""TAB"" t WHERE t.""COL1"" = :p1 GROUP BY t.""COL1"",t.""COL2"" ORDER BY t.""COL1"" ASC "
Case DbServerType.SQLServer, DbServerType.OLEDB
answer = " SELECT t.[COL1] AS [COL1_IS_COLUMN1], t.[COL2],count(*) AS [件数] FROM SCHEMA.[TAB] t WHERE t.[COL1] = @p1 GROUP BY t.[COL1],t.[COL2] ORDER BY t.[COL1] ASC "
End Select
sqlbd.addSelection(SqlBuilder.S("COL1").pf("t").asName("COL1_IS_COLUMN1").inGroup.ASC)
sqlbd.addSelection(SqlBuilder.S("COL2").pf("t").inGroup)
sqlbd.addSelection(SqlBuilder.S("count(*)").asNoFormat.asName("件数"))
sqlbd.DataSource = (SqlBuilder.DS("TAB", "t").inSchema("SCHEMA"))
Dim filter As SqlFilterItem = SqlBuilder.F("COL1", "p1").pf("t").eq("xxx")
sqlbd.addFilter(filter)
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlFilterSameColumn()
Dim sqlbd = New SqlBuilder(DbServerType.Oracle)
Dim answer As String = "SELECT * FROM TAB WHERE ( COL1 = :F0 OR COL1 = :F1 )"
sqlbd.addFilter(SqlBuilder.F("COL1").eq("1"))
sqlbd.addFilter(SqlBuilder.F("COL1").eq("2"))
sqlbd.DataSource = (SqlBuilder.DS("TAB"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlFilterNull()
Dim sqlbd = New SqlBuilder(DbServerType.Oracle)
Dim answer As String = "SELECT * FROM TAB WHERE COL1 IS NULL AND COL2 = :F1 "
sqlbd.addFilter(SqlBuilder.F("COL1").eq(Nothing))
sqlbd.addFilter(SqlBuilder.F("COL2").eq("1"))
sqlbd.DataSource = (SqlBuilder.DS("TAB"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlFilterEmpty()
Dim sqlbd = New SqlBuilder(DbServerType.Oracle)
Dim answer As String = "SELECT * FROM TAB "
sqlbd.Add(SqlFilterGroup.Ors(SqlBuilder.F("COL1").eq(""), SqlBuilder.F("COL2").eq("")))
sqlbd.DataSource = (SqlBuilder.DS("TAB"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlFilterGroupEmpty()
Dim sqlbd = New SqlBuilder(DbServerType.Oracle)
Dim answer As String = "SELECT * FROM TAB "
sqlbd.addFilter(SqlBuilder.F("COL1").eq(""))
sqlbd.addFilter(SqlBuilder.F("COL2").eq(""))
sqlbd.DataSource = (SqlBuilder.DS("TAB"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlFilterNot()
Dim sqlbd = New SqlBuilder(DbServerType.Oracle)
Dim answer As String = "SELECT * FROM TAB WHERE (NOT COL1 IS NULL AND NOT COL2 = :F1) AND ( NOT COL3 = :G1F0 OR COL4 = :G1F1 ) "
sqlbd.addFilter(SqlBuilder.F("COL1").eq(Nothing).nots)
sqlbd.addFilter(SqlBuilder.F("COL2").eq("1").nots)
sqlbd.Add(SqlFilterGroup.Ors(SqlBuilder.F("COL3").eq("1").nots, SqlBuilder.F("COL4").eq("1")))
sqlbd.DataSource = (SqlBuilder.DS("TAB"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlFilterGrouping()
Dim sqlbd = New SqlBuilder(DbServerType.Oracle)
Dim answer As String = "SELECT * FROM TAB WHERE (NOT COL1 IS NULL AND COL2 = :G0F1) AND ( COL3 >= :G1F0 OR COL4 = :G1F1 ) "
sqlbd.Add(SqlFilterGroup.Ands(SqlBuilder.F("COL1").eq(Nothing).nots, SqlBuilder.F("COL2").eq("1")))
sqlbd.Add(SqlFilterGroup.Ors(SqlBuilder.F("COL3").gteq("1"), SqlBuilder.F("COL4").eq("1")))
sqlbd.DataSource = (SqlBuilder.DS("TAB"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test(), TestCaseSource("DbServers")>
Public Sub sqlJoin(ds As DbServerType)
Dim sqlbd = New SqlBuilder(ds)
Dim answer1 As String = " SELECT * FROM TAB_A t1 INNER JOIN TAB_B t2 ON t1.JCOL1 = t2.JCOL2 AND t1.JCOL3 = t2.JCOL4 "
Dim answer2 As String = " SELECT * FROM TAB_A t1 LEFT OUTER JOIN TAB_B t2 ON t1.JCOL1 = t2.JCOL1 LEFT OUTER JOIN TAB_C t3 ON t1.JCOL2 = t3.JCOL1 "
Dim sql As String = ""
'INNER JOIN
Dim ds1 As SqlDataSource = SqlBuilder.DS("TAB_A", "t1").innerJoin("TAB_B", "t2", SqlBuilder.F("JCOL1").joinOn("JCOL2"), _
SqlBuilder.F("JCOL3").joinOn("JCOL4"))
sqlbd.DataSource = (ds1)
sql = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer1), trimAll(sql))
'LEFT OUTER JOIN
Dim ds2 As SqlDataSource = SqlBuilder.DS("TAB_A", "t1").leftOuterJoin( _
"TAB_B", "t2", SqlBuilder.F("JCOL1").joinOn("JCOL1")).leftOuterJoin( _
"TAB_C", "t3", SqlBuilder.F("JCOL2").joinOn("JCOL1"))
sqlbd.DataSource = (ds2)
sql = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer2), trimAll(sql))
End Sub
<Test()>
Public Sub sqlUpdate()
Dim sqlb = New SqlBuilder(DbServerType.Oracle)
sqlb.DataSource = (SqlBuilder.DS("TARGET"))
Dim answer As String = "UPDATE TARGET SET COL1 = :U0 , COL2 = :U1 WHERE COL1 = :F0 AND COL2 = :F1 "
sqlb.Add(SqlBuilder.S("COL1").setValue("V1"))
sqlb.Add(SqlBuilder.S("COL2").setValue("V2"))
sqlb.Add(SqlBuilder.F("COL1").eq("K1"))
sqlb.Add(SqlBuilder.F("COL2").eq("K2"))
Dim sql As String = sqlb.confirmSql(ActionType.UPD, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlInsert()
Dim sqlb = New SqlBuilder(DbServerType.Oracle)
sqlb.DataSource = (SqlBuilder.DS("TARGET"))
Dim answer As String = "INSERT INTO TARGET(COL1,COL2) VALUES(:N0,:N1) "
sqlb.Add(SqlBuilder.S("COL1").setValue("V1"))
sqlb.Add(SqlBuilder.S("COL2").setValue("V2"))
sqlb.Add(SqlBuilder.F("COL1").eq("K1")) 'フィルタの設定はINSERTに影響を与えない
sqlb.Add(SqlBuilder.F("COL2").eq("K2"))
Dim sql As String = sqlb.confirmSql(ActionType.INS, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub sqlDelete()
Dim sqlb = New SqlBuilder(DbServerType.Oracle)
sqlb.DataSource = (SqlBuilder.DS("TARGET"))
Dim answer As String = "DELETE FROM TARGET WHERE ( COL1 = :F0V0 OR COL1 = :F0V1 ) AND COL2 = :F1 "
sqlb.ValueSeparator = ","
sqlb.Add(SqlBuilder.F("COL1").eq("K1,K2"))
sqlb.Add(SqlBuilder.F("COL2").eq("K3"))
Dim sql As String = sqlb.confirmSql(ActionType.DEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test(), TestCaseSource("DbServers")>
Public Sub makeFilterGroup(ds As DbServerType)
Dim sqlbd = New SqlBuilder(ds)
Dim answer As String = " SELECT * FROM TAB_A WHERE (COL1 = %p%G0F0 AND COL2 = %p%G0F1) AND (COL3 = %p%G1F0 OR COL4 = %p%G1F1) AND (( COL5 = %p%F0V0 OR COL5 = %p%F0V1 ) AND COL6 = %p%F1) "
Select Case ds
Case DbServerType.Oracle
answer = answer.Replace("%p%", ":")
Case DbServerType.SQLServer, DbServerType.OLEDB
answer = answer.Replace("%p%", "@")
End Select
Dim groupA As New SqlFilterGroup("A", False)
Dim groupB As New SqlFilterGroup("B")
sqlbd.DataSource = (SqlBuilder.DS("TAB_A"))
sqlbd.addFilter(SqlBuilder.F("COL1").eq("1").inGroup(groupA))
sqlbd.addFilter(SqlBuilder.F("COL2").eq("2").inGroup(groupA))
sqlbd.addFilter(SqlBuilder.F("COL3").eq("3").inGroup(groupB))
sqlbd.addFilter(SqlBuilder.F("COL4").eq("4").inGroup(groupB))
sqlbd.addFilter(SqlBuilder.F("COL5").eq("5-1" + sqlbd.ValueSeparator + "5-2"))
sqlbd.addFilter(SqlBuilder.F("COL6").eq("6"))
Dim sql As String = sqlbd.confirmSql(ActionType.SEL, True)
Console.WriteLine(sql)
Assert.AreEqual(trimAll(answer), trimAll(sql))
End Sub
<Test()>
Public Sub makeFilterAs()
Dim filter As New SqlFilterItem("TST_COLUMN")
filter.filterAs("eq", "X")
Assert.AreEqual("=", filter.Operand)
filter.filterAs("NEQ", "X")
Assert.AreEqual("<>", filter.Operand)
filter.filterAs("lt", "X")
Assert.AreEqual("<", filter.Operand)
filter.filterAs("Gt", "X")
Assert.AreEqual(">", filter.Operand)
filter.filterAs("ltEq", "X")
Assert.AreEqual("<=", filter.Operand)
filter.filterAs("GTEQ", "X")
Assert.AreEqual(">=", filter.Operand)
filter.filterAs("like", "X")
Assert.AreEqual("LIKE", filter.Operand.Trim)
'Likeにおける%ラッパー
filter.filterAs("like", "X", True)
Assert.AreEqual("%X%", filter.Value.ToString)
filter.filterAs("like", "", True) '空白の場合は%でくくらない
Assert.AreEqual("", filter.Value.ToString)
End Sub
Public Shared Function compareWithoutSpace(ByVal left As String, ByVal right As String) As Boolean
Return trimAll(left) = trimAll(right)
End Function
Private Shared Function trimAll(ByVal str As String) As String
Return str.Replace(" ", "")
End Function
End Class
End Namespace
|
icoxfog417/Gears
|
GearsTest/SqlBuilderTest.vb
|
Visual Basic
|
apache-2.0
| 11,690
|
' 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 Microsoft.CodeAnalysis.Host
Imports Microsoft.CodeAnalysis.Host.Mef
Imports Microsoft.CodeAnalysis.Structure
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic.Structure
<ExportLanguageServiceFactory(GetType(BlockStructureService), LanguageNames.VisualBasic), [Shared]>
Friend Class VisualBasicBlockStructureServiceFactory
Implements ILanguageServiceFactory
Public Function CreateLanguageService(languageServices As HostLanguageServices) As ILanguageService Implements ILanguageServiceFactory.CreateLanguageService
Return New VisualBasicBlockStructureService(languageServices.WorkspaceServices.Workspace)
End Function
End Class
Friend Class VisualBasicBlockStructureService
Inherits BlockStructureServiceWithProviders
Friend Sub New(workspace As Workspace)
MyBase.New(workspace)
End Sub
Public Overrides ReadOnly Property Language As String
Get
Return LanguageNames.VisualBasic
End Get
End Property
Protected Overrides Function GetBuiltInProviders() As ImmutableArray(Of BlockStructureProvider)
Return ImmutableArray.Create(Of BlockStructureProvider)(New VisualBasicBlockStructureProvider())
End Function
End Class
Friend Class VisualBasicBlockStructureProvider
Inherits AbstractBlockStructureProvider
Public Shared Function CreateDefaultNodeStructureProviderMap() As ImmutableDictionary(Of Type, ImmutableArray(Of AbstractSyntaxStructureProvider))
Dim builder = ImmutableDictionary.CreateBuilder(Of Type, ImmutableArray(Of AbstractSyntaxStructureProvider))()
builder.Add(Of AccessorStatementSyntax, AccessorDeclarationStructureProvider)()
builder.Add(Of ClassStatementSyntax, TypeDeclarationStructureProvider, MetadataAsSource.MetadataTypeDeclarationStructureProvider)()
builder.Add(Of CollectionInitializerSyntax, CollectionInitializerStructureProvider)
builder.Add(Of CompilationUnitSyntax, CompilationUnitStructureProvider)()
builder.Add(Of SubNewStatementSyntax, ConstructorDeclarationStructureProvider, MetadataAsSource.MetadataConstructorDeclarationStructureProvider)()
builder.Add(Of DelegateStatementSyntax, DelegateDeclarationStructureProvider, MetadataAsSource.MetadataDelegateDeclarationStructureProvider)()
builder.Add(Of DocumentationCommentTriviaSyntax, DocumentationCommentStructureProvider)()
builder.Add(Of DoLoopBlockSyntax, DoLoopBlockStructureProvider)
builder.Add(Of EnumStatementSyntax, EnumDeclarationStructureProvider, MetadataAsSource.MetadataEnumDeclarationStructureProvider)()
builder.Add(Of EnumMemberDeclarationSyntax, MetadataAsSource.MetadataEnumMemberDeclarationStructureProvider)()
builder.Add(Of EventStatementSyntax, EventDeclarationStructureProvider, MetadataAsSource.MetadataEventDeclarationStructureProvider)()
builder.Add(Of DeclareStatementSyntax, ExternalMethodDeclarationStructureProvider)()
builder.Add(Of FieldDeclarationSyntax, FieldDeclarationStructureProvider, MetadataAsSource.MetadataFieldDeclarationStructureProvider)()
builder.Add(Of ForBlockSyntax, ForBlockStructureProvider)
builder.Add(Of ForEachBlockSyntax, ForEachBlockStructureProvider)
builder.Add(Of InterfaceStatementSyntax, TypeDeclarationStructureProvider, MetadataAsSource.MetadataTypeDeclarationStructureProvider)()
builder.Add(Of MethodStatementSyntax, MethodDeclarationStructureProvider, MetadataAsSource.MetadataMethodDeclarationStructureProvider)()
builder.Add(Of ModuleStatementSyntax, TypeDeclarationStructureProvider, MetadataAsSource.MetadataTypeDeclarationStructureProvider)()
builder.Add(Of MultiLineIfBlockSyntax, MultiLineIfBlockStructureProvider)()
builder.Add(Of MultiLineLambdaExpressionSyntax, MultilineLambdaStructureProvider)()
builder.Add(Of NamespaceStatementSyntax, NamespaceDeclarationStructureProvider)()
builder.Add(Of ObjectCollectionInitializerSyntax, ObjectCreationInitializerStructureProvider)
builder.Add(Of ObjectMemberInitializerSyntax, ObjectCreationInitializerStructureProvider)
builder.Add(Of OperatorStatementSyntax, OperatorDeclarationStructureProvider, MetadataAsSource.MetadataOperatorDeclarationStructureProvider)()
builder.Add(Of PropertyStatementSyntax, PropertyDeclarationStructureProvider, MetadataAsSource.MetadataPropertyDeclarationStructureProvider)()
builder.Add(Of RegionDirectiveTriviaSyntax, RegionDirectiveStructureProvider, MetadataAsSource.MetadataRegionDirectiveStructureProvider)()
builder.Add(Of SelectBlockSyntax, SelectBlockStructureProvider)
builder.Add(Of StructureStatementSyntax, TypeDeclarationStructureProvider, MetadataAsSource.MetadataTypeDeclarationStructureProvider)()
builder.Add(Of SyncLockBlockSyntax, SyncLockBlockStructureProvider)
builder.Add(Of TryBlockSyntax, TryBlockStructureProvider)
builder.Add(Of UsingBlockSyntax, UsingBlockStructureProvider)
builder.Add(Of WhileBlockSyntax, WhileBlockStructureProvider)
builder.Add(Of WithBlockSyntax, WithBlockStructureProvider)
builder.Add(Of XmlCDataSectionSyntax, XmlExpressionStructureProvider)()
builder.Add(Of XmlCommentSyntax, XmlExpressionStructureProvider)()
builder.Add(Of XmlDocumentSyntax, XmlExpressionStructureProvider)()
builder.Add(Of XmlElementSyntax, XmlExpressionStructureProvider)()
builder.Add(Of XmlProcessingInstructionSyntax, XmlExpressionStructureProvider)()
builder.Add(Of LiteralExpressionSyntax, StringLiteralExpressionStructureProvider)()
builder.Add(Of InterpolatedStringExpressionSyntax, InterpolatedStringExpressionStructureProvider)()
Return builder.ToImmutable()
End Function
Public Shared Function CreateDefaultTriviaStructureProviderMap() As ImmutableDictionary(Of Integer, ImmutableArray(Of AbstractSyntaxStructureProvider))
Dim builder = ImmutableDictionary.CreateBuilder(Of Integer, ImmutableArray(Of AbstractSyntaxStructureProvider))()
builder.Add(SyntaxKind.DisabledTextTrivia, ImmutableArray.Create(Of AbstractSyntaxStructureProvider)(New DisabledTextTriviaStructureProvider()))
Return builder.ToImmutable()
End Function
Friend Sub New()
MyBase.New(CreateDefaultNodeStructureProviderMap(), CreateDefaultTriviaStructureProviderMap())
End Sub
End Class
End Namespace
|
swaroop-sridhar/roslyn
|
src/Features/VisualBasic/Portable/Structure/VisualBasicBlockStructureProvider.vb
|
Visual Basic
|
apache-2.0
| 7,026
|
' 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.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 for binding 'name' attribute
''' value of 'param' and 'paramref' documentation comment tags
''' </summary>
Friend NotInheritable Class DocumentationCommentParamBinder
Inherits DocumentationCommentBinder
Public Sub New(containingBinder As Binder, commentedSymbol As Symbol)
MyBase.New(containingBinder, commentedSymbol)
End Sub
Private ReadOnly Property Parameters As ImmutableArray(Of ParameterSymbol)
Get
If Me.CommentedSymbol IsNot Nothing Then
Select Case Me.CommentedSymbol.Kind
Case SymbolKind.NamedType
Dim namedType = DirectCast(Me.CommentedSymbol, NamedTypeSymbol)
If namedType.TypeKind = TypeKind.Delegate Then
Dim method As MethodSymbol = namedType.DelegateInvokeMethod
If method IsNot Nothing Then
Return method.Parameters
End If
End If
Case SymbolKind.Method
Return DirectCast(Me.CommentedSymbol, MethodSymbol).Parameters
Case SymbolKind.Property
Return DirectCast(Me.CommentedSymbol, PropertySymbol).Parameters
Case SymbolKind.Event
Return DirectCast(Me.CommentedSymbol, EventSymbol).DelegateParameters
End Select
End If
Return ImmutableArray(Of ParameterSymbol).Empty
End Get
End Property
Friend Overrides Function BindXmlNameAttributeValue(identifier As IdentifierNameSyntax, <[In], Out> ByRef useSiteDiagnostics As HashSet(Of DiagnosticInfo)) As ImmutableArray(Of Symbol)
If Me.CommentedSymbol Is Nothing Then
Return ImmutableArray(Of Symbol).Empty
End If
Dim name As String = identifier.Identifier.ValueText
If String.IsNullOrEmpty(name) Then
Return ImmutableArray(Of Symbol).Empty
End If
Return FindSymbolInSymbolArray(name, Me.Parameters)
End Function
Private Const InvalidLookupOptions As LookupOptions =
LookupOptions.LabelsOnly Or
LookupOptions.MustNotBeInstance Or
LookupOptions.MustBeInstance Or
LookupOptions.AttributeTypeOnly Or
LookupOptions.NamespacesOrTypesOnly Or
LookupOptions.MustNotBeLocalOrParameter
Friend Overrides Sub AddLookupSymbolsInfoInSingleBinder(nameSet As LookupSymbolsInfo,
options As LookupOptions,
originalBinder As Binder)
If (options And InvalidLookupOptions) <> 0 Then
Return
End If
For Each parameter In Me.Parameters
If originalBinder.CanAddLookupSymbolInfo(parameter, options, Nothing) Then
nameSet.AddSymbol(parameter, parameter.Name, 0)
End If
Next
End Sub
Friend Overrides Sub LookupInSingleBinder(lookupResult As LookupResult,
name As String,
arity As Integer,
options As LookupOptions,
originalBinder As Binder,
<[In], Out> ByRef useSiteDiagnostics As HashSet(Of DiagnosticInfo))
Debug.Assert(lookupResult.IsClear)
If (options And InvalidLookupOptions) <> 0 OrElse arity > 0 Then
Return
End If
For Each parameter In Me.Parameters
If IdentifierComparison.Equals(parameter.Name, name) Then
lookupResult.SetFrom(CheckViability(parameter, arity, options, Nothing, useSiteDiagnostics))
End If
Next
End Sub
End Class
End Namespace
|
DavidKarlas/roslyn
|
src/Compilers/VisualBasic/Portable/Binding/DocumentationCommentParamBinder.vb
|
Visual Basic
|
apache-2.0
| 4,853
|
'------------------------------------------------------------------------------
' <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 Microsoft.CodeAnalysis.Editor.VisualBasic
'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 VBEditorResources
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("VBEditorResources", GetType(VBEditorResources).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
'''<summary>
''' Looks up a localized string similar to Add any initialization after the InitializeComponent() call..
'''</summary>
Friend ReadOnly Property AddAnyInitializationAfter() As String
Get
Return ResourceManager.GetString("AddAnyInitializationAfter", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Case Correction.
'''</summary>
Friend ReadOnly Property CaseCorrection() As String
Get
Return ResourceManager.GetString("CaseCorrection", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Committing line.
'''</summary>
Friend ReadOnly Property CommittingLine() As String
Get
Return ResourceManager.GetString("CommittingLine", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Correcting word casing....
'''</summary>
Friend ReadOnly Property CorrectingWordCasing() As String
Get
Return ResourceManager.GetString("CorrectingWordCasing", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to End Construct.
'''</summary>
Friend ReadOnly Property EndConstruct() As String
Get
Return ResourceManager.GetString("EndConstruct", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ({0} Events).
'''</summary>
Friend ReadOnly Property Events() As String
Get
Return ResourceManager.GetString("Events", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Format Document.
'''</summary>
Friend ReadOnly Property FormatDocument() As String
Get
Return ResourceManager.GetString("FormatDocument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Format on Save.
'''</summary>
Friend ReadOnly Property FormatOnSave() As String
Get
Return ResourceManager.GetString("FormatOnSave", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Format Paste.
'''</summary>
Friend ReadOnly Property FormatPaste() As String
Get
Return ResourceManager.GetString("FormatPaste", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Formatting Document....
'''</summary>
Friend ReadOnly Property FormattingDocument() As String
Get
Return ResourceManager.GetString("FormattingDocument", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Formatting pasted text....
'''</summary>
Friend ReadOnly Property FormattingPastedText() As String
Get
Return ResourceManager.GetString("FormattingPastedText", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Generate Member.
'''</summary>
Friend ReadOnly Property GenerateMember() As String
Get
Return ResourceManager.GetString("GenerateMember", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Insert new line.
'''</summary>
Friend ReadOnly Property InsertNewLine() As String
Get
Return ResourceManager.GetString("InsertNewLine", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Line commit.
'''</summary>
Friend ReadOnly Property LineCommit() As String
Get
Return ResourceManager.GetString("LineCommit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to <Multiple Types>.
'''</summary>
Friend ReadOnly Property MultipleTypes() As String
Get
Return ResourceManager.GetString("MultipleTypes", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to New.
'''</summary>
Friend ReadOnly Property NavigationItemNew() As String
Get
Return ResourceManager.GetString("NavigationItemNew", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to not supported.
'''</summary>
Friend ReadOnly Property NotSupported() As String
Get
Return ResourceManager.GetString("NotSupported", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Paste.
'''</summary>
Friend ReadOnly Property Paste() As String
Get
Return ResourceManager.GetString("Paste", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Smart Indenting.
'''</summary>
Friend ReadOnly Property SmartIndenting() As String
Get
Return ResourceManager.GetString("SmartIndenting", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This call is required by the designer..
'''</summary>
Friend ReadOnly Property ThisCallIsRequiredByTheDesigner() As String
Get
Return ResourceManager.GetString("ThisCallIsRequiredByTheDesigner", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Visual Basic Pretty List.
'''</summary>
Friend ReadOnly Property VisualBasicPrettyList() As String
Get
Return ResourceManager.GetString("VisualBasicPrettyList", resourceCulture)
End Get
End Property
End Module
End Namespace
|
ericfe-ms/roslyn
|
src/EditorFeatures/VisualBasic/VBEditorResources.Designer.vb
|
Visual Basic
|
apache-2.0
| 9,638
|
' 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.Reflection
Imports Microsoft.CodeAnalysis.CodeGen
Imports Microsoft.CodeAnalysis.ExpressionEvaluator
Imports Microsoft.CodeAnalysis.ExpressionEvaluator.UnitTests
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.UnitTests
Imports Microsoft.DiaSymReader
Imports Microsoft.VisualStudio.Debugger.Evaluation
Imports Roslyn.Test.Utilities
Imports Roslyn.Utilities
Imports Xunit
Namespace Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.UnitTests
Public Class MissingAssemblyTests
Inherits ExpressionCompilerTestBase
<Fact>
Public Sub ErrorsWithAssemblyIdentityArguments()
Dim identity = New AssemblyIdentity(GetUniqueName())
Assert.Same(identity, GetMissingAssemblyIdentities(ERRID.ERR_UnreferencedAssembly3, identity).Single())
End Sub
<Fact>
Public Sub ErrorsWithAssemblySymbolArguments()
Dim identity = New AssemblyIdentity(GetUniqueName())
Dim assembly = CreateCompilation(identity, {}, {}).Assembly
Assert.Same(identity, GetMissingAssemblyIdentities(ERRID.ERR_UnreferencedAssemblyEvent3, assembly).Single())
End Sub
<Fact>
Public Sub ErrorsWithAssemblyMultipleSymbolArguments()
Dim identity1 = New AssemblyIdentity(GetUniqueName())
Dim assembly1 = CreateCompilation(identity1, {}, {}).Assembly
Dim identity2 = New AssemblyIdentity(GetUniqueName())
Dim assembly2 = CreateCompilation(identity2, {}, {}).Assembly
Assert.Same(identity2, GetMissingAssemblyIdentities(ERRID.ERR_ForwardedTypeUnavailable3, "dummy", assembly1, assembly2).Single())
Assert.Same(identity1, GetMissingAssemblyIdentities(ERRID.ERR_ForwardedTypeUnavailable3, "dummy", assembly2, assembly1).Single())
Assert.True(GetMissingAssemblyIdentities(ERRID.ERR_ForwardedTypeUnavailable3, "dummy", assembly1).IsDefault)
Assert.True(GetMissingAssemblyIdentities(ERRID.ERR_ForwardedTypeUnavailable3, "dummy", "dummy", "dummy", assembly1).IsDefault)
End Sub
<Fact>
Public Sub ErrorsRequiringSystemCore()
AssertEx.SetEqual(GetMissingAssemblyIdentities(ERRID.ERR_XmlFeaturesNotAvailable),
EvaluationContextBase.SystemIdentity,
EvaluationContextBase.SystemCoreIdentity,
EvaluationContextBase.SystemXmlIdentity,
EvaluationContextBase.SystemXmlLinqIdentity)
Assert.Equal(EvaluationContextBase.SystemCoreIdentity, GetMissingAssemblyIdentities(ERRID.ERR_NameNotMember2, "dummy", "dummy").Single())
End Sub
<Fact>
Public Sub ErrorsRequiringVbCore()
Assert.Equal(EvaluationContextBase.MicrosoftVisualBasicIdentity, GetMissingAssemblyIdentities(ERRID.ERR_MissingRuntimeHelper).Single())
End Sub
<Fact>
Public Sub MultipleAssemblyArguments()
Dim identity1 = New AssemblyIdentity(GetUniqueName())
Dim identity2 = New AssemblyIdentity(GetUniqueName())
Assert.Same(identity1, GetMissingAssemblyIdentities(ERRID.ERR_UnreferencedAssembly3, identity1, identity2).Single())
Assert.Same(identity2, GetMissingAssemblyIdentities(ERRID.ERR_UnreferencedAssembly3, identity2, identity1).Single())
End Sub
<Fact>
Public Sub NoAssemblyArguments()
Assert.True(GetMissingAssemblyIdentities(ERRID.ERR_UnreferencedAssembly3).IsDefault)
Assert.True(GetMissingAssemblyIdentities(ERRID.ERR_UnreferencedAssembly3, "Not an assembly").IsDefault)
End Sub
<Fact>
Public Sub ERR_UnreferencedAssembly3()
Const libSource = "
Public Class Missing
End Class
"
Const source = "
Public Class C
Public Sub M(parameter As Missing)
End Sub
End Class
"
Dim libRef = CreateCompilationWithMscorlib({libSource}, {}, TestOptions.DebugDll, assemblyName:="Lib").EmitToImageReference()
Dim comp = CreateCompilationWithMscorlib({source}, {libRef}, TestOptions.DebugDll)
WithRuntimeInstance(comp, {MscorlibRef},
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedError = "error BC30652: Reference required to assembly 'Lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'Missing'. Add one to your project."
Dim expectedMissingAssemblyIdentity = New AssemblyIdentity("Lib")
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"parameter",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<Fact>
Public Sub ERR_ForwardedTypeUnavailable3()
Const il = "
.assembly extern mscorlib { }
.assembly extern pe2 { }
.assembly pe1 { }
.class extern forwarder Forwarded
{
.assembly extern pe2
}
.class public auto ansi beforefieldinit Dummy
extends [mscorlib]System.Object
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
"
Const vb = "
Class C
Shared Sub M(d As Dummy)
End Sub
End Class
"
Dim ilRef = CompileIL(il, prependDefaultHeader:=False)
Dim comp = CreateCompilationWithMscorlib({vb}, {ilRef}, TestOptions.DebugDll)
WithRuntimeInstance(comp,
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Dim expectedMissingAssemblyIdentity As AssemblyIdentity = New AssemblyIdentity("pe2")
Dim expectedError = $"error BC31424: Type 'Forwarded' in assembly '{context.Compilation.Assembly.Identity}' has been forwarded to assembly '{expectedMissingAssemblyIdentity}'. Either a reference to '{expectedMissingAssemblyIdentity}' is missing from your project or the type 'Forwarded' is missing from assembly '{expectedMissingAssemblyIdentity}'."
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"New Forwarded()",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<Fact>
Public Sub ERR_XmlFeaturesNotAvailable()
Const source = "
Public Class C
Public Sub M()
dim x = <element/>
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, {SystemRef, SystemCoreRef, SystemXmlRef, SystemXmlLinqRef}, TestOptions.DebugDll)
WithRuntimeInstance(comp, {MscorlibRef},
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedError = "error BC31190: XML literals and XML axis properties are not available. Add references to System.Xml, System.Xml.Linq, and System.Core or other assemblies declaring System.Linq.Enumerable, System.Xml.Linq.XElement, System.Xml.Linq.XName, System.Xml.Linq.XAttribute and System.Xml.Linq.XNamespace types."
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"<value/>",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
AssertEx.SetEqual(actualMissingAssemblyIdentities,
EvaluationContextBase.SystemIdentity,
EvaluationContextBase.SystemCoreIdentity,
EvaluationContextBase.SystemXmlIdentity,
EvaluationContextBase.SystemXmlLinqIdentity)
End Sub)
End Sub
<Fact>
Public Sub ERR_MissingRuntimeAssembly()
Const source = "
Public Class C
Public Sub M(o As Object)
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
WithRuntimeInstance(comp, {MscorlibRef},
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedError = "error BC35000: Requested operation is not available because the runtime library function 'Microsoft.VisualBasic.CompilerServices.Operators.CompareObjectEqual' is not defined."
Dim expectedMissingAssemblyIdentity = EvaluationContextBase.MicrosoftVisualBasicIdentity
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"o = o",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<WorkItem(1114866, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1114866")>
<ConditionalFact(GetType(OSVersionWin8))>
Public Sub ERR_UndefinedType1()
Dim source = "
Class C
Sub M()
End Sub
End Class
"
Dim comp = CreateCompilationWithReferences({VisualBasicSyntaxTree.ParseText(source)}, {MscorlibRef}.Concat(WinRtRefs), TestOptions.DebugDll)
Dim runtimeAssemblies = ExpressionCompilerTestHelpers.GetRuntimeWinMds("Windows.UI")
Assert.True(runtimeAssemblies.Any())
WithRuntimeInstance(comp, {MscorlibRef}.Concat(runtimeAssemblies),
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Dim globalNamespace = context.Compilation.GlobalNamespace
Dim expectedIdentity = New AssemblyIdentity("Windows.Storage", contentType:=AssemblyContentType.WindowsRuntime)
Dim actualIdentity = GetMissingAssemblyIdentities(ERRID.ERR_UndefinedType1, {"Windows.Storage"}, globalNamespace).Single()
Assert.Equal(expectedIdentity, actualIdentity)
actualIdentity = GetMissingAssemblyIdentities(ERRID.ERR_UndefinedType1, {"Global.Windows.Storage"}, globalNamespace).Single()
Assert.Equal(expectedIdentity, actualIdentity)
actualIdentity = GetMissingAssemblyIdentities(ERRID.ERR_UndefinedType1, {"Global.Windows.Storage.Additional"}, globalNamespace).Single()
Assert.Equal(expectedIdentity, actualIdentity)
expectedIdentity = New AssemblyIdentity("Windows.UI.Xaml", contentType:=AssemblyContentType.WindowsRuntime)
actualIdentity = GetMissingAssemblyIdentities(ERRID.ERR_UndefinedType1, {"Windows.UI.Xaml"}, globalNamespace).Single()
Assert.Equal(expectedIdentity, actualIdentity)
Assert.True(GetMissingAssemblyIdentities(ERRID.ERR_UndefinedType1, {"Windows.UI.Xaml(Of T)"}, globalNamespace).IsDefault)
End Sub)
End Sub
<WorkItem(1151888, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1151888")>
<Fact>
Public Sub ERR_NameNotMember2()
Const source = "
Imports System.Linq
Public Class C
Public Sub M(array As Integer())
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, {SystemCoreRef}, TestOptions.DebugDll)
WithRuntimeInstance(comp, {MscorlibRef},
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedErrorTemplate = "error BC30456: '{0}' is not a member of 'Integer()'."
Dim expectedMissingAssemblyIdentity = EvaluationContextBase.SystemCoreIdentity
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"array.Count()",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(String.Format(expectedErrorTemplate, "Count"), actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
context.CompileExpression(
"array.NoSuchMethod()",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(String.Format(expectedErrorTemplate, "NoSuchMethod"), actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<WorkItem(1124725, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1124725")>
<WorkItem(597, "GitHub")>
<Fact>
Public Sub PseudoVariableType()
Const source = "
Public Class C
Public Sub M()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, {}, TestOptions.DebugDll)
WithRuntimeInstance(comp, {CSharpRef},
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Dim aliases = ImmutableArray.Create(ExceptionAlias("Microsoft.CSharp.RuntimeBinder.RuntimeBinderException, Microsoft.CSharp, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a", stowed:=True))
Const expectedError = "error BC30652: Reference required to assembly " &
"'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' " &
"containing the type 'Exception'. Add one to your project."
Dim expectedMissingAssemblyIdentity = comp.Assembly.CorLibrary.Identity
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"$stowedexception",
DkmEvaluationFlags.TreatAsExpression,
aliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<WorkItem(1114866, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1114866")>
<ConditionalFact(GetType(OSVersionWin8))>
Public Sub NotYetLoadedWinMds()
Dim source = "
Class C
Shared Sub M(f As Windows.Storage.StorageFolder)
End Sub
End Class
"
Dim comp = CreateCompilationWithReferences({VisualBasicSyntaxTree.ParseText(source)}, {MscorlibRef}.Concat(WinRtRefs), TestOptions.DebugDll)
Dim runtimeAssemblies = ExpressionCompilerTestHelpers.GetRuntimeWinMds("Windows.Storage")
Assert.True(runtimeAssemblies.Any())
WithRuntimeInstance(comp, {MscorlibRef}.Concat(runtimeAssemblies),
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedError = "error BC30456: 'UI' is not a member of 'Windows'."
Dim expectedMissingAssemblyIdentity = New AssemblyIdentity("Windows.UI", contentType:=System.Reflection.AssemblyContentType.WindowsRuntime)
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"Windows.UI.Colors",
DkmEvaluationFlags.None,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
''' <remarks>
''' Windows.UI.Xaml is the only (win8) winmd with more than two parts.
''' </remarks>
<WorkItem(1114866, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1114866")>
<ConditionalFact(GetType(OSVersionWin8))>
Public Sub NotYetLoadedWinMds_MultipleParts()
Dim source = "
Class C
Shared Sub M(c As Windows.UI.Colors)
End Sub
End Class
"
Dim comp = CreateCompilationWithReferences({VisualBasicSyntaxTree.ParseText(source)}, {MscorlibRef}.Concat(WinRtRefs), TestOptions.DebugDll)
Dim runtimeAssemblies = ExpressionCompilerTestHelpers.GetRuntimeWinMds("Windows.UI")
Assert.True(runtimeAssemblies.Any())
WithRuntimeInstance(comp, {MscorlibRef}.Concat(runtimeAssemblies),
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedError = "error BC30456: 'Xaml' is not a member of 'Windows.UI'."
Dim expectedMissingAssemblyIdentity = New AssemblyIdentity("Windows.UI.Xaml", contentType:=System.Reflection.AssemblyContentType.WindowsRuntime)
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"Windows.[UI].Xaml.Application",
DkmEvaluationFlags.None,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<WorkItem(1114866, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1114866")>
<ConditionalFact(GetType(OSVersionWin8))>
Public Sub NotYetLoadedWinMds_GetType()
Dim source = "
Class C
Shared Sub M(f As Windows.Storage.StorageFolder)
End Sub
End Class
"
Dim comp = CreateCompilationWithReferences({VisualBasicSyntaxTree.ParseText(source)}, {MscorlibRef}.Concat(WinRtRefs), TestOptions.DebugDll)
Dim runtimeAssemblies = ExpressionCompilerTestHelpers.GetRuntimeWinMds("Windows.Storage")
Assert.True(runtimeAssemblies.Any())
WithRuntimeInstance(comp, {MscorlibRef}.Concat(runtimeAssemblies),
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Const expectedError = "error BC30002: Type 'Windows.UI.Colors' is not defined."
Dim expectedMissingAssemblyIdentity = New AssemblyIdentity("Windows.UI", contentType:=System.Reflection.AssemblyContentType.WindowsRuntime)
Dim resultProperties As ResultProperties = Nothing
Dim actualError As String = Nothing
Dim actualMissingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
context.CompileExpression(
"GetType([Windows].UI.Colors)",
DkmEvaluationFlags.None,
NoAliases,
DebuggerDiagnosticFormatter.Instance,
resultProperties,
actualError,
actualMissingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData:=Nothing)
Assert.Equal(expectedError, actualError)
Assert.Equal(expectedMissingAssemblyIdentity, actualMissingAssemblyIdentities.Single())
End Sub)
End Sub
<WorkItem(1154988, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1154988")>
<Fact>
Public Sub CompileWithRetrySameErrorReported()
Dim source = "
Class C
Sub M()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
WithRuntimeInstance(comp,
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.M")
Dim missingModule = runtime.Modules.First()
Dim missingIdentity = missingModule.GetMetadataReader().ReadAssemblyIdentityOrThrow()
Dim numRetries = 0
Dim errorMessage As String = Nothing
ExpressionCompilerTestHelpers.CompileExpressionWithRetry(
runtime.Modules.Select(Function(m) m.MetadataBlock).ToImmutableArray(),
context,
Function(unused, diagnostics)
numRetries += 1
Assert.InRange(numRetries, 0, 2) ' We don't want to loop forever...
diagnostics.Add(New VBDiagnostic(ErrorFactory.ErrorInfo(ERRID.ERR_UnreferencedAssembly3, missingIdentity, "MissingType"), Location.None))
Return Nothing
End Function,
Function(assemblyIdentity, ByRef uSize)
uSize = CUInt(missingModule.MetadataLength)
Return missingModule.MetadataAddress
End Function,
errorMessage)
Assert.Equal(2, numRetries) ' Ensure that we actually retried and that we bailed out on the second retry if the same identity was seen in the diagnostics.
Assert.Equal($"error BC30652: Reference required to assembly '{missingIdentity}' containing the type 'MissingType'. Add one to your project.", errorMessage)
End Sub)
End Sub
<Fact>
Public Sub TryDifferentLinqLibraryOnRetry()
Dim source = "
Imports System.Linq
Class C
Shared Sub Main(args() As String)
End Sub
End Class
Class UseLinq
Dim b = Enumerable.Any(Of Integer)(Nothing)
End Class"
Dim comp = CreateCompilationWithMscorlib({source}, references:={SystemCoreRef})
WithRuntimeInstance(comp, {MscorlibRef},
Sub(runtime)
Dim context = CreateMethodContext(runtime, "C.Main")
Dim systemCore = SystemCoreRef.ToModuleInstance()
Dim fakeSystemLinq = CreateCompilationWithMscorlib({""}, options:=TestOptions.ReleaseDll, assemblyName:="System.Linq").ToModuleInstance()
Dim errorMessage As String = Nothing
Dim testData As CompilationTestData = Nothing
Dim retryCount = 0
Dim compileResult = ExpressionCompilerTestHelpers.CompileExpressionWithRetry(
runtime.Modules.Select(Function(m) m.MetadataBlock).ToImmutableArray(),
"args.Where(Function(a) a.Length > 0)",
ImmutableArray(Of [Alias]).Empty,
Function(_1, _2) context, ' ignore new blocks and just keep using the same failed context...
Function(assemblyIdentity As AssemblyIdentity, ByRef uSize As UInteger)
retryCount += 1
Dim block As MetadataBlock
Select Case retryCount
Case 1
Assert.Equal(EvaluationContextBase.SystemLinqIdentity, assemblyIdentity)
block = fakeSystemLinq.MetadataBlock
Case 2
Assert.Equal(EvaluationContextBase.SystemCoreIdentity, assemblyIdentity)
block = systemCore.MetadataBlock
Case Else
Throw ExceptionUtilities.Unreachable
End Select
uSize = CUInt(block.Size)
Return block.Pointer
End Function,
errorMessage:=errorMessage,
testData:=testData)
Assert.Equal(2, retryCount)
End Sub)
End Sub
<Fact>
Public Sub TupleNoSystemRuntimeWithVB15()
Const source =
"Class C
Shared Sub M()
Dim x = 1
Dim y = (x, 2)
Dim z = (3, 4, (5, 6))
End Sub
End Class"
TupleContextNoSystemRuntime(
source,
"C.M",
"y",
"{
// Code size 2 (0x2)
.maxstack 1
.locals init (Integer V_0, //x
(x As Integer, Integer) V_1, //y
(Integer, Integer, (Integer, Integer)) V_2) //z
IL_0000: ldloc.1
IL_0001: ret
}")
End Sub
<Fact>
Public Sub TupleNoSystemRuntimeWithVB15_3()
Const source =
"Class C
Shared Sub M()
Dim x = 1
Dim y = (x, 2)
Dim z = (3, 4, (5, 6))
End Sub
End Class"
TupleContextNoSystemRuntime(
source,
"C.M",
"y",
"{
// Code size 2 (0x2)
.maxstack 1
.locals init (Integer V_0, //x
(x As Integer, Integer) V_1, //y
(Integer, Integer, (Integer, Integer)) V_2) //z
IL_0000: ldloc.1
IL_0001: ret
}", LanguageVersion.VisualBasic15_3)
End Sub
<WorkItem(16879, "https://github.com/dotnet/roslyn/issues/16879")>
<Fact>
Public Sub NonTupleNoSystemRuntime()
Const source =
"Class C
Shared Sub M()
Dim x = 1
Dim y = (x, 2)
Dim z = (3, 4, (5, 6))
End Sub
End Class"
TupleContextNoSystemRuntime(
source,
"C.M",
"x",
"{
// Code size 2 (0x2)
.maxstack 1
.locals init (Integer V_0, //x
(x As Integer, Integer) V_1, //y
(Integer, Integer, (Integer, Integer)) V_2) //z
IL_0000: ldloc.0
IL_0001: ret
}")
End Sub
Private Shared Sub TupleContextNoSystemRuntime(source As String, methodName As String, expression As String, expectedIL As String,
Optional languageVersion As LanguageVersion = LanguageVersion.VisualBasic15)
Dim comp = CreateCompilationWithMscorlib({source}, references:={ValueTupleRef, SystemRuntimeFacadeRef}, options:=TestOptions.DebugDll,
parseOptions:=TestOptions.Regular.WithLanguageVersion(languageVersion))
Using systemRuntime = SystemRuntimeFacadeRef.ToModuleInstance()
WithRuntimeInstance(comp, {MscorlibRef, ValueTupleRef},
Sub(runtime)
Dim methodBlocks As ImmutableArray(Of MetadataBlock) = Nothing
Dim moduleVersionId As Guid = Nothing
Dim symReader As ISymUnmanagedReader = Nothing
Dim typeToken = 0
Dim methodToken = 0
Dim localSignatureToken = 0
GetContextState(runtime, "C.M", methodBlocks, moduleVersionId, symReader, methodToken, localSignatureToken)
Dim errorMessage As String = Nothing
Dim testData As CompilationTestData = Nothing
Dim retryCount = 0
Dim compileResult = ExpressionCompilerTestHelpers.CompileExpressionWithRetry(
runtime.Modules.Select(Function(m) m.MetadataBlock).ToImmutableArray(),
expression,
ImmutableArray(Of [Alias]).Empty,
Function(b, u) EvaluationContext.CreateMethodContext(b.ToCompilation(), MakeDummyLazyAssemblyReaders(), symReader, moduleVersionId, methodToken, methodVersion:=1, ilOffset:=0, localSignatureToken:=localSignatureToken),
Function(assemblyIdentity As AssemblyIdentity, ByRef uSize As UInteger)
retryCount += 1
Assert.Equal("System.Runtime", assemblyIdentity.Name)
Dim block = systemRuntime.MetadataBlock
uSize = CUInt(block.Size)
Return block.Pointer
End Function,
errorMessage:=errorMessage,
testData:=testData)
Assert.Equal(1, retryCount)
testData.GetMethodData("<>x.<>m0").VerifyIL(expectedIL)
End Sub)
End Using
End Sub
Private Shared Function GetMissingAssemblyIdentities(code As ERRID, ParamArray arguments() As Object) As ImmutableArray(Of AssemblyIdentity)
Return GetMissingAssemblyIdentities(code, arguments, globalNamespace:=Nothing)
End Function
Private Shared Function GetMissingAssemblyIdentities(code As ERRID, arguments() As Object, globalNamespace As NamespaceSymbol) As ImmutableArray(Of AssemblyIdentity)
Return EvaluationContext.GetMissingAssemblyIdentitiesHelper(code, arguments, globalNamespace, linqLibrary:=EvaluationContextBase.SystemCoreIdentity)
End Function
End Class
End Namespace
|
jkotas/roslyn
|
src/ExpressionEvaluator/VisualBasic/Test/ExpressionCompiler/MissingAssemblyTests.vb
|
Visual Basic
|
apache-2.0
| 34,230
|
' 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.Generic
Imports System.Collections.Immutable
Imports System.Diagnostics
Imports System.Runtime.InteropServices
Imports Microsoft.CodeAnalysis.PooledObjects
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' <summary>
''' Represents a compiler "MyGroupCollection" property accessor.
''' </summary>
Friend MustInherit Class SynthesizedMyGroupCollectionPropertyAccessorSymbol
Inherits SynthesizedPropertyAccessorBase(Of SynthesizedMyGroupCollectionPropertySymbol)
Private ReadOnly _createOrDisposeMethod As String
Public Sub New(container As SourceNamedTypeSymbol, [property] As SynthesizedMyGroupCollectionPropertySymbol, createOrDisposeMethod As String)
MyBase.New(container, [property])
Debug.Assert(createOrDisposeMethod IsNot Nothing AndAlso createOrDisposeMethod.Length > 0)
_createOrDisposeMethod = createOrDisposeMethod
End Sub
Friend Overrides ReadOnly Property BackingFieldSymbol As FieldSymbol
Get
Return PropertyOrEvent.AssociatedField
End Get
End Property
Friend Overrides Sub AddSynthesizedAttributes(compilationState as ModuleCompilationState, ByRef attributes As ArrayBuilder(Of SynthesizedAttributeData))
MyBase.AddSynthesizedAttributes(compilationState, attributes)
' Note, Dev11 emits DebuggerNonUserCodeAttribute, but we are using DebuggerHiddenAttribute instead.
AddSynthesizedAttribute(attributes, Me.DeclaringCompilation.SynthesizeDebuggerHiddenAttribute())
End Sub
Private Shared Function MakeSafeName(name As String) As String
If SyntaxFacts.GetKeywordKind(name) <> SyntaxKind.None Then
Return "[" & name & "]"
End If
Return name
End Function
Friend Overrides Function GetBoundMethodBody(compilationState As TypeCompilationState, diagnostics As DiagnosticBag, <Out()> Optional ByRef methodBodyBinder As Binder = Nothing) As BoundBlock
Dim containingType = DirectCast(Me.ContainingType, SourceNamedTypeSymbol)
Dim containingTypeName As String = MakeSafeName(containingType.Name)
Dim targetTypeName As String = PropertyOrEvent.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)
Debug.Assert(targetTypeName.StartsWith("Global.", StringComparison.Ordinal))
Dim propertyName As String = MakeSafeName(PropertyOrEvent.Name)
Dim fieldName As String = PropertyOrEvent.AssociatedField.Name
Dim codeToParse As String =
"Partial Class " & containingTypeName & vbCrLf &
"Property " & propertyName & vbCrLf &
GetMethodBlock(fieldName, MakeSafeName(_createOrDisposeMethod), targetTypeName) &
"End Property" & vbCrLf &
"End Class" & vbCrLf
' TODO: It looks like Dev11 respects project level conditional compilation here.
Dim tree = VisualBasicSyntaxTree.ParseText(codeToParse)
Dim attributeSyntax = PropertyOrEvent.AttributeSyntax.GetVisualBasicSyntax()
Dim diagnosticLocation As Location = attributeSyntax.GetLocation()
Dim root As CompilationUnitSyntax = tree.GetCompilationUnitRoot()
Dim hasErrors As Boolean = False
For Each diag As Diagnostic In tree.GetDiagnostics(root)
Dim vbdiag = DirectCast(diag, VBDiagnostic)
Debug.Assert(Not vbdiag.HasLazyInfo,
"If we decide to allow lazy syntax diagnostics, we'll have to check all call sites of SyntaxTree.GetDiagnostics")
diagnostics.Add(vbdiag.WithLocation(diagnosticLocation))
If diag.Severity = DiagnosticSeverity.Error Then
hasErrors = True
End If
Next
Dim classBlock = DirectCast(root.Members(0), ClassBlockSyntax)
Dim propertyBlock = DirectCast(classBlock.Members(0), PropertyBlockSyntax)
Dim accessorBlock As AccessorBlockSyntax = propertyBlock.Accessors(0)
Dim boundStatement As BoundStatement
If hasErrors Then
boundStatement = New BoundBadStatement(accessorBlock, ImmutableArray(Of BoundNode).Empty)
Else
Dim typeBinder As Binder = BinderBuilder.CreateBinderForType(containingType.ContainingSourceModule, PropertyOrEvent.AttributeSyntax.SyntaxTree, containingType)
methodBodyBinder = BinderBuilder.CreateBinderForMethodBody(Me, accessorBlock, typeBinder)
Dim bindingDiagnostics = DiagnosticBag.GetInstance()
#If DEBUG Then
' Enable DEBUG check for ordering of simple name binding.
methodBodyBinder.EnableSimpleNameBindingOrderChecks(True)
#End If
boundStatement = methodBodyBinder.BindStatement(accessorBlock, bindingDiagnostics)
#If DEBUG Then
methodBodyBinder.EnableSimpleNameBindingOrderChecks(False)
#End If
For Each diag As VBDiagnostic In bindingDiagnostics.AsEnumerable()
diagnostics.Add(diag.WithLocation(diagnosticLocation))
Next
bindingDiagnostics.Free()
If boundStatement.Kind = BoundKind.Block Then
Return DirectCast(boundStatement, BoundBlock)
End If
End If
Return New BoundBlock(accessorBlock, Nothing, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundStatement)(boundStatement))
End Function
Friend NotOverridable Overrides ReadOnly Property GenerateDebugInfoImpl As Boolean
Get
Return False
End Get
End Property
Friend NotOverridable Overrides Function CalculateLocalSyntaxOffset(localPosition As Integer, localTree As SyntaxTree) As Integer
Throw ExceptionUtilities.Unreachable
End Function
Protected MustOverride Function GetMethodBlock(fieldName As String, createOrDisposeMethodName As String, targetTypeName As String) As String
End Class
Friend Class SynthesizedMyGroupCollectionPropertyGetAccessorSymbol
Inherits SynthesizedMyGroupCollectionPropertyAccessorSymbol
Public Sub New(container As SourceNamedTypeSymbol, [property] As SynthesizedMyGroupCollectionPropertySymbol, createMethod As String)
MyBase.New(container, [property], createMethod)
End Sub
Public Overrides ReadOnly Property IsSub As Boolean
Get
Return False
End Get
End Property
Public Overrides ReadOnly Property MethodKind As MethodKind
Get
Return MethodKind.PropertyGet
End Get
End Property
Public Overrides ReadOnly Property ReturnType As TypeSymbol
Get
Return PropertyOrEvent.Type
End Get
End Property
Protected Overrides Function GetMethodBlock(fieldName As String, createMethodName As String, targetTypeName As String) As String
' See Bindable::GenMyGroupCollectionGetCode.
' Get
' <backingField> = <CreateMethod>(Of <TargetType>)(<backingField>)
' return <backingField>
' End Get
Return "Get" & vbCrLf &
fieldName & " = " & createMethodName & "(Of " & targetTypeName & ")(" & fieldName & ")" & vbCrLf &
"Return " & fieldName & vbCrLf &
"End Get" & vbCrLf
End Function
End Class
Friend Class SynthesizedMyGroupCollectionPropertySetAccessorSymbol
Inherits SynthesizedMyGroupCollectionPropertyAccessorSymbol
Private ReadOnly _parameters As ImmutableArray(Of ParameterSymbol)
Public Sub New(container As SourceNamedTypeSymbol, [property] As SynthesizedMyGroupCollectionPropertySymbol, disposeMethod As String)
MyBase.New(container, [property], disposeMethod)
Dim params() As ParameterSymbol = {SynthesizedParameterSymbol.CreateSetAccessorValueParameter(Me, [property], StringConstants.ValueParameterName)}
_parameters = params.AsImmutableOrNull()
End Sub
Public Overrides ReadOnly Property IsSub As Boolean
Get
Return True
End Get
End Property
Public Overrides ReadOnly Property MethodKind As MethodKind
Get
Return MethodKind.PropertySet
End Get
End Property
Public Overrides ReadOnly Property ReturnType As TypeSymbol
Get
' There is no reason to specially complain about missing/bad System.Void because we require presence of constructor,
' which also returns void. The error reported on the constructor is sufficient.
Return ContainingAssembly.GetSpecialType(SpecialType.System_Void)
End Get
End Property
Public Overrides ReadOnly Property Parameters As ImmutableArray(Of ParameterSymbol)
Get
Return _parameters
End Get
End Property
Protected Overrides Function GetMethodBlock(fieldName As String, disposeMethodName As String, targetTypeName As String) As String
' See Bindable::GenMyGroupCollectionSetCode.
' Set(ByVal <Value> As <TargetType>)
' If <Value> Is <backingField>
' return
' End If
' If Not <Value> Is Nothing Then
' Throw New ArgumentException("Property can only be set to Nothing.")
' End If
' <DisposeMethod>(Of <TargetType>)(<backingField>)
' End Set
Return "Set(ByVal " & StringConstants.ValueParameterName & " As " & targetTypeName & ")" & vbCrLf &
"If " & StringConstants.ValueParameterName & " Is " & fieldName & vbCrLf &
"Return" & vbCrLf &
"End If" & vbCrLf &
"If " & StringConstants.ValueParameterName & " IsNot Nothing Then" & vbCrLf &
"Throw New Global.System.ArgumentException(""Property can only be set to Nothing"")" & vbCrLf &
"End If" & vbCrLf &
disposeMethodName & "(Of " & targetTypeName & ")(" & fieldName & ")" & vbCrLf &
"End Set" & vbCrLf
End Function
End Class
End Namespace
|
mmitche/roslyn
|
src/Compilers/VisualBasic/Portable/Symbols/Source/SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb
|
Visual Basic
|
apache-2.0
| 11,028
|
' 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.Editor.Implementation.Highlighting
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.KeywordHighlighting
<ExportHighlighter(LanguageNames.VisualBasic)>
Friend Class EventBlockHighlighter
Inherits AbstractKeywordHighlighter(Of SyntaxNode)
Protected Overrides Function GetHighlights(node As SyntaxNode, cancellationToken As CancellationToken) As IEnumerable(Of TextSpan)
Dim eventBlock = node.GetAncestor(Of EventBlockSyntax)()
If eventBlock Is Nothing Then
Return SpecializedCollections.EmptyEnumerable(Of TextSpan)()
End If
Dim highlights As New List(Of TextSpan)()
With eventBlock
With .EventStatement
' This span calculation should also capture the Custom keyword
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
highlights.Add(.EndEventStatement.Span)
End With
Return highlights
End Function
End Class
End Namespace
|
bbarry/roslyn
|
src/EditorFeatures/VisualBasic/Highlighting/KeywordHighlighters/EventBlockHighlighter.vb
|
Visual Basic
|
apache-2.0
| 1,678
|
Imports System.Runtime.InteropServices
Imports System.Dynamic
Imports SignWriterStudio.SQLiteAdapters
Imports System.Text
Public Class DbDictionary
Inherits BaseTableAdapter
Public Sub New()
TableName = "Dictionary"
PrimaryKey = "IDDictionary"
DefaultColumns = New List(Of String) From {"IDDictionary", "IDSignLanguage", "isPrivate", "bkColor", "SWriting", "Photo", "Sign", "SWritingSource",
"PhotoSource", "SignSource", "GUID", "Created", "LastModified", "IDSignPuddle", "SignPuddleUser",
"PuddleTop", "PuddlePrev", "PuddleNext", "PuddlePNG", "PuddleSVG", "PuddleVideoLink", "Sorting"}
End Sub
Public Shared Function GetDictionaryEntries(path As String, where As String) As IQueryResult
Dim dict = New DbDictionary()
Dim query = dict.DefaultGetQuery()
query.Path = path
query.Where = where
Return query.Execute()
End Function
Public Shared Function UpdateSignPuddleId(ByVal path As String, ByVal signWriterGuid As Guid?, ByVal signPuddleId As String) As IQueryResult
Const where As String = " SignWriterGuid "
Dim columns = New List(Of String)()
columns.Add("GUID")
columns.Add("IDSignPuddle")
Dim values = New List(Of List(Of String))() From {New List(Of String)() From {GuidtoBlob(signWriterGuid.GetValueOrDefault()), signPuddleId}}
Dim dict = New DbDictionary()
Dim query = dict.CreateUpdateQuery(path, Nothing)
query.Columns = columns
query.Values = values
query.Where = where
Dim result = query.Execute()
Return result
End Function
Public Shared Function GetIdDoNotExport(path As String) As List(Of String)
Const where As String = " isPrivate "
Dim columns = New List(Of String)()
columns.Add("IDDictionary")
Dim dict = New DbDictionary()
Dim query = dict.DefaultGetQuery()
query.Path = path
query.Columns = columns
query.Where = where
Dim result = query.Execute()
Return IdList(result)
End Function
Public Shared Function GetAllIds(path As String) As List(Of String)
Dim columns = New List(Of String)()
columns.Add("IDDictionary")
Dim dict = New DbDictionary()
Dim query = dict.DefaultGetQuery()
query.Path = path
query.Columns = columns
Dim result = query.Execute()
Return IdList(result)
End Function
Private Shared Function IdList(ByVal queryResult As IQueryResult) As List(Of String)
Dim table = queryResult.TabularResults.FirstOrDefault()
Dim list1 = New List(Of String)
For Each expandoObject In table
Dim row = TryCast(expandoObject, IDictionary(Of [String], Object))
Dim str = row.Item("IDDictionary").ToString()
list1.Add(str)
Next
Return list1
End Function
End Class
|
JonathanDDuncan/SignWriterStudio
|
DbTags/DbDictionary.vb
|
Visual Basic
|
mit
| 3,045
|
#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
Public Class TickByTickBidAskEventArgs
Inherits AbstractEventArgsWithTimestamp
Public ReadOnly Property RequestId As Integer
Public ReadOnly Property Time As Date
Public ReadOnly Property BidPrice As Double
Public ReadOnly Property AskPrice As Double
Public ReadOnly Property BidSize As Integer
Public ReadOnly Property AskSize As Integer
Public ReadOnly Property Attributes As TickAttributes
Public Sub New(timestamp As DateTime, requestId As Integer, time As Date, bidPrice As Double, askPrice As Double, bidSize As Integer, askSize As Integer, attributes As TickAttributes)
MyBase.New()
Me._Timestamp = timestamp
Me.RequestId = requestId
Me.Time = time
Me.BidPrice = bidPrice
Me.AskPrice = askPrice
Me.BidSize = bidSize
Me.AskSize = askSize
Me.Attributes = attributes
End Sub
End Class
|
tradewright/tradewright-twsapi
|
src/IBAPI/EventArgs/TickByTickBidAskEventArgs.vb
|
Visual Basic
|
mit
| 2,093
|
Option Strict On
Option Explicit On
Option Infer Off
Imports MySql.Data.MySqlClient
Public Class DatabaseClient
Implements IDisposable
Private ServerString As String
Private DatabaseString As String
Private UIDString As String
Private PasswordString As String
Private LatestDT As DataTable
Private SQLq As String = ""
Private Tag As Integer = 0
Private HandledThread As ThreadStarter
Public Event ListLoaded(Sender As Object, e As DatabaseListEventArgs)
Public Event ExecutionFailed(ByVal ClientTag As Integer)
Public Event ExistsCheckCompleted(ByVal Exists As Boolean, ByVal RowCount As Integer, ByVal Tag As Integer, ByVal ErrorOccurred As Boolean, ErrorMessage As String)
Public Event ValidationCompleted(ByVal Success As Boolean)
Private DBCSB As MySqlConnectionStringBuilder
Public Property UID As String
Get
Return UIDString
End Get
Set(value As String)
UIDString = value
End Set
End Property
Public Property SQLQuery As String
Get
Return SQLq
End Get
Set(query As String)
SQLq = query
End Set
End Property
Public WriteOnly Property Password As String
Set(Value As String)
DBCSB.Password = Value
End Set
End Property
Public Sub New(ByVal Server As String, ByVal Database As String, ByVal UID As String, ByVal Password As String)
DBCSB = New MySqlConnectionStringBuilder
DBCSB.Server = Server
DBCSB.Database = Database
DBCSB.UserID = UID
DBCSB.Password = Password
End Sub
Public Sub ValidateConnection()
HandledThread = New ThreadStarter(AddressOf AsyncCheckConnection)
HandledThread.WhenFinished = AddressOf ValidateFinished
HandledThread.Start(Me.Connection.ConnectionString)
End Sub
Private Function AsyncCheckConnection(Data As Object) As Boolean
Dim CS As String = DirectCast(Data, String)
Dim DBConnection As New MySqlConnection(CS)
Dim Valid As Boolean = False
With DBConnection
Try
.Open()
If .State = ConnectionState.Open Then
Valid = True
Else
Valid = False
End If
Catch
Valid = False
Finally
.Close()
.Dispose()
End Try
Return Valid
End With
End Function
Private Sub ValidateFinished(Result As Object, e As ThreadStarterEventArgs)
Dim Valid As Boolean = DirectCast(Result, Boolean)
RaiseEvent ValidationCompleted(Valid)
End Sub
Public Overloads Sub Execute(Optional CheckIfExistsOnly As Boolean = False, Optional Tag As Integer = 0)
Dim RegularQueryInstance As New RegularQuery(DBCSB.ConnectionString, SQLq, Tag)
HandledThread = New ThreadStarter(AddressOf ExecuteQuery)
If CheckIfExistsOnly = True Then
RegularQueryInstance.CheckIfExists = True
HandledThread.WhenFinished = AddressOf ExistCheck
Else
HandledThread.WhenFinished = AddressOf GetListFinished
End If
HandledThread.Start(RegularQueryInstance)
End Sub
Public Overloads Sub Execute(Parameters() As String, Values() As String, Optional CheckIfExistsOnly As Boolean = False, Optional Tag As Integer = 0)
Try
If Parameters.Length <> Values.Length Then
Throw New Exception("Parameters() and Values() arguments must be of equal length.")
Else
Dim DBParams As New ParameterizedQuery(DBCSB.GetConnectionString(True), SQLq, Tag)
For i As Integer = 0 To Parameters.Length - 1
DBParams.AddPair(Parameters(i), Values(i))
Next
HandledThread = New ThreadStarter(AddressOf ExecuteParamQuery, Tag)
If CheckIfExistsOnly = True Then
DBParams.CheckIfExists = True
HandledThread.WhenFinished = AddressOf ExistCheck
Else
HandledThread.WhenFinished = AddressOf GetListFinished
End If
HandledThread.Start(DBParams)
End If
Catch ex As Exception
Throw ex
RaiseEvent ExecutionFailed(Me.Tag)
End Try
End Sub
Private Sub ExistCheck(Result As Object, e As ThreadStarterEventArgs)
Dim ResultArr() As Object = DirectCast(Result, Object())
RaiseEvent ExistsCheckCompleted(DirectCast(ResultArr(0), Boolean), DirectCast(ResultArr(1), Integer), DirectCast(ResultArr(2), Integer), DirectCast(ResultArr(3), Boolean), DirectCast(ResultArr(4), String))
End Sub
' FIKS
Private Function ExecuteParamQuery(Params As Object) As Object
Dim ParamInstance As ParameterizedQuery = DirectCast(Params, ParameterizedQuery)
Dim DBConnection As New MySqlConnection(ParamInstance.ConnectionString)
Dim ErrorOccurred As Boolean
Dim ErrorMessage As String = "Nothing to show"
Dim Ret(2) As Object
Dim RetTable As New DataTable
Try
DBConnection.Open()
Dim SQLcmd As New MySqlCommand(ParamInstance.Query, DBConnection)
Dim iLast As Integer = ParamInstance.Count - 1
With SQLcmd.Parameters
For i As Integer = 0 To iLast
.AddWithValue(ParamInstance.Pair(i)(0), ParamInstance.Pair(i)(1))
Next
End With
Dim SqlDA As New MySqlDataAdapter(SQLcmd)
With SqlDA
.Fill(RetTable)
.Dispose()
End With
SQLcmd.Dispose()
Catch ex As Exception
ErrorOccurred = True
ErrorMessage = ex.Message
Finally
With DBConnection
.Close()
.Dispose()
End With
End Try
If Not ParamInstance.CheckIfExists Then
Ret(0) = RetTable
Ret(1) = ErrorOccurred
Ret(2) = ErrorMessage
Return Ret
Else
Dim Result(4) As Object
Dim RetCount As Integer
With RetTable
RetCount = .Rows.Count
If RetCount > 0 Then
Result(0) = True
Else
Result(0) = False
End If
Result(1) = RetCount
Result(2) = ParamInstance.Tag
Result(3) = ErrorOccurred
Result(4) = ErrorMessage
.Dispose()
End With
Return Result
End If
End Function
Private Function ExecuteQuery(Params As Object) As Object
Dim QueryInstance As RegularQuery = DirectCast(Params, RegularQuery)
Dim DBConnection As New MySqlConnection(QueryInstance.ConnectionString)
Dim Ret(2) As Object
Dim RetTable As New DataTable
Dim ErrorOccurred As Boolean = False
Dim ErrorMessage As String = ""
Try
DBConnection.Open()
Dim SQLcmd As New MySqlCommand(QueryInstance.Query, DBConnection)
Dim SqlDA As New MySqlDataAdapter
With SqlDA
.SelectCommand = SQLcmd
.Fill(RetTable)
SQLcmd.Dispose()
.Dispose()
End With
Catch ex As Exception
ErrorOccurred = True
ErrorMessage = ex.Message
Finally
With DBConnection
.Close()
.Dispose()
End With
End Try
Ret(0) = RetTable
Ret(1) = ErrorOccurred
Ret(2) = ErrorMessage
Return Ret
End Function
Public ReadOnly Property Connection As MySqlConnectionStringBuilder
Get
Return DBCSB
End Get
End Property
Private Sub GetListFinished(State As Object, e As ThreadStarterEventArgs)
Dim RetArr() As Object = DirectCast(State, Object())
Dim DT As DataTable = DirectCast(RetArr(0), DataTable)
Dim ErrorOccurred As Boolean = DirectCast(RetArr(1), Boolean)
Dim ErrorMessage As String = DirectCast(RetArr(2), String)
If DT IsNot Nothing Then
RaiseEvent ListLoaded(Me, New DatabaseListEventArgs(DT, ErrorOccurred, ErrorMessage))
Else
RaiseEvent ExecutionFailed(Me.Tag)
End If
End Sub
#Region "IDisposable Support"
Private disposedValue As Boolean ' To detect redundant calls
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not disposedValue Then
If disposing Then
ServerString = ""
DatabaseString = ""
UIDString = ""
PasswordString = ""
SQLq = ""
If Not LatestDT Is Nothing Then
LatestDT.Clear()
LatestDT.Dispose()
End If
If Not HandledThread Is Nothing Then
HandledThread.Dispose()
End If
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
End If
disposedValue = True
End Sub
' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources.
'Protected Overrides Sub Finalize()
' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
' Dispose(False)
' MyBase.Finalize()
'End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
Dispose(True)
' TODO: uncomment the following line if Finalize() is overridden above.
' GC.SuppressFinalize(Me)
End Sub
#End Region
Private Class RegularQuery
Private Q As String
Private TagInt As Integer = 0
Private ConString As String
Private ReturnBoolean As Boolean = False
Public ReadOnly Property Tag As Integer
Get
Return TagInt
End Get
End Property
Public Property CheckIfExists As Boolean
Get
Return ReturnBoolean
End Get
Set(value As Boolean)
ReturnBoolean = value
End Set
End Property
Public Sub New(ByVal ConnectionString As String, ByVal Query As String, ByVal Tag As Integer)
TagInt = Tag
Q = Query
ConString = ConnectionString
End Sub
Public ReadOnly Property Query As String
Get
Return Q
End Get
End Property
Public ReadOnly Property ConnectionString As String
Get
Return ConString
End Get
End Property
End Class
Private Class ParameterizedQuery
Private Q As String
Private ParameterPairs As List(Of String())
Private ConString As String
Private TagInt As Integer = 0
Private ReturnBoolean As Boolean = False
Public ReadOnly Property Tag As Integer
Get
Return TagInt
End Get
End Property
Public Property CheckIfExists As Boolean
Get
Return ReturnBoolean
End Get
Set(value As Boolean)
ReturnBoolean = value
End Set
End Property
Public ReadOnly Property Count As Integer
Get
Return ParameterPairs.Count
End Get
End Property
Public ReadOnly Property Pair(ByVal index As Integer) As String()
Get
Return ParameterPairs(index)
End Get
End Property
Public Sub New(ByVal ConnectionString As String, ByVal Query As String, ByVal Tag As Integer)
Q = Query
TagInt = Tag
ParameterPairs = New List(Of String())
ConString = ConnectionString
End Sub
Public ReadOnly Property Query As String
Get
Return Q
End Get
End Property
Public ReadOnly Property ConnectionString As String
Get
Return ConString
End Get
End Property
Public Sub AddPair(ByVal ParameterName As String, ByVal ParameterValue As String)
ParameterPairs.Add({ParameterName, ParameterValue})
End Sub
End Class
End Class
|
Audiopolis/Gruppe21-prosjekt
|
AudiopoLib/AudiopoLib/DatabaseClient.vb
|
Visual Basic
|
mit
| 12,830
|
Module Common
Public Const sTitle As String = "ISPiggy" ' title of program
Public Const iMinDomain As Integer = 5 ' minimum word size for domain name
Public Const iMaxDomain As Integer = 8 ' maximum word size for domain name
Public Const sSuccess As String = "Success! " ' message for successful/valid domain
Public Const sLblName As String = "Random Domain: " ' random domain label set
Public iStopper As Integer ' tracks events within btnStart click
'---------------------------------------------------------------------------------------
' Procedure : Snooze
' Purpose : Controlled pause for specified seconds
' How to Use: Snooze(intSeconds)
'---------------------------------------------------------------------------------------
Public Sub Snooze(ByVal seconds As Integer)
Console.WriteLine("In the snooze")
For i As Integer = 0 To seconds * 100
System.Threading.Thread.Sleep(10)
Application.DoEvents()
Next
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cleanStart
' Purpose : sets all Form1 labels on start / restart
' How to Use: cleanStart()
'---------------------------------------------------------------------------------------
Public Sub cleanStart()
Form1.stat01.Text = "READY"
Form1.lblName.Text = sLblName
Form1.btnStop.Enabled = False
Form1.btnStart.Enabled = True
Form1.btnIndicator.BackColor = Color.Green
Form1.lblLoopCheck.Text = Nothing
End Sub
'---------------------------------------------------------------------------------------
' Procedure : myRandom
' Purpose : generate random number between iMinVal and iMaxVal
' How to Use: iVar = myRandom (iMinValue, iMaxValue)
'---------------------------------------------------------------------------------------
Public Function myRandom(iMinVal As Integer, iMaxVal As Integer)
myRandom = Int((iMaxVal - iMinVal + 1) * Rnd()) + iMinVal
End Function
'---------------------------------------------------------------------------------------
' Procedure : isOdd
' Purpose : test if intNumber number is odd, returns 1, else returns 0
' How to Use: intVar = isOdd (intNumber)
'---------------------------------------------------------------------------------------
Public Function isOdd(iNumber As Integer)
If Int(iNumber) Mod 2 > 0 Then
isOdd = 0 ' Odd Number, return 0
Else
isOdd = 1 ' Even Number, return 1
End If
End Function
'---------------------------------------------------------------------------------------
' Procedure : checkDebugMode
' Purpose : checks status of debug mode and sets Form1 accordingly
' How to Use: checkDebugMode ()
'---------------------------------------------------------------------------------------
Public Sub checkDebugMode()
If Form1.chkDebug.Checked Then ' we are in debug mode, checked
Form1.Size = New Size(580, 150) ' sets debug form size
Form1.MaximumSize = New Size(580, 150) ' disables resizing up
Form1.MinimumSize = New Size(580, 150) ' disables resizing down
Form1.stat01.Text = "Entering interactive DEBUG mode"
Form1.btnStart.Enabled = False ' disable start button
Form1.btnStop.Enabled = True
Else ' we are in production mode, unchecked
Form1.Size = New Size(320, 150) ' sets production form size
Form1.MaximumSize = New Size(320, 150) ' disables resizing up
Form1.MinimumSize = New Size(320, 150) ' disables resizing down
Form1.stat01.Text = "Press START to Begin"
Form1.btnStart.Enabled = True ' enable start button
Form1.lblName.Text = sLblName ' resets domain text
End If
End Sub
End Module
|
meliton/ISPiggy
|
ISPiggyVB17/Common.vb
|
Visual Basic
|
mit
| 4,283
|
Namespace Core
''' <summary></summary>
''' <autogenerated>Generated from a T4 template. Modifications will be lost, if applicable use a partial class instead.</autogenerated>
''' <generator-date>03/02/2014 13:07:05</generator-date>
''' <generator-functions>1</generator-functions>
''' <generator-source>Athena\Athena\_Core\Generated\Action.tt</generator-source>
''' <generator-template>Text-Templates\Classes\VB_Object.tt</generator-template>
''' <generator-version>1</generator-version>
<System.CodeDom.Compiler.GeneratedCode("Athena\Athena\_Core\Generated\Action.tt", "1")> _
<System.Serializable()> _
Partial Public Class Action
Inherits System.Object
Implements System.IComparable
Implements System.ComponentModel.INotifyPropertyChanged
#Region " Public Constructors "
''' <summary>Default Constructor</summary>
Public Sub New()
MyBase.New()
m_Created = DateTime.Now()
End Sub
''' <summary>Parametered Constructor (1 Parameters)</summary>
Public Sub New( _
ByVal _Id As System.Int64 _
)
MyBase.New()
m_Id = _Id
m_Created = DateTime.Now()
End Sub
''' <summary>Parametered Constructor (2 Parameters)</summary>
Public Sub New( _
ByVal _Id As System.Int64, _
ByVal _Instance As System.Int64 _
)
MyBase.New()
m_Id = _Id
Instance = _Instance
m_Created = DateTime.Now()
End Sub
''' <summary>Parametered Constructor (3 Parameters)</summary>
Public Sub New( _
ByVal _Id As System.Int64, _
ByVal _Instance As System.Int64, _
ByVal _Event As System.Int64 _
)
MyBase.New()
m_Id = _Id
Instance = _Instance
[Event] = _Event
m_Created = DateTime.Now()
End Sub
''' <summary>Parametered Constructor (4 Parameters)</summary>
Public Sub New( _
ByVal _Id As System.Int64, _
ByVal _Instance As System.Int64, _
ByVal _Event As System.Int64, _
ByVal _Agent As System.Int32 _
)
MyBase.New()
m_Id = _Id
Instance = _Instance
[Event] = _Event
Agent = _Agent
m_Created = DateTime.Now()
End Sub
''' <summary>Parametered Constructor (5 Parameters)</summary>
Public Sub New( _
ByVal _Id As System.Int64, _
ByVal _Instance As System.Int64, _
ByVal _Event As System.Int64, _
ByVal _Agent As System.Int32, _
ByVal _Created As System.DateTime _
)
MyBase.New()
m_Id = _Id
Instance = _Instance
[Event] = _Event
Agent = _Agent
m_Created = _Created
End Sub
#End Region
#Region " Class Plumbing/Interface Code "
#Region " IComparable Implementation "
#Region " Public Methods "
''' <summary>Comparison Method</summary>
Public Overridable Function IComparable_CompareTo( _
ByVal value As System.Object _
) As System.Int32 Implements System.IComparable.CompareTo
Dim typed_Value As Action = TryCast(value, Action)
If typed_Value Is Nothing Then
Throw New ArgumentException(String.Format("Value is not of comparable type: {0}", value.GetType.Name), "Value")
Else
Dim return_Value As Integer = 0
return_Value = Created.CompareTo(typed_Value.Created)
If return_Value <> 0 Then Return return_Value
Return return_Value
End If
End Function
#End Region
#End Region
#Region " DbRetrievable Implementation "
#Region " Protected Methods "
''' <summary>This method should be overridden to provide custom validation logic.</summary>
Protected Overridable Function DbRetrievable_ValidateForSet() As Boolean
Return True
End Function
#End Region
Public Class All
Implements System.Collections.Generic.IEnumerable(Of Action)
Implements System.Collections.Generic.IEnumerator(Of Action)
Implements System.ComponentModel.ITypedList
#Region " Public Enums "
<Flags()> _
Public Enum Filters As System.Int64
ID = 1
INSTANCE = 2
[EVENT] = 4
AGENT = 8
CREATED = 16
End Enum
#End Region
#Region " Private Variables "
''' <summary></summary>
''' <remarks></remarks>
Private IDX_ACTION_ID As System.Int32 = -1
''' <summary></summary>
''' <remarks></remarks>
Private IDX_ACTION_INSTANCE As System.Int32 = -1
''' <summary></summary>
''' <remarks></remarks>
Private IDX_ACTION_EVENT As System.Int32 = -1
''' <summary></summary>
''' <remarks></remarks>
Private IDX_ACTION_AGENT As System.Int32 = -1
''' <summary></summary>
''' <remarks></remarks>
Private IDX_ACTION_CREATED As System.Int32 = -1
#End Region
#Region " Protected Variables "
''' <summary></summary>
''' <remarks></remarks>
Protected Cmd As System.Data.IDbCommand
''' <summary></summary>
''' <remarks></remarks>
Protected Rdr As System.Data.IDataReader
''' <summary></summary>
''' <remarks></remarks>
Protected Cur As Action
''' <summary></summary>
''' <remarks></remarks>
Protected Ini As System.Boolean
''' <summary></summary>
''' <remarks></remarks>
Protected Idx As System.Int32
''' <summary></summary>
''' <remarks></remarks>
Protected Own As System.Int32 = System.Threading.Thread.CurrentThread.ManagedThreadId
#End Region
#Region " Protected Methods "
Protected Function Hydrate( _
ByVal reader As System.Data.IDataReader _
) As Action
Return Hydrate(New Action(), reader)
End Function
Protected Function Hydrate( _
ByRef value As Action, _
ByVal reader As System.Data.IDataReader _
) As Action
If Not reader.IsDBNull(IDX_ACTION_ID) Then _
value.m_Id = reader.GetInt64(IDX_ACTION_ID)
If Not reader.IsDBNull(IDX_ACTION_INSTANCE) Then _
value.Instance = reader.GetInt64(IDX_ACTION_INSTANCE)
If Not reader.IsDBNull(IDX_ACTION_EVENT) Then _
value.Event = reader.GetInt64(IDX_ACTION_EVENT)
If Not reader.IsDBNull(IDX_ACTION_AGENT) Then _
value.Agent = reader.GetInt32(IDX_ACTION_AGENT)
If Not reader.IsDBNull(IDX_ACTION_CREATED) Then _
value.m_Created = reader.GetDateTime(IDX_ACTION_CREATED)
Return value
End Function
#End Region
#Region " Public Constructors "
Public Sub New( _
ByVal _cmd As System.Data.IDbCommand _
)
MyBase.New()
Cmd = _cmd
End Sub
#End Region
#Region " IEnumerator Implementation "
Private ReadOnly Property GetCurrent_UnTyped() As Object Implements IEnumerator.Current
Get
Return Cur
End Get
End Property
Private ReadOnly Property GetCurrent_Typed() As Action Implements IEnumerator(Of Action).Current
Get
Return Cur
End Get
End Property
Private Function MoveNext() As Boolean Implements IEnumerator(Of Action).MoveNext
If Not Ini Then Reset()
If Rdr.Read() Then
Cur = Hydrate(Rdr)
Idx += 1
Return True
Else
Cur = Nothing
Return False
End If
End Function
Private Sub Reset() Implements IEnumerator(Of Action).Reset
If Not Rdr Is Nothing Then Rdr.Close()
If Cmd.Connection.State = System.Data.ConnectionState.Closed Then Cmd.Connection.Open()
Rdr = Cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Idx = -1
IDX_ACTION_ID = rdr.GetOrdinal("Action_Id")
If IDX_ACTION_ID < 0 Then Throw New Exception("Mapping For Field Not Correct: Action_Id")
IDX_ACTION_INSTANCE = rdr.GetOrdinal("Action_Instance")
If IDX_ACTION_INSTANCE < 0 Then Throw New Exception("Mapping For Field Not Correct: Action_Instance")
IDX_ACTION_EVENT = rdr.GetOrdinal("Action_Event")
If IDX_ACTION_EVENT < 0 Then Throw New Exception("Mapping For Field Not Correct: Action_Event")
IDX_ACTION_AGENT = rdr.GetOrdinal("Action_Agent")
If IDX_ACTION_AGENT < 0 Then Throw New Exception("Mapping For Field Not Correct: Action_Agent")
IDX_ACTION_CREATED = rdr.GetOrdinal("Action_Created")
If IDX_ACTION_CREATED < 0 Then Throw New Exception("Mapping For Field Not Correct: Action_Created")
Ini = True
End Sub
#End Region
#Region " IEnumerable Implementation "
Private Function GetEnumerator_UnTyped As IEnumerator Implements IEnumerable.GetEnumerator
Return GetEnumerator()
End Function
Private Function GetEnumerator As IEnumerator(Of Action) Implements IEnumerable(Of Action).GetEnumerator
If System.Threading.Thread.CurrentThread.ManagedThreadId = Own AndAlso Idx = -1 Then
Return Me
Else
Return New All(Cmd)
End If
End Function
#End Region
#Region " IDisposable Implementation "
Private Sub Dispose() Implements IEnumerator(Of Action).Dispose
If Not Rdr Is Nothing Then Rdr.Close()
End Sub
#End Region
#Region " ITypedList Implementation "
Public Function GetItemProperties( _
ByVal listAccessors() As System.ComponentModel.PropertyDescriptor _
) As System.ComponentModel.PropertyDescriptorCollection _
Implements System.ComponentModel.ITypedList.GetItemProperties
Return System.ComponentModel.TypeDescriptor.GetProperties(GetType(Action))
End Function
Public Function GetListName( _
ByVal listAccessors() As System.ComponentModel.PropertyDescriptor _
) As String _
Implements System.ComponentModel.ITypedList.GetListName
Return "Enumerable Collection of Action"
End Function
#End Region
#Region " Public Shared Select Methods "
Protected Friend Shared Function [Select]( _
ByVal connection As System.Data.IDbConnection, _
ByVal query As String _
) As IEnumerable(Of Action)
Return [Select](connection, query, _
CType(Nothing, System.Collections.Generic.KeyValuePair(Of System.String, System.Object)()))
End Function
Protected Friend Shared Function [Select]( _
ByVal connection As System.Data.IDbConnection, _
ByVal query As String, _
ByVal ParamArray parameters As System.Collections.Generic.KeyValuePair(Of System.String, System.Object)() _
) As IEnumerable(Of Action)
Dim command As System.Data.IDbCommand = connection.CreateCommand()
If query.IndexOf(" ") > 0 Then command.CommandType = System.Data.CommandType.Text Else command.CommandType = System.Data.CommandType.StoredProcedure
command.CommandText = query
If Not parameters Is Nothing Then
For i As Integer = 0 To parameters.Length - 1
Dim param As System.Data.IDbDataParameter = command.CreateParameter()
param.ParameterName = parameters(i).Key
param.Value = parameters(i).Value
command.Parameters.Add(param)
Next
End If
Return New All(command)
End Function
Protected Friend Shared Function [Select]( _
ByVal command As System.Data.IDbCommand, _
ByVal ParamArray parameters As System.Data.IDbDataParameter() _
) As IEnumerable(Of Action)
If Not parameters Is Nothing Then
For i As Integer = 0 To parameters.Length - 1
If parameters(i).Value Is Nothing AndAlso (parameters(i).Direction = System.Data.ParameterDirection.InputOutput _
OrElse parameters(i).Direction = System.Data.ParameterDirection.Input) Then parameters(i).Value = DBNull.Value
command.Parameters.Add(parameters(i))
Next
End If
Return New All(command)
End Function
#End Region
#Region " Public Shared Enumeration Methods "
Public Shared Function [Get]( _
ByVal connection As System.Data.IDbConnection _
) As IEnumerable(Of Action)
Return [Get](connection, "tbl_Core_Actions")
End Function
Public Shared Function [Get]( _
ByVal connection As System.Data.IDbConnection, _
ByVal viewName As String _
) As IEnumerable(Of Action)
Return [Select](connection, String.Format("SELECT * FROM {0}", viewName))
End Function
Public Shared Function Filter( _
ByVal connection As System.Data.IDbConnection, _
ByVal field As Filters, _
ByVal value As Object _
) As IEnumerable(Of Action)
Return Filter(connection, field, New Object() {value})
End Function
Public Shared Function Filter( _
ByVal connection As System.Data.IDbConnection, _
ByVal fields As Filters, _
ByVal values As Object(), _
Optional ByVal condition_AND As Boolean = True _
) As IEnumerable(Of Action)
Dim value_Index As Integer = 0
Dim parameter_Names As New System.Text.StringBuilder()
Dim parameter_Values As New System.Collections.Generic.List(Of System.Collections.Generic.KeyValuePair(Of System.String, System.Object))
Dim condition_Operator As String = " AND "
If Not condition_AND Then condition_Operator = " OR "
If (fields And 1) = 1 Then
If parameter_Names.Length > 0 Then parameter_Names.Append(condition_Operator)
parameter_Names.Append("(Action_Id = ")
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
parameter_Names.Append("?)")
Else
parameter_Names.Append("@Id)")
End If
parameter_Values.Add(New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Id", values(value_Index)))
value_Index += 1
End If
If (fields And 2) = 2 Then
If parameter_Names.Length > 0 Then parameter_Names.Append(condition_Operator)
parameter_Names.Append("(Action_Instance = ")
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
parameter_Names.Append("?)")
Else
parameter_Names.Append("@Instance)")
End If
parameter_Values.Add(New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Instance", values(value_Index)))
value_Index += 1
End If
If (fields And 4) = 4 Then
If parameter_Names.Length > 0 Then parameter_Names.Append(condition_Operator)
parameter_Names.Append("(Action_Event = ")
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
parameter_Names.Append("?)")
Else
parameter_Names.Append("@Event)")
End If
parameter_Values.Add(New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Event", values(value_Index)))
value_Index += 1
End If
If (fields And 8) = 8 Then
If parameter_Names.Length > 0 Then parameter_Names.Append(condition_Operator)
parameter_Names.Append("(Action_Agent = ")
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
parameter_Names.Append("?)")
Else
parameter_Names.Append("@Agent)")
End If
parameter_Values.Add(New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Agent", values(value_Index)))
value_Index += 1
End If
If (fields And 16) = 16 Then
If parameter_Names.Length > 0 Then parameter_Names.Append(condition_Operator)
parameter_Names.Append("(Action_Created = ")
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
parameter_Names.Append("?)")
Else
parameter_Names.Append("@Created)")
End If
parameter_Values.Add(New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Created", values(value_Index)))
value_Index += 1
End If
Return [Select](connection, String.Format("SELECT * FROM {0} WHERE (" & parameter_Names.ToString() & ")", "tbl_Core_Actions"), _
parameter_Values.ToArray())
End Function
#End Region
#Region " Public Shared Manipulation Methods "
Public Shared Function [Set]( _
ByVal connection As System.Data.IDbConnection, _
ByRef value As Action _
) As Boolean
Return [Set](connection, value, "tbl_Core_Actions")
End Function
Public Shared Function [Set]( _
ByVal connection As System.Data.IDbConnection, _
ByRef value As Action, _
ByVal tableName As String _
) As Boolean
If value Is Nothing Then Throw New ArgumentNullException("value")
If connection Is Nothing Then Throw New ArgumentNullException("connection")
If String.IsNullOrEmpty(tableName) Then Throw New ArgumentNullException("tableName")
If connection.State = System.Data.ConnectionState.Closed Then connection.Open()
Dim return_Value As Boolean = False
If value.DbRetrievable_ValidateForSet Then
Dim insert_New As Boolean = (value.Id <= 0)
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
Dim OLEDB_Proc As String
If insert_New Then
OLEDB_Proc = String.Format("INSERT INTO {0} (Action_Instance, Action_Event, Action_Agent) VALUES (?, ?, ?)", tableName)
Else
OLEDB_Proc = String.Format("UPDATE {0} SET Action_Instance = ?, Action_Event = ?, Action_Agent = ? WHERE (Action_Id = ?)", tableName)
End If
Dim OLEDB_Comm As New System.Data.OleDb.OleDbCommand(OLEDB_Proc, CType(connection, System.Data.OleDb.OleDbConnection))
OLEDB_Comm.CommandType = System.Data.CommandType.Text
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Instance", value.Instance))
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Event", value.Event))
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Agent", value.Agent))
If Not insert_New Then OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Id", value.Id))
return_Value = (OLEDB_Comm.ExecuteNonQuery() = 1)
If insert_New Then
Dim OLEDB_Identity As New System.Data.OleDb.OleDbCommand("SELECT @@IDENTITY", CType(connection, System.Data.OleDb.OleDbConnection))
OLEDB_Identity.CommandType = System.Data.CommandType.Text
value.m_Id = CType(OLEDB_Identity.ExecuteScalar(), System.Int64)
End If
ElseIf connection.GetType Is GetType(System.Data.SqlClient.SqlConnection) Then
Dim SQL_Proc As String
If insert_New Then
SQL_Proc = String.Format("INSERT INTO {0} (Action_Instance, Action_Event, Action_Agent) VALUES (@Instance, @Event, @Agent); SELECT @Id = SCOPE_IDENTITY();", tableName)
Else
SQL_Proc = String.Format("UPDATE {0} SET Action_Instance = @Instance, Action_Event = @Event, Action_Agent = @Agent WHERE (Action_Id = @Id)", tableName)
End If
Dim SQL_Comm As New System.Data.SqlClient.SqlCommand(SQL_Proc, CType(connection, System.Data.SqlClient.SqlConnection))
SQL_Comm.CommandType = System.Data.CommandType.Text
Dim param_1 As New System.Data.SqlClient.SqlParameter("@Id", value.Id)
If insert_New Then param_1.Direction = System.Data.ParameterDirection.Output
SQL_Comm.Parameters.Add(param_1)
Dim param_2 As System.Data.SqlClient.SqlParameter
param_2 = New System.Data.SqlClient.SqlParameter("@Instance", value.Instance)
SQL_Comm.Parameters.Add(param_2)
Dim param_3 As System.Data.SqlClient.SqlParameter
param_3 = New System.Data.SqlClient.SqlParameter("@Event", value.Event)
SQL_Comm.Parameters.Add(param_3)
Dim param_4 As System.Data.SqlClient.SqlParameter
param_4 = New System.Data.SqlClient.SqlParameter("@Agent", value.Agent)
SQL_Comm.Parameters.Add(param_4)
return_Value = (SQL_Comm.ExecuteNonQuery() = 1)
If insert_New Then value.m_Id = CType(param_1.Value, System.Int64)
Else
Throw New NotImplementedException(String.Format("DB Connection of Type: {0} Not Yet Supported", connection.GetType.Name))
End If
End If
If connection.State = System.Data.ConnectionState.Open Then connection.Close()
Return return_Value
End Function
Public Shared Function [Create]( _
ByVal connection As System.Data.IDbConnection, _
ByVal _instance as System.Int64, _
ByVal _event as System.Int64, _
ByVal _agent as System.Int32 _
) As Boolean
Return [Create](connection, _instance, _event, _agent, "tbl_Core_Actions")
End Function
Public Shared Function [Create]( _
ByVal connection As System.Data.IDbConnection, _
ByVal _instance as System.Int64, _
ByVal _event as System.Int64, _
ByVal _agent as System.Int32, _
ByVal tableName As String _
) As Boolean
If connection Is Nothing Then Throw New ArgumentNullException("connection")
If String.IsNullOrEmpty(tableName) Then Throw New ArgumentNullException("tableName")
If connection.State = System.Data.ConnectionState.Closed Then connection.Open()
Dim return_Value As Boolean = False
Dim value As New Action()
value.Instance = _instance
value.Event = _event
value.Agent = _agent
If value.DbRetrievable_ValidateForSet Then
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
Dim OLEDB_Comm As New System.Data.OleDb.OleDbCommand(String.Format("INSERT INTO {0} (Action_Instance, Action_Event, Action_Agent) VALUES (?, ?, ?)", tableName), CType(connection, System.Data.OleDb.OleDbConnection))
OLEDB_Comm.CommandType = System.Data.CommandType.Text
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Instance", value.Instance))
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Event", value.Event))
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Agent", value.Agent))
return_Value = (OLEDB_Comm.ExecuteNonQuery() = 1)
ElseIf connection.GetType Is GetType(System.Data.SqlClient.SqlConnection) Then
Dim SQL_Comm As New System.Data.SqlClient.SqlCommand(String.Format("INSERT INTO {0} (Action_Instance, Action_Event, Action_Agent) VALUES (@Instance, @Event, @Agent); SELECT @Id = SCOPE_IDENTITY();", tableName), CType(connection, System.Data.SqlClient.SqlConnection))
SQL_Comm.CommandType = System.Data.CommandType.Text
Dim param_1 As System.Data.SqlClient.SqlParameter
param_1 = New System.Data.SqlClient.SqlParameter("@Instance", value.Instance)
SQL_Comm.Parameters.Add(param_1)
Dim param_2 As System.Data.SqlClient.SqlParameter
param_2 = New System.Data.SqlClient.SqlParameter("@Event", value.Event)
SQL_Comm.Parameters.Add(param_2)
Dim param_3 As System.Data.SqlClient.SqlParameter
param_3 = New System.Data.SqlClient.SqlParameter("@Agent", value.Agent)
SQL_Comm.Parameters.Add(param_3)
return_Value = (SQL_Comm.ExecuteNonQuery() = 1)
Else
Throw New NotImplementedException(String.Format("DB Connection of Type: {0} Not Yet Supported", connection.GetType.Name))
End If
End If
If connection.State = System.Data.ConnectionState.Open Then connection.Close()
Return return_Value
End Function
#End Region
#Region " Public Shared Identity Methods "
Public Shared Function [One]( _
ByVal connection As System.Data.IDbConnection, _
ByRef value As Action _
) As Action
Return [One](connection, value, "tbl_Core_Actions")
End Function
Public Shared Function [One]( _
ByVal connection As System.Data.IDbConnection, _
ByVal id As System.Int64 _
) As Action
Return [One](connection, id, "tbl_Core_Actions")
End Function
Public Shared Function [One]( _
ByVal connection As System.Data.IDbConnection, _
ByRef value As Action, _
ByVal viewName As String _
) As Action
Return [One](connection, value.Id, viewName)
End Function
Public Shared Function [One]( _
ByVal connection As System.Data.IDbConnection, _
ByVal id As System.Int64, _
ByVal viewName As String _
) As Action
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
Return System.Linq.Enumerable.FirstOrDefault([Select](connection, _
String.Format("SELECT * FROM {0} WHERE (Action_Id = ?)", viewName), _
New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Id", id)))
Else
Return System.Linq.Enumerable.FirstOrDefault([Select](connection, _
String.Format("SELECT * FROM {0} WHERE (Action_Id = @Id)", viewName), _
New System.Collections.Generic.KeyValuePair(Of System.String, System.Object)("Id", id)))
End If
End Function
Public Shared Function [Delete]( _
ByVal connection As System.Data.IDbConnection, _
ByRef value As Action _
) As Boolean
Return [Delete](connection, value, "tbl_Core_Actions")
End Function
Public Shared Function [Delete]( _
ByVal connection As System.Data.IDbConnection, _
ByVal id As System.Int64 _
) As Boolean
Return [Delete](connection, id, "tbl_Core_Actions")
End Function
Public Shared Function [Delete]( _
ByVal connection As System.Data.IDbConnection, _
ByRef value As Action, _
ByVal tableName As String _
) As Boolean
Return [Delete](connection, value.Id, tableName)
End Function
Public Shared Function [Delete]( _
ByVal connection As System.Data.IDbConnection, _
ByVal id As System.Int64, _
ByVal tableName As String _
) As Boolean
If (id <= 0) Then Throw New ArgumentNullException("value")
If connection Is Nothing Then Throw New ArgumentNullException("connection")
If String.IsNullOrEmpty(tableName) Then Throw New ArgumentNullException("tableName")
If connection.State = System.Data.ConnectionState.Closed Then connection.Open()
Dim return_Value As Boolean = False
If connection.GetType Is GetType(System.Data.OleDb.OleDbConnection) Then
Dim OLEDB_Proc As String = String.Format("DELETE FROM {0} WHERE (Action_Id = ?)", tableName)
Dim OLEDB_Comm As New System.Data.OleDb.OleDbCommand(OLEDB_Proc, CType(connection, System.Data.OleDb.OleDbConnection))
OLEDB_Comm.CommandType = System.Data.CommandType.Text
OLEDB_Comm.Parameters.Add(New System.Data.OleDb.OleDbParameter("Id", id))
return_Value = (OLEDB_Comm.ExecuteNonQuery() = 1)
ElseIf connection.GetType Is GetType(System.Data.SqlClient.SqlConnection) Then
Dim SQL_Proc As String = String.Format("DELETE FROM {0} WHERE (Action_Id = @Id)", tableName)
Dim SQL_Comm As New System.Data.SqlClient.SqlCommand(SQL_Proc, CType(connection, System.Data.SqlClient.SqlConnection))
SQL_Comm.CommandType = System.Data.CommandType.Text
SQL_Comm.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Id", id))
return_Value = (SQL_Comm.ExecuteNonQuery() = 1)
Else
Throw New NotImplementedException(String.Format("DB Connection of Type: {0} Not Yet Supported", connection.GetType.Name))
End If
If connection.State = System.Data.ConnectionState.Open Then connection.Close()
Return return_Value
End Function
#End Region
End Class
#End Region
#Region " INotifyPropertyChanged Implementation "
#Region " Public Events "
''' <summary></summary>
''' <remarks></remarks>
Public Event INotifyPropertyChanged_PropertyChanged( _
ByVal sender As System.Object, _
ByVal e As System.ComponentModel.PropertyChangedEventArgs _
) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
#End Region
#Region " Protected Methods "
''' <summary></summary>
''' <remarks></remarks>
Protected Sub INotifyPropertyChanged_RaiseChanged( _
ByVal propertyName As System.String _
)
RaiseEvent INotifyPropertyChanged_PropertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End Sub
#End Region
#End Region
#End Region
#Region " Public Constants "
''' <summary>Public Shared Reference to the Name of the Property: Id</summary>
''' <remarks></remarks>
Public Const PROPERTY_ID As String = "Id"
''' <summary>Public Shared Reference to the Name of the Property: Instance</summary>
''' <remarks></remarks>
Public Const PROPERTY_INSTANCE As String = "Instance"
''' <summary>Public Shared Reference to the Name of the Property: Event</summary>
''' <remarks></remarks>
Public Const PROPERTY_EVENT As String = "Event"
''' <summary>Public Shared Reference to the Name of the Property: Agent</summary>
''' <remarks></remarks>
Public Const PROPERTY_AGENT As String = "Agent"
''' <summary>Public Shared Reference to the Name of the Property: Created</summary>
''' <remarks></remarks>
Public Const PROPERTY_CREATED As String = "Created"
#End Region
#Region " Private Variables "
''' <summary>Private Data Storage Variable for Property: Id</summary>
''' <remarks></remarks>
Private m_Id As System.Int64
''' <summary>Private Data Storage Variable for Property: Instance</summary>
''' <remarks></remarks>
Private m_Instance As System.Int64
''' <summary>Private Data Storage Variable for Property: Event</summary>
''' <remarks></remarks>
Private m_Event As System.Int64
''' <summary>Private Data Storage Variable for Property: Agent</summary>
''' <remarks></remarks>
Private m_Agent As System.Int32
''' <summary>Private Data Storage Variable for Property: Created</summary>
''' <remarks></remarks>
Private m_Created As System.DateTime
#End Region
#Region " Public Properties "
''' <summary>Provides Access to the Property: Id</summary>
''' <remarks></remarks>
<System.Xml.Serialization.XmlElement(ElementName:="Id")> _
Public ReadOnly Property Id() As System.Int64
Get
Return m_Id
End Get
End Property
''' <summary>Provides Access to the Property: Instance</summary>
''' <remarks></remarks>
<System.Xml.Serialization.XmlElement(ElementName:="Instance")> _
Public Property Instance() As System.Int64
Get
Return m_Instance
End Get
Set(value As System.Int64)
m_Instance = value
End Set
End Property
''' <summary>Provides Access to the Property: Event</summary>
''' <remarks></remarks>
<System.Xml.Serialization.XmlElement(ElementName:="Event")> _
Public Property [Event]() As System.Int64
Get
Return m_Event
End Get
Set(value As System.Int64)
m_Event = value
End Set
End Property
''' <summary>Provides Access to the Property: Agent</summary>
''' <remarks></remarks>
<System.Xml.Serialization.XmlElement(ElementName:="Agent")> _
Public Property Agent() As System.Int32
Get
Return m_Agent
End Get
Set(value As System.Int32)
m_Agent = value
End Set
End Property
''' <summary>Provides Access to the Property: Created</summary>
''' <remarks></remarks>
<System.Xml.Serialization.XmlElement(ElementName:="Created")> _
Public ReadOnly Property Created() As System.DateTime
Get
Return m_Created
End Get
End Property
#End Region
End Class
End Namespace
|
thiscouldbejd/Athena
|
Athena/_Core/Generated/Action.vb
|
Visual Basic
|
mit
| 32,438
|
'------------------------------------------------------------------------------
' <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
'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 = false
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.Snipary.Snipery
End Sub
End Class
End Namespace
|
wworks/Snipary
|
Src/My Project/Application.Designer.vb
|
Visual Basic
|
mit
| 1,475
|
Imports BVSoftware.Bvc5.Core
Partial Class BVModules_CreditCardGateways_Authorize_Net_Edit
Inherits Content.BVModule
Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnCancel.Click
Me.NotifyFinishedEditing()
End Sub
Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSave.Click
SaveData()
Me.NotifyFinishedEditing()
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
LoadData()
End If
End Sub
Private Sub LoadData()
Me.UsernameField.Text = SettingsManager.GetSetting("Username")
Me.PasswordField.Text = "**********"
'Me.PasswordField.Text = SettingsManager.GetSetting("Password")
Me.LiveUrlField.Text = SettingsManager.GetSetting("LiveUrl")
Me.TestUrlField.Text = SettingsManager.GetSetting("TestUrl")
Me.chkTestMode.Checked = SettingsManager.GetBooleanSetting("TestMode")
If Me.LiveUrlField.Text.Trim = String.Empty Then
Me.LiveUrlField.Text = "https://secure.authorize.net/gateway/transact.dll"
End If
If Me.TestUrlField.Text.Trim = String.Empty Then
Me.TestUrlField.Text = "https://secure.authorize.net/gateway/transact.dll"
End If
Me.chkDebugMode.Checked = SettingsManager.GetBooleanSetting("DebugMode")
Me.EmailCustomerCheckBox.Checked = SettingsManager.GetBooleanSetting("EmailCustomer")
End Sub
Private Sub SaveData()
SettingsManager.SaveSetting("Username", Me.UsernameField.Text.Trim, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
If Me.PasswordField.Text <> "**********" Then
SettingsManager.SaveSetting("Password", Me.PasswordField.Text.Trim, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
End If
SettingsManager.SaveSetting("LiveUrl", Me.LiveUrlField.Text.Trim, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
SettingsManager.SaveSetting("TestUrl", Me.TestUrlField.Text.Trim, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
SettingsManager.SaveBooleanSetting("TestMode", Me.chkTestMode.Checked, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
SettingsManager.SaveBooleanSetting("DebugMode", Me.chkDebugMode.Checked, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
SettingsManager.SaveBooleanSetting("EmailCustomer", Me.EmailCustomerCheckBox.Checked, "bvsoftware", "Credit Card Gateway", "Authorize.Net")
End Sub
End Class
|
ajaydex/Scopelist_2015
|
BVModules/CreditCardGateways/Authorize.Net/Edit.ascx.vb
|
Visual Basic
|
apache-2.0
| 2,667
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
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()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Label5 = New System.Windows.Forms.Label
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.Label6 = New System.Windows.Forms.Label
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(107, 75)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(100, 20)
Me.TextBox1.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Calibri", 18.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(12, 13)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(157, 29)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Bensinforbruk"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(17, 78)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(53, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Kilometer:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(17, 104)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(30, 13)
Me.Label3.TabIndex = 4
Me.Label3.Text = "Liter:"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(107, 101)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(100, 20)
Me.TextBox2.TabIndex = 3
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(17, 130)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(70, 13)
Me.Label4.TabIndex = 6
Me.Label4.Text = "Tid i minutter:"
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(107, 127)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(100, 20)
Me.TextBox3.TabIndex = 5
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(107, 154)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(100, 23)
Me.Button1.TabIndex = 7
Me.Button1.Text = "Kalkuler"
Me.Button1.UseVisualStyleBackColor = True
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(17, 212)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(91, 13)
Me.Label5.TabIndex = 9
Me.Label5.Text = "Gjennomsnittsfart:"
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(107, 183)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.ReadOnly = True
Me.TextBox4.Size = New System.Drawing.Size(100, 20)
Me.TextBox4.TabIndex = 8
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(17, 186)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(79, 13)
Me.Label6.TabIndex = 11
Me.Label6.Text = "Forbruk per mil:"
'
'TextBox5
'
Me.TextBox5.Location = New System.Drawing.Point(107, 209)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.ReadOnly = True
Me.TextBox5.Size = New System.Drawing.Size(100, 20)
Me.TextBox5.TabIndex = 10
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(224, 239)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.TextBox5)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "Form1"
Me.Text = "Bensinforbruk"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
End Class
|
niikoo/NProj
|
Windows/Skole/Bensinforbruk/Bensinforbruk/Form1.Designer.vb
|
Visual Basic
|
apache-2.0
| 6,794
|
Public Class Detail_Arsip
Private Sub BTNKeluarPencarian_Click(sender As Object, e As EventArgs) Handles btnClose.Click
Me.Close()
End Sub
Private Sub Detail_Arsip_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
End Class
|
anakpantai/busus
|
SIMARSIP/Windows Form/Detail Arsip.vb
|
Visual Basic
|
apache-2.0
| 284
|
' 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.CodeFixes
Imports Microsoft.CodeAnalysis.Diagnostics
Imports Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics
Imports Microsoft.CodeAnalysis.VisualBasic.Diagnostics
Imports Microsoft.CodeAnalysis.VisualBasic.GenerateConstructor
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.GenerateConstructor
Public Class GenerateConstructorTests
Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Return (Nothing, New GenerateConstructorCodeFixProvider())
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateIntoContainingType() As Task
Await TestInRegularAndScriptAsync(
"Class C
Sub Main()
Dim f = New C([|4|], 5, 6)
End Sub
End Class",
"Class C
Private v1 As Integer
Private v2 As Integer
Private v3 As Integer
Public Sub New(v1 As Integer, v2 As Integer, v3 As Integer)
Me.v1 = v1
Me.v2 = v2
Me.v3 = v3
End Sub
Sub Main()
Dim f = New C(4, 5, 6)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestInvokingFromInsideAnotherConstructor() As Task
Await TestInRegularAndScriptAsync(
"Class A
Private v As B
Public Sub New()
Me.v = New B([|5|])
End Sub
End Class
Friend Class B
End Class",
"Class A
Private v As B
Public Sub New()
Me.v = New B(5)
End Sub
End Class
Friend Class B
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMissingGenerateDefaultConstructor() As Task
Await TestMissingInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a = New [|A|]()
End Sub
End Class
Class A
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMissingGenerateDefaultConstructorInStructure() As Task
Await TestMissingInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a = New [|A|]()
End Sub
End Class
Structure A
End Structure")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOfferDefaultConstructorWhenOverloadExists() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a = [|New A()|]
End Sub
End Class
Class A
Sub New(x As Integer)
End Sub
End Class",
"Class Test
Sub Main()
Dim a = New A()
End Sub
End Class
Class A
Public Sub New()
End Sub
Sub New(x As Integer)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestParameterizedConstructorOffered1() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a = New A([|1|])
End Sub
End Class
Class A
End Class",
"Class Test
Sub Main()
Dim a = New A(1)
End Sub
End Class
Class A
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestParameterizedConstructorOffered2() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a = New A([|1|])
End Sub
End Class
Class A
Public Sub New()
End Sub
End Class",
"Class Test
Sub Main()
Dim a = New A(1)
End Sub
End Class
Class A
Private v As Integer
Public Sub New()
End Sub
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<WorkItem(527627, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/527627"), WorkItem(539735, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539735"), WorkItem(539735, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539735")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestInAsNewExpression() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a As New A([|1|])
End Sub
End Class
Class A
Public Sub New()
End Sub
End Class",
"Class Test
Sub Main()
Dim a As New A(1)
End Sub
End Class
Class A
Private v As Integer
Public Sub New()
End Sub
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateInPartialClass1() As Task
Await TestInRegularAndScriptAsync(
"Public Partial Class Test
Public Sub S1()
End Sub
End Class
Public Class Test
Public Sub S2()
End Sub
End Class
Public Class A
Sub Main()
Dim s = New Test([|5|])
End Sub
End Class",
"Public Partial Class Test
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
Public Sub S1()
End Sub
End Class
Public Class Test
Public Sub S2()
End Sub
End Class
Public Class A
Sub Main()
Dim s = New Test(5)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateInPartialClassWhenArityDoesntMatch() As Task
Await TestInRegularAndScriptAsync(
"Public Partial Class Test
Public Sub S1()
End Sub
End Class
Public Class Test(Of T)
Public Sub S2()
End Sub
End Class
Public Class A
Sub Main()
Dim s = New Test([|5|])
End Sub
End Class",
"Public Partial Class Test
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
Public Sub S1()
End Sub
End Class
Public Class Test(Of T)
Public Sub S2()
End Sub
End Class
Public Class A
Sub Main()
Dim s = New Test(5)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateInPartialClassWithConflicts() As Task
Await TestInRegularAndScriptAsync(
"Public Partial Class Test2
End Class
Private Partial Class Test2
End Class
Public Class A
Sub Main()
Dim s = New Test2([|5|])
End Sub
End Class",
"Public Partial Class Test2
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
Private Partial Class Test2
End Class
Public Class A
Sub Main()
Dim s = New Test2(5)
End Sub
End Class")
End Function
<WorkItem(528257, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528257")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateIntoInaccessibleType() As Task
Await TestMissingInRegularAndScriptAsync(
"Class Goo
Private Class Bar
End Class
End Class
Class A
Sub Main()
Dim s = New Goo.Bar([|5|])
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOnNestedTypes() As Task
Await TestInRegularAndScriptAsync(
"Class Goo
Class Bar
End Class
End Class
Class A
Sub Main()
Dim s = New Goo.Bar([|5|])
End Sub
End Class",
"Class Goo
Class Bar
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
End Class
Class A
Sub Main()
Dim s = New Goo.Bar(5)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOnNestedPartialTypes() As Task
Await TestInRegularAndScriptAsync(
"Public Partial Class Test
Public Partial Class NestedTest
Public Sub S1()
End Sub
End Class
End Class
Public Partial Class Test
Public Partial Class NestedTest
Public Sub S2()
End Sub
End Class
End Class
Class A
Sub Main()
Dim s = New Test.NestedTest([|5|])
End Sub
End Class",
"Public Partial Class Test
Public Partial Class NestedTest
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
Public Sub S1()
End Sub
End Class
End Class
Public Partial Class Test
Public Partial Class NestedTest
Public Sub S2()
End Sub
End Class
End Class
Class A
Sub Main()
Dim s = New Test.NestedTest(5)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOnNestedGenericType() As Task
Await TestInRegularAndScriptAsync(
"Class Outer(Of T)
Public Class Inner
End Class
Public i = New Inner([|5|])
End Class",
"Class Outer(Of T)
Public Class Inner
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
Public i = New Inner(5)
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOnGenericTypes1() As Task
Await TestInRegularAndScriptAsync(
"Class Base(Of T, V)
End Class
Class Test
Sub Goo()
Dim a = New Base(Of Integer, Integer)([|5|], 5)
End Sub
End Class",
"Class Base(Of T, V)
Private v1 As Integer
Private v2 As Integer
Public Sub New(v1 As Integer, v2 As Integer)
Me.v1 = v1
Me.v2 = v2
End Sub
End Class
Class Test
Sub Goo()
Dim a = New Base(Of Integer, Integer)(5, 5)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOnGenericTypes2() As Task
Await TestInRegularAndScriptAsync(
"Class Base(Of T, V)
End Class
Class Derived(Of V)
Inherits Base(Of Integer, V)
End Class
Class Test
Sub Goo()
Dim a = New Base(Of Integer, Integer)(5, 5)
Dim b = New Derived(Of Integer)([|5|])
End Sub
End Class",
"Class Base(Of T, V)
End Class
Class Derived(Of V)
Inherits Base(Of Integer, V)
Private v1 As Integer
Public Sub New(v1 As Integer)
Me.v1 = v1
End Sub
End Class
Class Test
Sub Goo()
Dim a = New Base(Of Integer, Integer)(5, 5)
Dim b = New Derived(Of Integer)(5)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOnGenericTypes3() As Task
Await TestInRegularAndScriptAsync(
"Class Base(Of T, V)
End Class
Class Derived(Of V)
Inherits Base(Of Integer, V)
End Class
Class MoreDerived
Inherits Derived(Of Double)
End Class
Class Test
Sub Goo()
Dim a = New Base(Of Integer, Integer)(5, 5)
Dim b = New Derived(Of Integer)(5)
Dim c = New MoreDerived([|5.5|])
End Sub
End Class",
"Class Base(Of T, V)
End Class
Class Derived(Of V)
Inherits Base(Of Integer, V)
End Class
Class MoreDerived
Inherits Derived(Of Double)
Private v As Double
Public Sub New(v As Double)
Me.v = v
End Sub
End Class
Class Test
Sub Goo()
Dim a = New Base(Of Integer, Integer)(5, 5)
Dim b = New Derived(Of Integer)(5)
Dim c = New MoreDerived(5.5)
End Sub
End Class")
End Function
<WorkItem(528244, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528244")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestDateTypeForInference() As Task
Await TestInRegularAndScriptAsync(
"Class Goo
End Class
Class A
Sub Main()
Dim s = New Goo([|Date.Now|])
End Sub
End Class",
"Class Goo
Private now As Date
Public Sub New(now As Date)
Me.now = now
End Sub
End Class
Class A
Sub Main()
Dim s = New Goo(Date.Now)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestBaseConstructor() As Task
Await TestInRegularAndScriptAsync(
"Class Base
End Class
Class Derived
Inherits Base
Private x As Integer
Public Sub New(x As Integer)
MyBase.New([|x|])
Me.x = x
End Sub
End Class",
"Class Base
Private x As Integer
Public Sub New(x As Integer)
Me.x = x
End Sub
End Class
Class Derived
Inherits Base
Private x As Integer
Public Sub New(x As Integer)
MyBase.New(x)
Me.x = x
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMustInheritBase() As Task
Await TestInRegularAndScriptAsync(
"MustInherit Class Base
End Class
Class Derived
Inherits Base
Shared x As Integer
Public Sub New(x As Integer)
MyBase.New([|x|]) 'This should generate a protected ctor in Base
Derived.x = x
End Sub
Sub Test1()
Dim a As New Derived(1)
End Sub
End Class",
"MustInherit Class Base
Private x As Integer
Protected Sub New(x As Integer)
Me.x = x
End Sub
End Class
Class Derived
Inherits Base
Shared x As Integer
Public Sub New(x As Integer)
MyBase.New(x) 'This should generate a protected ctor in Base
Derived.x = x
End Sub
Sub Test1()
Dim a As New Derived(1)
End Sub
End Class")
End Function
<WorkItem(540586, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540586")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMissingOnNoCloseParen() As Task
Await TestMissingInRegularAndScriptAsync(
"Imports System
Imports System.Collections.Generic
Imports System.Linq
Module Program
Sub Main(args As String())
Dim c = New [|goo|](
End Sub
End Module
Class goo
End Class")
End Function
<WorkItem(540545, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540545")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestConversionError() As Task
Await TestInRegularAndScriptAsync(
"Imports System
Module Program
Sub Main(args As String())
Dim i As Char
Dim cObject As C = New C([|i|])
Console.WriteLine(cObject.v1)
End Sub
End Module
Class C
Public v1 As Integer
Public Sub New(v1 As Integer)
Me.v1 = v1
End Sub
End Class",
"Imports System
Module Program
Sub Main(args As String())
Dim i As Char
Dim cObject As C = New C(i)
Console.WriteLine(cObject.v1)
End Sub
End Module
Class C
Public v1 As Integer
Private i As Char
Public Sub New(v1 As Integer)
Me.v1 = v1
End Sub
Public Sub New(i As Char)
Me.i = i
End Sub
End Class")
End Function
<WorkItem(540642, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540642")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestNotOnNestedConstructor() As Task
Await TestInRegularAndScriptAsync(
"Module Program
Sub Main(args As String())
Dim x As C = New C([|New C()|])
End Sub
End Module
Friend Class C
End Class",
"Module Program
Sub Main(args As String())
Dim x As C = New C(New C())
End Sub
End Module
Friend Class C
Private c As C
Public Sub New(c As C)
Me.c = c
End Sub
End Class")
End Function
<WorkItem(540607, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540607")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestUnavailableTypeParameters() As Task
Await TestInRegularAndScriptAsync(
"Class C(Of T1, T2)
Sub M(x As T1, y As T2)
Dim a As Test = New Test([|x|], y)
End Sub
End Class
Friend Class Test
End Class",
"Class C(Of T1, T2)
Sub M(x As T1, y As T2)
Dim a As Test = New Test(x, y)
End Sub
End Class
Friend Class Test
Private x As Object
Private y As Object
Public Sub New(x As Object, y As Object)
Me.x = x
Me.y = y
End Sub
End Class")
End Function
<WorkItem(540748, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540748")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestKeywordArgument1() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Private [Class] As Integer = 5
Sub Main()
Dim a = New A([|[Class]|])
End Sub
End Class
Class A
End Class",
"Class Test
Private [Class] As Integer = 5
Sub Main()
Dim a = New A([Class])
End Sub
End Class
Class A
Private [class] As Integer
Public Sub New([class] As Integer)
Me.class = [class]
End Sub
End Class")
End Function
<WorkItem(540747, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540747")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestKeywordArgument2() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Sub Main()
Dim a = New A([|Class|])
End Sub
End Class
Class A
End Class",
"Class Test
Sub Main()
Dim a = New A(Class)
End Sub
End Class
Class A
Private p As Object
Public Sub New(p As Object)
Me.p = p
End Sub
End Class")
End Function
<WorkItem(540746, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540746")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestConflictWithTypeParameterName() As Task
Await TestInRegularAndScriptAsync(
"Class Test
Sub Goo()
Dim a = New Bar(Of Integer)([|5|])
End Sub
End Class
Class Bar(Of V)
End Class",
"Class Test
Sub Goo()
Dim a = New Bar(Of Integer)(5)
End Sub
End Class
Class Bar(Of V)
Private v1 As Integer
Public Sub New(v1 As Integer)
Me.v1 = v1
End Sub
End Class")
End Function
<WorkItem(541174, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541174")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingReadonlyField() As Task
Await TestInRegularAndScriptAsync(
"Class C
ReadOnly x As Integer
Sub Test()
Dim x As Integer = 1
Dim obj As New C([|x|])
End Sub
End Class",
"Class C
ReadOnly x As Integer
Public Sub New(x As Integer)
Me.x = x
End Sub
Sub Test()
Dim x As Integer = 1
Dim obj As New C(x)
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingProperty() As Task
Await TestInRegularAndScriptAsync(
"Class Program
Sub Test()
Dim x = New A([|P|]:=5)
End Sub
End Class
Class A
Public Property P As Integer
End Class",
"Class Program
Sub Test()
Dim x = New A(P:=5)
End Sub
End Class
Class A
Public Sub New(P As Integer)
Me.P = P
End Sub
Public Property P As Integer
End Class")
End Function
<WorkItem(542055, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542055")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingMethod() As Task
Await TestInRegularAndScriptAsync(
"Class A
Sub Test()
Dim t As New C([|u|]:=5)
End Sub
End Class
Class C
Public Sub u()
End Sub
End Class",
"Class A
Sub Test()
Dim t As New C(u:=5)
End Sub
End Class
Class C
Private u1 As Integer
Public Sub New(u As Integer)
u1 = u
End Sub
Public Sub u()
End Sub
End Class")
End Function
<WorkItem(542055, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542055")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestDetectAssignmentToSharedFieldFromInstanceConstructor() As Task
Await TestInRegularAndScriptAsync(
"Class Program
Sub Test()
Dim x = New A([|P|]:=5)
End Sub
End Class
Class A
Shared Property P As Integer
End Class",
"Class Program
Sub Test()
Dim x = New A(P:=5)
End Sub
End Class
Class A
Private P1 As Integer
Public Sub New(P As Integer)
P1 = P
End Sub
Shared Property P As Integer
End Class")
End Function
<WorkItem(542055, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542055")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingFieldWithSameNameButIncompatibleType() As Task
Await TestInRegularAndScriptAsync(
"Class A
Sub Test()
Dim t As New B([|x|]:=5)
End Sub
End Class
Class B
Private x As String
End Class",
"Class A
Sub Test()
Dim t As New B(x:=5)
End Sub
End Class
Class B
Private x As String
Private x1 As Integer
Public Sub New(x As Integer)
x1 = x
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingFieldFromBaseClass() As Task
Await TestInRegularAndScriptAsync(
"Class A
Sub Test()
Dim t As New C([|u|]:=5)
End Sub
End Class
Class C
Inherits B
Private x As String
End Class
Class B
Protected u As Integer
End Class",
"Class A
Sub Test()
Dim t As New C(u:=5)
End Sub
End Class
Class C
Inherits B
Private x As String
Public Sub New(u As Integer)
Me.u = u
End Sub
End Class
Class B
Protected u As Integer
End Class")
End Function
<WorkItem(542098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMeConstructorInitializer() As Task
Await TestInRegularAndScriptAsync(
"Class C
Sub New
Me.New([|1|])
End Sub
End Class",
"Class C
Private v As Integer
Sub New
Me.New(1)
End Sub
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<WorkItem(542098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingMeConstructorInitializer() As Task
Await TestMissingInRegularAndScriptAsync(
"Class C
Private v As Integer
Sub New
Me.[|New|](1)
End Sub
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<WorkItem(542098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMyBaseConstructorInitializer() As Task
Await TestInRegularAndScriptAsync(
"Class C
Sub New
MyClass.New([|1|])
End Sub
End Class",
"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")
End Function
<WorkItem(542098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingMyBaseConstructorInitializer() As Task
Await TestMissingInRegularAndScriptAsync(
"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")
End Function
<WorkItem(542098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMyClassConstructorInitializer() As Task
Await TestInRegularAndScriptAsync(
"Class C
Inherits B
Sub New
MyBase.New([|1|])
End Sub
End Class
Class B
End Class",
"Class C
Inherits B
Sub New
MyBase.New(1)
End Sub
End Class
Class B
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class")
End Function
<WorkItem(542098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestExistingMyClassConstructorInitializer() As Task
Await TestMissingInRegularAndScriptAsync(
"Class C
Inherits B
Sub New
MyBase.New([|1|])
End Sub
End Class
Class B
Protected Sub New(v As Integer)
End Sub
End Class")
End Function
<WorkItem(542056, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542056")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestConflictingFieldNameInSubclass() As Task
Await TestInRegularAndScriptAsync(
"Class A
Sub Test()
Dim t As New C([|u|]:=5)
End Sub
End Class
Class C
Inherits B
Private x As String
End Class
Class B
Protected u As String
End Class",
"Class A
Sub Test()
Dim t As New C(u:=5)
End Sub
End Class
Class C
Inherits B
Private x As String
Private u1 As Integer
Public Sub New(u As Integer)
u1 = u
End Sub
End Class
Class B
Protected u As String
End Class")
End Function
<WorkItem(542442, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542442")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestNothingArgument() As Task
Await TestMissingInRegularAndScriptAsync(
"Class C1
Public Sub New(ByVal accountKey As Integer)
Me.new()
Me.[|new|](accountKey, Nothing)
End Sub
Public Sub New(ByVal accountKey As Integer, ByVal accountName As String)
Me.New(accountKey, accountName, Nothing)
End Sub
Public Sub New(ByVal accountKey As Integer, ByVal accountName As String, ByVal accountNumber As String)
End Sub
End Class")
End Function
<WorkItem(540641, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540641")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMissingOnExistingConstructor() As Task
Await TestMissingInRegularAndScriptAsync(
"Module Program
Sub M()
Dim x As C = New [|C|](P)
End Sub
End Module
Class C
Private v As Object
Public Sub New(v As Object)
Me.v = v
End Sub
End Class")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerationIntoVisibleType() As Task
Await TestInRegularAndScriptAsync(
"#ExternalSource (""Default.aspx"", 1)
Class C
Sub Goo()
Dim x As New D([|5|])
End Sub
End Class
Class D
End Class
#End ExternalSource",
"#ExternalSource (""Default.aspx"", 1)
Class C
Sub Goo()
Dim x As New D(5)
End Sub
End Class
Class D
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
#End ExternalSource")
End Function
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestNoGenerationIntoEntirelyHiddenType() As Task
Await TestMissingInRegularAndScriptAsync(
<Text>#ExternalSource (""Default.aspx"", 1)
Class C
Sub Goo()
Dim x As New D([|5|])
End Sub
End Class
#End ExternalSource
Class D
End Class
</Text>.Value)
End Function
<WorkItem(546030, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546030")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestConflictingDelegatedParameterNameAndNamedArgumentName1() As Task
Await TestInRegularAndScriptAsync(
"Module Program
Sub Main(args As String())
Dim objc As New C(1, [|prop|]:=""Property"")
End Sub
End Module
Class C
Private prop As String
Public Sub New(prop As String)
Me.prop = prop
End Sub
End Class",
"Module Program
Sub Main(args As String())
Dim objc As New C(1, prop:=""Property"")
End Sub
End Module
Class C
Private prop As String
Private v As Integer
Public Sub New(prop As String)
Me.prop = prop
End Sub
Public Sub New(v As Integer, prop As String)
Me.v = v
Me.prop = prop
End Sub
End Class")
End Function
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestFormattingInGenerateConstructor() As Task
Await TestInRegularAndScriptAsync(
<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),
ignoreTrivia:=False)
End Function
<WorkItem(530003, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestAttributesWithArgument() As Task
Await TestInRegularAndScriptAsync(
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
End Class
[|<MyAttribute(123)>|]
Public Class D
End Class",
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
<MyAttribute(123)>
Public Class D
End Class")
End Function
<WorkItem(530003, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestAttributesWithMultipleArguments() As Task
Await TestInRegularAndScriptAsync(
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
End Class
[|<MyAttribute(true, 1, ""hello"")>|]
Public Class D
End Class",
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
Private v1 As Boolean
Private v2 As Integer
Private v3 As String
Public Sub New(v1 As Boolean, v2 As Integer, v3 As String)
Me.v1 = v1
Me.v2 = v2
Me.v3 = v3
End Sub
End Class
<MyAttribute(true, 1, ""hello"")>
Public Class D
End Class")
End Function
<WorkItem(530003, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestAttributesWithNamedArguments() As Task
Await TestInRegularAndScriptAsync(
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
End Class
[|<MyAttribute(true, 1, Topic:=""hello"")>|]
Public Class D
End Class",
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
Private v1 As Boolean
Private v2 As Integer
Private Topic As String
Public Sub New(v1 As Boolean, v2 As Integer, Topic As String)
Me.v1 = v1
Me.v2 = v2
Me.Topic = Topic
End Sub
End Class
<MyAttribute(true, 1, Topic:=""hello"")>
Public Class D
End Class")
End Function
<WorkItem(530003, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestAttributesWithAdditionalConstructors() As Task
Await TestInRegularAndScriptAsync(
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
[|<MyAttribute(True, 2)>|]
Public Class D
End Class",
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
Private v As Integer
Private v1 As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
Public Sub New(v As Integer, v1 As Integer)
Me.New(v)
Me.v1 = v1
End Sub
End Class
<MyAttribute(True, 2)>
Public Class D
End Class")
End Function
<WorkItem(530003, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestAttributesWithAllValidArguments() As Task
Await TestInRegularAndScriptAsync(
"Enum A
A1
End Enum
<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
End Class
[|<MyAttribute(New Short(1) {1, 2, 3}, A.A1, True, 1, ""Z""c, 5S, 1I, 5L, 6.0R, 2.1F, ""abc"")>|]
Public Class D End Class",
"Enum A
A1
End Enum
<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute
Private v1 As Short()
Private a1 As A
Private v2 As Boolean
Private v3 As Integer
Private v4 As Char
Private v5 As Short
Private v6 As Integer
Private v7 As Long
Private v8 As Double
Private v9 As Single
Private v10 As String
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)
Me.v1 = v1
Me.a1 = a1
Me.v2 = v2
Me.v3 = v3
Me.v4 = v4
Me.v5 = v5
Me.v6 = v6
Me.v7 = v7
Me.v8 = v8
Me.v9 = v9
Me.v10 = v10
End Sub
End Class
<MyAttribute(New Short(1) {1, 2, 3}, A.A1, True, 1, ""Z""c, 5S, 1I, 5L, 6.0R, 2.1F, ""abc"")>
Public Class D End Class")
End Function
<WorkItem(530003, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestAttributesWithLambda() As Task
Await TestMissingInRegularAndScriptAsync(
"<AttributeUsage(AttributeTargets.Class)>
Public Class MyAttribute
Inherits System.Attribute End Class
[|<MyAttribute(Function(x) x + 1)>|]
Public Class D
End Class")
End Function
<WorkItem(889349, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/889349")>
<Fact(), Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestConstructorGenerationForDifferentNamedParameter() As Task
Await TestInRegularAndScriptAsync(
<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),
ignoreTrivia:=False)
End Function
<WorkItem(897355, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/897355")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestOptionStrictOn() As Task
Await TestInRegularAndScriptAsync(
"Option Strict On
Module Module1
Sub Main()
Dim int As Integer = 3
Dim obj As Object = New Object()
Dim c1 As Classic = New Classic(int)
Dim c2 As Classic = [|New Classic(obj)|]
End Sub
Class Classic
Private int As Integer
Public Sub New(int As Integer)
Me.int = int
End Sub
End Class
End Module",
"Option Strict On
Module Module1
Sub Main()
Dim int As Integer = 3
Dim obj As Object = New Object()
Dim c1 As Classic = New Classic(int)
Dim c2 As Classic = New Classic(obj)
End Sub
Class Classic
Private int As Integer
Private obj As Object
Public Sub New(int As Integer)
Me.int = int
End Sub
Public Sub New(obj As Object)
Me.obj = obj
End Sub
End Class
End Module")
End Function
<WorkItem(528257, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528257")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateInInaccessibleType() As Task
Await TestInRegularAndScriptAsync(
"Class Goo
Private Class Bar
End Class
End Class
Class A
Sub Main()
Dim s = New [|Goo.Bar(5)|]
End Sub
End Class",
"Class Goo
Private Class Bar
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
End Class
End Class
Class A
Sub Main()
Dim s = New Goo.Bar(5)
End Sub
End Class")
End Function
Public Class GenerateConstructorTestsWithFindMissingIdentifiersAnalyzer
Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Return (New VisualBasicUnboundIdentifiersDiagnosticAnalyzer(),
New GenerateConstructorCodeFixProvider())
End Function
<WorkItem(1241, "https://github.com/dotnet/roslyn/issues/1241")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateConstructorInIncompleteLambda() As Task
Await TestInRegularAndScriptAsync(
"Imports System.Linq
Class C
Sub New()
Dim s As Action = Sub()
Dim a = New [|C|](0)",
"Imports System.Linq
Class C
Private v As Integer
Sub New()
Dim s As Action = Sub()
Dim a = New C(0)Public Sub New(v As Integer)
Me.v = v
End Sub
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 TestInRegularAndScriptAsync(
"Imports System.Linq
Class C
Private v As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
Sub New()
Dim s As Action = Sub()
Dim a = New [|C|](0, 0)",
"Imports System.Linq
Class C
Private v As Integer
Private v1 As Integer
Public Sub New(v As Integer)
Me.v = v
End Sub
Sub New()
Dim s As Action = Sub()
Dim a = New C(0, 0)Public Sub New(v As Integer, v1 As Integer)
Me.New(v)
Me.v1 = v1
End Sub
End Class
")
End Function
End Class
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateConstructorNotOfferedForDuplicate() As Task
Await TestMissingInRegularAndScriptAsync(
"Imports System
Class X
Private v As String
Public Sub New(v As String)
Me.v = v
End Sub
Sub Test()
Dim x As X = New X(New [|String|]())
End Sub
End Class")
End Function
<WorkItem(9575, "https://github.com/dotnet/roslyn/issues/9575")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMissingOnMethodCall() As Task
Await TestMissingInRegularAndScriptAsync(
"class C
public sub new(int arg)
end sub
public function M(s as string, i as integer, b as boolean) as boolean
return [|M|](i, b)
end function
end class")
End Function
<WorkItem(13749, "https://github.com/dotnet/roslyn/issues/13749")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function Support_Readonly_Properties() As Task
Await TestInRegularAndScriptAsync(
"Class C
ReadOnly Property Prop As Integer
End Class
Module P
Sub M()
Dim prop = 42
Dim c = New C([|prop|])
End Sub
End Module",
"Class C
Public Sub New(prop As Integer)
Me.Prop = prop
End Sub
ReadOnly Property Prop As Integer
End Class
Module P
Sub M()
Dim prop = 42
Dim c = New C(prop)
End Sub
End Module")
End Function
End Class
End Namespace
|
kelltrick/roslyn
|
src/EditorFeatures/VisualBasicTest/GenerateConstructor/GenerateConstructorTests.vb
|
Visual Basic
|
apache-2.0
| 42,638
|
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Option Strict Off
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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/527627"), WorkItem(539735, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539735"), WorkItem(539735, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539735")>
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528257")>
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528244")>
<Fact, 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
<Fact, 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
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540586")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540545")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540642")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540607")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540748")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540747")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540746")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541174")>
<Fact, 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
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542055")>
<Fact, 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 u1 = u \n End Sub \n Public Sub u() \n End Sub \n End Class"))
End Function
<WorkItem(542055, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542055")>
<Fact, 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 P1 = P \n End Sub \n Shared Property P As Integer \n End Class"))
End Function
<WorkItem(542055, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542055")>
<Fact, 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 x1 = x \n End Sub \n End Class"))
End Function
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542098")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542056")>
<Fact, 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 u1 = u \n End Sub \n End Class \n Class B \n Protected u As String \n End Class"))
End Function
<WorkItem(542442, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542442")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540641")>
<Fact, 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
<Fact, 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
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546030")>
<Fact, 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
<Fact(), 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530003")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/889349")>
<Fact(), 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/897355")>
<Fact, 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, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528257")>
<Fact, 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")>
<Fact, 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")>
<Fact, 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")>
<Fact, 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
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestGenerateConstructorNotOfferedForDuplicate() As Task
Await TestMissingAsync(
"Imports System
Class X
Private v As String
Public Sub New(v As String)
Me.v = v
End Sub
Sub Test()
Dim x As X = New X(New [|String|]())
End Sub
End Class")
End Function
<WorkItem(9575, "https://github.com/dotnet/roslyn/issues/9575")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateConstructor)>
Public Async Function TestMissingOnMethodCall() As Task
Await TestMissingAsync(
"class C
public sub new(int arg)
end sub
public function M(s as string, i as integer, b as boolean) as boolean
return [|M|](i, b)
end function
end class")
End Function
End Class
End Namespace
|
michalhosala/roslyn
|
src/EditorFeatures/VisualBasicTest/Diagnostics/GenerateConstructor/GenerateConstructorTests.vb
|
Visual Basic
|
apache-2.0
| 42,908
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class VBMultiColTree_MainForm
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.VbMultiColTreeUserControl1 = New VBMultiColTree.VBMultiColTreeUserControl
Me.SuspendLayout()
'
'VbMultiColTreeUserControl1
'
Me.VbMultiColTreeUserControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.VbMultiColTreeUserControl1.Location = New System.Drawing.Point(0, 0)
Me.VbMultiColTreeUserControl1.Name = "VbMultiColTreeUserControl1"
Me.VbMultiColTreeUserControl1.Size = New System.Drawing.Size(910, 462)
Me.VbMultiColTreeUserControl1.TabIndex = 0
'
'VBMultiColTree_MainForm
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(910, 462)
Me.Controls.Add(Me.VbMultiColTreeUserControl1)
Me.Name = "VBMultiColTree_MainForm"
Me.Text = "VBMultiColTreeMainForm"
Me.ResumeLayout(False)
End Sub
Friend WithEvents VbMultiColTreeUserControl1 As VBMultiColTree.VBMultiColTreeUserControl
End Class
|
kjellski/treeviewadv
|
VBSample/VBMultiColTree/VBMultiColTree_MainForm.Designer.vb
|
Visual Basic
|
bsd-2-clause
| 1,976
|
' Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
Imports Microsoft.VisualBasic
Imports Microsoft.VisualStudio.Shell.Interop
Imports System
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Globalization
Imports System.Windows.Forms
Imports System.ComponentModel
Imports VSLangProj80
Imports VSLangProj90
Namespace Microsoft.VisualStudio.Editors.Common
''' <summary>
''' Support for retrieving and working with the available target framework assemblies
''' for a project.
''' </summary>
''' <remarks></remarks>
Friend Class TargetFrameworkAssemblies
''' <summary>
''' Represents a supported target framework assembly. Can be placed directly into
''' a listbox or combobox (it will show the Description text in the listbox)
''' </summary>
''' <remarks></remarks>
Friend Class TargetFramework
Private m_version As UInteger
Private m_description As String
Public Sub New(ByVal version As UInteger, ByVal description As String)
If description Is Nothing Then
Throw New ArgumentNullException("description")
End If
m_version = version
m_description = description
End Sub
Public ReadOnly Property Version() As UInteger
Get
Return m_version
End Get
End Property
Public ReadOnly Property Description() As String
Get
Return m_description
End Get
End Property
''' <summary>
''' Provides the text to show inside of a combobox/listbox
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Public Overrides Function ToString() As String
Return m_description
End Function
End Class
''' <summary>
''' Retrieves the set of target framework assemblies that are supported
''' </summary>
''' <param name="vsTargetFrameworkAssemblies"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function GetSupportedTargetFrameworkAssemblies(ByVal vsTargetFrameworkAssemblies As IVsTargetFrameworkAssemblies) As IEnumerable(Of TargetFramework)
Dim versions As UInteger() = GetSupportedTargetFrameworkAssemblyVersions(vsTargetFrameworkAssemblies)
Dim targetFrameworks As New List(Of TargetFramework)
For Each version As UInteger In versions
targetFrameworks.Add(New TargetFramework(version, GetTargetFrameworkDescriptionFromVersion(vsTargetFrameworkAssemblies, version)))
Next
Return targetFrameworks.ToArray()
End Function
''' <summary>
''' Retrieve the localized description string for a given target framework
''' version number.
''' </summary>
''' <param name="vsTargetFrameworkAssemblies"></param>
''' <param name="version"></param>
''' <returns></returns>
''' <remarks></remarks>
Private Shared Function GetTargetFrameworkDescriptionFromVersion(ByVal vsTargetFrameworkAssemblies As IVsTargetFrameworkAssemblies, ByVal version As UInteger) As String
Dim pszDescription As String = Nothing
VSErrorHandler.ThrowOnFailure(vsTargetFrameworkAssemblies.GetTargetFrameworkDescription(version, pszDescription))
Return pszDescription
End Function
''' <summary>
''' Retrieve the list of assemblies versions (as uint) that are supported
''' </summary>
''' <param name="vsTargetFrameworkAssemblies"></param>
''' <returns></returns>
''' <remarks></remarks>
Private Shared Function GetSupportedTargetFrameworkAssemblyVersions(ByVal vsTargetFrameworkAssemblies As IVsTargetFrameworkAssemblies) As UInteger()
Dim targetFrameworkEnumerator As IEnumTargetFrameworks = Nothing
VSErrorHandler.ThrowOnFailure(vsTargetFrameworkAssemblies.GetSupportedFrameworks(targetFrameworkEnumerator))
Dim supportedFrameworks As New List(Of UInteger)
While True
Dim rgFrameworks(0) As UInteger
Dim cReturned As UInteger
If VSErrorHandler.Failed(targetFrameworkEnumerator.Next(1, rgFrameworks, cReturned)) OrElse cReturned = 0 Then
Exit While
Else
supportedFrameworks.Add(rgFrameworks(0))
End If
End While
Return supportedFrameworks.ToArray()
End Function
End Class
End Namespace
|
syeerzy/visualfsharp
|
vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/TargetFrameworkAssemblies.vb
|
Visual Basic
|
mit
| 4,852
|
' 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.CodeGen
Imports Microsoft.CodeAnalysis.ExpressionEvaluator
Imports Microsoft.VisualStudio.Debugger.Evaluation
Imports Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation
Imports Roslyn.Test.PdbUtilities
Imports Roslyn.Test.Utilities
Imports Xunit
Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests
Public Class ResultPropertiesTests
Inherits ExpressionCompilerTestBase
<Fact>
Public Sub Category()
Const source = "
Class C
Public Property P() As Integer
Public F As Integer
Public Function M() As Integer
Return 0
End Function
Sub Test(p As Integer)
Dim l As Integer
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
For Each expr In {"Me", "Nothing", "1", "F", "p", "l"}
Assert.Equal(DkmEvaluationResultCategory.Data, GetResultProperties(context, expr).Category)
Next
Assert.Equal(DkmEvaluationResultCategory.Method, GetResultProperties(context, "M()").Category)
Assert.Equal(DkmEvaluationResultCategory.Property, GetResultProperties(context, "Me.P").Category)
End Sub
<Fact>
Public Sub StorageType()
Const source = "
Class C
Public Property P() As Integer
Public F As Integer
Public Function M() As Integer
Return 0
End Function
Public Shared Property SP() As Integer
Public Shared SF As Integer
Public Shared Function SM() As Integer
Return 0
End Function
Sub Test(p As Integer)
Dim l As Integer
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
For Each expr In {"Me", "Nothing", "1", "P", "F", "M()", "p", "l"}
Assert.Equal(DkmEvaluationResultStorageType.None, GetResultProperties(context, expr).StorageType)
Next
For Each expr In {"SP", "SF", "SM()"}
Assert.Equal(DkmEvaluationResultStorageType.Static, GetResultProperties(context, expr).StorageType)
Next
End Sub
<Fact>
Public Sub AccessType()
Const ilSource = "
.class public auto ansi beforefieldinit C
extends [mscorlib]System.Object
{
.field private int32 Private
.field family int32 Protected
.field assembly int32 Internal
.field public int32 Public
.field famorassem int32 ProtectedInternal
.field famandassem int32 ProtectedAndInternal
.method public hidebysig instance void
Test() cil managed
{
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
} // end of method C::.ctor
} // end of class C
"
Dim exeBytes As ImmutableArray(Of Byte) = Nothing
Dim pdbBytes As ImmutableArray(Of Byte) = Nothing
EmitILToArray(ilSource, appendDefaultHeader:=True, includePdb:=True, assemblyBytes:=exeBytes, pdbBytes:=pdbBytes)
Dim runtime = CreateRuntimeInstance(
assemblyName:=GetUniqueName(),
references:=ImmutableArray.Create(MscorlibRef),
exeBytes:=exeBytes.ToArray(),
symReader:=New SymReader(pdbBytes.ToArray()))
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
Assert.Equal(DkmEvaluationResultAccessType.Private, GetResultProperties(context, "[Private]").AccessType)
Assert.Equal(DkmEvaluationResultAccessType.Protected, GetResultProperties(context, "[Protected]").AccessType)
Assert.Equal(DkmEvaluationResultAccessType.Internal, GetResultProperties(context, "[Internal]").AccessType)
Assert.Equal(DkmEvaluationResultAccessType.Public, GetResultProperties(context, "[Public]").AccessType)
' As in dev12.
Assert.Equal(DkmEvaluationResultAccessType.Internal, GetResultProperties(context, "ProtectedInternal").AccessType)
Assert.Equal(DkmEvaluationResultAccessType.Internal, GetResultProperties(context, "ProtectedAndInternal").AccessType)
Assert.Equal(DkmEvaluationResultAccessType.None, GetResultProperties(context, "Nothing").AccessType)
End Sub
<Fact>
Public Sub AccessType_Nested()
Const source = "
Imports System
Friend Class C
Public F As Integer
Sub Test()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
' Used the declared accessibility, rather than the effective accessibility.
Assert.Equal(DkmEvaluationResultAccessType.Public, GetResultProperties(context, "F").AccessType)
End Sub
<Fact>
Public Sub ModifierFlags_Virtual()
Const source = "
Imports System
Class C
Public Property P() As Integer
Public Function M() As Integer
Return 0
End Function
Public Overridable Property VP() As Integer
Public Overridable Function VM() As Integer
Return 0
End Function
Sub Test()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
' NOTE: VB doesn't have virtual events
Assert.Equal(DkmEvaluationResultTypeModifierFlags.None, GetResultProperties(context, "P").ModifierFlags)
Assert.Equal(DkmEvaluationResultTypeModifierFlags.Virtual, GetResultProperties(context, "VP").ModifierFlags)
Assert.Equal(DkmEvaluationResultTypeModifierFlags.None, GetResultProperties(context, "M()").ModifierFlags)
Assert.Equal(DkmEvaluationResultTypeModifierFlags.Virtual, GetResultProperties(context, "VM()").ModifierFlags)
End Sub
<Fact>
Public Sub ModifierFlags_Virtual_Variations()
Const source = "
Imports System
MustInherit Class Base
Public MustOverride Property [Overrides]() As Integer
End Class
MustInherit Class Derived : Inherits Base
Public Overrides Property [Overrides]() As Integer
Public MustOverride Property [MustOverride]() As Integer
Sub Test()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="Derived.Test")
Assert.Equal(DkmEvaluationResultTypeModifierFlags.Virtual, GetResultProperties(context, "[MustOverride]").ModifierFlags)
Assert.Equal(DkmEvaluationResultTypeModifierFlags.Virtual, GetResultProperties(context, "[Overrides]").ModifierFlags)
End Sub
<Fact>
Public Sub ModifierFlags_Constant()
Const source = "
Imports System
Class C
Private F As Integer = 1
Private Const CF As Integer = 1
Private Shared ReadOnly SRF = 1
Sub Test(p As Integer)
Dim l As Integer = 2
Const cl As Integer = 2
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
For Each expr In {"Nothing", "1", "1 + 1", "CF", "cl"}
Assert.Equal(DkmEvaluationResultTypeModifierFlags.Constant, GetResultProperties(context, expr).ModifierFlags)
Next
For Each expr In {"Me", "F", "SRF", "p", "l"}
Assert.Equal(DkmEvaluationResultTypeModifierFlags.None, GetResultProperties(context, expr).ModifierFlags)
Next
End Sub
<Fact>
Public Sub ModifierFlags_Volatile()
Const ilSource = "
.class public auto ansi beforefieldinit C
extends [mscorlib]System.Object
{
.field public int32 F
.field public int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) VF
.method public hidebysig instance void
Test() cil managed
{
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
} // end of method C::.ctor
} // end of class C
"
Dim exeBytes As ImmutableArray(Of Byte) = Nothing
Dim pdbBytes As ImmutableArray(Of Byte) = Nothing
EmitILToArray(ilSource, appendDefaultHeader:=True, includePdb:=True, assemblyBytes:=exeBytes, pdbBytes:=pdbBytes)
Dim runtime = CreateRuntimeInstance(
assemblyName:=GetUniqueName(),
references:=ImmutableArray.Create(MscorlibRef),
exeBytes:=exeBytes.ToArray(),
symReader:=New SymReader(pdbBytes.ToArray()))
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
Assert.Equal(DkmEvaluationResultTypeModifierFlags.None, GetResultProperties(context, "F").ModifierFlags)
VerifyErrorResultProperties(context, "VF") ' VB doesn't support volatile
End Sub
<Fact>
Public Sub Assignment()
Const source = "
Class C
Public Overridable Property P() As Integer
Sub Test()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
Dim resultProperties As ResultProperties = Nothing
Dim errorMessage As String = Nothing
Dim missingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
Dim testData As New CompilationTestData()
context.CompileAssignment(
DefaultInspectionContext.Instance,
"P",
"1",
DiagnosticFormatter.Instance,
resultProperties,
errorMessage,
missingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData)
Assert.Null(errorMessage)
Assert.Empty(missingAssemblyIdentities)
Assert.Equal(DkmClrCompilationResultFlags.PotentialSideEffect Or DkmClrCompilationResultFlags.ReadOnlyResult, resultProperties.Flags)
Assert.Equal(Nothing, resultProperties.Category) ' Not Data
Assert.Equal(Nothing, resultProperties.AccessType) ' Not Public
Assert.Equal(Nothing, resultProperties.StorageType)
Assert.Equal(Nothing, resultProperties.ModifierFlags) ' Not Virtual
End Sub
<Fact>
Public Sub LocalDeclaration()
Const source = "
Class C
Sub Test()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
Dim resultProperties As ResultProperties = Nothing
Dim errorMessage As String = Nothing
Dim missingAssemblyIdentities As ImmutableArray(Of AssemblyIdentity) = Nothing
Dim testData As New CompilationTestData()
context.CompileExpression(
InspectionContextFactory.Empty,
"z = 1", ' VB only supports implicit declarations
DkmEvaluationFlags.None,
DiagnosticFormatter.Instance,
resultProperties,
errorMessage,
missingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData)
Assert.Null(errorMessage)
Assert.Empty(missingAssemblyIdentities)
Assert.Equal(DkmClrCompilationResultFlags.PotentialSideEffect Or DkmClrCompilationResultFlags.ReadOnlyResult, resultProperties.Flags)
Assert.Equal(Nothing, resultProperties.Category) ' Not Data
Assert.Equal(Nothing, resultProperties.AccessType)
Assert.Equal(Nothing, resultProperties.StorageType)
Assert.Equal(Nothing, resultProperties.ModifierFlags)
End Sub
<Fact>
Public Sub [Error]()
Const source = "
Class C
Sub Test()
End Sub
End Class
"
Dim comp = CreateCompilationWithMscorlib({source}, options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(runtime, methodName:="C.Test")
VerifyErrorResultProperties(context, "AddressOf Test")
VerifyErrorResultProperties(context, "Missing")
VerifyErrorResultProperties(context, "C")
End Sub
Private Shared Function GetResultProperties(context As EvaluationContextBase, expr As String) As ResultProperties
Dim resultProperties As ResultProperties = Nothing
Dim errorMessage As String = Nothing
context.CompileExpression(expr, resultProperties, errorMessage)
Assert.Null(errorMessage)
Return resultProperties
End Function
Private Shared Sub VerifyErrorResultProperties(context As EvaluationContextBase, expr As String)
Dim resultProperties As ResultProperties = Nothing
Dim errorMessage As String = Nothing
context.CompileExpression(expr, resultProperties, errorMessage)
Assert.NotNull(errorMessage)
Assert.Equal(Nothing, resultProperties)
End Sub
End Class
End Namespace
|
dsplaisted/roslyn
|
src/ExpressionEvaluator/VisualBasic/Test/ExpressionCompiler/ResultPropertiesTests.vb
|
Visual Basic
|
apache-2.0
| 14,453
|
' 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.Threading
Imports Microsoft.CodeAnalysis.Completion
Imports Microsoft.CodeAnalysis.Editor.CommandHandlers
Imports Microsoft.CodeAnalysis.Editor.Implementation.Formatting
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Utilities
Imports Microsoft.CodeAnalysis.Shared.TestHooks
Imports Microsoft.CodeAnalysis.SignatureHelp
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.VisualStudio.Commanding
Imports Microsoft.VisualStudio.Composition
Imports Microsoft.VisualStudio.Language.Intellisense
Imports Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Imports Microsoft.VisualStudio.Text
Imports Microsoft.VisualStudio.Text.Editor
Imports Microsoft.VisualStudio.Text.Editor.Commanding.Commands
Imports Roslyn.Utilities
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
Friend Class TestState
Inherits AbstractCommandHandlerTestState
Private Const timeoutMs = 60000
Private Const editorTimeoutMs = 60000
Friend Const RoslynItem = "RoslynItem"
Friend ReadOnly EditorCompletionCommandHandler As ICommandHandler
Friend ReadOnly CompletionPresenterProvider As ICompletionPresenterProvider
Protected ReadOnly SessionTestState As IIntelliSenseTestState
Private ReadOnly SignatureHelpBeforeCompletionCommandHandler As SignatureHelpBeforeCompletionCommandHandler
Protected ReadOnly SignatureHelpAfterCompletionCommandHandler As SignatureHelpAfterCompletionCommandHandler
Private ReadOnly FormatCommandHandler As FormatCommandHandler
Public Shared ReadOnly CompositionWithoutCompletionTestParts As TestComposition = EditorTestCompositions.EditorFeatures.
AddExcludedPartTypes(
GetType(IIntelliSensePresenter(Of ISignatureHelpPresenterSession, ISignatureHelpSession)),
GetType(FormatCommandHandler)).
AddParts(
GetType(TestSignatureHelpPresenter),
GetType(IntelliSenseTestState),
GetType(MockCompletionPresenterProvider))
Friend ReadOnly Property CurrentSignatureHelpPresenterSession As TestSignatureHelpPresenterSession
Get
Return SessionTestState.CurrentSignatureHelpPresenterSession
End Get
End Property
' Do not call directly. Use TestStateFactory
Friend Sub New(workspaceElement As XElement,
excludedTypes As IEnumerable(Of Type),
extraExportedTypes As IEnumerable(Of Type),
includeFormatCommandHandler As Boolean,
workspaceKind As String,
Optional makeSeparateBufferForCursor As Boolean = False,
Optional roles As ImmutableArray(Of String) = Nothing)
MyBase.New(workspaceElement, GetComposition(excludedTypes, extraExportedTypes, includeFormatCommandHandler), workspaceKind:=workspaceKind, makeSeparateBufferForCursor, roles)
' The current default timeout defined in the Editor may not work on slow virtual test machines.
' Need to use a safe timeout there to follow real code paths.
MyBase.TextView.Options.GlobalOptions.SetOptionValue(DefaultOptions.ResponsiveCompletionThresholdOptionId, editorTimeoutMs)
Dim languageServices = Me.Workspace.CurrentSolution.Projects.First().LanguageServices
Dim language = languageServices.Language
Me.SessionTestState = GetExportedValue(Of IIntelliSenseTestState)()
Me.SignatureHelpBeforeCompletionCommandHandler = GetExportedValue(Of SignatureHelpBeforeCompletionCommandHandler)()
Me.SignatureHelpAfterCompletionCommandHandler = GetExportedValue(Of SignatureHelpAfterCompletionCommandHandler)()
Me.FormatCommandHandler = If(includeFormatCommandHandler, GetExportedValue(Of FormatCommandHandler)(), Nothing)
CompletionPresenterProvider = GetExportedValues(Of ICompletionPresenterProvider)().
Single(Function(e As ICompletionPresenterProvider) e.GetType().FullName = "Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense.MockCompletionPresenterProvider")
EditorCompletionCommandHandler = GetExportedValues(Of ICommandHandler)().
Single(Function(e As ICommandHandler) e.GetType().Name = PredefinedCompletionNames.CompletionCommandHandler)
End Sub
Private Overloads Shared Function GetComposition(
excludedTypes As IEnumerable(Of Type),
extraExportedTypes As IEnumerable(Of Type),
includeFormatCommandHandler As Boolean) As TestComposition
Dim composition = CompositionWithoutCompletionTestParts.
AddExcludedPartTypes(excludedTypes).
AddParts(extraExportedTypes)
If includeFormatCommandHandler Then
composition = composition.AddParts(GetType(FormatCommandHandler))
End If
Return composition
End Function
#Region "Editor Related Operations"
Protected Overloads Sub ExecuteTypeCharCommand(args As TypeCharCommandArgs, finalHandler As Action, context As CommandExecutionContext, completionCommandHandler As IChainedCommandHandler(Of TypeCharCommandArgs))
Dim sigHelpHandler = DirectCast(SignatureHelpBeforeCompletionCommandHandler, IChainedCommandHandler(Of TypeCharCommandArgs))
Dim formatHandler = DirectCast(FormatCommandHandler, IChainedCommandHandler(Of TypeCharCommandArgs))
If formatHandler Is Nothing Then
sigHelpHandler.ExecuteCommand(
args, Sub() completionCommandHandler.ExecuteCommand(
args, finalHandler, context), context)
Else
formatHandler.ExecuteCommand(
args, Sub() sigHelpHandler.ExecuteCommand(
args, Sub() completionCommandHandler.ExecuteCommand(
args, finalHandler, context), context), context)
End If
End Sub
Public Overloads Sub SendTab()
Dim handler = GetHandler(Of IChainedCommandHandler(Of TabKeyCommandArgs))()
MyBase.SendTab(Sub(a, n, c) handler.ExecuteCommand(a, n, c), Sub() EditorOperations.InsertText(vbTab))
End Sub
Public Overloads Sub SendReturn()
Dim handler = GetHandler(Of IChainedCommandHandler(Of ReturnKeyCommandArgs))()
MyBase.SendReturn(Sub(a, n, c) handler.ExecuteCommand(a, n, c), Sub() EditorOperations.InsertNewLine())
End Sub
Public Overrides Sub SendBackspace()
Dim compHandler = GetHandler(Of IChainedCommandHandler(Of BackspaceKeyCommandArgs))()
MyBase.SendBackspace(Sub(a, n, c) compHandler.ExecuteCommand(a, n, c), AddressOf MyBase.SendBackspace)
End Sub
Public Overrides Sub SendDelete()
Dim compHandler = GetHandler(Of IChainedCommandHandler(Of DeleteKeyCommandArgs))()
MyBase.SendDelete(Sub(a, n, c) compHandler.ExecuteCommand(a, n, c), AddressOf MyBase.SendDelete)
End Sub
Public Sub SendDeleteToSpecificViewAndBuffer(view As IWpfTextView, buffer As ITextBuffer)
Dim compHandler = GetHandler(Of IChainedCommandHandler(Of DeleteKeyCommandArgs))()
compHandler.ExecuteCommand(New DeleteKeyCommandArgs(view, buffer), AddressOf MyBase.SendDelete, TestCommandExecutionContext.Create())
End Sub
Private Overloads Sub ExecuteTypeCharCommand(args As TypeCharCommandArgs, finalHandler As Action, context As CommandExecutionContext)
Dim compHandler = GetHandler(Of IChainedCommandHandler(Of TypeCharCommandArgs))()
ExecuteTypeCharCommand(args, finalHandler, context, compHandler)
End Sub
Public Overloads Sub SendTypeChars(typeChars As String)
MyBase.SendTypeChars(typeChars, Sub(a, n, c) ExecuteTypeCharCommand(a, n, c))
End Sub
Public Overloads Sub SendEscape()
MyBase.SendEscape(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, Sub() SignatureHelpAfterCompletionCommandHandler.ExecuteCommand(a, n, c), c), Sub() Return)
End Sub
Public Overloads Sub SendDownKey()
MyBase.SendDownKey(
Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, Sub() SignatureHelpAfterCompletionCommandHandler.ExecuteCommand(a, n, c), c),
Sub()
EditorOperations.MoveLineDown(extendSelection:=False)
End Sub)
End Sub
Public Overloads Sub SendUpKey()
MyBase.SendUpKey(
Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, Sub() SignatureHelpAfterCompletionCommandHandler.ExecuteCommand(a, n, c), c),
Sub()
EditorOperations.MoveLineUp(extendSelection:=False)
End Sub)
End Sub
Public Overloads Sub SendPageUp()
Dim handler = DirectCast(EditorCompletionCommandHandler, ICommandHandler(Of PageUpKeyCommandArgs))
MyBase.SendPageUp(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendCut()
MyBase.SendCut(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendPaste()
MyBase.SendPaste(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendInvokeCompletionList()
MyBase.SendInvokeCompletionList(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendInsertSnippetCommand()
MyBase.SendInsertSnippetCommand(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendSurroundWithCommand()
MyBase.SendSurroundWithCommand(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendSave()
MyBase.SendSave(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Sub SendSelectAll()
MyBase.SendSelectAll(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overrides Sub SendDeleteWordToLeft()
Dim compHandler = DirectCast(EditorCompletionCommandHandler, ICommandHandler(Of WordDeleteToStartCommandArgs))
MyBase.SendWordDeleteToStart(Sub(a, n, c) compHandler.ExecuteCommand(a, n, c), AddressOf MyBase.SendDeleteWordToLeft)
End Sub
Public Overloads Sub SendToggleCompletionMode()
Dim handler = DirectCast(EditorCompletionCommandHandler, ICommandHandler(Of ToggleCompletionModeCommandArgs))
MyBase.SendToggleCompletionMode(Sub(a, n, c) handler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Protected Function GetHandler(Of T As ICommandHandler)() As T
Return DirectCast(EditorCompletionCommandHandler, T)
End Function
#End Region
#Region "Completion Operations"
Public Async Function SendCommitUniqueCompletionListItemAsync() As Task
Await WaitForAsynchronousOperationsAsync()
' When we send the commit completion list item, it processes asynchronously; we can find out when it's complete
' by seeing that either the items are updated or the list is dismissed. We'll use a TaskCompletionSource to track
' when it's done which will release an async token.
Dim sessionComplete = New TaskCompletionSource(Of Object)()
Dim asynchronousOperationListenerProvider = Workspace.ExportProvider.GetExportedValue(Of AsynchronousOperationListenerProvider)()
Dim asyncToken = asynchronousOperationListenerProvider.GetListener(FeatureAttribute.CompletionSet) _
.BeginAsyncOperation("SendCommitUniqueCompletionListItemAsync")
#Disable Warning BC42358 ' Because this call is not awaited, execution of the current method continues before the call is completed
sessionComplete.Task.CompletesAsyncOperation(asyncToken)
#Enable Warning BC42358 ' Because this call is not awaited, execution of the current method continues before the call is completed
Dim itemsUpdatedHandler = Sub(sender As Object, e As Data.ComputedCompletionItemsEventArgs)
' If there is 0 or more than one item left, then it means this was the filter operation that resulted and we're done.
' Otherwise we know a Dismiss operation is coming so we should wait for it.
If e.Items.Items.Count() <> 1 Then
Task.Run(Sub()
Thread.Sleep(5000)
sessionComplete.TrySetResult(Nothing)
End Sub)
End If
End Sub
Dim sessionDismissedHandler = Sub(sender As Object, e As EventArgs) sessionComplete.TrySetResult(Nothing)
Dim session As IAsyncCompletionSession
Dim addHandlers = Sub(sender As Object, e As Data.CompletionTriggeredEventArgs)
AddHandler e.CompletionSession.ItemsUpdated, itemsUpdatedHandler
AddHandler e.CompletionSession.Dismissed, sessionDismissedHandler
session = e.CompletionSession
End Sub
Dim asyncCompletionBroker As IAsyncCompletionBroker = GetExportedValue(Of IAsyncCompletionBroker)()
session = asyncCompletionBroker.GetSession(TextView)
If session Is Nothing Then
AddHandler asyncCompletionBroker.CompletionTriggered, addHandlers
Else
' A session was already active so we'll fake the event
addHandlers(asyncCompletionBroker, New Data.CompletionTriggeredEventArgs(session, TextView))
End If
MyBase.SendCommitUniqueCompletionListItem(Sub(a, n, c) EditorCompletionCommandHandler.ExecuteCommand(a, n, c), Sub() Return)
Await WaitForAsynchronousOperationsAsync()
RemoveHandler session.ItemsUpdated, itemsUpdatedHandler
RemoveHandler session.Dismissed, sessionDismissedHandler
RemoveHandler asyncCompletionBroker.CompletionTriggered, addHandlers
' It's possible for the wait to bail and give up if it was clear nothing was completing; ensure we clean up our
' async token so as not to interfere with later tests.
sessionComplete.TrySetResult(Nothing)
End Function
Public Async Function AssertNoCompletionSession() As Task
Await WaitForAsynchronousOperationsAsync()
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
If session Is Nothing Then
Return
End If
If session.IsDismissed Then
Return
End If
Dim completionItems = session.GetComputedItems(CancellationToken.None)
' During the computation we can explicitly dismiss the session or we can return no items.
' Each of these conditions mean that there is no active completion.
Assert.True(session.IsDismissed OrElse completionItems.Items.Count() = 0, "AssertNoCompletionSession")
End Function
Public Sub AssertNoCompletionSessionWithNoBlock()
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
If session Is Nothing Then
Return
End If
If session.IsDismissed Then
Return
End If
' If completionItems cannot be calculated in 5 seconds, no session exists.
Dim task1 = Task.Delay(5000)
Dim task2 = Task.Run(
Sub()
Dim completionItems = session.GetComputedItems(CancellationToken.None)
' In the non blocking mode, we are not interested for a session appeared later than in 5 seconds.
If task1.Status = TaskStatus.Running Then
' During the computation we can explicitly dismiss the session or we can return no items.
' Each of these conditions mean that there is no active completion.
Assert.True(session.IsDismissed OrElse completionItems.Items.Count() = 0)
End If
End Sub)
Task.WaitAny(task1, task2)
End Sub
Public Async Function AssertCompletionSession(Optional projectionsView As ITextView = Nothing) As Task
Await WaitForAsynchronousOperationsAsync()
Dim view = If(projectionsView, TextView)
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(view)
Assert.NotNull(session)
End Function
Public Async Function AssertCompletionItemsDoNotContainAny(ParamArray displayText As String()) As Task
Await WaitForAsynchronousOperationsAsync()
Dim items = GetCompletionItems()
Assert.False(displayText.Any(Function(v) items.Any(Function(i) i.DisplayText = v)))
End Function
Public Async Function AssertCompletionItemsContainAll(ParamArray displayText As String()) As Task
Await WaitForAsynchronousOperationsAsync()
Dim items = GetCompletionItems()
Assert.True(displayText.All(Function(v) items.Any(Function(i) i.DisplayText = v)))
End Function
Public Async Function AssertCompletionItemsContain(displayText As String, displayTextSuffix As String) As Task
Await WaitForAsynchronousOperationsAsync()
Dim items = GetCompletionItems()
Assert.True(items.Any(Function(i) i.DisplayText = displayText AndAlso i.DisplayTextSuffix = displayTextSuffix))
End Function
Public Sub AssertItemsInOrder(expectedOrder As String())
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Assert.NotNull(session)
Dim items = session.GetComputedItems(CancellationToken.None).Items
Assert.Equal(expectedOrder.Count, items.Count)
For i = 0 To expectedOrder.Count - 1
Assert.Equal(expectedOrder(i), items(i).DisplayText)
Next
End Sub
Public Sub AssertItemsInOrder(expectedOrder As (String, String)())
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Assert.NotNull(session)
Dim items = session.GetComputedItems(CancellationToken.None).Items
Assert.Equal(expectedOrder.Count, items.Count)
For i = 0 To expectedOrder.Count - 1
Assert.Equal(expectedOrder(i).Item1, items(i).DisplayText)
Assert.Equal(expectedOrder(i).Item2, items(i).Suffix)
Next
End Sub
Public Async Function AssertSelectedCompletionItem(
Optional displayText As String = Nothing,
Optional displayTextSuffix As String = Nothing,
Optional description As String = Nothing,
Optional isSoftSelected As Boolean? = Nothing,
Optional isHardSelected As Boolean? = Nothing,
Optional shouldFormatOnCommit As Boolean? = Nothing,
Optional inlineDescription As String = Nothing,
Optional automationText As String = Nothing,
Optional projectionsView As ITextView = Nothing) As Task
Await WaitForAsynchronousOperationsAsync()
Dim view = If(projectionsView, TextView)
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(view)
Assert.NotNull(session)
Dim items = session.GetComputedItems(CancellationToken.None)
If isSoftSelected.HasValue Then
If isSoftSelected.Value Then
Assert.True(items.UsesSoftSelection, "Current completion is not soft-selected. Expected: soft-selected")
Else
Assert.False(items.UsesSoftSelection, "Current completion is soft-selected. Expected: not soft-selected")
End If
End If
If isHardSelected.HasValue Then
If isHardSelected.Value Then
Assert.True(Not items.UsesSoftSelection, "Current completion is not hard-selected. Expected: hard-selected")
Else
Assert.True(items.UsesSoftSelection, "Current completion is hard-selected. Expected: not hard-selected")
End If
End If
If displayText IsNot Nothing Then
Assert.NotNull(items.SelectedItem)
If displayTextSuffix IsNot Nothing Then
Assert.NotNull(items.SelectedItem)
Assert.Equal(displayText + displayTextSuffix, items.SelectedItem.DisplayText)
Else
Assert.Equal(displayText, items.SelectedItem.DisplayText)
End If
End If
If shouldFormatOnCommit.HasValue Then
Assert.Equal(shouldFormatOnCommit.Value, GetRoslynCompletionItem(items.SelectedItem).Rules.FormatOnCommit)
End If
If description IsNot Nothing Then
Dim itemDescription = Await GetSelectedItemDescriptionAsync()
Assert.Equal(description, itemDescription.Text)
End If
If inlineDescription IsNot Nothing Then
Assert.Equal(inlineDescription, items.SelectedItem.Suffix)
End If
If automationText IsNot Nothing Then
Assert.Equal(automationText, items.SelectedItem.AutomationText)
End If
End Function
Public Async Function GetSelectedItemDescriptionAsync() As Task(Of CompletionDescription)
Dim document = Me.Workspace.CurrentSolution.Projects.First().Documents.First()
Dim service = CompletionService.GetService(document)
Dim roslynItem = GetSelectedItem()
Return Await service.GetDescriptionAsync(document, roslynItem)
End Function
Public Sub AssertCompletionItemExpander(isAvailable As Boolean, isSelected As Boolean)
Dim presenter = DirectCast(CompletionPresenterProvider.GetOrCreate(Me.TextView), MockCompletionPresenter)
Dim expander = presenter.GetExpander()
If Not isAvailable Then
Assert.False(isSelected)
Assert.Null(expander)
Else
Assert.NotNull(expander)
Assert.Equal(expander.IsSelected, isSelected)
End If
End Sub
Public Sub SetCompletionItemExpanderState(isSelected As Boolean)
Dim presenter = DirectCast(CompletionPresenterProvider.GetOrCreate(Me.TextView), MockCompletionPresenter)
Dim expander = presenter.GetExpander()
Assert.NotNull(expander)
presenter.SetExpander(isSelected)
End Sub
Public Async Function AssertSessionIsNothingOrNoCompletionItemLike(text As String) As Task
Await WaitForAsynchronousOperationsAsync()
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
If Not session Is Nothing Then
Await AssertCompletionItemsDoNotContainAny(text)
End If
End Function
Public Function GetSelectedItem() As CompletionItem
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Assert.NotNull(session)
Dim items = session.GetComputedItems(CancellationToken.None)
Return GetRoslynCompletionItem(items.SelectedItem)
End Function
Public Sub CalculateItemsIfSessionExists()
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
If session IsNot Nothing Then
Dim item = session.GetComputedItems(CancellationToken.None).SelectedItem
End If
End Sub
Public Function GetCompletionItems() As IList(Of CompletionItem)
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Assert.NotNull(session)
Return session.GetComputedItems(CancellationToken.None).Items.Select(Function(item) GetRoslynCompletionItem(item)).ToList()
End Function
Private Shared Function GetRoslynCompletionItem(item As Data.CompletionItem) As CompletionItem
Return If(item IsNot Nothing, DirectCast(item.Properties(RoslynItem), CompletionItem), Nothing)
End Function
Public Sub RaiseFiltersChanged(args As ImmutableArray(Of Data.CompletionFilterWithState))
Dim presenter = DirectCast(CompletionPresenterProvider.GetOrCreate(Me.TextView), MockCompletionPresenter)
Dim newArgs = New Data.CompletionFilterChangedEventArgs(args)
presenter.TriggerFiltersChanged(Me, newArgs)
End Sub
Public Function GetCompletionItemFilters() As ImmutableArray(Of Data.CompletionFilterWithState)
Dim presenter = DirectCast(CompletionPresenterProvider.GetOrCreate(Me.TextView), MockCompletionPresenter)
Return presenter.GetFilters()
End Function
Public Function HasSuggestedItem() As Boolean
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Assert.NotNull(session)
Dim computedItems = session.GetComputedItems(CancellationToken.None)
Return computedItems.SuggestionItem IsNot Nothing
End Function
Public Function IsSoftSelected() As Boolean
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Assert.NotNull(session)
Dim computedItems = session.GetComputedItems(CancellationToken.None)
Return computedItems.UsesSoftSelection
End Function
Public Sub SendSelectCompletionItem(displayText As String)
Dim session = GetExportedValue(Of IAsyncCompletionBroker)().GetSession(TextView)
Dim operations = DirectCast(session, IAsyncCompletionSessionOperations)
operations.SelectCompletionItem(session.GetComputedItems(CancellationToken.None).Items.Single(Function(i) i.DisplayText = displayText))
End Sub
Public Async Function WaitForUIRenderedAsync() As Task
Await WaitForAsynchronousOperationsAsync()
Dim tcs = New TaskCompletionSource(Of Boolean)
Dim presenter = DirectCast(CompletionPresenterProvider.GetOrCreate(TextView), MockCompletionPresenter)
Dim uiUpdated As EventHandler(Of Data.CompletionItemSelectedEventArgs)
uiUpdated = Sub()
RemoveHandler presenter.UiUpdated, uiUpdated
tcs.TrySetResult(True)
End Sub
AddHandler presenter.UiUpdated, uiUpdated
Dim ct = New CancellationTokenSource(timeoutMs)
ct.Token.Register(Sub() tcs.TrySetCanceled(), useSynchronizationContext:=False)
Await tcs.Task.ConfigureAwait(True)
End Function
Public Overloads Sub SendTypeCharsToSpecificViewAndBuffer(typeChars As String, view As IWpfTextView, buffer As ITextBuffer)
For Each ch In typeChars
Dim localCh = ch
ExecuteTypeCharCommand(New TypeCharCommandArgs(view, buffer, localCh), Sub() EditorOperations.InsertText(localCh.ToString()), TestCommandExecutionContext.Create())
Next
End Sub
Public Async Function AssertLineTextAroundCaret(expectedTextBeforeCaret As String, expectedTextAfterCaret As String) As Task
Await WaitForAsynchronousOperationsAsync()
Dim actual = GetLineTextAroundCaretPosition()
Assert.Equal(expectedTextBeforeCaret, actual.TextBeforeCaret)
Assert.Equal(expectedTextAfterCaret, actual.TextAfterCaret)
End Function
Public Sub NavigateToDisplayText(targetText As String)
Dim currentText = GetSelectedItem().DisplayText
' GetComputedItems provided by the Editor for tests does not guarantee that
' the order of items match the order of items actually displayed in the completion popup.
' For example, they put starred items (intellicode) below non-starred ones.
' And the order they display those items in the UI is opposite.
' Therefore, we do the full traverse: down to the bottom and if not found up to the top.
Do While currentText <> targetText
SendDownKey()
Dim newText = GetSelectedItem().DisplayText
If currentText = newText Then
' Nothing found on going down. Try going up
Do While currentText <> targetText
SendUpKey()
newText = GetSelectedItem().DisplayText
Assert.True(newText <> currentText, "Reached the bottom, then the top and didn't find the match")
currentText = newText
Loop
End If
currentText = newText
Loop
End Sub
#End Region
#Region "Signature Help Operations"
Public Overloads Sub SendInvokeSignatureHelp()
Dim handler = DirectCast(SignatureHelpBeforeCompletionCommandHandler, IChainedCommandHandler(Of InvokeSignatureHelpCommandArgs))
MyBase.SendInvokeSignatureHelp(Sub(a, n, c) handler.ExecuteCommand(a, n, c), Sub() Return)
End Sub
Public Overloads Async Function AssertNoSignatureHelpSession(Optional block As Boolean = True) As Task
If block Then
Await WaitForAsynchronousOperationsAsync()
End If
Assert.Null(Me.CurrentSignatureHelpPresenterSession)
End Function
Public Overloads Async Function AssertSignatureHelpSession() As Task
Await WaitForAsynchronousOperationsAsync()
Assert.NotNull(Me.CurrentSignatureHelpPresenterSession)
End Function
Public Overloads Function GetSignatureHelpItems() As IList(Of SignatureHelpItem)
Return CurrentSignatureHelpPresenterSession.SignatureHelpItems
End Function
Public Async Function AssertSignatureHelpItemsContainAll(displayText As String()) As Task
Await WaitForAsynchronousOperationsAsync()
Assert.True(displayText.All(Function(v) CurrentSignatureHelpPresenterSession.SignatureHelpItems.Any(
Function(i) GetDisplayText(i, CurrentSignatureHelpPresenterSession.SelectedParameter.Value) = v)))
End Function
Public Async Function AssertSelectedSignatureHelpItem(Optional displayText As String = Nothing,
Optional documentation As String = Nothing,
Optional selectedParameter As String = Nothing) As Task
Await WaitForAsynchronousOperationsAsync()
If displayText IsNot Nothing Then
Assert.Equal(displayText, GetDisplayText(Me.CurrentSignatureHelpPresenterSession.SelectedItem, Me.CurrentSignatureHelpPresenterSession.SelectedParameter.Value))
End If
If documentation IsNot Nothing Then
Assert.Equal(documentation, Me.CurrentSignatureHelpPresenterSession.SelectedItem.DocumentationFactory(CancellationToken.None).GetFullText())
End If
If selectedParameter IsNot Nothing Then
Assert.Equal(selectedParameter, GetDisplayText(
Me.CurrentSignatureHelpPresenterSession.SelectedItem.Parameters(
Me.CurrentSignatureHelpPresenterSession.SelectedParameter.Value).DisplayParts))
End If
End Function
#End Region
#Region "Helpers"
Private Shared Function GetDisplayText(item As SignatureHelpItem, selectedParameter As Integer) As String
Dim suffix = If(selectedParameter < item.Parameters.Count,
GetDisplayText(item.Parameters(selectedParameter).SuffixDisplayParts),
String.Empty)
Return String.Join(
String.Empty,
GetDisplayText(item.PrefixDisplayParts),
String.Join(
GetDisplayText(item.SeparatorDisplayParts),
item.Parameters.Select(Function(p) GetDisplayText(p.DisplayParts))),
GetDisplayText(item.SuffixDisplayParts),
suffix)
End Function
Private Shared Function GetDisplayText(parts As IEnumerable(Of TaggedText)) As String
Return String.Join(String.Empty, parts.Select(Function(p) p.ToString()))
End Function
#End Region
End Class
End Namespace
|
genlu/roslyn
|
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
|
Visual Basic
|
mit
| 34,367
|
' 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.VisualBasic.EditAndContinue
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.EditAndContinue
Imports Microsoft.CodeAnalysis.EditAndContinue.UnitTests
Imports Microsoft.CodeAnalysis.Text
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.EditAndContinue
Friend NotInheritable Class VisualBasicEditAndContinueTestHelpers
Inherits EditAndContinueTestHelpers
Private ReadOnly _fxReferences As ImmutableArray(Of PortableExecutableReference)
Friend Shared ReadOnly Instance As VisualBasicEditAndContinueTestHelpers = New VisualBasicEditAndContinueTestHelpers(
ImmutableArray.Create(TestReferences.NetFx.v4_0_30316_17626.mscorlib, TestReferences.NetFx.v4_0_30319.System, TestReferences.NetFx.v4_0_30319.System_Core))
Friend Shared ReadOnly Instance40 As VisualBasicEditAndContinueTestHelpers = New VisualBasicEditAndContinueTestHelpers(
ImmutableArray.Create(TestReferences.NetFx.v4_0_30319.mscorlib, TestReferences.NetFx.v4_0_30319.System_Core))
Friend Shared ReadOnly InstanceMinAsync As VisualBasicEditAndContinueTestHelpers = New VisualBasicEditAndContinueTestHelpers(
ImmutableArray.Create(TestReferences.NetFx.Minimal.mincorlib, TestReferences.NetFx.Minimal.minasync))
Private Shared ReadOnly s_analyzer As VisualBasicEditAndContinueAnalyzer = New VisualBasicEditAndContinueAnalyzer()
Sub New(fxReferences As ImmutableArray(Of PortableExecutableReference))
_fxReferences = fxReferences
End Sub
Public Overrides ReadOnly Property Analyzer As AbstractEditAndContinueAnalyzer
Get
Return s_analyzer
End Get
End Property
Public Overrides Function CreateLibraryCompilation(name As String, trees As IEnumerable(Of SyntaxTree)) As Compilation
Return VisualBasicCompilation.Create("New",
trees,
_fxReferences,
TestOptions.ReleaseDll.WithEmbedVbCoreRuntime(True))
End Function
Public Overrides Function ParseText(source As String) As SyntaxTree
Return SyntaxFactory.ParseSyntaxTree(source)
End Function
Public Overrides Function FindNode(root As SyntaxNode, span As TextSpan) As SyntaxNode
Dim result = root.FindToken(span.Start).Parent
While result.Span <> span
result = result.Parent
Assert.NotNull(result)
End While
Return result
End Function
Public Overrides Function GetDeclarators(method As ISymbol) As ImmutableArray(Of SyntaxNode)
Assert.True(TypeOf method Is IMethodSymbol, "Only methods should have a syntax map.")
Return LocalVariableDeclaratorsCollector.GetDeclarators(DirectCast(method, SourceMethodSymbol))
End Function
End Class
End Namespace
|
amcasey/roslyn
|
src/EditorFeatures/VisualBasicTest/EditAndContinue/Helpers/VisualBasicEditAndContinueTestHelpers.vb
|
Visual Basic
|
apache-2.0
| 3,250
|
' 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.Editor.Implementation.Highlighting
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.KeywordHighlighting
<ExportHighlighter(LanguageNames.VisualBasic)>
Friend Class WhileBlockHighlighter
Inherits AbstractKeywordHighlighter(Of SyntaxNode)
Protected Overloads Overrides Function GetHighlights(node As SyntaxNode, cancellationToken As CancellationToken) As IEnumerable(Of TextSpan)
If node.IsIncorrectContinueStatement(SyntaxKind.ContinueWhileStatement) Then
Return SpecializedCollections.EmptyEnumerable(Of TextSpan)()
End If
If node.IsIncorrectExitStatement(SyntaxKind.ExitWhileStatement) Then
Return SpecializedCollections.EmptyEnumerable(Of TextSpan)()
End If
Dim whileBlock = node.GetAncestor(Of WhileBlockSyntax)()
If whileBlock Is Nothing Then
Return SpecializedCollections.EmptyEnumerable(Of TextSpan)()
End If
Dim highlights As New List(Of TextSpan)
With whileBlock
highlights.Add(.WhileStatement.WhileKeyword.Span)
highlights.AddRange(
whileBlock.GetRelatedStatementHighlights(
blockKind:=SyntaxKind.WhileKeyword))
highlights.Add(.EndWhileStatement.Span)
End With
Return highlights
End Function
End Class
End Namespace
|
mmitche/roslyn
|
src/EditorFeatures/VisualBasic/Highlighting/KeywordHighlighters/WhileBlockHighlighter.vb
|
Visual Basic
|
apache-2.0
| 1,752
|
' 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.Runtime.InteropServices
Imports Microsoft.CodeAnalysis.ExpressionEvaluator
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.VisualStudio.Debugger.Clr
Imports Microsoft.VisualStudio.Debugger.Evaluation
Imports Roslyn.Test.Utilities
Imports Xunit
Namespace Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.UnitTests
Public Class ExpansionTests : Inherits VisualBasicResultProviderTestBase
<Fact>
Public Sub Enums()
Dim source = "
Imports System
Enum E
A
B
End Enum
Enum F As Byte
A = 42
End Enum
<Flags> Enum [if]
[else] = 1
fi
End Enum
Class C
Dim e As E = E.B
Dim f As F = Nothing
Dim g As [if] = [if].else Or [if].fi
Dim h As [if] = 5
End Class"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim rootExpr = "New C()"
Dim value = CreateDkmClrValue(Activator.CreateInstance(type))
Dim result = FormatResult(rootExpr, value)
Verify(result,
EvalResult(rootExpr, "{C}", "C", rootExpr, DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
Verify(children,
EvalResult("e", "B {1}", "E", "(New C()).e", editableValue:="E.B"),
EvalResult("f", "0", "F", "(New C()).f", editableValue:="0"),
EvalResult("g", "else Or fi {3}", "if", "(New C()).g", editableValue:="[if].else Or [if].fi"),
EvalResult("h", "5", "if", "(New C()).h", editableValue:="5"))
End Sub
<Fact>
Public Sub Nullable()
Dim source = "
Enum E
A
End Enum
Structure S
Friend Sub New(f as Integer)
Me.F = f
End Sub
Dim F As Object
End Structure
Class C
Dim e1 As E? = E.A
Dim e2 As E? = Nothing
Dim s1 As S? = New S(1)
Dim s2 As S? = Nothing
Dim o1 As Object = New System.Nullable(Of S)(Nothing)
Dim o2 As Object = New System.Nullable(Of S)()
End Class"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim value = CreateDkmClrValue(Activator.CreateInstance(type))
Dim rootExpr = "New C()"
Dim result = FormatResult(rootExpr, value)
Verify(result,
EvalResult(rootExpr, "{C}", "C", rootExpr, DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
Verify(children,
EvalResult("e1", "A {0}", "E?", "(New C()).e1", editableValue:="E.A"),
EvalResult("e2", "Nothing", "E?", "(New C()).e2"),
EvalResult("o1", "{S}", "Object {S}", "(New C()).o1", DkmEvaluationResultFlags.Expandable),
EvalResult("o2", "Nothing", "Object", "(New C()).o2"),
EvalResult("s1", "{S}", "S?", "(New C()).s1", DkmEvaluationResultFlags.Expandable),
EvalResult("s2", "Nothing", "S?", "(New C()).s2"))
' Dim o1 As Object = New System.Nullable(Of S)(Nothing)
Verify(GetChildren(children(2)),
EvalResult("F", "Nothing", "Object", "DirectCast((New C()).o1, S).F"))
' Dim s1 As S? = New S(1)
Verify(GetChildren(children(4)),
EvalResult("F", "1", "Object {Integer}", "(New C()).s1.F"))
End Sub
<Fact>
Public Sub Pointers()
Dim source =
".class private auto ansi beforefieldinit C
extends [mscorlib]System.Object
{
.field private int32* p
.field private int32* q
.method assembly hidebysig specialname rtspecialname
instance void .ctor(native int p) cil managed
{
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: ldarg.0
IL_0009: ldarg.1
IL_000a: call void* [mscorlib]System.IntPtr::op_Explicit(native int)
IL_000f: stfld int32* C::p
IL_0014: ret
}
}"
Dim assembly = GetAssemblyFromIL(source)
Dim type = assembly.GetType("C")
Dim p = GCHandle.Alloc(4, GCHandleType.Pinned).AddrOfPinnedObject()
Dim rootExpr = String.Format("new C({0})", p)
Dim value = CreateDkmClrValue(ReflectionUtilities.Instantiate(type, p))
Dim result = FormatResult(rootExpr, value)
Verify(result,
EvalResult(rootExpr, "{C}", "C", rootExpr, DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
Verify(children,
EvalResult("p", PointerToString(p), "Integer*", String.Format("({0}).p", rootExpr), DkmEvaluationResultFlags.Expandable),
EvalResult("q", PointerToString(IntPtr.Zero), "Integer*", String.Format("({0}).q", rootExpr)))
Dim fullName = String.Format("*({0}).p", rootExpr)
Verify(GetChildren(children(0)),
EvalResult(fullName, "4", "Integer", fullName))
End Sub
<Fact>
Public Sub StaticMembers()
Dim source =
"Class A
Const F As Integer = 1
Shared ReadOnly G As Integer = 2
End Class
Class B : Inherits A
End Class
Structure S
Const F As Object = Nothing
Shared ReadOnly Property P As Object
Get
Return 3
End Get
End Property
End Structure
Enum E
A
B
End Enum
Class C
Dim a As A = Nothing
Dim b As B = Nothing
Dim s As New S()
Dim sn? As S = Nothing
Dim e As E = E.B
End Class"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim rootExpr = "New C()"
Dim value = CreateDkmClrValue(Activator.CreateInstance(type))
Dim result = FormatResult(rootExpr, value)
Verify(result,
EvalResult(rootExpr, "{C}", "C", rootExpr, DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
Verify(children,
EvalResult("a", "Nothing", "A", "(New C()).a", DkmEvaluationResultFlags.Expandable),
EvalResult("b", "Nothing", "B", "(New C()).b", DkmEvaluationResultFlags.Expandable),
EvalResult("e", "B {1}", "E", "(New C()).e", editableValue:="E.B"),
EvalResult("s", "{S}", "S", "(New C()).s", DkmEvaluationResultFlags.Expandable),
EvalResult("sn", "Nothing", "S?", "(New C()).sn"))
' Dim a As A = Nothing
Dim more = GetChildren(children(0))
Verify(more,
EvalResult("Shared members", Nothing, "", "A", DkmEvaluationResultFlags.Expandable Or DkmEvaluationResultFlags.ReadOnly, DkmEvaluationResultCategory.Class))
more = GetChildren(more(0))
Verify(more,
EvalResult("F", "1", "Integer", "A.F", DkmEvaluationResultFlags.ReadOnly),
EvalResult("G", "2", "Integer", "A.G", DkmEvaluationResultFlags.ReadOnly))
' Dim s As New S()
more = GetChildren(children(3))
Verify(more,
EvalResult("Shared members", Nothing, "", "S", DkmEvaluationResultFlags.Expandable Or DkmEvaluationResultFlags.ReadOnly, DkmEvaluationResultCategory.Class))
more = GetChildren(more(0))
Verify(more,
EvalResult("F", "Nothing", "Object", "S.F", DkmEvaluationResultFlags.ReadOnly),
EvalResult("P", "3", "Object {Integer}", "S.P", DkmEvaluationResultFlags.ReadOnly))
End Sub
<Fact>
Public Sub DeclaredTypeObject_Array()
Dim source = "
Interface I
Property Q As Integer
End Interface
Class A
Friend F As Object
End Class
Class B : Inherits A : Implements I
Friend Sub New(f As Object)
Me.F = f
End Sub
Friend ReadOnly Property P As Object
Get
Return Me.F
End Get
End Property
Property Q As Integer Implements I.Q
Get
End Get
Set
End Set
End Property
End Class
Class C
Dim a() As A = { New B(1) }
Dim b() As B = { New B(2) }
Dim i() As I = { New B(3) }
Dim o() As Object = { New B(4) }
End Class
"
Dim assembly = GetAssembly(source)
Dim typeC = assembly.GetType("C")
Dim children = GetChildren(FormatResult("c", CreateDkmClrValue(Activator.CreateInstance(typeC))))
Verify(children,
EvalResult("a", "{Length=1}", "A()", "c.a", DkmEvaluationResultFlags.Expandable),
EvalResult("b", "{Length=1}", "B()", "c.b", DkmEvaluationResultFlags.Expandable),
EvalResult("i", "{Length=1}", "I()", "c.i", DkmEvaluationResultFlags.Expandable),
EvalResult("o", "{Length=1}", "Object()", "c.o", DkmEvaluationResultFlags.Expandable))
Verify(GetChildren(GetChildren(children(0)).Single()), ' as A()
EvalResult("F", "1", "Object {Integer}", "c.a(0).F"),
EvalResult("P", "1", "Object {Integer}", "DirectCast(c.a(0), B).P", DkmEvaluationResultFlags.ReadOnly),
EvalResult("Q", "0", "Integer", "DirectCast(c.a(0), B).Q"))
Verify(GetChildren(GetChildren(children(1)).Single()), ' as B()
EvalResult("F", "2", "Object {Integer}", "c.b(0).F"),
EvalResult("P", "2", "Object {Integer}", "c.b(0).P", DkmEvaluationResultFlags.ReadOnly),
EvalResult("Q", "0", "Integer", "c.b(0).Q"))
Verify(GetChildren(GetChildren(children(2)).Single()), ' as I()
EvalResult("F", "3", "Object {Integer}", "DirectCast(c.i(0), A).F"),
EvalResult("P", "3", "Object {Integer}", "DirectCast(c.i(0), B).P", DkmEvaluationResultFlags.ReadOnly),
EvalResult("Q", "0", "Integer", "DirectCast(c.i(0), B).Q"))
Verify(GetChildren(GetChildren(children(3)).Single()), ' as Object()
EvalResult("F", "4", "Object {Integer}", "DirectCast(c.o(0), A).F"),
EvalResult("P", "4", "Object {Integer}", "DirectCast(c.o(0), B).P", DkmEvaluationResultFlags.ReadOnly),
EvalResult("Q", "0", "Integer", "DirectCast(c.o(0), B).Q"))
End Sub
<Fact>
Public Sub MultilineString()
Dim str = vbCrLf & "line1" & vbCrLf & "line2"
Dim quotedStr = "vbCrLf & ""line1"" & vbCrLf & ""line2"""
Dim value = CreateDkmClrValue(str, evalFlags:=DkmEvaluationResultFlags.RawString)
Dim result = FormatResult("str", value)
Verify(result,
EvalResult("str", quotedStr, "String", "str", DkmEvaluationResultFlags.RawString, editableValue:=quotedStr))
End Sub
<Fact>
Public Sub UnicodeChar()
' This Char is printable, so we expect the EditableValue to just be the Char.
Dim c = ChrW(&H1234)
Dim quotedChar = """" & c & """c"
Dim value = CreateDkmClrValue(c)
Dim result = FormatResult("c", value)
Verify(result,
EvalResult("c", quotedChar, "Char", "c", editableValue:=quotedChar))
' This Char is not printable, so we expect the EditableValue to be the "ChrW" representation.
quotedChar = "ChrW(&H7)"
value = CreateDkmClrValue(ChrW(&H0007))
result = FormatResult("c", value, inspectionContext:=CreateDkmInspectionContext(radix:=16))
Verify(result,
EvalResult("c", quotedChar, "Char", "c", editableValue:=quotedChar))
End Sub
<Fact>
Public Sub UnicodeString()
Const quotedString = """" & ChrW(&H1234) & """ & ChrW(7)"
Dim value = CreateDkmClrValue(New String({ChrW(&H1234), ChrW(&H0007)}))
Dim result = FormatResult("s", value)
Verify(result,
EvalResult("s", quotedString, "String", "s", editableValue:=quotedString, flags:=DkmEvaluationResultFlags.RawString))
End Sub
<Fact, WorkItem(1002381, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1002381")>
Public Sub BaseTypeEditableValue()
Dim source = "
Imports System
Imports System.Collections.Generic
<Flags> Enum E
A = 1
B = 2
End Enum
Class C
Dim s1 As IEnumerable(Of Char) = String.Empty
Dim d1 As Object = 1D
Dim e1 As ValueType = E.A Or E.B
End Class"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim value = CreateDkmClrValue(Activator.CreateInstance(type))
Dim result = FormatResult("o", value)
Verify(result,
EvalResult("o", "{C}", "C", "o", DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
Verify(children,
EvalResult("d1", "1", "Object {Decimal}", "o.d1", editableValue:="1D"),
EvalResult("e1", "A Or B {3}", "System.ValueType {E}", "o.e1", DkmEvaluationResultFlags.None, editableValue:="E.A Or E.B"),
EvalResult("s1", """""", "System.Collections.Generic.IEnumerable(Of Char) {String}", "o.s1", DkmEvaluationResultFlags.RawString, editableValue:=""""""))
End Sub
''' <summary>
''' Hide members that have compiler-generated names.
''' </summary>
''' <remarks>
''' As in dev11, the FullName expressions don't parse.
''' </remarks>
<Fact, WorkItem(1010498, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1010498")>
Public Sub HiddenMembers()
Dim source =
".class public A
{
.method public hidebysig specialname rtspecialname instance void .ctor() { ret }
.field public object '@'
.field public object '<'
.field public static object '>'
.field public static object '><'
.field public object '<>'
.field public object '1<>'
.field public object '<2'
.field public object '<>__'
.field public object '<>k'
.field public static object '<3>k'
.field public static object '<<>>k'
.field public static object '<>>k'
.field public static object '<<>k'
.field public static object '< >k'
.field public object 'CS$'
.field public object 'CS$<>0_'
.field public object 'CS$<>7__8'
.field public object 'CS$$<>7__8'
.field public object 'CS<>7__8'
.field public static object '$<>7__8'
.field public static object 'CS$<M>7'
}
.class public B
{
.method public hidebysig specialname rtspecialname instance void .ctor() { ret }
.method public instance object '<>k__get'() { ldnull ret }
.method public static object '<M>7__get'() { ldnull ret }
.property instance object '@'() { .get instance object B::'<>k__get'() }
.property instance object '<'() { .get instance object B::'<>k__get'() }
.property object '>'() { .get object B::'<M>7__get'() }
.property object '><'() { .get object B::'<M>7__get'() }
.property instance object '<>'() { .get instance object B::'<>k__get'() }
.property instance object '1<>'() { .get instance object B::'<>k__get'() }
.property instance object '<2'() { .get instance object B::'<>k__get'() }
.property instance object '<>__'() { .get instance object B::'<>k__get'() }
.property instance object '<>k'() { .get instance object B::'<>k__get'() }
.property object '<3>k'() { .get object B::'<M>7__get'() }
.property object '<<>>k'() { .get object B::'<M>7__get'() }
.property object '<>>k'() { .get object B::'<M>7__get'() }
.property object '<<>k'() { .get object B::'<M>7__get'() }
.property object '< >k'() { .get object B::'<M>7__get'() }
.property instance object 'VB$'() { .get instance object B::'<>k__get'() }
.property instance object 'VB$<>0_'() { .get instance object B::'<>k__get'() }
.property instance object 'VB$Me<>7__8'() { .get instance object B::'<>k__get'() }
.property instance object 'VB$$<>7__8'() { .get instance object B::'<>k__get'() }
.property instance object 'VB<>7__8'() { .get instance object B::'<>k__get'() }
.property object '$<>7__8'() { .get object B::'<M>7__get'() }
.property object 'CS$<M>7'() { .get object B::'<M>7__get'() }
}"
Dim assemblyBytes As ImmutableArray(Of Byte) = Nothing
Dim pdbBytes As ImmutableArray(Of Byte) = Nothing
CommonTestBase.EmitILToArray(source, appendDefaultHeader:=True, includePdb:=False, assemblyBytes:=assemblyBytes, pdbBytes:=pdbBytes)
Dim assembly = ReflectionUtilities.Load(assemblyBytes)
Dim type = assembly.GetType("A")
Dim rootExpr = "New A()"
Dim value = CreateDkmClrValue(Activator.CreateInstance(type))
Dim result = FormatResult(rootExpr, value)
Verify(result,
EvalResult(rootExpr, "{A}", "A", rootExpr, DkmEvaluationResultFlags.Expandable))
Dim children = GetChildren(result)
Verify(children,
EvalResult("1<>", "Nothing", "Object", fullName:=Nothing),
EvalResult("@", "Nothing", "Object", fullName:=Nothing),
EvalResult("CS<>7__8", "Nothing", "Object", fullName:=Nothing),
EvalResult("Shared members", Nothing, "", "A", DkmEvaluationResultFlags.Expandable Or DkmEvaluationResultFlags.ReadOnly, DkmEvaluationResultCategory.Class))
children = GetChildren(children(children.Length - 1))
Verify(children,
EvalResult(">", "Nothing", "Object", fullName:=Nothing),
EvalResult("><", "Nothing", "Object", fullName:=Nothing))
type = assembly.GetType("B")
rootExpr = "New B()"
value = CreateDkmClrValue(Activator.CreateInstance(type))
result = FormatResult(rootExpr, value)
Verify(result,
EvalResult(rootExpr, "{B}", "B", rootExpr, DkmEvaluationResultFlags.Expandable))
children = GetChildren(result)
Verify(children,
EvalResult("1<>", "Nothing", "Object", fullName:=Nothing, flags:=DkmEvaluationResultFlags.ReadOnly),
EvalResult("@", "Nothing", "Object", fullName:=Nothing, flags:=DkmEvaluationResultFlags.ReadOnly),
EvalResult("VB<>7__8", "Nothing", "Object", fullName:=Nothing, flags:=DkmEvaluationResultFlags.ReadOnly),
EvalResult("Shared members", Nothing, "", "B", DkmEvaluationResultFlags.Expandable Or DkmEvaluationResultFlags.ReadOnly, DkmEvaluationResultCategory.Class))
children = GetChildren(children(children.Length - 1))
Verify(children,
EvalResult(">", "Nothing", "Object", fullName:=Nothing, flags:=DkmEvaluationResultFlags.ReadOnly),
EvalResult("><", "Nothing", "Object", fullName:=Nothing, flags:=DkmEvaluationResultFlags.ReadOnly))
End Sub
<Fact, WorkItem(965892, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/965892")>
Public Sub DeclaredTypeAndRuntimeTypeDifferent()
Dim source = "
Class A
End Class
Class B : Inherits A
End Class"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("B")
Dim declaredType = assembly.GetType("A")
Dim value = CreateDkmClrValue(Activator.CreateInstance(type), type)
Dim result = FormatResult("a", value, New DkmClrType(CType(declaredType, TypeImpl)))
Verify(result,
EvalResult("a", "{B}", "A {B}", "a", DkmEvaluationResultFlags.None))
Dim children = GetChildren(result)
Verify(children)
End Sub
<Fact>
Public Sub NameConflictsWithFieldOnBase()
Dim source = "
Class A
Private f As Integer
End Class
Class B : Inherits A
Friend f As Double
End Class"
Dim assembly = GetAssembly(source)
Dim typeB = assembly.GetType("B")
Dim instanceB = Activator.CreateInstance(typeB)
Dim value = CreateDkmClrValue(instanceB, typeB)
Dim result = FormatResult("b", value)
Verify(GetChildren(result),
EvalResult("f (A)", "0", "Integer", "DirectCast(b, A).f"),
EvalResult("f", "0", "Double", "b.f"))
Dim typeA = assembly.GetType("A")
value = CreateDkmClrValue(instanceB, typeB)
result = FormatResult("a", value, New DkmClrType(CType(typeA, TypeImpl)))
Verify(GetChildren(result),
EvalResult("f (A)", "0", "Integer", "a.f"),
EvalResult("f", "0", "Double", "DirectCast(a, B).f"))
End Sub
<Fact>
Public Sub NameConflictsWithFieldsOnMultipleBase()
Dim source = "
Class A
Private f As Integer
End Class
Class B : Inherits A
Friend f As Double
End Class
Class C : Inherits B
End Class"
Dim assembly = GetAssembly(source)
Dim typeC = assembly.GetType("C")
Dim instanceC = Activator.CreateInstance(typeC)
Dim value = CreateDkmClrValue(instanceC, typeC)
Dim result = FormatResult("c", value)
Verify(GetChildren(result),
EvalResult("f (A)", "0", "Integer", "DirectCast(c, A).f"),
EvalResult("f", "0", "Double", "c.f"))
Dim typeB = assembly.GetType("B")
value = CreateDkmClrValue(instanceC, typeC)
result = FormatResult("b", value, New DkmClrType(CType(typeB, TypeImpl)))
Verify(GetChildren(result),
EvalResult("f (A)", "0", "Integer", "DirectCast(b, A).f"),
EvalResult("f", "0", "Double", "b.f"))
End Sub
<Fact>
Public Sub NameConflictsWithPropertyOnNestedBase()
Dim source = "
Class A
Private Property P As Integer
Class B : Inherits A
Friend Property P As Double
End Class
End Class
Class C : Inherits A.B
End Class
"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim instanceC = Activator.CreateInstance(type)
Dim value = CreateDkmClrValue(instanceC, type)
Dim result = FormatResult("c", value)
Verify(GetChildren(result),
EvalResult("P (A)", "0", "Integer", "DirectCast(c, A).P"),
EvalResult("P", "0", "Double", "c.P"),
EvalResult("_P (A)", "0", "Integer", "DirectCast(c, A)._P"),
EvalResult("_P", "0", "Double", "c._P"))
End Sub
<Fact>
Public Sub NameConflictsWithPropertyOnGenericBase()
Dim source = "
Class A(Of T)
Public Property P As T
End Class
Class B : Inherits A(Of Integer)
Private Property P As Double
End Class
Class C : Inherits B
End Class
"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim instanceC = Activator.CreateInstance(type)
Dim value = CreateDkmClrValue(instanceC, type)
Dim result = FormatResult("c", value)
Verify(GetChildren(result),
EvalResult("P (A(Of Integer))", "0", "Integer", "DirectCast(c, A(Of Integer)).P"),
EvalResult("P", "0", "Double", "c.P"),
EvalResult("_P (A(Of Integer))", "0", "Integer", "DirectCast(c, A(Of Integer))._P"),
EvalResult("_P", "0", "Double", "c._P"))
End Sub
<Fact>
Public Sub PropertyNameConflictsWithFieldOnBase()
Dim source = "
Class A
Public F As String
End Class
Class B : Inherits A
Private Property F As Double
End Class
Class C : Inherits B
End Class
"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim instanceC = Activator.CreateInstance(type)
Dim value = CreateDkmClrValue(instanceC, type)
Dim result = FormatResult("c", value)
Verify(GetChildren(result),
EvalResult("F (A)", "Nothing", "String", "DirectCast(c, A).F"),
EvalResult("F", "0", "Double", "c.F"),
EvalResult("_F", "0", "Double", "c._F"))
End Sub
<Fact>
Public Sub NameConflictsWithIndexerOnBase()
Dim source = "
Class A
Public ReadOnly Property P(x As String) As String
Get
Return ""DeriveMe""
End Get
End Property
End Class
Class B : Inherits A
Public Property P As String = ""Derived""
End Class
"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("B")
Dim instanceB = Activator.CreateInstance(type)
Dim value = CreateDkmClrValue(instanceB, type)
Dim result = FormatResult("b", value)
Verify(GetChildren(result),
EvalResult("P", """Derived""", "String", "b.P", DkmEvaluationResultFlags.RawString, editableValue:="""Derived"""),
EvalResult("_P", """Derived""", "String", "b._P", DkmEvaluationResultFlags.RawString, editableValue:="""Derived"""))
End Sub
<Fact>
Public Sub NameConflictsWithPropertyHiddenByNameOnBase()
Dim source = "
Class A
Shared S As Integer = 42
Friend Overridable Property p As Integer = 43
End Class
Class B : Inherits A
Friend Overrides Property P As Integer = 45
End Class
Class C : Inherits B
Shadows Property P As Double = 4.4
End Class
"
Dim assembly = GetAssembly(source)
Dim type = assembly.GetType("C")
Dim instanceC = Activator.CreateInstance(type)
Dim value = CreateDkmClrValue(instanceC, type)
Dim result = FormatResult("c", value)
Dim children = GetChildren(result)
' TODO: Name hiding across overrides should be case-insensitive in VB,
' so "p" in this case should be hidden by "P" (and we need to qualify "p"
' with the type name "B" To disambiguate). However, we also need to
' support multiple members on the same type that differ only by case
' (properties in C# that have the same name as their backing field, etc).
Verify(children,
EvalResult("P", "4.4", "Double", "c.P"),
EvalResult("_P (B)", "45", "Integer", "DirectCast(c, B)._P"),
EvalResult("_P", "4.4", "Double", "c._P"),
EvalResult("_p", "0", "Integer", "c._p"),
EvalResult("p", "45", "Integer", "c.p"),
EvalResult("Shared members", Nothing, "", "C", DkmEvaluationResultFlags.Expandable Or DkmEvaluationResultFlags.ReadOnly, DkmEvaluationResultCategory.Class))
Verify(GetChildren(children(5)),
EvalResult("S", "42", "Integer", "A.S"))
End Sub
<Fact, WorkItem(1074435, "DevDiv")>
Public Sub NameConflictsWithInterfaceReimplementation()
Dim source = "
Interface I
ReadOnly Property P As Integer
End Interface
Class A : Implements I
Public ReadOnly Property P As Integer Implements I.P
Get
Return 1
End Get
End Property
End Class
Class B : Inherits A : Implements I
Public ReadOnly Property P As Integer Implements I.P
Get
Return 2
End Get
End Property
End Class
Class C : Inherits B : Implements I
Public ReadOnly Property P As Integer Implements I.P
Get
Return 3
End Get
End Property
End Class
"
Dim assembly = GetAssembly(source)
Dim typeB = assembly.GetType("B")
Dim typeC = assembly.GetType("C")
Dim instanceC = Activator.CreateInstance(typeC)
Dim value = CreateDkmClrValue(instanceC, typeC)
Dim result = FormatResult("b", value, New DkmClrType(CType(typeB, TypeImpl)))
Dim children = GetChildren(result)
Verify(children,
EvalResult("P (A)", "1", "Integer", "DirectCast(b, A).P", DkmEvaluationResultFlags.ReadOnly),
EvalResult("P (B)", "2", "Integer", "b.P", DkmEvaluationResultFlags.ReadOnly),
EvalResult("P", "3", "Integer", "DirectCast(b, C).P", DkmEvaluationResultFlags.ReadOnly))
End Sub
<Fact>
Public Sub NameConflictsWithVirtualPropertiesAcrossDeclaredType()
Dim source = "
Class A
Public Overridable Property P As Integer = 1
End Class
Class B : Inherits A
Public Overrides Property P As Integer = 2
End Class
Class C : Inherits B
End Class
Class D : Inherits C
Public Overrides Property p As Integer = 3
End Class"
Dim assembly = GetAssembly(source)
Dim typeC = assembly.GetType("C")
Dim typeD = assembly.GetType("D")
Dim instanceD = Activator.CreateInstance(typeD)
Dim value = CreateDkmClrValue(instanceD, typeD)
Dim result = FormatResult("c", value, New DkmClrType(CType(typeC, TypeImpl)))
Dim children = GetChildren(result)
' Ideally, we would only emit "c.P" for the full name of properties, but
' the added complexity of figuring that out (instead always just calling
' most derived) doesn't seem worth it.
Verify(children,
EvalResult("P", "3", "Integer", "DirectCast(c, D).P"),
EvalResult("_P (A)", "0", "Integer", "DirectCast(c, A)._P"),
EvalResult("_P", "0", "Integer", "c._P"),
EvalResult("_p", "3", "Integer", "DirectCast(c, D)._p"))
End Sub
<WorkItem(1016895, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1016895")>
<Fact>
Public Sub RootVersusInternal()
Const source = "
Imports System.Diagnostics
<DebuggerDisplay(""Value"", Name:=""Name"")>
Class A
End Class
Class B
Public A As A
Public Sub New(a As A)
Me.A = a
End Sub
End Class
"
Dim assembly = GetAssembly(source)
Dim typeA = assembly.GetType("A")
Dim typeB = assembly.GetType("B")
Dim instanceA = typeA.Instantiate()
Dim instanceB = typeB.Instantiate(instanceA)
Dim result = FormatResult("a", CreateDkmClrValue(instanceA))
Verify(result,
EvalResult("a", "Value", "A", "a", DkmEvaluationResultFlags.None))
result = FormatResult("b", CreateDkmClrValue(instanceB))
Verify(GetChildren(result),
EvalResult("Name", "Value", "A", "b.A", DkmEvaluationResultFlags.None))
End Sub
End Class
End Namespace
|
mmitche/roslyn
|
src/ExpressionEvaluator/VisualBasic/Test/ResultProvider/ExpansionTests.vb
|
Visual Basic
|
apache-2.0
| 30,711
|
' 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.Generic
Imports System.Threading
Imports System.Reflection
Imports System.Reflection.Metadata
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols.Metadata.PE
''' <summary>
''' The class to represent all, but Global, namespaces imported from a PE/module.
''' Namespaces that differ only by casing in name are merged.
''' </summary>
''' <remarks></remarks>
Friend NotInheritable Class PENestedNamespaceSymbol
Inherits PENamespaceSymbol
''' <summary>
''' The parent namespace. There is always one, Global namespace contains all
''' top level namespaces.
''' </summary>
''' <remarks></remarks>
Friend ReadOnly m_ContainingNamespaceSymbol As PENamespaceSymbol
''' <summary>
''' The name of the namespace.
''' </summary>
''' <remarks></remarks>
Protected ReadOnly m_Name As String
''' <summary>
''' The sequence of groups of TypeDef row ids for types contained within the namespace,
''' recursively including those from nested namespaces. The row ids are grouped by the
''' fully-qualified namespace name in case-sensitive manner. There could be multiple groups
''' for each fully-qualified namespace name. The groups are sorted by their key
''' in case-insensitive manner. Empty string is used as namespace name for types
''' immediately contained within Global namespace. Therefore, all types in this namespace, if any,
''' will be in several first IGroupings.
'''
''' This member is initialized by constructor and is cleared in EnsureAllMembersLoaded
''' as soon as symbols for children are created.
''' </summary>
''' <remarks></remarks>
Private _typesByNS As IEnumerable(Of IGrouping(Of String, TypeDefinitionHandle))
''' <summary>
''' Constructor.
''' </summary>
''' <param name="name">
''' Name of the namespace, must be not empty.
''' </param>
''' <param name="containingNamespace">
''' Containing namespace.
''' </param>
''' <param name="typesByNS">
''' The sequence of groups of TypeDef row ids for types contained within the namespace,
''' recursively including those from nested namespaces. The row ids are grouped by the
''' fully-qualified namespace name in case-sensitive manner. There could be multiple groups
''' for each fully-qualified namespace name. The groups are sorted by their key
''' in case-insensitive manner. Empty string is used as namespace name for types
''' immediately contained within Global namespace. Therefore, all types in this namespace, if any,
''' will be in several first IGroupings.
''' </param>
''' <remarks></remarks>
Friend Sub New(
name As String,
containingNamespace As PENamespaceSymbol,
typesByNS As IEnumerable(Of IGrouping(Of String, TypeDefinitionHandle))
)
Debug.Assert(name IsNot Nothing AndAlso name.Length > 0)
Debug.Assert(containingNamespace IsNot Nothing)
Debug.Assert(typesByNS IsNot Nothing)
m_ContainingNamespaceSymbol = containingNamespace
m_Name = name
_typesByNS = typesByNS
End Sub
Public Overrides ReadOnly Property ContainingSymbol As Symbol
Get
Return m_ContainingNamespaceSymbol
End Get
End Property
Friend Overrides ReadOnly Property ContainingPEModule As PEModuleSymbol
Get
Return m_ContainingNamespaceSymbol.ContainingPEModule
End Get
End Property
Public Overrides ReadOnly Property Name As String
Get
Return m_Name
End Get
End Property
Public Overrides ReadOnly Property IsGlobalNamespace As Boolean
Get
Return False
End Get
End Property
Public Overrides ReadOnly Property ContainingAssembly As AssemblySymbol
Get
Return ContainingPEModule.ContainingAssembly
End Get
End Property
Public Overrides ReadOnly Property ContainingModule As ModuleSymbol
Get
Return m_ContainingNamespaceSymbol.ContainingPEModule
End Get
End Property
Protected Overrides Sub EnsureAllMembersLoaded()
Dim typesByNS = _typesByNS
If m_lazyTypes Is Nothing OrElse m_lazyMembers Is Nothing Then
Debug.Assert(typesByNS IsNot Nothing)
LoadAllMembers(typesByNS)
Interlocked.Exchange(_typesByNS, Nothing)
End If
End Sub
''' <summary>
''' Calculate declared accessibility of most accessible type within this namespace or within a containing namespace recursively.
''' Expected to be called at most once per namespace symbol, unless there is a race condition.
'''
''' Valid return values:
''' Friend,
''' Public,
''' NotApplicable - if there are no types.
''' </summary>
Protected Overrides Function GetDeclaredAccessibilityOfMostAccessibleDescendantType() As Accessibility
Dim typesByNS As IEnumerable(Of IGrouping(Of String, TypeDefinitionHandle)) = _typesByNS
If typesByNS IsNot Nothing AndAlso m_lazyTypes Is Nothing Then
' Calculate this without creating symbols for children
Dim [module] = ContainingPEModule.Module
Dim result As Accessibility = Accessibility.NotApplicable
For Each group As IGrouping(Of String, TypeDefinitionHandle) In typesByNS
For Each typeDef As TypeDefinitionHandle In group
Dim flags As TypeAttributes
Try
flags = [module].GetTypeDefFlagsOrThrow(typeDef)
Catch mrEx As BadImageFormatException
End Try
Select Case (flags And TypeAttributes.VisibilityMask)
Case TypeAttributes.Public
Return Accessibility.Public
Case TypeAttributes.NotPublic
result = Accessibility.Friend
Case Else
Debug.Assert(False, "Unexpected!!!")
End Select
Next
Next
Return result
Else
Return MyBase.GetDeclaredAccessibilityOfMostAccessibleDescendantType()
End If
End Function
''' <remarks>
''' This is for perf, not for correctness.
''' </remarks>
Friend Overrides ReadOnly Property DeclaringCompilation As VisualBasicCompilation
Get
Return Nothing
End Get
End Property
End Class
End Namespace
|
REALTOBIZ/roslyn
|
src/Compilers/VisualBasic/Portable/Symbols/Metadata/PE/PENestedNamespaceSymbol.vb
|
Visual Basic
|
apache-2.0
| 7,491
|
Imports DotGit
Imports System.IO
Imports Xunit
Public Class ArchiveOperationsTests
<Fact>
Public Sub ArchivingPersonalPreositorySucceeds()
TestHelper.OnPersonalRepository(
Sub(repo As Repository)
repo.Index.Add(TestHelper.CreateFileInDirectory(repo.Path))
repo.Commit.Create("Test commit")
TestHelper.OnTempDirectory(
Sub(archiveDirectoryPath As String)
Dim archiveFilePath As String = Path.Combine(archiveDirectoryPath, "archive.zip")
repo.Archive.Get("HEAD", archiveFilePath, ArchiveOperations.FormatOption.ZIP)
Assert.True(File.Exists(archiveFilePath))
End Sub)
End Sub)
End Sub
End Class
|
robnasby/DotGit
|
tests/DotGitTests/Operations/ArchiveOperationsTests.vb
|
Visual Basic
|
mit
| 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
'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 = false
Me.EnableVisualStyles = false
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.AutoClick.Form1
End Sub
End Class
End Namespace
|
stevemk14ebr/Auto-Voter
|
AutoClick/My Project/Application.Designer.vb
|
Visual Basic
|
mit
| 1,476
|
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("2015081701DEvbInsertSnippet")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("2015081701DEvbInsertSnippet")>
<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("cd126bdf-681b-4dd4-9ca1-b4d0396154cc")>
' 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")>
|
AungWinnHtut/MTTun
|
2015081701DEvbInsertSnippet/2015081701DEvbInsertSnippet/My Project/AssemblyInfo.vb
|
Visual Basic
|
mit
| 1,163
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.