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
- LambdaExpression.cs
- PerformanceCounterPermissionEntry.cs
- AtlasWeb.Designer.cs
- SamlDelegatingWriter.cs
- Base64Stream.cs
- CompilationSection.cs
- DescendantQuery.cs
- BufferedWebEventProvider.cs
- CreateUserWizard.cs
- NavigationHelper.cs
- XmlSchemaChoice.cs
- BoolLiteral.cs
- Aggregates.cs
- SmiEventSink.cs
- XmlCollation.cs
- RegexMatchCollection.cs
- UniqueID.cs
- ChangeTracker.cs
- InProcStateClientManager.cs
- OraclePermissionAttribute.cs
- SessionState.cs
- ApplicationGesture.cs
- filewebrequest.cs
- PersonalizationProviderCollection.cs
- FrameworkReadOnlyPropertyMetadata.cs
- RayHitTestParameters.cs
- GridEntryCollection.cs
- StringUtil.cs
- NameValueSectionHandler.cs
- NetCodeGroup.cs
- EqualityComparer.cs
- SocketAddress.cs
- ConnectionStringsExpressionBuilder.cs
- EpmSyndicationContentSerializer.cs
- ExceptionValidationRule.cs
- CalendarModeChangedEventArgs.cs
- URLMembershipCondition.cs
- TemplatePagerField.cs
- CodeGotoStatement.cs
- OptimalTextSource.cs
- CancellationTokenSource.cs
- DropShadowEffect.cs
- ExtendedPropertyInfo.cs
- SudsCommon.cs
- ChannelListenerBase.cs
- FixUpCollection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- TextComposition.cs
- ProcessHostMapPath.cs
- XPathSelectionIterator.cs
- TempFiles.cs
- WebSysDisplayNameAttribute.cs
- DBNull.cs
- LambdaCompiler.Statements.cs
- ImmComposition.cs
- CopyNodeSetAction.cs
- DetailsView.cs
- CalendarDateRangeChangingEventArgs.cs
- StreamWriter.cs
- MulticastDelegate.cs
- BufferedStream.cs
- NumericExpr.cs
- BackStopAuthenticationModule.cs
- OrderedDictionary.cs
- Matrix.cs
- ListViewTableCell.cs
- MetadataImporterQuotas.cs
- KerberosSecurityTokenProvider.cs
- DateTimeValueSerializerContext.cs
- ComponentChangedEvent.cs
- StringFreezingAttribute.cs
- PropertySourceInfo.cs
- SystemException.cs
- TextViewSelectionProcessor.cs
- Misc.cs
- HtmlInputPassword.cs
- DesignerGenericWebPart.cs
- DateTimeValueSerializerContext.cs
- CodeSubDirectory.cs
- KnownAssemblyEntry.cs
- DataReaderContainer.cs
- PrinterSettings.cs
- ApplicationException.cs
- GlyphElement.cs
- FloaterParagraph.cs
- ListDictionaryInternal.cs
- NoPersistHandle.cs
- ManipulationInertiaStartingEventArgs.cs
- XmlResolver.cs
- ToolStripContentPanel.cs
- RoutingSection.cs
- ButtonChrome.cs
- GroupBox.cs
- TemplateXamlParser.cs
- WebPartManager.cs
- TrustManager.cs
- BreakRecordTable.cs
- TransformGroup.cs
- UserControlAutomationPeer.cs
- FrameworkName.cs