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
- HttpRequestCacheValidator.cs
- DataGridViewCellStyle.cs
- TableCellsCollectionEditor.cs
- CompilationLock.cs
- WebPartDescription.cs
- XmlCountingReader.cs
- ReadOnlyPropertyMetadata.cs
- WebGetAttribute.cs
- FocusChangedEventArgs.cs
- Automation.cs
- LicenseProviderAttribute.cs
- QilTernary.cs
- BinaryConverter.cs
- ZipIOExtraField.cs
- ClientTargetSection.cs
- RotateTransform.cs
- ClonableStack.cs
- ResourceIDHelper.cs
- XmlILOptimizerVisitor.cs
- UrlMapping.cs
- WebEncodingValidator.cs
- CultureInfoConverter.cs
- StreamWithDictionary.cs
- PersonalizableAttribute.cs
- XPathExpr.cs
- PageSettings.cs
- MessageQueueException.cs
- RuleSettingsCollection.cs
- ImagingCache.cs
- PersistencePipeline.cs
- OdbcConnection.cs
- StateDesigner.LayoutSelectionGlyph.cs
- SharedStatics.cs
- SqlBulkCopyColumnMapping.cs
- GuidTagList.cs
- Regex.cs
- httpstaticobjectscollection.cs
- LambdaCompiler.Logical.cs
- XmlCustomFormatter.cs
- XsdDateTime.cs
- TextRangeBase.cs
- OracleParameter.cs
- Rotation3DAnimationUsingKeyFrames.cs
- XmlRawWriter.cs
- LambdaCompiler.Lambda.cs
- SqlClientWrapperSmiStream.cs
- XpsTokenContext.cs
- TransformationRules.cs
- TextTreeTextNode.cs
- BaseCodeDomTreeGenerator.cs
- RequestStatusBarUpdateEventArgs.cs
- ProviderConnectionPoint.cs
- AnonymousIdentificationSection.cs
- HtmlEmptyTagControlBuilder.cs
- DataKeyArray.cs
- EncoderBestFitFallback.cs
- FactoryMaker.cs
- NamedObject.cs
- ManagementException.cs
- DescendantOverDescendantQuery.cs
- EntityTypeEmitter.cs
- TabletDeviceInfo.cs
- ProjectedSlot.cs
- ManagementObjectCollection.cs
- FileDocument.cs
- SubpageParaClient.cs
- RoutedEventArgs.cs
- DockingAttribute.cs
- HtmlInputCheckBox.cs
- ProxyWebPart.cs
- StatusBarAutomationPeer.cs
- Duration.cs
- Rect.cs
- BamlRecordHelper.cs
- WindowsFormsSectionHandler.cs
- FilterEventArgs.cs
- OleDbMetaDataFactory.cs
- EditorPartChrome.cs
- DocumentViewerBaseAutomationPeer.cs
- SystemResourceKey.cs
- InputScope.cs
- DesignTimeData.cs
- RelationshipFixer.cs
- ConstraintManager.cs
- HtmlWindow.cs
- SchemaTableOptionalColumn.cs
- CodeLinePragma.cs
- BooleanSwitch.cs
- odbcmetadatacolumnnames.cs
- RegistrationServices.cs
- BookmarkTable.cs
- TemplateControlBuildProvider.cs
- CollectionConverter.cs
- DataGridComponentEditor.cs
- CellQuery.cs
- hwndwrapper.cs
- DataControlPagerLinkButton.cs
- CollectionDataContract.cs
- File.cs
- VisualBrush.cs