现在,这很奇怪。在完成对.NET中基于声明的解决方案的研究之后,发现不同的作者在实际谈论同一问题时会引用.NET namespace 中的不同类。声明类(更不用说其他的Identity,Principal,Manager,Helper类)在3个不同的命名空间中定义。
很明显,WIF是.NET 3.5和4.0的单独附加组件,并且它已被重写并成为4.5的核心组成部分。但是,这对于确定用于新项目的类的明确指示确实有帮助(这样可以更轻松地将端口移植到4.5)。还有其他人对此主题有更多信息吗?
第一个链接:http://msdn.microsoft.com/en-us/library/ms572956(v=vs.110)(System.IdentityModel.Claims命名空间)
第二名:http://msdn.microsoft.com/en-us/library/microsoft.identitymodel.claims.claim.aspx(Microsoft.IdentityModel.Claims)
第三名:(System.Security.Claims.Claim)
最佳答案
对于仍在寻找最终答案的任何人,MSDN的System.IdentityModel.Claims Namespace页面上都有以下信息...
The System.IdentityModel.Claims namespace contains classes that implement the Windows Communication Foundation (WCF) claims-based identity authorization model. This model includes the Claim class and the ClaimSet class.
Beginning with .NET Framework 4.5 and the integration of Windows Identity Foundation (WIF) into the .NET Framework, the WCF claims-based identity model has been superseded by WIF. WIF provides a claims-based identity object model that can be used to provide authentication and authorization across several Microsoft product stacks, including the CLR, WCF, and ASP.NET. The WIF classes that represent claims, claim types, and identities and principals that are based on claims are contained in the System.Security.Claims namespace. Beginning with .NET 4.5, these classes should be used instead of those in the System.IdentityModel.Claims namespace.
关于.net - .NET在三个 namespace 中的声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11713339/