[System.ComponentModel.Composition]: Disable RefEmit classes on MonoTouch.
authorMartin Baulig <martin.baulig@xamarin.com>
Fri, 7 Jun 2013 01:38:33 +0000 (03:38 +0200)
committerMartin Baulig <martin.baulig@xamarin.com>
Fri, 7 Jun 2013 01:39:55 +0000 (03:39 +0200)
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs

index 455b7ce27fe2a73d32f17f7ff56bbb4e56dac9d1..b6ac428a3c86c489c18e30e91a549bd7fb9e782c 100644 (file)
@@ -1,3 +1,4 @@
+#if !MONOTOUCH
 // -----------------------------------------------------------------------
 // Copyright (c) Microsoft Corporation.  All rights reserved.
 // -----------------------------------------------------------------------
@@ -331,3 +332,4 @@ namespace Microsoft.Internal
         }
     }
 }
+#endif
index b9f2c41fef0d9819310557bd1eaf6e816e437027..9199e0ede3e7e668208f52f954843912789600dd 100644 (file)
@@ -1,4 +1,5 @@
-// -----------------------------------------------------------------------
+#if !MONOTOUCH
+// -----------------------------------------------------------------------
 // Copyright (c) Microsoft Corporation.  All rights reserved.
 // -----------------------------------------------------------------------
 using System;
@@ -379,3 +380,4 @@ namespace System.ComponentModel.Composition
 
     }
 }
+#endif
index 6c660fcf658a2abc0ea5efbec9f5b8b8caef9570..3ac6fd6859822b45da8ef5d88711090308aa2eb1 100644 (file)
@@ -32,6 +32,7 @@ namespace System.ComponentModel.Composition
                 {
                     if(!metadataViewType.IsAttributeDefined<MetadataViewImplementationAttribute>())
                     {
+#if !MONOTOUCH
                         try
                         {
                             proxyType = MetadataViewGenerator.GenerateView(metadataViewType);
@@ -40,6 +41,9 @@ namespace System.ComponentModel.Composition
                         {
                             throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.NotSupportedInterfaceMetadataView, metadataViewType.FullName), ex);
                         }
+#else
+                       throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.NotSupportedInterfaceMetadataView, metadataViewType.FullName));
+#endif
                     }
                     else
                     {
@@ -83,6 +87,7 @@ namespace System.ComponentModel.Composition
                 }
                 catch (TargetInvocationException ex)
                 {
+#if !MONOTOUCH
                     //Unwrap known failures that we want to present as CompositionContractMismatchException
                     if(metadataViewType.IsInterface)
                     {
@@ -107,6 +112,7 @@ namespace System.ComponentModel.Composition
                                 ex.InnerException.Data[MetadataViewGenerator.MetadataItemTargetType]), ex);
                         }
                     }
+#endif
                     throw;
                 }
             }