Beispiel #1
0
 static SpacePluginProvider()
 {
     try
     {
         _sp = (SpacePluginBase)Activator.CreateInstance(Type.GetType("Discuz.Space.SpacePlugin, Discuz.Space", false, true));
     }
     catch
     {
         _sp = null;
     }
 }
 static SpacePluginProvider()
 {
     try
     {
         _sp = (SpacePluginBase)Activator.CreateInstance(Type.GetType("Discuz.Space.SpacePlugin, Discuz.Space", false, true));
     }
     catch
     {
         _sp = null;
     }
 }
Beispiel #3
0
 static SpacePluginProvider()
 {
     //try
     //{
     //    _sp = (SpacePluginBase)Activator.CreateInstance(Type.GetType("Discuz.Space.SpacePlugin, Discuz.Space", false, true));
     //}
     //catch
     //{
     //    _sp = null;
     //}
     foreach (var item in AssemblyX.FindAllPlugins(typeof(SpacePluginBase), true))
     {
         _sp = TypeX.CreateInstance(item) as SpacePluginBase;
         break;
     }
 }