Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / XamlBuildTask / Microsoft / Build / Tasks / Xaml / XamlWrappingReader.cs / 1305376 / XamlWrappingReader.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace Microsoft.Build.Tasks.Xaml { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xaml; internal class XamlWrappingReader : XamlReader, IXamlLineInfo { XamlReader _underlyingReader; internal XamlWrappingReader(XamlReader underlyingReader) { if (underlyingReader == null) { throw FxTrace.Exception.AsError(new ArgumentNullException("underlyingReader")); } _underlyingReader = underlyingReader; } public override bool IsEof { get { return _underlyingReader.IsEof; } } public override XamlMember Member { get { return _underlyingReader.Member; } } public override NamespaceDeclaration Namespace { get { return _underlyingReader.Namespace; } } public override XamlNodeType NodeType { get { return _underlyingReader.NodeType; } } public override bool Read() { return _underlyingReader.Read(); } public override XamlSchemaContext SchemaContext { get { return _underlyingReader.SchemaContext; } } public override XamlType Type { get { return _underlyingReader.Type; } } public override object Value { get { return _underlyingReader.Value; } } private IXamlLineInfo LineInfo { get { return _underlyingReader as IXamlLineInfo; } } #region IXamlLineInfo Members public bool HasLineInfo { get { return LineInfo != null && LineInfo.HasLineInfo; } } public int LineNumber { get { return LineInfo == null ? 0 : LineInfo.LineNumber; } } public int LinePosition { get { return LineInfo == null ? 0 : LineInfo.LinePosition; } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace Microsoft.Build.Tasks.Xaml { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xaml; internal class XamlWrappingReader : XamlReader, IXamlLineInfo { XamlReader _underlyingReader; internal XamlWrappingReader(XamlReader underlyingReader) { if (underlyingReader == null) { throw FxTrace.Exception.AsError(new ArgumentNullException("underlyingReader")); } _underlyingReader = underlyingReader; } public override bool IsEof { get { return _underlyingReader.IsEof; } } public override XamlMember Member { get { return _underlyingReader.Member; } } public override NamespaceDeclaration Namespace { get { return _underlyingReader.Namespace; } } public override XamlNodeType NodeType { get { return _underlyingReader.NodeType; } } public override bool Read() { return _underlyingReader.Read(); } public override XamlSchemaContext SchemaContext { get { return _underlyingReader.SchemaContext; } } public override XamlType Type { get { return _underlyingReader.Type; } } public override object Value { get { return _underlyingReader.Value; } } private IXamlLineInfo LineInfo { get { return _underlyingReader as IXamlLineInfo; } } #region IXamlLineInfo Members public bool HasLineInfo { get { return LineInfo != null && LineInfo.HasLineInfo; } } public int LineNumber { get { return LineInfo == null ? 0 : LineInfo.LineNumber; } } public int LinePosition { get { return LineInfo == null ? 0 : LineInfo.LinePosition; } } #endregion } } // 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
- DbProviderFactory.cs
- TreeView.cs
- CapabilitiesSection.cs
- LockCookie.cs
- State.cs
- CharConverter.cs
- TextRangeEditTables.cs
- QueueProcessor.cs
- ITextView.cs
- SafeThemeHandle.cs
- Queue.cs
- CompilationSection.cs
- RunInstallerAttribute.cs
- TargetConverter.cs
- StandardBindingElementCollection.cs
- JoinElimination.cs
- HttpServerProtocol.cs
- Ipv6Element.cs
- Bits.cs
- RegistryPermission.cs
- UriParserTemplates.cs
- X509Extension.cs
- ComponentEvent.cs
- BufferedStream.cs
- SQLChars.cs
- PageContent.cs
- NamespaceInfo.cs
- XmlNamespaceMappingCollection.cs
- ColorDialog.cs
- DependencyPropertyConverter.cs
- TerminatorSinks.cs
- MulticastDelegate.cs
- SecurityPermission.cs
- SectionRecord.cs
- Assert.cs
- EpmHelper.cs
- ServerIdentity.cs
- FormViewModeEventArgs.cs
- SHA384Managed.cs
- SortFieldComparer.cs
- EntityConnectionStringBuilder.cs
- ValueQuery.cs
- ParseElementCollection.cs
- ProfileGroupSettings.cs
- DateTimeUtil.cs
- ApplicationServiceHelper.cs
- CompilationLock.cs
- SoapEnumAttribute.cs
- Maps.cs
- TypedLocationWrapper.cs
- ToolboxItemWrapper.cs
- HtmlImage.cs
- MemberPath.cs
- DataGridViewRowConverter.cs
- RtfToken.cs
- TemplatedMailWebEventProvider.cs
- SoapSchemaMember.cs
- ImageFormat.cs
- Profiler.cs
- PropertySourceInfo.cs
- OdbcConnectionOpen.cs
- ImmutableCollection.cs
- JpegBitmapDecoder.cs
- CatalogPart.cs
- XmlAnyElementAttribute.cs
- RenderData.cs
- SmiContextFactory.cs
- BehaviorEditorPart.cs
- InitializerFacet.cs
- cache.cs
- SqlInternalConnectionSmi.cs
- AxisAngleRotation3D.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- basenumberconverter.cs
- WindowsFormsSectionHandler.cs
- Compilation.cs
- XmlDataSourceNodeDescriptor.cs
- IsolatedStorageFilePermission.cs
- DesignerOptionService.cs
- SystemIcons.cs
- JsonWriterDelegator.cs
- WindowVisualStateTracker.cs
- ClientRuntimeConfig.cs
- XmlUtil.cs
- ReferenceEqualityComparer.cs
- IdentityHolder.cs
- CommonProperties.cs
- ExtentCqlBlock.cs
- ContentPlaceHolder.cs
- TimeZoneNotFoundException.cs
- TextTreeFixupNode.cs
- ImageClickEventArgs.cs
- HitTestWithPointDrawingContextWalker.cs
- DataSourceHelper.cs
- BasicKeyConstraint.cs
- srgsitem.cs
- CopyOfAction.cs
- ApplicationId.cs
- X509InitiatorCertificateServiceElement.cs
- ManagedWndProcTracker.cs