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
- PropertySourceInfo.cs
- SafeTimerHandle.cs
- CultureSpecificStringDictionary.cs
- TableLayoutPanelCellPosition.cs
- SafeLocalAllocation.cs
- CacheMode.cs
- VariableElement.cs
- SecureStringHasher.cs
- SpecialNameAttribute.cs
- XmlSignatureProperties.cs
- ProgressBar.cs
- TypeForwardedToAttribute.cs
- HtmlElementEventArgs.cs
- CellCreator.cs
- TemplatedEditableDesignerRegion.cs
- InkCanvas.cs
- FlowchartSizeFeature.cs
- MenuItemBindingCollection.cs
- XamlFrame.cs
- StylusButtonCollection.cs
- StatusBarItemAutomationPeer.cs
- XmlDomTextWriter.cs
- SafeNativeMethods.cs
- ModulesEntry.cs
- ConsoleKeyInfo.cs
- WebServiceClientProxyGenerator.cs
- PathStreamGeometryContext.cs
- HwndSourceParameters.cs
- TextServicesPropertyRanges.cs
- ExpressionBindingCollection.cs
- WinInet.cs
- EventMap.cs
- XmlSchemaSimpleContent.cs
- ASCIIEncoding.cs
- MobileControlPersister.cs
- DefaultExpression.cs
- _RequestCacheProtocol.cs
- MexHttpBindingCollectionElement.cs
- BitmapCodecInfoInternal.cs
- RC2.cs
- EncoderBestFitFallback.cs
- CqlLexer.cs
- UnmanagedBitmapWrapper.cs
- CqlErrorHelper.cs
- SkinBuilder.cs
- CompositeControl.cs
- InputElement.cs
- ProxySimple.cs
- MiniConstructorInfo.cs
- AsymmetricSignatureDeformatter.cs
- CompoundFileDeflateTransform.cs
- CacheHelper.cs
- SmtpNtlmAuthenticationModule.cs
- ColorConvertedBitmap.cs
- ProfileService.cs
- Quad.cs
- InputLanguageProfileNotifySink.cs
- Bookmark.cs
- ExtenderProvidedPropertyAttribute.cs
- ImageSource.cs
- Descriptor.cs
- HashCryptoHandle.cs
- BamlBinaryReader.cs
- PropertyPath.cs
- HttpWebResponse.cs
- VisualState.cs
- PropVariant.cs
- ObjectSecurityT.cs
- Codec.cs
- DispatcherHooks.cs
- ColorKeyFrameCollection.cs
- RemoveStoryboard.cs
- Visual3D.cs
- WinFormsSecurity.cs
- PrimitiveSchema.cs
- XmlStreamStore.cs
- DocobjHost.cs
- GridViewAutoFormat.cs
- MetadataItemEmitter.cs
- SessionStateUtil.cs
- XmlSchemaAnnotation.cs
- SqlSelectStatement.cs
- EntityDataSourceChangingEventArgs.cs
- UserInitiatedRoutedEventPermission.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ServiceBusyException.cs
- NullableBoolConverter.cs
- DynamicDataRoute.cs
- HttpModulesSection.cs
- ChannelSinkStacks.cs
- XmlSchemaCompilationSettings.cs
- ItemCollection.cs
- HatchBrush.cs
- _LocalDataStoreMgr.cs
- RegionData.cs
- DropShadowEffect.cs
- JournalEntry.cs
- ColorConverter.cs
- ModelTreeEnumerator.cs
- GroupItem.cs