Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaInfo.cs / 1 / XmlSchemaInfo.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System.Xml; using System.Collections; namespace System.Xml.Schema { ///public class XmlSchemaInfo : IXmlSchemaInfo { bool isDefault; bool isNil; XmlSchemaElement schemaElement; XmlSchemaAttribute schemaAttribute; XmlSchemaType schemaType; XmlSchemaSimpleType memberType; XmlSchemaValidity validity; XmlSchemaContentType contentType; public XmlSchemaInfo() { Clear(); } internal XmlSchemaInfo(XmlSchemaValidity validity) : this() { this.validity = validity; } public XmlSchemaValidity Validity { get { return validity; } set { validity = value; } } public bool IsDefault { get { return isDefault; } set { isDefault = value; } } public bool IsNil { get { return isNil; } set { isNil = value; } } public XmlSchemaSimpleType MemberType { get { return memberType; } set { memberType = value; } } public XmlSchemaType SchemaType { get { return schemaType; } set { schemaType = value; if (schemaType != null) { //Member type will not change its content type contentType = schemaType.SchemaContentType; } else { contentType = XmlSchemaContentType.Empty; } } } public XmlSchemaElement SchemaElement { get { return schemaElement; } set { schemaElement = value; if (value != null) { //Setting non-null SchemaElement means SchemaAttribute should be null schemaAttribute = null; } } } public XmlSchemaAttribute SchemaAttribute { get { return schemaAttribute; } set { schemaAttribute = value; if (value != null) { //Setting non-null SchemaAttribute means SchemaElement should be null schemaElement = null; } } } public XmlSchemaContentType ContentType { get { return contentType; } set { contentType = value; } } internal XmlSchemaType XmlType { get { if (memberType != null) { return memberType; } return schemaType; } } internal bool HasDefaultValue { get { return schemaElement != null && schemaElement.ElementDecl.DefaultValueTyped != null; } } internal bool IsUnionType { get { if (schemaType == null || schemaType.Datatype == null) { return false; } return schemaType.Datatype.Variety == XmlSchemaDatatypeVariety.Union; } } internal void Clear() { isNil = false; isDefault = false; schemaType = null; schemaElement = null; schemaAttribute = null; memberType = null; validity = XmlSchemaValidity.NotKnown; contentType = XmlSchemaContentType.Empty; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegexNode.cs
- BitmapSource.cs
- MappingItemCollection.cs
- VirtualDirectoryMappingCollection.cs
- DBProviderConfigurationHandler.cs
- WorkflowApplicationAbortedEventArgs.cs
- MarginsConverter.cs
- ListItem.cs
- ExpressionConverter.cs
- FixedSOMPageElement.cs
- ZipIOLocalFileBlock.cs
- PerformanceCounterLib.cs
- Attribute.cs
- TiffBitmapDecoder.cs
- InternalPolicyElement.cs
- UInt64.cs
- WindowsListViewGroupSubsetLink.cs
- CellParagraph.cs
- SystemFonts.cs
- FloatUtil.cs
- RetrieveVirtualItemEventArgs.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- WebBaseEventKeyComparer.cs
- IdentityReference.cs
- InstanceDataCollection.cs
- LinqDataSourceValidationException.cs
- SmiContextFactory.cs
- WebRequestModuleElementCollection.cs
- X509ServiceCertificateAuthenticationElement.cs
- DetailsViewModeEventArgs.cs
- UTF7Encoding.cs
- OracleBoolean.cs
- ProcessModelInfo.cs
- Quad.cs
- COAUTHINFO.cs
- DataTableExtensions.cs
- EventLogPermissionAttribute.cs
- AssemblyBuilderData.cs
- DataRowChangeEvent.cs
- XmlSchemaValidationException.cs
- CodeGotoStatement.cs
- HtmlTable.cs
- TakeQueryOptionExpression.cs
- XPathDocumentNavigator.cs
- ToolBar.cs
- Transform3DGroup.cs
- StringStorage.cs
- TextBox.cs
- XhtmlTextWriter.cs
- OrderedDictionaryStateHelper.cs
- AuthenticationConfig.cs
- DeferredReference.cs
- ScrollBar.cs
- Matrix.cs
- ExpressionBinding.cs
- ProjectionPathSegment.cs
- DataGridViewDataConnection.cs
- ImageAnimator.cs
- SqlDataAdapter.cs
- HostSecurityManager.cs
- PropertyGrid.cs
- MailSettingsSection.cs
- CursorInteropHelper.cs
- Vector3DKeyFrameCollection.cs
- ToolStripComboBox.cs
- ConditionalAttribute.cs
- BatchParser.cs
- OdbcCommand.cs
- COM2ExtendedBrowsingHandler.cs
- DataGridViewCellCollection.cs
- InputScopeNameConverter.cs
- StringDictionary.cs
- OracleString.cs
- AnalyzedTree.cs
- DummyDataSource.cs
- XPathNodeIterator.cs
- COM2ExtendedUITypeEditor.cs
- SerializerProvider.cs
- LinqDataSourceContextData.cs
- CaseInsensitiveComparer.cs
- Viewport3DAutomationPeer.cs
- DmlSqlGenerator.cs
- ImageMap.cs
- DesigntimeLicenseContext.cs
- LineSegment.cs
- FixedSOMContainer.cs
- DataProviderNameConverter.cs
- ToolStripSettings.cs
- SQLMoneyStorage.cs
- WebPartConnectionsCloseVerb.cs
- ConfigurationSettings.cs
- XMLUtil.cs
- Block.cs
- PrintingPermissionAttribute.cs
- DocumentXPathNavigator.cs
- LiteralTextContainerControlBuilder.cs
- DbCommandDefinition.cs
- DtdParser.cs
- MemberCollection.cs
- RoleExceptions.cs