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
- IdentitySection.cs
- SystemInfo.cs
- SwitchElementsCollection.cs
- DataGridLinkButton.cs
- SecurityTokenRequirement.cs
- XmlSignatureManifest.cs
- PageAdapter.cs
- ReadOnlyDataSource.cs
- WebEventTraceProvider.cs
- StreamUpgradeProvider.cs
- EdmFunctions.cs
- XmlWrappingReader.cs
- _BufferOffsetSize.cs
- BaseTemplateBuildProvider.cs
- XmlSchemaSimpleContentExtension.cs
- OleDbRowUpdatedEvent.cs
- regiisutil.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- AudioFormatConverter.cs
- ContainerParaClient.cs
- WebPartDescription.cs
- PointValueSerializer.cs
- AsyncPostBackErrorEventArgs.cs
- CommandDesigner.cs
- SqlNodeAnnotation.cs
- PackageDigitalSignature.cs
- WebPartEditVerb.cs
- AstTree.cs
- BulletedList.cs
- ChangePassword.cs
- TaskFileService.cs
- ObjectSecurityT.cs
- SqlDataSourceCustomCommandEditor.cs
- ImplicitInputBrush.cs
- MasterPage.cs
- CryptoKeySecurity.cs
- ReadOnlyCollectionBase.cs
- LicenseException.cs
- ExcludeFromCodeCoverageAttribute.cs
- XmlUtilWriter.cs
- SQLDateTime.cs
- UserValidatedEventArgs.cs
- NeutralResourcesLanguageAttribute.cs
- OleDbStruct.cs
- HwndHostAutomationPeer.cs
- NavigationCommands.cs
- Duration.cs
- ResolveCriteriaApril2005.cs
- Size3D.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SHA512.cs
- DataReceivedEventArgs.cs
- ToolboxCategoryItems.cs
- SizeAnimationClockResource.cs
- TabPanel.cs
- DispatcherProcessingDisabled.cs
- ObjectListCommandEventArgs.cs
- MobileUITypeEditor.cs
- Vector3DCollectionValueSerializer.cs
- ISCIIEncoding.cs
- LinkButton.cs
- ResourceManager.cs
- DriveNotFoundException.cs
- D3DImage.cs
- ApplicationSecurityInfo.cs
- SendSecurityHeaderElement.cs
- JumpItem.cs
- KeyedQueue.cs
- TagPrefixAttribute.cs
- FlowDocumentPage.cs
- ThousandthOfEmRealPoints.cs
- DataObjectMethodAttribute.cs
- UIPermission.cs
- BinaryParser.cs
- CollectionCodeDomSerializer.cs
- Logging.cs
- SqlBulkCopyColumnMapping.cs
- PerspectiveCamera.cs
- HtmlGenericControl.cs
- NamespaceInfo.cs
- ExtensibleClassFactory.cs
- CodeDirectoryCompiler.cs
- ReliabilityContractAttribute.cs
- Version.cs
- WindowHideOrCloseTracker.cs
- TransactionScopeDesigner.cs
- ArgumentValue.cs
- EntityObject.cs
- COSERVERINFO.cs
- EventManager.cs
- ConfigurationElement.cs
- SystemPens.cs
- oledbconnectionstring.cs
- TrackingStringDictionary.cs
- XmlEventCache.cs
- ProfilePropertyNameValidator.cs
- CreateParams.cs
- FilterException.cs
- ExpressionPrefixAttribute.cs
- dataSvcMapFileLoader.cs