Add mobile build conditions for SMDiagnostics.dll.
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 27 Mar 2015 16:51:02 +0000 (01:51 +0900)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:08:08 +0000 (00:08 +0200)
mcs/class/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/LegacyDiagnosticTrace.cs
mcs/class/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/MachineSettingsSection.cs
mcs/class/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/PiiTraceSource.cs

index 86ad22c037763251a976410dbea68edc0579d223..b318cfe45d98c7584e49ffe93359d64a578a5449 100644 (file)
@@ -66,10 +66,12 @@ namespace System.ServiceModel.Diagnostics
                 this.CreateTraceSource();
                 this.AddDomainEventHandlersForCleanup();
             }
+#if !NO_CONFIGURATION
             catch (ConfigurationErrorsException)
             {
                 throw;
             }
+#endif
             catch (Exception e)
             {
                 if (Fx.IsFatal(e))
index 58ba6b4d268778be53c7643376f573b7275729e3..12dbd69974ecc1d5d01e435044ed3de49cf4c7c4 100644 (file)
@@ -2,6 +2,7 @@
 // Copyright (c) Microsoft Corporation.  All rights reserved.
 //------------------------------------------------------------------------------
 
+#if !NO_CONFIGURATION
 namespace System.ServiceModel.Configuration
 {
     using System.Configuration;
@@ -51,5 +52,7 @@ namespace System.ServiceModel.Configuration
         }
     }
 }
+#endif
+
 
 
index d48db147a00784c7891c4359efb704fb98aa76a5..6555567d488f3a980bf3dfbaa2c8f839ea664192 100644 (file)
@@ -4,11 +4,15 @@
 
 namespace System.ServiceModel.Diagnostics
 {
+#if !NO_CONFIGURATION
     using System.Configuration;
+#endif
     using System.Diagnostics;
     using System.Runtime;
     using System.Runtime.Diagnostics;
+#if !NO_CONFIGURATION
     using System.ServiceModel.Configuration;
+#endif
 
     class PiiTraceSource : TraceSource
     {
@@ -59,7 +63,11 @@ namespace System.ServiceModel.Diagnostics
 #pragma warning disable 618
                             System.Runtime.Diagnostics.EventLogger logger = new System.Runtime.Diagnostics.EventLogger(this.eventSourceName, null);
 #pragma warning restore 618
+#if !NO_CONFIGURATION
                             if (MachineSettingsSection.EnableLoggingKnownPii)
+#else
+                            if (false)
+#endif
                             {
                                 logger.LogEvent(TraceEventType.Information,
                                     (ushort)System.Runtime.Diagnostics.EventLogCategory.MessageLogging,