| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Collections.ObjectModel; |
| | | 6 | | |
| | | 7 | | namespace CoreWCF.IdentityModel.Tokens |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// A collection of absolute URIs. |
| | | 11 | | /// </summary> |
| | | 12 | | internal class AbsoluteUriCollection : Collection<Uri> |
| | | 13 | | { |
| | 0 | 14 | | public AbsoluteUriCollection() |
| | | 15 | | { |
| | 0 | 16 | | } |
| | | 17 | | |
| | | 18 | | protected override void InsertItem(int index, Uri item) |
| | | 19 | | { |
| | 0 | 20 | | if (null == item || !item.IsAbsoluteUri) |
| | | 21 | | { |
| | 0 | 22 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(nameof(item), SR.Format(SR.ID0013)); |
| | | 23 | | } |
| | | 24 | | |
| | 0 | 25 | | base.InsertItem(index, item); |
| | 0 | 26 | | } |
| | | 27 | | |
| | | 28 | | protected override void SetItem(int index, Uri item) |
| | | 29 | | { |
| | 0 | 30 | | if (null == item || !item.IsAbsoluteUri) |
| | | 31 | | { |
| | 0 | 32 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(nameof(item), SR.Format(SR.ID0013)); |
| | | 33 | | } |
| | | 34 | | |
| | 0 | 35 | | base.SetItem(index, item); |
| | 0 | 36 | | } |
| | | 37 | | } |
| | | 38 | | } |