/// <summary> /// Constructs a new instance <see cref="AttributeValue"/> based on the XML Name /// </summary> /// <param name="xmlname"> /// The XML name of the <see cref="AttributeValue"/> that is to be constructed /// </param> /// <param name="specElementWithAttributes"> /// The owning <see cref="SpecElementWithAttributes"/> object. /// </param> /// <returns> /// an instance of <see cref="AttributeValue"/> /// </returns> /// <exception cref="ArgumentException"> /// Thrown when an invalid <paramref name="xmlname"/> is provided /// </exception> internal static AttributeValue AttributeValueConstruct(string xmlname, SpecElementWithAttributes specElementWithAttributes) { switch (xmlname) { case "ATTRIBUTE-VALUE-BOOLEAN": return(new AttributeValueBoolean(specElementWithAttributes)); case "ATTRIBUTE-VALUE-DATE": return(new AttributeValueDate(specElementWithAttributes)); case "ATTRIBUTE-VALUE-ENUMERATION": return(new AttributeValueEnumeration(specElementWithAttributes)); case "ATTRIBUTE-VALUE-INTEGER": return(new AttributeValueInteger(specElementWithAttributes)); case "ATTRIBUTE-VALUE-REAL": return(new AttributeValueReal(specElementWithAttributes)); case "ATTRIBUTE-VALUE-STRING": return(new AttributeValueString(specElementWithAttributes)); case "ATTRIBUTE-VALUE-XHTML": return(new AttributeValueXHTML(specElementWithAttributes)); default: throw new ArgumentException(string.Format("{0} is not a vaild AttributeValue name", xmlname)); } }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueXHTML"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> /// <param name="loggerFactory"> /// The (injected) <see cref="ILoggerFactory"/> used to setup logging /// </param> internal AttributeValueXHTML(SpecElementWithAttributes specElAt, ILoggerFactory loggerFactory) : base(specElAt, loggerFactory) { this.logger = this.loggerFactory == null ? NullLogger <AttributeValueXHTML> .Instance : this.loggerFactory.CreateLogger <AttributeValueXHTML>(); this.ExternalObjects = new List <ExternalObject>(); }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValue"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> internal AttributeValue(SpecElementWithAttributes specElAt) { this.SpecElAt = specElAt; this.SpecElAt.Values.Add(this); this.ReqIFContent = this.SpecElAt.ReqIfContent; }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueXHTML"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> internal AttributeValueXHTML(SpecElementWithAttributes specElAt) : base(specElAt) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueInteger"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> internal AttributeValueInteger(SpecElementWithAttributes specElAt) : base(specElAt) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueDate"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> /// <param name="loggerFactory"> /// The (injected) <see cref="ILoggerFactory"/> used to setup logging /// </param> internal AttributeValueDate(SpecElementWithAttributes specElAt, ILoggerFactory loggerFactory) : base(specElAt, loggerFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValue"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> /// <param name="loggerFactory"> /// The (injected) <see cref="ILoggerFactory"/> used to setup logging /// </param> protected AttributeValue(SpecElementWithAttributes specElAt, ILoggerFactory loggerFactory) { this.SpecElAt = specElAt; this.SpecElAt.Values.Add(this); this.ReqIFContent = this.SpecElAt.ReqIFContent; }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueBoolean"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> internal AttributeValueBoolean(SpecElementWithAttributes specElAt) : base(specElAt) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueEnumeration"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> /// <param name="loggerFactory"> /// The (injected) <see cref="ILoggerFactory"/> used to setup logging /// </param> internal AttributeValueEnumeration(SpecElementWithAttributes specElAt, ILoggerFactory loggerFactory) : base(specElAt, loggerFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueString"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> internal AttributeValueString(SpecElementWithAttributes specElAt) : base(specElAt) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueEnumeration"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> internal AttributeValueEnumeration(SpecElementWithAttributes specElAt) : base(specElAt) { }
/// <summary> /// Initializes a new instance of the <see cref="AttributeValueSimple"/> class. /// </summary> /// <param name="specElAt"> /// The owning <see cref="SpecElementWithAttributes"/> /// </param> /// <param name="loggerFactory"> /// The (injected) <see cref="ILoggerFactory"/> used to setup logging /// </param> protected AttributeValueSimple(SpecElementWithAttributes specElAt, ILoggerFactory loggerFactory) : base(specElAt, loggerFactory) { }