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
- LineInfo.cs
- SelectionRangeConverter.cs
- SourceFilter.cs
- StreamUpdate.cs
- FreeFormPanel.cs
- FormViewRow.cs
- StringBlob.cs
- OleDbConnectionFactory.cs
- ContextStack.cs
- PeerTransportListenAddressValidatorAttribute.cs
- DataContractJsonSerializerOperationFormatter.cs
- WindowsToolbarItemAsMenuItem.cs
- OdbcConnectionHandle.cs
- VideoDrawing.cs
- WindowsSecurityToken.cs
- TextLine.cs
- CheckBoxBaseAdapter.cs
- AdapterDictionary.cs
- WindowManager.cs
- StorageRoot.cs
- MethodBody.cs
- Hashtable.cs
- CodeCommentStatementCollection.cs
- XmlSchemaComplexContent.cs
- ObjectListCommand.cs
- CellRelation.cs
- ScrollBar.cs
- OleDbConnectionInternal.cs
- TextDecorationUnitValidation.cs
- VScrollBar.cs
- DesignTimeType.cs
- TemplateBamlTreeBuilder.cs
- SmiConnection.cs
- BezierSegment.cs
- AvTrace.cs
- SecurityProtocolFactory.cs
- Quad.cs
- IndexObject.cs
- ProcessInputEventArgs.cs
- TemplateBindingExtensionConverter.cs
- WindowsIdentity.cs
- TypedCompletedAsyncResult.cs
- ConfigXmlAttribute.cs
- DummyDataSource.cs
- ConnectionsZoneAutoFormat.cs
- MappingMetadataHelper.cs
- RangeValidator.cs
- IgnoreFlushAndCloseStream.cs
- EditableRegion.cs
- DetailsView.cs
- NavigationExpr.cs
- Random.cs
- TemplateControlParser.cs
- PluggableProtocol.cs
- TriState.cs
- WebPartEditorCancelVerb.cs
- ObjectConverter.cs
- DataGridViewCellStyleConverter.cs
- regiisutil.cs
- RNGCryptoServiceProvider.cs
- LastQueryOperator.cs
- PerformanceCountersElement.cs
- Matrix.cs
- JsonCollectionDataContract.cs
- SplitterPanelDesigner.cs
- ThreadExceptionEvent.cs
- TextEditorMouse.cs
- Size3D.cs
- ImplicitInputBrush.cs
- IncrementalReadDecoders.cs
- Thumb.cs
- HttpWebResponse.cs
- ArgumentNullException.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- LongValidator.cs
- XmlWrappingReader.cs
- ProbeMatchesMessage11.cs
- configsystem.cs
- Base64Stream.cs
- ToolStrip.cs
- FormViewModeEventArgs.cs
- ReceiveCompletedEventArgs.cs
- Polygon.cs
- DetailsViewRowCollection.cs
- QueryAsyncResult.cs
- WebBrowserEvent.cs
- ArrayList.cs
- DocumentViewerBase.cs
- DBDataPermission.cs
- TypeDescriptionProviderAttribute.cs
- TypeResolver.cs
- Properties.cs
- XmlCodeExporter.cs
- SqlTypesSchemaImporter.cs
- WebPartZoneBaseDesigner.cs
- DataSourceControlBuilder.cs
- WebRequestModuleElementCollection.cs
- StaticTextPointer.cs
- ActivityFunc.cs
- VersionedStream.cs