Code:
/ DotNET / DotNET / 8.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
- IsolatedStoragePermission.cs
- Splitter.cs
- CollectionType.cs
- XmlAtomicValue.cs
- FormsAuthenticationEventArgs.cs
- InkSerializer.cs
- SymmetricCryptoHandle.cs
- StructuredCompositeActivityDesigner.cs
- AtomicFile.cs
- TextDocumentView.cs
- ButtonFlatAdapter.cs
- InstanceDataCollectionCollection.cs
- TimeSpanOrInfiniteConverter.cs
- SqlMethodAttribute.cs
- FlowDocumentPageViewerAutomationPeer.cs
- DummyDataSource.cs
- UnmanagedMemoryStream.cs
- PersonalizationAdministration.cs
- BitmapScalingModeValidation.cs
- CodeComment.cs
- PerformanceCounterPermissionEntry.cs
- XPathAncestorIterator.cs
- LOSFormatter.cs
- DataSourceView.cs
- CqlParserHelpers.cs
- WindowInteropHelper.cs
- TrackBarRenderer.cs
- Crc32Helper.cs
- NumericExpr.cs
- WindowsFormsHostPropertyMap.cs
- JsonClassDataContract.cs
- Merger.cs
- _Connection.cs
- ClipboardProcessor.cs
- HttpChannelBindingToken.cs
- GenerateScriptTypeAttribute.cs
- PersistenceProviderDirectory.cs
- Environment.cs
- PreviewPageInfo.cs
- SendMailErrorEventArgs.cs
- CompositeFontParser.cs
- BaseCAMarshaler.cs
- Converter.cs
- ImplicitInputBrush.cs
- AttachedPropertyMethodSelector.cs
- XmlSchemaType.cs
- ListDictionary.cs
- PatternMatcher.cs
- Memoizer.cs
- TextServicesCompartment.cs
- BaseCollection.cs
- SqlCacheDependencySection.cs
- PassportAuthenticationEventArgs.cs
- ExecutionEngineException.cs
- PolyLineSegment.cs
- DesignerUtility.cs
- ExpressionBuilderContext.cs
- Exceptions.cs
- LogicalExpr.cs
- BaseCodePageEncoding.cs
- initElementDictionary.cs
- QilLoop.cs
- GenericEnumerator.cs
- _SslStream.cs
- GeneratedContractType.cs
- WebPartZone.cs
- InkCanvasFeedbackAdorner.cs
- BaseTemplateBuildProvider.cs
- Configuration.cs
- PropertyGeneratedEventArgs.cs
- ColorComboBox.cs
- DeviceContext.cs
- SafeNativeMethods.cs
- FrameworkReadOnlyPropertyMetadata.cs
- OleDbReferenceCollection.cs
- StateWorkerRequest.cs
- AnonymousIdentificationSection.cs
- PtsContext.cs
- FileClassifier.cs
- XmlWriterTraceListener.cs
- EmptyEnumerator.cs
- BitArray.cs
- WindowsClientCredential.cs
- DynamicMetaObject.cs
- VariableQuery.cs
- SerializationUtility.cs
- TypeRefElement.cs
- DeferredTextReference.cs
- DataGridViewSortCompareEventArgs.cs
- RsaKeyIdentifierClause.cs
- SystemFonts.cs
- WhitespaceRuleLookup.cs
- DBCSCodePageEncoding.cs
- EncryptRequest.cs
- SqlSelectClauseBuilder.cs
- WSSecurityPolicy.cs
- TypeSystem.cs
- ZipPackage.cs
- SoapInteropTypes.cs
- XamlDesignerSerializationManager.cs