مشاركة عبر


Configuration.Type الخاصية

يحصل للإشارة إلى ثابتة نوع الكائنات.

مساحة الاسم:  EnvDTE
التجميع:  EnvDTE (في EnvDTE.dll)

بناء الجملة

'إقرار
ReadOnly Property Type As vsConfigurationType
    Get
vsConfigurationType Type { get; }
property vsConfigurationType Type {
    vsConfigurationType get ();
}
abstract Type : vsConfigurationType
function get Type () : vsConfigurationType

قيمة الخاصية

النوع: EnvDTE.vsConfigurationType
vsConfigurationTypeثابتاً، الذي يحدد نوع تكوين.

ملاحظات

للتكوينات، Typeإرجاع للإشارة إلى ثابت ما إذا كانت مجموعة التكوينات هو صف من تكوينات لاسم تكوين محدد أو عمود من التكوينات للنظام الأساسي المحدد. إذا كان الإطار ينتمي إلى بيئة أداة، ثم Typeتعرف أداة. إذا كان النافذة هو للأدوات التي يوفرها الحزمة "أو" نافذة مستند، ثم " Typeهو أما vsWindowTypeToolWindowأو vsWindowTypeDocument، و ObjectKindخاصية إلى نوع الحزمة الخاصة بالمعلومات.

أمثلة

public void CodeExample(DTE2 dte, AddIn addin)
{   // Make sure you have a solution loaded into Visual Studio
    // before running the following example.
    try
    {
        Project prj;
        Configuration config; 
        ConfigurationManager configmgr;
        if (dte.Solution.Projects.Count > 0)
        {
            prj = dte.Solution.Projects.Item(1);
            config = prj.ConfigurationManager.ActiveConfiguration;
            // Returning the Configuration type constant.
            MessageBox.Show(config.Type.ToString());
            // Returns the ConfigurationManager containing the active configuration.
            configmgr = config.Collection;
            // Returns the application containing this active configuration.
            MessageBox.Show(config.DTE.Name);
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

أمن NET Framework.

راجع أيضًَا

المرجع

Configuration واجهة

Configuration الأعضاء

EnvDTE مساحة الاسم

موارد أخرى

كيفية: الترجمة وإعادة تشغيل أمثلة التعليمات البرمجية لطراز كائن التنفيذ التلقائي