Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlUDTStorage.cs
- BlurEffect.cs
- SignatureResourcePool.cs
- NullableConverter.cs
- ElementUtil.cs
- SqlComparer.cs
- SnapshotChangeTrackingStrategy.cs
- SqlRetyper.cs
- AnnouncementEndpointElement.cs
- ShutDownListener.cs
- HttpModuleCollection.cs
- PolygonHotSpot.cs
- CapiNative.cs
- StorageMappingItemLoader.cs
- StaticContext.cs
- SafeUserTokenHandle.cs
- SystemIcmpV4Statistics.cs
- BaseAutoFormat.cs
- WorkflowViewManager.cs
- PropertyNames.cs
- TrackingStringDictionary.cs
- ThreadAbortException.cs
- WebServiceReceiveDesigner.cs
- Hash.cs
- StrongNamePublicKeyBlob.cs
- PlainXmlWriter.cs
- _MultipleConnectAsync.cs
- DesignerSerializationVisibilityAttribute.cs
- ServiceModelConfigurationSection.cs
- TaskExtensions.cs
- PTManager.cs
- BamlBinaryWriter.cs
- DataObject.cs
- WrappedReader.cs
- FormViewDeleteEventArgs.cs
- DataServiceRequestException.cs
- TagPrefixInfo.cs
- WindowsFormsSectionHandler.cs
- PreservationFileReader.cs
- QuotedPairReader.cs
- ReadOnlyCollection.cs
- XmlSyndicationContent.cs
- PropertyRef.cs
- BitmapMetadataEnumerator.cs
- Single.cs
- Ops.cs
- EntityViewGenerationAttribute.cs
- SqlDataReader.cs
- VBCodeProvider.cs
- XmlExpressionDumper.cs
- ProviderIncompatibleException.cs
- SqlDataSourceCommandEventArgs.cs
- TextRangeEdit.cs
- BindingSourceDesigner.cs
- ObjectReaderCompiler.cs
- SqlNodeAnnotations.cs
- Rectangle.cs
- RelatedCurrencyManager.cs
- odbcmetadatafactory.cs
- BinHexEncoding.cs
- HtmlInputHidden.cs
- PrimitiveOperationFormatter.cs
- TimeSpanConverter.cs
- WMICapabilities.cs
- RayHitTestParameters.cs
- FlowDocumentPaginator.cs
- ActiveXSerializer.cs
- StsCommunicationException.cs
- HuffCodec.cs
- Button.cs
- HtmlTextArea.cs
- Bidi.cs
- ToolStripSeparator.cs
- OptimizedTemplateContentHelper.cs
- StoreUtilities.cs
- AuthenticationModulesSection.cs
- EventDescriptor.cs
- Privilege.cs
- WindowsGraphicsWrapper.cs
- StrongNameKeyPair.cs
- SerTrace.cs
- SendingRequestEventArgs.cs
- ToolTipAutomationPeer.cs
- SuppressIldasmAttribute.cs
- AuthenticationConfig.cs
- XmlExpressionDumper.cs
- TextSyndicationContentKindHelper.cs
- SafeReversePInvokeHandle.cs
- PromptEventArgs.cs
- HtmlMobileTextWriter.cs
- AsyncResult.cs
- DataGridViewTopLeftHeaderCell.cs
- ToolStripItem.cs
- HMACSHA256.cs
- Logging.cs
- ParameterCollection.cs
- StartUpEventArgs.cs
- UnsafeNativeMethodsCLR.cs
- RepeaterCommandEventArgs.cs
- SendActivityValidator.cs