Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / AttributeProviderAttribute.cs / 1 / AttributeProviderAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel
{
using System;
using System.Security.Permissions;
///
///
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
[AttributeUsage(AttributeTargets.Property)]
public class AttributeProviderAttribute : Attribute
{
private string _typeName;
private string _propertyName;
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(string typeName)
{
if (typeName == null)
{
throw new ArgumentNullException("typeName");
}
_typeName = typeName;
}
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(string typeName, string propertyName) {
if (typeName == null) {
throw new ArgumentNullException("typeName");
}
if (propertyName == null) {
throw new ArgumentNullException("propertyName");
}
_typeName = typeName;
_propertyName = propertyName;
}
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(Type type)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
_typeName = type.AssemblyQualifiedName;
}
///
///
/// The TypeName property returns the assembly qualified type name
/// passed into the constructor.
///
public string TypeName
{
get
{
return _typeName;
}
}
///
///
/// The TypeName property returns the property name that will be used to query attributes from.
///
public string PropertyName {
get {
return _propertyName;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel
{
using System;
using System.Security.Permissions;
///
///
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
[AttributeUsage(AttributeTargets.Property)]
public class AttributeProviderAttribute : Attribute
{
private string _typeName;
private string _propertyName;
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(string typeName)
{
if (typeName == null)
{
throw new ArgumentNullException("typeName");
}
_typeName = typeName;
}
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(string typeName, string propertyName) {
if (typeName == null) {
throw new ArgumentNullException("typeName");
}
if (propertyName == null) {
throw new ArgumentNullException("propertyName");
}
_typeName = typeName;
_propertyName = propertyName;
}
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(Type type)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
_typeName = type.AssemblyQualifiedName;
}
///
///
/// The TypeName property returns the assembly qualified type name
/// passed into the constructor.
///
public string TypeName
{
get
{
return _typeName;
}
}
///
///
/// The TypeName property returns the property name that will be used to query attributes from.
///
public string PropertyName {
get {
return _propertyName;
}
}
}
}
// 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
- NetworkAddressChange.cs
- ServicesExceptionNotHandledEventArgs.cs
- DragStartedEventArgs.cs
- ColorContextHelper.cs
- DateTimeStorage.cs
- XmlException.cs
- ParagraphResult.cs
- BaseHashHelper.cs
- Visual.cs
- BrowserInteropHelper.cs
- ServerProtocol.cs
- DynamicDiscoveryDocument.cs
- HorizontalAlignConverter.cs
- FormsAuthenticationUserCollection.cs
- URLMembershipCondition.cs
- ManagementBaseObject.cs
- IPPacketInformation.cs
- Dispatcher.cs
- SHA512.cs
- SqlWorkflowPersistenceService.cs
- DataControlPagerLinkButton.cs
- TextEvent.cs
- DisplayMemberTemplateSelector.cs
- ProfileBuildProvider.cs
- SapiRecoInterop.cs
- DataGridItem.cs
- _OverlappedAsyncResult.cs
- WmpBitmapEncoder.cs
- MemoryFailPoint.cs
- SelectionRange.cs
- PropertyGridEditorPart.cs
- ErrorHandler.cs
- TextEffect.cs
- ButtonChrome.cs
- UriTemplateTable.cs
- TextRangeBase.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- TextRange.cs
- WindowPattern.cs
- ToolStripDropDown.cs
- OverrideMode.cs
- RelatedCurrencyManager.cs
- Frame.cs
- Stacktrace.cs
- VirtualDirectoryMappingCollection.cs
- RequestCacheEntry.cs
- GridEntryCollection.cs
- EntityDesignerUtils.cs
- TextSpan.cs
- SecurityKeyIdentifier.cs
- DataFieldConverter.cs
- HandlerFactoryWrapper.cs
- GAC.cs
- QilStrConcatenator.cs
- PeerNameRecordCollection.cs
- ScriptingProfileServiceSection.cs
- LayoutTable.cs
- ExceptionHandler.cs
- StandardMenuStripVerb.cs
- XmlSerializerFactory.cs
- ItemChangedEventArgs.cs
- MemberPath.cs
- XmlUtil.cs
- EntityDataSourceChangingEventArgs.cs
- WebBrowserNavigatedEventHandler.cs
- safelink.cs
- SafeIUnknown.cs
- SubpageParagraph.cs
- OutputCache.cs
- ResourceExpression.cs
- SettingsAttributeDictionary.cs
- DataPointer.cs
- SharedUtils.cs
- ReferencedCollectionType.cs
- TrustManager.cs
- GridEntry.cs
- EventDescriptorCollection.cs
- QilDataSource.cs
- SessionPageStateSection.cs
- QuotedPrintableStream.cs
- ConfigurationStrings.cs
- HtmlInputPassword.cs
- Decoder.cs
- IFormattable.cs
- XPathMessageFilterElementComparer.cs
- Events.cs
- ToolStripDesignerUtils.cs
- AttributeData.cs
- TextTreeInsertElementUndoUnit.cs
- PointHitTestParameters.cs
- HashHelper.cs
- CollectionBase.cs
- SmtpNetworkElement.cs
- ClientSettingsSection.cs
- SqlInfoMessageEvent.cs
- CommentAction.cs
- ListSourceHelper.cs
- OdbcHandle.cs
- SupportingTokenProviderSpecification.cs
- BamlMapTable.cs