Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/cppsharp/parser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<PublishAot>true</PublishAot>
</PropertyGroup>

<ItemGroup>
Expand Down
21 changes: 18 additions & 3 deletions projects/yamldotnet/Program_sydr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,38 @@ public class Program
public static void Main(string[] args)
{
try {
Console.WriteLine(0);

string yml = File.ReadAllText(args[0]);

var input = new StringReader(yml);

var yaml = new YamlStream();

var deserializer = new DeserializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)
.Build();

var serializer = new SerializerBuilder()
.JsonCompatible()
.Build();

var doc = deserializer.Deserialize(input);

var json = serializer.Serialize(doc);
var parser = new Parser(input);

var input2 = new StringReader(yml);

var parser = new Parser(input2);

parser.Consume<StreamStart>();
yaml.Load(input);

var input3 = new StringReader(yml);
yaml.Load(input3);

}
catch (YamlException ex) {
Console.WriteLine(ex.Message);
}
catch (YamlException) { }
}
}
1 change: 0 additions & 1 deletion projects/yamldotnet/program.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<PublishAot>true</PublishAot>
</PropertyGroup>

<ItemGroup>
Expand Down