Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaAttribute.cs / 1 / XmlSchemaAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System.Xml.XPath; using System.Collections; using System.ComponentModel; using System.Xml.Serialization; namespace System.Xml.Schema { ////// /// public class XmlSchemaAttribute : XmlSchemaAnnotated { string defaultValue; string fixedValue; string name; string prefix; XmlSchemaForm form = XmlSchemaForm.None; XmlSchemaUse use = XmlSchemaUse.None; XmlQualifiedName refName = XmlQualifiedName.Empty; XmlQualifiedName typeName = XmlQualifiedName.Empty; XmlQualifiedName qualifiedName = XmlQualifiedName.Empty; XmlSchemaSimpleType type; XmlSchemaSimpleType attributeType; SchemaAttDef attDef; ///[To be supplied.] ////// /// [XmlAttribute("default")] [DefaultValue(null)] public string DefaultValue { get { return defaultValue; } set { defaultValue = value; } } ///[To be supplied.] ////// /// [XmlAttribute("fixed")] [DefaultValue(null)] public string FixedValue { get { return fixedValue; } set { fixedValue = value; } } ///[To be supplied.] ////// /// [XmlAttribute("form"), DefaultValue(XmlSchemaForm.None)] public XmlSchemaForm Form { get { return form; } set { form = value; } } ///[To be supplied.] ////// /// [XmlAttribute("name")] public string Name { get { return name; } set { name = value; } } ///[To be supplied.] ////// /// [XmlAttribute("ref")] public XmlQualifiedName RefName { get { return refName; } set { refName = (value == null ? XmlQualifiedName.Empty : value); } } ///[To be supplied.] ////// /// [XmlAttribute("type")] public XmlQualifiedName SchemaTypeName { get { return typeName; } set { typeName = (value == null ? XmlQualifiedName.Empty : value); } } ///[To be supplied.] ////// /// [XmlElement("simpleType")] public XmlSchemaSimpleType SchemaType { get { return type; } set { type = value; } } ///[To be supplied.] ////// /// [XmlAttribute("use"), DefaultValue(XmlSchemaUse.None)] public XmlSchemaUse Use { get { return use; } set { use = value; } } ///[To be supplied.] ////// /// [XmlIgnore] public XmlQualifiedName QualifiedName { get { return qualifiedName; } } ///[To be supplied.] ////// /// [XmlIgnore] [Obsolete("This property has been deprecated. Please use AttributeSchemaType property that returns a strongly typed attribute type. http://go.microsoft.com/fwlink/?linkid=14202")] public object AttributeType { get { if (attributeType.QualifiedName.Namespace == XmlReservedNs.NsXs) { return attributeType.Datatype; } return attributeType; } } ///[To be supplied.] ////// /// [XmlIgnore] public XmlSchemaSimpleType AttributeSchemaType { get { return attributeType; } } internal XmlReader Validate(XmlReader reader, XmlResolver resolver, XmlSchemaSet schemaSet, ValidationEventHandler valEventHandler) { if (schemaSet != null) { XmlReaderSettings readerSettings = new XmlReaderSettings(); readerSettings.ValidationType = ValidationType.Schema; readerSettings.Schemas = schemaSet; readerSettings.ValidationEventHandler += valEventHandler; return new XsdValidatingReader(reader, resolver, readerSettings, this); } return null; } [XmlIgnore] internal XmlSchemaDatatype Datatype { get { if (attributeType != null) { return attributeType.Datatype; } return null; } } internal void SetQualifiedName(XmlQualifiedName value) { qualifiedName = value; } internal void SetAttributeType(XmlSchemaSimpleType value) { attributeType = value; } internal string Prefix { get { return prefix; } } internal SchemaAttDef AttDef { get { return attDef; } set { attDef = value; } } internal bool HasDefault { get { return defaultValue != null; } } [XmlIgnore] internal override string NameAttribute { get { return Name; } set { Name = value; } } internal override XmlSchemaObject Clone() { XmlSchemaAttribute newAtt = (XmlSchemaAttribute)MemberwiseClone(); //Deep clone the QNames as these will be updated on chameleon includes newAtt.refName = this.refName.Clone(); newAtt.typeName = this.typeName.Clone(); return newAtt; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.[To be supplied.] ///
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BaseTemplateParser.cs
- BorderGapMaskConverter.cs
- Metadata.cs
- InheritablePropertyChangeInfo.cs
- EntityTypeEmitter.cs
- TargetConverter.cs
- CompoundFileReference.cs
- PropagatorResult.cs
- KeyNotFoundException.cs
- ThreadWorkerController.cs
- UrlPath.cs
- EntitySqlQueryBuilder.cs
- StringResourceManager.cs
- AppDomainProtocolHandler.cs
- XmlSchemaCollection.cs
- StateMachine.cs
- DataTableCollection.cs
- DbModificationCommandTree.cs
- CodeTypeReferenceSerializer.cs
- XmlAttributes.cs
- ItemAutomationPeer.cs
- InheritanceContextChangedEventManager.cs
- StyleHelper.cs
- TimeManager.cs
- FlowNode.cs
- DependencyObjectValidator.cs
- Accessors.cs
- DataStorage.cs
- WorkItem.cs
- CollectionBase.cs
- DataTable.cs
- RadioButtonPopupAdapter.cs
- Matrix3DStack.cs
- uribuilder.cs
- InvalidFilterCriteriaException.cs
- documentsequencetextpointer.cs
- WebBrowserUriTypeConverter.cs
- CaseStatement.cs
- TableLayoutColumnStyleCollection.cs
- CompositeCollectionView.cs
- ImageAttributes.cs
- NetworkCredential.cs
- FSWPathEditor.cs
- ProcessModelInfo.cs
- Context.cs
- WSTrustDec2005.cs
- LinqDataSourceStatusEventArgs.cs
- GridSplitterAutomationPeer.cs
- SoapReflectionImporter.cs
- ToolStripMenuItem.cs
- CommonDialog.cs
- RsaElement.cs
- ContainerFilterService.cs
- ExeConfigurationFileMap.cs
- ListBoxChrome.cs
- TextTreeTextNode.cs
- TextPenaltyModule.cs
- Cursor.cs
- TextCollapsingProperties.cs
- DataGridSortCommandEventArgs.cs
- SafeLibraryHandle.cs
- UidManager.cs
- TypeSemantics.cs
- SinglePhaseEnlistment.cs
- NGCSerializer.cs
- cache.cs
- PageBreakRecord.cs
- LocatorPart.cs
- FieldAccessException.cs
- CacheVirtualItemsEvent.cs
- XmlSecureResolver.cs
- SqlConnection.cs
- CommonDialog.cs
- DataControlPagerLinkButton.cs
- Serialization.cs
- List.cs
- PointLightBase.cs
- Pair.cs
- PrePostDescendentsWalker.cs
- DataSourceProvider.cs
- AppearanceEditorPart.cs
- FixedPageAutomationPeer.cs
- DropShadowBitmapEffect.cs
- FixedDocumentSequencePaginator.cs
- OleDbException.cs
- Label.cs
- WsdlBuildProvider.cs
- DataBoundControl.cs
- LazyTextWriterCreator.cs
- AccessDataSource.cs
- CacheSection.cs
- CodeCommentStatement.cs
- ProfileGroupSettingsCollection.cs
- PageRequestManager.cs
- VisualStyleTypesAndProperties.cs
- FlowPosition.cs
- PointHitTestParameters.cs
- ConnectionManagementElement.cs
- UIElementParaClient.cs
- DataGrid.cs