Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Markup / XamlDesignerSerializationManager.cs / 1 / XamlDesignerSerializationManager.cs
//---------------------------------------------------------------------------- // // File: XamlDesignerSerializationManager.cs // // Description: // Manages the ContextStack for a particular run of Serialization. // // Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; using System.Xml; namespace System.Windows.Markup { ////// The serialization manager offers three services /// 1. To store all of the context information /// for the current run of serialization on a stack. /// 2. To query a given type for its serializer. /// 3. To get and set the serialization mode for /// a given Expression type /// ////// As a measure of optimization it also /// maintains a cache mapping types to /// serializers, to avoid the overhead of /// reflecting for the attribute on every /// query. /// /// /// // public class XamlDesignerSerializationManager : ServiceProviders { #region Construction ////// Constructor for XamlDesignerSerializationManager /// /// /// XmlWriter /// public XamlDesignerSerializationManager(XmlWriter xmlWriter) { _xamlWriterMode = XamlWriterMode.Value; _xmlWriter = xmlWriter; } #endregion Construction #region Properties ////// The mode of serialization for /// all Expressions /// public XamlWriterMode XamlWriterMode { get { return _xamlWriterMode; } set { // Validate Input Arguments if (!IsValidXamlWriterMode(value)) { throw new InvalidEnumArgumentException("value", (int)value, typeof(XamlWriterMode)); } _xamlWriterMode = value; } } ////// XmlWriter /// internal XmlWriter XmlWriter { get { return _xmlWriter; } } #endregion Properties #region Internal Methods internal void ClearXmlWriter() { _xmlWriter = null; } #endregion #region Private Methods private static bool IsValidXamlWriterMode(XamlWriterMode value) { return value == XamlWriterMode.Value || value == XamlWriterMode.Expression; } #endregion #region Data private XamlWriterMode _xamlWriterMode; // Serialization modes private XmlWriter _xmlWriter; //XmlWriter #endregion Data } } // 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
- PropertyMetadata.cs
- JsonDeserializer.cs
- _SingleItemRequestCache.cs
- SmiEventSink_DeferedProcessing.cs
- ProfileService.cs
- TabRenderer.cs
- RemotingSurrogateSelector.cs
- RegexGroupCollection.cs
- XmlReader.cs
- Renderer.cs
- SessionEndingCancelEventArgs.cs
- AxImporter.cs
- WebPartConnectVerb.cs
- HtmlFormWrapper.cs
- XamlSerializationHelper.cs
- PropertyRef.cs
- XmlSchemaObjectTable.cs
- FileDetails.cs
- RootBrowserWindowProxy.cs
- CodeTypeConstructor.cs
- HelpPage.cs
- ConnectionManagementElement.cs
- ApplicationProxyInternal.cs
- PresentationAppDomainManager.cs
- ListViewItem.cs
- PageAction.cs
- Inflater.cs
- ToolboxComponentsCreatingEventArgs.cs
- Merger.cs
- BinaryMethodMessage.cs
- GenericFlowSwitchHelper.cs
- PageRanges.cs
- EntityDesignerUtils.cs
- MemoryPressure.cs
- CollectionChangedEventManager.cs
- TaskFormBase.cs
- InputLanguageProfileNotifySink.cs
- RelationshipEndMember.cs
- StateDesigner.CommentLayoutGlyph.cs
- WebEventCodes.cs
- Color.cs
- QuaternionIndependentAnimationStorage.cs
- Image.cs
- TextEffect.cs
- EventLogger.cs
- IsolatedStorageFile.cs
- WindowsToolbarItemAsMenuItem.cs
- LowerCaseStringConverter.cs
- SemaphoreSecurity.cs
- RemoveStoryboard.cs
- SingleTagSectionHandler.cs
- ListViewUpdateEventArgs.cs
- LeafCellTreeNode.cs
- KeyEvent.cs
- WorkflowLayouts.cs
- LazyTextWriterCreator.cs
- Padding.cs
- ObjectListSelectEventArgs.cs
- LabelEditEvent.cs
- DataGridCommandEventArgs.cs
- XpsViewerException.cs
- SmtpAuthenticationManager.cs
- Logging.cs
- ZipIOLocalFileBlock.cs
- ToolStripSeparator.cs
- StoreItemCollection.Loader.cs
- GlyphRunDrawing.cs
- WebReferenceCollection.cs
- XmlnsDictionary.cs
- externdll.cs
- QilValidationVisitor.cs
- NullEntityWrapper.cs
- UnauthorizedAccessException.cs
- OutputCacheSettings.cs
- ReaderWriterLockWrapper.cs
- SecurityRequiresReviewAttribute.cs
- DataGridTextBox.cs
- CodeDOMProvider.cs
- ProfileInfo.cs
- BinarySerializer.cs
- DiscardableAttribute.cs
- SoapAttributeOverrides.cs
- VScrollProperties.cs
- WorkflowOwnerAsyncResult.cs
- ListControl.cs
- EUCJPEncoding.cs
- FunctionGenerator.cs
- DynamicQueryableWrapper.cs
- TextEffect.cs
- AccessText.cs
- FixedDocumentPaginator.cs
- GridViewItemAutomationPeer.cs
- WindowsButton.cs
- ServiceRoute.cs
- LingerOption.cs
- VarRefManager.cs
- ServiceOperation.cs
- ConnectionManagementElement.cs
- InputLanguageEventArgs.cs
- Version.cs