Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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)

public enum NameOperationResult
public enum NameOperationResult
public enum NameOperationResult

 Member nameDescription
ErrorIdDoesNotExistThe profiling element specified does not exist. 
ErrorInvalidNameThe name is invalid.  
ErrorLevelDoesNotExistThe profile level specified does not exist. 
ErrorNoSupportThe specified operation is not supported. 
ErrorOutOfMemoryMemory was not available to record the event. 
ErrorRedefinitionA name was already assigned to the profile element. The name in this function is ignored. 
ErrorTextTruncatedThe name text exceeded 32 characters including the null character and was therefore truncated. 
OKName was registered successfully. 

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

Community Additions

ADD
Show:
© 2015 Microsoft