diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2015-03-27 19:55:14 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2015-04-06 18:11:11 +0300 |
commit | 3fcaf601c138da2ccaeb1eb498e1a76030beb1cd (patch) | |
tree | 66a05a6c558f748d7c3285016e54a58bfc77a447 /mcs/class/SMDiagnostics | |
parent | 6acb0ebc469990a6f6fc2953ff6c805c89c78e14 (diff) |
Add System.ServiceModel.Internals and SMDiagnostics to the build.
They build in both desktop and mobile profiles, but the sources are
mostly unchanged i.e. they contain Windows dependent code (DllImports).
The plan here is to import everything essential in WCF as buildable
sources, then remove Windows dependencies, then implement (or bring back)
mobile-ready code. But this commit can be used for different strategies
(like, we import sources from working parts, step by step).
Diffstat (limited to 'mcs/class/SMDiagnostics')
-rw-r--r-- | mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs | 58 | ||||
-rw-r--r-- | mcs/class/SMDiagnostics/Makefile | 26 | ||||
-rw-r--r-- | mcs/class/SMDiagnostics/ReferenceSources/TraceSR.cs | 40 | ||||
-rw-r--r-- | mcs/class/SMDiagnostics/SMDiagnostics.dll.sources | 23 |
4 files changed, 147 insertions, 0 deletions
diff --git a/mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs b/mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs new file mode 100644 index 00000000000..d632429cdd7 --- /dev/null +++ b/mcs/class/SMDiagnostics/Assembly/AssemblyInfo.cs @@ -0,0 +1,58 @@ +// +// AssemblyInfo.cs +// +// +// 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; +[assembly: AssemblyTitle ("SMDiagnostics.dll")] +[assembly: AssemblyDescription ("Contains share code for some System.ServiceModel libraries")] +[assembly: AssemblyDefaultAlias ("System.ServiceModel.dll")] + +[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)] +[assembly: AssemblyFileVersion (Consts.FxFileVersion)] + +[assembly: NeutralResourcesLanguage ("en-US")] +[assembly: CLSCompliant (true)] +[assembly: AssemblyDelaySign (true)] +#if NET_2_1 +[assembly: AssemblyKeyFile ("../winfx.pub")] +#else +[assembly: AssemblyKeyFile ("../ecma.pub")] +[assembly: AllowPartiallyTrustedCallers] +[assembly: ComCompatibleVersion (1, 0, 3300, 0)] +[assembly: SecurityCritical (SecurityCriticalScope.Explicit)] +#endif +[assembly: InternalsVisibleTo ("System.Runtime.Serialization, PublicKey=" + AssemblyRef.FrameworkPublcKeyFull)] +[assembly: InternalsVisibleTo ("System.IdentityModel, PublicKey=" + AssemblyRef.FrameworkPublcKeyFull)] +[assembly: InternalsVisibleTo ("System.IdentityModel.Selectors, PublicKey=" + AssemblyRef.FrameworkPublcKeyFull)] +[assembly: InternalsVisibleTo ("System.ServiceModel, PublicKey=" + AssemblyRef.FrameworkPublcKeyFull)] +[assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=" + AssemblyRef.FrameworkPublcKeyFull)] + +[assembly: ComVisible (false)] + diff --git a/mcs/class/SMDiagnostics/Makefile b/mcs/class/SMDiagnostics/Makefile new file mode 100644 index 00000000000..e0956289610 --- /dev/null +++ b/mcs/class/SMDiagnostics/Makefile @@ -0,0 +1,26 @@ +thisdir = class/SMDiagnostics +SUBDIRS = +include ../../build/rules.make + +LIBRARY = SMDiagnostics.dll +LIB_REFS = System System.Core System.Xml System.ServiceModel.Internals +LIB_MCS_FLAGS = +ifneq (2.1, $(FRAMEWORK_VERSION)) + LIB_REFS += System.Configuration +else + LIB_MCS_FLAGS += -d:NO_CONFIGURATION +endif + +TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) + +EXTRA_DISTFILES = + +VALID_PROFILE := $(filter net_4_5 monotouch monodroid, $(PROFILE)) +ifndef VALID_PROFILE +LIBRARY_NAME = dummy-SMDiagnostics.dll +NO_INSTALL = yes +NO_SIGN_ASSEMBLY = yes +NO_TEST = yes +endif + +include ../../build/library.make diff --git a/mcs/class/SMDiagnostics/ReferenceSources/TraceSR.cs b/mcs/class/SMDiagnostics/ReferenceSources/TraceSR.cs new file mode 100644 index 00000000000..9e1368b83c8 --- /dev/null +++ b/mcs/class/SMDiagnostics/ReferenceSources/TraceSR.cs @@ -0,0 +1,40 @@ +using System.Globalization; + +static partial class TraceSR +{ + public const string ThrowingException = "throwing exception."; + public const string StringNullOrEmpty = "Argument string is null or empty."; + public const string GenericCallbackException = "Callback exception has occured."; + public const string TraceHandledException = "Trace handled exception."; + public const string TraceCodeTraceTruncatedQuotaExceeded = "TraceTruncatedQuotaExceeded"; + public const string TraceCodeAppDomainUnload = "AppDomainUnload"; + public const string UnhandledException = "Unhandled exception."; + public const string TraceCodeEventLog = "EventLog"; + public const string WriteCharsInvalidContent = "invalid content."; + + internal static string GetString(string name, params object[] args) + { + return GetString (CultureInfo.InvariantCulture, name, args); + } + + internal static string GetString(CultureInfo culture, string name, params object[] args) + { + return string.Format (culture, name, args); + } + + internal static string GetString(string name) + { + return name; + } + + internal static string GetString(CultureInfo culture, string name) + { + return name; + } +} + +namespace System.Runtime.CompilerServices +{ + class FriendAccessAllowedAttribute : Attribute + { } +} diff --git a/mcs/class/SMDiagnostics/SMDiagnostics.dll.sources b/mcs/class/SMDiagnostics/SMDiagnostics.dll.sources new file mode 100644 index 00000000000..e31bea929aa --- /dev/null +++ b/mcs/class/SMDiagnostics/SMDiagnostics.dll.sources @@ -0,0 +1,23 @@ +../../build/common/Consts.cs + +Assembly/AssemblyInfo.cs +ReferenceSources/TraceSR.cs + +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/Activity.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/DiagnosticsTraceCode.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/DiagnosticStrings.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/DiagnosticTraceSource.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/EncodingFallbackAwareXmlTextWriter.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/EventLogCategory.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/EventLogEventId.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/EventLogger.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/ExceptionUtility.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/LegacyDiagnosticTrace.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/MachineSettingsSection.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/NativeMethods.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/PiiTraceSource.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/PlainXmlWriter.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/SafeEventLogWriteHandle.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/TraceSourceKind.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/TraceXPathNavigator.cs +../../../external/referencesource/SMDiagnostics/System/ServiceModel/Diagnostics/Utility.cs |