Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SynchronizedInputHelper.cs
- SimpleWorkerRequest.cs
- BaseTemplateCodeDomTreeGenerator.cs
- _HTTPDateParse.cs
- HtmlTitle.cs
- StopRoutingHandler.cs
- CursorEditor.cs
- TypeContext.cs
- ColumnWidthChangingEvent.cs
- _HeaderInfoTable.cs
- DataListItem.cs
- PairComparer.cs
- MenuItemAutomationPeer.cs
- Activity.cs
- XhtmlBasicValidatorAdapter.cs
- Line.cs
- UpdatePanelTrigger.cs
- EntryWrittenEventArgs.cs
- DictionaryCustomTypeDescriptor.cs
- ReadOnlyObservableCollection.cs
- DataTemplate.cs
- CollectionCodeDomSerializer.cs
- PreservationFileWriter.cs
- FontStyles.cs
- SubstitutionResponseElement.cs
- WindowsListViewGroupSubsetLink.cs
- Pens.cs
- CodeGen.cs
- ListViewInsertedEventArgs.cs
- DocumentEventArgs.cs
- ConsumerConnectionPoint.cs
- PropertyValueEditor.cs
- CheckedPointers.cs
- TokenBasedSetEnumerator.cs
- EntityCollection.cs
- Oci.cs
- EventLogEntryCollection.cs
- BezierSegment.cs
- XamlSerializer.cs
- QueryCacheKey.cs
- EndpointIdentity.cs
- PropertyGridView.cs
- MergablePropertyAttribute.cs
- DataGridColumnDropSeparator.cs
- ObjectDataSourceDisposingEventArgs.cs
- SqlUtil.cs
- SqlDataSourceEnumerator.cs
- ExtensionDataReader.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- PriorityItem.cs
- ParserExtension.cs
- WinFormsUtils.cs
- StateItem.cs
- TemplateInstanceAttribute.cs
- System.Data_BID.cs
- MethodRental.cs
- AmbientEnvironment.cs
- QuinticEase.cs
- ExpandSegment.cs
- RealProxy.cs
- UnsafeNativeMethodsTablet.cs
- RecognizerStateChangedEventArgs.cs
- TextFindEngine.cs
- NetNamedPipeSecurityElement.cs
- BinaryCommonClasses.cs
- SqlXml.cs
- ProfilePropertySettings.cs
- SoapFormatterSinks.cs
- Model3D.cs
- BackgroundWorker.cs
- QueryOperator.cs
- PermissionListSet.cs
- FormViewCommandEventArgs.cs
- ControlParameter.cs
- TemplateColumn.cs
- DebugHandleTracker.cs
- Parameter.cs
- XPathMultyIterator.cs
- NGCSerializationManager.cs
- BulletDecorator.cs
- MatchingStyle.cs
- BinarySecretKeyIdentifierClause.cs
- RuleSettings.cs
- UndoManager.cs
- GeometryConverter.cs
- CmsUtils.cs
- ImageCreator.cs
- ArgumentsParser.cs
- HttpApplicationStateWrapper.cs
- ImageConverter.cs
- HitTestFilterBehavior.cs
- UTF7Encoding.cs
- PageAsyncTask.cs
- HtmlLink.cs
- CollectionViewSource.cs
- PropertyMetadata.cs
- ComponentChangedEvent.cs
- DuplicateWaitObjectException.cs
- SelectionRangeConverter.cs
- LinearKeyFrames.cs