Skip to content

Conversation

@iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Feb 4, 2020

PR Summary

Replace follow patterns:

if (!patterns.ContainsKey(name))
{
    patterns.Add(name, value);
}

with new Dictionary<T, M>.TryAdd() method:

patterns.TryAdd(name, value);

PR Context

PR Checklist

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Feb 4, 2020
@iSazonov iSazonov added this to the 7.1.0-preview.1 milestone Feb 4, 2020
@ghost ghost assigned daxian-dbw Feb 4, 2020
@daxian-dbw daxian-dbw merged commit 60387f1 into PowerShell:master Feb 6, 2020
@iSazonov iSazonov deleted the cleanup-use-tryadd branch February 7, 2020 02:56
@ghost
Copy link

ghost commented Mar 26, 2020

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants