/// <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();
/// <summary> /// Constructs a new accelerator stream. /// </summary> /// <param name="accelerator">The associated accelerator.</param> protected AcceleratorStream(Accelerator accelerator) : base(accelerator) { synchronizeAction = () => Synchronize(); }
/// <summary> /// Constructs an accelerator object. /// </summary> /// <param name="accelerator">The associated accelerator.</param> protected AcceleratorObject(Accelerator accelerator) { Accelerator = accelerator; accelerator.RegisterChildObject(this); }
/// <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); }