public static IOrgProxy GetProxy(DataContext ctx = null)
 {
     if (IocHelper.IsRegistered(typeof(IOrgProxy)))
     {
         return(IocHelper.GetInstance <IOrgProxy>());
     }
     return(new OrgProxyNew());
 }
 static AppLogHelper()
 {
     if (IocHelper.IsRegistered(typeof(ILogger)))
     {
         logger = IocHelper.GetInstance <ILogger>();
     }
     else
     {
         logger = new FileLogger();
     }
 }
示例#3
0
 public static IAttachmentHandler GetAttachmentHandler()
 {
     if (IocHelper.IsRegistered(typeof(IAttachmentHandler)))
     {
         var hander = IocHelper.Resolve <IAttachmentHandler>();
         return(hander);
     }
     else
     {
         return(new DefaultAttachmentHandler());
     }
 }