Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DataObjectFieldAttribute.cs / 1 / DataObjectFieldAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// Represents a field of a DataObject. Use this attribute on a field to indicate /// properties such as primary key, identity, nullability, and length. /// [AttributeUsage(AttributeTargets.Property)] public sealed class DataObjectFieldAttribute : Attribute { private bool _primaryKey; private bool _isIdentity; private bool _isNullable; private int _length; public DataObjectFieldAttribute(bool primaryKey) : this(primaryKey, false, false, -1) { } public DataObjectFieldAttribute(bool primaryKey, bool isIdentity) : this(primaryKey, isIdentity, false, -1) { } public DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable) : this(primaryKey, isIdentity, isNullable, -1){ } public DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable, int length) { _primaryKey = primaryKey; _isIdentity = isIdentity; _isNullable = isNullable; _length = length; } public bool IsIdentity { get { return _isIdentity; } } public bool IsNullable { get { return _isNullable; } } public int Length { get { return _length; } } public bool PrimaryKey { get { return _primaryKey; } } public override bool Equals(object obj) { if (obj == this) { return true; } DataObjectFieldAttribute other = obj as DataObjectFieldAttribute; return (other != null) && (other.IsIdentity == IsIdentity) && (other.IsNullable == IsNullable) && (other.Length == Length) && (other.PrimaryKey == PrimaryKey); } public override int GetHashCode() { return base.GetHashCode(); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebServicesSection.cs
- BamlRecordHelper.cs
- QilLoop.cs
- TranslateTransform3D.cs
- Tuple.cs
- ParseHttpDate.cs
- SeekableReadStream.cs
- AsyncPostBackTrigger.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- FontDifferentiator.cs
- PropertyValueChangedEvent.cs
- HandlerBase.cs
- StickyNote.cs
- ToolStripOverflow.cs
- IHttpResponseInternal.cs
- WebPartManager.cs
- InstanceData.cs
- CompilerGeneratedAttribute.cs
- XmlSerializableWriter.cs
- XmlValidatingReader.cs
- NetworkAddressChange.cs
- InternalException.cs
- AssemblyName.cs
- Drawing.cs
- assertwrapper.cs
- DataGridItemCollection.cs
- ContentValidator.cs
- ListViewItemEventArgs.cs
- SiteMembershipCondition.cs
- ExtendedTransformFactory.cs
- DataColumnChangeEvent.cs
- Helpers.cs
- UnknownWrapper.cs
- PartialCachingAttribute.cs
- OutputCacheProfile.cs
- DES.cs
- AlignmentXValidation.cs
- WorkflowRequestContext.cs
- WorkerRequest.cs
- XhtmlBasicValidationSummaryAdapter.cs
- FileSystemInfo.cs
- DataGridViewComboBoxColumnDesigner.cs
- WriteableBitmap.cs
- DrawingAttributesDefaultValueFactory.cs
- FixedHyperLink.cs
- PageCatalogPart.cs
- BaseParagraph.cs
- NameSpaceExtractor.cs
- ThreadStateException.cs
- DockAndAnchorLayout.cs
- EventSinkActivityDesigner.cs
- Symbol.cs
- contentDescriptor.cs
- Persist.cs
- SerializeAbsoluteContext.cs
- ApplicationServicesHostFactory.cs
- ToolStripScrollButton.cs
- SystemResourceKey.cs
- OleDbMetaDataFactory.cs
- ResourceReferenceExpressionConverter.cs
- ObjectCacheHost.cs
- XmlCollation.cs
- KnownIds.cs
- HistoryEventArgs.cs
- OperationResponse.cs
- SafeBitVector32.cs
- DesignerCatalogPartChrome.cs
- KnownBoxes.cs
- DataBinding.cs
- NestedContainer.cs
- NullExtension.cs
- JapaneseCalendar.cs
- _AutoWebProxyScriptEngine.cs
- ControlBindingsCollection.cs
- TargetConverter.cs
- InfoCardTrace.cs
- WebDisplayNameAttribute.cs
- DbDataSourceEnumerator.cs
- AttachedPropertyBrowsableAttribute.cs
- MembershipUser.cs
- ErrorsHelper.cs
- ContextMarshalException.cs
- XNameTypeConverter.cs
- EdmComplexTypeAttribute.cs
- UInt64Storage.cs
- sortedlist.cs
- AsymmetricSignatureDeformatter.cs
- SchemaTypeEmitter.cs
- XmlNamespaceMappingCollection.cs
- AlignmentXValidation.cs
- XsltSettings.cs
- BaseValidator.cs
- ConfigXmlAttribute.cs
- SystemIPAddressInformation.cs
- ResourceDescriptionAttribute.cs
- StringValidator.cs
- UInt16Storage.cs
- DateTimeStorage.cs
- MetadataWorkspace.cs
- Types.cs