Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DataObjectAttribute.cs / 1 / 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));
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- securestring.cs
- TemplateInstanceAttribute.cs
- ValidationPropertyAttribute.cs
- ManagementExtension.cs
- ListItemDetailViewAttribute.cs
- SqlNotificationEventArgs.cs
- PageRanges.cs
- SymbolPair.cs
- Selector.cs
- VirtualPath.cs
- CompositionDesigner.cs
- HttpApplicationFactory.cs
- QuaternionRotation3D.cs
- RequestSecurityToken.cs
- UInt32.cs
- RestClientProxyHandler.cs
- ScriptingProfileServiceSection.cs
- _HeaderInfo.cs
- HiddenFieldPageStatePersister.cs
- FileUpload.cs
- FileClassifier.cs
- ScriptDescriptor.cs
- peersecurityelement.cs
- DataGrid.cs
- PagerSettings.cs
- PackWebResponse.cs
- ChtmlPhoneCallAdapter.cs
- SerialErrors.cs
- TargetException.cs
- DocumentViewerBase.cs
- XmlNamespaceMapping.cs
- TrackingMemoryStream.cs
- ParentUndoUnit.cs
- Profiler.cs
- SecurityNegotiationException.cs
- PropertyEntry.cs
- TableHeaderCell.cs
- DesignerSerializerAttribute.cs
- ObjectItemAttributeAssemblyLoader.cs
- JsonFormatGeneratorStatics.cs
- FormattedText.cs
- WebPartCatalogAddVerb.cs
- WebProxyScriptElement.cs
- TypedTableGenerator.cs
- XamlToRtfWriter.cs
- NonPrimarySelectionGlyph.cs
- FindCriteriaApril2005.cs
- DesignerSelectionListAdapter.cs
- updatecommandorderer.cs
- LockRenewalTask.cs
- AstNode.cs
- WebContext.cs
- CircleEase.cs
- JavaScriptObjectDeserializer.cs
- ObjectDataSourceSelectingEventArgs.cs
- CaretElement.cs
- WinFormsComponentEditor.cs
- DirectoryGroupQuery.cs
- WebServiceErrorEvent.cs
- DynamicResourceExtension.cs
- UserControlAutomationPeer.cs
- ObjectHandle.cs
- CodeConstructor.cs
- MappingModelBuildProvider.cs
- ListViewDesigner.cs
- HttpResponseInternalWrapper.cs
- ExtendedPropertyCollection.cs
- CatalogZone.cs
- SimpleRecyclingCache.cs
- PathNode.cs
- TemplateLookupAction.cs
- HMACSHA256.cs
- CustomBindingElement.cs
- CodeThrowExceptionStatement.cs
- EntityCommandExecutionException.cs
- CompositeKey.cs
- XmlQueryTypeFactory.cs
- IConvertible.cs
- SystemInfo.cs
- DataServiceHostFactory.cs
- SchemaNames.cs
- WebPartEditorCancelVerb.cs
- TextProviderWrapper.cs
- TableLayoutSettingsTypeConverter.cs
- BuildProvidersCompiler.cs
- VisualBrush.cs
- AuthenticatedStream.cs
- DateTimeConstantAttribute.cs
- NamespaceExpr.cs
- ChtmlFormAdapter.cs
- GradientBrush.cs
- RequestCache.cs
- XmlIncludeAttribute.cs
- OpenFileDialog.cs
- ScrollViewer.cs
- QueryTaskGroupState.cs
- DataRowChangeEvent.cs
- Attributes.cs
- ProjectionCamera.cs
- Buffer.cs