Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TextAction.cs / 1305376 / TextAction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; using System.Xml.XPath; internal class TextAction : CompiledAction { private bool disableOutputEscaping; private string text; internal override void Compile(Compiler compiler) { CompileAttributes(compiler); CompileContent(compiler); } internal override bool CompileAttribute(Compiler compiler) { string name = compiler.Input.LocalName; string value = compiler.Input.Value; if (Ref.Equal(name, compiler.Atoms.DisableOutputEscaping)) { this.disableOutputEscaping = compiler.GetYesNo(value); } else { return false; } return true; } private void CompileContent(Compiler compiler) { if (compiler.Recurse()) { NavigatorInput input = compiler.Input; this.text = string.Empty; do { switch (input.NodeType) { case XPathNodeType.Text: case XPathNodeType.Whitespace: case XPathNodeType.SignificantWhitespace: this.text += input.Value; break; case XPathNodeType.Comment: case XPathNodeType.ProcessingInstruction: break; default: throw compiler.UnexpectedKeyword(); } } while(compiler.Advance()); compiler.ToParent(); } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: if (processor.TextEvent(this.text, disableOutputEscaping)) { frame.Finished(); } break; default: Debug.Fail("Invalid execution state in TextAction"); break; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; using System.Xml.XPath; internal class TextAction : CompiledAction { private bool disableOutputEscaping; private string text; internal override void Compile(Compiler compiler) { CompileAttributes(compiler); CompileContent(compiler); } internal override bool CompileAttribute(Compiler compiler) { string name = compiler.Input.LocalName; string value = compiler.Input.Value; if (Ref.Equal(name, compiler.Atoms.DisableOutputEscaping)) { this.disableOutputEscaping = compiler.GetYesNo(value); } else { return false; } return true; } private void CompileContent(Compiler compiler) { if (compiler.Recurse()) { NavigatorInput input = compiler.Input; this.text = string.Empty; do { switch (input.NodeType) { case XPathNodeType.Text: case XPathNodeType.Whitespace: case XPathNodeType.SignificantWhitespace: this.text += input.Value; break; case XPathNodeType.Comment: case XPathNodeType.ProcessingInstruction: break; default: throw compiler.UnexpectedKeyword(); } } while(compiler.Advance()); compiler.ToParent(); } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: if (processor.TextEvent(this.text, disableOutputEscaping)) { frame.Finished(); } break; default: Debug.Fail("Invalid execution state in TextAction"); break; } } } } // 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
- ColorContext.cs
- WebPartAuthorizationEventArgs.cs
- ListComponentEditorPage.cs
- validation.cs
- WorkItem.cs
- RequiredFieldValidator.cs
- PatternMatcher.cs
- DataControlButton.cs
- DesignerWithHeader.cs
- ObjectDataSourceWizardForm.cs
- AutomationEventArgs.cs
- XmlSchemaInfo.cs
- SafeSecurityHandles.cs
- BitmapEffectGroup.cs
- ProgressChangedEventArgs.cs
- Msec.cs
- UITypeEditor.cs
- InvalidCastException.cs
- TransformCryptoHandle.cs
- SoundPlayerAction.cs
- ToolStripDropTargetManager.cs
- QilInvokeLateBound.cs
- Span.cs
- MediaElement.cs
- SocketAddress.cs
- ObjectPropertyMapping.cs
- DataTable.cs
- DateTimeConverter.cs
- AutomationElementCollection.cs
- PageAdapter.cs
- NativeMethods.cs
- Compensate.cs
- UserControlParser.cs
- SqlStream.cs
- DesignerToolboxInfo.cs
- DataStreamFromComStream.cs
- login.cs
- RegexTree.cs
- Selector.cs
- CodeGeneratorAttribute.cs
- CoordinationService.cs
- DocumentPageViewAutomationPeer.cs
- SQLBoolean.cs
- AddressUtility.cs
- WebPartVerbCollection.cs
- ElementsClipboardData.cs
- AppDomainEvidenceFactory.cs
- Pkcs7Recipient.cs
- UriScheme.cs
- UserControl.cs
- CodeAttributeDeclaration.cs
- AttributeCollection.cs
- ResXResourceSet.cs
- Inline.cs
- GlobalizationSection.cs
- AttributeConverter.cs
- FacetValues.cs
- PassportPrincipal.cs
- SafeHandles.cs
- IpcServerChannel.cs
- GeneralTransform3D.cs
- ButtonPopupAdapter.cs
- PermissionListSet.cs
- ExtensionFile.cs
- EditingCoordinator.cs
- CodeTypeReferenceCollection.cs
- AuthorizationSection.cs
- SqlUDTStorage.cs
- SiteIdentityPermission.cs
- SqlClientWrapperSmiStreamChars.cs
- PageEventArgs.cs
- UpdateManifestForBrowserApplication.cs
- PeerApplication.cs
- ToolboxDataAttribute.cs
- ErrorWebPart.cs
- TextSerializer.cs
- SaveFileDialog.cs
- PrimaryKeyTypeConverter.cs
- ScrollViewer.cs
- ToolStripInSituService.cs
- DupHandleConnectionReader.cs
- AjaxFrameworkAssemblyAttribute.cs
- TemplateLookupAction.cs
- ClientSponsor.cs
- XmlSchemaProviderAttribute.cs
- WebUtil.cs
- ImageCreator.cs
- FontDialog.cs
- DataGridViewBand.cs
- CultureTable.cs
- MenuItem.cs
- SafePipeHandle.cs
- SqlStream.cs
- ItemContainerGenerator.cs
- ObjectCloneHelper.cs
- SchemaNotation.cs
- SchemaAttDef.cs
- AcceleratedTokenProvider.cs
- TreeIterators.cs
- StringAnimationBase.cs