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; ////// [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
- JsonStringDataContract.cs
- SerializerWriterEventHandlers.cs
- WebPartUtil.cs
- FontStyles.cs
- FixedSOMTextRun.cs
- XamlBrushSerializer.cs
- ProcessInfo.cs
- LinearKeyFrames.cs
- DeclarativeCatalogPart.cs
- DBAsyncResult.cs
- OutOfMemoryException.cs
- WebControlsSection.cs
- VersionedStream.cs
- AudioLevelUpdatedEventArgs.cs
- XmlResolver.cs
- ArrayList.cs
- SessionKeyExpiredException.cs
- AmbiguousMatchException.cs
- XhtmlBasicLabelAdapter.cs
- SearchForVirtualItemEventArgs.cs
- ObjectFullSpanRewriter.cs
- CancelRequestedQuery.cs
- Matrix.cs
- AsyncResult.cs
- UInt32Converter.cs
- FullTextLine.cs
- Component.cs
- FrameworkObject.cs
- AutomationElementIdentifiers.cs
- XmlDataSourceNodeDescriptor.cs
- TdsParserSessionPool.cs
- UITypeEditor.cs
- RealProxy.cs
- InputBinder.cs
- CriticalFinalizerObject.cs
- PropertyItemInternal.cs
- MaskedTextBoxTextEditorDropDown.cs
- FrameSecurityDescriptor.cs
- MultipleViewPattern.cs
- CodeDomSerializerException.cs
- InvalidAsynchronousStateException.cs
- RequestUriProcessor.cs
- CellTreeSimplifier.cs
- IgnoreSectionHandler.cs
- TemplateEditingService.cs
- ServiceOperationParameter.cs
- CurrencyWrapper.cs
- ListBox.cs
- InstanceCreationEditor.cs
- InstanceHandle.cs
- ChangeConflicts.cs
- IndexerReference.cs
- NavigationProperty.cs
- Misc.cs
- ProjectionCamera.cs
- filewebrequest.cs
- GridPatternIdentifiers.cs
- NumericUpDown.cs
- EventDescriptorCollection.cs
- DbFunctionCommandTree.cs
- WindowsGraphicsWrapper.cs
- SHA1Cng.cs
- ApplicationSecurityInfo.cs
- X509Chain.cs
- SeparatorAutomationPeer.cs
- Message.cs
- TimeSpan.cs
- XmlHierarchicalDataSourceView.cs
- PathTooLongException.cs
- PtsCache.cs
- FieldNameLookup.cs
- ObjectTypeMapping.cs
- MergePropertyDescriptor.cs
- XMLSyntaxException.cs
- ListenerSingletonConnectionReader.cs
- SafeHandle.cs
- ProtocolElementCollection.cs
- DesignerView.Commands.cs
- DesignTimeData.cs
- Formatter.cs
- SmtpNetworkElement.cs
- DeferredReference.cs
- IERequestCache.cs
- XmlnsPrefixAttribute.cs
- ExpressionCopier.cs
- CustomLineCap.cs
- UniformGrid.cs
- ProcessInfo.cs
- QueryContinueDragEvent.cs
- SecurityPolicySection.cs
- PKCS1MaskGenerationMethod.cs
- DoubleCollectionValueSerializer.cs
- ProtocolsConfigurationEntry.cs
- Int32CollectionConverter.cs
- StringInfo.cs
- AssemblyAttributes.cs
- AdornerHitTestResult.cs
- ParseElement.cs
- PermissionSetTriple.cs
- EntityContainerRelationshipSet.cs