ContextAttributes.HighPriorityAttributes الخاصية
يحصل على مجموعة السمات "أولوية عالية".
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
ReadOnly Property HighPriorityAttributes As ContextAttributes
Get
ContextAttributes HighPriorityAttributes { get; }
property ContextAttributes^ HighPriorityAttributes {
ContextAttributes^ get ();
}
abstract HighPriorityAttributes : ContextAttributes
function get HighPriorityAttributes () : ContextAttributes
قيمة الخاصية
النوع: EnvDTE.ContextAttributes
ContextAttributesمجموعة.
ملاحظات
هناك هو مثيل واحد فقط لترتيب هو السمات المجموعة. هو متوفرة فقط من ContextAttributesمجموعة. إذا ContextAttributesمجموعة هو لإطار, ثم HighPriorityAttributesإرجاع لا شيء.
هذه السمات موجودة دائماً في التأثير، و تكون أعلى في الأسبقية أكياس سياق، مما يؤدي إلى تطابق مواضيع الانتقال إلى الأعلى من الفئات الخاصة بهم.
أمثلة
Sub HighPriorityAttributesExample()
Dim cas As EnvDTE.ContextAttributes
Dim ca As EnvDTE.ContextAttribute
Try
cas = DTE.ContextAttributes
' List all regular and high priority attributes.
ListAttr(ca, cas)
' Add a new F1 keyword to the global high priority
' attributes collection.
cas.HighPriorityAttributes.Add("NewAttribute", _
"NewF1Keyword", vsContextAttributeType. _
vsContextAttributeLookupF1)
ListAttr(ca, cas)
' Remove the new high priority attribute.
cas.HighPriorityAttributes.Item(1).Remove()
ListAttr(ca, cas)
Catch ex As System.Exception
MsgBox("ERROR: " & ex.Message)
End Try
End Sub
Function ListAttr(ByVal ca As ContextAttribute, ByVal cas As _
ContextAttributes)
Dim msg As String
Try
' List regular attributes, their first value, and their count.
For Each ca In cas
msg = msg & ca.Name & " " & ca.Values(0) & vbCr
Next
cas.Refresh()
MsgBox("All Attributes: " & vbCr & msg & "Count: " & _
cas.Count)
' List high-priority attributes, their first value,
' and their count.
msg = ""
For Each ca In cas.HighPriorityAttributes
msg = msg & ca.Name & " " & ca.Values(0) & vbCr
Next
cas.Refresh()
MsgBox("High-Priority Attributes: " & vbCr & msg & "Count: " _
& cas.HighPriorityAttributes.Count)
Catch ex As System.Exception
MsgBox("ERROR: " & ex.Message)
End Try
End Function
أمن NET Framework.
- الثقة الكاملة للمتصل الفوري. يتعذر استخدام هذا العضو بواسطة التعليمات البرمجية الموثوق بها جزئيًا. لمزيد من المعلومات، راجع باستخدام مكتبات من تعليمات برمجية موثوق بها جزئي.