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


C# IAssemblyName类代码示例

本文整理汇总了C#中IAssemblyName的典型用法代码示例。如果您正苦于以下问题:C# IAssemblyName类的具体用法?C# IAssemblyName怎么用?C# IAssemblyName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: CreateAssemblyEnum

		public static extern int CreateAssemblyEnum(
			out IAssemblyEnum ppEnum,
			IApplicationContext pAppCtx,
			IAssemblyName pName,
			uint dwFlags,
			int pvReserved
			);
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:NuGenFusion.cs

示例2: InstallReferenceEnumerator

        public InstallReferenceEnumerator(IAssemblyName assemblyName)
        {
            var hr = FusionImports.CreateInstallReferenceEnum(out refEnum, assemblyName, 0, IntPtr.Zero);

            if (hr < 0)
            {
                Marshal.ThrowExceptionForHR(hr);
            }
        }
开发者ID:wangn6,项目名称:rep2,代码行数:9,代码来源:InstallReferenceEnumerator.cs

示例3: GetFullName

        private String GetFullName(IAssemblyName fusionAsmName)
        {
            StringBuilder sDisplayName = new StringBuilder(1024);
            int iLen = 1024;

            int hr = fusionAsmName.GetDisplayName(sDisplayName, ref iLen, (int)AssemblyNameDisplayFlags.ALL);
            if (hr < 0) {
                Marshal.ThrowExceptionForHR(hr);
            }

            return sDisplayName.ToString();
        }
开发者ID:Just-The-Tip,项目名称:T4Sandbox,代码行数:12,代码来源:AssemblyCacheEnum.cs

示例4: ExecuteScriptCommand

 public ExecuteScriptCommand(string script,
     string[] scriptArgs,
     IFileSystem fileSystem,
     IScriptExecutor scriptExecutor,
     IScriptPackResolver scriptPackResolver,
     ILog logger,
     IAssemblyName assemblyName)
 {
     _script = script;
     ScriptArgs = scriptArgs;
     _fileSystem = fileSystem;
     _scriptExecutor = scriptExecutor;
     _scriptPackResolver = scriptPackResolver;
     _logger = logger;
     _assemblyName = assemblyName;
 }
开发者ID:7sharp9,项目名称:scriptcs,代码行数:16,代码来源:ExecuteScriptCommand.cs

示例5: ExecuteReplCommand

 public ExecuteReplCommand(
     IFileSystem fileSystem,
     IScriptPackResolver scriptPackResolver,
     IScriptEngine scriptEngine,
     IFilePreProcessor filePreProcessor,
     ILog logger,
     IConsole console,
     IAssemblyName assemblyName
     )
 {
     _fileSystem = fileSystem;
     _scriptPackResolver = scriptPackResolver;
     _scriptEngine = scriptEngine;
     _filePreProcessor = filePreProcessor;
     _logger = logger;
     _console = console;
     _assemblyName = assemblyName;
 }
开发者ID:7sharp9,项目名称:scriptcs,代码行数:18,代码来源:ExecuteReplCommand.cs

示例6: GetDisplayName

        private static string GetDisplayName(IAssemblyName native)
        {
            int bufferSize = 1024;
            StringBuilder buffer = new StringBuilder(bufferSize);

            AssemblyDisplayFlags dwDisplayFlags = AssemblyDisplayFlags.ProcessorArchitecture |
                                                  AssemblyDisplayFlags.PublicKeyToken |
                                                  AssemblyDisplayFlags.LanguageId |
                                                  AssemblyDisplayFlags.Culture |
                                                  AssemblyDisplayFlags.Version;

            if (NativeMethods.SUCCESS == native.GetDisplayName(buffer, ref bufferSize, dwDisplayFlags))
            {
                return buffer.ToString();
            }

            return null;
        }
开发者ID:razaraz,项目名称:Pscx,代码行数:18,代码来源:AssemblyNameConvertor.cs

示例7: AssemblyDescription

        /// <summary>
        /// Initializes a new instance of the <see cref="AssemblyDescription"/> class.
        /// </summary>
        /// <param name="assemblyName">Name of the assembly.</param>
        public AssemblyDescription(IAssemblyName assemblyName)
        {
            //  Get the qualified name.
            var stringBuilder = new StringBuilder(10000);
            var iLen = 10000;
            var hr = assemblyName.GetDisplayName(stringBuilder, ref iLen, ASM_DISPLAY_FLAGS.ASM_DISPLAYF_VERSION
                | ASM_DISPLAY_FLAGS.ASM_DISPLAYF_CULTURE
                | ASM_DISPLAY_FLAGS.ASM_DISPLAYF_PUBLIC_KEY_TOKEN
                | ASM_DISPLAY_FLAGS.ASM_DISPLAYF_PROCESSORARCHITECTURE);
            if (hr < 0)
                Marshal.ThrowExceptionForHR(hr);
            var displayName = stringBuilder.ToString();

            //  Load properties from the display name.
            LoadPropertiesFromDisplayName(displayName);

            //  We have the assembly name, so we can use the optimised version to load the fusion properties.
            lazyFusionProperties = new Lazy<AssemblyFusionProperties>(DoLoadFusionProperties);
            lazyReflectionProperties = new Lazy<AssemblyReflectionProperties>(DoLoadReflectionProperties);
        }
