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


C# AssemblyName.SetHashControl方法代码示例

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


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

示例1: InternalLoadFrom

        [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
        internal static RuntimeAssembly InternalLoadFrom(String assemblyFile, 
                                                         Evidence securityEvidence,
                                                         byte[] hashValue, 
                                                         AssemblyHashAlgorithm hashAlgorithm,
                                                         bool forIntrospection,
                                                         bool suppressSecurityChecks,
                                                         ref StackCrawlMark stackMark)
        {
            if (assemblyFile == null)
                throw new ArgumentNullException("assemblyFile");

            Contract.EndContractBlock();

#if FEATURE_CAS_POLICY
            if (securityEvidence != null && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled)
            {
                throw new NotSupportedException(Environment.GetResourceString("NotSupported_RequiresCasPolicyImplicit"));
            }
#endif // FEATURE_CAS_POLICY
            AssemblyName an = new AssemblyName();
            an.CodeBase = assemblyFile;
            an.SetHashControl(hashValue, hashAlgorithm);
            // The stack mark is used for MDA filtering
            return InternalLoadAssemblyName(an, securityEvidence, null, ref stackMark, true /*thrownOnFileNotFound*/, forIntrospection, suppressSecurityChecks);
        }
开发者ID:afrog33k,项目名称:csnative,代码行数:26,代码来源:Assembly.cs

示例2: InternalLoadFrom

 internal static RuntimeAssembly InternalLoadFrom(string assemblyFile, System.Security.Policy.Evidence securityEvidence, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, bool forIntrospection, bool suppressSecurityChecks, ref StackCrawlMark stackMark)
 {
     if (assemblyFile == null)
     {
         throw new ArgumentNullException("assemblyFile");
     }
     if ((securityEvidence != null) && !AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled)
     {
         throw new NotSupportedException(Environment.GetResourceString("NotSupported_RequiresCasPolicyImplicit"));
     }
     AssemblyName assemblyRef = new AssemblyName {
         CodeBase = assemblyFile
     };
     assemblyRef.SetHashControl(hashValue, hashAlgorithm);
     return InternalLoadAssemblyName(assemblyRef, securityEvidence, ref stackMark, forIntrospection, suppressSecurityChecks);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:RuntimeAssembly.cs

示例3: InternalLoadFrom

        private static Assembly InternalLoadFrom(String assemblyFile, 
                                                 Evidence securityEvidence,
                                                 byte[] hashValue, 
                                                 AssemblyHashAlgorithm hashAlgorithm,
                                                 bool forIntrospection,
                                                 ref StackCrawlMark stackMark)
        {
            if (assemblyFile == null)
                throw new ArgumentNullException("assemblyFile");
    
            AssemblyName an = new AssemblyName();
            an.CodeBase = assemblyFile;
            an.SetHashControl(hashValue, hashAlgorithm);

            return InternalLoad(an, securityEvidence, ref stackMark, forIntrospection);
        }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:16,代码来源:assembly.cs

示例4: InternalLoadFrom

 private static Assembly InternalLoadFrom(string assemblyFile, System.Security.Policy.Evidence securityEvidence, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, bool forIntrospection, ref StackCrawlMark stackMark)
 {
     if (assemblyFile == null)
     {
         throw new ArgumentNullException("assemblyFile");
     }
     AssemblyName assemblyRef = new AssemblyName {
         CodeBase = assemblyFile
     };
     assemblyRef.SetHashControl(hashValue, hashAlgorithm);
     return InternalLoad(assemblyRef, securityEvidence, ref stackMark, forIntrospection);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:12,代码来源:Assembly.cs

示例5: InternalLoadFrom

        [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
        internal static RuntimeAssembly InternalLoadFrom(String assemblyFile, 
                                                         Evidence securityEvidence,
                                                         byte[] hashValue, 
                                                         AssemblyHashAlgorithm hashAlgorithm,
                                                         bool forIntrospection,
                                                         bool suppressSecurityChecks,
                                                         ref StackCrawlMark stackMark)
        {
            if (assemblyFile == null)
                throw new ArgumentNullException(nameof(assemblyFile));

            Contract.EndContractBlock();

            AssemblyName an = new AssemblyName();
            an.CodeBase = assemblyFile;
            an.SetHashControl(hashValue, hashAlgorithm);
            // The stack mark is used for MDA filtering
            return InternalLoadAssemblyName(an, securityEvidence, null, ref stackMark, true /*thrownOnFileNotFound*/, forIntrospection, suppressSecurityChecks);
        }
开发者ID:kouvel,项目名称:coreclr,代码行数:20,代码来源:Assembly.cs


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