Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TableLayoutCellPaintEventArgs.cs
- NonParentingControl.cs
- ColumnMapCopier.cs
- ExtendedPropertyDescriptor.cs
- XmlDownloadManager.cs
- SystemParameters.cs
- SafeCoTaskMem.cs
- PrintPreviewControl.cs
- TextServicesManager.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- GridViewColumn.cs
- UInt16Storage.cs
- complextypematerializer.cs
- LineSegment.cs
- ContainerControl.cs
- EntityWrapper.cs
- Bezier.cs
- BoolExpression.cs
- InternalResources.cs
- QueryStringConverter.cs
- TextServicesDisplayAttribute.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- CompositeControl.cs
- StylusOverProperty.cs
- SettingsAttributeDictionary.cs
- TimeoutValidationAttribute.cs
- TrackingServices.cs
- SystemIPAddressInformation.cs
- StrongNameMembershipCondition.cs
- EventEntry.cs
- MultiPropertyDescriptorGridEntry.cs
- SHA256Cng.cs
- IpcChannel.cs
- SystemEvents.cs
- GregorianCalendarHelper.cs
- NativeMethodsOther.cs
- CursorInteropHelper.cs
- MessageBox.cs
- GridEntry.cs
- HorizontalAlignConverter.cs
- TranslateTransform.cs
- RowSpanVector.cs
- DbProviderFactories.cs
- Scripts.cs
- SymbolMethod.cs
- UpdateTracker.cs
- AnonymousIdentificationSection.cs
- ConstructorBuilder.cs
- OdbcDataAdapter.cs
- LogicalMethodInfo.cs
- Constants.cs
- MachineSettingsSection.cs
- AnyAllSearchOperator.cs
- Drawing.cs
- PublisherIdentityPermission.cs
- SchemaElementLookUpTable.cs
- HtmlShim.cs
- BufferedStream.cs
- FieldInfo.cs
- SelectionItemPattern.cs
- DBConcurrencyException.cs
- SimpleType.cs
- EtwProvider.cs
- FontStyle.cs
- AtomServiceDocumentSerializer.cs
- StylusPointProperty.cs
- DataObjectEventArgs.cs
- TemplateControlParser.cs
- DataMemberFieldConverter.cs
- PageContentAsyncResult.cs
- PropertyEntry.cs
- ImageListStreamer.cs
- HandlerFactoryWrapper.cs
- EventMappingSettings.cs
- WebPartPersonalization.cs
- ExeContext.cs
- PathTooLongException.cs
- XmlSchemaAttributeGroupRef.cs
- QilName.cs
- controlskin.cs
- StructuralObject.cs
- IRCollection.cs
- Int32RectConverter.cs
- EntityExpressionVisitor.cs
- MouseButton.cs
- StringFreezingAttribute.cs
- ExtensibleSyndicationObject.cs
- DataPagerFieldCollection.cs
- configsystem.cs
- XslTransform.cs
- EventHandlers.cs
- ObjectComplexPropertyMapping.cs
- TimeZone.cs
- BooleanFacetDescriptionElement.cs
- WeakReferenceList.cs
- EntityStoreSchemaGenerator.cs
- RewritingPass.cs
- IList.cs
- ViewGenResults.cs
- DesignerVerbCollection.cs