Code:
/ FX-1434 / FX-1434 / 1.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
- DataContractSet.cs
- Int16Storage.cs
- Soap.cs
- Visual3DCollection.cs
- IUnknownConstantAttribute.cs
- HttpRuntime.cs
- FactoryGenerator.cs
- HtmlTernaryTree.cs
- Pen.cs
- DrawingCollection.cs
- Ports.cs
- ProfilePropertySettings.cs
- ImageDrawing.cs
- NewItemsContextMenuStrip.cs
- HandlerMappingMemo.cs
- ResourcePermissionBaseEntry.cs
- UITypeEditors.cs
- ObjectDataSource.cs
- BrowserDefinition.cs
- DbConnectionPoolOptions.cs
- PackagePart.cs
- DataBinding.cs
- SimpleHandlerBuildProvider.cs
- DecoderReplacementFallback.cs
- RemotingSurrogateSelector.cs
- CompilerCollection.cs
- SqlUnionizer.cs
- CommandField.cs
- BorderSidesEditor.cs
- XmlLanguageConverter.cs
- DataTableExtensions.cs
- ScriptManagerProxy.cs
- StateMachineWorkflow.cs
- PerfCounters.cs
- ProcessStartInfo.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- DataBindingCollection.cs
- ComplexTypeEmitter.cs
- PropertyValidationContext.cs
- WebResourceAttribute.cs
- TypeConstant.cs
- FaultDesigner.cs
- DataObject.cs
- XmlC14NWriter.cs
- ListView.cs
- TableProviderWrapper.cs
- DataSourceXmlAttributeAttribute.cs
- InvalidAsynchronousStateException.cs
- Pick.cs
- FloaterBaseParagraph.cs
- Mutex.cs
- AttributeConverter.cs
- SqlProfileProvider.cs
- MessageSecurityVersionConverter.cs
- LinkLabel.cs
- mediaeventshelper.cs
- VisemeEventArgs.cs
- SqlDeflator.cs
- TabControl.cs
- ControlCommandSet.cs
- GridEntryCollection.cs
- Condition.cs
- IdleTimeoutMonitor.cs
- RuntimeComponentFilter.cs
- VirtualDirectoryMappingCollection.cs
- ScriptRegistrationManager.cs
- NotConverter.cs
- ActiveDocumentEvent.cs
- AdapterDictionary.cs
- SystemWebExtensionsSectionGroup.cs
- HitTestParameters.cs
- StringDictionary.cs
- PropertyValueUIItem.cs
- HyperLinkStyle.cs
- ConfigurationProperty.cs
- RealizationDrawingContextWalker.cs
- StylusTip.cs
- WebBrowserBase.cs
- JsonReader.cs
- BaseTemplatedMobileComponentEditor.cs
- MergeFilterQuery.cs
- HostSecurityManager.cs
- ImageCodecInfo.cs
- ToolStripDesignerUtils.cs
- SessionPageStatePersister.cs
- DrawingGroup.cs
- TreeViewEvent.cs
- DurableInstanceManager.cs
- StylusDownEventArgs.cs
- SafeFileHandle.cs
- WebRequestModulesSection.cs
- CommandManager.cs
- MultiTrigger.cs
- EntityAdapter.cs
- IncrementalHitTester.cs
- WindowsRegion.cs
- PanelDesigner.cs
- Application.cs
- SetIndexBinder.cs
- CodeCommentStatement.cs