Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Diagnostics / Managed / Microsoft / InfoCards / Diagnostics / InfoCardTraceRecord.cs / 1 / 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: // //// // internal class InfoCardTraceRecord : System.ServiceModel.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.ServiceModel.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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EntitySqlQueryState.cs
- AxDesigner.cs
- ErrorFormatterPage.cs
- XmlConvert.cs
- InfoCardMetadataExchangeClient.cs
- HttpServerVarsCollection.cs
- RbTree.cs
- ProviderCollection.cs
- WsatStrings.cs
- Vector3DKeyFrameCollection.cs
- CompleteWizardStep.cs
- NotifyCollectionChangedEventArgs.cs
- StyleXamlParser.cs
- ExecutedRoutedEventArgs.cs
- RuntimeTransactionHandle.cs
- ListControl.cs
- RowUpdatingEventArgs.cs
- OrderedDictionary.cs
- ImageIndexConverter.cs
- ParserContext.cs
- BindingElementExtensionElement.cs
- PrimitiveDataContract.cs
- HandlerBase.cs
- SHA1Managed.cs
- ShutDownListener.cs
- VectorConverter.cs
- SamlAuthenticationStatement.cs
- WebPartRestoreVerb.cs
- InfoCardProofToken.cs
- ImageList.cs
- DiscoveryDocumentReference.cs
- HighlightVisual.cs
- DesignerRegionCollection.cs
- DataGridViewSelectedCellCollection.cs
- GlyphInfoList.cs
- ScriptingProfileServiceSection.cs
- ObjectListDesigner.cs
- ScriptModule.cs
- MimePart.cs
- XmlSchemaAttribute.cs
- ElementsClipboardData.cs
- SendKeys.cs
- RichTextBox.cs
- X509Chain.cs
- AppSecurityManager.cs
- FrameworkContentElementAutomationPeer.cs
- SequenceNumber.cs
- HttpProtocolImporter.cs
- IPCCacheManager.cs
- SqlCommand.cs
- CodeDelegateInvokeExpression.cs
- SqlVisitor.cs
- SafeCertificateContext.cs
- Activity.cs
- TogglePatternIdentifiers.cs
- SqlBulkCopyColumnMapping.cs
- UITypeEditor.cs
- SelectionGlyph.cs
- Interlocked.cs
- IntranetCredentialPolicy.cs
- Polyline.cs
- DataListCommandEventArgs.cs
- ModelItemExtensions.cs
- RIPEMD160.cs
- CompModHelpers.cs
- OrderByExpression.cs
- MachineKeyConverter.cs
- DataColumn.cs
- TraceXPathNavigator.cs
- XmlDocumentSerializer.cs
- DataContext.cs
- TextTreeRootNode.cs
- Compiler.cs
- CompositeDataBoundControl.cs
- EventRoute.cs
- RoutingExtensionElement.cs
- DetailsViewUpdatedEventArgs.cs
- XmlSchemaValidationException.cs
- ByteStreamMessageEncoderFactory.cs
- PolicyStatement.cs
- EntityDataSourceUtil.cs
- TableRow.cs
- ServiceHttpHandlerFactory.cs
- HttpCookieCollection.cs
- TypeUnloadedException.cs
- ByteStreamGeometryContext.cs
- ProtocolsConfigurationEntry.cs
- QilIterator.cs
- SqlSelectStatement.cs
- DeobfuscatingStream.cs
- ImportCatalogPart.cs
- TypeDelegator.cs
- RootAction.cs
- TranslateTransform.cs
- TableLayoutCellPaintEventArgs.cs
- DataSourceSelectArguments.cs
- ImageInfo.cs
- BrowserCapabilitiesCodeGenerator.cs
- Dump.cs
- XmlHierarchicalDataSourceView.cs