/// <summary> /// Associates the specified operation group with the currently executing thread, /// allowing future retrieval in the same thread, as well as across threads that /// share the same asynchronous control flow. /// </summary> internal static void SetCurrent(OperationGroup group) { if (group != null) { AsyncLocalGroup.Value = group; } }
/// <summary> /// Initializes a new instance of the <see cref="ControlledOperation"/> class. /// </summary> internal ControlledOperation(ulong operationId, string name, OperationGroup group = null) { this.Id = operationId; this.Name = name; this.Status = OperationStatus.None; this.Group = group ?? OperationGroup.Create(this); this.Dependencies = new HashSet <object>(); this.LastSchedulingPoint = SchedulingPointType.Start; this.LastHashedProgramState = 0; this.LastAccessedSharedState = string.Empty; this.IsSourceUncontrolled = false; this.IsAnyDependencyUncontrolled = false; }
/// <summary> /// Indicates whether the specified <see cref="OperationGroup"/> is equal /// to the current <see cref="OperationGroup"/>. /// </summary> bool IEquatable <OperationGroup> .Equals(OperationGroup other) => this.Equals(other);
/// <summary> /// Indicates whether the specified <see cref="OperationGroup"/> is equal /// to the current <see cref="OperationGroup"/>. /// </summary> public bool Equals(OperationGroup other) => this.Equals((object)other);