.Net Standard 2.0中但不在.Net Framework 4.6.1中的43种API是什么? [英] What are the 43 APIs that are in .Net Standard 2.0 but not in .Net Framework 4.6.1?

查看:103
本文介绍了.Net Standard 2.0中但不在.Net Framework 4.6.1中的43种API是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

The SO question entitled .NET Standard API Reference, quoting the discussion in https://github.com/dotnet/standard/issues/133, mentions 43 APIs that will be included in the .Net Standard 2.0 but are not supported by .Net Framework 4.6.1. However, I have not been able to find a list of those 43 APIs anywhere on the Internet. The closest I've come in my search is https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.5_diff.md and https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.6_diff.md, which list the APIs introduced in .Net Standard 1.5 and 1.6. At first I thought my search was over, but then I realized:


  1. 在这两个列表中有超过43种API,并且

  2. 其中许多已经受.Net Framework 4.6.1的支持。

在Internet上的任何地方中,是否列出了.net Standard 2.0中包含但不包括在.Net Framework 4.6.1中的43个特定 API?

Is there, anywhere on the Internet, a list of the 43 specific APIs that are included in .Net Standard 2.0 but not included in .Net Framework 4.6.1?

推荐答案

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

By using https://apisof.net and checking it against every API listed in https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.5_diff.md and https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.6_diff.md, I've managed to put together a list of the APIs present in .Net Standard 1.6 but missing in .Net Framework 4.6.1:


  • System.Diagnostics.Tracing.EventCounter


    • public EventCounter(字符串名称,EventSource eventSource)(不在.Net Framework中)

    • 公共无效WriteMetric(浮点值)(不在.Net Framework中)

    • System.Diagnostics.Tracing.EventCounter:
      • public EventCounter(string name, EventSource eventSource) (not in .Net Framework)
      • public void WriteMetric(float value) (not in .Net Framework)

      • 公共事件EventHandler< EventCommandEventArgs> EventCommandExecuted (在.Net Framework 4.6.2中,但不在4.6.1中)

      • public event EventHandler<EventCommandEventArgs> EventCommandExecuted (in .Net Framework 4.6.2, but not 4.6.1)

      • public int BufferSize {get; } (不在.Net Framework中)

      • public Stream UnderlyingStream {get; } (不在.Net Framework中)

      • public int BufferSize { get; } (not in .Net Framework)
      • public Stream UnderlyingStream { get; } (not in .Net Framework)

      System.Reflection.TypeInfo :以下所有API,都不是在.Net Framework中

      System.Reflection.TypeInfo: all the following APIs, none of which are in .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静态字符串TargetFrameworkName {get; } (不在.Net Framework中)

      • 公共静态对象GetData(字符串名称)(不在.Net Framework)

      • System.AppContext:
        • public static string TargetFrameworkName { get; } (not in .Net Framework)
        • public static object GetData(string name) (not in .Net Framework)

          • 公共静态IEnumerable< TSource>附加< TSource>(此IEnumerable< TSource>源,TSource元素)(不在.Net Framework中)

          • 公共静态IEnumerable< TSource> Prepend< TSource>(此IEnumerable< TSource>源,TSource元素)(不在.Net Framework中)

          • public static IEnumerable<TSource> Append<TSource>(this IEnumerable<TSource> source, TSource element) (not in .Net Framework)
          • public static IEnumerable<TSource> Prepend<TSource>(this IEnumerable<TSource> source, TSource element) (not in .Net Framework)

          System.Security.Cryptography.ECCurve :整个 ECCurve 结构及其中的所有内容(包括 System.Security.Cryptography.ECCurve.NamedCurves 静态类),不在.Net Framework中。换句话说,以下列表中的所有API在.Net Core中都是新的,在.Net Framework 4.6.1(或4.6.2)中找不到:

          System.Security.Cryptography.ECCurve: entire ECCurve struct, and everything in it (including the System.Security.Cryptography.ECCurve.NamedCurves static class), are not in .Net Framework. In other words, all of the APIs in the following list are new in .Net Core and cannot be found in .Net Framework 4.6.1 (or 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


          • 公共静态ECDsa创建(ECCurve曲线)(不在.Net Framework中)

          • 公共静态ECDsa创建(ECParameters参数)(不在.Net Framework中)

          • 公共虚拟ECParameters ExportExplicitParameters(bool includePrivateParameters)(不在.Net Framework)

          • 公共虚拟ECParameters ExportParameters(bool includePrivatePar ameters)(不在.Net Framework中)

          • 公共虚拟无效值GenerateKey(ECCurve曲线)(不是在.Net Framework中)

          • 公共虚拟void ImportParameters(ECParameters参数)(不在.Net Framework中)

          • System.Security.Cryptography.ECParameters struct: not in .Net Framework
          • System.Security.Cryptography.ECPoint struct: not in .Net Framework
          • System.Security.Cryptography.ECDsa:
            • public static ECDsa Create(ECCurve curve) (not in .Net Framework)
            • public static ECDsa Create(ECParameters parameters) (not in .Net Framework)
            • public virtual ECParameters ExportExplicitParameters(bool includePrivateParameters) (not in .Net Framework)
            • public virtual ECParameters ExportParameters(bool includePrivateParameters) (not in .Net Framework)
            • public virtual void GenerateKey(ECCurve curve) (not in .Net Framework)
            • public virtual void ImportParameters(ECParameters parameters) (not in .Net Framework)

              • 受保护的ID Caption名{ ;组; } (不在.Net Framework中)

              • 受保护的IDictionary Caps {get;组; } (不在.Net Framework中)

              • protected IDictionary CapNames { get; set; } (not in .Net Framework)
              • protected IDictionary Caps { get; set; } (not in .Net Framework)

              远远超过了43个API。我尚未浏览.Net Standard 2.0 API列表(巨大);完成后,我将编辑此答案以反映我的发现。

              That's a lot more than 43 APIs. I haven't yet gone through the .Net Standard 2.0 API list (it's huge); once I do, I'll edit this answer to reflect what I find.

              这篇关于.Net Standard 2.0中但不在.Net Framework 4.6.1中的43种API是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