Beispiel #1
0
 /// <summary>
 /// Makes the associated accelerator the current one for this thread and
 /// returns a <see cref="ScopedAcceleratorBinding"/> object that allows
 /// to easily recover the old binding.
 /// </summary>
 /// <returns>A scoped binding object.</returns>
 public ScopedAcceleratorBinding BindScoped() => Accelerator.BindScoped();
Beispiel #2
0
 /// <summary>
 /// Constructs a new accelerator stream.
 /// </summary>
 /// <param name="accelerator">The associated accelerator.</param>
 protected AcceleratorStream(Accelerator accelerator)
     : base(accelerator)
 {
     synchronizeAction = () => Synchronize();
 }
Beispiel #3
0
 /// <summary>
 /// Constructs an accelerator object.
 /// </summary>
 /// <param name="accelerator">The associated accelerator.</param>
 protected AcceleratorObject(Accelerator accelerator)
 {
     Accelerator = accelerator;
     accelerator.RegisterChildObject(this);
 }
Beispiel #4
0
 /// <summary>
 /// Adds a profiling marker to the accelerator default stream.
 /// </summary>
 public static void AddProfilingMarker(this Accelerator accelerator) =>
 accelerator.DefaultStream.AddProfilingMarker();
 /// <summary>
 /// Constructs an accelerator object.
 /// </summary>
 /// <param name="accelerator">The associated accelerator.</param>
 protected AcceleratorObject(Accelerator accelerator)
 {
     Accelerator = accelerator ?? throw new ArgumentNullException(nameof(accelerator));
     accelerator.RegisterChildObject(this);
 }