مشاركة عبر


ConfigurationManager.AddConfigurationRow أسلوب

قم بإنشاء مشروع جديد أو صف تكوين عنصر المشروع استناداً إلى Configurationكائن المشروع الموجود أو المشروع عنصر تكوين صف.

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

بناء الجملة

'إقرار
Function AddConfigurationRow ( _
    NewName As String, _
    ExistingName As String, _
    Propagate As Boolean _
) As Configurations
Configurations AddConfigurationRow(
    string NewName,
    string ExistingName,
    bool Propagate
)
Configurations^ AddConfigurationRow(
    String^ NewName, 
    String^ ExistingName, 
    [InAttribute] bool Propagate
)
abstract AddConfigurationRow : 
        NewName:string * 
        ExistingName:string * 
        Propagate:bool -> Configurations 
function AddConfigurationRow(
    NewName : String, 
    ExistingName : String, 
    Propagate : boolean
) : Configurations

المعلمات

  • NewName
    النوع: System.String
    مطلوبة.اسم فريد الجديد مشروع أو المشروع العنصر صف التكوين.
  • ExistingName
    النوع: System.String
    مطلوبة.اسم مشروع أو صف تكوين عنصر مشروع إلى نسخة في ترتيب إلى إنشاء واحدة جديدة.
  • Propagate
    النوع: System.Boolean
    مطلوبة.trueإذا كان مشروع أو مشروع عنصر التكوين صف يجب أن يتم نشرها،falseإذا عدم.

القيمة المُرجعة

النوع: EnvDTE.Configurations
Configurationsمجموعة.

ملاحظات

AddConfigurationRowإرجاع مجموعة جديدConfigurationالكائنات. إذا NewNameبالفعل لهذا مشروع، ثم يفشل هذا الأسلوب حتى أن كنت تعرف التي ExistingNameإعدادات لم يتم نسخ.

أمثلة

Sub AddConfigurationRowExample()
    ' Make a copy of the "Debug" configurations to temporarily change 
    ' them without affecting the original "Debug" configurations.
    Dim cfgmgr As ConfigurationManager = _
        DTE.ActiveSolutionProject.ConfigurationManager
    Dim cfgs = Cfgmgr.AddConfigurationRow("MyDebug", "Debug")
    For Each (cfg in cfgs)
        Cfg.Properties.Item("SomeProperty") = True
    Next
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

ConfigurationManager واجهة

ConfigurationManager الأعضاء

EnvDTE مساحة الاسم