Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Diagnostics / Managed / Microsoft / InfoCards / Diagnostics / InfoCardTraceRecord.cs / 1305376 / InfoCardTraceRecord.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards.Diagnostics { using System; using System.Xml; using System.Diagnostics; // // Summary // An InfoCardTraceRecord represents an ETW tracerecord plus some infocard specific // schema information. The class is called back by the diagnostics infrastructure through // its WriteTo() method in order to serialize the infocard specific contents into the traceRecord structure. // as part of a tracing request. the TraceRecord base class is repsonsible for embedding the correct headers etc. // // Trace records look like this: // //// // class InfoCardTraceRecord : System.Runtime.Diagnostics.TraceRecord { // // The eventID, a string representation of the traceCode. Normally something like // 'StoreSignatureCollision' - used to derive the trace uri. // private string m_eventID; // // A descriptive message about the error schematized as xmlAny // private string m_message; const string InfoCardEventIdBase = "http://schemas.microsoft.com/2004/11/InfoCard/"; public InfoCardTraceRecord( string eventID, string message ) { InfoCardTrace.Assert( !String.IsNullOrEmpty( eventID ), "null eventid" ); InfoCardTrace.Assert( !String.IsNullOrEmpty( message ), "null message" ); m_eventID = eventID; m_message = message; } // // Summary: // Returns the unique identifier for this event. Represented as a uri under the stanard e2e logging // schema - configured asStoreSignatureCollision //rabbits //http://schemas.microsoft.com/2004/03/System/AppDomain/{2bd64add-212d-4385-9f8e-6d9ab976c182} //// //rabbit%s //+ + // for example // "http://schemas.microsoft.com/2004/11/InfoCard/" + "StoreSignatureCollision" + TraceRecord // internal override string EventId { get { return InfoCardEventIdBase + m_eventID + System.Runtime.Diagnostics.TraceRecord.NamespaceSuffix; } } // // Summary: // Called back by the indigo diagnostic trace infrastructure during etw trace logging. // Writes the extendedData section out to the TraceRecord. // // internal override void WriteTo( XmlWriter writer ) { InfoCardTrace.Assert( null != writer, "null writer" ); writer.WriteElementString( "message", m_message ); } // // Override tostring to give a better event logging experience. // public override string ToString() { return SR.GetString( SR.EventLogMessage, m_eventID, m_message ); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards.Diagnostics { using System; using System.Xml; using System.Diagnostics; // // Summary // An InfoCardTraceRecord represents an ETW tracerecord plus some infocard specific // schema information. The class is called back by the diagnostics infrastructure through // its WriteTo() method in order to serialize the infocard specific contents into the traceRecord structure. // as part of a tracing request. the TraceRecord base class is repsonsible for embedding the correct headers etc. // // Trace records look like this: // // // // class InfoCardTraceRecord : System.Runtime.Diagnostics.TraceRecord { // // The eventID, a string representation of the traceCode. Normally something like // 'StoreSignatureCollision' - used to derive the trace uri. // private string m_eventID; // // A descriptive message about the error schematized as xmlAny // private string m_message; const string InfoCardEventIdBase = "http://schemas.microsoft.com/2004/11/InfoCard/"; public InfoCardTraceRecord( string eventID, string message ) { InfoCardTrace.Assert( !String.IsNullOrEmpty( eventID ), "null eventid" ); InfoCardTrace.Assert( !String.IsNullOrEmpty( message ), "null message" ); m_eventID = eventID; m_message = message; } // // Summary: // Returns the unique identifier for this event. Represented as a uri under the stanard e2e logging // schema - configured asStoreSignatureCollision //rabbits //http://schemas.microsoft.com/2004/03/System/AppDomain/{2bd64add-212d-4385-9f8e-6d9ab976c182} //// //rabbit%s //+ + // for example // "http://schemas.microsoft.com/2004/11/InfoCard/" + "StoreSignatureCollision" + TraceRecord // internal override string EventId { get { return InfoCardEventIdBase + m_eventID + System.Runtime.Diagnostics.TraceRecord.NamespaceSuffix; } } // // Summary: // Called back by the indigo diagnostic trace infrastructure during etw trace logging. // Writes the extendedData section out to the TraceRecord. // // internal override void WriteTo( XmlWriter writer ) { InfoCardTrace.Assert( null != writer, "null writer" ); writer.WriteElementString( "message", m_message ); } // // Override tostring to give a better event logging experience. // public override string ToString() { return SR.GetString( SR.EventLogMessage, m_eventID, m_message ); } } } // 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
- EntitySqlQueryCacheEntry.cs
- InternalMappingException.cs
- RegexRunner.cs
- SafeTimerHandle.cs
- XamlDesignerSerializationManager.cs
- RepeatEnumerable.cs
- ZipIOCentralDirectoryFileHeader.cs
- UnaryNode.cs
- FileAuthorizationModule.cs
- ToolStripPanel.cs
- AppLevelCompilationSectionCache.cs
- ValidationHelpers.cs
- XPathException.cs
- EntityStoreSchemaFilterEntry.cs
- IBuiltInEvidence.cs
- CheckBoxBaseAdapter.cs
- RenderingBiasValidation.cs
- Duration.cs
- QueueAccessMode.cs
- KeyEvent.cs
- HttpValueCollection.cs
- Recipient.cs
- EdmPropertyAttribute.cs
- Viewport3DVisual.cs
- ZoneButton.cs
- EmptyCollection.cs
- ClassGenerator.cs
- DetailsViewInsertEventArgs.cs
- UIElement.cs
- RangeValuePattern.cs
- HtmlLink.cs
- SqlDataSourceSelectingEventArgs.cs
- CryptoApi.cs
- SqlTypesSchemaImporter.cs
- SqlProviderManifest.cs
- KnownBoxes.cs
- EventsTab.cs
- WebEvents.cs
- CodeCatchClause.cs
- RenderContext.cs
- KeySplineConverter.cs
- DataGridLength.cs
- WsdlContractConversionContext.cs
- MetafileHeader.cs
- invalidudtexception.cs
- FilteredReadOnlyMetadataCollection.cs
- URLString.cs
- OleDbPermission.cs
- HttpProfileGroupBase.cs
- ConstraintEnumerator.cs
- PrtTicket_Editor.cs
- PointConverter.cs
- DocumentPaginator.cs
- MultilineStringConverter.cs
- TextEvent.cs
- FormParameter.cs
- ReadOnlyDataSource.cs
- PDBReader.cs
- ShapingWorkspace.cs
- ByteStreamMessageEncoder.cs
- EnumDataContract.cs
- UpDownEvent.cs
- ObjectListDataBindEventArgs.cs
- CapabilitiesAssignment.cs
- LeaseManager.cs
- Vector3DCollection.cs
- DataGridColumnFloatingHeader.cs
- WasAdminWrapper.cs
- JsonReaderWriterFactory.cs
- StyleCollection.cs
- Constants.cs
- BinaryFormatterWriter.cs
- DataFormat.cs
- GcHandle.cs
- TypeUtils.cs
- FileSystemEventArgs.cs
- ConnectionStringsExpressionBuilder.cs
- StringToken.cs
- StrokeNode.cs
- MissingSatelliteAssemblyException.cs
- CollectionView.cs
- QueryExpr.cs
- Point3DAnimation.cs
- OleDbWrapper.cs
- MainMenu.cs
- SspiSafeHandles.cs
- TextServicesManager.cs
- EditCommandColumn.cs
- RegexRunner.cs
- XmlDataImplementation.cs
- PhysicalFontFamily.cs
- ConfigurationSectionGroup.cs
- CryptoProvider.cs
- ItemCollection.cs
- IteratorFilter.cs
- VirtualDirectoryMapping.cs
- StrokeDescriptor.cs
- WorkflowInspectionServices.cs
- ScrollBar.cs
- DoubleAnimationClockResource.cs