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
- OpacityConverter.cs
- DataGridItemCollection.cs
- HttpResponseHeader.cs
- Binding.cs
- DataGridClipboardHelper.cs
- BamlBinaryWriter.cs
- ObfuscateAssemblyAttribute.cs
- PenLineCapValidation.cs
- TraversalRequest.cs
- FrameworkTemplate.cs
- SafeNativeMethodsOther.cs
- SqlInternalConnection.cs
- Base64Decoder.cs
- ProjectionCamera.cs
- BindingContext.cs
- UserControlParser.cs
- SqlClientWrapperSmiStream.cs
- PowerModeChangedEventArgs.cs
- SettingsProviderCollection.cs
- ValueUnavailableException.cs
- EntityDataSourceChangingEventArgs.cs
- PassportIdentity.cs
- DropSource.cs
- Schema.cs
- QueryExpr.cs
- EtwProvider.cs
- IPGlobalProperties.cs
- HttpResponseHeader.cs
- ExpandSegment.cs
- QilVisitor.cs
- BamlLocalizer.cs
- TextSelectionHelper.cs
- RecordBuilder.cs
- InstanceDataCollectionCollection.cs
- ToolBar.cs
- TaskScheduler.cs
- File.cs
- KeySplineConverter.cs
- Timer.cs
- HostProtectionPermission.cs
- webclient.cs
- XAMLParseException.cs
- DBNull.cs
- StickyNoteHelper.cs
- EntityKey.cs
- ThreadStaticAttribute.cs
- StickyNoteHelper.cs
- DesignParameter.cs
- CollectionViewProxy.cs
- XmlBinaryWriterSession.cs
- UnicodeEncoding.cs
- AttachedPropertyDescriptor.cs
- XmlSchemaAnnotated.cs
- HebrewCalendar.cs
- RuntimeTransactionHandle.cs
- ImageSource.cs
- WS2007HttpBindingCollectionElement.cs
- ScriptingWebServicesSectionGroup.cs
- HostProtectionPermission.cs
- CookielessHelper.cs
- XmlSerializationGeneratedCode.cs
- HMACSHA384.cs
- GPRECT.cs
- CustomAttributeBuilder.cs
- HelpInfo.cs
- DecimalFormatter.cs
- DrawingGroup.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- Propagator.JoinPropagator.cs
- InkCanvasInnerCanvas.cs
- DtdParser.cs
- DictionaryBase.cs
- DataGridViewRowConverter.cs
- ParallelTimeline.cs
- TypedServiceOperationListItem.cs
- PerformanceCountersElement.cs
- FileDetails.cs
- ScriptHandlerFactory.cs
- StopStoryboard.cs
- StructuredProperty.cs
- BamlRecordReader.cs
- XmlEnumAttribute.cs
- ExceptionHelpers.cs
- StructuredProperty.cs
- RuntimeHandles.cs
- DataListItem.cs
- RubberbandSelector.cs
- SpeechAudioFormatInfo.cs
- ProviderCommandInfoUtils.cs
- FillRuleValidation.cs
- ServiceRoute.cs
- GrammarBuilderDictation.cs
- ArraySortHelper.cs
- SqlDataSourceCache.cs
- WebPartZone.cs
- DrawingImage.cs
- Stroke.cs
- NamespaceExpr.cs
- ParentControlDesigner.cs
- XsdValidatingReader.cs