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
- InputLanguageSource.cs
- OutputCacheProfileCollection.cs
- RewritingProcessor.cs
- TextTreeTextBlock.cs
- Matrix3D.cs
- ImageListStreamer.cs
- Directory.cs
- FastPropertyAccessor.cs
- ListViewUpdateEventArgs.cs
- ApplicationFileParser.cs
- HasCopySemanticsAttribute.cs
- SmtpClient.cs
- TcpAppDomainProtocolHandler.cs
- XmlSchemaCollection.cs
- SerializationEventsCache.cs
- HandleExceptionArgs.cs
- PriorityBindingExpression.cs
- CookieProtection.cs
- COM2Properties.cs
- DynamicQueryableWrapper.cs
- LayoutTableCell.cs
- Random.cs
- ArrangedElementCollection.cs
- MenuAutomationPeer.cs
- TableChangeProcessor.cs
- cookie.cs
- EnlistmentTraceIdentifier.cs
- ServiceMemoryGates.cs
- XmlNullResolver.cs
- ButtonBase.cs
- LocationSectionRecord.cs
- TypeGeneratedEventArgs.cs
- TransactionFlowProperty.cs
- NonVisualControlAttribute.cs
- TrackingMemoryStream.cs
- XmlQueryCardinality.cs
- WindowsListViewScroll.cs
- TimelineClockCollection.cs
- ChangeBlockUndoRecord.cs
- GridViewEditEventArgs.cs
- LinkButton.cs
- Parameter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ModelVisual3D.cs
- UserThread.cs
- SlipBehavior.cs
- XmlSchemaNotation.cs
- DefaultProxySection.cs
- listitem.cs
- oledbmetadatacolumnnames.cs
- BuildProviderUtils.cs
- PersonalizationState.cs
- AccessDataSource.cs
- GiveFeedbackEventArgs.cs
- AndCondition.cs
- DesignerRegionCollection.cs
- SetterBase.cs
- ImageListUtils.cs
- WebServiceReceiveDesigner.cs
- BufferedStream.cs
- MediaContextNotificationWindow.cs
- ExternalFile.cs
- IProducerConsumerCollection.cs
- ResourceManagerWrapper.cs
- tooltip.cs
- RuntimeResourceSet.cs
- odbcmetadatacollectionnames.cs
- DbMetaDataCollectionNames.cs
- DocumentPageTextView.cs
- OdbcStatementHandle.cs
- EventLogPermissionAttribute.cs
- RegexWriter.cs
- SqlConnectionStringBuilder.cs
- TableLayoutSettings.cs
- EncoderParameters.cs
- AuthenticationException.cs
- JournalEntryStack.cs
- Color.cs
- ToolBar.cs
- ExceptionTrace.cs
- ColorContextHelper.cs
- WebPartZone.cs
- SmtpReplyReaderFactory.cs
- TemplateBindingExpression.cs
- StrongName.cs
- GridViewRow.cs
- UnsafeNativeMethods.cs
- AsyncResult.cs
- HtmlInputHidden.cs
- ActivityExecutorSurrogate.cs
- SemaphoreSecurity.cs
- _Rfc2616CacheValidators.cs
- AsnEncodedData.cs
- Drawing.cs
- PageClientProxyGenerator.cs
- DataGridTextBoxColumn.cs
- WorkflowViewElement.cs
- CheckBox.cs
- AnonymousIdentificationModule.cs
- XmlRawWriterWrapper.cs