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
- OracleCommand.cs
- SqlBulkCopyColumnMappingCollection.cs
- PerfService.cs
- RsaKeyIdentifierClause.cs
- DataSourceControlBuilder.cs
- Icon.cs
- ParagraphVisual.cs
- ObjectItemAttributeAssemblyLoader.cs
- SequenceNumber.cs
- CompilationUnit.cs
- AspProxy.cs
- BackStopAuthenticationModule.cs
- EndpointDiscoveryElement.cs
- SolidBrush.cs
- UnwrappedTypesXmlSerializerManager.cs
- SystemIPInterfaceProperties.cs
- FormsAuthenticationTicket.cs
- BitmapFrameEncode.cs
- IPipelineRuntime.cs
- WinEventHandler.cs
- XmlAttributeOverrides.cs
- HttpWriter.cs
- LongValidator.cs
- AccessViolationException.cs
- WebPartsPersonalizationAuthorization.cs
- SQLInt16Storage.cs
- Line.cs
- AsyncOperationManager.cs
- DispatcherOperation.cs
- BuildProvider.cs
- WebEvents.cs
- MultipartIdentifier.cs
- XMLSchema.cs
- ClosableStream.cs
- TreeWalkHelper.cs
- SecurityChannelListener.cs
- WorkflowEventArgs.cs
- TextParagraphView.cs
- SourceElementsCollection.cs
- Int64Animation.cs
- FormViewPageEventArgs.cs
- HtmlForm.cs
- PersonalizationStateInfo.cs
- DesignerCatalogPartChrome.cs
- XomlSerializationHelpers.cs
- Base64Encoder.cs
- AdapterUtil.cs
- PersonalizationEntry.cs
- PathData.cs
- BufferedGraphicsManager.cs
- Bezier.cs
- DbReferenceCollection.cs
- ControlTemplate.cs
- WebRequestModuleElement.cs
- DispatcherProcessingDisabled.cs
- HuffCodec.cs
- MsmqHostedTransportConfiguration.cs
- ServiceOperation.cs
- AjaxFrameworkAssemblyAttribute.cs
- TypeDelegator.cs
- SynchronizationContext.cs
- DllNotFoundException.cs
- ProcessHostFactoryHelper.cs
- FormatterConverter.cs
- XmlReflectionImporter.cs
- ProfileSettings.cs
- EditableRegion.cs
- Image.cs
- MexNamedPipeBindingElement.cs
- DataGridCheckBoxColumn.cs
- UniformGrid.cs
- SByteConverter.cs
- AttachedPropertyMethodSelector.cs
- BufferedStream2.cs
- MostlySingletonList.cs
- VirtualizedCellInfoCollection.cs
- DeferrableContent.cs
- PointAnimationUsingKeyFrames.cs
- MetadataPropertyAttribute.cs
- XmlMapping.cs
- TextEditorMouse.cs
- JapaneseLunisolarCalendar.cs
- MoveSizeWinEventHandler.cs
- TimeSpanValidator.cs
- XsdValidatingReader.cs
- CompleteWizardStep.cs
- OdbcTransaction.cs
- MouseGestureConverter.cs
- SchemaNotation.cs
- WsatConfiguration.cs
- InfoCardBaseException.cs
- HitTestParameters3D.cs
- PackWebRequestFactory.cs
- ComPlusServiceLoader.cs
- XhtmlBasicPageAdapter.cs
- UriWriter.cs
- ByteAnimationUsingKeyFrames.cs
- MethodBuilderInstantiation.cs
- DefaultShape.cs
- InternalPolicyElement.cs