// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
DimexpectedDescription="(field) C.x As Integer"+vbCrLf+vbCrLf+" Proj1 - Available"+vbCrLf+" Proj2 - Not Available"+vbCrLf+vbCrLf+"You can use the navigation bar to switch context."
DimexpectedDescription=$"({FeaturesResources.Field}) C.x As Integer"+vbCrLf+vbCrLf+String.Format(FeaturesResources.ProjectAvailability,"Proj1",FeaturesResources.Available)+vbCrLf+String.Format(FeaturesResources.ProjectAvailability,"Proj2",FeaturesResources.NotAvailable)+vbCrLf+vbCrLf+FeaturesResources.UseTheNavigationBarToSwitchContext
{"Generate class for 'Foo' in 'Global Namespace' (in new file)","Generate class for 'Foo' in 'Global Namespace'","Generate class for 'Foo' in 'Program'","Generate new type..."})
@@ -179,7 +179,7 @@ NewLines("Class A \n Friend field As Integer \n End Class \n Class B \n Public S
PublicSubTestOnlyGenerateFieldInByRefProperty()
TestExactActionSetOffered(
NewLines("Class A \n End Class \n Class B \n Public Sub Foo(ByRef d As Integer) \n End Sub \n Public Sub Bar() \n Dim s As New A() \n Foo(s.[|field|]) \n End Sub \n End Class"),
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
"DirectCast(<expression>, <typeName>) As <result>",
"Introduces a type conversion operation similar to CType. The difference is that CType succeeds as long as there is a valid conversion, whereas DirectCast requires that one type inherit from or implement the other type.",
"The expression to be evaluated and converted.",
$"DirectCast({Expression1}, {VBWorkspaceResources.Typename}) As {Result}",
"Introduces a type conversion operation that does not throw an exception. If an attempted conversion fails, TryCast returns Nothing, which your program can test for.",
"The expression to be evaluated and converted.",
$"TryCast({Expression1}, {VBWorkspaceResources.Typename}) As {Result}",
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
"If(<expression>, <expressionIfNothing>) As <result>",
"If <expression> evaluates to a reference or Nullable value that is not Nothing, the function returns that value. Otherwise, it calculates and returns <expressionIfNothing>.",
"Returned if it evaluates to a reference or nullable type that is not Nothing.",
$"If({Expression1}, {ExpressionIfNothing}) As {Result}",
"If(<expression>, <expressionIfNothing>) As <result>",
"If <expression> evaluates to a reference or Nullable value that is not Nothing, the function returns that value. Otherwise, it calculates and returns <expressionIfNothing>.",
"Evaluated and returned if <expression> evaluates to Nothing.",
$"If({Expression1}, {ExpressionIfNothing}) As {Result}",
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
expectedOrderedItems.Add(NewSignatureHelpTestItem("<Extension> Count() As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItems.Add(NewSignatureHelpTestItem("<Extension> Count(<expression> As Boolean) As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItems.Add(NewSignatureHelpTestItem($"<{Extension}> Count() As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItems.Add(NewSignatureHelpTestItem($"<{Extension}> Count({Expression1} As Boolean) As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItemsMetadataOnly.Add(NewSignatureHelpTestItem("<Extension> GetRandomNumber() As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItemsMetadataOnly.Add(NewSignatureHelpTestItem($"<{Extension}> GetRandomNumber() As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItemsSameSolution.Add(NewSignatureHelpTestItem("<Extension> GetRandomNumber() As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItemsSameSolution.Add(NewSignatureHelpTestItem("<Extension> GetRandomNumber(<expression> As Double) As Integer",String.Empty,String.Empty,currentParameterIndex:=0))
expectedOrderedItemsSameSolution.Add(NewSignatureHelpTestItem($"<{Extension}> GetRandomNumber() As Integer",String.Empty,Nothing,currentParameterIndex:=0))
expectedOrderedItemsSameSolution.Add(NewSignatureHelpTestItem($"<{Extension}> GetRandomNumber({Expression1} As Double) As Integer",String.Empty,String.Empty,currentParameterIndex:=0))
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
expectedOrderedItems.Add(NewSignatureHelpTestItem("<Extension> D.Foo(Of S, T)(objS As S, objT As T) As S",String.Empty,String.Empty,currentParameterIndex:=0))
expectedOrderedItems.Add(NewSignatureHelpTestItem($"<{Extension}> D.Foo(Of S, T)(objS As S, objT As T) As S",String.Empty,String.Empty,currentParameterIndex:=0))
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
"GetXmlNamespace([<xmlNamespacePrefix>]) As System.Xml.Linq.XNamespace",
"Returns the System.Xml.Linq.XNamespace object corresponding to the specified XML namespace prefix.",
"The XML namespace prefix to return a System.Xml.Linq.XNamespace object for. If this is omitted, the object for the default XML namespace is returned.",
$"GetXmlNamespace([{XmlNamespacePrefix}]) As System.Xml.Linq.XNamespace",
expectedOrderedItems.Add(NewSignatureHelpTestItem("<Extension> MyExtension.ExtensionMethod(x As Integer) As Integer",String.Empty,String.Empty,currentParameterIndex:=0))
expectedOrderedItems.Add(NewSignatureHelpTestItem($"<{Extension}> MyExtension.ExtensionMethod(x As Integer) As Integer",String.Empty,String.Empty,currentParameterIndex:=0))
DimexpectedDescription=NewSignatureHelpTestItem("C.bar()"+vbCrLf+vbCrLf+" Proj1 - Available"+vbCrLf+" Proj2 - Not Available"+vbCrLf+vbCrLf+"You can use the navigation bar to switch context.",currentParameterIndex:=0)
DimexpectedDescription=NewSignatureHelpTestItem("C.bar()"+"\r\n\r\n Proj1 - Available\r\n Proj3 - Not Available\r\n\r\nYou can use the navigation bar to switch context.".Replace("\r\n",vbCrLf),currentParameterIndex:=0)
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.