private void RecordProcessEvent(string eventName, ProcessTracker pt, INamedValueSet extraNVS = null, bool includeExtraProcessInfo = false, bool includeTrackedValues = false, MDRF.Common.DateTimeStampPair dtPair = null) { if (extraNVS.IsNullOrEmpty()) { Log.Info.Emit("{0} pid:{1} name:{2}", eventName, pt.pid, pt.name); } else { Log.Info.Emit("{0} pid:{1} name:{2} {3}", eventName, pt.pid, pt.name, extraNVS); } INamedValueSet nvs = new NamedValueSet() { { "eventName", eventName } } .MergeWith(pt.AsNVS(includeExtraProcessInfo: includeExtraProcessInfo, includeTrackedValues: includeTrackedValues)) .MergeWith(extraNVS, NamedValueMergeBehavior.AddNewItems) .ConvertToReadOnly(); mdrfWriter.RecordOccurrence(ProcessDeltaOccurrenceInfo, new ValueContainer(nvs), dtPair: dtPair); }