Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / Baml2006 / Baml2006ReaderFrame.cs / 1305600 / Baml2006ReaderFrame.cs
using System;
using System.Collections.Generic;
using System.Xaml;
using System.Diagnostics;
using MS.Internal.Xaml.Context;
namespace System.Windows.Baml2006
{
internal class Baml2006ReaderFrame : XamlFrame
{
protected Dictionary _namespaces;
public Baml2006ReaderFrame()
{
DelayedConnectionId = -1;
}
public Baml2006ReaderFrame(Baml2006ReaderFrame source)
{
XamlType = source.XamlType;
Member = source.Member;
if (source._namespaces != null)
{
_namespaces = new Dictionary(source._namespaces);
}
}
public override XamlFrame Clone()
{
return new Baml2006ReaderFrame(this);
}
public XamlType XamlType { get; set; }
public XamlMember Member { get; set; }
public KeyRecord Key { get; set; }
public int DelayedConnectionId { get; set; }
public XamlMember ContentProperty { get; set; }
public bool FreezeFreezables { get; set; }
public void AddNamespace(string prefix, string xamlNs)
{
if (null == _namespaces)
{
_namespaces = new Dictionary();
}
_namespaces.Add(prefix, xamlNs);
}
public void SetNamespaces(Dictionary namespaces)
{
_namespaces = namespaces;
}
public bool TryGetNamespaceByPrefix(string prefix, out string xamlNs)
{
if (_namespaces != null && _namespaces.TryGetValue(prefix, out xamlNs))
{
return true;
}
xamlNs = null;
return false;
}
public bool TryGetPrefixByNamespace(string xamlNs, out string prefix)
{
if (_namespaces != null)
{
foreach (KeyValuePair pair in _namespaces)
{
if (pair.Value == xamlNs)
{
prefix = pair.Key;
return true;
}
}
}
prefix = null;
return false;
}
public override void Reset()
{
XamlType = null;
Member = null;
if (_namespaces != null)
{
_namespaces.Clear();
}
Flags = Baml2006ReaderFrameFlags.None;
LineNumber = 0;
LineOffset = 0;
IsDeferredContent = false;
Key = null;
DelayedConnectionId = -1;
ContentProperty = null;
}
public Baml2006ReaderFrameFlags Flags { get; set; }
public int LineNumber { get; set; }
public int LineOffset { get; set; }
public bool IsDeferredContent { get; set; }
}
internal enum Baml2006ReaderFrameFlags:byte
{
None,
IsImplict,
HasImplicitProperty
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartCollection.cs
- _StreamFramer.cs
- UpnEndpointIdentityExtension.cs
- WebPartCollection.cs
- VBCodeProvider.cs
- SessionIDManager.cs
- FloatUtil.cs
- DocumentSequenceHighlightLayer.cs
- ToolStripSeparatorRenderEventArgs.cs
- Splitter.cs
- Message.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- Int32KeyFrameCollection.cs
- BuildProviderAppliesToAttribute.cs
- Error.cs
- MetadataItemSerializer.cs
- ProxyAttribute.cs
- IPEndPoint.cs
- SqlNotificationEventArgs.cs
- LabelDesigner.cs
- HttpVersion.cs
- SponsorHelper.cs
- TreeViewCancelEvent.cs
- BrowserDefinition.cs
- ValueSerializerAttribute.cs
- GraphicsPath.cs
- DataGridViewBand.cs
- MenuScrollingVisibilityConverter.cs
- SettingsBindableAttribute.cs
- DocumentViewerConstants.cs
- PropertyPath.cs
- HyperlinkAutomationPeer.cs
- EventKeyword.cs
- WindowsListViewItem.cs
- QueryContext.cs
- SecurityDocument.cs
- DocumentViewerBase.cs
- UIServiceHelper.cs
- Point.cs
- ExtendedProtectionPolicyElement.cs
- HttpHandlerActionCollection.cs
- ApplicationHost.cs
- DictationGrammar.cs
- CancellationTokenRegistration.cs
- GridPattern.cs
- TextDecoration.cs
- ImportRequest.cs
- ObsoleteAttribute.cs
- OleDbWrapper.cs
- AlignmentYValidation.cs
- StoreItemCollection.cs
- CommandValueSerializer.cs
- LinkedResource.cs
- DetailsViewPageEventArgs.cs
- WorkflowTraceTransfer.cs
- sqlcontext.cs
- DataBoundControlHelper.cs
- ToolStripDropDownClosingEventArgs.cs
- TreeNodeClickEventArgs.cs
- BackStopAuthenticationModule.cs
- XPathDocumentBuilder.cs
- DataGridHeaderBorder.cs
- InternalCache.cs
- ListViewItemSelectionChangedEvent.cs
- AmbientLight.cs
- CompoundFileStorageReference.cs
- SafeProcessHandle.cs
- DependentList.cs
- ResourcePool.cs
- Vector3DAnimationBase.cs
- _CookieModule.cs
- MetadataArtifactLoaderComposite.cs
- CodeMemberField.cs
- StylesEditorDialog.cs
- ResXResourceReader.cs
- ToolStripDropDownMenu.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- StringBuilder.cs
- TextDecorationLocationValidation.cs
- SaveFileDialog.cs
- HostSecurityManager.cs
- IntSecurity.cs
- SmtpCommands.cs
- HttpCapabilitiesSectionHandler.cs
- TwoPhaseCommit.cs
- CssStyleCollection.cs
- StorageAssociationSetMapping.cs
- XmlChoiceIdentifierAttribute.cs
- PropagatorResult.cs
- ListViewItem.cs
- XPathScanner.cs
- Compiler.cs
- SchemaImporterExtensionElementCollection.cs
- FixedSOMFixedBlock.cs
- ValueOfAction.cs
- XmlElementAttribute.cs
- SharedConnectionInfo.cs
- TableRowGroupCollection.cs
- TdsParameterSetter.cs
- DoubleLinkList.cs