Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CapabilitiesSection.cs
- ChannelTraceRecord.cs
- Block.cs
- NTAccount.cs
- MatchingStyle.cs
- RouteParser.cs
- XmlNamespaceMapping.cs
- XamlStream.cs
- DBSchemaRow.cs
- WebEvents.cs
- EntityTypeEmitter.cs
- SymbolType.cs
- AppDomainUnloadedException.cs
- XmlCharCheckingWriter.cs
- ServerValidateEventArgs.cs
- RegexBoyerMoore.cs
- TextSerializer.cs
- Table.cs
- WSHttpTransportSecurityElement.cs
- CodeMethodReturnStatement.cs
- BackgroundFormatInfo.cs
- TreeSet.cs
- EntityObject.cs
- RowToParametersTransformer.cs
- InplaceBitmapMetadataWriter.cs
- DataRecordInternal.cs
- RTLAwareMessageBox.cs
- DynamicUpdateCommand.cs
- StrongNamePublicKeyBlob.cs
- ToolStripDropDownButton.cs
- HttpInputStream.cs
- DesignerAttributeInfo.cs
- NumericExpr.cs
- AnnotationMap.cs
- ExtenderControl.cs
- TcpTransportSecurity.cs
- SecurityElement.cs
- SchemaAttDef.cs
- NamedElement.cs
- NamedPermissionSet.cs
- DataGridViewEditingControlShowingEventArgs.cs
- PathFigure.cs
- CoreSwitches.cs
- ChtmlTextBoxAdapter.cs
- ExpressionConverter.cs
- DBParameter.cs
- QueryResponse.cs
- FloatUtil.cs
- TreeIterator.cs
- DataContractSet.cs
- RemotingAttributes.cs
- EasingFunctionBase.cs
- HtmlButton.cs
- PropertyDescriptorGridEntry.cs
- CacheOutputQuery.cs
- filewebresponse.cs
- PageTheme.cs
- StreamMarshaler.cs
- HotSpotCollection.cs
- Deserializer.cs
- CompensatableSequenceActivity.cs
- SqlCacheDependencySection.cs
- BinarySerializer.cs
- ListViewInsertEventArgs.cs
- ProgressBar.cs
- SmtpDateTime.cs
- TdsParserStaticMethods.cs
- VisualBasicImportReference.cs
- SortDescription.cs
- WebPartZoneBase.cs
- TypefaceCollection.cs
- ValidationErrorInfo.cs
- counter.cs
- BrowserCapabilitiesCodeGenerator.cs
- StringArrayConverter.cs
- _Events.cs
- TemplateModeChangedEventArgs.cs
- ColorKeyFrameCollection.cs
- GenericParameterDataContract.cs
- EmptyImpersonationContext.cs
- Underline.cs
- XmlSchemaAll.cs
- XmlPreloadedResolver.cs
- BooleanAnimationBase.cs
- OracleRowUpdatedEventArgs.cs
- NullableDecimalSumAggregationOperator.cs
- DoubleAnimationBase.cs
- Int32Converter.cs
- WebServiceFaultDesigner.cs
- RoleBoolean.cs
- IdentityManager.cs
- PageParserFilter.cs
- odbcmetadatacolumnnames.cs
- RotateTransform.cs
- Exceptions.cs
- TreeViewImageIndexConverter.cs
- CompositeCollection.cs
- ToolboxComponentsCreatingEventArgs.cs
- NameTable.cs
- DrawingContextDrawingContextWalker.cs