Ejemplo n.º 1
0
        internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
        {
            // Create the children elements
            IItem item = parent as IItem;

            if (item != null)
            {
                CreateChildrenElements(elementFactory, item, rule, ruleIds);
            }
            else
            {
                if (parent == rule)
                {
                    CreateChildrenElements(elementFactory, rule, ruleIds);
                }
                else
                {
                    System.Diagnostics.Debug.Assert(false);
                }
            }

            // Create the tag element at the end only if there were some children
            IPropertyTag tag = elementFactory.CreatePropertyTag(parent);

            tag.NameValue(parent, null, _value);
            return(tag);
        }
Ejemplo n.º 2
0
        private IPropertyTag ParseNameValueTag(SrgsNameValueTag srgsTag, IElement parent)
        {
            IPropertyTag propertyTag = _parser.CreatePropertyTag(parent);

            propertyTag.NameValue(parent, srgsTag.Name, srgsTag.Value);
            propertyTag.PostParse(parent);
            return(propertyTag);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// ParseNameValueTag tag
        /// </summary>
        private IPropertyTag ParseNameValueTag(SrgsNameValueTag srgsTag, IElement parent)
        {
            IPropertyTag tag = _parser.CreatePropertyTag(parent);

            // Initialize the tag
            tag.NameValue(parent, srgsTag.Name, srgsTag.Value);

            // Since the tag are always pushed at the end of the element list, they can be committed right away
            tag.PostParse(parent);
            return(tag);
        }
Ejemplo n.º 4
0
        public IPropertyTag GetPropertyTagById(int id)
        {
            FVCP.Persistence.EF.PropertyTag dbItem = null;
            using (var db = new PropertyEntities())
            {
                dbItem = db.PropertyTags
                         .FirstOrDefault(x => x.Id == id);
            }

            PropertyTagDTO     dto    = PropertyTagRepository.MapFieldValues(dbItem);
            PropertyTagFactory myFact = new PropertyTagFactory();
            IPropertyTag       retVal = myFact.Create(dto);

            return(retVal);
        }
Ejemplo n.º 5
0
        internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
        {
            IItem item = parent as IItem;

            if (item != null)
            {
                CreateChildrenElements(elementFactory, item, rule, ruleIds);
            }
            else if (parent == rule)
            {
                CreateChildrenElements(elementFactory, rule, ruleIds);
            }
            IPropertyTag propertyTag = elementFactory.CreatePropertyTag(parent);

            propertyTag.NameValue(parent, null, _value);
            return(propertyTag);
        }