Inheritance: IRExecutionTracer
Exemple #1
0
        /// <summary>
        /// Obtain an instance of <see cref="IRExecutionTracer"/> for the given <see cref="IRSession"/>.
        /// </summary>
        public static async Task<IRExecutionTracer> TraceExecutionAsync(this IRSession session, CancellationToken cancellationToken = default(CancellationToken)) {
            RExecutionTracer tracer;

            await _tracersSem.WaitAsync(cancellationToken).ConfigureAwait(false);
            try {
                if (!_tracers.TryGetValue(session, out tracer)) {
                    tracer = new RExecutionTracer(session);
                    await tracer.InitializeAsync(cancellationToken).ConfigureAwait(false);
                    _tracers.Add(session, tracer);
                }

                session.Disposed += Session_Disposed;
            } finally {
                _tracersSem.Release();
            }

            return tracer;
        }
        /// <summary>
        /// Obtain an instance of <see cref="IRExecutionTracer"/> for the given <see cref="IRSession"/>.
        /// </summary>
        public static async Task <IRExecutionTracer> TraceExecutionAsync(this IRSession session, CancellationToken cancellationToken = default(CancellationToken))
        {
            RExecutionTracer tracer;

            await _tracersSem.WaitAsync(cancellationToken).ConfigureAwait(false);

            try {
                if (!_tracers.TryGetValue(session, out tracer))
                {
                    tracer = new RExecutionTracer(session);
                    await tracer.InitializeAsync(cancellationToken).ConfigureAwait(false);

                    _tracers.Add(session, tracer);
                }

                session.Disposed += Session_Disposed;
            } finally {
                _tracersSem.Release();
            }

            return(tracer);
        }
Exemple #3
0
 internal RBreakpoint(RExecutionTracer tracer, RSourceLocation location) {
     _tracer = tracer;
     Location = location;
 }
Exemple #4
0
 internal RBreakpoint(RExecutionTracer tracer, RSourceLocation location)
 {
     _tracer  = tracer;
     Location = location;
 }