开发者ID:wangn6,项目名称:rep2,代码行数:24,代码来源:AssemblyDescription.cs

示例8: ToAssemblyName

        public static AssemblyName ToAssemblyName(IAssemblyName native)
        {
            string displayName = GetDisplayName(native);

            using (AssemblyCache cache = new AssemblyCache())
            {
                // according to MSKB, this is a SUPPORTED method, therefore we can use the obtained path
                // in the ASSEMBLY_INFO struct to generate a fully-populated AssemblyName object.
                // see: http://support.microsoft.com/kb/317540

                string path = cache.QueryAssemblyPath(displayName);

                if (path != null)
                {
                    return AssemblyName.GetAssemblyName(path);
                }
            }

            return new AssemblyName(displayName);
        }
开发者ID:razaraz,项目名称:Pscx,代码行数:20,代码来源:AssemblyNameConvertor.cs

示例9: ScriptServiceRoot

 public ScriptServiceRoot(
     IFileSystem fileSystem,
     IPackageAssemblyResolver packageAssemblyResolver, 
     IScriptExecutor executor,
     IScriptEngine engine,
     IFilePreProcessor filePreProcessor,
     IScriptPackResolver scriptPackResolver, 
     IPackageInstaller packageInstaller,
     ILog logger,
     IAssemblyName assemblyName,
     IConsole console = null)
 {
     FileSystem = fileSystem;
     PackageAssemblyResolver = packageAssemblyResolver;
     Executor = executor;
     Engine = engine;
     FilePreProcessor = filePreProcessor;
     ScriptPackResolver = scriptPackResolver;
     PackageInstaller = packageInstaller;
     Logger = logger;
     Console = console;
     AssemblyName = assemblyName;
 }
开发者ID:7sharp9,项目名称:scriptcs,代码行数:23,代码来源:ScriptServiceRoot.cs

示例10: CreateAssemblyEnum

 private static extern void CreateAssemblyEnum(out IAssemblyEnum pEnum, IntPtr pUnkReserved, IAssemblyName pName,
     ASM_CACHE_FLAGS dwFlags, IntPtr pvReserved);
开发者ID:Robin--,项目名称:Warewolf,代码行数:2,代码来源:GAC.cs

示例11: GetNextAssembly

 /// <summary>
 ///     Get the next assembly name in the current enumerator or fail
 /// </summary>
 /// <param name="enumerator"></param>
 /// <param name="name"></param>
 /// <returns>0 if the enumeration is not at its end</returns>
 public static int GetNextAssembly(IAssemblyEnum enumerator, out IAssemblyName name)
 {
     return enumerator.GetNextAssembly((IntPtr) 0, out name, 0);
 }
开发者ID:Robin--,项目名称:Warewolf,代码行数:10,代码来源:GAC.cs

示例12: CreateAssemblyNameObject

 private static extern int CreateAssemblyNameObject(out IAssemblyName ppName, string szAssemblyName, uint dwFlags, int pvReserved);
开发者ID:hesam,项目名称:SketchSharp,代码行数:1,代码来源:AssemblyCache.cs

示例13: GetShortProperty

 internal UInt16 GetShortProperty(IAssemblyName name, ASM_NAME propertyName)
 {
     uint bufferSize = 512;
     IntPtr buffer = Marshal.AllocHGlobal((int)bufferSize);
     name.GetProperty(propertyName, buffer, ref bufferSize);
     byte low = Marshal.ReadByte(buffer);
     byte high = Marshal.ReadByte(buffer, 1);
     Marshal.FreeHGlobal(buffer);
     return (UInt16)(low + (high << 8));
 }
开发者ID:wangn6,项目名称:rep2,代码行数:10,代码来源:AssemblyFusionProperties.cs

示例14: GetByteArrayProperty

 internal byte[] GetByteArrayProperty(IAssemblyName name, ASM_NAME propertyName)
 {
     uint bufferSize = 512;
     IntPtr buffer = Marshal.AllocHGlobal((int)bufferSize);
     name.GetProperty(propertyName, buffer, ref bufferSize);
     byte[] result = new byte[bufferSize];
     for (int i = 0; i < bufferSize; i++)
         result[i] = Marshal.ReadByte(buffer, i);
     Marshal.FreeHGlobal(buffer);
     return result;
 }
开发者ID:wangn6,项目名称:rep2,代码行数:11,代码来源:AssemblyFusionProperties.cs

示例15: CreateAssemblyNameObject

 internal static extern int CreateAssemblyNameObject(out IAssemblyName ppEnum, String szAssemblyName, uint dwFlags, IntPtr pvReserved);
开发者ID:Clockwork-Muse,项目名称:coreclr,代码行数:1,代码来源:Win32Native.cs


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