示例#1
0
 /// <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;
     }
 }
示例#2
0
 /// <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;
 }
示例#3
0
 /// <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);
示例#4
0
 /// <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);