Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaFacet.cs / 1 / XmlSchemaFacet.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.ComponentModel; using System.Xml.Serialization; internal enum FacetType { None, Length, MinLength, MaxLength, Pattern, Whitespace, Enumeration, MinExclusive, MinInclusive, MaxExclusive, MaxInclusive, TotalDigits, FractionDigits, } ///public abstract class XmlSchemaFacet : XmlSchemaAnnotated { string value; bool isFixed; FacetType facetType; /// [XmlAttribute("value")] public string Value { get { return this.value; } set { this.value = value; } } /// [XmlAttribute("fixed"), DefaultValue(false)] public virtual bool IsFixed { get { return isFixed; } set { if (!(this is XmlSchemaEnumerationFacet) && !(this is XmlSchemaPatternFacet)) { isFixed = value; } } } internal FacetType FacetType { get { return facetType; } set { facetType = value; } } } /// public abstract class XmlSchemaNumericFacet : XmlSchemaFacet { } /// public class XmlSchemaLengthFacet : XmlSchemaNumericFacet { public XmlSchemaLengthFacet() { FacetType = FacetType.Length; } } /// public class XmlSchemaMinLengthFacet : XmlSchemaNumericFacet { public XmlSchemaMinLengthFacet() { FacetType = FacetType.MinLength; } } /// public class XmlSchemaMaxLengthFacet : XmlSchemaNumericFacet { public XmlSchemaMaxLengthFacet() { FacetType = FacetType.MaxLength; } } /// public class XmlSchemaPatternFacet : XmlSchemaFacet { public XmlSchemaPatternFacet() { FacetType = FacetType.Pattern; } } /// public class XmlSchemaEnumerationFacet : XmlSchemaFacet { public XmlSchemaEnumerationFacet() { FacetType = FacetType.Enumeration; } } /// public class XmlSchemaMinExclusiveFacet : XmlSchemaFacet { public XmlSchemaMinExclusiveFacet() { FacetType = FacetType.MinExclusive; } } /// public class XmlSchemaMinInclusiveFacet : XmlSchemaFacet { public XmlSchemaMinInclusiveFacet() { FacetType = FacetType.MinInclusive; } } /// public class XmlSchemaMaxExclusiveFacet : XmlSchemaFacet { public XmlSchemaMaxExclusiveFacet() { FacetType = FacetType.MaxExclusive; } } /// public class XmlSchemaMaxInclusiveFacet : XmlSchemaFacet { public XmlSchemaMaxInclusiveFacet() { FacetType = FacetType.MaxInclusive; } } /// public class XmlSchemaTotalDigitsFacet : XmlSchemaNumericFacet { public XmlSchemaTotalDigitsFacet() { FacetType = FacetType.TotalDigits; } } /// public class XmlSchemaFractionDigitsFacet : XmlSchemaNumericFacet { public XmlSchemaFractionDigitsFacet() { FacetType = FacetType.FractionDigits; } } /// public class XmlSchemaWhiteSpaceFacet : XmlSchemaFacet { public XmlSchemaWhiteSpaceFacet() { FacetType = FacetType.Whitespace; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.ComponentModel; using System.Xml.Serialization; internal enum FacetType { None, Length, MinLength, MaxLength, Pattern, Whitespace, Enumeration, MinExclusive, MinInclusive, MaxExclusive, MaxInclusive, TotalDigits, FractionDigits, } ///public abstract class XmlSchemaFacet : XmlSchemaAnnotated { string value; bool isFixed; FacetType facetType; /// [XmlAttribute("value")] public string Value { get { return this.value; } set { this.value = value; } } /// [XmlAttribute("fixed"), DefaultValue(false)] public virtual bool IsFixed { get { return isFixed; } set { if (!(this is XmlSchemaEnumerationFacet) && !(this is XmlSchemaPatternFacet)) { isFixed = value; } } } internal FacetType FacetType { get { return facetType; } set { facetType = value; } } } /// public abstract class XmlSchemaNumericFacet : XmlSchemaFacet { } /// public class XmlSchemaLengthFacet : XmlSchemaNumericFacet { public XmlSchemaLengthFacet() { FacetType = FacetType.Length; } } /// public class XmlSchemaMinLengthFacet : XmlSchemaNumericFacet { public XmlSchemaMinLengthFacet() { FacetType = FacetType.MinLength; } } /// public class XmlSchemaMaxLengthFacet : XmlSchemaNumericFacet { public XmlSchemaMaxLengthFacet() { FacetType = FacetType.MaxLength; } } /// public class XmlSchemaPatternFacet : XmlSchemaFacet { public XmlSchemaPatternFacet() { FacetType = FacetType.Pattern; } } /// public class XmlSchemaEnumerationFacet : XmlSchemaFacet { public XmlSchemaEnumerationFacet() { FacetType = FacetType.Enumeration; } } /// public class XmlSchemaMinExclusiveFacet : XmlSchemaFacet { public XmlSchemaMinExclusiveFacet() { FacetType = FacetType.MinExclusive; } } /// public class XmlSchemaMinInclusiveFacet : XmlSchemaFacet { public XmlSchemaMinInclusiveFacet() { FacetType = FacetType.MinInclusive; } } /// public class XmlSchemaMaxExclusiveFacet : XmlSchemaFacet { public XmlSchemaMaxExclusiveFacet() { FacetType = FacetType.MaxExclusive; } } /// public class XmlSchemaMaxInclusiveFacet : XmlSchemaFacet { public XmlSchemaMaxInclusiveFacet() { FacetType = FacetType.MaxInclusive; } } /// public class XmlSchemaTotalDigitsFacet : XmlSchemaNumericFacet { public XmlSchemaTotalDigitsFacet() { FacetType = FacetType.TotalDigits; } } /// public class XmlSchemaFractionDigitsFacet : XmlSchemaNumericFacet { public XmlSchemaFractionDigitsFacet() { FacetType = FacetType.FractionDigits; } } /// public class XmlSchemaWhiteSpaceFacet : XmlSchemaFacet { public XmlSchemaWhiteSpaceFacet() { FacetType = FacetType.Whitespace; } } } // 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
- VisualBrush.cs
- ClientSponsor.cs
- TextEvent.cs
- StringWriter.cs
- CommandConverter.cs
- FactoryRecord.cs
- TraceLevelStore.cs
- TemplateBamlRecordReader.cs
- Cursor.cs
- WinEventTracker.cs
- EllipseGeometry.cs
- EventPropertyMap.cs
- SmtpNetworkElement.cs
- TemplateControl.cs
- AxisAngleRotation3D.cs
- ProfileElement.cs
- Int32KeyFrameCollection.cs
- ToolStripPanelRenderEventArgs.cs
- GestureRecognizer.cs
- InputMethodStateTypeInfo.cs
- MouseActionValueSerializer.cs
- ArrayMergeHelper.cs
- InvalidCastException.cs
- IntellisenseTextBox.designer.cs
- Pair.cs
- basenumberconverter.cs
- DependencySource.cs
- JulianCalendar.cs
- DateTimeFormatInfo.cs
- TreeNodeCollectionEditor.cs
- PropertyBuilder.cs
- SortedList.cs
- FileDocument.cs
- SoapSchemaMember.cs
- MapPathBasedVirtualPathProvider.cs
- SqlTypesSchemaImporter.cs
- ObjectDataSourceMethodEventArgs.cs
- ChannelManager.cs
- SiteMapDataSourceView.cs
- TransactionWaitAsyncResult.cs
- ToolStripLabel.cs
- CodeEntryPointMethod.cs
- SmtpNetworkElement.cs
- QilReplaceVisitor.cs
- ClientSettingsSection.cs
- DataTableReaderListener.cs
- ISessionStateStore.cs
- OpenFileDialog.cs
- UIElementHelper.cs
- DataContractSerializer.cs
- SchemaRegistration.cs
- CachedBitmap.cs
- DependencyStoreSurrogate.cs
- WindowPattern.cs
- MarshalDirectiveException.cs
- Perspective.cs
- SecurityKeyIdentifierClause.cs
- TextEmbeddedObject.cs
- RecognizerBase.cs
- ConfigurationException.cs
- LocatorManager.cs
- WmlValidationSummaryAdapter.cs
- MergeLocalizationDirectives.cs
- PrintDialogException.cs
- IPGlobalProperties.cs
- SerializableAttribute.cs
- SHA1CryptoServiceProvider.cs
- FilterQuery.cs
- EntityContainerEntitySet.cs
- OpenTypeLayoutCache.cs
- ExpressionVisitor.cs
- CommandEventArgs.cs
- XmlSchemaType.cs
- EmptyImpersonationContext.cs
- SamlDoNotCacheCondition.cs
- StructuredTypeInfo.cs
- FigureHelper.cs
- SvcMapFile.cs
- DecimalMinMaxAggregationOperator.cs
- CodeDomDesignerLoader.cs
- StreamMarshaler.cs
- ReachDocumentReferenceSerializerAsync.cs
- RectangleHotSpot.cs
- CompilerState.cs
- IdnElement.cs
- SByteConverter.cs
- PolygonHotSpot.cs
- CopyEncoder.cs
- CheckableControlBaseAdapter.cs
- TrackingConditionCollection.cs
- DataException.cs
- TimersDescriptionAttribute.cs
- TraceInternal.cs
- AuthenticatingEventArgs.cs
- ProtocolImporter.cs
- WebGetAttribute.cs
- FactoryMaker.cs
- FullTextBreakpoint.cs
- DesignTimeVisibleAttribute.cs
- storepermissionattribute.cs