像beta(dnx)早期的这个问题一样,我正在尝试将代码移植到.net core 1.0 rtm,并且代码依赖于以下单元,其中包含ValidationAttribute类型和其他内容:
using System.ComponentModel.DataAnnotations;
namespace Hl7.Fhir.Introspection
{
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
public sealed class FhirElementAttribute : ValidationAttribute
...
如何将此类代码移植到dotnet core 1.0 rtm?
我使用非官方的反向软件包搜索来搜索新的Microsoft开源软件包中的类。
您正在寻找System.Runtime.AttributeUsageAttribute
内部的System.Runtime包。它可以使用.NET Standard 1.0
。
编辑:对不起。你问的ValidationAttribute
不是AttributeUsage
我的坏事。反向程序包搜索指向System.ComponentModel.Annotations,
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句