Share via


_Solution.Properties プロパティ

_Solution に属するすべてのプロパティのコレクションを取得します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
ReadOnly Property Properties As Properties
    Get
Properties Properties { get; }
property Properties^ Properties {
    Properties^ get ();
}
abstract Properties : Properties
function get Properties () : Properties

プロパティ値

型: EnvDTE.Properties
Properties コレクション。

解説

一部のプロパティは、_Solution、またはソリューションを介して到達したオブジェクト (ビルド依存関係の SolutionBuild オブジェクトなど) のオートメーション プロパティとして公開されます。

Sub PropertiesExample(ByVal dte As DTE2)

    ' NOTE: This example requires a reference to the
    '       System.IO namespace.

    ' Before running this example, open a solution.

    Dim props As Properties = dte.Solution.Properties
    Dim prop As [Property]
    Dim msg As String = _
        Path.GetFileNameWithoutExtension(dte.Solution.FullName) & _
        " has the following properties:" & vbCrLf & vbCrLf

    For Each prop In props
        msg &= prop.Name & " = "
        Try
            msg &= prop.Value.ToString() & vbCrLf
        Catch
            msg &= "(Nothing)" & vbCrLf
        End Try
    Next

    MsgBox(msg)

End Sub
public void PropertiesExample(DTE2 dte)
{
    // NOTE: This example requires a reference to the
    //       System.IO namespace.

    // Before running this example, open a solution.

    Properties props = dte.Solution.Properties;
    string msg = 
        Path.GetFileNameWithoutExtension(dte.Solution.FullName) + 
        " has the following properties:\n\n";

    foreach (Property prop in props)
    {
        msg += prop.Name + " = ";
        try
        {
            msg += prop.Value.ToString() + "\n";
        }
        catch
        {
            msg += "(Nothing)\n";
        }
    }

    MessageBox.Show(msg);
}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

_Solution インターフェイス

EnvDTE 名前空間

その他の技術情報

方法 : オートメーション オブジェクト モデルのコード例をコンパイルおよび実行する