@@ -5,9 +5,7 @@ Imports System.Runtime.CompilerServices
55Imports System.Security
66Imports System.Text
77Imports EntityFrameworkCore.VisualBasic
8- Imports EntityFrameworkCore.VisualBasic.Design.Query.Internal
98Imports Microsoft.CodeAnalysis
10- Imports Microsoft.CodeAnalysis.Editing
119Imports Microsoft.CodeAnalysis.VisualBasic
1210Imports Microsoft.EntityFrameworkCore.Design
1311Imports Microsoft.EntityFrameworkCore.Internal
@@ -25,17 +23,11 @@ Namespace Design.Internal
2523 Implements IVisualBasicHelper
2624
2725 Private ReadOnly _typeMappingSource As ITypeMappingSource
28- Private ReadOnly _translator As LinqToVisualBasicSyntaxTranslator
2926
3027 Sub New (typeMappingSource As ITypeMappingSource)
3128 NotNull(typeMappingSource, NameOf (typeMappingSource))
3229
3330 _typeMappingSource = typeMappingSource
34-
35- Dim workspace = New AdhocWorkspace()
36- Dim syntaxGen = SyntaxGenerator.GetGenerator(workspace, LanguageNames.VisualBasic)
37-
38- _translator = New LinqToVisualBasicSyntaxTranslator(syntaxGen)
3931 End Sub
4032
4133 Private Shared ReadOnly _literalFuncs As New Dictionary( Of Type, Func( Of VisualBasicHelper, Object , String )) From {
@@ -1309,34 +1301,6 @@ Namespace Design.Internal
13091301 Return node.NormalizeWhitespace().ToFullString()
13101302 End Function
13111303
1312- ''' <summary>
1313- ''' This Is an internal API that supports the Entity Framework Core infrastructure And Not subject to
1314- ''' the same compatibility standards as public APIs. It may be changed Or removed without notice in
1315- ''' any release. You should only use it directly in your code with extreme caution And knowing that
1316- ''' doing so can result in application failures when updating to a New Entity Framework Core release.
1317- ''' </summary>
1318- Public Overridable Function Statement(node As Expression, collectedNamespaces As ISet( Of String )) As String _
1319- Implements IVisualBasicHelper.Statement
1320- Dim sb As New StringBuilder
1321-
1322- For Each e In _translator.TranslateStatement(node, collectedNamespaces)
1323- sb.AppendLine(ToSourceCode(e))
1324- Next
1325-
1326- Return sb.ToString()
1327- End Function
1328-
1329- ''' <summary>
1330- ''' This Is an internal API that supports the Entity Framework Core infrastructure And Not subject to
1331- ''' the same compatibility standards as public APIs. It may be changed Or removed without notice in
1332- ''' any release. You should only use it directly in your code with extreme caution And knowing that
1333- ''' doing so can result in application failures when updating to a New Entity Framework Core release.
1334- ''' </summary>
1335- Public Overridable Function Expression(node As Expression, collectedNamespaces As ISet( Of String )) As String _
1336- Implements IVisualBasicHelper.Expression
1337- Return ToSourceCode(_translator.TranslateExpression(node, collectedNamespaces))
1338- End Function
1339-
13401304# Region "VB Namespace"
13411305 ''' <summary>
13421306 ''' This is an internal API that supports the Entity Framework Core infrastructure and not subject to
0 commit comments