Example #1
0
        public virtual void SetMetaData(string key, object value)
        {
            foreach (IMetaDataValue imdv in m_MetaData)
            {
                if (imdv.Key == key)
                {
                    imdv.Value = value;
                    return;
                }
            }
            IMetaDataValue mdv;

            mdv       = new MetaDataValue();
            mdv.Key   = key;
            mdv.Value = value;
            m_MetaData.Add(mdv);
        }
		protected virtual void DeserializeMetaData(XmlNode xmlOwner, ref ArrayList metaDataValues)
		{
			IMetaDataValue metaDataValue;
			XmlNodeList xmlMetaDataValues;
			xmlMetaDataValues = xmlOwner.SelectNodes("meta-data");
			foreach (XmlNode xmlMetaDataValue in xmlMetaDataValues)
			{
				if (!(xmlMetaDataValue.Attributes["key"] == null))
				{
					if (!(xmlMetaDataValue.Attributes["value"] == null))
					{
						metaDataValue = new MetaDataValue();
						metaDataValue.Key = xmlMetaDataValue.Attributes["key"].Value;
						metaDataValue.Value = xmlMetaDataValue.Attributes["value"].Value;
						metaDataValues.Add(metaDataValue);
					}
				}
			}
		}
Example #3
0
 public virtual void SetMetaData(string key, object value)
 {
     foreach (IMetaDataValue imdv in m_MetaData)
     {
         if (imdv.Key == key)
         {
             imdv.Value = value;
             return;
         }
     }
     IMetaDataValue mdv;
     mdv = new MetaDataValue();
     mdv.Key = key;
     mdv.Value = value;
     m_MetaData.Add(mdv);
 }