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(); } }
public static IAttachmentHandler GetAttachmentHandler() { if (IocHelper.IsRegistered(typeof(IAttachmentHandler))) { var hander = IocHelper.Resolve <IAttachmentHandler>(); return(hander); } else { return(new DefaultAttachmentHandler()); } }