gpt4 book ai didi

.net - .Net Standard 2.0 中包含但 .Net Framework 4.6.1 中没有的 43 个 API 是什么?

转载 作者:行者123 更新时间:2023-12-02 01:09:29 29 4
gpt4 key购买 nike

题为 .NET Standard API Reference 的问题,引用https://github.com/dotnet/standard/issues/133中的讨论,提到 43 个 API 将包含在 .Net Standard 2.0 中,但不受 .Net Framework 4.6.1 支持。但是,我无法在 Internet 上的任何地方找到这 43 个 API 的列表。我在搜索中最接近的是 https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.5_diff.mdhttps://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.6_diff.md ,其中列出了 .Net Standard 1.5 和 1.6 中引入的 API。起初我以为我的搜索结束了,但后来我意识到:

  1. 这两个列表中有超过 43 个 API,并且
  2. 其中许多已受 .Net Framework 4.6.1 支持。

互联网上任何地方是否存在 .Net Standard 2.0 中包含但 .Net Framework 4.6.1 中未包含的 43 个特定 API 的列表?

最佳答案

通过使用https://apisof.net并根据https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.5_diff.md中列出的每个API进行检查和 https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.6_diff.md ,我设法整理了 .Net Standard 1.6 中存在但 .Net Framework 4.6.1 中缺失的 API 列表:

  • System.Diagnostics.Tracing.EventCounter :
    • public EventCounter(string name, EventSource eventSource) (不在 .Net Framework 中)
    • public void WriteMetric(float value) (不在 .Net Framework 中)
  • System.Diagnostics.Tracing.EventSource :
    • public event EventHandler<EventCommandEventArgs> EventCommandExecuted (在 .Net Framework 4.6.2 中,但不在 4.6.1 中)
  • System.IO.BufferedStream :
    • public int BufferSize { get; } (不在 .Net Framework 中)
    • public Stream UnderlyingStream { get; } (不在 .Net Framework 中)
  • System.Reflection.TypeInfo :以下所有 API,均不在 .Net Framework 中

    public virtual bool IsCOMObject { get; }
    public override MemberTypes MemberType { get; }
    public virtual StructLayoutAttribute StructLayoutAttribute { get; }
    public ConstructorInfo TypeInitializer { get; }
    public virtual Type UnderlyingSystemType { get; }
    public virtual Type[] FindInterfaces(TypeFilter filter, object filterCriteria);
    public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria);
    public ConstructorInfo GetConstructor(Type[] types);
    public ConstructorInfo[] GetConstructors();
    public virtual ConstructorInfo[] GetConstructors(BindingFlags bindingAttr);
    public virtual MemberInfo[] GetDefaultMembers();
    public virtual string GetEnumName(object value);
    public virtual string[] GetEnumNames();
    public virtual Type GetEnumUnderlyingType();
    public virtual Array GetEnumValues();
    public EventInfo GetEvent(string name);
    public virtual EventInfo GetEvent(string name, BindingFlags bindingAttr);
    public virtual EventInfo[] GetEvents();
    public virtual EventInfo[] GetEvents(BindingFlags bindingAttr);
    public FieldInfo GetField(string name);
    public virtual FieldInfo GetField(string name, BindingFlags bindingAttr);
    public FieldInfo[] GetFields();
    public virtual FieldInfo[] GetFields(BindingFlags bindingAttr);
    public virtual Type[] GetGenericArguments();
    public Type GetInterface(string name);
    public virtual Type GetInterface(string name, bool ignoreCase);
    public virtual Type[] GetInterfaces();
    public MemberInfo[] GetMember(string name);
    public virtual MemberInfo[] GetMember(string name, BindingFlags bindingAttr);
    public virtual MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr);
    public MemberInfo[] GetMembers();
    public virtual MemberInfo[] GetMembers(BindingFlags bindingAttr);
    public MethodInfo GetMethod(string name);
    public MethodInfo GetMethod(string name, BindingFlags bindingAttr);
    public MethodInfo GetMethod(string name, Type[] types);
    public MethodInfo GetMethod(string name, Type[] types, ParameterModifier[] modifiers);
    public MethodInfo[] GetMethods();
    public virtual MethodInfo[] GetMethods(BindingFlags bindingAttr);
    public Type GetNestedType(string name);
    public virtual Type GetNestedType(string name, BindingFlags bindingAttr);
    public Type[] GetNestedTypes();
    public virtual Type[] GetNestedTypes(BindingFlags bindingAttr);
    public PropertyInfo[] GetProperties();
    public virtual PropertyInfo[] GetProperties(BindingFlags bindingAttr);
    public PropertyInfo GetProperty(string name);
    public PropertyInfo GetProperty(string name, BindingFlags bindingAttr);
    public PropertyInfo GetProperty(string name, Type returnType);
    public PropertyInfo GetProperty(string name, Type returnType, Type[] types);
    public PropertyInfo GetProperty(string name, Type returnType, Type[] types, ParameterModifier[] modifiers);
    public PropertyInfo GetProperty(string name, Type[] types);
    public virtual bool IsAssignableFrom(Type c);
    public virtual bool IsEnumDefined(object value);
    public virtual bool IsEquivalentTo(Type other);
    public virtual bool IsInstanceOfType(object o);
  • System.AppContext :
    • public static string TargetFrameworkName { get; } (不在 .Net Framework 中)
    • public static object GetData(string name) (不在 .Net Framework 中)
  • System.Linq.Enumerable :
    • public static IEnumerable<TSource> Append<TSource>(this IEnumerable<TSource> source, TSource element) (不在 .Net Framework 中)
    • public static IEnumerable<TSource> Prepend<TSource>(this IEnumerable<TSource> source, TSource element) (不在 .Net Framework 中)
  • System.Security.Cryptography.ECCurve :整个ECCurve struct 及其中的所有内容(包括 System.Security.Cryptography.ECCurve.NamedCurves 静态类)都不在 .Net Framework 中。换句话说,以下列表中的所有 API 都是 .Net Core 中新增的,在 .Net Framework 4.6.1(或 4.6.2)中找不到:

    public struct ECCurve {
    public enum ECCurveType {
    Characteristic2 = 4,
    Implicit = 0,
    Named = 5,
    PrimeMontgomery = 3,
    PrimeShortWeierstrass = 1,
    PrimeTwistedEdwards = 2,
    }
    public static class NamedCurves {
    public static ECCurve brainpoolP160r1 { get; }
    public static ECCurve brainpoolP160t1 { get; }
    public static ECCurve brainpoolP192r1 { get; }
    public static ECCurve brainpoolP192t1 { get; }
    public static ECCurve brainpoolP224r1 { get; }
    public static ECCurve brainpoolP224t1 { get; }
    public static ECCurve brainpoolP256r1 { get; }
    public static ECCurve brainpoolP256t1 { get; }
    public static ECCurve brainpoolP320r1 { get; }
    public static ECCurve brainpoolP320t1 { get; }
    public static ECCurve brainpoolP384r1 { get; }
    public static ECCurve brainpoolP384t1 { get; }
    public static ECCurve brainpoolP512r1 { get; }
    public static ECCurve brainpoolP512t1 { get; }
    public static ECCurve nistP256 { get; }
    public static ECCurve nistP384 { get; }
    public static ECCurve nistP521 { get; }
    }
    public byte[] A;
    public byte[] B;
    public byte[] Cofactor;
    public ECCurve.ECCurveType CurveType;
    public ECPoint G;
    public Nullable<HashAlgorithmName> Hash;
    public byte[] Order;
    public byte[] Polynomial;
    public byte[] Prime;
    public byte[] Seed;
    public bool IsCharacteristic2 { get; }
    public bool IsExplicit { get; }
    public bool IsNamed { get; }
    public bool IsPrime { get; }
    public Oid Oid { get; }
    public static ECCurve CreateFromFriendlyName(string oidFriendlyName);
    public static ECCurve CreateFromOid(Oid curveOid);
    public static ECCurve CreateFromValue(string oidValue);
    public void Validate();
    }
  • System.Security.Cryptography.ECParameters 结构:不在 .Net Framework 中
  • System.Security.Cryptography.ECPoint 结构:不在 .Net Framework 中
  • System.Security.Cryptography.ECDsa :
    • public static ECDsa Create(ECCurve curve) (不在 .Net Framework 中)
    • public static ECDsa Create(ECParameters parameters) (不在 .Net Framework 中)
    • public virtual ECParameters ExportExplicitParameters(bool includePrivateParameters) (不在 .Net Framework 中)
    • public virtual ECParameters ExportParameters(bool includePrivateParameters) (不在 .Net Framework 中)
    • public virtual void GenerateKey(ECCurve curve) (不在 .Net Framework 中)
    • public virtual void ImportParameters(ECParameters parameters) (不在 .Net Framework 中)
  • System.Text.RegularExpressions.Regex :
    • protected IDictionary CapNames { get; set; } (不在 .Net Framework 中)
    • protected IDictionary Caps { get; set; } (不在 .Net Framework 中)

这远远超过 43 个 API。我还没有浏览过 .Net Standard 2.0 API 列表(它巨大);一旦完成,我将编辑此答案以反射(reflect)我的发现。

关于.net - .Net Standard 2.0 中包含但 .Net Framework 4.6.1 中没有的 43 个 API 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43601101/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com