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
- Soap11ServerProtocol.cs
- SqlDataSourceQueryEditor.cs
- MouseButtonEventArgs.cs
- HtmlInputPassword.cs
- ConfigurationManagerHelper.cs
- NextPreviousPagerField.cs
- ProviderException.cs
- Update.cs
- Utils.cs
- HitTestParameters3D.cs
- HwndSourceParameters.cs
- InheritedPropertyChangedEventArgs.cs
- TableColumnCollectionInternal.cs
- SqlAliasesReferenced.cs
- SqlUtils.cs
- Claim.cs
- Model3DGroup.cs
- Rights.cs
- LineServicesRun.cs
- FormsAuthenticationEventArgs.cs
- TypeTypeConverter.cs
- ContentElement.cs
- FastEncoderWindow.cs
- SetStateEventArgs.cs
- AuthorizationPolicyTypeElement.cs
- RemoveStoryboard.cs
- MergablePropertyAttribute.cs
- SystemWebExtensionsSectionGroup.cs
- DataServiceResponse.cs
- SqlReorderer.cs
- DrawListViewItemEventArgs.cs
- CodeDOMProvider.cs
- safex509handles.cs
- Base64Stream.cs
- SqlClientWrapperSmiStreamChars.cs
- SqlAggregateChecker.cs
- IdentityValidationException.cs
- WindowsNonControl.cs
- RelationshipConverter.cs
- XmlName.cs
- EncryptedReference.cs
- SqlException.cs
- AffineTransform3D.cs
- DataBoundControlHelper.cs
- XmlAttributeCache.cs
- Rect3DValueSerializer.cs
- login.cs
- DependencyPropertyKind.cs
- TriggerActionCollection.cs
- DoubleCollectionValueSerializer.cs
- SoapIgnoreAttribute.cs
- TdsRecordBufferSetter.cs
- AQNBuilder.cs
- TreeViewEvent.cs
- HttpBrowserCapabilitiesBase.cs
- SchemaCollectionPreprocessor.cs
- DiagnosticsConfigurationHandler.cs
- BindingContext.cs
- RolePrincipal.cs
- EncoderFallback.cs
- ToolStripSeparatorRenderEventArgs.cs
- ParseNumbers.cs
- WebServicesInteroperability.cs
- x509store.cs
- Misc.cs
- SyndicationSerializer.cs
- XmlSerializerFactory.cs
- BStrWrapper.cs
- EnumMember.cs
- UdpDiscoveryEndpointElement.cs
- SiteMapNodeItemEventArgs.cs
- LinkDescriptor.cs
- WsdlBuildProvider.cs
- ProfilePropertySettingsCollection.cs
- TraceUtility.cs
- GridSplitterAutomationPeer.cs
- BoolExpr.cs
- TextSelectionProcessor.cs
- SerializationSectionGroup.cs
- Point3DCollection.cs
- CharacterString.cs
- DataGridViewCellStateChangedEventArgs.cs
- CacheDependency.cs
- LayoutEditorPart.cs
- FixedHyperLink.cs
- FocusWithinProperty.cs
- MergeExecutor.cs
- CaseInsensitiveHashCodeProvider.cs
- SqlProviderUtilities.cs
- AvTraceFormat.cs
- Rectangle.cs
- ListBindableAttribute.cs
- SecurityDescriptor.cs
- ConnectionPool.cs
- SnapLine.cs
- ExpressionEvaluator.cs
- HttpListenerTimeoutManager.cs
- BufferedGraphicsContext.cs
- ScriptHandlerFactory.cs
- DataGridViewCellCollection.cs