| File: Core\Fingerprints.cs | Web Access |
| Project: src\nuget-client\src\NuGet.Core\NuGet.Packaging\NuGet.Packaging.csproj (NuGet.Packaging) |
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; namespace NuGet.Packaging.Core { public class Fingerprints { private IDictionary<string, string> _keyValuePairs; public Fingerprints(IDictionary<string, string> fingerPrints) { _keyValuePairs = fingerPrints ?? throw new ArgumentNullException(nameof(fingerPrints)); } // Get fingerprint from hash algorithm oid. public string? this[string key] { get { if (key != null) { _keyValuePairs.TryGetValue(key, out var value); return value; } return null; } } public IEnumerator<KeyValuePair<string, string>> GetEnumerator() { return _keyValuePairs.GetEnumerator(); } } }