src/Shared/EntityFramework/Core/Common/EntitySql/SemanticResolver.cs
// <summary>
// Validates that the specified parameters have valid, non-duplicated names
// </summary>
// <param name="paramDefs"> The set of query parameters </param>
// <returns>
// A valid dictionary that maps parameter names to <see cref="DbParameterReferenceExpression" /> s using the current NameComparer
// </returns>
Validates that the specified parameters have valid, non-duplicated names
Validates that the specified parameters have valid non - duplicated names
private static Dictionary<string, DbParameterReferenceExpression> ProcessParameters(
            IEnumerable<DbParameterReferenceExpression> paramDefs, ParserOptions parserOptions)
        {
            var retParams = new Dictionary<string, DbParameterReferenceExpression>(parserOptions.NameComparer);
            if (paramDefs != null)
            {
                foreach (var paramDef in paramDefs)
                {
                    if (retParams.ContainsKey(paramDef.ParameterName))
                    {
                        var message = Strings.MultipleDefinitionsOfParameter(paramDef.ParameterName);
                        throw new EntitySqlException(message);
                    }
                    Debug.Assert(paramDef.ResultType.IsReadOnly, "paramDef.ResultType.IsReadOnly must be set");
                    retParams.Add(paramDef.ParameterName, paramDef);
                }
            }
            return retParams;
        }
private static Dictionary < string , DbParameterReferenceExpression > ProcessParameters ( IEnumerable < DbParameterReferenceExpression > paramDefs , ParserOptions parserOptions ) { var retParams = new Dictionary < string , DbParameterReferenceExpression > ( parserOptions . NameComparer ) ; if ( paramDefs != null ) { foreach ( var paramDef in paramDefs ) { if ( retParams . ContainsKey ( paramDef . ParameterName ) ) { var message = Strings . MultipleDefinitionsOfParameter ( paramDef . ParameterName ) ; throw new EntitySqlException ( message ) ; } Debug . Assert ( paramDef . ResultType . IsReadOnly , " " ) ; retParams . Add ( paramDef . ParameterName , paramDef ) ; } } return retParams ; }
Validates that the specified parameters have valid, non-duplicated names
Validates that the specified parameters have valid non - duplicated names
A valid dictionary that maps parameter names to  s using the current NameComparer
A valid dictionary that maps parameter names to s using the current NameComparer
paramDefs
IEnumerable<DbParameterReferenceExpression>
The set of query parameters
The set of query parameters
parserOptions
ParserOptions