public NavigationWrapper LoadNavigationFromJsonFile() { var cf = Catalog.Factory.Resolve <IConfig>(); var filePath = string.Format(NavigationFileFormat, cf[ContentFileStorage.NavigationConfig]); filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filePath); var navigator = JsonFileSerializer.ExtractObject <NavigationWrapper>(filePath); return(navigator); }
public static RoleSpecWrapper LoadRoleSpecsFromJson() { const string RolesFileFormat = "{0}.json"; var cf = Catalog.Factory.Resolve <IConfig>(); var filePath = string.Format(RolesFileFormat, cf[ContentFileStorage.RolesSpecConfiguration]); filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filePath); var rolesSpec = JsonFileSerializer.ExtractObject <RoleSpecWrapper>(filePath); return(rolesSpec); }