Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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(); } } }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
- FunctionNode.cs
- QilPatternFactory.cs
- PageThemeParser.cs
- TimelineGroup.cs
- XsltQilFactory.cs
- ZipIOModeEnforcingStream.cs
- AnimationTimeline.cs
- ObjectPersistData.cs
- TextTreeRootNode.cs
- ReferenceList.cs
- CompiledELinqQueryState.cs
- CorrelationResolver.cs
- StringReader.cs
- WindowsRegion.cs
- DetailsViewUpdateEventArgs.cs
- DesignerActionVerbItem.cs
- RegexCode.cs
- bindurihelper.cs
- PrincipalPermission.cs
- RtfToXamlReader.cs
- AsyncOperation.cs
- DataServices.cs
- ProtocolException.cs
- PointLightBase.cs
- XmlElement.cs
- WebServiceHandler.cs
- ActivitySurrogateSelector.cs
- Vector3DAnimation.cs
- MetabaseServerConfig.cs
- EmptyQuery.cs
- EdmSchemaAttribute.cs
- OptionUsage.cs
- ReachDocumentReferenceCollectionSerializer.cs
- ProxySimple.cs
- IOException.cs
- ClickablePoint.cs
- xmlsaver.cs
- QilTypeChecker.cs
- SerializerDescriptor.cs
- DecoderNLS.cs
- IOThreadScheduler.cs
- Base64Stream.cs
- Module.cs
- ConstrainedDataObject.cs
- PagePropertiesChangingEventArgs.cs
- ContainerSelectorActiveEvent.cs
- PersonalizableAttribute.cs
- Journal.cs
- BitConverter.cs
- SamlAuthorityBinding.cs
- SessionPageStatePersister.cs
- Tool.cs
- Base64Encoder.cs
- OracleParameterBinding.cs
- Semaphore.cs
- MonthChangedEventArgs.cs
- GreenMethods.cs
- SafeNativeMemoryHandle.cs
- ToolStrip.cs
- NetTcpBindingCollectionElement.cs
- DataGridViewCellCollection.cs
- Graphics.cs
- BindingManagerDataErrorEventArgs.cs
- DataRowExtensions.cs
- PrePrepareMethodAttribute.cs
- ICspAsymmetricAlgorithm.cs
- FixedSchema.cs
- ResumeStoryboard.cs
- DataSourceCacheDurationConverter.cs
- ContextQuery.cs
- DataControlCommands.cs
- StyleSheetComponentEditor.cs
- TraceUtils.cs
- Light.cs
- DataServiceQuery.cs
- BevelBitmapEffect.cs
- Grant.cs
- TreeNodeClickEventArgs.cs
- ActivationArguments.cs
- ToolStripGripRenderEventArgs.cs
- _ListenerRequestStream.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- EntityCommand.cs
- ConvertersCollection.cs
- ClientTargetCollection.cs
- smtpconnection.cs
- SortKey.cs
- TextCharacters.cs
- SerializationEventsCache.cs
- ApplicationHost.cs
- ColumnCollection.cs
- LicenseProviderAttribute.cs
- HtmlImage.cs
- Vector3DAnimation.cs
- InputManager.cs
- WebPartDescriptionCollection.cs
- KnownTypesProvider.cs
- ToolStripSettings.cs
- EntityAdapter.cs
- TextDpi.cs