DataCollection.ResumeProfile Yöntem
ResumeProfile yöntemi azaltır askıya alma/devam etme için belirtilen profil oluşturma düzeyi sayaç.
Ad alanı: Microsoft.VisualStudio.Profiler
Derleme: Microsoft.VisualStudio.Profiler (Microsoft.VisualStudio.Profiler.dll içinde)
Sözdizimi
'Bildirim
Public Shared Function ResumeProfile ( _
profileLevel As ProfileLevel, _
elementId As UInteger _
) As ProfileOperationResult
public static ProfileOperationResult ResumeProfile(
ProfileLevel profileLevel,
uint elementId
)
public:
static ProfileOperationResult ResumeProfile(
ProfileLevel profileLevel,
unsigned int elementId
)
static member ResumeProfile :
profileLevel:ProfileLevel *
elementId:uint32 -> ProfileOperationResult
public static function ResumeProfile(
profileLevel : ProfileLevel,
elementId : uint
) : ProfileOperationResult
Parametreler
- profileLevel
Tür: Microsoft.VisualStudio.Profiler.ProfileLevel
ElementId içinde belirtilen tanımlayıcı yürütme düzeyini tanımlar.
- elementId
Tür: System.UInt32
Sistem tarafından oluşturulan işlem veya iş parçacığı tanımlayıcısı.
Dönüş Değeri
Tür: Microsoft.VisualStudio.Profiler.ProfileOperationResult
Dönüş değeri, ProfileOperationResult, enum ' dir.
Notlar
Askıya alma/devam et sayaç başlangıç değeri 0'dır.SuspendProfile her çağrı için askıya alma/devam etme sayısı 1 ekler; ResumeProfile her çağrı 1 çıkarır.
Askıya alma/devam etme sayısı 0'dan büyük olduğunda düzeyi için askıya alma/devam etme durumu Kapalı'dır.Bu sayı sıfıra eşit veya daha az olduğunda, askıya alma/devam et durumuna açık'tır.
Başlat/Durdur durumu ve askıya alma/devam et durumuna her ikisi de etkin durumdayken, düzeyi için profil oluşturma durumu açık'tır.Bir iş parçacığı olması, global, proses ve profili iş parçacığı düzeyini belirten iş parçacığı için tüm olmalıdır on.
Örnekler
Aşağıdaki örnekte, ResumeProfile yöntemi gösterilmektedir.SuspendProfile yöntemine yapılan bir çağrı aynı iş parçacığı veya DataCollection.CurrentId tarafından tanımlanan işlem yapılan örnek varsayar.
void ExerciseResumeProfile()
{
// The initial value of the Suspend/Resume counter is 0.
// Each call to SuspendProfile adds 1 to the Suspend/Resume
// count; each call to ResumeProfile subtracts 1.
// Variables used to print output.
HRESULT hResult;
TCHAR tchBuffer[256];
// Declare enumeration to hold result of call to ResumeProfile
PROFILE_COMMAND_STATUS profileResult;
profileResult = ResumeProfile(
PROFILE_GLOBALLEVEL,
PROFILE_CURRENTID);
// Format and print result.
LPCTSTR pszFormat = TEXT("%s %d.\0");
TCHAR* pszTxt = TEXT("ResumeProfile returned");
hResult = StringCchPrintf(tchBuffer, 256, pszFormat,
pszTxt, profileResult);
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.