sdk/dotnet/src/Microsoft.Datasync.Client.SQLiteStore/Utils/ExtensionMethods.cs
/// <summary>
/// Converts a list of values into a parameter dictionary.
/// </summary>
/// <param name="values">The list of values.</param>
/// <param name="prefix">The prefix for each parameter (do not include the <c>@</c> symbol)</param>
/// <returns>The parameter dictionary</returns>
Converts a list of values into a parameter dictionary.
Converts a list of values into a parameter dictionary .
internal static Dictionary<string, object> ToParameterList(this IEnumerable<object> values, string prefix = "p")
        {
            Dictionary<string, object> result = new();
            int paramNo = 0;
            foreach (object value in values)
            {
                result.Add($"@{prefix}{paramNo++}", value);
            }
            return result;
        }
internal static Dictionary < string , object > ToParameterList ( this IEnumerable < object > values , string prefix = " " ) { Dictionary < string , object > result = new ( ) ; int paramNo = 0 ; foreach ( object value in values ) { result . Add ( $" @ { prefix } { paramNo ++ } " , value ) ; } return result ; }
Converts a list of values into a parameter dictionary.
Converts a list of values into a parameter dictionary .
The parameter dictionary
The parameter dictionary
IEnumerable<object>
this
prefix
string
The prefix for each parameter (do not include the .
The prefix for each parameter ( do not include the .
values
The list of values.
The list of values .