示例#1
0
 public static object GetDefaultConfig(this ITopbarCommand command)
 {
     return(GetCommandConfigDataFile(command).Read(command.ConfigType) ?? Activator.CreateInstance(command.ConfigType));
 }
示例#2
0
 public static void UpdateDefaultCommandConfig(this ITopbarCommand command, object config)
 {
     GetCommandConfigDataFile(command).Write(config);
 }
示例#3
0
 static DataFile GetCommandConfigDataFile(this ITopbarCommand command)
 {
     return(DataFolders.Shared.GetFolder("Topbar/Commands").GetFile(command.Name + ".config", DataFileFormats.TypedJson));
 }