Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / TypeDescriptorContext.cs / 1 / TypeDescriptorContext.cs
using System; using System.ComponentModel; using System.ComponentModel.Design; namespace System.Web.UI.Design.WebControls { internal sealed class TypeDescriptorContext : ITypeDescriptorContext{ private IDesignerHost _designerHost; private PropertyDescriptor _propDesc; private object _instance; public TypeDescriptorContext(IDesignerHost designerHost, PropertyDescriptor propDesc, object instance) { _designerHost = designerHost; _propDesc = propDesc; _instance = instance; } private IComponentChangeService ComponentChangeService { get { return (IComponentChangeService)_designerHost.GetService(typeof(IComponentChangeService)); } } public IContainer Container { get { return (IContainer)_designerHost.GetService(typeof(IContainer)); } } public object Instance { get { return _instance; } } public PropertyDescriptor PropertyDescriptor { get { return _propDesc; } } public object GetService(Type serviceType) { return _designerHost.GetService(serviceType); } public bool OnComponentChanging() { if (ComponentChangeService != null) { try { ComponentChangeService.OnComponentChanging(_instance, _propDesc); } catch (CheckoutException ce) { if (ce == CheckoutException.Canceled) { return false; } throw ce; } } return true; } public void OnComponentChanged() { if (ComponentChangeService != null) { ComponentChangeService.OnComponentChanged(_instance, _propDesc, null, null); } } } } // 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
- DeferredElementTreeState.cs
- FileDetails.cs
- CodeAssignStatement.cs
- PropertyItem.cs
- ExpandedWrapper.cs
- SubtreeProcessor.cs
- StylusPointProperties.cs
- TraceLog.cs
- AnimationClockResource.cs
- AtomServiceDocumentSerializer.cs
- DataGridColumnHeader.cs
- GeneralTransform.cs
- OracleDataAdapter.cs
- Exception.cs
- _TransmitFileOverlappedAsyncResult.cs
- altserialization.cs
- MemoryStream.cs
- LOSFormatter.cs
- ObjectListFieldCollection.cs
- CompilerCollection.cs
- DataGridViewCellEventArgs.cs
- Single.cs
- ToolStripItem.cs
- StateChangeEvent.cs
- NumericUpDownAcceleration.cs
- VisualStyleElement.cs
- XmlReturnWriter.cs
- OperationCanceledException.cs
- RecordManager.cs
- SafeFileMappingHandle.cs
- WebPartTracker.cs
- VisualBasicSettingsConverter.cs
- OdbcPermission.cs
- basecomparevalidator.cs
- SqlUDTStorage.cs
- SimpleTextLine.cs
- PasswordBoxAutomationPeer.cs
- SimpleType.cs
- ManifestSignedXml.cs
- CustomCredentialPolicy.cs
- ThumbAutomationPeer.cs
- FilterQueryOptionExpression.cs
- ObjectViewQueryResultData.cs
- AccessDataSourceView.cs
- ValidateNames.cs
- DesignerActionHeaderItem.cs
- BitmapPalettes.cs
- ClientUtils.cs
- ProfileSettingsCollection.cs
- PrimarySelectionAdorner.cs
- SettingsBase.cs
- ImageInfo.cs
- CombinedGeometry.cs
- GenerateTemporaryTargetAssembly.cs
- UserValidatedEventArgs.cs
- InvalidEnumArgumentException.cs
- FixUp.cs
- ListItemsPage.cs
- Sentence.cs
- MenuStrip.cs
- _Win32.cs
- SharedPerformanceCounter.cs
- XPathNodePointer.cs
- WebAdminConfigurationHelper.cs
- ChangeConflicts.cs
- TemplateBaseAction.cs
- XmlExpressionDumper.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- SqlTopReducer.cs
- UnknownWrapper.cs
- RawStylusInputCustomDataList.cs
- SchemaAttDef.cs
- Rect3D.cs
- Misc.cs
- FlowNode.cs
- CompModSwitches.cs
- EntityDataSourceReferenceGroup.cs
- PropertyKey.cs
- FilteredReadOnlyMetadataCollection.cs
- SmtpException.cs
- SoapTypeAttribute.cs
- WebPartsSection.cs
- nulltextnavigator.cs
- serverconfig.cs
- SqlErrorCollection.cs
- Win32SafeHandles.cs
- MsdtcWrapper.cs
- ListControl.cs
- AffineTransform3D.cs
- EncryptedData.cs
- DefaultPrintController.cs
- AutomationFocusChangedEventArgs.cs
- XmlNamedNodeMap.cs
- XsltQilFactory.cs
- XmlSchemaObjectCollection.cs
- Point.cs
- RoutedEventConverter.cs
- COAUTHIDENTITY.cs
- XmlSchemaType.cs
- SQLRoleProvider.cs