aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/dotnet/example_binary
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dotnet/example_binary')
-rw-r--r--examples/dotnet/example_binary/BUILD12
-rw-r--r--examples/dotnet/example_binary/Program.cs14
-rw-r--r--examples/dotnet/example_binary/Properties/AssemblyInfo.cs27
3 files changed, 53 insertions, 0 deletions
diff --git a/examples/dotnet/example_binary/BUILD b/examples/dotnet/example_binary/BUILD
new file mode 100644
index 0000000000..04c126a31e
--- /dev/null
+++ b/examples/dotnet/example_binary/BUILD
@@ -0,0 +1,12 @@
+load("/tools/build_defs/dotnet/csharp", "csharp_binary")
+
+csharp_binary(
+ name = "hello",
+ srcs = [
+ "Program.cs",
+ "Properties/AssemblyInfo.cs",
+ ],
+ deps = [
+ "//examples/dotnet/example_lib:MyClass",
+ ],
+)
diff --git a/examples/dotnet/example_binary/Program.cs b/examples/dotnet/example_binary/Program.cs
new file mode 100644
index 0000000000..7780823347
--- /dev/null
+++ b/examples/dotnet/example_binary/Program.cs
@@ -0,0 +1,14 @@
+using System;
+using example_lib;
+
+namespace example_binary
+{
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ var mc = new MyClass();
+ Console.WriteLine(mc.Message);
+ }
+ }
+}
diff --git a/examples/dotnet/example_binary/Properties/AssemblyInfo.cs b/examples/dotnet/example_binary/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..d7700ef2b3
--- /dev/null
+++ b/examples/dotnet/example_binary/Properties/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("example_binary")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("VAE Inc")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+