public EssenceItem(string value, string prof, TypeAttributeValue type)
        {
            value.ThrowIfEmptyOrNull("value");

            Value = EntityNormalizer.Normalize(value);
            Prof  = !prof.IsEmptyOrNull() ? EntityNormalizer.Normalize(prof) : null;
            Type  = type.IsLinguisticsCompability()
                                        ? type.ToString().ToEnum <EntityType>()
                                        : EntityType.Unknown;
        }
示例#2
0
        public static void SetAttributeTYPE(this XElement element, TypeAttributeValue type)
        {
            //if ( !element.IsElementU() )
            //if ( element.HasAttribute( Consts.TYPE_ATTRIBUTE ) )
            {
                if (type == TypeAttributeValue.Inquiry)
                {
                    if (!element.HasAttribute(Consts.TYPE_SAVED_ATTRIBUTE))
                    {
                        var typesaved = element.GetAttributeTYPE();
                        if (typesaved.HasValue && typesaved.Value.IsLinguisticsCompability())
                        {
                            element.SetAttributeTYPESAVED(typesaved.Value);
                        }
                    }
                }

                element.SetAttribute(Consts.TYPE_ATTRIBUTE, type.ToString());
            }
        }
示例#3
0
 public static bool HasTypeAttributeValue(this XElement element, TypeAttributeValue type)
 {
     return(element.HasAttributeWithValue(Consts.TYPE_ATTRIBUTE, type.ToString()));
 }
示例#4
0
 public static void SetAttributeTYPESAVED(this XElement element, TypeAttributeValue type)
 {
     element.SetAttribute(Consts.TYPE_SAVED_ATTRIBUTE, type.ToString());
 }