Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / XamlDesignerSerializationManager.cs / 1305600 / 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
- ObjectList.cs
- BaseTreeIterator.cs
- SID.cs
- StickyNoteAnnotations.cs
- Serializer.cs
- ColorAnimationBase.cs
- TraceHandler.cs
- KeyFrames.cs
- NativeObjectSecurity.cs
- ToolTip.cs
- WizardDesigner.cs
- ReliableSessionBindingElement.cs
- WindowClosedEventArgs.cs
- MaterialGroup.cs
- IndexOutOfRangeException.cs
- TextPointerBase.cs
- StyleBamlRecordReader.cs
- RunClient.cs
- EventLogEntry.cs
- RelativeSource.cs
- FrameworkObject.cs
- ListViewPagedDataSource.cs
- DetailsViewModeEventArgs.cs
- FrameworkElementFactory.cs
- DataSourceControl.cs
- WebPartDescription.cs
- ImageAutomationPeer.cs
- PrintDialog.cs
- InputReportEventArgs.cs
- __Error.cs
- StringAnimationUsingKeyFrames.cs
- DataGridViewImageColumn.cs
- LogicalExpr.cs
- TreeViewImageIndexConverter.cs
- TextBoxBase.cs
- SqlUtil.cs
- DefaultSerializationProviderAttribute.cs
- EndpointDiscoveryMetadata11.cs
- X509Extension.cs
- UserControlParser.cs
- ChildrenQuery.cs
- PointLightBase.cs
- ExpressionBuilder.cs
- ConfigurationStrings.cs
- PerformanceCounterPermissionEntry.cs
- SingleSelectRootGridEntry.cs
- PenContext.cs
- QueryRewriter.cs
- HijriCalendar.cs
- FilterEventArgs.cs
- URLMembershipCondition.cs
- SpotLight.cs
- ToolStripDropDownButton.cs
- TextContainerHelper.cs
- ValidatorCompatibilityHelper.cs
- PerformanceCounterPermissionAttribute.cs
- Converter.cs
- CharKeyFrameCollection.cs
- XPathMultyIterator.cs
- LogAppendAsyncResult.cs
- PackageDigitalSignatureManager.cs
- SHA256Managed.cs
- EntityTypeEmitter.cs
- BamlLocalizationDictionary.cs
- CodeSnippetStatement.cs
- OleServicesContext.cs
- OleDbErrorCollection.cs
- ExpressionParser.cs
- RegistrationServices.cs
- ProcessRequestArgs.cs
- TextCollapsingProperties.cs
- AnimatedTypeHelpers.cs
- XmlWriterTraceListener.cs
- DocumentXmlWriter.cs
- AssemblyAttributes.cs
- Win32PrintDialog.cs
- Int32AnimationBase.cs
- AuthorizationRuleCollection.cs
- TreeView.cs
- SimpleFieldTemplateUserControl.cs
- TableStyle.cs
- EntityViewGenerationAttribute.cs
- SessionStateSection.cs
- ObjectView.cs
- EarlyBoundInfo.cs
- ManagedIStream.cs
- listitem.cs
- DataGridViewColumn.cs
- SplineQuaternionKeyFrame.cs
- RelationshipType.cs
- SpellerStatusTable.cs
- WindowsFormsSectionHandler.cs
- CachedFontFamily.cs
- SpellerError.cs
- Control.cs
- DetailsViewInsertedEventArgs.cs
- Message.cs
- CollectionBase.cs
- RuntimeWrappedException.cs
- Types.cs