TraceRecord.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / Trace / TraceRecord.cs / 1305376 / TraceRecord.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Transactions.Diagnostics 
{ 
    using System;
    using System.Diagnostics; 
    using System.Globalization;
    using System.Text;
    using System.Xml;
 
    /// 
    /// Base class for the team-specific traces that contain structured data. 
    ///  
    internal abstract class TraceRecord
    { 
        internal protected const string EventIdBase = "http://schemas.microsoft.com/2004/03/Transactions/";
        internal protected const string NamespaceSuffix = "TraceRecord";

        ///  
        /// Defines object layout.
        ///  
        internal virtual string EventId { get { return EventIdBase + "Empty" + TraceRecord.NamespaceSuffix; } } 

        public override string ToString() 
        {
            PlainXmlWriter xml = new PlainXmlWriter();
            WriteTo(xml);
            return xml.ToString(); 
        }
 
        internal abstract void WriteTo(XmlWriter xml); 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Transactions.Diagnostics 
{ 
    using System;
    using System.Diagnostics; 
    using System.Globalization;
    using System.Text;
    using System.Xml;
 
    /// 
    /// Base class for the team-specific traces that contain structured data. 
    ///  
    internal abstract class TraceRecord
    { 
        internal protected const string EventIdBase = "http://schemas.microsoft.com/2004/03/Transactions/";
        internal protected const string NamespaceSuffix = "TraceRecord";

        ///  
        /// Defines object layout.
        ///  
        internal virtual string EventId { get { return EventIdBase + "Empty" + TraceRecord.NamespaceSuffix; } } 

        public override string ToString() 
        {
            PlainXmlWriter xml = new PlainXmlWriter();
            WriteTo(xml);
            return xml.ToString(); 
        }
 
        internal abstract void WriteTo(XmlWriter xml); 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK