Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DataObjectAttribute.cs / 1305376 / DataObjectAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class)] public sealed class DataObjectAttribute : Attribute { public static readonly DataObjectAttribute DataObject = new DataObjectAttribute(true); public static readonly DataObjectAttribute NonDataObject = new DataObjectAttribute(false); public static readonly DataObjectAttribute Default = NonDataObject; private bool _isDataObject; public DataObjectAttribute() : this(true) { } public DataObjectAttribute(bool isDataObject) { _isDataObject = isDataObject; } public bool IsDataObject { get { return _isDataObject; } } ///public override bool Equals(object obj) { if (obj == this) { return true; } DataObjectAttribute other = obj as DataObjectAttribute; return (other != null) && (other.IsDataObject == IsDataObject); } /// public override int GetHashCode() { return _isDataObject.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.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class)] public sealed class DataObjectAttribute : Attribute { public static readonly DataObjectAttribute DataObject = new DataObjectAttribute(true); public static readonly DataObjectAttribute NonDataObject = new DataObjectAttribute(false); public static readonly DataObjectAttribute Default = NonDataObject; private bool _isDataObject; public DataObjectAttribute() : this(true) { } public DataObjectAttribute(bool isDataObject) { _isDataObject = isDataObject; } public bool IsDataObject { get { return _isDataObject; } } ///public override bool Equals(object obj) { if (obj == this) { return true; } DataObjectAttribute other = obj as DataObjectAttribute; return (other != null) && (other.IsDataObject == IsDataObject); } /// public override int GetHashCode() { return _isDataObject.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
- followingsibling.cs
- GeneralTransform2DTo3D.cs
- EventPropertyMap.cs
- PeerNameResolver.cs
- TableDesigner.cs
- ImportedNamespaceContextItem.cs
- GeneralTransform.cs
- ListViewItemMouseHoverEvent.cs
- PersonalizationStateQuery.cs
- InternalConfigConfigurationFactory.cs
- WebPartVerb.cs
- TableSectionStyle.cs
- ContextMenu.cs
- EntityUtil.cs
- MobileErrorInfo.cs
- Walker.cs
- DataSourceCacheDurationConverter.cs
- ReadOnlyNameValueCollection.cs
- DateTimeStorage.cs
- ColumnCollection.cs
- ExcludeFromCodeCoverageAttribute.cs
- DirectoryObjectSecurity.cs
- SerializationEventsCache.cs
- SqlConnectionStringBuilder.cs
- WebBrowserUriTypeConverter.cs
- shaperfactoryquerycacheentry.cs
- DrawingServices.cs
- FtpWebResponse.cs
- PartitionResolver.cs
- SettingsBase.cs
- Brush.cs
- FixedBufferAttribute.cs
- RawStylusInputCustomData.cs
- clipboard.cs
- DataGridSortCommandEventArgs.cs
- Command.cs
- Visual3DCollection.cs
- NetCodeGroup.cs
- DocumentSequenceHighlightLayer.cs
- MultiBindingExpression.cs
- Delegate.cs
- Setter.cs
- ProxyWebPartConnectionCollection.cs
- LongValidator.cs
- ApplicationServicesHostFactory.cs
- HtmlUtf8RawTextWriter.cs
- PropertyCondition.cs
- PanelContainerDesigner.cs
- ViewDesigner.cs
- ToolStripDropDownButton.cs
- AnimationTimeline.cs
- ObjectStateFormatter.cs
- CommandHelpers.cs
- DesigntimeLicenseContext.cs
- Overlapped.cs
- ConstrainedDataObject.cs
- ReverseInheritProperty.cs
- MemoryStream.cs
- SamlConstants.cs
- ClientTargetCollection.cs
- SafeFileHandle.cs
- ManagedFilter.cs
- ResourceProperty.cs
- ErrorHandler.cs
- XmlValidatingReaderImpl.cs
- SurrogateSelector.cs
- StyleBamlTreeBuilder.cs
- DataList.cs
- mda.cs
- BinaryMethodMessage.cs
- TraceProvider.cs
- PresentationAppDomainManager.cs
- NameObjectCollectionBase.cs
- DataGridHelper.cs
- SizeConverter.cs
- EntityDataSourceDesignerHelper.cs
- LinearGradientBrush.cs
- PropertyStore.cs
- RemoteWebConfigurationHostServer.cs
- Animatable.cs
- TimeSpanStorage.cs
- DoubleLinkList.cs
- EntityContainerEmitter.cs
- DescendentsWalkerBase.cs
- ConstraintCollection.cs
- MultiSelectRootGridEntry.cs
- DbConnectionClosed.cs
- ProcessHostConfigUtils.cs
- DesignerLoader.cs
- TabletCollection.cs
- AutomationAttributeInfo.cs
- XmlDocumentSerializer.cs
- CacheMemory.cs
- ChtmlTextWriter.cs
- WinEventWrap.cs
- MultiplexingFormatMapping.cs
- ActiveXContainer.cs
- BufferedWebEventProvider.cs
- ToolboxComponentsCreatingEventArgs.cs
- dbenumerator.cs