public static IAttachHandler GetAttachHandler(BizDataContext ctx) { string str = ConfigurationManager.AppSettings[AttachmentInterfacePath]; if (string.IsNullOrWhiteSpace(str)) { return(new AttachmentManager(ctx)); } return(CustomHandlerLoader.GetHandlerWithConfiguration <IAttachHandler>(str, new object[] { ctx })); }
private ISharePrivilegeHandler GetSharePrivilegeHandler(BizDataContext ctx) { string path = System.Configuration.ConfigurationManager.AppSettings[ConstKey.SharePrivilegeInterfacePath]; if (!string.IsNullOrWhiteSpace(path)) { return(CustomHandlerLoader.GetHandlerWithConfiguration <ISharePrivilegeHandler>(path, ctx)); } else { return(new SharePrivilegeManager(ctx)); } }
private static IOrgProxy LoadCustomOrgProxy(DataContext ctx = null) { string str = ConfigurationManager.AppSettings[MetaConfig.OrgProxyInterfacePath]; if (!string.IsNullOrWhiteSpace(str)) { if (ctx == null) { return(CustomHandlerLoader.GetHandlerWithConfiguration <IOrgProxy>(str, new object[0])); } return(CustomHandlerLoader.GetHandlerWithConfiguration <IOrgProxy>(str, new object[] { ctx })); } return(null); }