Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / AttributeProviderAttribute.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GrabHandleGlyph.cs
- OptimisticConcurrencyException.cs
- ActivityMarkupSerializer.cs
- SqlConnectionString.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- webeventbuffer.cs
- OuterGlowBitmapEffect.cs
- Win32PrintDialog.cs
- CustomBindingElementCollection.cs
- XmlSchemaProviderAttribute.cs
- EventListenerClientSide.cs
- DataGridViewTextBoxEditingControl.cs
- BindingList.cs
- ChannelSinkStacks.cs
- BCryptSafeHandles.cs
- TextTreeRootNode.cs
- WebPartVerb.cs
- TopClause.cs
- GeometryCombineModeValidation.cs
- ConnectionManagementSection.cs
- DiscoveryMessageSequenceCD1.cs
- DialogDivider.cs
- PageAsyncTask.cs
- GeneralTransform.cs
- IndentedWriter.cs
- ILGenerator.cs
- TableDetailsCollection.cs
- NetworkStream.cs
- SqlConnectionPoolProviderInfo.cs
- PageThemeCodeDomTreeGenerator.cs
- DataGridViewColumnEventArgs.cs
- FlowLayoutPanel.cs
- TextRunCacheImp.cs
- UserMapPath.cs
- ExpanderAutomationPeer.cs
- WindowsImpersonationContext.cs
- DataColumnMapping.cs
- TextBoxView.cs
- FormViewInsertedEventArgs.cs
- RegexRunnerFactory.cs
- OperationAbortedException.cs
- AssemblyAssociatedContentFileAttribute.cs
- DispatcherHookEventArgs.cs
- SevenBitStream.cs
- TdsParser.cs
- FloaterBaseParagraph.cs
- RtfToXamlLexer.cs
- COMException.cs
- ArcSegment.cs
- HostingMessageProperty.cs
- ListViewDataItem.cs
- SortAction.cs
- DefaultValueAttribute.cs
- VisualCollection.cs
- ConfigXmlAttribute.cs
- EntityDataSource.cs
- AvTraceFormat.cs
- NotImplementedException.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- UnsafeNativeMethods.cs
- ControlEvent.cs
- StubHelpers.cs
- SoapCodeExporter.cs
- DataSet.cs
- documentsequencetextview.cs
- DataBindingCollection.cs
- OleDbParameterCollection.cs
- DbgUtil.cs
- BaseUriHelper.cs
- InvokeWebServiceDesigner.cs
- ClientEventManager.cs
- AuthenticodeSignatureInformation.cs
- ImplicitInputBrush.cs
- NetworkInformationPermission.cs
- PrimitiveSchema.cs
- SystemNetHelpers.cs
- StyleCollection.cs
- StylusSystemGestureEventArgs.cs
- EUCJPEncoding.cs
- ToolStripItem.cs
- EmptyControlCollection.cs
- DeflateInput.cs
- BindingExpressionBase.cs
- TextViewBase.cs
- ReturnType.cs
- DictionaryBase.cs
- ToggleProviderWrapper.cs
- XmlSchema.cs
- ControlCachePolicy.cs
- WindowsButton.cs
- SQLInt64.cs
- OverloadGroupAttribute.cs
- DataBoundLiteralControl.cs
- ContentPresenter.cs
- ColorConvertedBitmap.cs
- FloatAverageAggregationOperator.cs
- XmlKeywords.cs
- Identity.cs
- DesignerOptionService.cs
- DynamicMetaObjectBinder.cs