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
- XmlEventCache.cs
- WpfXamlMember.cs
- TableCell.cs
- RedistVersionInfo.cs
- UrlParameterWriter.cs
- AuthenticationServiceManager.cs
- SqlVersion.cs
- DesignerSelectionListAdapter.cs
- CapabilitiesUse.cs
- ExpressionParser.cs
- XmlIgnoreAttribute.cs
- SettingsContext.cs
- DataGridViewCellLinkedList.cs
- SafeProcessHandle.cs
- ConfigUtil.cs
- StyleCollection.cs
- XhtmlTextWriter.cs
- RowType.cs
- ModuleBuilder.cs
- ServiceContractViewControl.Designer.cs
- Literal.cs
- ApplicationBuildProvider.cs
- DesignerActionGlyph.cs
- WebUtil.cs
- FileLevelControlBuilderAttribute.cs
- AuthenticationServiceManager.cs
- PresentationSource.cs
- JoinGraph.cs
- PlanCompilerUtil.cs
- FormViewDeletedEventArgs.cs
- SqlGenerator.cs
- OrthographicCamera.cs
- BaseResourcesBuildProvider.cs
- ObjectTypeMapping.cs
- DebugView.cs
- SevenBitStream.cs
- JoinGraph.cs
- TemplateControlBuildProvider.cs
- GeometryModel3D.cs
- GridViewDeletedEventArgs.cs
- ErrorWebPart.cs
- EntityDataSourceSelectingEventArgs.cs
- ArraySubsetEnumerator.cs
- CodeAttributeDeclarationCollection.cs
- Missing.cs
- ComponentCommands.cs
- Matrix3D.cs
- XmlException.cs
- DbMetaDataColumnNames.cs
- WorkflowViewStateService.cs
- OleDbInfoMessageEvent.cs
- GenericEnumConverter.cs
- SchemaExporter.cs
- ScriptManagerProxy.cs
- KnownTypes.cs
- SmtpReplyReaderFactory.cs
- SystemUnicastIPAddressInformation.cs
- GenericUriParser.cs
- PartialCachingControl.cs
- StronglyTypedResourceBuilder.cs
- SqlTransaction.cs
- ListCollectionView.cs
- ObjectReferenceStack.cs
- ByteStream.cs
- CollectionBuilder.cs
- RawMouseInputReport.cs
- SqlParameterizer.cs
- PageContentAsyncResult.cs
- Table.cs
- HMAC.cs
- ListParagraph.cs
- ActivityStatusChangeEventArgs.cs
- XmlEncApr2001.cs
- SiteMapNodeCollection.cs
- TemplatedWizardStep.cs
- FormsAuthenticationEventArgs.cs
- AlignmentXValidation.cs
- DiscoveryClientElement.cs
- TemplateField.cs
- ConnectionProviderAttribute.cs
- SoapEnumAttribute.cs
- CustomCredentialPolicy.cs
- BuiltInPermissionSets.cs
- OrthographicCamera.cs
- PointCollection.cs
- CommonGetThemePartSize.cs
- RawMouseInputReport.cs
- base64Transforms.cs
- BinHexEncoder.cs
- SelectionListComponentEditor.cs
- GuidConverter.cs
- ManipulationPivot.cs
- AccessDataSourceView.cs
- SignedInfo.cs
- DesignerActionListCollection.cs
- xamlnodes.cs
- HeaderLabel.cs
- ResourcePermissionBase.cs
- HtmlElementEventArgs.cs
- DefaultTypeArgumentAttribute.cs