Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaInfo.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpListener.cs
- MobileFormsAuthentication.cs
- contentDescriptor.cs
- SerialPort.cs
- MtomMessageEncodingBindingElement.cs
- UnaryQueryOperator.cs
- DbXmlEnabledProviderManifest.cs
- PersistChildrenAttribute.cs
- EntityDesignPluralizationHandler.cs
- TcpStreams.cs
- ActivityScheduledQuery.cs
- BitConverter.cs
- ApplicationTrust.cs
- CodeArrayCreateExpression.cs
- DocumentViewerAutomationPeer.cs
- HiddenFieldDesigner.cs
- PropertyMetadata.cs
- _ContextAwareResult.cs
- CriticalHandle.cs
- Color.cs
- AsyncInvokeContext.cs
- ManifestSignedXml.cs
- RequestQueue.cs
- RadioButtonFlatAdapter.cs
- ButtonBase.cs
- Visual3D.cs
- Pts.cs
- MarshalByRefObject.cs
- QilValidationVisitor.cs
- UInt32.cs
- MethodBuilder.cs
- XamlGridLengthSerializer.cs
- TemplateApplicationHelper.cs
- DesignSurfaceCollection.cs
- ToolBarDesigner.cs
- SafeSystemMetrics.cs
- Nodes.cs
- EmptyEnumerator.cs
- HyperLinkField.cs
- PeerApplication.cs
- QilIterator.cs
- VerificationAttribute.cs
- MetaType.cs
- HighlightVisual.cs
- VisualStyleRenderer.cs
- DebuggerAttributes.cs
- BaseCollection.cs
- MostlySingletonList.cs
- TemplateXamlTreeBuilder.cs
- FileBasedResourceGroveler.cs
- CollectionView.cs
- RadioButtonList.cs
- NetMsmqSecurityElement.cs
- TreeView.cs
- DataFieldConverter.cs
- CaseStatement.cs
- HttpVersion.cs
- SeparatorAutomationPeer.cs
- WebPartCloseVerb.cs
- IndicFontClient.cs
- CheckedPointers.cs
- AccessDataSourceView.cs
- PeerEndPoint.cs
- MonitoringDescriptionAttribute.cs
- DeclaredTypeValidator.cs
- HwndTarget.cs
- COMException.cs
- CopyAttributesAction.cs
- Matrix3DValueSerializer.cs
- ButtonChrome.cs
- BitmapEffectRenderDataResource.cs
- DataSourceConverter.cs
- ErrorActivity.cs
- MembershipSection.cs
- StateMachineHistory.cs
- AccessViolationException.cs
- GridViewColumn.cs
- DataGridItemAttachedStorage.cs
- TemplateBuilder.cs
- BamlResourceContent.cs
- OpCopier.cs
- ReturnValue.cs
- InProcStateClientManager.cs
- MemberExpression.cs
- RoutedEvent.cs
- SqlDataSourceAdvancedOptionsForm.cs
- PolyBezierSegmentFigureLogic.cs
- NullableConverter.cs
- SpellerHighlightLayer.cs
- TemplatedWizardStep.cs
- ConfigurationStrings.cs
- QueryValue.cs
- StrokeCollectionDefaultValueFactory.cs
- MutableAssemblyCacheEntry.cs
- NameValuePermission.cs
- HttpHeaderCollection.cs
- ChineseLunisolarCalendar.cs
- SqlNodeAnnotations.cs
- TemplatedAdorner.cs
- GeneralTransform.cs