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
- CopyAction.cs
- ArraySubsetEnumerator.cs
- DbMetaDataFactory.cs
- WebServiceParameterData.cs
- Annotation.cs
- Function.cs
- figurelength.cs
- RelOps.cs
- IdentifierCollection.cs
- AssociatedControlConverter.cs
- ChineseLunisolarCalendar.cs
- ParseChildrenAsPropertiesAttribute.cs
- XmlDeclaration.cs
- TreeNodeBindingCollection.cs
- TransactionOptions.cs
- CriticalHandle.cs
- SerializationHelper.cs
- SchemaTypeEmitter.cs
- SourceFileBuildProvider.cs
- SettingsPropertyCollection.cs
- CfgRule.cs
- RsaKeyIdentifierClause.cs
- Stream.cs
- StorageTypeMapping.cs
- StructuredType.cs
- LingerOption.cs
- SmtpMail.cs
- AmbientLight.cs
- SourceFilter.cs
- XhtmlBasicPhoneCallAdapter.cs
- COM2Properties.cs
- SapiRecoInterop.cs
- SafeProcessHandle.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SystemResourceHost.cs
- CodeDelegateInvokeExpression.cs
- ViewValidator.cs
- TraceListeners.cs
- Compiler.cs
- PersistenceIOParticipant.cs
- NumericExpr.cs
- CDSsyncETWBCLProvider.cs
- LabelLiteral.cs
- XmlLinkedNode.cs
- CheckPair.cs
- JumpPath.cs
- MostlySingletonList.cs
- CommonRemoteMemoryBlock.cs
- ObjectIDGenerator.cs
- UnsafeNativeMethodsTablet.cs
- VirtualDirectoryMappingCollection.cs
- DesignerSerializationVisibilityAttribute.cs
- AuthorizationRule.cs
- ApplicationContext.cs
- Panel.cs
- AbsoluteQuery.cs
- InitializerFacet.cs
- HelpPage.cs
- EventSetter.cs
- UrlPath.cs
- _ListenerAsyncResult.cs
- XmlNamespaceMapping.cs
- CodeTypeReferenceCollection.cs
- SessionParameter.cs
- PolicyVersion.cs
- AnnotationAdorner.cs
- WebPartZoneDesigner.cs
- SchemaInfo.cs
- SqlVisitor.cs
- ExponentialEase.cs
- CodeThrowExceptionStatement.cs
- Decoder.cs
- SqlPersonalizationProvider.cs
- HebrewNumber.cs
- LowerCaseStringConverter.cs
- ForeignConstraint.cs
- ProgressPage.cs
- DrawListViewItemEventArgs.cs
- CodeGenerator.cs
- mediapermission.cs
- DynamicPropertyHolder.cs
- TimelineCollection.cs
- ProcessHostConfigUtils.cs
- Token.cs
- Boolean.cs
- BreakRecordTable.cs
- X509Extension.cs
- ContractUtils.cs
- RadialGradientBrush.cs
- uribuilder.cs
- CatchBlock.cs
- DataGridViewColumn.cs
- TypeInitializationException.cs
- Point3D.cs
- DataSourceNameHandler.cs
- GeneralTransform3DTo2D.cs
- RepeatButtonAutomationPeer.cs
- PenCursorManager.cs
- MenuBindingsEditorForm.cs
- SystemDropShadowChrome.cs