Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ResourceCategoryAttribute.cs
- KeyboardNavigation.cs
- DataGridViewToolTip.cs
- ExpandCollapsePattern.cs
- ImageSourceValueSerializer.cs
- SAPICategories.cs
- userdatakeys.cs
- SerTrace.cs
- SerializationException.cs
- HttpHandlersInstallComponent.cs
- SqlDataSource.cs
- TreeNode.cs
- Soap.cs
- SystemIPGlobalProperties.cs
- TypeConverterHelper.cs
- UnsafeNativeMethods.cs
- TextServicesProperty.cs
- FontInfo.cs
- CheckoutException.cs
- DelegatedStream.cs
- PersonalizationEntry.cs
- Rotation3DAnimationBase.cs
- XamlInt32CollectionSerializer.cs
- XmlTextReaderImpl.cs
- GetWorkflowTree.cs
- CrossSiteScriptingValidation.cs
- SchemaCompiler.cs
- TableRowGroup.cs
- SafePointer.cs
- RuntimeConfig.cs
- followingquery.cs
- OdbcStatementHandle.cs
- ThrowHelper.cs
- BuildProviderCollection.cs
- BindingCompleteEventArgs.cs
- selecteditemcollection.cs
- TraceLevelStore.cs
- TreeViewImageKeyConverter.cs
- PagedControl.cs
- Int32KeyFrameCollection.cs
- BookmarkUndoUnit.cs
- HtmlString.cs
- SqlErrorCollection.cs
- CounterSampleCalculator.cs
- CompositeTypefaceMetrics.cs
- MailFileEditor.cs
- RemoteTokenFactory.cs
- PriorityBinding.cs
- BooleanFacetDescriptionElement.cs
- UDPClient.cs
- EdmToObjectNamespaceMap.cs
- Serializer.cs
- XamlSerializer.cs
- HttpFileCollection.cs
- Debug.cs
- MatrixAnimationBase.cs
- SqlDelegatedTransaction.cs
- DataGridLinkButton.cs
- DataSourceView.cs
- SessionStateModule.cs
- MSAANativeProvider.cs
- ThreadStartException.cs
- CounterCreationData.cs
- LinkArea.cs
- HtmlFormParameterWriter.cs
- TypeFieldSchema.cs
- PropertyMap.cs
- XmlValueConverter.cs
- TextEffect.cs
- HttpModuleActionCollection.cs
- StrongNameUtility.cs
- AuthenticationService.cs
- MinimizableAttributeTypeConverter.cs
- Animatable.cs
- ErrorInfoXmlDocument.cs
- ClipboardProcessor.cs
- CrossContextChannel.cs
- DbCommandDefinition.cs
- SqlSelectClauseBuilder.cs
- DiagnosticsConfigurationHandler.cs
- PageClientProxyGenerator.cs
- TypeExtensionConverter.cs
- LOSFormatter.cs
- ConfigurationSectionGroupCollection.cs
- securitycriticaldata.cs
- FixedTextBuilder.cs
- UnknownMessageReceivedEventArgs.cs
- EnumerableRowCollectionExtensions.cs
- Model3DCollection.cs
- XmlEncodedRawTextWriter.cs
- PriorityBinding.cs
- PaginationProgressEventArgs.cs
- AspNetSynchronizationContext.cs
- SqlParameterCollection.cs
- ToolStripCollectionEditor.cs
- CollectionViewGroupRoot.cs
- PageThemeCodeDomTreeGenerator.cs
- SqlParameter.cs
- ProxyWebPart.cs
- ContentType.cs