/// <summary> /// Gets the raw message internal. /// </summary> /// <param name="helper"></param> /// <returns></returns> /// <value>The raw message internal.</value> internal override string RawMessageDataInternal(XmlWriterHelper helper) { helper .WriteStartElement("counter") .WriteAttribute("counterid", (int)this.Type) .WriteString(this.CoalesceValue) .WriteEndElement(); return string.Empty; }
/// <summary> /// Returns a <see cref="System.String"/> that represents this instance. /// </summary> /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> internal void WriteXmlElement(XmlWriterHelper helper) { helper .WriteStartElement("M") .WriteAttribute("id", (int)this.Type) .WriteString(this.CoalesceValue) .WriteEndElement(); }
/// <summary> /// Gets the raw message internal. /// </summary> /// <param name="helper"></param> /// <returns></returns> /// <value>The raw message internal.</value> internal override string RawMessageDataInternal(XmlWriterHelper helper) { bool isNew = false; try { if (helper == null) { isNew = true; helper = XmlWriterHelper.GetHelper(); } helper .WriteStartElement("sector") .WriteAction((h) => { foreach (PolledEventMessageMeter meter in _currentMeters.Values) { meter.RawMessageDataInternal(h); } }) .WriteEndElement(); } catch { } finally { if (isNew && helper != null) { Extensions.DisposeObject(ref helper); } } return string.Empty; }