Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Markup / TypeContext.cs / 1 / TypeContext.cs
//---------------------------------------------------------------------------- // // File: typeContext.cs // // Description: // class for the main TypeConverterContext object passed to type converters // // // History: // 8/02/01: rogerg Created // 05/23/03: [....] Ported to wcp // // Copyright (C) 2001 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Xml; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { ///TypeConverterContext class used for parsing Attributes. internal class TypeConvertContext : ITypeDescriptorContext { #region Public #region Methods ////// OnComponentChange /// ////// member is public only because base class has /// this public member declared /// ////// void /// public void OnComponentChanged() { } ////// OnComponentChanging /// ////// member is public only because base class has /// this public member declared /// ////// void /// public bool OnComponentChanging() { return false; } ////// IServiceProvider GetService implementation /// /// /// Type of Service to be returned /// ////// member is public only because base class has /// this public member declared /// ////// Service object or null if service is not found /// virtual public object GetService(Type serviceType) { if (serviceType == typeof(IUriContext)) { return _parserContext as IUriContext; } // temporary code to optimize Paints.White etc, until this is done // in a more generic fashion in SolidPaint ctor else if (serviceType == typeof(string)) { return _attribStringValue; } #if PBTCOMPILER return null; #else // Check for the other provided services ProvideValueServiceProvider serviceProvider = _parserContext.ProvideValueProvider; return serviceProvider.GetService( serviceType ); #endif } #endregion Methods #region Properties ///Container property ////// property is public only because base class has /// this public property declared /// public IContainer Container { get {return null;} } ///Instance property ////// property is public only because base class has /// this public property declared /// public object Instance { get { return null; } } ///Propert Descriptor ////// property is public only because base class has /// this public property declared /// public PropertyDescriptor PropertyDescriptor { get { return null;} } #if !PBTCOMPILER // Make the ParserContext available internally as an optimization. public ParserContext ParserContext { get { return _parserContext; } } #endif #endregion Properties #endregion Public #region Internal #region Contructors #if !PBTCOMPILER ////// /// /// public TypeConvertContext(ParserContext parserContext) { _parserContext = parserContext; } #endif // temporary code to optimize Paints.White etc, until this is done // in a more generic fashion in SolidPaint ctor #if PBTCOMPILER ////// /// /// /// public TypeConvertContext(ParserContext parserContext, string originalAttributeValue) { _parserContext = parserContext; _attribStringValue = originalAttributeValue; } #endif #endregion Constructors #endregion internal #region Private #region Data ParserContext _parserContext; // _attribStringValue is never set when !PBTCOMPILER #pragma warning disable 0649 string _attribStringValue; #pragma warning restore 0649 #endregion Data #endregion Private } } // 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
- typedescriptorpermission.cs
- PhysicalFontFamily.cs
- FixedSOMFixedBlock.cs
- ResourceAssociationTypeEnd.cs
- FieldBuilder.cs
- ForeignConstraint.cs
- PrtCap_Base.cs
- DbgUtil.cs
- SqlDataSourceSelectingEventArgs.cs
- TimeIntervalCollection.cs
- TextEndOfParagraph.cs
- URLBuilder.cs
- RubberbandSelector.cs
- PartialArray.cs
- ActivityWithResultValueSerializer.cs
- DetailsViewRowCollection.cs
- Group.cs
- ServiceDeploymentInfo.cs
- UInt64.cs
- ResourceExpressionBuilder.cs
- ReverseInheritProperty.cs
- GenericAuthenticationEventArgs.cs
- BuildProviderInstallComponent.cs
- ParallelTimeline.cs
- TextBoxLine.cs
- DeflateStreamAsyncResult.cs
- OracleRowUpdatingEventArgs.cs
- TextChange.cs
- SqlProfileProvider.cs
- DoubleLinkList.cs
- WsdlBuildProvider.cs
- RequestDescription.cs
- Sql8ConformanceChecker.cs
- PasswordRecovery.cs
- PolygonHotSpot.cs
- SynchronizationFilter.cs
- IRCollection.cs
- CreatingCookieEventArgs.cs
- ActivityXRefConverter.cs
- SimpleBitVector32.cs
- ImageBrush.cs
- XPathNodeHelper.cs
- ControllableStoryboardAction.cs
- DoubleLink.cs
- SelectionChangedEventArgs.cs
- FixedDocument.cs
- NameValueConfigurationElement.cs
- ScriptingSectionGroup.cs
- AudioException.cs
- ListenerElementsCollection.cs
- ListViewInsertionMark.cs
- XmlSiteMapProvider.cs
- Attribute.cs
- StaticSiteMapProvider.cs
- GZipStream.cs
- HelpProvider.cs
- Mappings.cs
- HtmlInputReset.cs
- ColumnCollection.cs
- Encoder.cs
- GregorianCalendarHelper.cs
- WizardStepBase.cs
- StringSorter.cs
- _BufferOffsetSize.cs
- ContextMenu.cs
- BufferedWebEventProvider.cs
- Memoizer.cs
- Barrier.cs
- AsyncOperationManager.cs
- altserialization.cs
- WindowsEditBoxRange.cs
- PickBranchDesigner.xaml.cs
- RuleSettingsCollection.cs
- CharacterString.cs
- ImageMetadata.cs
- UnsafeNativeMethods.cs
- _BasicClient.cs
- CodeGenerator.cs
- WithParamAction.cs
- Util.cs
- JsonFormatGeneratorStatics.cs
- VirtualDirectoryMapping.cs
- ToggleButton.cs
- JsonFormatGeneratorStatics.cs
- ColorConvertedBitmapExtension.cs
- HttpRequestWrapper.cs
- DocComment.cs
- SessionSwitchEventArgs.cs
- SessionSymmetricTransportSecurityProtocolFactory.cs
- SqlCacheDependencySection.cs
- BindUriHelper.cs
- ASCIIEncoding.cs
- HeaderFilter.cs
- DeflateEmulationStream.cs
- MasterPageBuildProvider.cs
- SQLBinary.cs
- RequiredFieldValidator.cs
- ValueUtilsSmi.cs
- TdsParser.cs
- PersonalizationStateQuery.cs