隐藏平台warn,放开自有模块warn

This commit is contained in:
2023-05-16 17:24:07 +08:00
parent 67d599dce6
commit 1cb50e15d2
42 changed files with 66 additions and 28 deletions

View File

@@ -112,7 +112,7 @@ public static class EnumExtensions
{
if (field.FieldType.IsEnum)
{
strValue = ((int)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)).ToString();
strValue = ((int?)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)).ToString();
object[] arr = field.GetCustomAttributes(typeDescription, true);
if (arr.Length > 0)
{

View File

@@ -253,7 +253,9 @@ public class ElemeAuthRequest : DefaultAuthRequest
{
//就是比string往后一直加要好的优化容器
StringBuilder sb = new StringBuilder();
#pragma warning disable SYSLIB0021 //MD5CryptoServiceProvider已过时
using (MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider())
#pragma warning disable SYSLIB0021 //MD5CryptoServiceProvider已过时
{
//将输入字符串转换为字节数组并计算哈希。
byte[] data = md5.ComputeHash(Encoding.UTF8.GetBytes(willMd5Str));

View File

@@ -6,6 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8625;CS1572;CS1573;CS0168;</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@@ -4,6 +4,7 @@ using System.Text;
namespace JNPF.Extras.CollectiveOAuth.Utils;
#pragma warning disable SYSLIB0014 //WebRequest.Create已过时
public class HttpUtils
{
/// <summary>
@@ -269,4 +270,5 @@ public class HttpUtils
return result;
}
}
}
#pragma warning restore SYSLIB0014 //WebRequest.Create已过时

View File

@@ -52,7 +52,7 @@ public class TwitterBase
#region IComparer<QueryParameter> Members
public int Compare(QueryParameter x, QueryParameter y)
public int Compare(QueryParameter? x, QueryParameter? y)
{
if (x.Name == y.Name)
{