Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Print / Reach / Serialization / manager / ReachPrintTicketSerializerAsync.cs / 1 / ReachPrintTicketSerializerAsync.cs
/*++ Copyright (C) 2004- 2005 Microsoft Corporation All rights reserved. Module Name: ReachPrintTicketSerializerAsync.cs Abstract: This file contains the definition of a class that defines the common functionality required to serialize a PrintTicket. Author: [....] ([....]) 25-May-2005 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 PrintTicketSerializerAsync : ReachSerializerAsync { #region Constructor ////// Constructor for class PrintTicketSerializer /// /// /// The serialization manager, the services of which are /// used later in the serialization process of the type. /// public PrintTicketSerializerAsync( 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)); } ((XpsSerializationManagerAsync)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
- SpellCheck.cs
- GridViewColumnCollection.cs
- TemplateControlParser.cs
- StringInfo.cs
- TreeViewCancelEvent.cs
- PropertyValue.cs
- XmlRawWriter.cs
- HttpApplicationFactory.cs
- FormDesigner.cs
- DataSetMappper.cs
- InputLangChangeEvent.cs
- TraceSection.cs
- OdbcFactory.cs
- DifferencingCollection.cs
- RankException.cs
- ActivityWithResultValueSerializer.cs
- MessageSecurityOverTcpElement.cs
- CriticalHandle.cs
- WebPartDisplayModeCollection.cs
- UpdatePanel.cs
- LinqDataSourceInsertEventArgs.cs
- VariantWrapper.cs
- WebPartTransformer.cs
- Control.cs
- PeerApplicationLaunchInfo.cs
- NameValuePermission.cs
- TextElementCollectionHelper.cs
- XmlDataProvider.cs
- DataGridViewLinkColumn.cs
- ProgressChangedEventArgs.cs
- SqlWriter.cs
- SetIterators.cs
- JsonEnumDataContract.cs
- TraceLevelStore.cs
- SchemaLookupTable.cs
- TouchFrameEventArgs.cs
- Line.cs
- XmlSchemaComplexType.cs
- XD.cs
- EntityContainerAssociationSetEnd.cs
- ThreadPool.cs
- ColumnProvider.cs
- PagePropertiesChangingEventArgs.cs
- DebugViewWriter.cs
- ContentIterators.cs
- FormsAuthentication.cs
- WindowsFormsHostPropertyMap.cs
- _TransmitFileOverlappedAsyncResult.cs
- TimeSpanValidatorAttribute.cs
- InstancePersistenceContext.cs
- DocumentViewerHelper.cs
- XmlUtf8RawTextWriter.cs
- XmlComment.cs
- FusionWrap.cs
- CheckBoxRenderer.cs
- MenuStrip.cs
- CallbackException.cs
- Image.cs
- ButtonStandardAdapter.cs
- StatusBar.cs
- HttpListenerResponse.cs
- OperationCanceledException.cs
- Publisher.cs
- ByteAnimation.cs
- RunWorkerCompletedEventArgs.cs
- PointF.cs
- BinaryWriter.cs
- ToolStripRenderer.cs
- ToolCreatedEventArgs.cs
- HttpRequestCacheValidator.cs
- HwndMouseInputProvider.cs
- ErrorsHelper.cs
- UnsafeNativeMethods.cs
- BitmapEffectInput.cs
- SemanticTag.cs
- SamlAdvice.cs
- WebContext.cs
- SizeChangedEventArgs.cs
- ColumnMapVisitor.cs
- DecimalStorage.cs
- SiteOfOriginContainer.cs
- TokenizerHelper.cs
- _SSPISessionCache.cs
- FactoryRecord.cs
- EntitySet.cs
- FactoryId.cs
- EndSelectCardRequest.cs
- DnsEndPoint.cs
- AlgoModule.cs
- StringCollection.cs
- AuthenticationService.cs
- ControlPaint.cs
- RegexTree.cs
- ChildDocumentBlock.cs
- ClonableStack.cs
- SelfIssuedAuthProofToken.cs
- Style.cs
- _SslSessionsCache.cs
- Rule.cs
- CollectionChangedEventManager.cs