Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaAny.cs / 1 / XmlSchemaAny.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.ComponentModel; using System.Xml.Serialization; using System.Text; ////// /// public class XmlSchemaAny : XmlSchemaParticle { string ns; XmlSchemaContentProcessing processContents = XmlSchemaContentProcessing.None; NamespaceList namespaceList; ///[To be supplied.] ////// /// [XmlAttribute("namespace")] public string Namespace { get { return ns; } set { ns = value; } } ///[To be supplied.] ////// /// [XmlAttribute("processContents"), DefaultValue(XmlSchemaContentProcessing.None)] public XmlSchemaContentProcessing ProcessContents { get { return processContents; } set { processContents = value; } } [XmlIgnore] internal NamespaceList NamespaceList { get { return namespaceList; } } [XmlIgnore] internal string ResolvedNamespace { get { if (ns == null || ns.Length == 0) { return "##any"; } return ns; } } [XmlIgnore] internal XmlSchemaContentProcessing ProcessContentsCorrect { get { return processContents == XmlSchemaContentProcessing.None ? XmlSchemaContentProcessing.Strict : processContents; } } internal override string NameString { get { switch (namespaceList.Type) { case NamespaceList.ListType.Any: return "##any:*"; case NamespaceList.ListType.Other: return "##other:*"; case NamespaceList.ListType.Set: StringBuilder sb = new StringBuilder(); int i = 1; foreach(string wildcardNS in namespaceList.Enumerate) { sb.Append(wildcardNS + ":*"); if (i < namespaceList.Enumerate.Count) { sb.Append(" "); } i++; } return sb.ToString(); default: return string.Empty; } } } internal void BuildNamespaceList(string targetNamespace) { if (ns != null) { //If namespace="" default to namespace="##any" namespaceList = new NamespaceList(ns, targetNamespace); } else { namespaceList = new NamespaceList(); } } internal void BuildNamespaceListV1Compat(string targetNamespace) { if (ns != null) { namespaceList = new NamespaceListV1Compat(ns, targetNamespace); } else { namespaceList = new NamespaceList(); //This is only ##any, hence base class is sufficient } } internal bool Allows(XmlQualifiedName qname) { return namespaceList.Allows(qname.Namespace); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.ComponentModel; using System.Xml.Serialization; using System.Text; ////// /// public class XmlSchemaAny : XmlSchemaParticle { string ns; XmlSchemaContentProcessing processContents = XmlSchemaContentProcessing.None; NamespaceList namespaceList; ///[To be supplied.] ////// /// [XmlAttribute("namespace")] public string Namespace { get { return ns; } set { ns = value; } } ///[To be supplied.] ////// /// [XmlAttribute("processContents"), DefaultValue(XmlSchemaContentProcessing.None)] public XmlSchemaContentProcessing ProcessContents { get { return processContents; } set { processContents = value; } } [XmlIgnore] internal NamespaceList NamespaceList { get { return namespaceList; } } [XmlIgnore] internal string ResolvedNamespace { get { if (ns == null || ns.Length == 0) { return "##any"; } return ns; } } [XmlIgnore] internal XmlSchemaContentProcessing ProcessContentsCorrect { get { return processContents == XmlSchemaContentProcessing.None ? XmlSchemaContentProcessing.Strict : processContents; } } internal override string NameString { get { switch (namespaceList.Type) { case NamespaceList.ListType.Any: return "##any:*"; case NamespaceList.ListType.Other: return "##other:*"; case NamespaceList.ListType.Set: StringBuilder sb = new StringBuilder(); int i = 1; foreach(string wildcardNS in namespaceList.Enumerate) { sb.Append(wildcardNS + ":*"); if (i < namespaceList.Enumerate.Count) { sb.Append(" "); } i++; } return sb.ToString(); default: return string.Empty; } } } internal void BuildNamespaceList(string targetNamespace) { if (ns != null) { //If namespace="" default to namespace="##any" namespaceList = new NamespaceList(ns, targetNamespace); } else { namespaceList = new NamespaceList(); } } internal void BuildNamespaceListV1Compat(string targetNamespace) { if (ns != null) { namespaceList = new NamespaceListV1Compat(ns, targetNamespace); } else { namespaceList = new NamespaceList(); //This is only ##any, hence base class is sufficient } } internal bool Allows(XmlQualifiedName qname) { return namespaceList.Allows(qname.Namespace); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RawStylusInputCustomDataList.cs
- PageSetupDialog.cs
- HostedNamedPipeTransportManager.cs
- ComponentCache.cs
- Control.cs
- RijndaelManagedTransform.cs
- MergeFilterQuery.cs
- AspCompat.cs
- QueueProcessor.cs
- MsmqIntegrationSecurity.cs
- Int32.cs
- IPPacketInformation.cs
- CodeCompileUnit.cs
- WebBrowsableAttribute.cs
- InvariantComparer.cs
- NodeCounter.cs
- ComEventsInfo.cs
- EventItfInfo.cs
- OleDbException.cs
- MobileListItemCollection.cs
- Classification.cs
- DataViewSettingCollection.cs
- HttpStreamXmlDictionaryReader.cs
- PinnedBufferMemoryStream.cs
- Slider.cs
- cookie.cs
- Debug.cs
- NestedContainer.cs
- AssemblyNameProxy.cs
- _DigestClient.cs
- EntitySetBase.cs
- ColumnResizeAdorner.cs
- ManagementEventArgs.cs
- Transform.cs
- dataprotectionpermissionattribute.cs
- codemethodreferenceexpression.cs
- DependencyPropertyHelper.cs
- ColorConverter.cs
- AsyncWaitHandle.cs
- ChangePassword.cs
- XmlSchemaImporter.cs
- Button.cs
- TaskSchedulerException.cs
- HttpResponseHeader.cs
- TimelineGroup.cs
- PropertyPathConverter.cs
- ReflectionPermission.cs
- TextRange.cs
- SmtpDateTime.cs
- ProfessionalColorTable.cs
- ConstantCheck.cs
- MasterPageParser.cs
- PerformanceCounterPermissionEntryCollection.cs
- ManagementOptions.cs
- StickyNoteAnnotations.cs
- COM2ExtendedUITypeEditor.cs
- MdiWindowListItemConverter.cs
- Bezier.cs
- ListItem.cs
- NonValidatingSecurityTokenAuthenticator.cs
- ExecutionEngineException.cs
- NameValuePair.cs
- WebControlAdapter.cs
- ColumnBinding.cs
- DockPatternIdentifiers.cs
- TextProperties.cs
- NominalTypeEliminator.cs
- ImageFormatConverter.cs
- TextTreeText.cs
- MsmqBindingMonitor.cs
- ListViewHitTestInfo.cs
- PathFigureCollectionValueSerializer.cs
- AutomationPropertyInfo.cs
- SlotInfo.cs
- ToolStripPanelRenderEventArgs.cs
- PointAnimationUsingKeyFrames.cs
- AttachedPropertyMethodSelector.cs
- Binding.cs
- XmlElement.cs
- XmlEnumAttribute.cs
- sqlpipe.cs
- TrustLevel.cs
- cookiecontainer.cs
- WebPartVerbsEventArgs.cs
- IPAddress.cs
- RemotingConfigParser.cs
- FixedSOMImage.cs
- FileDialog.cs
- WSDualHttpSecurityMode.cs
- MaskedTextBox.cs
- GenerateScriptTypeAttribute.cs
- VariableReference.cs
- JulianCalendar.cs
- UserControl.cs
- EncodingDataItem.cs
- Renderer.cs
- ExpressionCopier.cs
- StringKeyFrameCollection.cs
- StrongNameKeyPair.cs
- ObjectNavigationPropertyMapping.cs