Ejemplo n.º 1
0
        public Object ResolveRef(Assembly asm)
        {
            UCOMITypeLib rslt = null;

            // If the typelib name is null then create it from the assembly name.
            String FullyQualifiedTypeLibName = Path.Combine(TlbExpCode.s_Options.m_strOutputDir, asm.GetName().Name) + ".tlb";

            if (TlbExpCode.s_Options.m_bVerboseMode)
            {
                Console.WriteLine(Resource.FormatString("Msg_AutoExportingAssembly", asm.GetName().Name, FullyQualifiedTypeLibName));
            }

            // Make sure the current typelib will not be overriten by the
            // typelib generated by the assembly being exported.
            if (String.Compare(FullyQualifiedTypeLibName, TlbExpCode.s_Options.m_strTypeLibName, true, CultureInfo.InvariantCulture) == 0)
            {
                String str = Resource.FormatString("Err_RefTlbOverwrittenByOutput", asm.GetName().Name, FullyQualifiedTypeLibName);
                TlbExpCode.WriteErrorMsg(str);
                throw new ApplicationException(str);
            }

            // Export the typelib for the module.
            rslt = TlbExpCode.DoExport(asm, FullyQualifiedTypeLibName);

            return(rslt);
        }
Ejemplo n.º 2
0
 public int Run(TlbExpOptions s_options)
 {
     return(TlbExpCode.Run(s_options));
 }