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
- ServiceObjectContainer.cs
- HotSpotCollectionEditor.cs
- Section.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ObjectSecurity.cs
- QueryCacheKey.cs
- Splitter.cs
- SafeViewOfFileHandle.cs
- CompModSwitches.cs
- Message.cs
- SecurityTokenRequirement.cs
- TextViewElement.cs
- DefaultAuthorizationContext.cs
- StateChangeEvent.cs
- LicFileLicenseProvider.cs
- ISCIIEncoding.cs
- X509UI.cs
- PeerCollaboration.cs
- ReflectionUtil.cs
- DataTableMappingCollection.cs
- GetIndexBinder.cs
- SqlCacheDependency.cs
- Stackframe.cs
- AttributeProviderAttribute.cs
- MetadataSerializer.cs
- DataServiceConfiguration.cs
- ComplexPropertyEntry.cs
- SafeReadContext.cs
- SendSecurityHeader.cs
- AtomParser.cs
- SurrogateDataContract.cs
- StylusEditingBehavior.cs
- RijndaelCryptoServiceProvider.cs
- Base64Encoder.cs
- AutomationPatternInfo.cs
- ProjectionCamera.cs
- SHA384Managed.cs
- NullableIntAverageAggregationOperator.cs
- TraceContext.cs
- TransactionScopeDesigner.cs
- DefaultHttpHandler.cs
- SecurityKeyIdentifierClause.cs
- sqlpipe.cs
- DoubleLink.cs
- SafeViewOfFileHandle.cs
- hresults.cs
- ContentOperations.cs
- DataGridViewBand.cs
- GPRECTF.cs
- CodeAttachEventStatement.cs
- UIElementCollection.cs
- CommandConverter.cs
- ObjectHandle.cs
- KernelTypeValidation.cs
- LocalizabilityAttribute.cs
- PatternMatcher.cs
- ToolTipService.cs
- ElementAction.cs
- EventTrigger.cs
- XmlSchemaDatatype.cs
- ParameterReplacerVisitor.cs
- OdbcConnectionString.cs
- ToolStripDropDown.cs
- GlyphRunDrawing.cs
- DataGridViewCellStyleChangedEventArgs.cs
- VerificationAttribute.cs
- SafeUserTokenHandle.cs
- Marshal.cs
- ToolStripArrowRenderEventArgs.cs
- AttachedAnnotation.cs
- DetailsViewPagerRow.cs
- ResourceIDHelper.cs
- FirstMatchCodeGroup.cs
- PropertySegmentSerializationProvider.cs
- ProbeMatchesMessage11.cs
- XmlSchemaNotation.cs
- MenuItemBinding.cs
- NameValueConfigurationElement.cs
- hresults.cs
- Splitter.cs
- CheckPair.cs
- AssociatedControlConverter.cs
- EdmFunction.cs
- MemberListBinding.cs
- FrameworkTemplate.cs
- ValueChangedEventManager.cs
- LineInfo.cs
- UnsafeNativeMethods.cs
- XmlLanguageConverter.cs
- WindowsButton.cs
- securitymgrsite.cs
- EdmProviderManifest.cs
- RepeaterItem.cs
- JavaScriptObjectDeserializer.cs
- DateTimeConverter.cs
- DrawingCollection.cs
- NavigationWindow.cs
- SubqueryRules.cs
- PrintDialog.cs
- FontStretches.cs