Share via


NameOperationResult Enumeration

NameProfile method returns NameOperationResult enum to indicate success or failure.

Namespace:  Microsoft.VisualStudio.Profiler
Assembly:  Microsoft.VisualStudio.Profiler (in Microsoft.VisualStudio.Profiler.dll)

Syntax

'Declaration
Public Enumeration NameOperationResult
public enum NameOperationResult
public enum class NameOperationResult
type NameOperationResult
public enum NameOperationResult

Members

Member name Description
OK Name was registered successfully.
ErrorTextTruncated The name text exceeded 32 characters including the null character and was therefore truncated.
ErrorRedefinition A name was already assigned to the profile element. The name in this function is ignored.
ErrorLevelDoesNotExist The profile level specified does not exist.
ErrorIdDoesNotExist The profiling element specified does not exist.
ErrorInvalidName The name is invalid.
ErrorOutOfMemory Memory was not available to record the event.
ErrorNoSupport The specified operation is not supported.

Examples

The following example illustrates the NameOperationResult enumeration. The example uses a call to the DataCollection.NameProfile method to assign a value to the NameOperationResult enumeration.

        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);
        }

See Also

Reference

Microsoft.VisualStudio.Profiler Namespace