Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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
- AssociatedControlConverter.cs
- SynchronizationFilter.cs
- CodeChecksumPragma.cs
- IEnumerable.cs
- BaseHashHelper.cs
- IDReferencePropertyAttribute.cs
- CheckBoxFlatAdapter.cs
- UnicastIPAddressInformationCollection.cs
- UseAttributeSetsAction.cs
- FontWeights.cs
- ColumnWidthChangedEvent.cs
- UnsafeNativeMethods.cs
- ValidatorCollection.cs
- RegistryDataKey.cs
- UnsafeNativeMethods.cs
- basevalidator.cs
- FontUnit.cs
- SQLBinaryStorage.cs
- ActivityBuilderHelper.cs
- HttpChannelBindingToken.cs
- EntityAdapter.cs
- HtmlContainerControl.cs
- AlternateViewCollection.cs
- InboundActivityHelper.cs
- JpegBitmapDecoder.cs
- Variant.cs
- Message.cs
- Mutex.cs
- QuaternionKeyFrameCollection.cs
- DataSourceGroupCollection.cs
- TextSearch.cs
- CompressStream.cs
- UriGenerator.cs
- ClientScriptItem.cs
- HttpCachePolicy.cs
- COM2PropertyDescriptor.cs
- TraceContextEventArgs.cs
- SByteConverter.cs
- Cursors.cs
- CategoryValueConverter.cs
- ClientApiGenerator.cs
- PersonalizationProvider.cs
- WsiProfilesElement.cs
- UserNamePasswordValidator.cs
- CheckBoxRenderer.cs
- XmlTextReader.cs
- AssertFilter.cs
- MemberJoinTreeNode.cs
- ProfileSettingsCollection.cs
- UseLicense.cs
- shaperfactoryquerycacheentry.cs
- DrawingState.cs
- ImageEditor.cs
- EmptyCollection.cs
- TrustManagerPromptUI.cs
- CopyOnWriteList.cs
- NotFiniteNumberException.cs
- DynamicDocumentPaginator.cs
- CodeSubDirectory.cs
- FilteredReadOnlyMetadataCollection.cs
- ListViewTableCell.cs
- ValueChangedEventManager.cs
- TextSelectionProcessor.cs
- TextBreakpoint.cs
- MarkupCompiler.cs
- FormViewRow.cs
- ViewSimplifier.cs
- KnownTypesHelper.cs
- URL.cs
- RepeaterItemEventArgs.cs
- InternalRelationshipCollection.cs
- ObjectQueryExecutionPlan.cs
- GlobalizationSection.cs
- SerializationInfoEnumerator.cs
- PeerCollaboration.cs
- UrlMappingsModule.cs
- ListViewItem.cs
- CodeTypeOfExpression.cs
- HtmlForm.cs
- SyndicationSerializer.cs
- EntityContainer.cs
- WebPartDisplayModeEventArgs.cs
- XsltOutput.cs
- Attributes.cs
- ViewGenResults.cs
- FormViewUpdatedEventArgs.cs
- DependencyProperty.cs
- TreeViewItem.cs
- UnsafeNativeMethodsPenimc.cs
- MemberHolder.cs
- TableAutomationPeer.cs
- RotationValidation.cs
- CfgSemanticTag.cs
- TrustSection.cs
- UrlRoutingHandler.cs
- XmlSequenceWriter.cs
- DocumentSchemaValidator.cs
- DispatchChannelSink.cs
- Stream.cs
- FragmentQueryProcessor.cs