Share via


OutputGroup.CanonicalName, propriété

Obtient le nom unique utilisé pour ce groupe de sorties.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
ReadOnly Property CanonicalName As String
    Get
string CanonicalName { get; }
property String^ CanonicalName {
    String^ get ();
}
abstract CanonicalName : string
function get CanonicalName () : String

Valeur de propriété

Type : System.String
Chaîne représentant le nom utilisé pour le groupe de sorties.

Exemples

Sub CanonicalNameExample(ByVal dte As DTE2)

    ' Before running this example, open a project.

    ' Display the output groups of the first project.
    Dim proj As Project = dte.Solution.Item(1)
    Dim con As Configuration = _
        proj.ConfigurationManager.ActiveConfiguration
    Dim names As String = ""
    Dim og As OutputGroup
    For Each og In con.OutputGroups
        names &= og.CanonicalName & vbCrLf
    Next

    MsgBox(proj.Name & "'s " & con.ConfigurationName & _
        " output groups:" & vbCrLf & vbCrLf & names)

End Sub
public void CanonicalNameExample(DTE2 dte)
{
    // Before running this example, open a project.

    // Display the output groups of the first project.
    Project proj = dte.Solution.Item(1);
    Configuration con = proj.ConfigurationManager.ActiveConfiguration;
    string names = "";
    foreach (OutputGroup og in con.OutputGroups)
    {
        names += og.CanonicalName + Environment.NewLine;
    }

    MessageBox.Show(proj.Name + "'s " + con.ConfigurationName + 
        " output groups:" + Environment.NewLine + Environment.NewLine + 
        names);
}

Sécurité .NET Framework

Voir aussi

Référence

OutputGroup Interface

EnvDTE, espace de noms

Autres ressources

Comment : compiler et exécuter les exemples de code du modèle objet Automation