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.

ProfileOperationResult Enumeration

ResumeProfile, StartProfile, StopProfile, and SuspendProfile return success or failure using the ProfileOperationResult enum.

Namespace: Microsoft.VisualStudio.Profiler
Assembly: Microsoft.VisualStudio.Profiler (in microsoft.visualstudio.profiler.dll)

public enum ProfileOperationResult
public enum ProfileOperationResult
public enum ProfileOperationResult

 Member nameDescription
ErrorIdDoesNotExistThe profiling element does not exist. 
ErrorLevelDoesNotExistThe profiling level specified does not exist. 
ErrorModeNeverThe profiling mode was set to NEVER when the function was called. 
ErrorNotYetImplementedThe profiling function call, profiling level, or combination of call and level is not yet implemented. 
OKThe call was successful. 

The following example illustrates the ProfileOperationResult enumeration. The example uses a call to the StartProfile method to retrieve a value for ProfileOperationResult.

        public void ExerciseProfileOperationResult()
        {
            // Declare ProfileOperationResult enumeration 
            // to hold return value of a call to StartProfile.
            ProfileOperationResult profileResult;

            profileResult = DataCollection.StartProfile(
                ProfileLevel.Global,
                DataCollection.CurrentId);

            Console.WriteLine("StartProfile returned {0}", profileResult);
        }

Community Additions

ADD
Show:
© 2015 Microsoft