NameOperationResult 列挙体

NameProfile メソッドは、成功または失敗を示す NameOperationResult 列挙型を返します。

名前空間:  Microsoft.VisualStudio.Profiler
アセンブリ:  Microsoft.VisualStudio.Profiler (Microsoft.VisualStudio.Profiler.dll 内)

構文

'宣言
Public Enumeration NameOperationResult
public enum NameOperationResult
public enum class NameOperationResult
type NameOperationResult
public enum NameOperationResult

メンバー

メンバー名 説明
OK 名前は正常に登録されました。
ErrorTextTruncated 名前のテキストが null 文字を含めて 32 文字を超えていたため、切り詰められました。
ErrorRedefinition このプロファイル要素には既に名前が割り当てられています。この関数の名前は無視されます。
ErrorLevelDoesNotExist 指定されたプロファイル レベルが存在しません。
ErrorIdDoesNotExist 指定されたプロファイル要素が存在しません。
ErrorInvalidName 名前が無効です。
ErrorOutOfMemory メモリ不足のため、このイベントを記録できません。
ErrorNoSupport 指定された操作がサポートされていません。

次に NameOperationResult 列挙型の例を示します。この例では、DataCollection.NameProfile メソッドを呼び出して、NameOperationResult 列挙型に値を代入しています。

        public void ExerciseNameOperationResult()
        {
            string profileName = "ExerciseNameProfile";

            // Declare enumeration to hold result of call to 
            // ExerciseNameProfle.
            NameOperationResult nameResult;

            nameResult =  DataCollection.NameProfile(
                profileName,
                ProfileLevel.Global,
                DataCollection.CurrentId);

            Console.WriteLine("NameProfile returned {0}", nameResult);
        }

参照

関連項目

Microsoft.VisualStudio.Profiler 名前空間