/// <summary> /// Constructor that accepts values for all mandatory fields /// </summary> ///<param name="objectType">The Target Object name referenced.</param> ///<param name="value">Gets or sets the content value of the &lt;TargetObject&gt; element</param> /// public TargetObject(ObjectTypeTarget objectType, string value) : base(InstrDTD.TARGETOBJECT) { this.SetObjectType(objectType); this.Value = value; }
/// <summary> /// Sets the value of the <c>ObjectType</c> attribute. /// </summary> /// <param name="val">A ObjectTypeTarget object</param> /// <remarks> /// <para>The SIF specification defines the meaning of this attribute as: "The Target Object name referenced."</para> /// <para>Version: 2.6</para> /// <para>Since: 2.6</para> /// </remarks> public void SetObjectType(ObjectTypeTarget val) { SetField(InstrDTD.TARGETOBJECT_OBJECTTYPE, val); }
///<summary>Adds the value of the <c><TargetObject></c> element.</summary> /// <param name="ObjectType">The Target Object name referenced.</param> /// <param name="Value">Gets or sets the content value of the &lt;TargetObject&gt; element</param> ///<remarks> /// <para>This form of <c>setTargetObject</c> is provided as a convenience method /// that is functionally equivalent to the method <c>AddTargetObject</c></para> /// <para>Version: 2.6</para> /// <para>Since: 2.6</para> /// </remarks> public void AddTargetObject(ObjectTypeTarget ObjectType, string Value) { AddChild(InstrDTD.TARGETOBJECTS_TARGETOBJECT, new TargetObject(ObjectType, Value)); }
/// <summary> /// Removes a <see cref="TargetObject"/> object instance. More than one instance can be defined for this object because it is a repeatable field element. /// </summary> /// <param name="ObjectType">Identifies the TargetObject object to remove by its ObjectType value</param> /// <remarks> /// <para>Version: 2.6</para> /// <para>Since: 2.6</para> /// </remarks> public void RemoveTargetObject(ObjectTypeTarget ObjectType) { RemoveChild(InstrDTD.TARGETOBJECTS_TARGETOBJECT, new String[] { ObjectType.ToString() }); }
/// <summary> /// Gets a <see cref="TargetObject"/> object instance. More than one instance can be defined for this object because it is a repeatable field element. /// </summary> /// <param name="ObjectType">Identifies the TargetObject object to return by its "ObjectType" attribute value</param> /// <returns>A TargetObject object</returns> /// <remarks> /// <para>Version: 2.6</para> /// <para>Since: 2.6</para> /// </remarks> public TargetObject GetTargetObject(ObjectTypeTarget ObjectType) { return((TargetObject)GetChild(InstrDTD.TARGETOBJECTS_TARGETOBJECT, new string[] { ObjectType.ToString() })); }