Command.DTE الخاصية
إحضار كائن القابلية للتوسعة من المستوى الأعلى.
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
ReadOnly Property DTE As DTE
Get
DTE DTE { get; }
property DTE^ DTE {
DTE^ get ();
}
abstract DTE : DTE
function get DTE () : DTE
قيمة الخاصية
النوع: EnvDTE.DTE
كائن DTE .
ملاحظات
في Visual Studio , يكون الكائن DTE هو جذر طراز التنفيذ التلقائي التي طرازات الكائن الأخرى غالباً من تقوم باستدعاء "تطبيق".
أمثلة
public void CodeExample(DTE2 dte, AddIn addin)
{
try
{
// Show number of commands in Commands collection.
MessageBox.Show(dte.Commands.Count.ToString());
// Return the Commands collection for the application.
Commands cmdsColl = dte.Commands;
// Return a Command object.
Command cmdObj = cmdsColl.Item("File.NewFile", cmdsColl.Count);
// Show the full name of Command object's application object.
MessageBox.Show(cmdObj.DTE.FullName);
// Display the Command object's name.
MessageBox.Show(cmdObj.Name);
// Display whether the Command object's containing collection
// is the same as the application object's Commands collection.
string message;
if (cmdsColl.Equals(cmdObj.Collection))
message = "Same collection!";
else
message = "Different collection!";
MessageBox.Show(message);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
أمن NET Framework.
- الثقة الكاملة للمتصل الفوري. يتعذر استخدام هذا العضو بواسطة التعليمات البرمجية الموثوق بها جزئيًا. لمزيد من المعلومات، راجع باستخدام مكتبات من تعليمات برمجية موثوق بها جزئي.
راجع أيضًَا
المرجع
موارد أخرى
كيفية: الترجمة وإعادة تشغيل أمثلة التعليمات البرمجية لطراز كائن التنفيذ التلقائي