public void GenerateATrace(string strategy)
        {
            var tuple = new Tuple <Object, object>(strategy, _innerLoop);

            Traces.Add(tuple);
            _innerLoop = new List <TraceStep>();
        }
예제 #2
0
 public ImportableVehicleViewModel(IEnumerable <PsaTrace> model)
 {
     if (model == null)
     {
         throw new ArgumentNullException("model");
     }
     this.model = model;
     foreach (PsaTrace trace in model)
     {
         ImportablePsaTraceViewModel traceViewModel =
             new ImportablePsaTraceViewModel(trace);
         RegisterExportableChild(traceViewModel);
         Traces.Add(traceViewModel);
     }
     if (!model.AreAllVinsEqual())
     {
         throw new ArgumentException("Vins are not equal here!");
     }
     mileage = model.GetMaxMileage();
     if (Traces.Count > 0)
     {
         vin              = Traces[0].Vin;
         manufacturer     = Traces[0].Manufacturer;
         vehicleModelName = Traces[0].VehicleModelName;
     }
 }
예제 #3
0
        public void AddTrace(SingleTrace trace)
        {
            if (trace == null)
            {
                throw new ArgumentNullException();
            }

            Traces.Add(trace);
        }
예제 #4
0
 /// <summary>
 /// add a trace to the end of the Traces list
 /// </summary>
 /// <param name="trace">add a trace</param>
 public void AddTrace(SEGYTrace trace)
 {
     if (Traces.Count == 0)
     {
         trace.positionOfTraceInFile = positionOfEndofFileHeaders;
     }
     else
     {
         trace.positionOfTraceInFile = Traces[Traces.Count - 1].positionOfTraceInFile + Traces[Traces.Count - 1].totalLengthOfTraceData;
     }
     Traces.Add(trace);
 }
예제 #5
0
        private void LoadTraces(IEAElement element)
        {
            Traces.Clear();

            IEnumerable <ITraceLink> traces =
                element.FindConnectors("", EAConstants.RelationTrace)
                .Select(a => (ITraceLink) new TraceLink(this, a));

            foreach (ITraceLink trace in traces)
            {
                Traces.Add(trace);
            }
        }
예제 #6
0
        private void AddAddress_Click(object sender, RoutedEventArgs e)
        {
            var trace  = new TraceVM();
            var window = new AddressEdittingWindow(trace);

            window.ShowDialog();
            if (!string.IsNullOrWhiteSpace(trace.Address))
            {
                Traces.Add(trace);
            }

            SaveAll();
        }
예제 #7
0
 /// <summary>
 /// Traces the specified format.
 /// </summary>
 /// <param name="format">The format.</param>
 /// <param name="args">The arguments.</param>
 public void Trace(string format, params object[] args)
 {
     if (Logger != null)
     {
         if (args.Length == 0)
         {
             Logger.WriteLine(format);
         }
         else
         {
             Logger.WriteLine(format, args);
         }
     }
     Traces.Add(new TraceParams(format, args));
     TraceAction(format, args);
 }
예제 #8
0
        Workspace()
        {
            var all = new VisibleTraceType(SingleTrace.TraceType.All);

            all.IsSelected = true;
            VisibleTraceTypes.Add(all);
            VisibleTraceTypes.Add(new VisibleTraceType(SingleTrace.TraceType.Info));
            VisibleTraceTypes.Add(new VisibleTraceType(SingleTrace.TraceType.Warning));
            VisibleTraceTypes.Add(new VisibleTraceType(SingleTrace.TraceType.Error));

            var trace1 = new SingleTrace();

            trace1.Text = "Hello";
            trace1.Type = SingleTrace.TraceType.Info;
            var trace2 = new SingleTrace();

            trace2.Text = "Bye";
            trace2.Type = SingleTrace.TraceType.Info;
            Traces.Add(trace1);
            Traces.Add(trace2);
        }
        public int SaveTraceAndMeasurements(MeasuredTrace measuredTrace)
        {
            var changeCount = 0;

            if (
                Traces.Any(
                    t =>
                    string.Equals(t.PackageFileName, measuredTrace.PackageFileName,
                                  StringComparison.OrdinalIgnoreCase)))
            {
                Traces.Update(measuredTrace);
            }
            else
            {
                Traces.Add(measuredTrace);
            }
            changeCount += SaveChanges();
            foreach (var m in measuredTrace.GetMeasurementsAll())
            {
                AddMeasurementByTypeInfer(m);
            }
            changeCount += SaveChanges();
            return(changeCount);
        }
예제 #10
0
 public void Trace(string message, params object[] args)
 {
     Traces.Add(message);
 }
예제 #11
0
 public void Send(ITelemetry item) => Traces.Add(item);
예제 #12
0
 public override void Trace(TraceEvent traceEvent)
 {
     Traces.Add(traceEvent);
 }
 public void WriteTrace(Span[] trace) => Traces.Add(trace);
예제 #14
0
 public void WriteTrace(ArraySegment <Span> trace) => Traces.Add(trace);
예제 #15
0
 public void Trace(string format, params object[] args)
 {
     Debug.WriteLine(format, args);
     Traces.Add(new TraceParams(format, args));
     TraceAction(format, args);
 }
예제 #16
0
 public override void Trace(TraceEvent traceEvent)
 {
     // TODO: update to be thread safe
     Traces.Add(traceEvent);
 }