Code:
/ DotNET / DotNET / 8.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
- TextRunCacheImp.cs
- WmlListAdapter.cs
- ExtenderHelpers.cs
- Symbol.cs
- UIElementIsland.cs
- DBPropSet.cs
- EntityProviderServices.cs
- ExceptionUtil.cs
- SamlSecurityTokenAuthenticator.cs
- ComplexTypeEmitter.cs
- XsdBuilder.cs
- SessionPageStatePersister.cs
- ConnectionsZoneDesigner.cs
- KeySplineConverter.cs
- ActiveXSerializer.cs
- HostedImpersonationContext.cs
- LookupBindingPropertiesAttribute.cs
- ListMarkerSourceInfo.cs
- AbstractSvcMapFileLoader.cs
- ServiceInfoCollection.cs
- DataServiceQuery.cs
- MimeWriter.cs
- FixedSOMFixedBlock.cs
- Ops.cs
- HelpPage.cs
- HelpEvent.cs
- WebPartPersonalization.cs
- BufferedReadStream.cs
- QueryStringParameter.cs
- WindowsAuthenticationModule.cs
- Composition.cs
- FontDriver.cs
- TdsParameterSetter.cs
- ReadOnlyDictionary.cs
- HttpRawResponse.cs
- DateRangeEvent.cs
- PagerSettings.cs
- FixedFindEngine.cs
- PositiveTimeSpanValidatorAttribute.cs
- FixedDocumentPaginator.cs
- SubMenuStyleCollection.cs
- ContentFileHelper.cs
- EntityDataReader.cs
- WebPartUserCapability.cs
- FullTextBreakpoint.cs
- TypeGeneratedEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- DefaultIfEmptyQueryOperator.cs
- FtpWebResponse.cs
- InvokeProviderWrapper.cs
- OracleFactory.cs
- OneOfScalarConst.cs
- CellParagraph.cs
- FileClassifier.cs
- ApplicationDirectory.cs
- ObjectMemberMapping.cs
- QueueProcessor.cs
- NameTable.cs
- Stream.cs
- ImageAnimator.cs
- AttributeCollection.cs
- VsPropertyGrid.cs
- MobileUITypeEditor.cs
- ApplicationActivator.cs
- ConstraintStruct.cs
- SelectionRange.cs
- TextEffect.cs
- TreeNodeCollection.cs
- SlipBehavior.cs
- MouseActionValueSerializer.cs
- PeerApplication.cs
- InvalidEnumArgumentException.cs
- TypeSystem.cs
- MsmqAppDomainProtocolHandler.cs
- SqlHelper.cs
- Delegate.cs
- ExpressionParser.cs
- RtfToXamlReader.cs
- VerticalAlignConverter.cs
- FixedSOMContainer.cs
- Keywords.cs
- BlockExpression.cs
- OneOf.cs
- SiteOfOriginPart.cs
- WindowsServiceCredential.cs
- DesignerActionVerbItem.cs
- FixedSOMTextRun.cs
- TextEditorSelection.cs
- UriGenerator.cs
- ActiveXContainer.cs
- RIPEMD160.cs
- ServiceDurableInstance.cs
- MouseGestureValueSerializer.cs
- Highlights.cs
- MinimizableAttributeTypeConverter.cs
- AnyAllSearchOperator.cs
- SchemaType.cs
- SafeCryptoHandles.cs
- MexHttpsBindingCollectionElement.cs
- RubberbandSelector.cs