Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / ProvidePropertyAttribute.cs / 1 / ProvidePropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class ProvidePropertyAttribute : Attribute { private readonly string propertyName; private readonly string receiverTypeName; ///Specifies which methods are extender /// properties. ////// public ProvidePropertyAttribute(string propertyName, Type receiverType) { this.propertyName = propertyName; this.receiverTypeName = receiverType.AssemblyQualifiedName; } ///Initializes a new instance of the ///class. /// public ProvidePropertyAttribute(string propertyName, string receiverTypeName) { this.propertyName = propertyName; this.receiverTypeName = receiverTypeName; } ///Initializes a new instance of the ///class. /// public string PropertyName { get { return propertyName; } } ////// Gets the name of a property that this class provides. /// ////// public string ReceiverTypeName { get { return receiverTypeName; } } ////// Gets the name of the data type this property can extend /// ////// public override object TypeId { get { return GetType().FullName + propertyName; } } public override bool Equals(object obj) { if (obj == this) { return true; } ProvidePropertyAttribute other = obj as ProvidePropertyAttribute; return (other != null) && other.propertyName == propertyName && other.receiverTypeName == receiverTypeName; } public override int GetHashCode() { return propertyName.GetHashCode() ^ receiverTypeName.GetHashCode(); } } }ProvidePropertyAttribute overrides this to include the type name and the property name ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbError.cs
- PagedDataSource.cs
- UIElement3D.cs
- AttributeData.cs
- ParagraphVisual.cs
- DecimalSumAggregationOperator.cs
- TreeNodeBindingCollection.cs
- KerberosSecurityTokenProvider.cs
- ZoneButton.cs
- XPathBuilder.cs
- Int32Converter.cs
- VolatileResourceManager.cs
- ResourcePart.cs
- ContentAlignmentEditor.cs
- CodeMemberProperty.cs
- ControlBuilder.cs
- ContainerUIElement3D.cs
- NavigationEventArgs.cs
- ClientSettingsStore.cs
- UnsafeNativeMethods.cs
- EntityType.cs
- AnchoredBlock.cs
- HtmlEncodedRawTextWriter.cs
- MaskedTextBoxDesignerActionList.cs
- WebPartConnectionsCloseVerb.cs
- CommandConverter.cs
- DataStreamFromComStream.cs
- DynamicControl.cs
- PointUtil.cs
- XmlChildEnumerator.cs
- KeyFrames.cs
- MouseOverProperty.cs
- XmlDocumentFieldSchema.cs
- QilTernary.cs
- ServiceDesigner.cs
- GradientStop.cs
- DeferredSelectedIndexReference.cs
- WebPartConnectionsConnectVerb.cs
- DivideByZeroException.cs
- sqlcontext.cs
- ActivationServices.cs
- DebugViewWriter.cs
- CheckPair.cs
- XPathException.cs
- XmlAttributeProperties.cs
- HttpWebResponse.cs
- Compiler.cs
- AdjustableArrowCap.cs
- OleDragDropHandler.cs
- DataSourceCache.cs
- TraceLog.cs
- TimeoutValidationAttribute.cs
- CultureInfoConverter.cs
- DefinitionBase.cs
- DataExchangeServiceBinder.cs
- ConfigXmlSignificantWhitespace.cs
- ToolBar.cs
- ModelVisual3D.cs
- CompilerGlobalScopeAttribute.cs
- TextViewSelectionProcessor.cs
- PathBox.cs
- XmlNullResolver.cs
- DataGridViewCellValueEventArgs.cs
- UrlPropertyAttribute.cs
- EncoderBestFitFallback.cs
- streamingZipPartStream.cs
- RoleManagerModule.cs
- WindowsListViewItem.cs
- lengthconverter.cs
- SizeKeyFrameCollection.cs
- PauseStoryboard.cs
- RotateTransform3D.cs
- StateManagedCollection.cs
- DbLambda.cs
- CultureInfoConverter.cs
- PageSetupDialog.cs
- FormsAuthentication.cs
- PropertyGridEditorPart.cs
- TemplateBamlTreeBuilder.cs
- Exceptions.cs
- dsa.cs
- AttributeProviderAttribute.cs
- InputManager.cs
- CacheForPrimitiveTypes.cs
- ArrayMergeHelper.cs
- ThemeDirectoryCompiler.cs
- ResourceDictionary.cs
- CheckBoxField.cs
- TTSEngineProxy.cs
- HtmlTableCellCollection.cs
- EntityDataSourceChangingEventArgs.cs
- SaveRecipientRequest.cs
- XPathAxisIterator.cs
- PartialTrustVisibleAssemblyCollection.cs
- _IPv4Address.cs
- HtmlInputImage.cs
- BitmapEffectInput.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- PropertyValue.cs
- Security.cs