Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / MergablePropertyAttribute.cs / 1305376 / MergablePropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class MergablePropertyAttribute : Attribute { ///Specifies that /// this property can be combined with properties belonging to /// other objects in a properties window. ////// public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true); ////// 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 No = new MergablePropertyAttribute(false); ////// 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 Default = Yes; private bool allowMerge; ////// 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 MergablePropertyAttribute(bool allowMerge) { this.allowMerge = allowMerge; } ////// Initializes a new instance of the ////// class. /// /// public bool AllowMerge { get { return allowMerge; } } ////// Gets a value indicating whether this /// property can be combined with properties belonging to other objects in a /// properties window. /// ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } MergablePropertyAttribute other = obj as MergablePropertyAttribute; return other != null && other.AllowMerge == this.allowMerge; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// ///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; ////// [AttributeUsage(AttributeTargets.All)] public sealed class MergablePropertyAttribute : Attribute { ///Specifies that /// this property can be combined with properties belonging to /// other objects in a properties window. ////// public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true); ////// 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 No = new MergablePropertyAttribute(false); ////// 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 Default = Yes; private bool allowMerge; ////// 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 MergablePropertyAttribute(bool allowMerge) { this.allowMerge = allowMerge; } ////// Initializes a new instance of the ////// class. /// /// public bool AllowMerge { get { return allowMerge; } } ////// Gets a value indicating whether this /// property can be combined with properties belonging to other objects in a /// properties window. /// ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } MergablePropertyAttribute other = obj as MergablePropertyAttribute; return other != null && other.AllowMerge == this.allowMerge; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// ///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
- FilteredDataSetHelper.cs
- DataBindEngine.cs
- CheckPair.cs
- ArraySegment.cs
- XmlSerializerNamespaces.cs
- MetadataPropertyAttribute.cs
- MediaSystem.cs
- DispatcherSynchronizationContext.cs
- RoutedEventArgs.cs
- ErrorInfoXmlDocument.cs
- XmlQueryContext.cs
- EndpointAddressAugust2004.cs
- HtmlControlPersistable.cs
- ProfileEventArgs.cs
- CookieProtection.cs
- NeutralResourcesLanguageAttribute.cs
- DbgCompiler.cs
- StaticSiteMapProvider.cs
- ResourceAttributes.cs
- XPathDocumentNavigator.cs
- RemotingHelper.cs
- BaseProcessor.cs
- RequestCacheManager.cs
- HealthMonitoringSection.cs
- DescendentsWalkerBase.cs
- CreateUserWizardStep.cs
- NetDataContractSerializer.cs
- EntitySetBaseCollection.cs
- ClosableStream.cs
- QilVisitor.cs
- PopupRootAutomationPeer.cs
- ItemCheckEvent.cs
- sqlser.cs
- LineMetrics.cs
- WebPart.cs
- FixedTextSelectionProcessor.cs
- PackWebRequestFactory.cs
- GenericUriParser.cs
- SchemaImporterExtension.cs
- AutomationPattern.cs
- SqlProfileProvider.cs
- SchemaTableOptionalColumn.cs
- SqlTypeSystemProvider.cs
- WebPartsPersonalization.cs
- SizeFConverter.cs
- SynchronizedDispatch.cs
- HttpListenerPrefixCollection.cs
- BeginCreateSecurityTokenRequest.cs
- RequestCachingSection.cs
- Number.cs
- UnitySerializationHolder.cs
- IsolatedStorageFileStream.cs
- SmiGettersStream.cs
- CharUnicodeInfo.cs
- SafePEFileHandle.cs
- ErrorHandlerFaultInfo.cs
- DisplayInformation.cs
- Executor.cs
- HtmlTableRow.cs
- EventWaitHandle.cs
- ObjectDataSourceView.cs
- DoubleAnimationBase.cs
- FixedSOMImage.cs
- SkewTransform.cs
- Volatile.cs
- SectionRecord.cs
- SoapFormatterSinks.cs
- WebEventCodes.cs
- Hyperlink.cs
- ReadOnlyObservableCollection.cs
- OracleInfoMessageEventArgs.cs
- ReadOnlyDictionary.cs
- InvalidComObjectException.cs
- WorkflowInstanceProvider.cs
- Win32Exception.cs
- PrintPreviewControl.cs
- SHA384.cs
- RegexCapture.cs
- ViewStateModeByIdAttribute.cs
- NullableBoolConverter.cs
- BoundsDrawingContextWalker.cs
- InstanceStoreQueryResult.cs
- MatchingStyle.cs
- QilUnary.cs
- InitializerFacet.cs
- DataServiceRequestArgs.cs
- WindowsListViewItemStartMenu.cs
- WindowsComboBox.cs
- BuildManagerHost.cs
- DataSourceCacheDurationConverter.cs
- TransformPatternIdentifiers.cs
- SchemaObjectWriter.cs
- MemberCollection.cs
- SecUtil.cs
- GregorianCalendarHelper.cs
- BamlMapTable.cs
- KnownBoxes.cs
- DbBuffer.cs
- SerializeAbsoluteContext.cs
- SymLanguageVendor.cs