Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- NativeObjectSecurity.cs
- ListViewGroupConverter.cs
- RadialGradientBrush.cs
- SmtpCommands.cs
- HostingPreferredMapPath.cs
- filewebrequest.cs
- EncryptedReference.cs
- Int32Converter.cs
- Control.cs
- GenerateHelper.cs
- InvariantComparer.cs
- embossbitmapeffect.cs
- ItemCollection.cs
- SatelliteContractVersionAttribute.cs
- AdapterUtil.cs
- NetworkInterface.cs
- SetterBase.cs
- TypeSystem.cs
- XPathMultyIterator.cs
- DynamicMethod.cs
- WaitForChangedResult.cs
- DelegateHelpers.cs
- BooleanKeyFrameCollection.cs
- OciEnlistContext.cs
- TextTrailingWordEllipsis.cs
- GlobalizationSection.cs
- MdiWindowListItemConverter.cs
- sqlstateclientmanager.cs
- DESCryptoServiceProvider.cs
- _Rfc2616CacheValidators.cs
- ThemeInfoAttribute.cs
- PriorityQueue.cs
- TypeElement.cs
- ListMarkerSourceInfo.cs
- WindowsScrollBarBits.cs
- DoubleCollectionConverter.cs
- ErrorStyle.cs
- OutOfProcStateClientManager.cs
- HtmlInputFile.cs
- ParameterReplacerVisitor.cs
- AxDesigner.cs
- ArcSegment.cs
- FactoryMaker.cs
- PlaceHolder.cs
- LoopExpression.cs
- PassportAuthentication.cs
- ReadOnlyKeyedCollection.cs
- Camera.cs
- WindowCollection.cs
- DocumentSchemaValidator.cs
- ThemeInfoAttribute.cs
- DragDropManager.cs
- SystemMulticastIPAddressInformation.cs
- FusionWrap.cs
- TextSegment.cs
- ListControlConvertEventArgs.cs
- DetailsViewRowCollection.cs
- ConfigurationValues.cs
- ConversionContext.cs
- MethodExpr.cs
- NavigatorInput.cs
- StateRuntime.cs
- OleDbReferenceCollection.cs
- TokenFactoryBase.cs
- LayoutTableCell.cs
- EllipseGeometry.cs
- Point3DCollection.cs
- TextBox.cs
- CodeTypeMember.cs
- Timeline.cs
- MetadataWorkspace.cs
- WindowsFormsSectionHandler.cs
- DataGridViewColumnStateChangedEventArgs.cs
- MemberCollection.cs
- XmlSchemaChoice.cs
- Environment.cs
- ToolStripDropDown.cs
- Crypto.cs
- SimpleType.cs
- CookieParameter.cs
- ResourceDescriptionAttribute.cs
- WebResponse.cs
- RootBrowserWindowProxy.cs
- LocationReferenceEnvironment.cs
- HostSecurityManager.cs
- sqlcontext.cs
- ClientRolePrincipal.cs
- FormsAuthenticationConfiguration.cs
- Point3DKeyFrameCollection.cs
- AttributeEmitter.cs
- FontCollection.cs
- XmlStreamStore.cs
- HostingEnvironmentSection.cs
- RSAOAEPKeyExchangeFormatter.cs
- InputScopeAttribute.cs
- SmiXetterAccessMap.cs
- StreamWithDictionary.cs
- DefaultShape.cs
- GridItem.cs
- ParallelTimeline.cs