771 references to XmlTypeCode
System.Data.SqlXml (394)
System\Xml\Xsl\IlGen\GenerateHelper.cs (24)
247
public static readonly MethodInfo ItemMatchesCode = GetMethod(typeof(XmlQueryRuntime), "MatchesXmlType", typeof(XPathItem), typeof(
XmlTypeCode
));
253
public static readonly MethodInfo SeqMatchesCode = GetMethod(typeof(XmlQueryRuntime), "MatchesXmlType", typeof(IList<XPathItem>), typeof(
XmlTypeCode
));
933
public void CallArithmeticOp(QilNodeType opType,
XmlTypeCode
code) {
937
case
XmlTypeCode
.Int:
938
case
XmlTypeCode
.Integer:
939
case
XmlTypeCode
.Double:
940
case
XmlTypeCode
.Float:
952
case
XmlTypeCode
.Decimal:
972
public void CallCompareEquals(
XmlTypeCode
code) {
976
case
XmlTypeCode
.String: meth = XmlILMethods.StrEq; break;
977
case
XmlTypeCode
.QName: meth = XmlILMethods.QNameEq; break;
978
case
XmlTypeCode
.Decimal: meth = XmlILMethods.DecEq; break;
987
public void CallCompare(
XmlTypeCode
code) {
991
case
XmlTypeCode
.String: meth = XmlILMethods.StrCmp; break;
992
case
XmlTypeCode
.Decimal: meth = XmlILMethods.DecCmp; break;
1330
case
XmlTypeCode
.String: meth = XmlILMethods.SortKeyString; break;
1331
case
XmlTypeCode
.Decimal: meth = XmlILMethods.SortKeyDecimal; break;
1332
case
XmlTypeCode
.Integer: meth = XmlILMethods.SortKeyInteger; break;
1333
case
XmlTypeCode
.Int: meth = XmlILMethods.SortKeyInt; break;
1334
case
XmlTypeCode
.Boolean: meth = XmlILMethods.SortKeyInt; break;
1335
case
XmlTypeCode
.Double: meth = XmlILMethods.SortKeyDouble; break;
1336
case
XmlTypeCode
.DateTime: meth = XmlILMethods.SortKeyDateTime; break;
1338
case
XmlTypeCode
.None:
1344
case
XmlTypeCode
.AnyAtomicType:
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (30)
243
this.helper.LoadInteger((int)
XmlTypeCode
.QName);
849
Debug.Assert(ndCond.Left.XmlType.TypeCode ==
XmlTypeCode
.Boolean);
1506
if (ndParsedTagName.Right.XmlType.TypeCode ==
XmlTypeCode
.String) {
1582
XmlTypeCode
code;
1608
case
XmlTypeCode
.String:
1609
case
XmlTypeCode
.Decimal:
1610
case
XmlTypeCode
.QName:
1619
Debug.Assert(code !=
XmlTypeCode
.QName, "QName values do not support the " + relOp + " operation");
1630
case
XmlTypeCode
.Integer:
1631
case
XmlTypeCode
.Int:
1632
case
XmlTypeCode
.Boolean:
1633
case
XmlTypeCode
.Double:
1683
ClrCompare(ndComp.NodeType == QilNodeType.Before ? QilNodeType.Lt : QilNodeType.Gt,
XmlTypeCode
.String);
2951
XmlTypeCode
codeBase;
2974
if ((object) typBase == (object) TypeFactory.Double) codeBase =
XmlTypeCode
.Double;
2975
else if ((object) typBase == (object) TypeFactory.String) codeBase =
XmlTypeCode
.String;
2976
else if ((object) typBase == (object) TypeFactory.Boolean) codeBase =
XmlTypeCode
.Boolean;
2977
else if ((object) typBase == (object) TypeFactory.Node) codeBase =
XmlTypeCode
.Node;
2978
else codeBase =
XmlTypeCode
.None;
2980
if (codeBase !=
XmlTypeCode
.None) {
3087
ClrCompare(allowKinds ? QilNodeType.Eq : QilNodeType.Ne,
XmlTypeCode
.Int);
3408
else if ((ndActualArg.XmlType.IsSingleton && clrTypeFormalArg == itemType) || ndActualArg.XmlType.TypeCode ==
XmlTypeCode
.None) {
3424
if (xmlTypeFormalArg.TypeCode ==
XmlTypeCode
.Item || !clrTypeFormalArg.IsAssignableFrom(clrTypeActualArg)) {
3811
Debug.Assert(ndName.XmlType.TypeCode ==
XmlTypeCode
.QName, "Element or attribute name must have QName type.");
3872
if ((ndName as QilBinary).Right.XmlType.TypeCode ==
XmlTypeCode
.String)
3922
ZeroCompare(relOp, ndSecond.XmlType.TypeCode ==
XmlTypeCode
.Boolean);
3976
private void ClrCompare(QilNodeType relOp,
XmlTypeCode
code) {
3984
if (code ==
XmlTypeCode
.Double || code ==
XmlTypeCode
.Float) {
4340
nd.XmlType.TypeCode ==
XmlTypeCode
.None,
System\Xml\Xsl\QIL\QilPatternFactory.cs (1)
223
Debug.Assert(arg.XmlType.TypeCode ==
XmlTypeCode
.Boolean && arg.XmlType.IsSingleton,
System\Xml\Xsl\QIL\QilTypeChecker.cs (2)
434
return node.Left.XmlType.TypeCode ==
XmlTypeCode
.None ? node.Right.XmlType : node.Left.XmlType;
958
if (body.XmlType.TypeCode ==
XmlTypeCode
.None)
System\Xml\Xsl\QIL\QilXmlReader.cs (2)
431
types[i] = XmlQueryTypeFactory.Type((
XmlTypeCode
)Enum.Parse(typeof(
XmlTypeCode
), codes[i]), strict);
System\Xml\Xsl\Runtime\XmlQueryContext.cs (6)
262
case
XmlTypeCode
.Boolean: objActualArgs[i] = XsltConvert.ToBoolean(args[i]); break;
263
case
XmlTypeCode
.Double: objActualArgs[i] = XsltConvert.ToDouble(args[i]); break;
264
case
XmlTypeCode
.String: objActualArgs[i] = XsltConvert.ToString(args[i]); break;
265
case
XmlTypeCode
.Node:
271
case
XmlTypeCode
.Item:
281
if (xmlTypeFormalArg.TypeCode ==
XmlTypeCode
.Item || !clrTypeFormalArg.IsAssignableFrom(objActualArgs[i].GetType()))
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (32)
472
case
XmlTypeCode
.String:
477
case
XmlTypeCode
.Double:
482
case
XmlTypeCode
.Node:
501
case
XmlTypeCode
.Item: {
555
case
XmlTypeCode
.String:
560
case
XmlTypeCode
.Double:
566
case
XmlTypeCode
.Node:
596
case
XmlTypeCode
.Item: {
602
case
XmlTypeCode
.Boolean:
603
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), value));
606
case
XmlTypeCode
.Double:
607
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), ((IConvertible) value).ToDouble(null)));
610
case
XmlTypeCode
.String:
612
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), XsltConvert.ToString((DateTime) value)));
614
value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), value));
617
case
XmlTypeCode
.Node:
622
case
XmlTypeCode
.Item:
696
public bool MatchesXmlType(IList<XPathItem> seq,
XmlTypeCode
code) {
706
public bool MatchesXmlType(XPathItem item,
XmlTypeCode
code) {
708
if (code >
XmlTypeCode
.AnyAtomicType)
713
case
XmlTypeCode
.AnyAtomicType: return !item.IsNode;
714
case
XmlTypeCode
.Node: return item.IsNode;
715
case
XmlTypeCode
.Item: return true;
721
case XPathNodeType.Root: return code ==
XmlTypeCode
.Document;
722
case XPathNodeType.Element: return code ==
XmlTypeCode
.Element;
723
case XPathNodeType.Attribute: return code ==
XmlTypeCode
.Attribute;
724
case XPathNodeType.Namespace: return code ==
XmlTypeCode
.Namespace;
725
case XPathNodeType.Text: return code ==
XmlTypeCode
.Text;
726
case XPathNodeType.SignificantWhitespace: return code ==
XmlTypeCode
.Text;
727
case XPathNodeType.Whitespace: return code ==
XmlTypeCode
.Text;
728
case XPathNodeType.ProcessingInstruction: return code ==
XmlTypeCode
.ProcessingInstruction;
729
case XPathNodeType.Comment: return code ==
XmlTypeCode
.Comment;
System\Xml\Xsl\Runtime\XsltConvert.cs (23)
266
case
XmlTypeCode
.Boolean:
268
case
XmlTypeCode
.Boolean:
269
case
XmlTypeCode
.Double:
270
case
XmlTypeCode
.String:
275
case
XmlTypeCode
.DateTime:
276
if (value.XmlType.TypeCode ==
XmlTypeCode
.String)
280
case
XmlTypeCode
.Decimal:
281
if (value.XmlType.TypeCode ==
XmlTypeCode
.Double)
285
case
XmlTypeCode
.Double:
287
case
XmlTypeCode
.Boolean:
288
case
XmlTypeCode
.Double:
289
case
XmlTypeCode
.String:
292
case
XmlTypeCode
.Decimal:
295
case
XmlTypeCode
.Int:
296
case
XmlTypeCode
.Long:
301
case
XmlTypeCode
.Int:
302
case
XmlTypeCode
.Long:
303
if (value.XmlType.TypeCode ==
XmlTypeCode
.Double)
307
case
XmlTypeCode
.String:
309
case
XmlTypeCode
.Boolean:
310
case
XmlTypeCode
.Double:
311
case
XmlTypeCode
.String:
314
case
XmlTypeCode
.DateTime:
System\Xml\Xsl\Runtime\XsltFunctions.cs (13)
190
case "version" : return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), 1.0);
191
case "vendor" : return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), "Microsoft");
192
case "vendor-url": return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), "http://www.microsoft.com");
196
return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), typeof(XsltLibrary).Assembly.ImageRuntimeVersion);
199
return new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), string.Empty);
430
case
XmlTypeCode
.DateTime:
434
case
XmlTypeCode
.Time:
437
case
XmlTypeCode
.Date:
440
case
XmlTypeCode
.GYearMonth:
444
case
XmlTypeCode
.GYear:
447
case
XmlTypeCode
.GMonthDay:
451
case
XmlTypeCode
.GDay:
454
case
XmlTypeCode
.GMonth:
System\Xml\Xsl\XmlQueryType.cs (64)
60
public abstract
XmlTypeCode
TypeCode { get; }
525
if (this.TypeCode ==
XmlTypeCode
.Node)
559
case
XmlTypeCode
.Document:
561
goto case
XmlTypeCode
.Element;
566
case
XmlTypeCode
.Element:
567
case
XmlTypeCode
.Attribute:
708
private static readonly
XmlTypeCode
[] BaseTypeCodes = {
709
/* None */
XmlTypeCode
.None,
710
/* Item */
XmlTypeCode
.Item,
711
/* Node */
XmlTypeCode
.Item,
712
/* Document */
XmlTypeCode
.Node,
713
/* Element */
XmlTypeCode
.Node,
714
/* Attribute */
XmlTypeCode
.Node,
715
/* Namespace */
XmlTypeCode
.Node,
716
/* ProcessingInstruction */
XmlTypeCode
.Node,
717
/* Comment */
XmlTypeCode
.Node,
718
/* Text */
XmlTypeCode
.Node,
719
/* AnyAtomicType */
XmlTypeCode
.Item,
720
/* UntypedAtomic */
XmlTypeCode
.AnyAtomicType,
721
/* String */
XmlTypeCode
.AnyAtomicType,
722
/* Boolean */
XmlTypeCode
.AnyAtomicType,
723
/* Decimal */
XmlTypeCode
.AnyAtomicType,
724
/* Float */
XmlTypeCode
.AnyAtomicType,
725
/* Double */
XmlTypeCode
.AnyAtomicType,
726
/* Duration */
XmlTypeCode
.AnyAtomicType,
727
/* DateTime */
XmlTypeCode
.AnyAtomicType,
728
/* Time */
XmlTypeCode
.AnyAtomicType,
729
/* Date */
XmlTypeCode
.AnyAtomicType,
730
/* GYearMonth */
XmlTypeCode
.AnyAtomicType,
731
/* GYear */
XmlTypeCode
.AnyAtomicType,
732
/* GMonthDay */
XmlTypeCode
.AnyAtomicType,
733
/* GDay */
XmlTypeCode
.AnyAtomicType,
734
/* GMonth */
XmlTypeCode
.AnyAtomicType,
735
/* HexBinary */
XmlTypeCode
.AnyAtomicType,
736
/* Base64Binary */
XmlTypeCode
.AnyAtomicType,
737
/* AnyUri */
XmlTypeCode
.AnyAtomicType,
738
/* QName */
XmlTypeCode
.AnyAtomicType,
739
/* Notation */
XmlTypeCode
.AnyAtomicType,
740
/* NormalizedString */
XmlTypeCode
.String,
741
/* Token */
XmlTypeCode
.NormalizedString,
742
/* Language */
XmlTypeCode
.Token,
743
/* NmToken */
XmlTypeCode
.Token,
744
/* Name */
XmlTypeCode
.Token,
745
/* NCName */
XmlTypeCode
.Name,
746
/* Id */
XmlTypeCode
.NCName,
747
/* Idref */
XmlTypeCode
.NCName,
748
/* Entity */
XmlTypeCode
.NCName,
749
/* Integer */
XmlTypeCode
.Decimal,
750
/* NonPositiveInteger */
XmlTypeCode
.Integer,
751
/* NegativeInteger */
XmlTypeCode
.NonPositiveInteger,
752
/* Long */
XmlTypeCode
.Integer,
753
/* Int */
XmlTypeCode
.Long,
754
/* Short */
XmlTypeCode
.Int,
755
/* Byte */
XmlTypeCode
.Short,
756
/* NonNegativeInteger */
XmlTypeCode
.Integer,
757
/* UnsignedLong */
XmlTypeCode
.NonNegativeInteger,
758
/* UnsignedInt */
XmlTypeCode
.UnsignedLong,
759
/* UnsignedShort */
XmlTypeCode
.UnsignedInt,
760
/* UnsignedByte */
XmlTypeCode
.UnsignedShort,
761
/* PositiveInteger */
XmlTypeCode
.NonNegativeInteger,
762
/* YearMonthDuration */
XmlTypeCode
.Duration,
763
/* DayTimeDuration */
XmlTypeCode
.Duration,
868
public bool this[
XmlTypeCode
index1,
XmlTypeCode
index2] {
System\Xml\Xsl\XmlQueryTypeFactory.cs (99)
34
public static XmlQueryType Type(
XmlTypeCode
code, bool isStrict) {
189
public static readonly XmlQueryType Item = TF.Type(
XmlTypeCode
.Item, false);
191
public static readonly XmlQueryType Node = TF.Type(
XmlTypeCode
.Node, false);
193
public static readonly XmlQueryType Element = TF.Type(
XmlTypeCode
.Element, false);
195
public static readonly XmlQueryType Document = TF.Type(
XmlTypeCode
.Document, false);
197
public static readonly XmlQueryType Attribute = TF.Type(
XmlTypeCode
.Attribute, false);
200
public static readonly XmlQueryType Namespace = TF.Type(
XmlTypeCode
.Namespace, false);
202
public static readonly XmlQueryType Text = TF.Type(
XmlTypeCode
.Text, false);
204
public static readonly XmlQueryType Comment = TF.Type(
XmlTypeCode
.Comment, false);
206
public static readonly XmlQueryType PI = TF.Type(
XmlTypeCode
.ProcessingInstruction, false);
217
public static readonly XmlQueryType AnyAtomicType = TF.Type(
XmlTypeCode
.AnyAtomicType, false);
219
public static readonly XmlQueryType String = TF.Type(
XmlTypeCode
.String, false);
220
public static readonly XmlQueryType StringX = TF.Type(
XmlTypeCode
.String, true);
222
public static readonly XmlQueryType Boolean = TF.Type(
XmlTypeCode
.Boolean, false);
223
public static readonly XmlQueryType BooleanX = TF.Type(
XmlTypeCode
.Boolean, true);
224
public static readonly XmlQueryType Int = TF.Type(
XmlTypeCode
.Int, false);
225
public static readonly XmlQueryType IntX = TF.Type(
XmlTypeCode
.Int, true);
227
public static readonly XmlQueryType IntegerX = TF.Type(
XmlTypeCode
.Integer, true);
228
public static readonly XmlQueryType LongX = TF.Type(
XmlTypeCode
.Long, true);
229
public static readonly XmlQueryType DecimalX = TF.Type(
XmlTypeCode
.Decimal, true);
230
public static readonly XmlQueryType FloatX = TF.Type(
XmlTypeCode
.Float, true);
231
public static readonly XmlQueryType Double = TF.Type(
XmlTypeCode
.Double, false);
232
public static readonly XmlQueryType DoubleX = TF.Type(
XmlTypeCode
.Double, true);
233
public static readonly XmlQueryType DateTimeX = TF.Type(
XmlTypeCode
.DateTime, true);
234
public static readonly XmlQueryType QNameX = TF.Type(
XmlTypeCode
.QName, true);
296
private static readonly
XmlTypeCode
[] NodeKindToTypeCode = {
297
/* XPathNodeType.Root */
XmlTypeCode
.Document,
298
/* XPathNodeType.Element */
XmlTypeCode
.Element,
299
/* XPathNodeType.Attribute */
XmlTypeCode
.Attribute,
300
/* XPathNodeType.Namespace */
XmlTypeCode
.Namespace,
301
/* XPathNodeType.Text */
XmlTypeCode
.Text,
302
/* XPathNodeType.SignificantWhitespace */
XmlTypeCode
.Text,
303
/* XPathNodeType.Whitespace */
XmlTypeCode
.Text,
304
/* XPathNodeType.ProcessingInstruction */
XmlTypeCode
.ProcessingInstruction,
305
/* XPathNodeType.Comment */
XmlTypeCode
.Comment,
306
/* XPathNodeType.All */
XmlTypeCode
.Node,
328
private
XmlTypeCode
code;
346
int typeCount = (int)
XmlTypeCode
.DayTimeDuration + 1;
352
XmlTypeCode
typeCode = (
XmlTypeCode
)i;
354
switch ((
XmlTypeCode
) i) {
355
case
XmlTypeCode
.None:
360
case
XmlTypeCode
.Item:
361
case
XmlTypeCode
.Node:
366
case
XmlTypeCode
.Document:
367
case
XmlTypeCode
.Element:
368
case
XmlTypeCode
.Namespace:
369
case
XmlTypeCode
.ProcessingInstruction:
370
case
XmlTypeCode
.Comment:
371
case
XmlTypeCode
.Text:
376
case
XmlTypeCode
.Attribute:
381
case
XmlTypeCode
.AnyAtomicType:
386
case
XmlTypeCode
.UntypedAtomic:
400
UntypedDocument = new ItemType(
XmlTypeCode
.Document, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.UntypedAnyType, false, false, true);
401
UntypedElement = new ItemType(
XmlTypeCode
.Element, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.UntypedAnyType, false, false, true);
402
UntypedAttribute = new ItemType(
XmlTypeCode
.Attribute, XmlQualifiedNameTest.Wildcard, DatatypeImplementation.UntypedAtomicType, false, false, true);
403
NodeNotRtf = new ItemType(
XmlTypeCode
.Node, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.AnyType, false, false, true);
411
public static XmlQueryType Create(
XmlTypeCode
code, bool isStrict) {
424
XmlTypeCode
code = schemaType.Datatype.TypeCode;
439
public static XmlQueryType Create(
XmlTypeCode
code, XmlQualifiedNameTest nameTest, XmlSchemaType contentType, bool isNillable) {
442
case
XmlTypeCode
.Document:
443
case
XmlTypeCode
.Element:
452
if (code ==
XmlTypeCode
.Element)
454
if (code ==
XmlTypeCode
.Document)
461
case
XmlTypeCode
.Attribute:
483
private ItemType(
XmlTypeCode
code, XmlQualifiedNameTest nameTest, XmlSchemaType schemaType, bool isNillable, bool isStrict, bool isNotRtf) {
496
case
XmlTypeCode
.Item: this.nodeKinds = XmlNodeKindFlags.Any; break;
497
case
XmlTypeCode
.Node: this.nodeKinds = XmlNodeKindFlags.Any; break;
498
case
XmlTypeCode
.Document: this.nodeKinds = XmlNodeKindFlags.Document; break;
499
case
XmlTypeCode
.Element: this.nodeKinds = XmlNodeKindFlags.Element; break;
500
case
XmlTypeCode
.Attribute: this.nodeKinds = XmlNodeKindFlags.Attribute; break;
501
case
XmlTypeCode
.Namespace: this.nodeKinds = XmlNodeKindFlags.Namespace; break;
502
case
XmlTypeCode
.ProcessingInstruction: this.nodeKinds = XmlNodeKindFlags.PI; break;
503
case
XmlTypeCode
.Comment: this.nodeKinds = XmlNodeKindFlags.Comment; break;
504
case
XmlTypeCode
.Text: this.nodeKinds = XmlNodeKindFlags.Text; break;
541
return Create((
XmlTypeCode
) code, /*isStrict:*/reader.ReadBoolean());
553
public override
XmlTypeCode
TypeCode {
671
private
XmlTypeCode
code;
723
if (this.code ==
XmlTypeCode
.None) {
732
if (this.code ==
XmlTypeCode
.Element)
734
else if (this.code ==
XmlTypeCode
.Attribute)
738
this.code =
XmlTypeCode
.Node;
744
this.code =
XmlTypeCode
.AnyAtomicType;
749
this.code =
XmlTypeCode
.Item;
758
private static readonly
XmlTypeCode
[] NodeKindToTypeCode = {
759
/* None */
XmlTypeCode
.None,
760
/* Document */
XmlTypeCode
.Document,
761
/* Element */
XmlTypeCode
.Element,
762
/* Attribute */
XmlTypeCode
.Attribute,
763
/* Text */
XmlTypeCode
.Text,
764
/* Comment */
XmlTypeCode
.Comment,
765
/* PI */
XmlTypeCode
.ProcessingInstruction,
766
/* Namespace */
XmlTypeCode
.Namespace,
802
public override
XmlTypeCode
TypeCode {
865
get { return TypeCode ==
XmlTypeCode
.None ? XmlQueryCardinality.None : XmlQueryCardinality.One; }
880
if (this.code ==
XmlTypeCode
.None || this.code ==
XmlTypeCode
.Item)
928
if (prime.TypeCode ==
XmlTypeCode
.None) {
991
public override
XmlTypeCode
TypeCode {
System\Xml\Xsl\XPath\XPathBuilder.cs (56)
130
QilNode CompareValues(XPathOperator op, QilNode left, QilNode right,
XmlTypeCode
compType) {
131
Debug.Assert(compType ==
XmlTypeCode
.Boolean || compType ==
XmlTypeCode
.Double || compType ==
XmlTypeCode
.String);
132
Debug.Assert(compType ==
XmlTypeCode
.Boolean || left.XmlType.IsSingleton && right.XmlType.IsSingleton, "Both comparison operands must be singletons");
149
QilNode CompareNodeSetAndValue(XPathOperator op, QilNode nodeset, QilNode val,
XmlTypeCode
compType) {
152
Debug.Assert(compType ==
XmlTypeCode
.Boolean || compType ==
XmlTypeCode
.Double || compType ==
XmlTypeCode
.String, "I don't know what to do with RTF here");
153
if (compType ==
XmlTypeCode
.Boolean || nodeset.XmlType.IsSingleton) {
172
QilNode CompareNodeSetAndNodeSet(XPathOperator op, QilNode left, QilNode right,
XmlTypeCode
compType) {
195
return CompareNodeSetAndNodeSet(op, left, right,
XmlTypeCode
.String);
201
XmlTypeCode
compType = (
202
leftType.TypeCode ==
XmlTypeCode
.Boolean || rightType.TypeCode ==
XmlTypeCode
.Boolean ?
XmlTypeCode
.Boolean :
203
leftType.TypeCode ==
XmlTypeCode
.Double || rightType.TypeCode ==
XmlTypeCode
.Double ?
XmlTypeCode
.Double :
204
/*default:*/
XmlTypeCode
.String
218
return CompareNodeSetAndNodeSet(op, left, right,
XmlTypeCode
.Double);
220
XmlTypeCode
compType = rightType.TypeCode ==
XmlTypeCode
.Boolean ?
XmlTypeCode
.Boolean :
XmlTypeCode
.Double;
223
XmlTypeCode
compType = leftType.TypeCode ==
XmlTypeCode
.Boolean ?
XmlTypeCode
.Boolean :
XmlTypeCode
.Double;
227
return CompareValues(op, left, right,
XmlTypeCode
.Double);
410
if (predicate.XmlType.TypeCode ==
XmlTypeCode
.Double) {
678
public static readonly
XmlTypeCode
[] argAny = {
XmlTypeCode
.Item};
679
public static readonly
XmlTypeCode
[] argNodeSet = {
XmlTypeCode
.Node};
680
public static readonly
XmlTypeCode
[] argBoolean = {
XmlTypeCode
.Boolean};
681
public static readonly
XmlTypeCode
[] argDouble = {
XmlTypeCode
.Double};
682
public static readonly
XmlTypeCode
[] argString = {
XmlTypeCode
.String};
683
public static readonly
XmlTypeCode
[] argString2 = {
XmlTypeCode
.String,
XmlTypeCode
.String};
684
public static readonly
XmlTypeCode
[] argString3 = {
XmlTypeCode
.String,
XmlTypeCode
.String,
XmlTypeCode
.String};
685
public static readonly
XmlTypeCode
[] argFnSubstr = {
XmlTypeCode
.String,
XmlTypeCode
.Double,
XmlTypeCode
.Double};
855
public
XmlTypeCode
[] argTypes;
859
public FunctionInfo(T id, int minArgs, int maxArgs,
XmlTypeCode
[] argTypes) {
900
args[i] = f.ConvertToType(
XmlTypeCode
.String, args[i]);
904
if (argTypes[i] ==
XmlTypeCode
.Node && f.CannotBeNodeSet(args[i])) {
System\Xml\Xsl\XPath\XPathQilFactory.cs (17)
41
Debug.Assert(result == (xt.TypeCode ==
XmlTypeCode
.Item || xt.TypeCode ==
XmlTypeCode
.AnyAtomicType), "What else can it be?");
161
public QilNode ConvertToType(
XmlTypeCode
requiredType, QilNode n) {
163
case
XmlTypeCode
.String : return ConvertToString(n);
164
case
XmlTypeCode
.Double : return ConvertToNumber(n);
165
case
XmlTypeCode
.Boolean : return ConvertToBoolean(n);
166
case
XmlTypeCode
.Node : return EnsureNodeSet(n);
167
case
XmlTypeCode
.Item : return n;
175
case
XmlTypeCode
.Boolean :
181
case
XmlTypeCode
.Double :
186
case
XmlTypeCode
.String :
201
case
XmlTypeCode
.Boolean :
203
case
XmlTypeCode
.Double :
210
case
XmlTypeCode
.String :
228
case
XmlTypeCode
.Boolean :
234
case
XmlTypeCode
.Double :
236
case
XmlTypeCode
.String :
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (18)
203
case
XmlTypeCode
.Boolean: args[i] = f.ConvertToBoolean(args[i]); break;
204
case
XmlTypeCode
.Double: args[i] = f.ConvertToNumber(args[i]); break;
205
case
XmlTypeCode
.String: args[i] = f.ConvertToString(args[i]); break;
206
case
XmlTypeCode
.Node: args[i] = xmlTypeFormalArg.IsSingleton ? f.ConvertToNode(args[i]) : f.ConvertToNodeSet(args[i]); break;
207
case
XmlTypeCode
.Item: break;
246
private static readonly
XmlTypeCode
[] argFnDocument = {
XmlTypeCode
.Item,
XmlTypeCode
.Node};
247
private static readonly
XmlTypeCode
[] argFnKey = {
XmlTypeCode
.String,
XmlTypeCode
.Item};
248
private static readonly
XmlTypeCode
[] argFnFormatNumber = {
XmlTypeCode
.Double,
XmlTypeCode
.String,
XmlTypeCode
.String};
611
case
XmlTypeCode
.Boolean : return f.String("boolean");
612
case
XmlTypeCode
.Double : return f.String("number");
613
case
XmlTypeCode
.String : return f.String("string");
System\Xml\Xsl\Xslt\QilStrConcatenator.cs (1)
57
Debug.Assert(value.XmlType.TypeCode ==
XmlTypeCode
.String);
System\Xml\Xsl\Xslt\XsltQilFactory.cs (6)
28
case
XmlTypeCode
.String:
29
case
XmlTypeCode
.Boolean:
30
case
XmlTypeCode
.Double:
33
case
XmlTypeCode
.Item:
34
case
XmlTypeCode
.None:
36
case
XmlTypeCode
.QName:
System.ServiceModel (1)
System\ServiceModel\Description\MessageContractExporter.cs (1)
199
contentRestriction.BaseTypeName = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Base64Binary).QualifiedName;
System.Xml (376)
System\Xml\BinaryXml\XmlBinaryReader.cs (26)
3721
XmlValueConverter GetValueConverter(
XmlTypeCode
typeCode) {
3733
value = GetValueConverter(
XmlTypeCode
.UntypedAtomic).ChangeType(
3739
value = GetValueConverter(
XmlTypeCode
.Boolean).ChangeType(
3745
value = GetValueConverter(
XmlTypeCode
.NonNegativeInteger).ChangeType(
3751
value = GetValueConverter(
XmlTypeCode
.UnsignedByte).ChangeType(
3758
value = GetValueConverter(
XmlTypeCode
.Short).ChangeType(
3764
value = GetValueConverter(
XmlTypeCode
.Int).ChangeType(
3770
value = GetValueConverter(
XmlTypeCode
.Long).ChangeType(
3775
value = GetValueConverter(
XmlTypeCode
.Byte).ChangeType(
3782
value = GetValueConverter(
XmlTypeCode
.UnsignedShort).ChangeType(
3788
value = GetValueConverter(
XmlTypeCode
.UnsignedInt).ChangeType(
3794
value = GetValueConverter(
XmlTypeCode
.UnsignedLong).ChangeType(
3800
value = GetValueConverter(
XmlTypeCode
.Float).ChangeType(
3806
value = GetValueConverter(
XmlTypeCode
.Double).ChangeType(
3811
value = GetValueConverter(
XmlTypeCode
.String).ChangeType(
3816
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
3822
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
3830
value = GetValueConverter(
XmlTypeCode
.Decimal).ChangeType(
3841
value = GetValueConverter(
XmlTypeCode
.UntypedAtomic).ChangeType(
3855
value = GetValueConverter(token == BinXmlToken.XSD_BINHEX ?
XmlTypeCode
.HexBinary :
XmlTypeCode
.Base64Binary).ChangeType(
3866
value = GetValueConverter(
XmlTypeCode
.DateTime).ChangeType(
3874
value = GetValueConverter(
XmlTypeCode
.DateTime).ChangeType(
3880
value = GetValueConverter(
XmlTypeCode
.Time).ChangeType(
3886
value = GetValueConverter(
XmlTypeCode
.Date).ChangeType(
3896
value = GetValueConverter(
XmlTypeCode
.QName).ChangeType(
System\Xml\Schema\ConstraintStruct.cs (14)
236
case
XmlTypeCode
.Byte:
237
case
XmlTypeCode
.UnsignedByte:
238
case
XmlTypeCode
.Short:
239
case
XmlTypeCode
.UnsignedShort:
240
case
XmlTypeCode
.Int:
241
case
XmlTypeCode
.UnsignedInt:
242
case
XmlTypeCode
.Long:
243
case
XmlTypeCode
.UnsignedLong:
244
case
XmlTypeCode
.Decimal:
245
case
XmlTypeCode
.Integer:
246
case
XmlTypeCode
.PositiveInteger:
247
case
XmlTypeCode
.NonNegativeInteger:
248
case
XmlTypeCode
.NegativeInteger:
249
case
XmlTypeCode
.NonPositiveInteger:
System\Xml\Schema\DataTypeImplementation.cs (121)
101
private static XmlSchemaSimpleType[] enumToTypeCode = new XmlSchemaSimpleType[(int)
XmlTypeCode
.DayTimeDuration + 1];
194
case
XmlTypeCode
.NmToken:
195
listContent.ItemType = listContent.BaseItemType = enumToTypeCode[(int)
XmlTypeCode
.NmToken];
198
case
XmlTypeCode
.Entity:
199
listContent.ItemType = listContent.BaseItemType = enumToTypeCode[(int)
XmlTypeCode
.Entity];
202
case
XmlTypeCode
.Idref:
203
listContent.ItemType = listContent.BaseItemType = enumToTypeCode[(int)
XmlTypeCode
.Idref];
264
enumToTypeCode[(int)
XmlTypeCode
.AnyAtomicType] = anyAtomicType;
272
enumToTypeCode[(int)
XmlTypeCode
.UntypedAtomic] = untypedAtomicType;
278
FinishBuiltinType(yearMonthDurationType, enumToTypeCode[(int)
XmlTypeCode
.Duration]);
280
enumToTypeCode[(int)
XmlTypeCode
.YearMonthDuration] = yearMonthDurationType;
286
FinishBuiltinType(dayTimeDurationType, enumToTypeCode[(int)
XmlTypeCode
.Duration]);
288
enumToTypeCode[(int)
XmlTypeCode
.DayTimeDuration] = dayTimeDurationType;
291
internal static XmlSchemaSimpleType GetSimpleTypeFromTypeCode(
XmlTypeCode
typeCode) {
301
XmlSchemaSimpleType correctType = GetSimpleTypeFromTypeCode(
XmlTypeCode
.NormalizedString);
313
XmlSchemaSimpleType correctType = GetSimpleTypeFromTypeCode(
XmlTypeCode
.Token);
327
internal static
XmlTypeCode
GetPrimitiveTypeCode(
XmlTypeCode
typeCode) {
405
XmlTypeCode
thisCode = this.TypeCode;
406
XmlTypeCode
otherCode = dtype.TypeCode;
439
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.None; } }
913
public override
XmlTypeCode
TypeCode {
1075
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; }}
1212
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; }}
1239
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyAtomicType; } }
1249
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UntypedAtomic; } }
1286
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.String; }}
1350
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Boolean; }}
1424
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Float; }}
1507
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Double; }}
1593
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Decimal; }}
1679
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Duration; }}
1764
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.YearMonthDuration; } }
1801
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.DayTimeDuration; } }
1816
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.DateTime; }}
1960
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Time; }}
1992
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Date; }}
2024
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GYearMonth; }}
2057
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GYear; }}
2089
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GMonthDay; }}
2121
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GDay; }}
2154
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.GMonth; }}
2194
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.HexBinary; }}
2286
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Base64Binary; }}
2377
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.AnyUri; }}
2465
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.QName; }}
2537
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NormalizedString; }}
2549
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NormalizedString; }}
2569
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Token; }}
2574
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Token; }}
2599
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Language; }}
2622
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NmToken; }}
2646
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Name; }}
2669
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NCName; }}
2703
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Id; }}
2719
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Idref; }}
2735
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Entity; }}
2782
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Notation; }}
2872
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Integer; }}
2914
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NonPositiveInteger; }}
2940
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NegativeInteger; }}
2973
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Long; }}
3026
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Int; }}
3080
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Short; }}
3133
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.Byte; }}
3183
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.NonNegativeInteger; }}
3215
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedLong; }}
3268
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedInt; }}
3321
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedShort; }}
3373
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.UnsignedByte; }}
3423
public override
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.PositiveInteger; }}
System\Xml\Schema\FacetChecker.cs (16)
36
XmlTypeCode
builtInEnum;
51
nonNegativeInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.NonNegativeInteger).Datatype;
257
XmlSchemaDatatype positiveInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.PositiveInteger).Datatype;
278
if ((derivedRestriction.FractionDigits != 0) && (datatype.TypeCode !=
XmlTypeCode
.Decimal)) {
1166
if (datatype.TypeCode ==
XmlTypeCode
.AnyUri) {
1183
private Exception CheckBuiltInFacets(string s,
XmlTypeCode
typeCode, bool verifyUri) {
1188
case
XmlTypeCode
.AnyUri:
1195
case
XmlTypeCode
.NormalizedString:
1199
case
XmlTypeCode
.Token:
1203
case
XmlTypeCode
.Language:
1212
case
XmlTypeCode
.NmToken:
1216
case
XmlTypeCode
.Name:
1220
case
XmlTypeCode
.NCName:
1221
case
XmlTypeCode
.Id:
1222
case
XmlTypeCode
.Idref:
1223
case
XmlTypeCode
.Entity:
System\Xml\Schema\Preprocessor.cs (1)
478
XmlSchemaDatatype tokenDt = DatatypeImplementation.GetSimpleTypeFromTypeCode(
XmlTypeCode
.Token).Datatype;
System\Xml\Schema\SchemaCollectionCompiler.cs (2)
2155
if (type.TypeCode ==
XmlTypeCode
.NormalizedString) {
2158
else if (type.TypeCode ==
XmlTypeCode
.Token) {
System\Xml\Schema\SchemaInfo.cs (1)
208
if (attdef.Datatype.TypeCode ==
XmlTypeCode
.Id) { //anyAttribute match whose type is ID
System\Xml\Schema\SchemaSetCompiler.cs (2)
2065
if (decl.Datatype.TypeCode ==
XmlTypeCode
.Id) {
2238
if (decl.Datatype.TypeCode ==
XmlTypeCode
.Id) {
System\Xml\Schema\XmlAtomicValue.cs (4)
116
if (nsResolver != null && (this.xmlType.TypeCode ==
XmlTypeCode
.QName || this.xmlType.TypeCode ==
XmlTypeCode
.Notation) ) {
135
if (nsResolver != null && (this.xmlType.TypeCode ==
XmlTypeCode
.QName || this.xmlType.TypeCode ==
XmlTypeCode
.Notation) ) { //Its a qualifiedName
System\Xml\Schema\XmlSchemaComplexType.cs (1)
342
if (datatype != null && datatype.TypeCode ==
XmlTypeCode
.Id) {
System\Xml\Schema\XmlSchemaDataType.cs (50)
83
public virtual
XmlTypeCode
TypeCode { get { return
XmlTypeCode
.None; } }
129
XmlTypeCode
typeCode = this.TypeCode;
132
if (typeCode ==
XmlTypeCode
.AnyAtomicType) { //List of union
145
if (typeCode ==
XmlTypeCode
.AnyAtomicType) {
157
internal string TypeCodeToString(
XmlTypeCode
typeCode) {
159
case
XmlTypeCode
.None:
161
case
XmlTypeCode
.Item:
163
case
XmlTypeCode
.AnyAtomicType:
165
case
XmlTypeCode
.String:
167
case
XmlTypeCode
.Boolean:
169
case
XmlTypeCode
.Decimal:
171
case
XmlTypeCode
.Float:
173
case
XmlTypeCode
.Double:
175
case
XmlTypeCode
.Duration:
177
case
XmlTypeCode
.DateTime:
179
case
XmlTypeCode
.Time:
181
case
XmlTypeCode
.Date:
183
case
XmlTypeCode
.GYearMonth:
185
case
XmlTypeCode
.GYear:
187
case
XmlTypeCode
.GMonthDay:
189
case
XmlTypeCode
.GDay:
191
case
XmlTypeCode
.GMonth:
193
case
XmlTypeCode
.HexBinary:
195
case
XmlTypeCode
.Base64Binary:
197
case
XmlTypeCode
.AnyUri:
199
case
XmlTypeCode
.QName:
201
case
XmlTypeCode
.Notation:
203
case
XmlTypeCode
.NormalizedString:
205
case
XmlTypeCode
.Token:
207
case
XmlTypeCode
.Language:
209
case
XmlTypeCode
.NmToken:
211
case
XmlTypeCode
.Name:
213
case
XmlTypeCode
.NCName:
215
case
XmlTypeCode
.Id:
217
case
XmlTypeCode
.Idref:
219
case
XmlTypeCode
.Entity:
221
case
XmlTypeCode
.Integer:
223
case
XmlTypeCode
.NonPositiveInteger:
225
case
XmlTypeCode
.NegativeInteger:
227
case
XmlTypeCode
.Long:
229
case
XmlTypeCode
.Int:
231
case
XmlTypeCode
.Short:
233
case
XmlTypeCode
.Byte:
235
case
XmlTypeCode
.NonNegativeInteger:
237
case
XmlTypeCode
.UnsignedLong:
239
case
XmlTypeCode
.UnsignedInt:
241
case
XmlTypeCode
.UnsignedShort:
243
case
XmlTypeCode
.UnsignedByte:
245
case
XmlTypeCode
.PositiveInteger:
System\Xml\Schema\XmlSchemaType.cs (6)
48
public static XmlSchemaSimpleType GetBuiltInSimpleType(
XmlTypeCode
typeCode) {
56
public static XmlSchemaComplexType GetBuiltInComplexType(
XmlTypeCode
typeCode) {
57
if (typeCode ==
XmlTypeCode
.Item) {
174
public
XmlTypeCode
TypeCode {
177
return
XmlTypeCode
.Item;
180
return
XmlTypeCode
.None;
System\Xml\Schema\XmlSchemaValidator.cs (4)
2073
tempXsiTypeSO.SetAttributeType(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.QName));
2080
tempxsiNilSO.SetAttributeType(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean));
2084
XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String);
2092
XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String);
System\Xml\Schema\XmlValueConverter.cs (118)
275
private
XmlTypeCode
typeCode;
297
protected XmlBaseConverter(
XmlTypeCode
typeCode) {
299
case
XmlTypeCode
.Item:
303
case
XmlTypeCode
.Node:
307
case
XmlTypeCode
.AnyAtomicType:
488
protected
XmlTypeCode
TypeCode {
509
if (this.typeCode ==
XmlTypeCode
.Node) return "node";
510
if (this.typeCode ==
XmlTypeCode
.AnyAtomicType) return "xdt:anyAtomicType";
512
Debug.Assert(this.typeCode ==
XmlTypeCode
.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType");
921
if (TypeCode ==
XmlTypeCode
.Decimal) return XmlConvert.ToDecimal((string) value);
962
if (TypeCode ==
XmlTypeCode
.Decimal) return DecimalToInt32(XmlConvert.ToDecimal((string) value));
996
if (TypeCode ==
XmlTypeCode
.Decimal) return DecimalToInt64(XmlConvert.ToDecimal((string) value));
1026
if (TypeCode ==
XmlTypeCode
.Decimal) return XmlConvert.ToString((decimal) value);
1231
if (TypeCode ==
XmlTypeCode
.Float) return ((double) XmlConvert.ToSingle((string) value));
1275
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToSingle((string) value);
1297
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToString(ToSingle((double) value));
1301
if (TypeCode ==
XmlTypeCode
.Float) return XmlConvert.ToString((float) value);
1428
case
XmlTypeCode
.Date: return StringToDate((string) value);
1429
case
XmlTypeCode
.Time: return StringToTime((string) value);
1430
case
XmlTypeCode
.GDay: return StringToGDay((string) value);
1431
case
XmlTypeCode
.GMonth: return StringToGMonth((string) value);
1432
case
XmlTypeCode
.GMonthDay: return StringToGMonthDay((string) value);
1433
case
XmlTypeCode
.GYear: return StringToGYear((string) value);
1434
case
XmlTypeCode
.GYearMonth: return StringToGYearMonth((string) value);
1467
case
XmlTypeCode
.Date: return StringToDateOffset((string) value);
1468
case
XmlTypeCode
.Time: return StringToTimeOffset((string) value);
1469
case
XmlTypeCode
.GDay: return StringToGDayOffset((string) value);
1470
case
XmlTypeCode
.GMonth: return StringToGMonthOffset((string) value);
1471
case
XmlTypeCode
.GMonthDay: return StringToGMonthDayOffset((string) value);
1472
case
XmlTypeCode
.GYear: return StringToGYearOffset((string) value);
1473
case
XmlTypeCode
.GYearMonth: return StringToGYearMonthOffset((string) value);
1532
case
XmlTypeCode
.Date: return DateToString((DateTime) value);
1533
case
XmlTypeCode
.Time: return TimeToString((DateTime) value);
1534
case
XmlTypeCode
.GDay: return GDayToString((DateTime) value);
1535
case
XmlTypeCode
.GMonth: return GMonthToString((DateTime) value);
1536
case
XmlTypeCode
.GMonthDay: return GMonthDayToString((DateTime) value);
1537
case
XmlTypeCode
.GYear: return GYearToString((DateTime) value);
1538
case
XmlTypeCode
.GYearMonth: return GYearMonthToString((DateTime) value);
1545
case
XmlTypeCode
.Date: return DateOffsetToString((DateTimeOffset) value);
1546
case
XmlTypeCode
.Time: return TimeOffsetToString((DateTimeOffset) value);
1547
case
XmlTypeCode
.GDay: return GDayOffsetToString((DateTimeOffset) value);
1548
case
XmlTypeCode
.GMonth: return GMonthOffsetToString((DateTimeOffset) value);
1549
case
XmlTypeCode
.GMonthDay: return GMonthDayOffsetToString((DateTimeOffset) value);
1550
case
XmlTypeCode
.GYear: return GYearOffsetToString((DateTimeOffset) value);
1551
case
XmlTypeCode
.GYearMonth: return GYearMonthOffsetToString((DateTimeOffset) value);
1878
case
XmlTypeCode
.Base64Binary: return Base64BinaryToString((byte[]) value);
1879
case
XmlTypeCode
.HexBinary: return XmlConvert.ToBinHexString((byte[]) value);
1883
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return AnyUriToString((Uri) value);
1886
case
XmlTypeCode
.DayTimeDuration: return DayTimeDurationToString((TimeSpan) value);
1887
case
XmlTypeCode
.Duration: return DurationToString((TimeSpan) value);
1888
case
XmlTypeCode
.YearMonthDuration: return YearMonthDurationToString((TimeSpan) value);
1893
case
XmlTypeCode
.Notation: return QNameToString((XmlQualifiedName) value, nsResolver);
1894
case
XmlTypeCode
.QName: return QNameToString((XmlQualifiedName) value, nsResolver);
1913
case
XmlTypeCode
.Base64Binary: return StringToBase64Binary((string) value);
1914
case
XmlTypeCode
.HexBinary: return StringToHexBinary((string) value);
1919
case
XmlTypeCode
.Notation: return StringToQName((string) value, nsResolver);
1920
case
XmlTypeCode
.QName: return StringToQName((string) value, nsResolver);
1926
case
XmlTypeCode
.DayTimeDuration: return StringToDayTimeDuration((string) value);
1927
case
XmlTypeCode
.Duration: return StringToDuration((string) value);
1928
case
XmlTypeCode
.YearMonthDuration: return StringToYearMonthDuration((string) value);
1931
if (destinationType == UriType) if (TypeCode ==
XmlTypeCode
.AnyUri) return XmlConvert.ToUri((string) value);
1947
case
XmlTypeCode
.Base64Binary: return ((byte[]) value);
1948
case
XmlTypeCode
.HexBinary: return ((byte[]) value);
1953
case
XmlTypeCode
.Base64Binary: return StringToBase64Binary((string) value);
1954
case
XmlTypeCode
.HexBinary: return StringToHexBinary((string) value);
1961
case
XmlTypeCode
.Notation: return StringToQName((string) value, nsResolver);
1962
case
XmlTypeCode
.QName: return StringToQName((string) value, nsResolver);
1967
case
XmlTypeCode
.Notation: return ((XmlQualifiedName) value);
1968
case
XmlTypeCode
.QName: return ((XmlQualifiedName) value);
1976
case
XmlTypeCode
.DayTimeDuration: return StringToDayTimeDuration((string) value);
1977
case
XmlTypeCode
.Duration: return StringToDuration((string) value);
1978
case
XmlTypeCode
.YearMonthDuration: return StringToYearMonthDuration((string) value);
1983
case
XmlTypeCode
.DayTimeDuration: return ((TimeSpan) value);
1984
case
XmlTypeCode
.Duration: return ((TimeSpan) value);
1985
case
XmlTypeCode
.YearMonthDuration: return ((TimeSpan) value);
1990
if (sourceType == StringType) if (TypeCode ==
XmlTypeCode
.AnyUri) return XmlConvert.ToUri((string) value);
1991
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return ((Uri) value);
1996
case
XmlTypeCode
.Base64Binary: return (new XmlAtomicValue(SchemaType, value));
1997
case
XmlTypeCode
.HexBinary: return (new XmlAtomicValue(SchemaType, value));
2003
case
XmlTypeCode
.DayTimeDuration: return (new XmlAtomicValue(SchemaType, value));
2004
case
XmlTypeCode
.Duration: return (new XmlAtomicValue(SchemaType, value));
2005
case
XmlTypeCode
.YearMonthDuration: return (new XmlAtomicValue(SchemaType, value));
2008
if (IsDerivedFrom(sourceType, UriType)) if (TypeCode ==
XmlTypeCode
.AnyUri) return (new XmlAtomicValue(SchemaType, value));
2012
case
XmlTypeCode
.Notation: return (new XmlAtomicValue(SchemaType, value, nsResolver));
2013
case
XmlTypeCode
.QName: return (new XmlAtomicValue(SchemaType, value, nsResolver));
2653
protected XmlNodeConverter() : base(
XmlTypeCode
.Node) {
2740
protected XmlAnyConverter(
XmlTypeCode
typeCode) : base(typeCode) {
2743
public static readonly XmlValueConverter Item = new XmlAnyConverter(
XmlTypeCode
.Item);
2744
public static readonly XmlValueConverter AnyAtomic = new XmlAnyConverter(
XmlTypeCode
.AnyAtomicType);
2882
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), (bool) value));
2891
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTime) value));
2900
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTimeOffset) value));
2909
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Decimal), value));
2918
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), (double) value));
2927
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Int), (int) value));
2936
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Long), (long) value));
2945
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Float), value));
2955
if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), (string) value));
2993
if (sourceType == BooleanType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Boolean), (bool) value));
2994
if (sourceType == ByteType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedByte), value));
2995
if (sourceType == ByteArrayType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Base64Binary), value));
2996
if (sourceType == DateTimeType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTime) value));
2997
if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.DateTime), (DateTimeOffset) value));
2998
if (sourceType == DecimalType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Decimal), value));
2999
if (sourceType == DoubleType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Double), (double) value));
3000
if (sourceType == Int16Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Short), value));
3001
if (sourceType == Int32Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Int), (int) value));
3002
if (sourceType == Int64Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Long), (long) value));
3003
if (sourceType == SByteType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Byte), value));
3004
if (sourceType == SingleType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Float), value));
3005
if (sourceType == StringType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.String), (string) value));
3006
if (sourceType == TimeSpanType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.Duration), value));
3007
if (sourceType == UInt16Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedShort), value));
3008
if (sourceType == UInt32Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedInt), value));
3009
if (sourceType == UInt64Type) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.UnsignedLong), value));
3010
if (IsDerivedFrom(sourceType, UriType)) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.AnyUri), value));
3011
if (IsDerivedFrom(sourceType, XmlQualifiedNameType)) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(
XmlTypeCode
.QName), value, nsResolver));
3049
if (TypeCode !=
XmlTypeCode
.Item)
System\Xml\Schema\XsdDateTime.cs (10)
239
public
XmlTypeCode
TypeCode {
661
private static readonly
XmlTypeCode
[] typeCodes = {
662
XmlTypeCode
.DateTime,
663
XmlTypeCode
.Time,
664
XmlTypeCode
.Date,
665
XmlTypeCode
.GYearMonth,
666
XmlTypeCode
.GYear,
667
XmlTypeCode
.GMonthDay,
668
XmlTypeCode
.GDay,
669
XmlTypeCode
.GMonth