The Labs \ Source Viewer \ SSCLI \ System.Xml.Schema \ ValidationState

  1. //------------------------------------------------------------------------------
  2. // <copyright file="validationstate.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. // <owner current="true" primary="true">priyal</owner>
  15. //------------------------------------------------------------------------------
  16. namespace System.Xml.Schema
  17. {
  18.     using System;
  19.     using System.Collections;
  20.     using System.Collections.Generic;
  21.     using System.Runtime.InteropServices;
  22.    
  23.     [StructLayout(LayoutKind.Explicit)]
  24.     internal struct StateUnion
  25.     {
  26.         [FieldOffset(0)]
  27.         public int State;
  28.         //DFA
  29.         [FieldOffset(0)]
  30.         public int AllElementsRequired;
  31.         //AllContentValidator
  32.         [FieldOffset(0)]
  33.         public int CurPosIndex;
  34.         //NFAContentValidator
  35.         [FieldOffset(0)]
  36.         public int NumberOfRunningPos;
  37.         //RangeContentValidator
  38.     }
  39.    
  40.     internal sealed class ValidationState
  41.     {
  42.        
  43.         public bool IsNill;
  44.         public bool IsDefault;
  45.         public bool NeedValidateChildren;
  46.         // whether need to validate the children of this element
  47.         public bool CheckRequiredAttribute;
  48.         //PSVI
  49.         public bool ValidationSkipped;
  50.         public int Depth;
  51.         // The validation state
  52.         public XmlSchemaContentProcessing ProcessContents;
  53.         public XmlSchemaValidity Validity;
  54.         public SchemaElementDecl ElementDecl;
  55.         // ElementDecl
  56.         public SchemaElementDecl ElementDeclBeforeXsi;
  57.         //elementDecl before its changed by that of xsi:type's
  58.         public string LocalName;
  59.         public string Namespace;
  60.         public ConstraintStruct[] Constr;
  61.        
  62.         public StateUnion CurrentState;
  63.        
  64.         //For content model validation
  65.         public bool HasMatched;
  66.         // whether the element has been verified correctly
  67.         //For NFAs
  68.         public BitSet[] CurPos = new BitSet[2];
  69.        
  70.         //For all
  71.         public BitSet AllElementsSet;
  72.        
  73.         //For MinMaxNFA
  74.         public List<RangePositionInfo> RunningPositions;
  75.         public bool TooComplex;
  76.     }
  77.    
  78.    
  79.    
  80. }

Developer Fusion