Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- AttributeAction.cs
- StrongName.cs
- SignatureHelper.cs
- EntityDataSourceColumn.cs
- DataViewSettingCollection.cs
- IndexedGlyphRun.cs
- ExecutionEngineException.cs
- RangeBase.cs
- NameValueSectionHandler.cs
- TextServicesProperty.cs
- JoinTreeSlot.cs
- RootContext.cs
- ItemCheckEvent.cs
- WebEncodingValidatorAttribute.cs
- CompilerState.cs
- UpDownBaseDesigner.cs
- AvTraceDetails.cs
- SafeArrayRankMismatchException.cs
- ObjectPersistData.cs
- SynchronousChannel.cs
- XmlDictionaryReader.cs
- MarkupObject.cs
- SpinWait.cs
- SecUtil.cs
- PartialTrustVisibleAssemblyCollection.cs
- BaseParaClient.cs
- TypeUsageBuilder.cs
- ThreadExceptionDialog.cs
- ToolStripContentPanelRenderEventArgs.cs
- OpCodes.cs
- TypeSemantics.cs
- FixUp.cs
- RewritingSimplifier.cs
- KeyboardNavigation.cs
- XPathNodeList.cs
- TemplatedControlDesigner.cs
- SamlDoNotCacheCondition.cs
- ApplicationManager.cs
- IntMinMaxAggregationOperator.cs
- NetStream.cs
- RangeBaseAutomationPeer.cs
- ComponentCache.cs
- BrowserCapabilitiesFactory.cs
- RewritingPass.cs
- DataServiceExpressionVisitor.cs
- TdsParser.cs
- VerificationAttribute.cs
- QueryMath.cs
- AddInIpcChannel.cs
- StateItem.cs
- NavigationProperty.cs
- CodeEntryPointMethod.cs
- HtmlInputRadioButton.cs
- HashMembershipCondition.cs
- FramingChannels.cs
- validationstate.cs
- TypeResolver.cs
- HttpSysSettings.cs
- RemoteWebConfigurationHost.cs
- _AcceptOverlappedAsyncResult.cs
- StreamWriter.cs
- LambdaCompiler.Lambda.cs
- TextRunTypographyProperties.cs
- DynamicValueConverter.cs
- Tokenizer.cs
- DynamicPropertyHolder.cs
- OutputScopeManager.cs
- ClientSideProviderDescription.cs
- OpenTypeCommon.cs
- SimpleWebHandlerParser.cs
- Utils.cs
- SizeAnimation.cs
- XmlSchemaSimpleTypeRestriction.cs
- COM2ComponentEditor.cs
- DataSet.cs
- SmiXetterAccessMap.cs
- UTF7Encoding.cs
- ListViewItemMouseHoverEvent.cs
- XmlSchema.cs
- CacheEntry.cs
- ObjectQueryExecutionPlan.cs
- GPStream.cs
- MappingException.cs
- UpDownEvent.cs
- InternalResources.cs
- FolderLevelBuildProvider.cs
- DesignOnlyAttribute.cs
- DataSourceControlBuilder.cs
- ReadOnlyPropertyMetadata.cs
- hresults.cs
- CommandPlan.cs
- HttpListener.cs
- AddInProcess.cs
- NavigationCommands.cs
- RefType.cs
- MetabaseReader.cs
- ToolStripSystemRenderer.cs
- BindToObject.cs
- KeyValuePairs.cs
- ConstructorExpr.cs