Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Print / Reach / Serialization / manager / XpsTokenContext.cs / 1 / XpsTokenContext.cs
/*++ Copyright (C) 2004- 2005 Microsoft Corporation All rights reserved. Module Name: XpsTokenContext.cs Abstract: Author: [....] ([....]) 1-December-2004 Revision History: --*/ using System; using System.Collections; 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; namespace System.Windows.Xps.Serialization { internal class XpsTokenContext : System.ComponentModel.ITypeDescriptorContext { ////// Constructor for XpsTokenContext /// public XpsTokenContext( PackageSerializationManager serializationManager, SerializablePropertyContext propertyContext ) { // // Make necessary checks and throw necessary exceptions // this.serializationManager = serializationManager; this.targetObject = propertyContext.TargetObject; this.objectValue = propertyContext.Value; this.propertyInfo = propertyContext.PropertyInfo; this.dependencyProperty = (propertyContext is SerializableDependencyPropertyContext) ? (DependencyProperty)((SerializableDependencyPropertyContext)propertyContext).DependencyProperty : null; } ////// Constructor for XpsTokenContext /// public XpsTokenContext( PackageSerializationManager serializationManager, Object targetObject, Object objectValue ) { // // Make necessary checks and throw necessary exceptions // this.serializationManager = serializationManager; this.targetObject = targetObject; this.objectValue = objectValue; this.propertyInfo = null; this.dependencyProperty = null; } ////// /// public void OnComponentChanged() { } //// // public bool OnComponentChanging() { return false; } //// // public object GetService( Type serviceType ) { Object serviceObject = null; if (serviceType == typeof(XpsSerializationManager) || serviceType == typeof(XpsSerializationManagerAsync) || serviceType == typeof(ServiceProviders)) { serviceObject = serializationManager; } return serviceObject; } //// // public System.ComponentModel.IContainer Container { get { return null; } } //// // public object Instance { get { return objectValue; } } //// // public PropertyInfo PropertyInfo { get { return propertyInfo; } } //// // public DependencyProperty DependencyProperty { get { return dependencyProperty; } } //// // public object TargetObject { get { return targetObject; } } //// // public PropertyDescriptor PropertyDescriptor { get { return null; } } private PackageSerializationManager serializationManager; private Object targetObject; private Object objectValue; private PropertyInfo propertyInfo; private DependencyProperty dependencyProperty; }; } // 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
- TypeGeneratedEventArgs.cs
- CodeExpressionCollection.cs
- Splitter.cs
- LicenseProviderAttribute.cs
- SafeFileHandle.cs
- HuffCodec.cs
- SizeConverter.cs
- Annotation.cs
- FileInfo.cs
- EventRecord.cs
- LineGeometry.cs
- HierarchicalDataBoundControlAdapter.cs
- SizeConverter.cs
- RedistVersionInfo.cs
- FontStretch.cs
- ColorTranslator.cs
- TextContainer.cs
- ObjectDataSourceEventArgs.cs
- MethodMessage.cs
- ResponseStream.cs
- SchemaRegistration.cs
- ContactManager.cs
- LinearGradientBrush.cs
- ObjectStateEntry.cs
- FixedPosition.cs
- COM2FontConverter.cs
- FlowchartDesignerCommands.cs
- StylusLogic.cs
- XhtmlBasicPanelAdapter.cs
- PageContentCollection.cs
- AppDomainInfo.cs
- BlockUIContainer.cs
- SchemaObjectWriter.cs
- HtmlEncodedRawTextWriter.cs
- DataGridToolTip.cs
- BitConverter.cs
- XsdCachingReader.cs
- FilteredReadOnlyMetadataCollection.cs
- PermissionListSet.cs
- FormClosingEvent.cs
- PathTooLongException.cs
- MappingException.cs
- AccessDataSourceView.cs
- PixelFormatConverter.cs
- DataGridComboBoxColumn.cs
- LocalizabilityAttribute.cs
- XmlWellformedWriter.cs
- ServiceOperationParameter.cs
- MediaTimeline.cs
- DesignerAdapterUtil.cs
- ListItemCollection.cs
- AuthorizationSection.cs
- LazyTextWriterCreator.cs
- DataRelationCollection.cs
- ElementAtQueryOperator.cs
- Constraint.cs
- HttpWebRequest.cs
- ConstrainedDataObject.cs
- RectangleF.cs
- WebBrowserSiteBase.cs
- CompiledIdentityConstraint.cs
- MetadataPropertyAttribute.cs
- XPathItem.cs
- ExpressionParser.cs
- RectangleF.cs
- StylusPlugin.cs
- XmlNodeChangedEventArgs.cs
- QuotedPrintableStream.cs
- SchemaImporterExtensionsSection.cs
- QilScopedVisitor.cs
- MethodBody.cs
- MultipartIdentifier.cs
- ResourceLoader.cs
- UpdatePanelTriggerCollection.cs
- ColorDialog.cs
- GridLength.cs
- SettingsPropertyIsReadOnlyException.cs
- TaskExceptionHolder.cs
- MatrixStack.cs
- Switch.cs
- Vector3DValueSerializer.cs
- QueueProcessor.cs
- Soap.cs
- SmtpMail.cs
- Literal.cs
- SchemaElementLookUpTable.cs
- MeshGeometry3D.cs
- NamedObject.cs
- ZipFileInfo.cs
- ArgumentNullException.cs
- CodeExpressionStatement.cs
- DesignerVerbToolStripMenuItem.cs
- ThreadInterruptedException.cs
- XmlSchemaCompilationSettings.cs
- _Win32.cs
- WrapPanel.cs
- TextBox.cs
- ColorBlend.cs
- SettingsPropertyNotFoundException.cs
- ThousandthOfEmRealDoubles.cs