Exemplo n.º 1
0
        public void AssignModel(XLog log, string model)
        {
            if ((model != null) && (model.Trim().Length > 0))
            {
                XAttributeLiteral modelAttr = (XAttributeLiteral)ATTR_MODEL.Clone();

                modelAttr.Value = model.Trim();
                log.GetAttributes().Add(QualifiedName(KEY_MODEL), modelAttr);
            }
        }
Exemplo n.º 2
0
        public string ExtractModel(XLog log)
        {
            XAttribute attribute = log.GetAttributes()[QualifiedName(KEY_MODEL)];

            if (attribute == null)
            {
                return(null);
            }
            return(((XAttributeLiteral)attribute).Value);
        }