Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Serialization / Formatters / SerTrace.cs / 1305376 / 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; using System.Diagnostics.Contracts; #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 ///[System.Security.SecurityCritical] // auto-generated_required [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"); } } /// [System.Security.SecurityCritical] // auto-generated_required [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) { Contract.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"); Contract.EndContractBlock(); 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; using System.Diagnostics.Contracts; #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 /// [System.Security.SecurityCritical] // auto-generated_required [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"); } } /// [System.Security.SecurityCritical] // auto-generated_required [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) { Contract.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"); Contract.EndContractBlock(); 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
- CodeCompileUnit.cs
- ProviderConnectionPointCollection.cs
- MetadataUtilsSmi.cs
- ConnectorSelectionGlyph.cs
- QualifiedCellIdBoolean.cs
- XmlSchemaIdentityConstraint.cs
- WebPartConnection.cs
- RadioButtonList.cs
- TextSimpleMarkerProperties.cs
- TimeSpanStorage.cs
- OracleCommand.cs
- Literal.cs
- WizardStepCollectionEditor.cs
- ErrorLog.cs
- DbConnectionStringBuilder.cs
- GeneratedCodeAttribute.cs
- ExecutionProperties.cs
- KeyValuePairs.cs
- BookmarkNameHelper.cs
- HierarchicalDataBoundControl.cs
- DataGridAutoFormatDialog.cs
- WindowsAltTab.cs
- PngBitmapDecoder.cs
- ComplexPropertyEntry.cs
- ListParagraph.cs
- DataPagerFieldCollection.cs
- ArrayElementGridEntry.cs
- WizardStepBase.cs
- Funcletizer.cs
- XPathNodeInfoAtom.cs
- GCHandleCookieTable.cs
- MediaPlayer.cs
- WindowHideOrCloseTracker.cs
- SerializableAttribute.cs
- OneOf.cs
- CroppedBitmap.cs
- DataKeyCollection.cs
- SQLRoleProvider.cs
- PeerCustomResolverSettings.cs
- Win32.cs
- LateBoundBitmapDecoder.cs
- ParentQuery.cs
- DesignerValidatorAdapter.cs
- DescendentsWalkerBase.cs
- DependencyPropertyConverter.cs
- regiisutil.cs
- MetadataItemEmitter.cs
- smtpconnection.cs
- WebPartHeaderCloseVerb.cs
- DataSysAttribute.cs
- ToolStripDropTargetManager.cs
- XPathBinder.cs
- DictionaryCustomTypeDescriptor.cs
- UnauthorizedWebPart.cs
- RegexTree.cs
- SystemIcmpV6Statistics.cs
- SortDescription.cs
- SystemIcmpV4Statistics.cs
- SoapAttributeOverrides.cs
- DecimalStorage.cs
- TemplateBindingExtensionConverter.cs
- metadatamappinghashervisitor.cs
- StrokeNodeEnumerator.cs
- Schedule.cs
- ImpersonateTokenRef.cs
- BaseWebProxyFinder.cs
- ProxyGenerator.cs
- DataGridViewCellCollection.cs
- CodeCatchClauseCollection.cs
- XmlCDATASection.cs
- InputReportEventArgs.cs
- _SslState.cs
- GlyphRun.cs
- ControlBuilder.cs
- InvalidOperationException.cs
- ResourceProperty.cs
- InstanceCreationEditor.cs
- RecommendedAsConfigurableAttribute.cs
- XmlWellformedWriter.cs
- Setter.cs
- RangeValidator.cs
- SchemaTypeEmitter.cs
- BrowsableAttribute.cs
- IISUnsafeMethods.cs
- ListSortDescription.cs
- RemotingServices.cs
- ObjectDataSourceStatusEventArgs.cs
- AffineTransform3D.cs
- SqlException.cs
- AmbientLight.cs
- documentsequencetextpointer.cs
- DrawingDrawingContext.cs
- InternalResources.cs
- XmlExtensionFunction.cs
- WindowsListViewItemCheckBox.cs
- PowerStatus.cs
- Keywords.cs
- RegistrationServices.cs
- DataRowCollection.cs
- Hash.cs