Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / ComponentConverter.cs / 1 / ComponentConverter.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using Microsoft.Win32;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Remoting;
using System.Runtime.InteropServices;
using System.Security.Permissions;
///
/// Provides a type converter to convert component objects to and
/// from various other representations.
///
[HostProtection(SharedState = true)]
public class ComponentConverter : ReferenceConverter {
///
///
/// Initializes a new instance of the class.
///
///
public ComponentConverter(Type type) : base(type) {
}
///
///
/// Gets a collection of properties for the type of component
/// specified by the value
/// parameter.
///
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) {
return TypeDescriptor.GetProperties(value, attributes);
}
///
///
/// Gets a value indicating whether this object supports properties using the
/// specified context.
///
public override bool GetPropertiesSupported(ITypeDescriptorContext context) {
return true;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using Microsoft.Win32;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Remoting;
using System.Runtime.InteropServices;
using System.Security.Permissions;
///
/// Provides a type converter to convert component objects to and
/// from various other representations.
///
[HostProtection(SharedState = true)]
public class ComponentConverter : ReferenceConverter {
///
///
/// Initializes a new instance of the class.
///
///
public ComponentConverter(Type type) : base(type) {
}
///
///
/// Gets a collection of properties for the type of component
/// specified by the value
/// parameter.
///
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) {
return TypeDescriptor.GetProperties(value, attributes);
}
///
///
/// Gets a value indicating whether this object supports properties using the
/// specified context.
///
public override bool GetPropertiesSupported(ITypeDescriptorContext context) {
return true;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataListCommandEventArgs.cs
- ProfileModule.cs
- WhitespaceSignificantCollectionAttribute.cs
- DBPropSet.cs
- SqlTypesSchemaImporter.cs
- WebBrowser.cs
- FtpWebRequest.cs
- ManifestResourceInfo.cs
- PermissionSetEnumerator.cs
- CachedFontFamily.cs
- LocalsItemDescription.cs
- MetadataUtilsSmi.cs
- MapPathBasedVirtualPathProvider.cs
- TransactionScopeDesigner.cs
- BaseTemplateParser.cs
- PageStatePersister.cs
- LinkLabelLinkClickedEvent.cs
- SqlParameterizer.cs
- ViewBox.cs
- FileRecordSequenceHelper.cs
- XmlAttributeAttribute.cs
- ComponentChangedEvent.cs
- XPathDocumentNavigator.cs
- _SpnDictionary.cs
- LocatorBase.cs
- TemplateXamlParser.cs
- XmlArrayItemAttribute.cs
- CssClassPropertyAttribute.cs
- SqlInfoMessageEvent.cs
- TCPClient.cs
- XmlArrayItemAttributes.cs
- CodeTypeConstructor.cs
- HttpCachePolicy.cs
- AssemblyName.cs
- ContentElementCollection.cs
- ReadOnlyCollectionBase.cs
- XmlLanguageConverter.cs
- DynamicDataRouteHandler.cs
- HwndAppCommandInputProvider.cs
- X500Name.cs
- AccessDataSourceView.cs
- Rotation3DKeyFrameCollection.cs
- CapabilitiesAssignment.cs
- OdbcConnection.cs
- coordinator.cs
- Action.cs
- LayoutTable.cs
- NestPullup.cs
- Transform3DCollection.cs
- InnerItemCollectionView.cs
- BrowserDefinition.cs
- WebPartZone.cs
- BamlLocalizer.cs
- BuildProvidersCompiler.cs
- MiniAssembly.cs
- XsdSchemaFileEditor.cs
- BinaryQueryOperator.cs
- UnauthorizedWebPart.cs
- X509SecurityToken.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- InvokePatternIdentifiers.cs
- BuildProvider.cs
- DataControlPagerLinkButton.cs
- WeakEventTable.cs
- MsmqIntegrationInputMessage.cs
- SimpleBitVector32.cs
- SqlCommand.cs
- SerializationEventsCache.cs
- LogicalCallContext.cs
- DateBoldEvent.cs
- SourceInterpreter.cs
- GestureRecognizer.cs
- WebEventTraceProvider.cs
- DataKey.cs
- GlobalProxySelection.cs
- Color.cs
- DatagridviewDisplayedBandsData.cs
- PropertyKey.cs
- IntranetCredentialPolicy.cs
- PostBackOptions.cs
- DataGrid.cs
- FormViewInsertEventArgs.cs
- TableAutomationPeer.cs
- Convert.cs
- NativeMethodsOther.cs
- MailWebEventProvider.cs
- CodeDelegateCreateExpression.cs
- ApplicationInfo.cs
- WCFServiceClientProxyGenerator.cs
- EncoderReplacementFallback.cs
- ScrollBarRenderer.cs
- ListViewGroupConverter.cs
- LineMetrics.cs
- RequestBringIntoViewEventArgs.cs
- SignatureGenerator.cs
- IndentedWriter.cs
- DbModificationCommandTree.cs
- BrushMappingModeValidation.cs
- Main.cs
- MoveSizeWinEventHandler.cs