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
- EventDescriptor.cs
- EntityParameterCollection.cs
- TypeUsage.cs
- DocumentViewerBase.cs
- RequestCache.cs
- GridViewColumnHeaderAutomationPeer.cs
- DependencyPropertyKind.cs
- HttpHeaderCollection.cs
- HttpServerVarsCollection.cs
- FileSystemEventArgs.cs
- MetadataArtifactLoader.cs
- FormsIdentity.cs
- FragmentQuery.cs
- WebPartConnection.cs
- XmlSerializerNamespaces.cs
- AxWrapperGen.cs
- OletxCommittableTransaction.cs
- DocobjHost.cs
- HtmlFormAdapter.cs
- QuaternionAnimation.cs
- StandardBindingElement.cs
- BitStack.cs
- AttributedMetaModel.cs
- DateTimePicker.cs
- MasterPageParser.cs
- CacheHelper.cs
- SystemNetworkInterface.cs
- CodeDOMUtility.cs
- DataControlPagerLinkButton.cs
- ModifierKeysConverter.cs
- StateMachineTimers.cs
- HttpCachePolicyElement.cs
- DrawListViewItemEventArgs.cs
- ButtonChrome.cs
- Stroke.cs
- SiteIdentityPermission.cs
- DocumentEventArgs.cs
- ThreadPool.cs
- ListComponentEditorPage.cs
- OleDbError.cs
- FormView.cs
- RtType.cs
- CompilerError.cs
- WebPageTraceListener.cs
- SchemaCompiler.cs
- OdbcConnectionStringbuilder.cs
- SocketAddress.cs
- DesignTable.cs
- WebEvents.cs
- ApplicationHost.cs
- MsmqMessageProperty.cs
- ListViewItem.cs
- AsymmetricSecurityProtocol.cs
- ProcessModelSection.cs
- EntitySqlQueryCacheEntry.cs
- TextTreeUndo.cs
- SessionPageStatePersister.cs
- DockingAttribute.cs
- SelectedCellsChangedEventArgs.cs
- EndpointConfigContainer.cs
- Matrix.cs
- BaseDataList.cs
- SecurityContextKeyIdentifierClause.cs
- StylusCollection.cs
- ClientSponsor.cs
- GeneralTransform2DTo3DTo2D.cs
- DiscriminatorMap.cs
- HelpKeywordAttribute.cs
- CodeTypeReferenceExpression.cs
- AttachedPropertyBrowsableAttribute.cs
- ProxyHelper.cs
- SerializerProvider.cs
- ColumnMapCopier.cs
- ProvidePropertyAttribute.cs
- ShapingWorkspace.cs
- PowerEase.cs
- DomNameTable.cs
- ContactManager.cs
- ExceptionRoutedEventArgs.cs
- UnsafeNativeMethods.cs
- DiscoveryMessageSequence.cs
- UnmanagedBitmapWrapper.cs
- KeyFrames.cs
- OperationContractGenerationContext.cs
- CookielessHelper.cs
- EntityDataSourceWizardForm.cs
- UmAlQuraCalendar.cs
- ProcessingInstructionAction.cs
- BinaryEditor.cs
- _ContextAwareResult.cs
- FileDialogPermission.cs
- ObjectQueryExecutionPlan.cs
- BitStream.cs
- InternalConfigConfigurationFactory.cs
- WebConfigurationHostFileChange.cs
- CapabilitiesPattern.cs
- AssociatedControlConverter.cs
- CommonRemoteMemoryBlock.cs
- HtmlInputHidden.cs
- dtdvalidator.cs