Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FlowDocumentView.cs
- PointIndependentAnimationStorage.cs
- SafeCryptoHandles.cs
- Bits.cs
- _ServiceNameStore.cs
- AsymmetricKeyExchangeDeformatter.cs
- XPathQilFactory.cs
- httpapplicationstate.cs
- TreeViewImageIndexConverter.cs
- TCPClient.cs
- PixelFormat.cs
- XPathDocument.cs
- UIntPtr.cs
- Byte.cs
- NetworkInformationException.cs
- MimeObjectFactory.cs
- MeasureItemEvent.cs
- OleDbStruct.cs
- ListDictionaryInternal.cs
- Overlapped.cs
- PageBreakRecord.cs
- _LocalDataStore.cs
- FieldNameLookup.cs
- CacheModeValueSerializer.cs
- EtwTrackingBehavior.cs
- HostedNamedPipeTransportManager.cs
- SerializableReadOnlyDictionary.cs
- PartialArray.cs
- ClientProtocol.cs
- SafeLibraryHandle.cs
- SamlSecurityToken.cs
- SrgsText.cs
- ResetableIterator.cs
- ChangePassword.cs
- TextElementCollectionHelper.cs
- ArraySortHelper.cs
- MethodToken.cs
- Context.cs
- UrlAuthFailedErrorFormatter.cs
- IERequestCache.cs
- DataSourceSerializationException.cs
- UriTemplateTrieNode.cs
- EnvironmentPermission.cs
- HttpRequestTraceRecord.cs
- ZeroOpNode.cs
- ClientTargetCollection.cs
- SubMenuStyle.cs
- ResponseBodyWriter.cs
- SafeFreeMibTable.cs
- TextSearch.cs
- PanelDesigner.cs
- EndpointBehaviorElementCollection.cs
- TextDecorationUnitValidation.cs
- TextElement.cs
- EventBuilder.cs
- SerializationObjectManager.cs
- NetworkStream.cs
- SystemIcons.cs
- XLinq.cs
- InvalidPrinterException.cs
- XmlSerializationReader.cs
- Opcode.cs
- Point3DAnimationBase.cs
- WindowsRebar.cs
- ToolStripContextMenu.cs
- LinkedResourceCollection.cs
- FontInfo.cs
- TraceEventCache.cs
- DetailsViewDeletedEventArgs.cs
- Misc.cs
- RowCache.cs
- FixedSOMContainer.cs
- StorageModelBuildProvider.cs
- PropertyGridCommands.cs
- DataServiceProviderMethods.cs
- PathParser.cs
- RsaSecurityToken.cs
- Win32Native.cs
- UDPClient.cs
- ImageConverter.cs
- SqlBinder.cs
- RuntimeWrappedException.cs
- XsdDuration.cs
- RoutedPropertyChangedEventArgs.cs
- WebConfigurationHostFileChange.cs
- BufferModeSettings.cs
- Wildcard.cs
- DbProviderSpecificTypePropertyAttribute.cs
- AndCondition.cs
- DesignerTransactionCloseEvent.cs
- LinqDataSourceHelper.cs
- WebContext.cs
- NumericUpDown.cs
- TextElementAutomationPeer.cs
- DataServices.cs
- ColorContextHelper.cs
- AnimationException.cs
- GacUtil.cs
- Utility.cs
- FactoryGenerator.cs