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
- BitmapEffectDrawingContextWalker.cs
- RsaKeyIdentifierClause.cs
- TextServicesDisplayAttribute.cs
- XmlCDATASection.cs
- ManualResetEventSlim.cs
- IPGlobalProperties.cs
- HwndSourceParameters.cs
- TraceSection.cs
- ThousandthOfEmRealPoints.cs
- ContentPosition.cs
- MatchAttribute.cs
- HttpHostedTransportConfiguration.cs
- ProgressChangedEventArgs.cs
- SafePEFileHandle.cs
- VariableQuery.cs
- SoapFaultCodes.cs
- BaseAsyncResult.cs
- Int32CollectionValueSerializer.cs
- EnumBuilder.cs
- DocumentSchemaValidator.cs
- DeobfuscatingStream.cs
- OlePropertyStructs.cs
- PlaceHolder.cs
- GridViewSortEventArgs.cs
- SchemaTableOptionalColumn.cs
- NamedPermissionSet.cs
- VirtualDirectoryMappingCollection.cs
- FacetEnabledSchemaElement.cs
- ActiveXContainer.cs
- XmlWriterSettings.cs
- StructuralComparisons.cs
- ChangeNode.cs
- PolicyException.cs
- ConnectionStringsSection.cs
- KnownAssembliesSet.cs
- FileChangesMonitor.cs
- RealizationContext.cs
- CollectionType.cs
- GridItem.cs
- TableRowsCollectionEditor.cs
- ClientType.cs
- TransportSecurityBindingElement.cs
- MetadataUtilsSmi.cs
- XmlSchemaObjectCollection.cs
- DataGridViewTopLeftHeaderCell.cs
- ListParaClient.cs
- BooleanFunctions.cs
- NameNode.cs
- SqlDataSourceCommandEventArgs.cs
- GridEntry.cs
- XmlMapping.cs
- Propagator.cs
- WhitespaceRuleReader.cs
- CryptoKeySecurity.cs
- TreeNodeStyleCollection.cs
- SpellCheck.cs
- HwndProxyElementProvider.cs
- CodeGotoStatement.cs
- HitTestDrawingContextWalker.cs
- PeerPresenceInfo.cs
- ThrowOnMultipleAssignment.cs
- CompModSwitches.cs
- ResourceManagerWrapper.cs
- DefaultPropertiesToSend.cs
- WebPermission.cs
- QueueTransferProtocol.cs
- VectorAnimation.cs
- JournalEntryListConverter.cs
- OleDbCommand.cs
- OrderedDictionary.cs
- ActivityStateRecord.cs
- ListParaClient.cs
- StreamProxy.cs
- HotCommands.cs
- DeflateStream.cs
- PassportAuthenticationModule.cs
- RuntimeHelpers.cs
- ScriptReference.cs
- HtmlHistory.cs
- Win32MouseDevice.cs
- AjaxFrameworkAssemblyAttribute.cs
- PenThread.cs
- IEnumerable.cs
- KeyFrames.cs
- _SSPIWrapper.cs
- DataSourceComponent.cs
- GlyphRun.cs
- StorageMappingItemCollection.cs
- DelegateSerializationHolder.cs
- DbConnectionClosed.cs
- PointHitTestParameters.cs
- VSWCFServiceContractGenerator.cs
- BrowserCapabilitiesCompiler.cs
- RowVisual.cs
- __ConsoleStream.cs
- UnsafeNativeMethods.cs
- DrawingAttributesDefaultValueFactory.cs
- StylesEditorDialog.cs
- UnsafeNativeMethods.cs
- SqlTriggerContext.cs