Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- WebBrowserNavigatingEventHandler.cs
- DesignRelation.cs
- ButtonBaseAdapter.cs
- GridSplitter.cs
- LicenseProviderAttribute.cs
- OutputCacheSettingsSection.cs
- ContractTypeNameElement.cs
- serverconfig.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- BindStream.cs
- EncoderBestFitFallback.cs
- ObjectResult.cs
- DesignerActionPanel.cs
- ConfigurationSettings.cs
- WebPermission.cs
- ContentOperations.cs
- Error.cs
- AutomationIdentifierGuids.cs
- cookiecollection.cs
- TextDecorations.cs
- MemoryPressure.cs
- HMACMD5.cs
- TableCell.cs
- Frame.cs
- MetricEntry.cs
- ShaderEffect.cs
- Attribute.cs
- SerializerProvider.cs
- FontDialog.cs
- UIAgentMonitorHandle.cs
- RestClientProxyHandler.cs
- RelationshipEnd.cs
- XhtmlConformanceSection.cs
- XmlDownloadManager.cs
- XslAst.cs
- GroupPartitionExpr.cs
- VerificationException.cs
- InstanceDataCollectionCollection.cs
- DocumentReference.cs
- GridViewCellAutomationPeer.cs
- FactoryGenerator.cs
- FigureParaClient.cs
- FormViewInsertedEventArgs.cs
- XmlDataImplementation.cs
- MetadataArtifactLoaderResource.cs
- VisualTarget.cs
- BlockUIContainer.cs
- StylusButtonEventArgs.cs
- ContainerActivationHelper.cs
- FilteredReadOnlyMetadataCollection.cs
- SafeMILHandleMemoryPressure.cs
- SspiHelper.cs
- CalendarItem.cs
- DecoderBestFitFallback.cs
- SqlSelectClauseBuilder.cs
- CustomPopupPlacement.cs
- ExtensionQuery.cs
- StateMachineHelpers.cs
- DeleteWorkflowOwnerCommand.cs
- MenuItemCollection.cs
- GACIdentityPermission.cs
- SiteMapPath.cs
- WindowsStreamSecurityUpgradeProvider.cs
- EarlyBoundInfo.cs
- MsmqIntegrationSecurity.cs
- TextEndOfSegment.cs
- StandardOleMarshalObject.cs
- ComponentDispatcher.cs
- ObjectView.cs
- DbParameterCollectionHelper.cs
- SerializableReadOnlyDictionary.cs
- ResizeGrip.cs
- SelectionPattern.cs
- XmlObjectSerializerReadContextComplex.cs
- MetafileHeaderWmf.cs
- MailWebEventProvider.cs
- EntityDataSourceStatementEditor.cs
- Listbox.cs
- TextDecorationCollectionConverter.cs
- HashHelper.cs
- CheckPair.cs
- SHA1.cs
- AutomationIdentifier.cs
- DbProviderServices.cs
- TraversalRequest.cs
- BypassElementCollection.cs
- TextServicesCompartment.cs
- DataGridParentRows.cs
- ToolboxControl.cs
- NotSupportedException.cs
- FaultHandlingFilter.cs
- WeakReferenceKey.cs
- EDesignUtil.cs
- ExpressionCopier.cs
- UrlRoutingHandler.cs
- DataControlPagerLinkButton.cs
- DataObjectEventArgs.cs
- CodeChecksumPragma.cs
- Exception.cs
- DocumentEventArgs.cs