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
- CatalogPartDesigner.cs
- DeclarativeCatalogPart.cs
- ToggleButton.cs
- NotifyInputEventArgs.cs
- IsolatedStoragePermission.cs
- EntityChangedParams.cs
- ErrorFormatter.cs
- Dump.cs
- PKCS1MaskGenerationMethod.cs
- ExpressionParser.cs
- BitStack.cs
- DelegateArgumentValue.cs
- ApplicationSecurityManager.cs
- DataTemplateSelector.cs
- BulletedListEventArgs.cs
- FixedTextContainer.cs
- StringUtil.cs
- UpdateCompiler.cs
- HelpHtmlBuilder.cs
- CopyAttributesAction.cs
- ColumnMapVisitor.cs
- FrameworkElementFactoryMarkupObject.cs
- StructuredProperty.cs
- PauseStoryboard.cs
- Events.cs
- BitmapCodecInfo.cs
- RelatedPropertyManager.cs
- UIElement.cs
- RelationshipFixer.cs
- StringFunctions.cs
- MenuStrip.cs
- Internal.cs
- HierarchicalDataBoundControlAdapter.cs
- SHA256.cs
- DataTableReader.cs
- WebErrorHandler.cs
- OleDbPermission.cs
- TextSimpleMarkerProperties.cs
- ExpressionNode.cs
- SrgsElement.cs
- LicenseException.cs
- SmtpLoginAuthenticationModule.cs
- PermissionRequestEvidence.cs
- TextElementEditingBehaviorAttribute.cs
- SrgsGrammar.cs
- FontSizeConverter.cs
- RichTextBox.cs
- SafeNativeHandle.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- DCSafeHandle.cs
- Hashtable.cs
- SelectedGridItemChangedEvent.cs
- EntitySet.cs
- SmiContextFactory.cs
- DataGridViewCellCancelEventArgs.cs
- DesignerAdRotatorAdapter.cs
- HotSpot.cs
- ClientTargetCollection.cs
- SdlChannelSink.cs
- Serializer.cs
- EmissiveMaterial.cs
- DbDataAdapter.cs
- CategoriesDocumentFormatter.cs
- Pair.cs
- CookieHandler.cs
- DataGridTextBox.cs
- KeyValuePair.cs
- basenumberconverter.cs
- SmtpLoginAuthenticationModule.cs
- PropertyChangingEventArgs.cs
- HtmlPhoneCallAdapter.cs
- bindurihelper.cs
- XmlSchemaAnnotation.cs
- ThrowHelper.cs
- EllipseGeometry.cs
- CultureTableRecord.cs
- MultiPropertyDescriptorGridEntry.cs
- WizardForm.cs
- NavigationProperty.cs
- XmlTextReader.cs
- FormatSelectingMessageInspector.cs
- PerformanceCounterManager.cs
- ObsoleteAttribute.cs
- designeractionlistschangedeventargs.cs
- ClientScriptManagerWrapper.cs
- WindowsRebar.cs
- BaseDataBoundControl.cs
- FrameworkContentElement.cs
- WebPartConnectVerb.cs
- SoapFaultCodes.cs
- PersonalizationProvider.cs
- RoleBoolean.cs
- ConditionValidator.cs
- AbstractDataSvcMapFileLoader.cs
- HTTPNotFoundHandler.cs
- WindowsFormsHost.cs
- ProxyElement.cs
- SQLUtility.cs
- WorkflowOperationContext.cs
- DesignerDataView.cs