public OtTracer(string serviceName, IScopeManager scopeManager, IPropagation <string> propagation) { ServiceName = serviceName ?? throw new ArgumentNullException(nameof(serviceName)); ScopeManager = scopeManager ?? throw new ArgumentNullException(nameof(scopeManager)); if (propagation == null) { throw new ArgumentNullException(nameof(propagation)); } _injector = propagation.Injector <ITextMap>((c, key, value) => c.Set(key, value)); _extractor = propagation.Extractor <ITextMap>((c, key) => c.Where(x => x.Key == key).Select(x => x.Value).FirstOrDefault()); }
public FileIndexGenerator(IPropagation nePropagation, IPropagModelCollection propaCollection) { this.m_Propagation = nePropagation; this.m_PropagModelCollection = propaCollection; }
private void SaveValues(IPropagation cellList, int selectIndex) { if (selectIndex != -1) { double[] numArray = new double[4]; Dictionary<string, double[]> dictionary = new Dictionary<string, double[]>(); if (base.cbCellName.SelectedIndex >= 0) { numArray[0] = double.Parse(this.ntxtFrequency.Value.ToString()); numArray[1] = double.Parse(this.ntxtReceiverHeight.Value.ToString()); numArray[2] = double.Parse(this.ntxtReceiverGain.Value.ToString()); numArray[3] = double.Parse(this.ntxtReceiverLosses.Value.ToString()); if (base.ValueList.ContainsKey(base.cbCellName.Items[selectIndex].ToString())) { base.ValueList.Remove(base.cbCellName.Items[selectIndex].ToString()); } base.ValueList.Add(base.cbCellName.Items[selectIndex].ToString(), numArray); } } }