Esempio n. 1
0
        // ------------------------------------------------------------------
        // Methods
        // ------------------------------------------------------------------

        // determine whether an extended trace should be produced for the given
        // object
        static public bool IsExtendedTraceEnabled(object element, TraceDataLevel level)
        {
            if (TraceData.IsEnabled)
            {
                PresentationTraceLevel traceLevel = PresentationTraceSources.GetTraceLevel(element);
                return(traceLevel >= (PresentationTraceLevel)level);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// Writes the attached property TraceLevel to the given element.
        /// </summary>
        internal static void SetTraceLevel(object element, PresentationTraceLevel traceLevel)
        {
            if (element == null)
                return;

            lock (_dictionary)
            {
                Key key = new Key(element, true);

                if (traceLevel > PresentationTraceLevel.None)
                {
                    _dictionary[key] = traceLevel;
                }
                else
                {
                    _dictionary.Remove(key);
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Writes the attached property TraceLevel to the given element.
        /// </summary>
        internal static void SetTraceLevel(object element, PresentationTraceLevel traceLevel)
        {
            if (element == null)
            {
                return;
            }

            lock (_dictionary)
            {
                Key key = new Key(element, true);

                if (traceLevel > PresentationTraceLevel.None)
                {
                    _dictionary[key] = traceLevel;
                }
                else
                {
                    _dictionary.Remove(key);
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Writes the attached property TraceLevel to the given element.
 /// </summary>
 public static void SetTraceLevel(object element, PresentationTraceLevel traceLevel)
 {
     TraceLevelStore.SetTraceLevel(element, traceLevel);
 }
 public static void SetTraceLevel(object element, PresentationTraceLevel traceLevel)
 {
     throw new NotImplementedException ();
 }
 /// <summary>
 /// Writes the attached property TraceLevel to the given element.
 /// </summary>
 public static void SetTraceLevel(object element, PresentationTraceLevel traceLevel)
 {
     TraceLevelStore.SetTraceLevel(element, traceLevel);
 }
Esempio n. 7
0
 public static void SetTraceLevel(object element, PresentationTraceLevel traceLevel)
 {
     throw new NotImplementedException();
 }