Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / QIL / WhitespaceRule.cs / 5 / 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
- CompositeCollectionView.cs
- Attributes.cs
- XPathNodePointer.cs
- ConstraintCollection.cs
- ClientProtocol.cs
- _ConnectOverlappedAsyncResult.cs
- Geometry3D.cs
- TreeNode.cs
- SymDocumentType.cs
- PriorityRange.cs
- BooleanStorage.cs
- HelpOperationInvoker.cs
- Win32.cs
- RandomDelayQueuedSendsAsyncResult.cs
- RenderOptions.cs
- TextViewSelectionProcessor.cs
- Stylus.cs
- SqlDataReader.cs
- QilXmlReader.cs
- HttpCacheVaryByContentEncodings.cs
- XmlSchema.cs
- SignedPkcs7.cs
- Crc32.cs
- WebPartConnectionsCancelEventArgs.cs
- Internal.cs
- DefaultTextStoreTextComposition.cs
- KeyboardEventArgs.cs
- BindStream.cs
- SourceFilter.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- CatalogZone.cs
- MdiWindowListStrip.cs
- ImageClickEventArgs.cs
- ComponentCollection.cs
- ToolStrip.cs
- DbTransaction.cs
- GuidConverter.cs
- UnsignedPublishLicense.cs
- SQLStringStorage.cs
- ProcessProtocolHandler.cs
- XPathCompileException.cs
- InfoCardTrace.cs
- __ConsoleStream.cs
- TriggerActionCollection.cs
- SoapAttributes.cs
- TreeViewItemAutomationPeer.cs
- WebPartTracker.cs
- ComponentEditorPage.cs
- CategoryNameCollection.cs
- SchemaImporterExtensionElementCollection.cs
- NullableConverter.cs
- CommonProperties.cs
- DBSchemaTable.cs
- XPathNodePointer.cs
- DataGridState.cs
- WorkflowDefinitionDispenser.cs
- GorillaCodec.cs
- QualifiedCellIdBoolean.cs
- RegexParser.cs
- CheckoutException.cs
- IndexerNameAttribute.cs
- CatalogPartChrome.cs
- ManualResetEvent.cs
- NavigationExpr.cs
- SqlServer2KCompatibilityAnnotation.cs
- NumberFormatter.cs
- grammarelement.cs
- basecomparevalidator.cs
- FilterException.cs
- SecurityDescriptor.cs
- CodeExpressionCollection.cs
- RequestSecurityTokenSerializer.cs
- XhtmlConformanceSection.cs
- SQLDouble.cs
- TypographyProperties.cs
- SplitContainer.cs
- SafeRegistryHandle.cs
- IDQuery.cs
- DeferredReference.cs
- RemotingAttributes.cs
- SQLInt64.cs
- TextEditorCopyPaste.cs
- NotConverter.cs
- NamespaceCollection.cs
- XmlSchemaAnnotated.cs
- PeerNameRecordCollection.cs
- PeerObject.cs
- WorkflowNamespace.cs
- ConfigurationLockCollection.cs
- VersionPair.cs
- DataGridRowHeaderAutomationPeer.cs
- DynamicFilter.cs
- ProcessHostMapPath.cs
- HashCodeCombiner.cs
- BitmapImage.cs
- StringComparer.cs
- QilBinary.cs
- ProfileSettingsCollection.cs
- CollectionViewGroupInternal.cs
- Int16Converter.cs