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
- DecoratedNameAttribute.cs
- SetStoryboardSpeedRatio.cs
- OraclePermission.cs
- PrintingPermission.cs
- URLEditor.cs
- NamespaceQuery.cs
- ObjectAnimationBase.cs
- MemoryResponseElement.cs
- DrawingContextWalker.cs
- FormatterConverter.cs
- TextProperties.cs
- DefinitionUpdate.cs
- CodeDelegateInvokeExpression.cs
- HttpRequestTraceRecord.cs
- ContextMenuService.cs
- Misc.cs
- RangeBaseAutomationPeer.cs
- OleAutBinder.cs
- ListParaClient.cs
- BinaryObjectReader.cs
- OletxEnlistment.cs
- Collection.cs
- FileReservationCollection.cs
- BrowsableAttribute.cs
- AdvancedBindingEditor.cs
- CompiledQueryCacheKey.cs
- TypedElement.cs
- EnumConverter.cs
- Transform3DGroup.cs
- Matrix3DValueSerializer.cs
- CodeIdentifiers.cs
- HiddenFieldDesigner.cs
- ToolStripGripRenderEventArgs.cs
- CollectionBuilder.cs
- LogLogRecordHeader.cs
- UndoManager.cs
- SQLCharsStorage.cs
- WindowsProgressbar.cs
- CollectionChange.cs
- BindableAttribute.cs
- InvokeMethodDesigner.xaml.cs
- SchemaCollectionPreprocessor.cs
- DecimalAnimationBase.cs
- WebServiceParameterData.cs
- WebPartEditorApplyVerb.cs
- NodeInfo.cs
- WebZone.cs
- ModelUIElement3D.cs
- ValueUtilsSmi.cs
- FileDataSourceCache.cs
- NavigationPropertyEmitter.cs
- XmlSecureResolver.cs
- ExpressionBindingCollection.cs
- EmbeddedMailObject.cs
- BitmapEncoder.cs
- Italic.cs
- DeferredTextReference.cs
- SqlOuterApplyReducer.cs
- NeedSkipTokenVisitor.cs
- QueryContext.cs
- ByteStreamGeometryContext.cs
- ContextMenuStrip.cs
- WizardStepCollectionEditor.cs
- WebContext.cs
- XmlWriterSettings.cs
- SemanticResultKey.cs
- SqlHelper.cs
- SqlInfoMessageEvent.cs
- ExpressionTextBoxAutomationPeer.cs
- AssemblyNameUtility.cs
- RequestQueryParser.cs
- SystemIPGlobalStatistics.cs
- precedingquery.cs
- EventDescriptor.cs
- DecryptedHeader.cs
- Polygon.cs
- PropertyOrder.cs
- AppDomainAttributes.cs
- FormsAuthenticationTicket.cs
- StorageComplexPropertyMapping.cs
- CompoundFileReference.cs
- SQLBoolean.cs
- TableLayoutRowStyleCollection.cs
- DataGridViewCellEventArgs.cs
- Timer.cs
- COAUTHINFO.cs
- StrongTypingException.cs
- XmlUrlResolver.cs
- XhtmlConformanceSection.cs
- WindowShowOrOpenTracker.cs
- RectKeyFrameCollection.cs
- FileDialogPermission.cs
- StorageSetMapping.cs
- PropertyKey.cs
- PagedControl.cs
- DetailsViewInsertedEventArgs.cs
- MessagePropertyDescriptionCollection.cs
- PathFigureCollectionConverter.cs
- DataTemplateKey.cs
- UInt16Storage.cs