Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Xml / System / Xml / Dom / XmlUnspecifiedAttribute.cs / 1 / XmlUnspecifiedAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; internal class XmlUnspecifiedAttribute: XmlAttribute { bool fSpecified = false; protected internal XmlUnspecifiedAttribute( string prefix, string localName, string namespaceURI, XmlDocument doc ) : base( prefix, localName, namespaceURI, doc ) { } public override bool Specified { get { return fSpecified;} } public override XmlNode CloneNode(bool deep) { //CloneNode is deep for attributes irrespective of parameter XmlDocument doc = OwnerDocument; XmlUnspecifiedAttribute attr = (XmlUnspecifiedAttribute)doc.CreateDefaultAttribute(Prefix, LocalName, NamespaceURI); attr.CopyChildren( doc, this, true ); attr.fSpecified = true; //When clone, should return the specifed attribute as default return attr; } public override string InnerText { set { base.InnerText = value; fSpecified = true; } } public override XmlNode InsertBefore(XmlNode newChild, XmlNode refChild) { XmlNode node = base.InsertBefore( newChild, refChild ); fSpecified = true; return node; } public override XmlNode InsertAfter(XmlNode newChild, XmlNode refChild) { XmlNode node = base.InsertAfter( newChild, refChild ); fSpecified = true; return node; } public override XmlNode ReplaceChild(XmlNode newChild, XmlNode oldChild) { XmlNode node = base.ReplaceChild( newChild, oldChild ); fSpecified = true; return node; } public override XmlNode RemoveChild(XmlNode oldChild) { XmlNode node = base.RemoveChild(oldChild); fSpecified = true; return node; } public override XmlNode AppendChild(XmlNode newChild) { XmlNode node = base.AppendChild(newChild); fSpecified = true; return node; } public override void WriteTo(XmlWriter w) { if (fSpecified) base.WriteTo( w ); } internal void SetSpecified(bool f) { fSpecified = f; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; internal class XmlUnspecifiedAttribute: XmlAttribute { bool fSpecified = false; protected internal XmlUnspecifiedAttribute( string prefix, string localName, string namespaceURI, XmlDocument doc ) : base( prefix, localName, namespaceURI, doc ) { } public override bool Specified { get { return fSpecified;} } public override XmlNode CloneNode(bool deep) { //CloneNode is deep for attributes irrespective of parameter XmlDocument doc = OwnerDocument; XmlUnspecifiedAttribute attr = (XmlUnspecifiedAttribute)doc.CreateDefaultAttribute(Prefix, LocalName, NamespaceURI); attr.CopyChildren( doc, this, true ); attr.fSpecified = true; //When clone, should return the specifed attribute as default return attr; } public override string InnerText { set { base.InnerText = value; fSpecified = true; } } public override XmlNode InsertBefore(XmlNode newChild, XmlNode refChild) { XmlNode node = base.InsertBefore( newChild, refChild ); fSpecified = true; return node; } public override XmlNode InsertAfter(XmlNode newChild, XmlNode refChild) { XmlNode node = base.InsertAfter( newChild, refChild ); fSpecified = true; return node; } public override XmlNode ReplaceChild(XmlNode newChild, XmlNode oldChild) { XmlNode node = base.ReplaceChild( newChild, oldChild ); fSpecified = true; return node; } public override XmlNode RemoveChild(XmlNode oldChild) { XmlNode node = base.RemoveChild(oldChild); fSpecified = true; return node; } public override XmlNode AppendChild(XmlNode newChild) { XmlNode node = base.AppendChild(newChild); fSpecified = true; return node; } public override void WriteTo(XmlWriter w) { if (fSpecified) base.WriteTo( w ); } internal void SetSpecified(bool f) { fSpecified = f; } } } // 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
- XmlHierarchicalEnumerable.cs
- TabItem.cs
- FixedTextSelectionProcessor.cs
- TimerElapsedEvenArgs.cs
- ClientTargetSection.cs
- URLAttribute.cs
- ToolBarPanel.cs
- TraceShell.cs
- SmiContext.cs
- PositiveTimeSpanValidator.cs
- HandlerFactoryWrapper.cs
- Stack.cs
- MemberHolder.cs
- CalendarButtonAutomationPeer.cs
- DatePicker.cs
- xdrvalidator.cs
- MemberInfoSerializationHolder.cs
- SmtpLoginAuthenticationModule.cs
- BindingEditor.xaml.cs
- ActivationWorker.cs
- GregorianCalendar.cs
- TextMetrics.cs
- ZipIOExtraFieldZip64Element.cs
- StringWriter.cs
- DeferredElementTreeState.cs
- _BasicClient.cs
- Paragraph.cs
- CompressStream.cs
- CircleHotSpot.cs
- GetWinFXPath.cs
- MethodBuilderInstantiation.cs
- Html32TextWriter.cs
- ObjectViewQueryResultData.cs
- ErrorProvider.cs
- ScrollableControlDesigner.cs
- BindingContext.cs
- LogArchiveSnapshot.cs
- AssociationProvider.cs
- DefaultBindingPropertyAttribute.cs
- IpcClientManager.cs
- OleDbInfoMessageEvent.cs
- MetadataItem.cs
- XmlAutoDetectWriter.cs
- ProfileSection.cs
- SocketAddress.cs
- WebPartZoneCollection.cs
- SchemaCollectionPreprocessor.cs
- TemplateControl.cs
- RequestNavigateEventArgs.cs
- EnumMember.cs
- DoubleAnimationClockResource.cs
- PersistChildrenAttribute.cs
- InvalidDataException.cs
- FontInfo.cs
- RegisteredArrayDeclaration.cs
- Highlights.cs
- DelayedRegex.cs
- DrawListViewColumnHeaderEventArgs.cs
- ThemeConfigurationDialog.cs
- EventlogProvider.cs
- HttpGetProtocolImporter.cs
- TextParagraph.cs
- FloaterParagraph.cs
- ToolTipAutomationPeer.cs
- Expression.cs
- HotSpotCollection.cs
- TypographyProperties.cs
- Line.cs
- SynchronizationContext.cs
- XamlVector3DCollectionSerializer.cs
- ParamArrayAttribute.cs
- SpellerHighlightLayer.cs
- QueryStringHandler.cs
- ColumnWidthChangedEvent.cs
- XPathParser.cs
- NativeMethods.cs
- PackageFilter.cs
- ReplyAdapterChannelListener.cs
- CellLabel.cs
- TemplateControlBuildProvider.cs
- XPathDocument.cs
- ThreadInterruptedException.cs
- TypeUsageBuilder.cs
- WMIGenerator.cs
- TraceContextRecord.cs
- Binding.cs
- SyncMethodInvoker.cs
- VSWCFServiceContractGenerator.cs
- CodeDirectiveCollection.cs
- WebServicesSection.cs
- Padding.cs
- AnnotationHelper.cs
- Literal.cs
- EncoderReplacementFallback.cs
- InheritanceAttribute.cs
- TextBoxView.cs
- XmlTextReaderImplHelpers.cs
- DesignerForm.cs
- PriorityQueue.cs
- StorageBasedPackageProperties.cs