Пример #1
0
 public TermGroup(string name, string description, SecurityModel securityModel, TermGroupType type)
 {
     _id = Guid.NewGuid();
     switch (securityModel)
     {
         case SecurityModel.Advanced:
             _name = name;
             break;
         case SecurityModel.Basic:
             _name = _TERM_GROUP_BASIC_NAME;
             break;
     }
     _description = description;
     _type = type;
 }
Пример #2
0
        public TermGroup(XmlNode node)
		{
            _id = new Guid(Utility.XMLHelper.GetAttributeString(node, XMLNames._A_ID));
            _name = Utility.XMLHelper.GetAttributeString(node, XMLNames._A_Name);
            _description = Utility.XMLHelper.GetAttributeString(node, XMLNames._A_Description);
			//TODO: can remove the try/catch when v1.6 is complete if desired
			try { _type = (TermGroupType)Enum.Parse(typeof(TermGroupType), Utility.XMLHelper.GetAttributeString(node, XMLNames._A_Type)); }
			catch { _type = TermGroupType.BasicSecurity; }
        }