Beispiel #1
0
 public SPResourceManager(string baseName, Assembly assembly) : base(baseName, assembly)
 {
     if (SPResourceManager.LoadDls())
     {
         try
         {
             this.innerResourceManager = (ResourceManager)SPResourceManager.dlsCreateResourceManager.Invoke(null, new object[]
             {
                 baseName,
                 assembly
             });
         }
         catch (Exception ex)
         {
             if (!(ex is TargetException) && !(ex is ArgumentException) && !(ex is TargetInvocationException) && !(ex is TargetParameterCountException) && !(ex is MethodAccessException) && !(ex is InvalidOperationException))
             {
                 throw;
             }
             this.innerResourceManager = null;
         }
     }
 }
Beispiel #2
0
#pragma warning restore 414

        internal static bool LoadDls()
        {
            if (!SPResourceManager.dlsLoaded)
            {
                Interlocked.CompareExchange <MethodInfo>(ref SPResourceManager.dlsCreateResourceManager, SPResourceManager.FindDls(), null);
                SPResourceManager.dlsLoaded = true;
            }
            return(SPResourceManager.dlsCreateResourceManager != null);
        }