private PageViewConfig GetPageViewConfig() { string asmdir = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string exedir = System.IO.Path.GetDirectoryName(System.IO.Path.GetDirectoryName(asmdir)); string pageviewcfgfile = System.IO.Path.Combine(exedir, @"Config\PageViewConfig.xml"); if (!System.IO.File.Exists(pageviewcfgfile)) { return(null); } PageViewConfig config = ConfigSerializer <PageViewConfig> .ReadFile(pageviewcfgfile); return(config); }
public BusinessServiceContext() { PageViewConfig = GetPageViewConfig(); }