Example #1
0
 public static Assembly GetAssemblyFromAsmx(string asmxFile)
 {
     lock (_objLock)
     {
         Type type = null;
         if (!_webserviceTypeCache.Contains(asmxFile))
         {
             Type[] types = GenerateAssembly(asmxFile).GetTypes();
             if (types.Length > 0)
             {
                 type = types[0];
                 _webserviceTypeCache[asmxFile] = type;
                 ObjectFactory.AddTypeToCache(type);
             }
         }
         else
         {
             type = _webserviceTypeCache[asmxFile] as Type;
         }
         if (type != null)
         {
             return(type.Assembly);
         }
     }
     return(null);
 }