Что делает тег filterpriority в XML-комментарии? - PullRequest
27 голосов
/ 11 ноября 2008

Я видел это во многих комментариях XML для классов в .NET Framework BCL, но никогда не мог найти документацию, объясняющую, что он делает.

В качестве примера, глядя на System.Object выявляются следующие комментарии:

namespace System   
{
    /// <summary>Supports all classes in the .NET Framework class hierarchy 
    /// and provides low-level services to derived classes. This is the 
    /// ultimate base class of all classes in the .NET Framework; it is the
    /// root of the type hierarchy.</summary>
    /// <filterpriority>1</filterpriority> 
    [System.Runtime.InteropServices.ClassInterfaceAttribute(2)]
    public class Object    
    {    
        /// <summary>Determines whether the specified 
        /// <see cref="T:System.Object" /> 
        /// instances are considered equal.</summary>  
        /// <returns>true if objA is the same instance as objB or
        /// if both are null
        /// references or if objA.Equals(objB) returns true; 
        /// otherwise, false.</returns>
        /// <param name="objB">The second <see cref="T:System.Object" /> 
        /// to compare. </param>
        /// <param name="objA">The first <see cref="T:System.Object" /> 
        /// to compare. </param>
        /// <filterpriority>2</filterpriority>
        public static bool Equals(object objA, object objB);
     }
 }

Ответы [ 2 ]

16 голосов
/ 11 ноября 2008

Просто предположение: вкладки Все против общего в intellisense?

8 голосов
/ 03 января 2009

Это то же самое, что украшение вашего члена с помощью EditorBrowsableAttribute. Я думаю, значения 0,1 и 2 соответствуют Always, Advanced и Never.

...