private void AddReferencedAssemblies()
 {
     for (int i = 0; i < pcu_file.ref_assemblies.Length; i++)
     {
         string s   = pcu_file.ref_assemblies[i];
         string tmp = s.Substring(0, s.IndexOf(','));
         tmp = Compiler.Compiler.GetReferenceFileName(tmp + ".dll");
         System.Reflection.Assembly assm = NetHelper.LoadAssembly(tmp);
         NetHelper.init_namespaces(assm);
         AssemblyDocCache.Load(assm, tmp);
         //namespaces.AddRange(NetHelper.GetNamespaces(assm));
         (cur_scope as InterfaceUnitScope).AddReferencedAssembly(assm);
     }
 }
예제 #2
0
 private static string GetNormalHint(string s)
 {
     return(AssemblyDocCache.GetNormalHint(s));
 }
        private static void internalCompleteDocumentation()
        {
            try
            {
                if (dispatcher == null)
                {
                    return;
                }
                for (int i = 0; i < elem_cache.Count; i++)
                {
                    MemberInfo mi = elem_cache[i];
                    SymInfo    si = null;
                    switch (mi.MemberType)
                    {
                    case MemberTypes.TypeInfo:
                        si              = doc_wait_list[mi];
                        si.description += "\n" + AssemblyDocCache.GetDocumentation(mi as Type);
                        si.has_doc      = true;
                        dispatcher.Update(si);
                        break;

                    case MemberTypes.Method:
                        si = doc_wait_list[mi];
                        MethodInfo meth = mi as MethodInfo;
                        si.description += "\n" + AssemblyDocCache.GetDocumentation(meth);    //AssemblyDocCache.GetDocumentation(meth.DeclaringType.Assembly,"M:"+meth.DeclaringType.FullName+"."+meth.Name+GetParamNames(meth));
                        si.has_doc      = true;
                        dispatcher.Update(si);
                        break;

                    case MemberTypes.Property:
                        si = doc_wait_list[mi];
                        PropertyInfo pi = mi as PropertyInfo;
                        si.description += "\n" + AssemblyDocCache.GetDocumentation(pi);    //AssemblyDocCache.GetDocumentation(pi.DeclaringType.Assembly,"P:"+pi.DeclaringType.FullName+"."+pi.Name);
                        si.has_doc      = true;
                        dispatcher.Update(si);
                        break;

                    case MemberTypes.Event:
                        si = doc_wait_list[mi];
                        EventInfo ei = mi as EventInfo;
                        si.description += "\n" + AssemblyDocCache.GetDocumentation(ei);    //AssemblyDocCache.GetDocumentation(ei.DeclaringType.Assembly,"E:"+ei.DeclaringType.FullName+"."+ei.Name);
                        si.has_doc      = true;
                        dispatcher.Update(si);
                        break;

                    case MemberTypes.Constructor:
                        si = doc_wait_list[mi];
                        ConstructorInfo ci = mi as ConstructorInfo;
                        si.description += "\n" + AssemblyDocCache.GetDocumentation(ci);    //AssemblyDocCache.GetDocumentation(ci.DeclaringType.Assembly,"M:"+ci.DeclaringType.FullName+".#ctor"+GetParamNames(ci));
                        si.has_doc      = true;
                        dispatcher.Update(si);
                        break;

                    case MemberTypes.Field:
                        si = doc_wait_list[mi];
                        FieldInfo fi = mi as FieldInfo;
                        si.description += "\n" + AssemblyDocCache.GetDocumentation(fi);    //AssemblyDocCache.GetDocumentation(fi.DeclaringType.Assembly,"F:"+fi.DeclaringType.FullName+"."+fi.Name);
                        si.has_doc      = true;
                        dispatcher.Update(si);
                        break;
                    }
                }
            }
            catch (Exception e)
            {
            }
        }