//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- #endregion #region --Misc Methods (Private)-- #endregion #region --Misc Methods (Protected)-- protected override void loadContent(XmlNodeList content) { BUNDLE_INFO = new OmemoBundleInformation(); foreach (XmlNode n in content) { if (string.Equals(n.Name, "items") && string.Equals(n.Attributes["node"]?.Value, Consts.XML_XEP_0384_BUNDLES_NODE)) { BUNDLE_INFO.loadBundleInformation(n); return; } } }
//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- #endregion #region --Misc Methods (Private)-- #endregion #region --Misc Methods (Protected)-- protected override void loadContent(XmlNodeList content) { BUNDLE_INFO = new OmemoBundleInformation(); foreach (XmlNode n in content) { if (string.Equals(n.Name, "items") && n.Attributes["node"] != null && n.Attributes["node"].Value.StartsWith(Consts.XML_XEP_0384_BUNDLE_INFO_NODE)) { uint.TryParse(n.Attributes["node"].Value.Replace(Consts.XML_XEP_0384_BUNDLE_INFO_NODE, ""), out uint deviceId); DEVICE_ID = deviceId; BUNDLE_INFO.loadBundleInformation(n); return; } } }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- public OmemoSetBundleInformationMessage(string from, OmemoBundleInformation bundleInfo) : base(from, null, Consts.XML_XEP_0384_BUNDLES_NODE) { BUNDLE_INFO = bundleInfo; }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- /// <summary> /// Basic Constructor /// </summary> /// <history> /// 06/08/2018 Created [Fabian Sauter] /// </history> public OmemoSetBundleInformationMessage(string from, OmemoBundleInformation bundleInfo, uint deviceid) : base(from, null, Consts.XML_XEP_0384_BUNDLE_INFO_NODE + deviceid) { this.BUNDLE_INFO = bundleInfo; this.DEVICE_ID = deviceid; }