From 2c7a6fd0cfb5b73f3f90ac100804c5770011afde Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Fri, 1 Dec 2023 16:46:41 -0800 Subject: [PATCH] c#: Use csharp naming conventions for Interfaces Signed-off-by: James Sturtevant --- crates/csharp/src/lib.rs | 6 +++--- tests/runtime/numbers/wasm.cs | 4 ++-- tests/runtime/strings/wasm.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index 7937fe54d..e5df96de7 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -240,7 +240,7 @@ impl WorldGenerator for CSharp { namespace {namespace} {{ - public interface {name}World {{ + public interface I{name}World {{ " ); @@ -472,7 +472,7 @@ impl WorldGenerator for CSharp { namespace {fully_qaulified_namespace}; - public partial class {stub_class_name} : {interface_name} {{ + public partial class {stub_class_name} : I{interface_name} {{ {body} }} " @@ -515,7 +515,7 @@ impl WorldGenerator for CSharp { namespace {namespace}.{name}; - public interface {interface_name} {{ + public interface I{interface_name} {{ {body} }} " diff --git a/tests/runtime/numbers/wasm.cs b/tests/runtime/numbers/wasm.cs index 0851ae791..e5bc9a6db 100644 --- a/tests/runtime/numbers/wasm.cs +++ b/tests/runtime/numbers/wasm.cs @@ -5,7 +5,7 @@ namespace wit_numbers; -public class NumbersWorldImpl : NumbersWorld +public class NumbersWorldImpl : INumbersWorld { public static void TestImports() { @@ -62,7 +62,7 @@ public static void TestImports() } } -public class TestImpl : wit_numbers.Wit.exports.test.numbers.Test.Test +public class TestImpl : wit_numbers.Wit.exports.test.numbers.Test.ITest { static uint SCALAR = 0; diff --git a/tests/runtime/strings/wasm.cs b/tests/runtime/strings/wasm.cs index 36288c54a..e448f2db6 100644 --- a/tests/runtime/strings/wasm.cs +++ b/tests/runtime/strings/wasm.cs @@ -4,7 +4,7 @@ namespace wit_strings; -public class StringsWorldImpl : StringsWorld +public class StringsWorldImpl : IStringsWorld { public static void TestImports() {