/// <summary> /// Initializes a new instance of the <see cref="TestAttribute"/> class to store attribute information. /// </summary> /// <param name="name">The name of the attribute.</param> /// <param name="value">The value of the attribute.</param> public TestAttribute(IExtensionNameInfo name, string value) { this.LocalName = name.LocalName; this.Namespace = name.Namespace; this.Prefix = name.Prefix; this.Value = value; }
/// <summary> /// Creates an extension member that stores the element data that can later be stored in an extension. /// </summary> /// <param name="nameInfo">The name of the element.</param> /// <returns>An extension member that stores the element data.</returns> public XliffElement CreateElement(IExtensionNameInfo nameInfo) { XliffElement result; result = null; if ((nameInfo.Namespace == this.ns) && (nameInfo.LocalName == "element1")) { result = new CustomElement1(this.prefix, this.ns); ((CustomElement1)result).Initialize(); } else if ((nameInfo.Namespace == this.ns) && (nameInfo.LocalName == "element2")) { result = new CustomElement2(this.prefix, this.ns); ((CustomElement2)result).Initialize(); } else { result = new GenericElement(); } return(result); }
/// <summary> /// Creates an extension member that stores the element data that can later be stored in an extension. /// </summary> /// <param name="nameInfo">The name of the element.</param> /// <returns>An extension member that stores the element data.</returns> public XliffElement CreateElement(IExtensionNameInfo nameInfo) { return new TestElement(); }
/// <summary> /// Creates an extension member that stores the attribute data that can later be stored in an extension. /// </summary> /// <param name="nameInfo">The name of the attribute.</param> /// <param name="value">The value of the attribute.</param> /// <returns>An extension member that stores the attribute data.</returns> public IExtensionAttribute CreateAttribute(IExtensionNameInfo nameInfo, string value) { return new TestAttribute(nameInfo, value); }
/// <summary> /// Creates an extension member that stores the element data that can later be stored in an extension. /// </summary> /// <param name="nameInfo">The name of the element.</param> /// <returns>An extension member that stores the element data.</returns> public XliffElement CreateElement(IExtensionNameInfo nameInfo) { return(new GenericElement()); }
/// <summary> /// Creates an extension member that stores the attribute data that can later be stored in an extension. /// </summary> /// <param name="nameInfo">The name of the attribute.</param> /// <param name="value">The value of the attribute.</param> /// <returns>An extension member that stores the attribute data.</returns> public IExtensionAttribute CreateAttribute(IExtensionNameInfo nameInfo, string value) { return(new GenericExtensionAttribute(nameInfo, value)); }
/// <summary> /// Initializes a new instance of the <see cref="GenericExtensionAttribute"/> class to store attribute information. /// </summary> /// <param name="name">The name of the attribute.</param> /// <param name="value">The value of the attribute.</param> public GenericExtensionAttribute(IExtensionNameInfo name, string value) : base(name) { this.Value = value; }
/// <summary> /// Initializes a new instance of the <see cref="ExtensionNameInfo"/> class. /// </summary> /// <param name="name">The name that identifies the member.</param> public ExtensionNameInfo(IExtensionNameInfo name) { this.LocalName = name.LocalName; this.Namespace = name.Namespace; this.Prefix = name.Prefix; }