This project is read-only.

Diagnostics

Firstly we have a trace context, the provided implementation simply logs to Debug.Write..

    public interface ITraceContext
    {
        /// <summary>
        /// Writes trace information to the trace log.
        /// </summary>
        /// <param name="source">The object writing the trace message.</param>
        /// <param name="messageCallback">A callback that builds the trace message to write to the log.</param>
        void Write(object source, Func<string> messageCallback);

        /// <summary>
        /// Writes trace information to the trace log.
        /// </summary>
        /// <param name="sourceType">The type of the object writing the trace message.</param>
        /// <param name="messageCallback">A callback that builds the trace message to write to the log.</param>
        void Write(Type sourceType, Func<string> messageCallback);

        /// <summary>
        /// Writes trace information to the trace log.
        /// </summary>
        /// <param name="sourceType">The type of the object writing the trace message.</param>
        /// <param name="messageCallback">A callback that builds a series of trace messages to write to the log.</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        void Write(Type sourceType, Func<IEnumerable<string>> messageCallback);
    }


Secondly we have the MemoryUsage static class. It will only access DeviceExtendedProperties when the debugger is attached so your application does not have to worry about putting IDCAPIDENTITY_DEVICE into your manifest

Last edited Jun 6, 2011 at 8:22 AM by JakeGinnivan, version 1

Comments

No comments yet.