Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- FlowLayoutPanel.cs
- HttpCachePolicyElement.cs
- ProfileSettingsCollection.cs
- TransactionScope.cs
- GroupBox.cs
- Transform.cs
- Configuration.cs
- CSharpCodeProvider.cs
- SafeCryptoHandles.cs
- Package.cs
- ClientSponsor.cs
- WhitespaceRuleReader.cs
- StyleBamlRecordReader.cs
- sqlcontext.cs
- TransmissionStrategy.cs
- CollectionEditorDialog.cs
- BamlBinaryReader.cs
- DeclarativeCatalogPart.cs
- ResourceReferenceKeyNotFoundException.cs
- HyperLink.cs
- ServerValidateEventArgs.cs
- NameValueConfigurationElement.cs
- CustomAttribute.cs
- PartialArray.cs
- UiaCoreApi.cs
- VirtualDirectoryMappingCollection.cs
- SchemaMerger.cs
- ParserContext.cs
- NetworkAddressChange.cs
- SystemIPInterfaceProperties.cs
- ValuePattern.cs
- Update.cs
- _BufferOffsetSize.cs
- WebConfigurationHost.cs
- DataGridViewCellLinkedList.cs
- TabControl.cs
- DescendantQuery.cs
- PeerConnector.cs
- FontSizeConverter.cs
- Convert.cs
- AsnEncodedData.cs
- Menu.cs
- WebPartConnectionsEventArgs.cs
- CreatingCookieEventArgs.cs
- designeractionlistschangedeventargs.cs
- DatePickerAutomationPeer.cs
- UserCancellationException.cs
- NotifyIcon.cs
- CoreSwitches.cs
- SecuritySessionServerSettings.cs
- TypeReference.cs
- SizeChangedEventArgs.cs
- Application.cs
- TextFormatterImp.cs
- PolicyStatement.cs
- Converter.cs
- MenuScrollingVisibilityConverter.cs
- LocalizableResourceBuilder.cs
- DtrList.cs
- PageParser.cs
- XmlnsDefinitionAttribute.cs
- ProfileProvider.cs
- WindowsFormsSectionHandler.cs
- AuthenticateEventArgs.cs
- ReferenceService.cs
- NavigationProgressEventArgs.cs
- TypedServiceOperationListItem.cs
- Overlapped.cs
- EpmSyndicationContentSerializer.cs
- EdmSchemaError.cs
- InternalRelationshipCollection.cs
- FileDialogCustomPlace.cs
- HttpServerChannel.cs
- CompleteWizardStep.cs
- TraceEventCache.cs
- SearchExpression.cs
- DBDataPermission.cs
- SerializationBinder.cs
- DeferredSelectedIndexReference.cs
- XmlMemberMapping.cs
- XsltLoader.cs
- DropShadowEffect.cs
- RealizationContext.cs
- File.cs
- HttpServerUtilityWrapper.cs
- SamlAttributeStatement.cs
- ZipIOExtraFieldZip64Element.cs
- CompoundFileReference.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- UserNamePasswordValidationMode.cs
- FixedTextPointer.cs
- IndicCharClassifier.cs
- Point.cs
- TransformPattern.cs
- ErrorTolerantObjectWriter.cs
- AutomationIdentifier.cs
- ProfileInfo.cs
- GeneralTransform3DGroup.cs
- RootBrowserWindowProxy.cs
- Compiler.cs