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
- EntityViewGenerationConstants.cs
- SurrogateEncoder.cs
- RecordConverter.cs
- XamlBrushSerializer.cs
- PropertyMapper.cs
- AvTraceDetails.cs
- SqlDataAdapter.cs
- Wrapper.cs
- ProgressChangedEventArgs.cs
- WindowsGraphics2.cs
- SystemColors.cs
- Transform3D.cs
- AssemblyResourceLoader.cs
- ItemContainerPattern.cs
- ListenerSingletonConnectionReader.cs
- MimeBasePart.cs
- SerializationInfoEnumerator.cs
- ProgressBarAutomationPeer.cs
- ColorConverter.cs
- AuthenticationException.cs
- ItemsChangedEventArgs.cs
- ObjectViewListener.cs
- WindowsIdentity.cs
- DefaultPrintController.cs
- ModelUIElement3D.cs
- XMLUtil.cs
- RC2.cs
- FormViewInsertEventArgs.cs
- PropertyDescriptor.cs
- ClassicBorderDecorator.cs
- SpeechRecognitionEngine.cs
- HttpModuleCollection.cs
- HeaderLabel.cs
- VisualBrush.cs
- StructuredTypeEmitter.cs
- X509CertificateStore.cs
- ReadOnlyPermissionSet.cs
- UserControlCodeDomTreeGenerator.cs
- InplaceBitmapMetadataWriter.cs
- InsufficientMemoryException.cs
- NativeWindow.cs
- ClientSettingsProvider.cs
- Double.cs
- ObjectManager.cs
- Icon.cs
- DBConnectionString.cs
- DetailsViewUpdatedEventArgs.cs
- FormParameter.cs
- UIElementAutomationPeer.cs
- Viewport3DAutomationPeer.cs
- HMACRIPEMD160.cs
- FormsAuthentication.cs
- CultureMapper.cs
- ParseElementCollection.cs
- SqlDataSourceView.cs
- DnsPermission.cs
- CustomErrorCollection.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- TransactionFlowProperty.cs
- CollectionConverter.cs
- VScrollProperties.cs
- DbProviderManifest.cs
- PageRanges.cs
- DbReferenceCollection.cs
- OracleConnectionFactory.cs
- BinaryNode.cs
- TextSearch.cs
- HandleCollector.cs
- DataServiceProcessingPipeline.cs
- Html32TextWriter.cs
- VectorValueSerializer.cs
- InternalBase.cs
- TableLayoutSettings.cs
- TreeViewBindingsEditorForm.cs
- TextServicesHost.cs
- Substitution.cs
- CultureInfoConverter.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- JsonFormatWriterGenerator.cs
- ContainerActivationHelper.cs
- CapabilitiesSection.cs
- RuleValidation.cs
- ComponentCollection.cs
- ImageMap.cs
- IItemContainerGenerator.cs
- QuadraticBezierSegment.cs
- SQLDateTime.cs
- WhitespaceRuleLookup.cs
- MatrixCamera.cs
- Soap.cs
- WorkflowHostingResponseContext.cs
- HMACSHA1.cs
- DataGridState.cs
- ConstraintConverter.cs
- ValidationPropertyAttribute.cs
- XMLSchema.cs
- TypeDescriptionProvider.cs
- SmtpDigestAuthenticationModule.cs
- MdiWindowListItemConverter.cs
- SafeNativeMethods.cs