* Removing unused dependencies from code
* Cleaning up usage of CodeAnalysis.
This commit is contained in:
parent
dfe2d41437
commit
5231683aae
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Microsoft.AspNet.Http.Authentication
|
||||
|
|
@ -70,7 +69,6 @@ namespace Microsoft.AspNet.Http.Authentication
|
|||
/// <summary>
|
||||
/// Gets or sets the full path or absolute URI to be used as an http redirect response value.
|
||||
/// </summary>
|
||||
[SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "By design")]
|
||||
public string RedirectUri
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Microsoft.AspNet.Http
|
||||
|
|
@ -52,7 +51,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// Any Unicode is converted to punycode. IPv6 addresses will have brackets added if they are missing.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Only the host segment of a URI is returned.")]
|
||||
public string ToUriComponent()
|
||||
{
|
||||
int index;
|
||||
|
|
@ -92,7 +90,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// </summary>
|
||||
/// <param name="uriComponent"></param>
|
||||
/// <returns></returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1057:StringUriOverloadsCallSystemUriOverloads", Justification = "Only the host segment of a URI is provided.")]
|
||||
public static HostString FromUriComponent(string uriComponent)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(uriComponent))
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// Provides the path string escaped in a way which is correct for combining into the URI representation.
|
||||
/// </summary>
|
||||
/// <returns>The escaped path value</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Purpose of the method is to return a string")]
|
||||
public string ToUriComponent()
|
||||
{
|
||||
// TODO: Measure the cost of this escaping and consider optimizing.
|
||||
|
|
@ -94,7 +93,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// </summary>
|
||||
/// <param name="uriComponent">The escaped path as it appears in the URI format.</param>
|
||||
/// <returns>The resulting PathString</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1057:StringUriOverloadsCallSystemUriOverloads", Justification = "Requirements not compatible with URI processing")]
|
||||
public static PathString FromUriComponent(string uriComponent)
|
||||
{
|
||||
// REVIEW: what is the exactly correct thing to do?
|
||||
|
|
@ -152,7 +150,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// <param name="other">The <see cref="PathString"/> to compare.</param>
|
||||
/// <param name="remaining">The remaining segments after the match.</param>
|
||||
/// <returns>true if value matches the beginning of this string; otherwise, false.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#", Justification = "Secondary information needed after boolean result obtained")]
|
||||
public bool StartsWithSegments(PathString other, out PathString remaining)
|
||||
{
|
||||
return StartsWithSegments(other, StringComparison.OrdinalIgnoreCase, out remaining);
|
||||
|
|
@ -166,7 +163,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param>
|
||||
/// <param name="remaining">The remaining segments after the match.</param>
|
||||
/// <returns>true if value matches the beginning of this string; otherwise, false.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#", Justification = "Secondary information needed after boolean result obtained")]
|
||||
public bool StartsWithSegments(PathString other, StringComparison comparisonType, out PathString remaining)
|
||||
{
|
||||
var value1 = Value ?? string.Empty;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// dangerous are escaped.
|
||||
/// </summary>
|
||||
/// <returns>The query string value</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Purpose of the method is to return a string")]
|
||||
public string ToUriComponent()
|
||||
{
|
||||
// Escape things properly so System.Uri doesn't mis-interpret the data.
|
||||
|
|
@ -81,7 +80,6 @@ namespace Microsoft.AspNet.Http
|
|||
/// </summary>
|
||||
/// <param name="uriComponent">The escaped query as it appears in the URI format.</param>
|
||||
/// <returns>The resulting QueryString</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1057:StringUriOverloadsCallSystemUriOverloads", Justification = "Delimiter characters ? and # must be escaped by this method instead of truncating the value")]
|
||||
public static QueryString FromUriComponent(string uriComponent)
|
||||
{
|
||||
if (string.IsNullOrEmpty(uriComponent))
|
||||
|
|
|
|||
|
|
@ -26,23 +26,13 @@
|
|||
},
|
||||
"dotnet5.4": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11-*",
|
||||
"System.ComponentModel": "4.0.1-*",
|
||||
"System.Diagnostics.Tools": "4.0.1-*",
|
||||
"System.Globalization": "4.0.11-*",
|
||||
"System.Globalization.Extensions": "4.0.1-*",
|
||||
"System.Linq": "4.0.1-*",
|
||||
"System.Linq.Expressions": "4.0.11-*",
|
||||
"System.Net.Primitives": "4.0.11-*",
|
||||
"System.Net.WebSockets": "4.0.0-*",
|
||||
"System.Reflection.TypeExtensions": "4.0.1-*",
|
||||
"System.IO": "4.0.11-*",
|
||||
"System.Runtime": "4.0.21-*",
|
||||
"System.Reflection.TypeExtensions": "4.1.0-*",
|
||||
"System.Runtime.InteropServices": "4.0.21-*",
|
||||
"System.Security.Claims": "4.0.1-*",
|
||||
"System.Security.Cryptography.X509Certificates": "4.0.0-*",
|
||||
"System.Security.Principal": "4.0.1-*",
|
||||
"System.Threading.Tasks": "4.0.11-*"
|
||||
"System.Security.Cryptography.X509Certificates": "4.0.0-*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
"net451": {},
|
||||
"dotnet5.4": {
|
||||
"dependencies": {
|
||||
"System.IO.FileSystem": "4.0.1-*",
|
||||
"System.Runtime": "4.0.21-*",
|
||||
"System.Resources.ResourceManager": "4.0.1-*"
|
||||
"System.IO.FileSystem": "4.0.1-*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ namespace Microsoft.AspNet.Http.Internal
|
|||
#endregion
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("App_Packages", "")]
|
||||
internal struct HeaderSegmentCollection : IEnumerable<HeaderSegment>, IEquatable<HeaderSegmentCollection>
|
||||
{
|
||||
private readonly StringValues _headers;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
"net451": {},
|
||||
"dotnet5.4": {
|
||||
"dependencies": {
|
||||
"System.Diagnostics.Debug": "4.0.11-*",
|
||||
"System.Text.Encoding": "4.0.11-*",
|
||||
"System.Threading": "4.0.11-*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,23 +14,6 @@
|
|||
},
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"dotnet5.4": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11-*",
|
||||
"System.ComponentModel": "4.0.1-*",
|
||||
"System.Diagnostics.Tools": "4.0.1-*",
|
||||
"System.Globalization": "4.0.11-*",
|
||||
"System.IO": "4.0.11-*",
|
||||
"System.Linq": "4.0.1-*",
|
||||
"System.Net.Primitives": "4.0.11-*",
|
||||
"System.Runtime": "4.0.21-*",
|
||||
"System.Runtime.Extensions": "4.0.11-*",
|
||||
"System.Runtime.InteropServices": "4.0.21-*",
|
||||
"System.Security.Claims": "4.0.1-*",
|
||||
"System.Security.Cryptography.X509Certificates": "4.0.0-*",
|
||||
"System.Security.Principal": "4.0.1-*",
|
||||
"System.Threading.Tasks": "4.0.11-*"
|
||||
}
|
||||
}
|
||||
"dotnet5.4": {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,11 +22,8 @@
|
|||
"dotnet5.4": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11-*",
|
||||
"System.Diagnostics.Debug": "4.0.11-*",
|
||||
"System.IO": "4.0.11-*",
|
||||
"System.IO.FileSystem": "4.0.1-*",
|
||||
"System.Runtime": "4.0.21-*",
|
||||
"System.Runtime.Extensions": "4.0.11-*"
|
||||
"System.IO.FileSystem": "4.0.1-*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue