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
- ArrayElementGridEntry.cs
- DrawingState.cs
- IndexOutOfRangeException.cs
- MultiSelectRootGridEntry.cs
- SqlUDTStorage.cs
- ArgumentOutOfRangeException.cs
- MouseButton.cs
- ArrayWithOffset.cs
- SelectedGridItemChangedEvent.cs
- IisTraceListener.cs
- PackWebRequest.cs
- filewebrequest.cs
- LineMetrics.cs
- InstanceLockLostException.cs
- GridToolTip.cs
- SchemaElement.cs
- RequestCacheValidator.cs
- TabPageDesigner.cs
- EndOfStreamException.cs
- SortExpressionBuilder.cs
- RadioButton.cs
- X509Extension.cs
- PropertyPushdownHelper.cs
- ActivitySurrogateSelector.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- AnnotationAuthorChangedEventArgs.cs
- SharedRuntimeState.cs
- _NestedSingleAsyncResult.cs
- FilterElement.cs
- DataGridViewElement.cs
- NetNamedPipeSecurityMode.cs
- DesignerCategoryAttribute.cs
- wgx_exports.cs
- FrameworkContentElement.cs
- BinaryMessageEncodingBindingElement.cs
- ResourcePool.cs
- RegexCapture.cs
- MemberMaps.cs
- FlowLayout.cs
- TreeViewImageIndexConverter.cs
- StoreAnnotationsMap.cs
- SqlBuilder.cs
- MetaModel.cs
- PolyQuadraticBezierSegment.cs
- XmlFileEditor.cs
- XPathNode.cs
- updateconfighost.cs
- QuaternionValueSerializer.cs
- HtmlToClrEventProxy.cs
- CodeDOMUtility.cs
- PersonalizationProviderHelper.cs
- UICuesEvent.cs
- PropertyDescriptor.cs
- UInt32.cs
- BamlResourceDeserializer.cs
- SetUserLanguageRequest.cs
- Serializer.cs
- Style.cs
- RuleValidation.cs
- IndentTextWriter.cs
- MatrixTransform.cs
- XmlUTF8TextReader.cs
- TagPrefixInfo.cs
- XpsFilter.cs
- PhysicalAddress.cs
- ObjectPropertyMapping.cs
- ButtonFieldBase.cs
- ServicePoint.cs
- FuncCompletionCallbackWrapper.cs
- SaveFileDialog.cs
- OperationValidationEventArgs.cs
- PartitionedStreamMerger.cs
- ErrorFormatter.cs
- MimeWriter.cs
- NotifyParentPropertyAttribute.cs
- CoreSwitches.cs
- ProxyGenerator.cs
- StrongTypingException.cs
- ADConnectionHelper.cs
- ActivationServices.cs
- MeshGeometry3D.cs
- EmissiveMaterial.cs
- ValueCollectionParameterReader.cs
- SerialStream.cs
- WindowsHyperlink.cs
- HttpWebRequest.cs
- Rotation3D.cs
- WizardSideBarListControlItem.cs
- HTMLTextWriter.cs
- CardSpaceSelector.cs
- MimeWriter.cs
- SqlReferenceCollection.cs
- RelationshipNavigation.cs
- SocketSettings.cs
- CanonicalizationDriver.cs
- XPathScanner.cs
- HelpKeywordAttribute.cs
- RoleManagerEventArgs.cs
- WindowsFormsHelpers.cs
- SerializationAttributes.cs