Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / MergablePropertyAttribute.cs / 1 / MergablePropertyAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies that
/// this property can be combined with properties belonging to
/// other objects in a properties window.
///
[AttributeUsage(AttributeTargets.All)]
public sealed class MergablePropertyAttribute : Attribute {
///
///
/// Specifies that a property can be combined with properties belonging to other
/// objects in a properties window. This field is read-only.
///
///
public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true);
///
///
/// Specifies that a property cannot be combined with properties belonging to
/// other objects in a properties window. This field is
/// read-only.
///
///
public static readonly MergablePropertyAttribute No = new MergablePropertyAttribute(false);
///
///
/// Specifies the default value, which is , that is a property can be combined with
/// properties belonging to other objects in a properties window. This field is read-only.
///
///
public static readonly MergablePropertyAttribute Default = Yes;
private bool allowMerge;
///
///
/// Initializes a new instance of the
/// class.
///
///
public MergablePropertyAttribute(bool allowMerge) {
this.allowMerge = allowMerge;
}
///
///
/// Gets a value indicating whether this
/// property can be combined with properties belonging to other objects in a
/// properties window.
///
///
public bool AllowMerge {
get {
return allowMerge;
}
}
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
MergablePropertyAttribute other = obj as MergablePropertyAttribute;
return other != null && other.AllowMerge == this.allowMerge;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
///
public override bool IsDefaultAttribute() {
return (this.Equals(Default));
}
}
}
// 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.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies that
/// this property can be combined with properties belonging to
/// other objects in a properties window.
///
[AttributeUsage(AttributeTargets.All)]
public sealed class MergablePropertyAttribute : Attribute {
///
///
/// Specifies that a property can be combined with properties belonging to other
/// objects in a properties window. This field is read-only.
///
///
public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true);
///
///
/// Specifies that a property cannot be combined with properties belonging to
/// other objects in a properties window. This field is
/// read-only.
///
///
public static readonly MergablePropertyAttribute No = new MergablePropertyAttribute(false);
///
///
/// Specifies the default value, which is , that is a property can be combined with
/// properties belonging to other objects in a properties window. This field is read-only.
///
///
public static readonly MergablePropertyAttribute Default = Yes;
private bool allowMerge;
///
///
/// Initializes a new instance of the
/// class.
///
///
public MergablePropertyAttribute(bool allowMerge) {
this.allowMerge = allowMerge;
}
///
///
/// Gets a value indicating whether this
/// property can be combined with properties belonging to other objects in a
/// properties window.
///
///
public bool AllowMerge {
get {
return allowMerge;
}
}
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
MergablePropertyAttribute other = obj as MergablePropertyAttribute;
return other != null && other.AllowMerge == this.allowMerge;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
///
public override bool IsDefaultAttribute() {
return (this.Equals(Default));
}
}
}
// 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
- Part.cs
- PngBitmapDecoder.cs
- BitmapEffectOutputConnector.cs
- SecurityPolicySection.cs
- TextViewBase.cs
- SqlException.cs
- UnionCqlBlock.cs
- ContainerSelectorActiveEvent.cs
- LogWriteRestartAreaAsyncResult.cs
- SignatureGenerator.cs
- MethodToken.cs
- PropertyEmitter.cs
- QuaternionAnimation.cs
- XPathMultyIterator.cs
- SqlDeflator.cs
- SettingsPropertyIsReadOnlyException.cs
- RoutedEventValueSerializer.cs
- ProtocolsConfiguration.cs
- RelationshipNavigation.cs
- ResourceSet.cs
- X509UI.cs
- RegexCode.cs
- TogglePatternIdentifiers.cs
- AnimationStorage.cs
- HttpChannelBindingToken.cs
- EncryptedPackage.cs
- unsafeIndexingFilterStream.cs
- UndirectedGraph.cs
- BCLDebug.cs
- FillErrorEventArgs.cs
- X509CertificateCollection.cs
- SignatureHelper.cs
- ListViewUpdateEventArgs.cs
- OdbcCommand.cs
- CqlWriter.cs
- GlyphShapingProperties.cs
- RSAProtectedConfigurationProvider.cs
- BaseTemplateBuildProvider.cs
- TrustLevel.cs
- AttachedPropertyBrowsableAttribute.cs
- FontWeights.cs
- ValidationSummary.cs
- FormsAuthenticationTicket.cs
- BitmapCodecInfoInternal.cs
- MetadataItem.cs
- ReliableSessionBindingElementImporter.cs
- ProcessHost.cs
- SemaphoreFullException.cs
- OleDbFactory.cs
- PropertyIDSet.cs
- RadioButtonList.cs
- SQLGuidStorage.cs
- SourceFileBuildProvider.cs
- ClientScriptItem.cs
- DiffuseMaterial.cs
- ComAdminInterfaces.cs
- WebBodyFormatMessageProperty.cs
- UnhandledExceptionEventArgs.cs
- TimeoutConverter.cs
- CallbackDebugBehavior.cs
- DocumentPaginator.cs
- TreeViewImageGenerator.cs
- IteratorFilter.cs
- Mapping.cs
- PieceDirectory.cs
- WebPageTraceListener.cs
- securitycriticaldataClass.cs
- CodeCompiler.cs
- mediaclock.cs
- SafeCryptContextHandle.cs
- Ray3DHitTestResult.cs
- SecurityPermission.cs
- ExtractedStateEntry.cs
- IIS7WorkerRequest.cs
- _SslSessionsCache.cs
- UserPreferenceChangedEventArgs.cs
- XmlSchemaImport.cs
- TextTreeFixupNode.cs
- TableProviderWrapper.cs
- XmlAttributeOverrides.cs
- ExpressionBindingCollection.cs
- CriticalHandle.cs
- EventManager.cs
- EpmCustomContentSerializer.cs
- Configuration.cs
- BasicKeyConstraint.cs
- ErrorFormatter.cs
- MessageDecoder.cs
- SqlFacetAttribute.cs
- RenameRuleObjectDialog.cs
- DataSourceExpressionCollection.cs
- TypeUtils.cs
- FormViewPagerRow.cs
- webclient.cs
- __ConsoleStream.cs
- CommonXSendMessage.cs
- RootAction.cs
- Pen.cs
- DetailsViewInsertEventArgs.cs
- EdmProviderManifest.cs