Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Print / Reach / Serialization / manager / ReachPrintTicketSerializer.cs / 1 / ReachPrintTicketSerializer.cs
/*++ Copyright (C) 2004- 2005 Microsoft Corporation All rights reserved. Module Name: ReachPrintTicketSerializer.cs Abstract: This file contains the definition of a class that defines the common functionality required to serialize a PrintTicket. Author: [....] ([....]) 21-January-2004 Revision History: --*/ using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Xml; using System.IO; using System.Security; using System.Security.Permissions; using System.ComponentModel.Design.Serialization; using System.Windows.Xps.Packaging; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Markup; using System.Printing; namespace System.Windows.Xps.Serialization { ////// Class defining common functionality required to /// serialize a PrintTicket. /// internal class PrintTicketSerializer : ReachSerializer { #region Constructor ////// Constructor for class PrintTicketSerializer /// /// /// The serialization manager, the services of which are /// used later in the serialization process of the type. /// public PrintTicketSerializer( PackageSerializationManager manager ): base(manager) { } #endregion Constructor #region Public Methods ////// The main method that is called to serialize a PrintTicket. /// /// /// Instance of object to be serialized. /// public override void SerializeObject( object serializedObject ) { PrintTicket printTicket = serializedObject as PrintTicket; if (printTicket == null) { // // Throw a meaningful exception // throw new XpsSerializationException(ReachSR.Get(ReachSRID.ReachSerialization_TargetNotPrintTicket)); } ((XpsSerializationManager)SerializationManager). PackagingPolicy.PersistPrintTicket(printTicket); } #endregion Public Methods #region Internal Methods ////// The main method that is called to serialize the PrintTicket /// and that is usually called from within the serialization manager /// when a node in the graph of objects is at a turn where it should /// be serialized. /// /// /// The context of the property being serialized at this time and /// it points internally to the object encapsulated by that node. /// internal override void SerializeObject( SerializablePropertyContext serializedProperty ) { if(serializedProperty == null) { throw new ArgumentNullException("serializedProperty"); } SerializeObject(serializedProperty.Value); } ////// Persists the object for the print ticket but in this case it is /// not utilized /// internal override void PersistObjectData( SerializableObjectContext serializableObjectContext ) { // // Do nothing here // } #endregion Internal Methods }; } // 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
- Point3DValueSerializer.cs
- ThreadAbortException.cs
- ASCIIEncoding.cs
- Propagator.cs
- xsdvalidator.cs
- ModelVisual3D.cs
- SqlDeflator.cs
- Activator.cs
- AssemblyCollection.cs
- CalendarSelectionChangedEventArgs.cs
- ModelTreeManager.cs
- OrderedDictionaryStateHelper.cs
- OdbcInfoMessageEvent.cs
- BlobPersonalizationState.cs
- EntityCommandExecutionException.cs
- WebPartDisplayModeCancelEventArgs.cs
- StylusButtonEventArgs.cs
- QilDataSource.cs
- GenerateHelper.cs
- ZipIOCentralDirectoryFileHeader.cs
- DispatchChannelSink.cs
- BlurBitmapEffect.cs
- AspNetHostingPermission.cs
- ResXResourceReader.cs
- RelationshipEndCollection.cs
- ValueProviderWrapper.cs
- Permission.cs
- StructureChangedEventArgs.cs
- BindingContext.cs
- Object.cs
- ArraySegment.cs
- TreeView.cs
- NumericExpr.cs
- TabletCollection.cs
- HandleCollector.cs
- SubMenuStyle.cs
- ListViewItemEventArgs.cs
- DataGridLinkButton.cs
- ScrollViewer.cs
- OutOfMemoryException.cs
- EmbeddedMailObject.cs
- ColorAnimationUsingKeyFrames.cs
- ContainerCodeDomSerializer.cs
- DataListItem.cs
- QilIterator.cs
- GcSettings.cs
- SelectedGridItemChangedEvent.cs
- RijndaelManaged.cs
- StringResourceManager.cs
- ToolboxItemFilterAttribute.cs
- ConfigurationSection.cs
- MdImport.cs
- Bits.cs
- GraphicsPathIterator.cs
- WebPartTracker.cs
- UnsafeNativeMethods.cs
- PersistenceTypeAttribute.cs
- OdbcException.cs
- ContractMapping.cs
- LinqExpressionNormalizer.cs
- ConnectionInterfaceCollection.cs
- CacheModeValueSerializer.cs
- TraceEventCache.cs
- Helper.cs
- LocationSectionRecord.cs
- JoinTreeNode.cs
- EntityDataSourceContextCreatingEventArgs.cs
- IntPtr.cs
- RecommendedAsConfigurableAttribute.cs
- Journaling.cs
- TransportDefaults.cs
- TracingConnectionInitiator.cs
- DynamicArgumentDialog.cs
- DirectoryObjectSecurity.cs
- DeploymentSectionCache.cs
- MaskedTextBoxDesigner.cs
- IpcChannel.cs
- GrammarBuilderPhrase.cs
- HttpWebResponse.cs
- ExclusiveTcpListener.cs
- PerspectiveCamera.cs
- FocusChangedEventArgs.cs
- MetadataItemSerializer.cs
- GeneralEndpointIdentity.cs
- _Rfc2616CacheValidators.cs
- CultureTableRecord.cs
- IssuedTokensHeader.cs
- WindowsIPAddress.cs
- EndpointInstanceProvider.cs
- DataListItem.cs
- EntityViewContainer.cs
- AssemblyName.cs
- AsymmetricAlgorithm.cs
- BinaryEditor.cs
- KoreanCalendar.cs
- ProviderIncompatibleException.cs
- CompoundFileIOPermission.cs
- FixedTextSelectionProcessor.cs
- ItemMap.cs
- InvalidPropValue.cs