Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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
- ManagementDateTime.cs
- HtmlCalendarAdapter.cs
- FileUtil.cs
- ResourceDescriptionAttribute.cs
- ChannelFactory.cs
- DataGridAddNewRow.cs
- SelectionRangeConverter.cs
- GroupLabel.cs
- Gdiplus.cs
- XmlMtomReader.cs
- CLRBindingWorker.cs
- XmlDeclaration.cs
- SecureConversationSecurityTokenParameters.cs
- WebHttpBehavior.cs
- SQLBinaryStorage.cs
- FormatSettings.cs
- DataColumn.cs
- ResourceReferenceExpression.cs
- WindowHideOrCloseTracker.cs
- XamlVector3DCollectionSerializer.cs
- WebPartVerbsEventArgs.cs
- IsolatedStorageFileStream.cs
- StorageBasedPackageProperties.cs
- SQLSingleStorage.cs
- Stream.cs
- ContentOperations.cs
- NativeCompoundFileAPIs.cs
- ProxyBuilder.cs
- ZipIOFileItemStream.cs
- FormClosedEvent.cs
- ImageDrawing.cs
- List.cs
- _Rfc2616CacheValidators.cs
- DecimalConstantAttribute.cs
- SystemWebCachingSectionGroup.cs
- ConfigPathUtility.cs
- XmlSerializationReader.cs
- DesignerActionKeyboardBehavior.cs
- AdRotatorDesigner.cs
- TextTreeUndo.cs
- DataServiceQueryOfT.cs
- CodeExpressionCollection.cs
- TypeGeneratedEventArgs.cs
- VBIdentifierTrimConverter.cs
- QilTernary.cs
- __Filters.cs
- IItemContainerGenerator.cs
- XmlDownloadManager.cs
- CryptoHelper.cs
- PolicyStatement.cs
- ToolStripItem.cs
- MetadataWorkspace.cs
- ISAPIWorkerRequest.cs
- DependencyPropertyValueSerializer.cs
- Assembly.cs
- DynamicResourceExtensionConverter.cs
- RandomNumberGenerator.cs
- RequestUriProcessor.cs
- SqlCacheDependencySection.cs
- SafeMILHandle.cs
- ContextMarshalException.cs
- HttpListenerContext.cs
- CodeMemberEvent.cs
- EffectiveValueEntry.cs
- Currency.cs
- MimeFormatExtensions.cs
- OdbcConnectionPoolProviderInfo.cs
- AppModelKnownContentFactory.cs
- RightsManagementInformation.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- DbTypeMap.cs
- InputLanguageProfileNotifySink.cs
- Add.cs
- SHA512Cng.cs
- EdmTypeAttribute.cs
- FormViewDeleteEventArgs.cs
- AmbientEnvironment.cs
- SpellerHighlightLayer.cs
- LinqDataView.cs
- CollectionViewGroupRoot.cs
- WebPartExportVerb.cs
- SubtreeProcessor.cs
- FacetChecker.cs
- HScrollBar.cs
- SqlDataSourceStatusEventArgs.cs
- IntMinMaxAggregationOperator.cs
- AmbientValueAttribute.cs
- DataObjectPastingEventArgs.cs
- StringConcat.cs
- RichTextBoxAutomationPeer.cs
- BinaryObjectWriter.cs
- PageContentAsyncResult.cs
- KeyInstance.cs
- GrammarBuilderWildcard.cs
- DashStyles.cs
- OperatingSystemVersionCheck.cs
- UndoManager.cs
- Point3D.cs
- Win32MouseDevice.cs
- GridPattern.cs