The following Performance Warnings appear, when Code Analysis is ran on the RestSharp project:
CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'RestClient.ProcessResponse(IRestRequest, HttpResponse, RestRequestAsyncHandle, Action<IRestResponse, RestRequestAsyncHandle>)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp RestClient.Async.cs 120
CA1815 Override equals and operator equals on value types 'DateFormat' should override Equals. RestSharp Enum.cs 59
CA1815 Override equals and operator equals on value types 'DateFormat' should override the equality (==) and inequality (!=) operators. RestSharp Enum.cs 59
CA1810 Initialize reference type static fields inline Initialize all static fields in 'HttpEncoder' when those fields are declared and remove the explicit static constructor. RestSharp HtmlEncoder.cs 48
CA1811 Avoid uncalled private code 'Http.AddAsyncHeaderActions()' appears to have no upstream public or protected callers. RestSharp Http.Async.cs 385
CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'Http.AddAsyncHeaderActions()' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp Http.Async.cs 385
CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'Http.ExtractErrorResponse(HttpResponse, Exception)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp Http.Sync.cs 161
CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'HttpUtility.UrlEncode(string, Encoding)' with a call to 'String.IsNullOrEmpty'. RestSharp HttpUtility.cs 416
CA1819 Properties should not return arrays Change 'IHttp.RequestBodyBytes' to return a collection or make it a method. RestSharp IHttp.cs 88
CA1819 Properties should not return arrays Change 'IHttpResponse.RawBytes' to return a collection or make it a method. RestSharp IHttpResponse.cs 45
CA1819 Properties should not return arrays Change 'IRestResponse.RawBytes' to return a collection or make it a method. RestSharp IRestResponse.cs 53
CA1800 Do not cast unnecessarily 'parent', a parameter, is cast to type 'IList' multiple times in method 'JsonDeserializer.BuildList(Type, object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp JsonDeserializer.cs 154
CA1810 Initialize reference type static fields inline Initialize all static fields in 'OAuthTools' when those fields are declared and remove the explicit static constructor. RestSharp OAuthTools.cs 21
CA1800 Do not cast unnecessarily 'val', a variable, is cast to type 'byte[]' multiple times in method 'RestClient.ConfigureHttp(IRestRequest, IHttp)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp RestClient.cs 505
CA1800 Do not cast unnecessarily 'val', a variable, is cast to type 'Array' multiple times in method 'RestRequest.AddObject(object, params string[])'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp RestRequest.cs 305
CA1819 Properties should not return arrays Change 'RestResponseBase.RawBytes' to return a collection or make it a method. RestSharp RestResponse.cs 93
CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'StringExtensions.IsNullOrBlank(this string)' with a call to 'String.IsNullOrEmpty'. RestSharp StringExtensions.cs 14
CA1820 Test for empty strings using string length Replace the call to 'string.Equals(string)' in 'StringExtensions.ParseQueryString(this string)' with a call to 'String.IsNullOrEmpty'. RestSharp StringExtensions.cs 85
CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'XmlDeserializer.RemoveNamespace(XDocument)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp XmlDeserializer.cs 80
CA1800 Do not cast unnecessarily 'obj', a parameter, is cast to type 'IList' multiple times in method 'XmlSerializer.Serialize(object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp XmlSerializer.cs 72
CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'XmlSerializer.Serialize(object)' with a call to 'String.IsNullOrEmpty'. RestSharp XmlSerializer.cs 82
CA1800 Do not cast unnecessarily 'rawValue', a variable, is cast to type 'IList' multiple times in method 'XmlSerializer.Map(XElement, object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp XmlSerializer.cs 168
CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'XmlSerializer.Map(XElement, object)' with a call to 'String.IsNullOrEmpty'. RestSharp XmlSerializer.cs 170
The following Performance Warnings appear, when Code Analysis is ran on the RestSharp project:
CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'RestClient.ProcessResponse(IRestRequest, HttpResponse, RestRequestAsyncHandle, Action<IRestResponse, RestRequestAsyncHandle>)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp RestClient.Async.cs 120 CA1815 Override equals and operator equals on value types 'DateFormat' should override Equals. RestSharp Enum.cs 59 CA1815 Override equals and operator equals on value types 'DateFormat' should override the equality (==) and inequality (!=) operators. RestSharp Enum.cs 59 CA1810 Initialize reference type static fields inline Initialize all static fields in 'HttpEncoder' when those fields are declared and remove the explicit static constructor. RestSharp HtmlEncoder.cs 48 CA1811 Avoid uncalled private code 'Http.AddAsyncHeaderActions()' appears to have no upstream public or protected callers. RestSharp Http.Async.cs 385 CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'Http.AddAsyncHeaderActions()' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp Http.Async.cs 385 CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'Http.ExtractErrorResponse(HttpResponse, Exception)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp Http.Sync.cs 161 CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'HttpUtility.UrlEncode(string, Encoding)' with a call to 'String.IsNullOrEmpty'. RestSharp HttpUtility.cs 416 CA1819 Properties should not return arrays Change 'IHttp.RequestBodyBytes' to return a collection or make it a method. RestSharp IHttp.cs 88 CA1819 Properties should not return arrays Change 'IHttpResponse.RawBytes' to return a collection or make it a method. RestSharp IHttpResponse.cs 45 CA1819 Properties should not return arrays Change 'IRestResponse.RawBytes' to return a collection or make it a method. RestSharp IRestResponse.cs 53 CA1800 Do not cast unnecessarily 'parent', a parameter, is cast to type 'IList' multiple times in method 'JsonDeserializer.BuildList(Type, object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp JsonDeserializer.cs 154 CA1810 Initialize reference type static fields inline Initialize all static fields in 'OAuthTools' when those fields are declared and remove the explicit static constructor. RestSharp OAuthTools.cs 21 CA1800 Do not cast unnecessarily 'val', a variable, is cast to type 'byte[]' multiple times in method 'RestClient.ConfigureHttp(IRestRequest, IHttp)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp RestClient.cs 505 CA1800 Do not cast unnecessarily 'val', a variable, is cast to type 'Array' multiple times in method 'RestRequest.AddObject(object, params string[])'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp RestRequest.cs 305 CA1819 Properties should not return arrays Change 'RestResponseBase.RawBytes' to return a collection or make it a method. RestSharp RestResponse.cs 93 CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'StringExtensions.IsNullOrBlank(this string)' with a call to 'String.IsNullOrEmpty'. RestSharp StringExtensions.cs 14 CA1820 Test for empty strings using string length Replace the call to 'string.Equals(string)' in 'StringExtensions.ParseQueryString(this string)' with a call to 'String.IsNullOrEmpty'. RestSharp StringExtensions.cs 85 CA1822 Mark members as static The 'this' parameter (or 'Me' in Visual Basic) of 'XmlDeserializer.RemoveNamespace(XDocument)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. RestSharp XmlDeserializer.cs 80 CA1800 Do not cast unnecessarily 'obj', a parameter, is cast to type 'IList' multiple times in method 'XmlSerializer.Serialize(object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp XmlSerializer.cs 72 CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'XmlSerializer.Serialize(object)' with a call to 'String.IsNullOrEmpty'. RestSharp XmlSerializer.cs 82 CA1800 Do not cast unnecessarily 'rawValue', a variable, is cast to type 'IList' multiple times in method 'XmlSerializer.Map(XElement, object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. RestSharp XmlSerializer.cs 168 CA1820 Test for empty strings using string length Replace the call to 'string.operator ==(string, string)' in 'XmlSerializer.Map(XElement, object)' with a call to 'String.IsNullOrEmpty'. RestSharp XmlSerializer.cs 170