File tree Expand file tree Collapse file tree
CommandForgeGenerator.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #if ENABLE_COMMAND_FORGE_GENERATOR
1+ #if ENABLE_COMMAND_FORGE_GENERATOR
22namespace CommandForgeGenerator . Command
33{
44 public partial class TextCommand : ICommandForgeCommand
@@ -7,20 +7,20 @@ public partial class TextCommand : ICommandForgeCommand
77 public readonly CommandId CommandId ;
88
99 public readonly string Character ;
10- public readonly string Body ;
10+ public readonly string ? Body ;
1111
1212
1313 public static TextCommand Create ( int commandId , global ::Newtonsoft . Json . Linq . JToken json )
1414 {
1515
1616 var Character = ( string ) json [ "character" ] ;
17- var Body = ( string ) json [ "body" ] ;
17+ var Body = json [ "body" ] == null ? null : ( string ) json [ "body" ] ;
1818
1919
2020 return new TextCommand ( commandId , Character , Body ) ;
2121 }
2222
23- public TextCommand ( int commandId , string Character , string Body )
23+ public TextCommand ( int commandId , string Character , string ? Body )
2424 {
2525 CommandId = ( CommandId ) commandId ;
2626
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ namespace CommandForgeGenerator.Tests;
55public class GenerateTestCode
66{
77 // プロジェクトファイルに存在する GenerateSampleTextCommand.cs を取得する
8- public static string TextCommandStr => File . ReadAllText ( "../../../CommandForgeGenerator.Tests/ GenerateSampleTextCommand.cs" ) ;
8+ public static string TextCommandStr => File . ReadAllText ( "../../../GenerateSampleTextCommand.cs" ) ;
99}
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ string GetSampleYaml()
8686 body:
8787 type: string
8888 multiline: true
89- required: true
9089
9190 - id: emote
9291 label: エモート
You can’t perform that action at this time.
0 commit comments