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
- BoundColumn.cs
- TreeView.cs
- TextTabProperties.cs
- BitArray.cs
- OdbcDataReader.cs
- MoveSizeWinEventHandler.cs
- OdbcConnectionOpen.cs
- DecimalAnimation.cs
- QuadraticBezierSegment.cs
- DataObjectSettingDataEventArgs.cs
- HttpModuleCollection.cs
- BufferedStream.cs
- BitmapMetadataBlob.cs
- HyperLinkStyle.cs
- SamlConditions.cs
- ExpressionEditorAttribute.cs
- ParenthesizePropertyNameAttribute.cs
- CaseStatementProjectedSlot.cs
- MemoryPressure.cs
- Pipe.cs
- WebPartZoneDesigner.cs
- SafeTimerHandle.cs
- HttpClientCertificate.cs
- BamlLocalizationDictionary.cs
- Window.cs
- SessionEndedEventArgs.cs
- ListViewDataItem.cs
- PrinterResolution.cs
- ZipIOCentralDirectoryBlock.cs
- WindowsStatic.cs
- BrowserInteropHelper.cs
- RestClientProxyHandler.cs
- X509Extension.cs
- CircleHotSpot.cs
- CodeNamespaceCollection.cs
- OracleEncoding.cs
- GraphicsContext.cs
- WebPartZoneCollection.cs
- DataGridViewTextBoxEditingControl.cs
- NotEqual.cs
- MessageDesigner.cs
- HijriCalendar.cs
- FormViewUpdatedEventArgs.cs
- StorageInfo.cs
- DefaultValueTypeConverter.cs
- SafeArrayRankMismatchException.cs
- FloatAverageAggregationOperator.cs
- FreezableDefaultValueFactory.cs
- Event.cs
- Point3DCollection.cs
- MonthCalendar.cs
- PhysicalAddress.cs
- ISFClipboardData.cs
- TcpConnectionPoolSettingsElement.cs
- TextPointerBase.cs
- PolicyException.cs
- CompiledQueryCacheKey.cs
- PasswordRecoveryDesigner.cs
- ZipIOExtraFieldZip64Element.cs
- UIAgentAsyncParams.cs
- FilterException.cs
- InfiniteTimeSpanConverter.cs
- UrlAuthorizationModule.cs
- FileDialogCustomPlacesCollection.cs
- ToolStripProgressBar.cs
- ParameterBuilder.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DrawingCollection.cs
- SecurityElement.cs
- EdmEntityTypeAttribute.cs
- DesignerVerb.cs
- unsafenativemethodsother.cs
- GridView.cs
- LowerCaseStringConverter.cs
- DocumentPageHost.cs
- CodeExporter.cs
- ProtocolsConfiguration.cs
- ThumbAutomationPeer.cs
- TextParagraphProperties.cs
- MailDefinition.cs
- SlotInfo.cs
- TreeNodeStyle.cs
- DataRecord.cs
- XmlAggregates.cs
- InputLanguageCollection.cs
- UITypeEditor.cs
- ApplyHostConfigurationBehavior.cs
- DataColumnChangeEvent.cs
- SchemaTableColumn.cs
- CodeTypeReferenceExpression.cs
- JobStaple.cs
- MenuItemStyleCollection.cs
- SqlUdtInfo.cs
- MailAddress.cs
- DateRangeEvent.cs
- FilteredDataSetHelper.cs
- IxmlLineInfo.cs
- DoubleCollectionValueSerializer.cs
- Calendar.cs
- FilterException.cs