/
Tracer.cs
executable file
·101 lines (94 loc) · 4.16 KB
/
Tracer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
namespace Tizen
{
/// <summary>
/// Provides functions for writing a trace message to the system trace buffer.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public static class Tracer
{
/// <summary>
/// Writes a trace event to indicate that a synchronous event has begun.
/// </summary>
/// <remarks>
/// The specific error code can be obtained using the Tizen.Internals.Errors.ErrorFacts.GetLastResult() method.
/// </remarks>
/// <param name="name">The name of an event (optionally containing format specifiers).</param>
/// <seealso cref="Tizen.Tracer.End()"/>
/// <since_tizen> 3 </since_tizen>
public static void Begin (String name)
{
Interop.Tracer.Begin (name);
}
/// <summary>
/// Writes a trace event to indicate that a synchronous event has ended.
/// </summary>
/// <remarks>
/// Tizen.Tracer.End() ends the most recently called Tizen.Tracer.Begin().
/// The specific error code can be obtained using the Tizen.Internals.Errors.ErrorFacts.GetLastResult() method.
/// </remarks>
/// <seealso cref="Tizen.Tracer.Begin(String)"/>
/// <since_tizen> 3 </since_tizen>
public static void End ()
{
Interop.Tracer.End ();
}
/// <summary>
/// Writes a trace event to indicate that an asynchronous event has begun.
/// </summary>
/// <remarks>
/// The specific error code can be obtained using the Tizen.Internals.Errors.ErrorFacts.GetLastResult() method.
/// </remarks>
/// <param name="cookie">An unique identifier for distinguishing simultaneous events.</param>
/// <param name="name">The name of an event (optionally containing format specifiers).</param>
/// <seealso cref="Tizen.Tracer.AsyncEnd(int, String)"/>
/// <since_tizen> 3 </since_tizen>
public static void AsyncBegin (int cookie, String name)
{
Interop.Tracer.AsyncBegin (cookie, name);
}
/// <summary>
/// Writes a trace event to indicate that an asynchronous event has ended.
/// </summary>
/// <remarks>
/// Tizen.Tracer.AsyncEnd() ends matched Tizen.Tracer.AsyncBegin() which has the same cookie and name.
/// The specific error code can be obtained using the Tizen.Internals.Errors.ErrorFacts.GetLastResult() method.
/// </remarks>
/// <param name="cookie">An unique identifier for distinguishing simultaneous events.</param>
/// <param name="name">The name of an event (optionally containing format specifiers).</param>
/// <seealso cref="Tizen.Tracer.AsyncBegin(int, String)"/>
/// <since_tizen> 3 </since_tizen>
public static void AsyncEnd (int cookie, String name)
{
Interop.Tracer.AsyncEnd (cookie, name);
}
/// <summary>
/// Writes a trace event to track change of an integer value.
/// </summary>
/// <remarks>
/// The specific error code can be obtained using the Tizen.Internals.Errors.ErrorFacts.GetLastResult() method.
/// </remarks>
/// <param name="value">The integer variable to trace.</param>
/// <param name="name">The name of an event (optionally containing format specifiers).</param>
/// <since_tizen> 3 </since_tizen>
public static void TraceValue (int value, String name)
{
Interop.Tracer.TraceValue (value, name);
}
}
}