Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / Serialization / Formatters / SerTrace.cs / 1 / SerTrace.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SerTrace ** ** ** Purpose: Routine used for Debugging ** ** ===========================================================*/ namespace System.Runtime.Serialization.Formatters { using System; using System.Runtime.Serialization; using System.Security.Permissions; using System.Reflection; using System.Diagnostics; #if FEATURE_PAL // To turn on tracing, add the following to the per-machine // rotor.ini file, inside the [Rotor] section: // ManagedLogFacility=0x32 // where: #else // To turn on tracing the set registry // HKEY_CURRENT_USER -> Software -> Microsoft -> .NETFramework // new DWORD value ManagedLogFacility 0x32 where #endif // 0x2 is System.Runtime.Serialization // 0x10 is Binary Formatter // 0x20 is Soap Formatter // // Turn on Logging in the jitmgr // remoting Wsdl logging ///[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0x" + AssemblyRef.EcmaPublicKeyFull, Name="System.Runtime.Remoting" )] [System.Runtime.InteropServices.ComVisible(true)] public sealed class InternalRM { /// [System.Diagnostics.Conditional("_LOGGING")] public static void InfoSoap(params Object[]messages) { BCLDebug.Trace("SOAP", messages); } //[System.Diagnostics.Conditional("_LOGGING")] /// public static bool SoapCheckEnabled() { return BCLDebug.CheckEnabled("SOAP"); } } /// [StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0x" + AssemblyRef.MicrosoftPublicKeyFull, Name="System.Runtime.Serialization.Formatters.Soap" )] [System.Runtime.InteropServices.ComVisible(true)] public sealed class InternalST { private InternalST() { } /// [System.Diagnostics.Conditional("_LOGGING")] public static void InfoSoap(params Object[]messages) { BCLDebug.Trace("SOAP", messages); } //[System.Diagnostics.Conditional("_LOGGING")] /// public static bool SoapCheckEnabled() { return BCLDebug.CheckEnabled("Soap"); } /// [System.Diagnostics.Conditional("SER_LOGGING")] public static void Soap(params Object[]messages) { if (!(messages[0] is String)) messages[0] = (messages[0].GetType()).Name+" "; else messages[0] = messages[0]+" "; BCLDebug.Trace("SOAP",messages); } /// [System.Diagnostics.Conditional("_DEBUG")] public static void SoapAssert(bool condition, String message) { BCLDebug.Assert(condition, message); } /// public static void SerializationSetValue(FieldInfo fi, Object target, Object value) { if ( fi == null) throw new ArgumentNullException("fi"); if (target == null) throw new ArgumentNullException("target"); if (value == null) throw new ArgumentNullException("value"); FormatterServices.SerializationSetValue(fi, target, value); } /// public static Assembly LoadAssemblyFromString(String assemblyString) { return FormatterServices.LoadAssemblyFromString(assemblyString); } } internal static class SerTrace { [Conditional("_LOGGING")] internal static void InfoLog(params Object[]messages) { BCLDebug.Trace("BINARY", messages); } [Conditional("SER_LOGGING")] internal static void Log(params Object[]messages) { if (!(messages[0] is String)) messages[0] = (messages[0].GetType()).Name+" "; else messages[0] = messages[0]+" "; BCLDebug.Trace("BINARY",messages); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SecureEnvironment.cs
- ErrorReporting.cs
- AxHost.cs
- CodeDOMProvider.cs
- PtsHelper.cs
- WebPartsPersonalizationAuthorization.cs
- HttpAsyncResult.cs
- OneWayElement.cs
- InstallerTypeAttribute.cs
- CommonEndpointBehaviorElement.cs
- Vector3DConverter.cs
- PerfCounterSection.cs
- NameTable.cs
- DeclarativeCatalogPart.cs
- ZipIOExtraFieldZip64Element.cs
- UpdateManifestForBrowserApplication.cs
- SafeRegistryHandle.cs
- RequestQueue.cs
- XmlILTrace.cs
- Base64Encoder.cs
- IISMapPath.cs
- DelegateSerializationHolder.cs
- WebPartUtil.cs
- RbTree.cs
- GPRECTF.cs
- UpdatePanelTriggerCollection.cs
- ScriptReference.cs
- RuntimeConfig.cs
- BindingExpressionUncommonField.cs
- DBPropSet.cs
- FindCriteriaElement.cs
- LayoutExceptionEventArgs.cs
- FloaterParagraph.cs
- Suspend.cs
- FontFamilyValueSerializer.cs
- IPEndPointCollection.cs
- BitmapSizeOptions.cs
- QueryUtil.cs
- HttpCapabilitiesEvaluator.cs
- PerformanceCounterPermissionEntry.cs
- PrimitiveXmlSerializers.cs
- CallbackHandler.cs
- Container.cs
- OdbcHandle.cs
- DesignerDataParameter.cs
- ProfileModule.cs
- ClientData.cs
- IteratorFilter.cs
- ColorInterpolationModeValidation.cs
- DesignBindingEditor.cs
- ModuleConfigurationInfo.cs
- RtfToXamlLexer.cs
- WindowsTokenRoleProvider.cs
- Walker.cs
- BaseAddressElement.cs
- ResourceReferenceExpression.cs
- Deserializer.cs
- XmlBinaryReader.cs
- WebPartDisplayMode.cs
- TdsParserSafeHandles.cs
- ListView.cs
- Atom10ItemFormatter.cs
- Translator.cs
- CookielessHelper.cs
- WebBrowserUriTypeConverter.cs
- ControlPropertyNameConverter.cs
- GlyphShapingProperties.cs
- PersonalizationProviderCollection.cs
- XsltInput.cs
- TypeElement.cs
- ChameleonKey.cs
- WSSecurityPolicy12.cs
- FileInfo.cs
- HtmlLink.cs
- Boolean.cs
- FindCriteriaCD1.cs
- PathFigureCollectionConverter.cs
- CryptoApi.cs
- _Events.cs
- NGCSerializerAsync.cs
- UriTemplateMatchException.cs
- RequestSecurityTokenForGetBrowserToken.cs
- TemplatedAdorner.cs
- ThicknessAnimationUsingKeyFrames.cs
- EntityProxyFactory.cs
- StandardRuntimeEnumValidator.cs
- FileClassifier.cs
- UpDownBase.cs
- ParallelDesigner.xaml.cs
- CheckableControlBaseAdapter.cs
- XmlSchemaParticle.cs
- EntityAdapter.cs
- SecurityHelper.cs
- DynamicActionMessageFilter.cs
- WebServiceMethodData.cs
- SchemaNotation.cs
- DocumentPageTextView.cs
- SqlStream.cs
- HtmlInputControl.cs
- ThumbAutomationPeer.cs