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
- Viewport3DVisual.cs
- MetadataCacheItem.cs
- CrossAppDomainChannel.cs
- SerializationSectionGroup.cs
- SingleStorage.cs
- ToolStripContainer.cs
- ChangesetResponse.cs
- RelationalExpressions.cs
- BaseEntityWrapper.cs
- DispatcherEventArgs.cs
- BuildProviderCollection.cs
- WebPartEditorOkVerb.cs
- VisualProxy.cs
- SchemaElementLookUpTable.cs
- PenCursorManager.cs
- MsmqMessage.cs
- TraceFilter.cs
- WebPartMenu.cs
- DataServiceStreamProviderWrapper.cs
- Size3D.cs
- HMACRIPEMD160.cs
- PersistChildrenAttribute.cs
- IndependentlyAnimatedPropertyMetadata.cs
- PermissionListSet.cs
- CssTextWriter.cs
- OutputCacheModule.cs
- StandardToolWindows.cs
- NativeMethods.cs
- DataSetUtil.cs
- Location.cs
- BuildProvidersCompiler.cs
- DesignerDataStoredProcedure.cs
- TypeBrowser.xaml.cs
- EventSourceCreationData.cs
- DataGridViewLinkCell.cs
- PrintDialog.cs
- UdpMessageProperty.cs
- TranslateTransform3D.cs
- controlskin.cs
- StackOverflowException.cs
- SemanticAnalyzer.cs
- OneToOneMappingSerializer.cs
- MimeMapping.cs
- CustomAttributeSerializer.cs
- TextureBrush.cs
- LiteralControl.cs
- AsyncStreamReader.cs
- IgnoreFlushAndCloseStream.cs
- MenuItemBinding.cs
- ArgumentOutOfRangeException.cs
- adornercollection.cs
- ExtensionWindow.cs
- Convert.cs
- AssemblyInfo.cs
- QueryStringParameter.cs
- LayoutInformation.cs
- Root.cs
- XmlSchemaChoice.cs
- _KerberosClient.cs
- FacetDescriptionElement.cs
- Utilities.cs
- _BasicClient.cs
- DataSourceCache.cs
- ValidatingPropertiesEventArgs.cs
- DataSourceExpressionCollection.cs
- ActivitiesCollection.cs
- COM2ExtendedBrowsingHandler.cs
- ProcessRequestArgs.cs
- CheckBoxFlatAdapter.cs
- DataBoundControl.cs
- MachineKeyConverter.cs
- DataContractSet.cs
- RequestQueryProcessor.cs
- InstanceKeyCompleteException.cs
- SoapFault.cs
- UDPClient.cs
- ToolStripItemEventArgs.cs
- KeyPressEvent.cs
- TableCellAutomationPeer.cs
- WebPartZoneBase.cs
- DefaultMemberAttribute.cs
- MessageFormatterConverter.cs
- PreProcessInputEventArgs.cs
- ToolStripOverflow.cs
- ToolStripContainerActionList.cs
- Constants.cs
- StorageEntityContainerMapping.cs
- DbConnectionHelper.cs
- DelegatingTypeDescriptionProvider.cs
- ResizingMessageFilter.cs
- ChineseLunisolarCalendar.cs
- XmlILIndex.cs
- EncryptedXml.cs
- httpapplicationstate.cs
- HyperLinkField.cs
- ConsumerConnectionPointCollection.cs
- UserUseLicenseDictionaryLoader.cs
- ToolStripDropDownClosingEventArgs.cs
- AppDomain.cs
- DockProviderWrapper.cs