当前位置: 首页>>代码示例>>C#>>正文


C# Evidence.MarkAllEvidenceAsUsed方法代码示例

本文整理汇总了C#中System.Security.Policy.Evidence.MarkAllEvidenceAsUsed方法的典型用法代码示例。如果您正苦于以下问题:C# Evidence.MarkAllEvidenceAsUsed方法的具体用法?C# Evidence.MarkAllEvidenceAsUsed怎么用?C# Evidence.MarkAllEvidenceAsUsed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Security.Policy.Evidence的用法示例。


在下文中一共展示了Evidence.MarkAllEvidenceAsUsed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckMembershipCondition

 internal static bool CheckMembershipCondition(IMembershipCondition membershipCondition, Evidence evidence, out object usedEvidence)
 {
     IReportMatchMembershipCondition condition = membershipCondition as IReportMatchMembershipCondition;
     if (condition != null)
     {
         return condition.Check(evidence, out usedEvidence);
     }
     usedEvidence = null;
     evidence.MarkAllEvidenceAsUsed();
     return membershipCondition.Check(evidence);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:PolicyManager.cs

示例2: CheckMembershipCondition

#pragma warning restore 618

        /// <summary>
        ///     Check the membership condition to see if it matches the given evidence, and if the
        ///     membership condition supports it also return the evidence which was used to match the
        ///     membership condition.
        /// </summary>
        internal static bool CheckMembershipCondition(IMembershipCondition membershipCondition,
                                                      Evidence evidence,
                                                      out object usedEvidence) {
            BCLDebug.Assert(membershipCondition != null, "membershipCondition != null");
            BCLDebug.Assert(evidence != null, "evidence != null");

            IReportMatchMembershipCondition reportMatchMembershipCondition = membershipCondition as IReportMatchMembershipCondition;

            // If the membership condition supports telling us which evidence was used to match, then use
            // that capability.  Otherwise, we cannot report this information - which means we need to be
            // conservative and assume that all of the evidence was used and mark it as such.
            if (reportMatchMembershipCondition != null) {
                return reportMatchMembershipCondition.Check(evidence, out usedEvidence);
            }
            else {
                usedEvidence = null;
                evidence.MarkAllEvidenceAsUsed();

                return membershipCondition.Check(evidence);
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:28,代码来源:policymanager.cs

示例3: ResolveCodeGroup

#pragma warning disable 618
        internal static PolicyStatement ResolveCodeGroup(CodeGroup codeGroup, Evidence evidence)
        {
            // Custom code groups won't know how to mark the evidence they're using, so we need to
            // be pessimistic and mark it all as used if we encounter a code group from outside of mscorlib.
            if (codeGroup.GetType().Assembly != typeof(UnionCodeGroup).Assembly)
            {
                evidence.MarkAllEvidenceAsUsed();
            }

            return codeGroup.Resolve(evidence);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:12,代码来源:policymanager.cs

示例4: ResolveCodeGroup

 internal static PolicyStatement ResolveCodeGroup(CodeGroup codeGroup, Evidence evidence)
 {
     if (codeGroup.GetType().Assembly != typeof(UnionCodeGroup).Assembly)
     {
         evidence.MarkAllEvidenceAsUsed();
     }
     return codeGroup.Resolve(evidence);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:PolicyManager.cs


注:本文中的System.Security.Policy.Evidence.MarkAllEvidenceAsUsed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。