Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MimeFormImporter.cs
- UsernameTokenFactoryCredential.cs
- BamlRecords.cs
- EnterpriseServicesHelper.cs
- SigningCredentials.cs
- ReadOnlyObservableCollection.cs
- ChameleonKey.cs
- SecurityToken.cs
- TagElement.cs
- FormViewDeletedEventArgs.cs
- XsdDuration.cs
- XPathPatternBuilder.cs
- ObfuscationAttribute.cs
- DataGridViewCellConverter.cs
- RegistrySecurity.cs
- Vector3DCollectionConverter.cs
- DbBuffer.cs
- AnonymousIdentificationModule.cs
- ForceCopyBuildProvider.cs
- ResourceDescriptionAttribute.cs
- WindowsListViewItemCheckBox.cs
- SharedConnectionInfo.cs
- GetKeyedHashRequest.cs
- Hashtable.cs
- DiscoveryInnerClientAdhoc11.cs
- ContentHostHelper.cs
- HandleExceptionArgs.cs
- xmlfixedPageInfo.cs
- SerializationInfoEnumerator.cs
- peersecurityelement.cs
- InputReferenceExpression.cs
- PersonalizationProvider.cs
- QueryTreeBuilder.cs
- SoundPlayerAction.cs
- ClientScriptManager.cs
- DelegateHelpers.cs
- HttpCacheVary.cs
- HtmlInputButton.cs
- SwitchLevelAttribute.cs
- ObjectContext.cs
- WorkflowItemPresenter.cs
- SqlBulkCopyColumnMapping.cs
- DBConnectionString.cs
- RequestContext.cs
- ValueCollectionParameterReader.cs
- MulticastNotSupportedException.cs
- GridViewRowPresenterBase.cs
- PrivateFontCollection.cs
- ListViewContainer.cs
- RectKeyFrameCollection.cs
- SynchronizationContext.cs
- XslTransformFileEditor.cs
- RequestStatusBarUpdateEventArgs.cs
- CollectionViewGroupInternal.cs
- SchemaExporter.cs
- SemaphoreSlim.cs
- Claim.cs
- OracleConnectionStringBuilder.cs
- ListViewGroupItemCollection.cs
- ProfileGroupSettings.cs
- DataSourceCache.cs
- BinaryObjectWriter.cs
- SerializationAttributes.cs
- XPathItem.cs
- DoubleAnimationBase.cs
- XPathAncestorIterator.cs
- SqlParameterCollection.cs
- RestHandler.cs
- PropertyMapper.cs
- XmlAttributeOverrides.cs
- DispatcherEventArgs.cs
- PersistenceTypeAttribute.cs
- JsonEnumDataContract.cs
- SemaphoreSecurity.cs
- HttpClientChannel.cs
- RTLAwareMessageBox.cs
- EventManager.cs
- ControlPropertyNameConverter.cs
- IsolatedStorageFile.cs
- PersonalizationStateInfo.cs
- QuotedStringWriteStateInfo.cs
- CodePageEncoding.cs
- SharedRuntimeState.cs
- PhoneCallDesigner.cs
- Parameter.cs
- httpapplicationstate.cs
- altserialization.cs
- XmlNodeChangedEventManager.cs
- SchemaElementLookUpTable.cs
- OleDbCommandBuilder.cs
- DelegatingConfigHost.cs
- QueryStringParameter.cs
- RewritingValidator.cs
- Security.cs
- LinearGradientBrush.cs
- ProjectionPruner.cs
- ZipIOLocalFileDataDescriptor.cs
- SamlAssertionKeyIdentifierClause.cs
- CmsInterop.cs
- NativeObjectSecurity.cs