src/Shared/EntityFramework/Core/Common/EntitySql/SemanticResolver.cs
// <summary>
// Validates that the specified variables have valid, non-duplicated names
// </summary>
// <param name="varDefs"> The set of free variables </param>
// <returns>
// A valid dictionary that maps variable names to <see cref="DbVariableReferenceExpression" /> s using the current NameComparer
// </returns>
Validates that the specified variables have valid, non-duplicated names
Validates that the specified variables have valid non - duplicated names
private static Dictionary<string, DbVariableReferenceExpression> ProcessVariables(
            IEnumerable<DbVariableReferenceExpression> varDefs, ParserOptions parserOptions)
        {
            var retVars = new Dictionary<string, DbVariableReferenceExpression>(parserOptions.NameComparer);
            if (varDefs != null)
            {
                foreach (var varDef in varDefs)
                {
                    if (retVars.ContainsKey(varDef.VariableName))
                    {
                        var message = Strings.MultipleDefinitionsOfVariable(varDef.VariableName);
                        throw new EntitySqlException(message);
                    }
                    Debug.Assert(varDef.ResultType.IsReadOnly, "varDef.ResultType.IsReadOnly must be set");
                    retVars.Add(varDef.VariableName, varDef);
                }
            }
            return retVars;
        }
private static Dictionary < string , DbVariableReferenceExpression > ProcessVariables ( IEnumerable < DbVariableReferenceExpression > varDefs , ParserOptions parserOptions ) { var retVars = new Dictionary < string , DbVariableReferenceExpression > ( parserOptions . NameComparer ) ; if ( varDefs != null ) { foreach ( var varDef in varDefs ) { if ( retVars . ContainsKey ( varDef . VariableName ) ) { var message = Strings . MultipleDefinitionsOfVariable ( varDef . VariableName ) ; throw new EntitySqlException ( message ) ; } Debug . Assert ( varDef . ResultType . IsReadOnly , " " ) ; retVars . Add ( varDef . VariableName , varDef ) ; } } return retVars ; }
Validates that the specified variables have valid, non-duplicated names
Validates that the specified variables have valid non - duplicated names
A valid dictionary that maps variable names to  s using the current NameComparer
A valid dictionary that maps variable names to s using the current NameComparer
varDefs
IEnumerable<DbVariableReferenceExpression>
The set of free variables
The set of free variables
parserOptions
ParserOptions