Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ExtenderProvidedPropertyAttribute.cs / 1305376 / ExtenderProvidedPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// /// [AttributeUsage(AttributeTargets.All)] public sealed class ExtenderProvidedPropertyAttribute : Attribute { private PropertyDescriptor extenderProperty; private IExtenderProvider provider; private Type receiverType; ////// ExtenderProvidedPropertyAttribute is an attribute that marks that a property /// was actually offered up by and extender provider. /// ////// Creates a new ExtenderProvidedPropertyAttribute. /// internal static ExtenderProvidedPropertyAttribute Create(PropertyDescriptor extenderProperty, Type receiverType, IExtenderProvider provider) { ExtenderProvidedPropertyAttribute e = new ExtenderProvidedPropertyAttribute(); e.extenderProperty = extenderProperty; e.receiverType = receiverType; e.provider = provider; return e; } ////// Creates an empty ExtenderProvidedPropertyAttribute. /// public ExtenderProvidedPropertyAttribute() { } ////// PropertyDescriptor of the property that is being provided. /// public PropertyDescriptor ExtenderProperty { get { return extenderProperty; } } ////// Extender provider that is providing the property. /// public IExtenderProvider Provider { get { return provider; } } ////// The type of object that can receive these properties. /// public Type ReceiverType { get { return receiverType; } } public override bool Equals(object obj) { if (obj == this) { return true; } ExtenderProvidedPropertyAttribute other = obj as ExtenderProvidedPropertyAttribute; return (other != null) && other.extenderProperty.Equals(extenderProperty) && other.provider.Equals(provider) && other.receiverType.Equals(receiverType); } public override int GetHashCode() { return base.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return receiverType == null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// /// [AttributeUsage(AttributeTargets.All)] public sealed class ExtenderProvidedPropertyAttribute : Attribute { private PropertyDescriptor extenderProperty; private IExtenderProvider provider; private Type receiverType; ////// ExtenderProvidedPropertyAttribute is an attribute that marks that a property /// was actually offered up by and extender provider. /// ////// Creates a new ExtenderProvidedPropertyAttribute. /// internal static ExtenderProvidedPropertyAttribute Create(PropertyDescriptor extenderProperty, Type receiverType, IExtenderProvider provider) { ExtenderProvidedPropertyAttribute e = new ExtenderProvidedPropertyAttribute(); e.extenderProperty = extenderProperty; e.receiverType = receiverType; e.provider = provider; return e; } ////// Creates an empty ExtenderProvidedPropertyAttribute. /// public ExtenderProvidedPropertyAttribute() { } ////// PropertyDescriptor of the property that is being provided. /// public PropertyDescriptor ExtenderProperty { get { return extenderProperty; } } ////// Extender provider that is providing the property. /// public IExtenderProvider Provider { get { return provider; } } ////// The type of object that can receive these properties. /// public Type ReceiverType { get { return receiverType; } } public override bool Equals(object obj) { if (obj == this) { return true; } ExtenderProvidedPropertyAttribute other = obj as ExtenderProvidedPropertyAttribute; return (other != null) && other.extenderProperty.Equals(extenderProperty) && other.provider.Equals(provider) && other.receiverType.Equals(receiverType); } public override int GetHashCode() { return base.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return receiverType == null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationAttributes.cs
- CollectionViewSource.cs
- ReadOnlyMetadataCollection.cs
- KernelTypeValidation.cs
- ColorConvertedBitmap.cs
- OleDbError.cs
- shaperfactoryquerycachekey.cs
- EntityContainerEntitySet.cs
- XmlDocumentSerializer.cs
- TypeRefElement.cs
- DragEvent.cs
- ScrollBar.cs
- HttpListener.cs
- StreamingContext.cs
- Emitter.cs
- VarRemapper.cs
- PropagationProtocolsTracing.cs
- ContentPlaceHolderDesigner.cs
- CLSCompliantAttribute.cs
- ObfuscationAttribute.cs
- CharacterHit.cs
- RemoteCryptoDecryptRequest.cs
- SelectionPattern.cs
- ConsoleCancelEventArgs.cs
- CodeObjectCreateExpression.cs
- safemediahandle.cs
- NumberFunctions.cs
- ClrProviderManifest.cs
- Size.cs
- XmlValidatingReaderImpl.cs
- ContainerSelectorActiveEvent.cs
- RegularExpressionValidator.cs
- TextEditorTables.cs
- WorkflowInstanceSuspendedRecord.cs
- PreDigestedSignedInfo.cs
- ProfileParameter.cs
- ExtendedProtectionPolicyElement.cs
- DataDocumentXPathNavigator.cs
- TextDocumentView.cs
- PackagePartCollection.cs
- SimpleWebHandlerParser.cs
- DoubleAnimationUsingKeyFrames.cs
- ClientReliableChannelBinder.cs
- DataSourceXmlSubItemAttribute.cs
- RoleManagerEventArgs.cs
- XslVisitor.cs
- TcpHostedTransportConfiguration.cs
- StringDictionaryWithComparer.cs
- DeflateStreamAsyncResult.cs
- CollectionConverter.cs
- ExpressionBindingCollection.cs
- WSFederationHttpSecurityElement.cs
- SqlConnectionStringBuilder.cs
- OutputCacheProfileCollection.cs
- OrderByBuilder.cs
- Win32Native.cs
- EventLogHandle.cs
- EditorPart.cs
- QilTargetType.cs
- ControlAdapter.cs
- XmlWhitespace.cs
- SQLBinaryStorage.cs
- CompilationLock.cs
- WindowsStatusBar.cs
- DataGridViewCheckBoxColumn.cs
- InputDevice.cs
- RepeaterItemEventArgs.cs
- SHA256Cng.cs
- ActiveXSite.cs
- SecureStringHasher.cs
- StorageInfo.cs
- DefaultValueAttribute.cs
- DataGridViewCellStyleEditor.cs
- AttachedAnnotation.cs
- TreeNodeBinding.cs
- ContentControl.cs
- FormViewRow.cs
- IHttpResponseInternal.cs
- TextSegment.cs
- NumberFunctions.cs
- mongolianshape.cs
- Point3DAnimation.cs
- JapaneseLunisolarCalendar.cs
- ConsumerConnectionPoint.cs
- XMLUtil.cs
- WmfPlaceableFileHeader.cs
- XamlTreeBuilderBamlRecordWriter.cs
- StringInfo.cs
- HtmlSelectionListAdapter.cs
- PostBackOptions.cs
- RuntimeIdentifierPropertyAttribute.cs
- UnaryNode.cs
- AnimationClock.cs
- FigureParaClient.cs
- TextProperties.cs
- EntityDataSourceStatementEditorForm.cs
- Screen.cs
- ValueQuery.cs
- LinkDesigner.cs
- TableItemPatternIdentifiers.cs