示例#1
0
 public static void AddAssemblies(params string[] assemblies)
 {
     foreach (string item in assemblies)
     {
         if (!ReferencedAssemblies.Contains(item))
         {
             ReferencedAssemblies.Add(item);
         }
     }
 }
示例#2
0
        private void RecordReferencedNamespaceAndAssembly(string nspace, string assembly)
        {
            if (!String.IsNullOrEmpty((nspace)))
            {
                if (!ReferencedNamespaces.Contains(nspace) && ReferencedNamespace.Name != nspace)
                {
                    ReferencedNamespaces.Add(nspace);
                }
            }

            if (!ReferencedAssemblies.Contains(assembly) && grainAssembly.GetName().Name + "Client" != assembly)
            {
                ReferencedAssemblies.Add(assembly);
            }
        }
        //public string ProxyServer
        //{
        //    get { return m_proxyServer; }
        //    set { m_proxyServer = value; }
        //}

        #endregion

        #region utility
        protected override void AddReferencedAssemblies()
        {
            if (!ReferencedAssemblies.Contains("System.dll"))
            {
                ReferencedAssemblies.Add("System.dll");
            }
            if (!ReferencedAssemblies.Contains("mscorlib.dll"))
            {
                ReferencedAssemblies.Add("mscorlib.dll");
            }
            if (!ReferencedAssemblies.Contains("System.Xml.dll"))
            {
                ReferencedAssemblies.Add("System.Xml.dll");
            }
            if (!ReferencedAssemblies.Contains("System.Web.Services.dll"))
            {
                ReferencedAssemblies.Add("System.Web.Services.dll");
            }
            if (!ReferencedAssemblies.Contains("System.Data.dll"))
            {
                ReferencedAssemblies.Add("System.Data.dll");
            }
        }
 /// <summary>
 /// Add assembly references to the list of assemblies to
 /// include when compiling the code
 /// </summary>
 protected override void AddReferencedAssemblies()
 {
     if (!ReferencedAssemblies.Contains("System.dll"))
     {
         ReferencedAssemblies.Add("System.dll");
     }
     if (!ReferencedAssemblies.Contains("mscorlib.dll"))
     {
         ReferencedAssemblies.Add("mscorlib.dll");
     }
     if (!ReferencedAssemblies.Contains("system.xml.dll"))
     {
         ReferencedAssemblies.Add("system.xml.dll");
     }
     if (!ReferencedAssemblies.Contains(Assembly.GetExecutingAssembly().Location))
     {
         ReferencedAssemblies.Add(Assembly.GetExecutingAssembly().Location);
     }
     if (!ReferencedAssemblies.Contains("System.Drawing.dll"))
     {
         ReferencedAssemblies.Add("System.Drawing.dll");
     }
 }