Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //ProvidePropertyAttribute overrides this to include the type name and the property name ///// 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.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
- FileLoadException.cs
- DocumentSchemaValidator.cs
- AnimatedTypeHelpers.cs
- SponsorHelper.cs
- SessionStateContainer.cs
- GenericUriParser.cs
- LinqDataSourceContextEventArgs.cs
- AssemblyInfo.cs
- TrustLevel.cs
- InvalidateEvent.cs
- ElapsedEventArgs.cs
- MimeBasePart.cs
- LinearKeyFrames.cs
- StringKeyFrameCollection.cs
- _BufferOffsetSize.cs
- DeferredSelectedIndexReference.cs
- SchemaImporterExtensionElement.cs
- SystemIPv4InterfaceProperties.cs
- LoadedOrUnloadedOperation.cs
- XmlWriterSettings.cs
- LongValidator.cs
- FilteredXmlReader.cs
- SmiContextFactory.cs
- BmpBitmapDecoder.cs
- LogPolicy.cs
- _AuthenticationState.cs
- XmlSiteMapProvider.cs
- DataPager.cs
- XmlnsDictionary.cs
- DesignerEditorPartChrome.cs
- MenuItemBindingCollection.cs
- DataGridViewCheckBoxColumn.cs
- Form.cs
- ICollection.cs
- FigureParaClient.cs
- AttachedPropertyBrowsableAttribute.cs
- ServiceManagerHandle.cs
- ProfileGroupSettings.cs
- LabelLiteral.cs
- AttachedAnnotation.cs
- TransformPatternIdentifiers.cs
- SnapshotChangeTrackingStrategy.cs
- TrackingProfileDeserializationException.cs
- SvcMapFile.cs
- XmlUtilWriter.cs
- TextLineResult.cs
- DataObjectMethodAttribute.cs
- PageContentAsyncResult.cs
- XmlIgnoreAttribute.cs
- IssuedSecurityTokenParameters.cs
- QueryInterceptorAttribute.cs
- ArraySortHelper.cs
- XamlRtfConverter.cs
- _BasicClient.cs
- TextEditorSelection.cs
- XmlConverter.cs
- MediaContext.cs
- HttpApplication.cs
- DocumentSignatureManager.cs
- LinearGradientBrush.cs
- Rotation3D.cs
- TimeZone.cs
- SQLMembershipProvider.cs
- CompressedStack.cs
- XPathSingletonIterator.cs
- BitmapEffectInput.cs
- HtmlGenericControl.cs
- TextBoxView.cs
- ManipulationCompletedEventArgs.cs
- CapabilitiesUse.cs
- ExpandedWrapper.cs
- ListControl.cs
- CodeDelegateInvokeExpression.cs
- StringBlob.cs
- PrintPreviewGraphics.cs
- ChangeBlockUndoRecord.cs
- WebPartCatalogAddVerb.cs
- EUCJPEncoding.cs
- MultipartIdentifier.cs
- SoapElementAttribute.cs
- ImageMetadata.cs
- WinEventTracker.cs
- CommandPlan.cs
- GuidTagList.cs
- SoapTypeAttribute.cs
- CodeCompileUnit.cs
- LoginView.cs
- ServiceDescriptionReflector.cs
- ExpressionBuilderCollection.cs
- FactoryMaker.cs
- MobileComponentEditorPage.cs
- XmlConverter.cs
- StubHelpers.cs
- DocumentsTrace.cs
- PropertyGridCommands.cs
- ManagementException.cs
- HostingEnvironmentException.cs
- XmlNodeChangedEventManager.cs
- SecurityContext.cs
- SQLDateTimeStorage.cs