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 / 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
- Main.cs
- CodeGeneratorAttribute.cs
- TextChange.cs
- SafeArchiveContext.cs
- figurelengthconverter.cs
- Baml6ConstructorInfo.cs
- NullableDoubleMinMaxAggregationOperator.cs
- HttpContextServiceHost.cs
- DocumentEventArgs.cs
- DataServiceRequest.cs
- CallTemplateAction.cs
- PackageDigitalSignature.cs
- TablePattern.cs
- ResourceExpression.cs
- TerminateWorkflow.cs
- StagingAreaInputItem.cs
- EntityProxyFactory.cs
- ObjectNotFoundException.cs
- MenuCommands.cs
- MobileControlDesigner.cs
- WebPartCatalogAddVerb.cs
- Action.cs
- ScopeElement.cs
- AssemblyAssociatedContentFileAttribute.cs
- XsdValidatingReader.cs
- FrameworkPropertyMetadata.cs
- Int32CollectionValueSerializer.cs
- FileDialogCustomPlacesCollection.cs
- ArithmeticException.cs
- SequentialWorkflowRootDesigner.cs
- DataGrid.cs
- SingleObjectCollection.cs
- WebPartDisplayModeCancelEventArgs.cs
- LineBreakRecord.cs
- KeyValueInternalCollection.cs
- StaticExtension.cs
- MulticastIPAddressInformationCollection.cs
- ImageAttributes.cs
- FixedSOMPage.cs
- SafeSecurityHelper.cs
- PolyLineSegmentFigureLogic.cs
- RegexMatchCollection.cs
- DataControlFieldCell.cs
- TreeBuilderXamlTranslator.cs
- TypeToken.cs
- ListViewItem.cs
- Double.cs
- PointAnimationUsingKeyFrames.cs
- TextProperties.cs
- ControlTemplate.cs
- DESCryptoServiceProvider.cs
- BamlLocalizabilityResolver.cs
- ReachFixedDocumentSerializerAsync.cs
- TraceListener.cs
- Expander.cs
- FilterableData.cs
- DataKeyCollection.cs
- FileRecordSequenceCompletedAsyncResult.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- DeferrableContentConverter.cs
- SchemaHelper.cs
- PropertyMetadata.cs
- HandledMouseEvent.cs
- ClockController.cs
- RowVisual.cs
- ObjectListFieldCollection.cs
- CompositeCollection.cs
- UnionCqlBlock.cs
- ProfilePropertySettings.cs
- Token.cs
- EarlyBoundInfo.cs
- WorkflowInstanceRecord.cs
- SQLGuid.cs
- TextEditorCharacters.cs
- SafeFindHandle.cs
- VersionUtil.cs
- InnerItemCollectionView.cs
- CookielessData.cs
- XmlDeclaration.cs
- CreateCardRequest.cs
- PerformanceCounterPermissionAttribute.cs
- SyndicationLink.cs
- DesignerActionList.cs
- QilGenerator.cs
- GeometryDrawing.cs
- CorrelationResolver.cs
- Baml6ConstructorInfo.cs
- DebugController.cs
- BitmapData.cs
- XmlQueryStaticData.cs
- StylusPlugInCollection.cs
- DbConvert.cs
- XPathNode.cs
- AxHost.cs
- PolyLineSegmentFigureLogic.cs
- DataServiceConfiguration.cs
- ToolboxItemCollection.cs
- OleDbDataAdapter.cs
- SchemaImporter.cs
- BufferModeSettings.cs