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
- InstanceCreationEditor.cs
- BuildResultCache.cs
- TextRangeProviderWrapper.cs
- EventNotify.cs
- DebugView.cs
- FormViewDeletedEventArgs.cs
- CounterSetInstance.cs
- SubtreeProcessor.cs
- Image.cs
- RequestCacheEntry.cs
- DetailsViewInsertEventArgs.cs
- RecordManager.cs
- ClientType.cs
- _SecureChannel.cs
- FigureParaClient.cs
- WebHeaderCollection.cs
- ToolboxItemWrapper.cs
- PeerNameRecordCollection.cs
- PrivacyNoticeElement.cs
- DispatcherObject.cs
- DataStorage.cs
- XmlUtf8RawTextWriter.cs
- GridViewColumn.cs
- ItemsPresenter.cs
- TableItemStyle.cs
- SqlConnectionHelper.cs
- RelationHandler.cs
- FtpRequestCacheValidator.cs
- RsaSecurityTokenAuthenticator.cs
- TypeListConverter.cs
- OperationAbortedException.cs
- IPGlobalProperties.cs
- GuidelineSet.cs
- SubpageParagraph.cs
- PageThemeCodeDomTreeGenerator.cs
- ComponentEditorPage.cs
- RemotingException.cs
- GridViewColumnCollection.cs
- Substitution.cs
- Trigger.cs
- TracedNativeMethods.cs
- DirectoryNotFoundException.cs
- OutputCacheProfileCollection.cs
- XsdBuilder.cs
- ServiceDescription.cs
- DataGridClipboardHelper.cs
- HtmlTernaryTree.cs
- XmlSchemaElement.cs
- ResourceAttributes.cs
- FontStretch.cs
- MenuBase.cs
- TreeViewItem.cs
- SiteMapSection.cs
- SessionState.cs
- MultipleViewPattern.cs
- DataServiceQueryOfT.cs
- SQLByteStorage.cs
- MultipartIdentifier.cs
- DesignerUtils.cs
- SqlCommandBuilder.cs
- LinkedResource.cs
- WebServiceHandler.cs
- ReadOnlyDictionary.cs
- RevocationPoint.cs
- PageAdapter.cs
- ClientTargetCollection.cs
- QilExpression.cs
- Semaphore.cs
- SortDescriptionCollection.cs
- CopyAction.cs
- GPStream.cs
- ServiceModelSecurityTokenTypes.cs
- TemplateInstanceAttribute.cs
- XmlWrappingReader.cs
- WebPartHelpVerb.cs
- TableCell.cs
- ToolStripKeyboardHandlingService.cs
- TransformationRules.cs
- HybridDictionary.cs
- FontCacheLogic.cs
- BasicHttpMessageSecurityElement.cs
- XmlTextAttribute.cs
- RijndaelManagedTransform.cs
- dataprotectionpermission.cs
- XsdDuration.cs
- UIElement.cs
- GlobalizationSection.cs
- JavascriptXmlWriterWrapper.cs
- SystemKeyConverter.cs
- streamingZipPartStream.cs
- SqlRetyper.cs
- Operator.cs
- CodeTryCatchFinallyStatement.cs
- CachingHintValidation.cs
- Container.cs
- ButtonBase.cs
- SelectionRangeConverter.cs
- KeyEventArgs.cs
- EmbeddedMailObject.cs
- AuthenticationModulesSection.cs