Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL search renaming/refactoring #1569

Merged
merged 18 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CustomAnalysisRules.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1308" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1405" Action="None" />
<Rule Id="SA1512" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1615" Action="None" />
<Rule Id="SA1623" Action="None" />
<Rule Id="SA1629" Action="None" />
<Rule Id="SA1642" Action="None" />
<Rule Id="SA1652" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,28 @@ protected static void EnsureAllocatedAndPopulated<TExpression>(ref List<TExpress
}
}
}

/// <summary>
/// Like <see cref="EnsureAllocatedAndPopulated{TExpression}(ref TExpression[],System.Collections.Generic.IReadOnlyList{TExpression},int)"/>,
/// but where the destination list if is of a derived type
/// </summary>
/// <typeparam name="TDestination">The destination list type</typeparam>
/// <typeparam name="TSource">The source list type</typeparam>
/// <param name="destination">The destination list to allocate and populate</param>
/// <param name="source">The source list</param>
/// <param name="count">The number of elements from source to copy to destination</param>
protected static void EnsureAllocatedAndPopulatedChangeType<TDestination, TSource>(ref List<TDestination> destination, IReadOnlyList<TSource> source, int count)
where TSource : Expression
where TDestination : TSource
{
if (destination == null)
{
destination = new List<TDestination>();
for (int j = 0; j < count; j++)
{
destination.Add((TDestination)source[j]);
}
}
}
}
}

This file was deleted.

Loading