Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. // //[....] //----------------------------------------------------------------------------- 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
- DataGridViewColumnHeaderCell.cs
- UInt64.cs
- MsmqAppDomainProtocolHandler.cs
- SqlWebEventProvider.cs
- DispatcherTimer.cs
- DelegateHelpers.cs
- PenThread.cs
- shaper.cs
- ProcessManager.cs
- dataobject.cs
- XPathQilFactory.cs
- DataContext.cs
- ThrowHelper.cs
- InvokeGenerator.cs
- PeerToPeerException.cs
- TextServicesHost.cs
- DeclarativeConditionsCollection.cs
- serverconfig.cs
- TextEffectCollection.cs
- TemplateInstanceAttribute.cs
- DoubleLink.cs
- ArraySortHelper.cs
- StorageFunctionMapping.cs
- CacheRequest.cs
- HighlightComponent.cs
- __Filters.cs
- WinEventHandler.cs
- RecognizedAudio.cs
- MachineKeyConverter.cs
- ToolStripSeparatorRenderEventArgs.cs
- NotConverter.cs
- DateTimeFormatInfo.cs
- SqlUserDefinedAggregateAttribute.cs
- RsaSecurityKey.cs
- ContainerVisual.cs
- TextProperties.cs
- FileAuthorizationModule.cs
- CustomAttribute.cs
- EditingCommands.cs
- userdatakeys.cs
- WindowsTooltip.cs
- TargetFrameworkAttribute.cs
- XmlResolver.cs
- _ContextAwareResult.cs
- Journal.cs
- InstanceStore.cs
- PageAsyncTaskManager.cs
- OnOperation.cs
- SizeFConverter.cs
- SmtpMail.cs
- AssemblyAttributesGoHere.cs
- EventDescriptorCollection.cs
- BaseDataList.cs
- TemplateInstanceAttribute.cs
- FileUpload.cs
- CharacterHit.cs
- ProfileSection.cs
- UnmanagedHandle.cs
- FilteredReadOnlyMetadataCollection.cs
- CachingHintValidation.cs
- CodeTypeMember.cs
- CodeCastExpression.cs
- AbstractSvcMapFileLoader.cs
- JoinElimination.cs
- ConfigurationValidatorAttribute.cs
- ActivityExecutionContext.cs
- SoapInteropTypes.cs
- Transform3D.cs
- SubclassTypeValidator.cs
- StateItem.cs
- SafeEventLogWriteHandle.cs
- WindowsListViewScroll.cs
- AsyncOperation.cs
- DataGridViewTextBoxColumn.cs
- CssClassPropertyAttribute.cs
- WindowsListView.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- DESCryptoServiceProvider.cs
- TreeView.cs
- ConnectionPoolManager.cs
- StubHelpers.cs
- HtmlShimManager.cs
- SafeNativeMethods.cs
- DynamicRenderer.cs
- ButtonFlatAdapter.cs
- DelayedRegex.cs
- C14NUtil.cs
- EntityTransaction.cs
- RegisteredDisposeScript.cs
- listitem.cs
- AutomationEventArgs.cs
- PointAnimation.cs
- ReceiveMessageRecord.cs
- DbProviderServices.cs
- FontSource.cs
- OpacityConverter.cs
- RadioButtonRenderer.cs
- HwndStylusInputProvider.cs
- TrackingMemoryStreamFactory.cs
- DynamicUpdateCommand.cs