Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / QIL / WhitespaceRule.cs / 1 / WhitespaceRule.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
//-----------------------------------------------------------------------------
using System.Diagnostics;
using System.IO;
using System.Xml.Xsl.Runtime;
namespace System.Xml.Xsl.Qil {
///
/// Data structure for storing whitespace rules generated by xsl:strip-space and xsl:preserve-space
///
internal class WhitespaceRule {
private string localName;
private string namespaceName;
private bool preserveSpace;
///
/// Allow derived classes to construct empty whitespace rule.
///
protected WhitespaceRule() {
}
///
/// Construct new whitespace rule.
///
public WhitespaceRule(string localName, string namespaceName, bool preserveSpace) {
Init(localName, namespaceName, preserveSpace);
}
///
/// Initialize whitespace rule after it's been constructed.
///
protected void Init(string localName, string namespaceName, bool preserveSpace) {
this.localName = localName;
this.namespaceName = namespaceName;
this.preserveSpace = preserveSpace;
}
///
/// Local name of the element.
///
public string LocalName {
get { return localName; }
set { localName = value; }
}
///
/// Namespace name (uri) of the element.
///
public string NamespaceName {
get { return namespaceName; }
set { namespaceName = value; }
}
///
/// True, if this element is whitespace-preserving.
/// False, if this element is whitespace-stripping.
///
public bool PreserveSpace {
get { return preserveSpace; }
}
///
/// Serialize the object to BinaryWriter.
///
public void GetObjectData(XmlQueryDataWriter writer) {
Debug.Assert(this.GetType() == typeof(WhitespaceRule), "Serialization of WhitespaceRule subclasses is not implemented");
// string localName;
writer.WriteStringQ(localName);
// string namespaceName;
writer.WriteStringQ(namespaceName);
// bool preserveSpace;
writer.Write(preserveSpace);
}
///
/// Deserialize the object from BinaryReader.
///
public WhitespaceRule(XmlQueryDataReader reader) {
// string localName;
this.localName = reader.ReadStringQ();
// string namespaceName;
this.namespaceName = reader.ReadStringQ();
// bool preserveSpace;
this.preserveSpace = reader.ReadBoolean();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
//-----------------------------------------------------------------------------
using System.Diagnostics;
using System.IO;
using System.Xml.Xsl.Runtime;
namespace System.Xml.Xsl.Qil {
///
/// Data structure for storing whitespace rules generated by xsl:strip-space and xsl:preserve-space
///
internal class WhitespaceRule {
private string localName;
private string namespaceName;
private bool preserveSpace;
///
/// Allow derived classes to construct empty whitespace rule.
///
protected WhitespaceRule() {
}
///
/// Construct new whitespace rule.
///
public WhitespaceRule(string localName, string namespaceName, bool preserveSpace) {
Init(localName, namespaceName, preserveSpace);
}
///
/// Initialize whitespace rule after it's been constructed.
///
protected void Init(string localName, string namespaceName, bool preserveSpace) {
this.localName = localName;
this.namespaceName = namespaceName;
this.preserveSpace = preserveSpace;
}
///
/// Local name of the element.
///
public string LocalName {
get { return localName; }
set { localName = value; }
}
///
/// Namespace name (uri) of the element.
///
public string NamespaceName {
get { return namespaceName; }
set { namespaceName = value; }
}
///
/// True, if this element is whitespace-preserving.
/// False, if this element is whitespace-stripping.
///
public bool PreserveSpace {
get { return preserveSpace; }
}
///
/// Serialize the object to BinaryWriter.
///
public void GetObjectData(XmlQueryDataWriter writer) {
Debug.Assert(this.GetType() == typeof(WhitespaceRule), "Serialization of WhitespaceRule subclasses is not implemented");
// string localName;
writer.WriteStringQ(localName);
// string namespaceName;
writer.WriteStringQ(namespaceName);
// bool preserveSpace;
writer.Write(preserveSpace);
}
///
/// Deserialize the object from BinaryReader.
///
public WhitespaceRule(XmlQueryDataReader reader) {
// string localName;
this.localName = reader.ReadStringQ();
// string namespaceName;
this.namespaceName = reader.ReadStringQ();
// bool preserveSpace;
this.preserveSpace = reader.ReadBoolean();
}
}
}
// 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
- WsdlImporterElement.cs
- PathParser.cs
- Set.cs
- MatrixAnimationBase.cs
- ToolboxItemLoader.cs
- ConnectionConsumerAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- XmlSchemaCollection.cs
- SwitchLevelAttribute.cs
- PipelineModuleStepContainer.cs
- Vector3DCollectionConverter.cs
- SecureStringHasher.cs
- DynamicHyperLink.cs
- MatrixStack.cs
- FormViewDeletedEventArgs.cs
- ApplicationManager.cs
- UrlMappingsSection.cs
- DeleteIndexBinder.cs
- ZeroOpNode.cs
- LineBreakRecord.cs
- Stroke2.cs
- WebServiceHost.cs
- CodeSnippetStatement.cs
- DataGridAddNewRow.cs
- StreamInfo.cs
- XmlLinkedNode.cs
- FixedLineResult.cs
- ElementHostPropertyMap.cs
- M3DUtil.cs
- ScrollItemProviderWrapper.cs
- PkcsUtils.cs
- NetworkAddressChange.cs
- SqlBulkCopy.cs
- SplitterPanel.cs
- SslStream.cs
- DataListItemEventArgs.cs
- RightsManagementInformation.cs
- TextAdaptor.cs
- RunClient.cs
- SectionUpdates.cs
- GPRECT.cs
- StateInitializationDesigner.cs
- DurableErrorHandler.cs
- WebPartCatalogAddVerb.cs
- UdpDuplexChannel.cs
- SqlXmlStorage.cs
- RegisteredArrayDeclaration.cs
- X509ChainElement.cs
- WriteableBitmap.cs
- RegexCompilationInfo.cs
- UncommonField.cs
- TextProviderWrapper.cs
- SizeAnimation.cs
- SerializationAttributes.cs
- JpegBitmapEncoder.cs
- BoundPropertyEntry.cs
- OracleTimeSpan.cs
- SQLDateTime.cs
- Repeater.cs
- QuaternionAnimation.cs
- PathData.cs
- uribuilder.cs
- ExeConfigurationFileMap.cs
- Message.cs
- DateTimeConstantAttribute.cs
- ExtendedPropertyDescriptor.cs
- KeyBinding.cs
- ExpressionLexer.cs
- SmtpDigestAuthenticationModule.cs
- XmlFormatExtensionAttribute.cs
- XmlSchemaGroupRef.cs
- FixedSOMPageElement.cs
- SqlCommand.cs
- CellIdBoolean.cs
- Range.cs
- ButtonBaseAdapter.cs
- SimpleBitVector32.cs
- MexTcpBindingElement.cs
- VisualTreeHelper.cs
- TraceRecord.cs
- EventProviderWriter.cs
- ConfigDefinitionUpdates.cs
- QilStrConcatenator.cs
- OuterGlowBitmapEffect.cs
- ProfileManager.cs
- StateDesigner.CommentLayoutGlyph.cs
- __Filters.cs
- DesignerVerbCollection.cs
- AspNetHostingPermission.cs
- QilInvoke.cs
- DescendantQuery.cs
- MulticastNotSupportedException.cs
- GridViewAutomationPeer.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ResourceProviderFactory.cs
- MainMenu.cs
- StorageEntityContainerMapping.cs
- WeakEventManager.cs
- DataBinder.cs
- XmlSecureResolver.cs