File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,20 @@ public void Add(string source)
2929 }
3030 }
3131
32+ /// <summary>
33+ /// Adds a source to the collection for the given directive.
34+ /// Calls to <see cref="AddRange"/> are idempotent;
35+ /// if the source has already been added, it will not be added again.
36+ /// </summary>
37+ /// <param name="sources">The sources to add</param>
38+ public void AddRange ( IEnumerable < string > sources )
39+ {
40+ foreach ( var source in sources )
41+ {
42+ Add ( source ) ;
43+ }
44+ }
45+
3246 /// <summary>
3347 /// Removes a source from the collection for the given directive.
3448 /// Returns true if the source was removed. Returns false if the
Original file line number Diff line number Diff line change @@ -599,6 +599,7 @@ namespace NetEscapades.AspNetCore.SecurityHeaders.Headers
599599 public SourceCollection() { }
600600 public int Count { get; }
601601 public void Add(string source) { }
602+ public void AddRange(System.Collections.Generic.IEnumerable<string> sources) { }
602603 public System.Collections.Generic.IEnumerator<string> GetEnumerator() { }
603604 public bool Remove(string source) { }
604605 }
You can’t perform that action at this time.
0 commit comments