Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Coleman <tim@mono-cvs.ximian.com>2002-08-23 07:46:58 +0400
committerTim Coleman <tim@mono-cvs.ximian.com>2002-08-23 07:46:58 +0400
commite2f62c9a84a35f590e2e0c28bd3b145cdd922995 (patch)
treeda488355028acf4867041ec0959a217fae717c5f /mcs/class/System.XML
parent9a60dcf99b89b90f2dbd99d426265c11e52cae3e (diff)
*** empty log message ***
svn path=/trunk/mcs/; revision=6923
Diffstat (limited to 'mcs/class/System.XML')
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs96
1 files changed, 96 insertions, 0 deletions
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
index 6820772c659..c18fd559430 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
@@ -16,6 +16,54 @@ namespace System.Xml.Serialization {
#region Methods
+ [MonoTODO]
+ public static byte[] FromByteArrayBase64 (byte[] value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static string FromByteArrayHex (byte[] value)
+ {
+ StringBuilder output = new StringBuilder ();
+ foreach (byte val in value)
+ output.Append (val.ToString ("X2"));
+ return output.ToString ();
+ }
+
+ public static string FromChar (char value)
+ {
+ return ((int) value).ToString ();
+ }
+
+ public static string FromDate (DateTime value)
+ {
+ return XmlConvert.ToString (value, "HH':'mm':'ss'.'fffffffzzz");
+ }
+
+ public static string FromDateTime (DateTime value)
+ {
+ return XmlConvert.ToString (value, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffzzz");
+ }
+
+ public static string FromTime (DateTime value)
+ {
+ return XmlConvert.ToString (value, "yyyy'-'MM'-'dd");
+ }
+
+ public static string FromEnum (long value, string[] values, long[] ids)
+ {
+ int length = ids.Length;
+
+ for (int i = 0; i < length; i ++) {
+ if (ids[i] == value)
+ if (i >= values.Length)
+ return String.Empty;
+ else
+ return values[i].ToString ();
+ }
+ return value.ToString ();
+ }
+
public static string FromXmlName (string name)
{
return XmlConvert.EncodeName (name);
@@ -40,6 +88,54 @@ namespace System.Xml.Serialization {
return output.ToString ();
}
+ [MonoTODO]
+ public static char ToChar (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static DateTime ToDate (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static DateTime ToDateTime (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static DateTime ToTime (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string ToXmlName (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string ToXmlNCName (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string ToXmlNmToken (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string ToXmlNmTokens (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
#endregion // Methods
}
}