Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ProvidePropertyAttribute.cs / 1305376 / 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 ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BamlRecordHelper.cs
- EntityContainerRelationshipSetEnd.cs
- ExtendedPropertyDescriptor.cs
- SafeMILHandleMemoryPressure.cs
- QilDataSource.cs
- MailWriter.cs
- IgnoreFileBuildProvider.cs
- ObjectFullSpanRewriter.cs
- ObfuscateAssemblyAttribute.cs
- GridViewEditEventArgs.cs
- BamlWriter.cs
- MergeFilterQuery.cs
- XslAst.cs
- ConfigurationPermission.cs
- VirtualPathUtility.cs
- GridViewUpdatedEventArgs.cs
- COM2ICategorizePropertiesHandler.cs
- TextRunProperties.cs
- controlskin.cs
- RefreshPropertiesAttribute.cs
- NamedPipeAppDomainProtocolHandler.cs
- BuildDependencySet.cs
- AtomMaterializer.cs
- SelectionProcessor.cs
- RightsManagementEncryptedStream.cs
- ParallelSeparator.xaml.cs
- CategoryNameCollection.cs
- MatcherBuilder.cs
- IconBitmapDecoder.cs
- ObjectViewEntityCollectionData.cs
- PngBitmapEncoder.cs
- CalloutQueueItem.cs
- UnmanagedBitmapWrapper.cs
- TextTrailingWordEllipsis.cs
- FunctionMappingTranslator.cs
- FileDialog_Vista.cs
- LocalBuilder.cs
- XPathPatternBuilder.cs
- TraceSection.cs
- BulletedList.cs
- InitializingNewItemEventArgs.cs
- TextParagraphView.cs
- NavigatorInvalidBodyAccessException.cs
- HttpRuntime.cs
- AxDesigner.cs
- SqlServer2KCompatibilityAnnotation.cs
- TableCell.cs
- SchemaNotation.cs
- BlurBitmapEffect.cs
- TextTreeInsertUndoUnit.cs
- FactoryGenerator.cs
- VariableQuery.cs
- AccessDataSource.cs
- SamlConditions.cs
- TypeListConverter.cs
- WebEventTraceProvider.cs
- HtmlContainerControl.cs
- Geometry3D.cs
- TimeEnumHelper.cs
- IgnorePropertiesAttribute.cs
- ListViewDeletedEventArgs.cs
- _AutoWebProxyScriptEngine.cs
- StatusBar.cs
- CodeMethodMap.cs
- WebPartZoneCollection.cs
- ToolTipAutomationPeer.cs
- invalidudtexception.cs
- SecureStringHasher.cs
- AnimatedTypeHelpers.cs
- AudioStateChangedEventArgs.cs
- BuildProviderAppliesToAttribute.cs
- keycontainerpermission.cs
- EventRouteFactory.cs
- TemplateBindingExpression.cs
- DATA_BLOB.cs
- XmlUtf8RawTextWriter.cs
- WindowsPen.cs
- SupportsEventValidationAttribute.cs
- Converter.cs
- CloseCryptoHandleRequest.cs
- MessageLogTraceRecord.cs
- XmlAnyElementAttribute.cs
- LicenseManager.cs
- XmlDataContract.cs
- ITreeGenerator.cs
- ClientTarget.cs
- FieldToken.cs
- SiblingIterators.cs
- InputBinding.cs
- MetadataArtifactLoaderResource.cs
- Models.cs
- OperationContractAttribute.cs
- WebOperationContext.cs
- BmpBitmapDecoder.cs
- BitmapMetadataEnumerator.cs
- FontWeight.cs
- HostProtectionException.cs
- CompilationSection.cs
- HtmlObjectListAdapter.cs
- WebPartZoneBaseDesigner.cs