Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / AttributeProviderAttribute.cs / 1305376 / 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
- LogArchiveSnapshot.cs
- IDQuery.cs
- CodeCommentStatementCollection.cs
- KnownTypesProvider.cs
- WsatStrings.cs
- SHA1Managed.cs
- GeneralTransform3DGroup.cs
- SessionEndingEventArgs.cs
- WebBrowserNavigatingEventHandler.cs
- EventHandlerList.cs
- LoadWorkflowAsyncResult.cs
- UpdateTracker.cs
- SymbolEqualComparer.cs
- ChildrenQuery.cs
- NumericExpr.cs
- DiagnosticsConfiguration.cs
- TypedTableBase.cs
- InputReport.cs
- CommandID.cs
- RowToFieldTransformer.cs
- HttpBrowserCapabilitiesWrapper.cs
- xmlglyphRunInfo.cs
- RelationshipEndCollection.cs
- WindowsScrollBarBits.cs
- ConversionHelper.cs
- UnsafeNativeMethods.cs
- ApplicationServiceManager.cs
- Duration.cs
- CoreChannel.cs
- XmlNode.cs
- TextBoxLine.cs
- IpcPort.cs
- CannotUnloadAppDomainException.cs
- WebControlAdapter.cs
- backend.cs
- Object.cs
- FlowDocumentReaderAutomationPeer.cs
- ToolBarButtonClickEvent.cs
- DataListDesigner.cs
- CodeLabeledStatement.cs
- CompilationUtil.cs
- SafeFindHandle.cs
- CodeEntryPointMethod.cs
- BypassElement.cs
- EventLogEntryCollection.cs
- GeneralTransform3DCollection.cs
- EventHandlerList.cs
- _ShellExpression.cs
- DataGridViewRowConverter.cs
- FileDialog.cs
- SessionConnectionReader.cs
- VirtualPath.cs
- HostingEnvironmentException.cs
- ContextCorrelationInitializer.cs
- DataView.cs
- ProcessHostServerConfig.cs
- CompilerGeneratedAttribute.cs
- SharedHttpsTransportManager.cs
- RequestCachePolicyConverter.cs
- DataService.cs
- NTAccount.cs
- Instrumentation.cs
- AdapterDictionary.cs
- WebPartEditVerb.cs
- TickBar.cs
- BuildDependencySet.cs
- ControlIdConverter.cs
- DataGridViewDataErrorEventArgs.cs
- MethodRental.cs
- UserControlParser.cs
- SchemaCollectionPreprocessor.cs
- NavigatingCancelEventArgs.cs
- SimplePropertyEntry.cs
- GroupBox.cs
- Comparer.cs
- EventItfInfo.cs
- Source.cs
- LayoutDump.cs
- DiscoveryClientChannelBase.cs
- WsdlHelpGeneratorElement.cs
- MouseDevice.cs
- HtmlElementCollection.cs
- ThumbButtonInfo.cs
- MultipartContentParser.cs
- SmtpNetworkElement.cs
- Debug.cs
- DetailsView.cs
- List.cs
- Geometry.cs
- DbConvert.cs
- FileEnumerator.cs
- Imaging.cs
- FixedPageAutomationPeer.cs
- ClickablePoint.cs
- LoginCancelEventArgs.cs
- AttachedAnnotation.cs
- RemotingException.cs
- StringCollection.cs
- RepeatBehavior.cs
- CodeTypeDelegate.cs