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
- SqlEnums.cs
- UIElementCollection.cs
- SqlBinder.cs
- SelectionItemPattern.cs
- DataFieldConverter.cs
- RegexWorker.cs
- XmlSchemaGroupRef.cs
- AllMembershipCondition.cs
- InputElement.cs
- DrawingContextWalker.cs
- webproxy.cs
- SQLInt16Storage.cs
- InternalBufferManager.cs
- Sentence.cs
- Statements.cs
- UidPropertyAttribute.cs
- DecodeHelper.cs
- ObjectConverter.cs
- XhtmlTextWriter.cs
- TrustLevel.cs
- Collection.cs
- BooleanKeyFrameCollection.cs
- CodeDesigner.cs
- Accessible.cs
- XsdCachingReader.cs
- WebBrowserBase.cs
- SmiMetaData.cs
- _NegotiateClient.cs
- DocumentsTrace.cs
- DbConnectionPoolGroupProviderInfo.cs
- EntitySqlQueryCacheEntry.cs
- UniqueConstraint.cs
- UnsafeNativeMethods.cs
- Currency.cs
- IndexingContentUnit.cs
- DetailsView.cs
- AssemblyAttributes.cs
- XmlChoiceIdentifierAttribute.cs
- HandlerWithFactory.cs
- Quad.cs
- CommandManager.cs
- ToolStripSplitButton.cs
- SystemInformation.cs
- XmlWriterTraceListener.cs
- ComplexObject.cs
- ExpressionPrefixAttribute.cs
- DefinitionBase.cs
- ScrollItemPattern.cs
- Input.cs
- DetailsViewInsertEventArgs.cs
- FormattedTextSymbols.cs
- ModuleBuilder.cs
- RayHitTestParameters.cs
- XmlSchemaSequence.cs
- ListViewInsertionMark.cs
- EventsTab.cs
- ping.cs
- DbConnectionPoolGroup.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- EntityDataSourceReferenceGroup.cs
- GiveFeedbackEvent.cs
- MsmqQueue.cs
- LicenseContext.cs
- MetadataItemEmitter.cs
- LockedAssemblyCache.cs
- ColumnCollection.cs
- PartialTrustVisibleAssembliesSection.cs
- MetadataCache.cs
- IERequestCache.cs
- CollectionBase.cs
- SqlDataSource.cs
- SymbolTable.cs
- Membership.cs
- FontFamilyValueSerializer.cs
- PostBackOptions.cs
- InternalBufferManager.cs
- ManagedWndProcTracker.cs
- Size.cs
- Button.cs
- Span.cs
- MetadataItemEmitter.cs
- Command.cs
- TraceContext.cs
- InputBindingCollection.cs
- ElementAction.cs
- MethodBuilder.cs
- _OverlappedAsyncResult.cs
- GeneratedContractType.cs
- DbConnectionStringCommon.cs
- TaiwanCalendar.cs
- ListenerConfig.cs
- PointAnimationUsingPath.cs
- ToggleButtonAutomationPeer.cs
- EntityDesignerUtils.cs
- Publisher.cs
- EntityDataSourceUtil.cs
- MsmqProcessProtocolHandler.cs
- CurrentChangingEventArgs.cs
- ContactManager.cs
- SecurityException.cs