private static bool IsStartup(this SyncfusionSerializationType type, string key) { string path = GetFullPath(type, key, true); if (File.Exists(path)) { return false; } path = GetFullPath(type, key, true); return !File.Exists(path); }
private static string GetBasePath(SyncfusionSerializationType type) { switch (type) { case SyncfusionSerializationType.DockPanel: return ConfigPathHelper.GetDockingConfigPath(); case SyncfusionSerializationType.ToolBar: return ConfigPathHelper.GetToolbarConfigPath(); default: throw new ArgumentOutOfRangeException("type"); } }
private static string GetPathCore(SyncfusionSerializationType type, string key, bool startup) { string path = GetBasePath(type); if (!PathHelper.CreateFolder(path)) { return(string.Empty); } path += key; if (startup) { path += "_startup"; } return(path); }
private static AppStateSerializer GetSerializer(SyncfusionSerializationType type, string key, bool startup) { string path = GetPathCore(type, key, startup); return(new AppStateSerializer(SerializeMode.XMLFile, path)); }
private static string GetFullPath(SyncfusionSerializationType type, string key, bool startup) { return(GetPathCore(type, key, startup) + ".xml"); }