Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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)); } } } // 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
- MemberPath.cs
- SecurityKeyUsage.cs
- DaylightTime.cs
- FacetChecker.cs
- DataGridColumnEventArgs.cs
- BuildProvider.cs
- SignatureResourcePool.cs
- AttributeTable.cs
- TextCollapsingProperties.cs
- ItemContainerGenerator.cs
- DataTableNewRowEvent.cs
- PropertySegmentSerializer.cs
- ExitEventArgs.cs
- HealthMonitoringSectionHelper.cs
- ApplicationFileParser.cs
- MediaTimeline.cs
- RenderingBiasValidation.cs
- SqlXmlStorage.cs
- ParentUndoUnit.cs
- Cursors.cs
- UIHelper.cs
- GradientStopCollection.cs
- RelationshipSet.cs
- LogEntrySerialization.cs
- TextRangeEdit.cs
- DbProviderFactoriesConfigurationHandler.cs
- TraceUtility.cs
- OpCellTreeNode.cs
- JournalEntryListConverter.cs
- TypePresenter.xaml.cs
- AspNetPartialTrustHelpers.cs
- MenuAdapter.cs
- PrintPreviewGraphics.cs
- FixedPageStructure.cs
- EntityDataSourceValidationException.cs
- MailMessage.cs
- CursorConverter.cs
- AutomationElementCollection.cs
- SetStoryboardSpeedRatio.cs
- ArrayWithOffset.cs
- CallTemplateAction.cs
- OleDbDataReader.cs
- HwndMouseInputProvider.cs
- SafeRegistryHandle.cs
- HtmlHistory.cs
- DynamicQueryableWrapper.cs
- Item.cs
- FontFamily.cs
- FormatConvertedBitmap.cs
- CommandDevice.cs
- TemplateControlBuildProvider.cs
- TransactionScope.cs
- BaseTreeIterator.cs
- translator.cs
- PlatformNotSupportedException.cs
- PropertyEntry.cs
- DataGridViewCellPaintingEventArgs.cs
- DataGridViewRowsRemovedEventArgs.cs
- SqlTriggerContext.cs
- Funcletizer.cs
- AttachmentCollection.cs
- UnsafeNativeMethods.cs
- MILUtilities.cs
- DocumentOrderQuery.cs
- ExpressionPrefixAttribute.cs
- nulltextnavigator.cs
- ObjectReaderCompiler.cs
- TraceSwitch.cs
- AtomContentProperty.cs
- SecurityTokenTypes.cs
- DocumentPageViewAutomationPeer.cs
- ColorTransformHelper.cs
- DefaultTraceListener.cs
- XmlSchemaInclude.cs
- TextProviderWrapper.cs
- AutomationIdentifier.cs
- HatchBrush.cs
- CodeTypeParameterCollection.cs
- FileDialogPermission.cs
- FamilyCollection.cs
- HttpCapabilitiesSectionHandler.cs
- EventLogPermissionEntryCollection.cs
- RemoteWebConfigurationHost.cs
- TargetControlTypeCache.cs
- ListViewUpdateEventArgs.cs
- CookieParameter.cs
- PagerSettings.cs
- XsltContext.cs
- ellipse.cs
- RecordsAffectedEventArgs.cs
- ISFClipboardData.cs
- TTSEngineProxy.cs
- KeyEvent.cs
- UndirectedGraph.cs
- PocoPropertyAccessorStrategy.cs
- TableLayoutPanelDesigner.cs
- _KerberosClient.cs
- BasicCommandTreeVisitor.cs
- FormatStringEditor.cs
- GridItem.cs