| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // XmlTextAttribute.cs:
- //
- // Author:
- // John Donagher ([email protected])
- //
- // (C) 2002 John Donagher
- //
- using System;
- namespace System.Xml.Serialization
- {
- /// <summary>
- /// Summary description for XmlTextAttribute.
- /// </summary>
- [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
- | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
- public class XmlTextAttribute : Attribute
- {
- private string dataType = "";
- private Type type;
- public XmlTextAttribute ()
- {
- }
- public XmlTextAttribute (Type type)
- {
- Type = type;
- }
-
- public string DataType {
- get {
- return dataType;
- }
- set {
- dataType = value;
- }
- }
- public Type Type
- {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- internal void AddKeyHash (System.Text.StringBuilder sb)
- {
- sb.Append ("XTXA ");
- KeyHelper.AddField (sb, 1, type);
- KeyHelper.AddField (sb, 2, dataType);
- sb.Append ('|');
- }
- }
- }
|