Browse Source

Add Mono code contracts skeletons.

Marek Safar 15 years ago
parent
commit
e4aeffa5ef

+ 2 - 1
mcs/class/Makefile

@@ -175,7 +175,8 @@ net_4_0_dirs := \
 	System.ServiceModel.Routing \
 	System.ServiceModel.Discovery \
 	System.Runtime.Caching \
-	System.Runtime.DurableInstancing
+	System.Runtime.DurableInstancing \
+	Mono.CodeContracts
 
 net_2_0_bootstrap_SUBDIRS := $(bootstrap_dirs)
 net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs)

+ 58 - 0
mcs/class/Mono.CodeContracts/Assembly/AssemblyInfo.cs

@@ -0,0 +1,58 @@
+//
+// AssemblyInfo.cs
+//
+// Authors:
+//	Marek Safar ([email protected])
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("Mono.CodeContracts.dll")]
+[assembly: AssemblyDescription ("Mono.CodeContracts.dll")]
+[assembly: AssemblyDefaultAlias ("Mono.CodeContracts.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile ("../mono.pub")]
+[assembly: SecurityCritical]
+

+ 9 - 0
mcs/class/Mono.CodeContracts/Makefile

@@ -0,0 +1,9 @@
+thisdir = class/Mono.CodeContracts
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = Mono.CodeContracts.dll
+
+LIB_MCS_FLAGS = -r:System.Core
+
+include ../../build/library.make

+ 2 - 0
mcs/class/Mono.CodeContracts/Mono.CodeContracts.dll.sources

@@ -0,0 +1,2 @@
+../../build/common/Consts.cs
+Assembly/AssemblyInfo.cs

+ 2 - 1
mcs/tools/Makefile

@@ -41,7 +41,8 @@ net_4_0_dirs := \
 	mod		\
 	installvst	\
 	lc		\
-	mono-configuration-crypto
+	mono-configuration-crypto \
+	ccrewrite
 
 net_2_0_dirs := \
 	$(per_profile_dirs) \

+ 9 - 0
mcs/tools/ccrewrite/Makefile

@@ -0,0 +1,9 @@
+thisdir = tools/ccrewrite
+SUBDIRS = 
+include ../../build/rules.make
+
+PROGRAM = ccrewrite.exe
+
+LOCAL_MCS_FLAGS = -r:Mono.CodeContracts.dll
+
+include ../../build/executable.make

+ 38 - 0
mcs/tools/ccrewrite/ccrewrite.cs

@@ -0,0 +1,38 @@
+//
+// ccrewrite.cs
+//
+// Authors:
+//	Marek Safar ([email protected])
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.CodeContracts.Rewrite
+{
+	class Driver
+	{
+		public static int Main ()
+		{
+			return 0;
+		}
+	}
+}

+ 2 - 0
mcs/tools/ccrewrite/ccrewrite.exe.sources

@@ -0,0 +1,2 @@
+../../build/common/Consts.cs
+ccrewrite.cs