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
- StreamUpgradeAcceptor.cs
- DefaultValueTypeConverter.cs
- XmlWrappingWriter.cs
- SecurityHelper.cs
- DataStreamFromComStream.cs
- DataGridTablesFactory.cs
- SecurityCriticalDataForSet.cs
- HttpDictionary.cs
- FlowDocumentFormatter.cs
- CFGGrammar.cs
- ScrollBar.cs
- PointCollection.cs
- ConstantCheck.cs
- DataControlFieldCollection.cs
- TreeWalkHelper.cs
- PackUriHelper.cs
- relpropertyhelper.cs
- XmlSecureResolver.cs
- ApplicationHost.cs
- SchemaImporterExtensionElement.cs
- ExtendedPropertyCollection.cs
- MDIWindowDialog.cs
- DataGridViewCellLinkedList.cs
- GridViewDeleteEventArgs.cs
- TargetFrameworkUtil.cs
- RecordsAffectedEventArgs.cs
- StackSpiller.Generated.cs
- WebBaseEventKeyComparer.cs
- BamlReader.cs
- GridViewRowPresenterBase.cs
- DataContractSerializerSection.cs
- SchemaHelper.cs
- EntityViewGenerationAttribute.cs
- DescendantBaseQuery.cs
- AuthenticationModulesSection.cs
- QueryPageSettingsEventArgs.cs
- AutoResetEvent.cs
- BehaviorEditorPart.cs
- tooltip.cs
- AutoCompleteStringCollection.cs
- HitTestResult.cs
- BamlStream.cs
- TransformedBitmap.cs
- DataRowComparer.cs
- Privilege.cs
- MailDefinition.cs
- XmlUtil.cs
- FilterQueryOptionExpression.cs
- HtmlTableRow.cs
- WebPartTracker.cs
- ExpressionLink.cs
- GenericTypeParameterConverter.cs
- hresults.cs
- SqlStream.cs
- FigureParagraph.cs
- SQLInt64Storage.cs
- NetStream.cs
- CodeCastExpression.cs
- SiteOfOriginContainer.cs
- CultureSpecificStringDictionary.cs
- RawStylusInputCustomData.cs
- DataGridColumnFloatingHeader.cs
- Path.cs
- NotSupportedException.cs
- Speller.cs
- SByteStorage.cs
- ListBox.cs
- SqlDataSourceCache.cs
- InputMethod.cs
- XPathScanner.cs
- InstancePersistenceEvent.cs
- SafeSecurityHandles.cs
- Graphics.cs
- ZipIOExtraFieldElement.cs
- Processor.cs
- AppSettingsExpressionBuilder.cs
- CompositeFontInfo.cs
- ToolbarAUtomationPeer.cs
- SettingsSection.cs
- DispatcherEventArgs.cs
- XmlReflectionImporter.cs
- ChildrenQuery.cs
- ChannelDemuxer.cs
- SystemInfo.cs
- ComplusTypeValidator.cs
- SmtpDigestAuthenticationModule.cs
- AxWrapperGen.cs
- MulticastIPAddressInformationCollection.cs
- ClientConfigPaths.cs
- ZeroOpNode.cs
- RichTextBoxContextMenu.cs
- ConversionValidationRule.cs
- SqlTriggerContext.cs
- CharacterShapingProperties.cs
- BaseParser.cs
- SchemaAttDef.cs
- ResXFileRef.cs
- PropertyGrid.cs
- X509ScopedServiceCertificateElement.cs
- IPEndPointCollection.cs