/// <summary>
 /// Initializes a new instance of the <see cref="DependencyTelemetry"/> class.
 /// </summary>
 public DependencyTelemetry()
 {
     this.Data = new RemoteDependencyData() { kind = DataPointType.Aggregation };
     this.context = new TelemetryContext(this.Data.properties);
     this.Data.dependencyKind = BondDependencyKind.Other;
     this.Id = Convert.ToBase64String(BitConverter.GetBytes(WeakConcurrentRandom.Instance.Next()));
 }
Ejemplo n.º 2
0
        public RemoteDependencyData DeepClone()
        {
            var other = new RemoteDependencyData();

            other.ver        = this.ver;
            other.name       = this.name;
            other.id         = this.id;
            other.resultCode = this.resultCode;
            other.duration   = this.duration;
            other.success    = this.success;
            other.data       = this.data;
            other.target     = this.target;
            other.type       = this.type;
            Debug.Assert(other.properties != null, "The constructor should have allocated properties dictionary");
            Debug.Assert(other.measurements != null, "The constructor should have allocated the measurements dictionary");
            Utils.CopyDictionary(this.properties, other.properties);
            Utils.CopyDictionary(this.measurements, other.measurements);
            return(other);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DependencyTelemetry"/> class.
 /// </summary>
 public DependencyTelemetry()
 {
     this.Data = new RemoteDependencyData() { kind = DataPointType.Aggregation };
     this.context = new TelemetryContext(this.Data.properties, new Dictionary<string, string>());
     this.Data.dependencyKind = BondDependencyKind.Other;
 }