Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / EdmScalarPropertyAttribute.cs / 1305376 / EdmScalarPropertyAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- namespace System.Data.Objects.DataClasses { using System; ////// Attribute for scalar properties in an IEntity. /// Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, /// The metadata system expects this and will only look at the first of each of these attributes, even if there are more. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] [AttributeUsage(AttributeTargets.Property)] public sealed class EdmScalarPropertyAttribute : EdmPropertyAttribute { // Private variables corresponding to their properties. private bool _isNullable = true; private bool _entityKeyProperty; ////// Attribute for scalar properties. /// EdmScalarPropertyAttribute(EntityKeyProperty=[true|false], IsNullable=[true|false]) /// IsNullable and EntityKeyProperty cannot both be true. /// public EdmScalarPropertyAttribute() { } ////// The property is allowed to have a value of NULL. /// public bool IsNullable { get { return _isNullable; } set { _isNullable = value;} } ////// The property is a key. /// public bool EntityKeyProperty { get { return _entityKeyProperty; } set { _entityKeyProperty = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- namespace System.Data.Objects.DataClasses { using System; ////// Attribute for scalar properties in an IEntity. /// Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, /// The metadata system expects this and will only look at the first of each of these attributes, even if there are more. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] [AttributeUsage(AttributeTargets.Property)] public sealed class EdmScalarPropertyAttribute : EdmPropertyAttribute { // Private variables corresponding to their properties. private bool _isNullable = true; private bool _entityKeyProperty; ////// Attribute for scalar properties. /// EdmScalarPropertyAttribute(EntityKeyProperty=[true|false], IsNullable=[true|false]) /// IsNullable and EntityKeyProperty cannot both be true. /// public EdmScalarPropertyAttribute() { } ////// The property is allowed to have a value of NULL. /// public bool IsNullable { get { return _isNullable; } set { _isNullable = value;} } ////// The property is a key. /// public bool EntityKeyProperty { get { return _entityKeyProperty; } set { _entityKeyProperty = value; } } } } // 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
- TableLayoutPanel.cs
- MarkupProperty.cs
- DataGridAddNewRow.cs
- BindingWorker.cs
- QueryStatement.cs
- CodeAttributeArgumentCollection.cs
- CalendarItem.cs
- BinaryMethodMessage.cs
- DispatcherEventArgs.cs
- AncillaryOps.cs
- AlignmentXValidation.cs
- DesignSurfaceCollection.cs
- XmlSchema.cs
- ByteAnimationUsingKeyFrames.cs
- GenericXmlSecurityToken.cs
- KoreanCalendar.cs
- MenuAutomationPeer.cs
- FontClient.cs
- Int32Storage.cs
- DbParameterCollectionHelper.cs
- XXXInfos.cs
- PropertyChangedEventManager.cs
- CollectionContainer.cs
- FilterElement.cs
- ServiceRoute.cs
- DeploymentExceptionMapper.cs
- HttpCookie.cs
- QueryOpeningEnumerator.cs
- COM2PropertyDescriptor.cs
- ActivationWorker.cs
- XDeferredAxisSource.cs
- StickyNote.cs
- ToolStripCollectionEditor.cs
- DateTimeOffsetStorage.cs
- HtmlUtf8RawTextWriter.cs
- SmiRecordBuffer.cs
- WorkflowServiceNamespace.cs
- InvalidProgramException.cs
- MatcherBuilder.cs
- _NegoState.cs
- WindowCollection.cs
- DataSourceView.cs
- Byte.cs
- ContextBase.cs
- MetadataArtifactLoaderCompositeFile.cs
- MaskedTextBox.cs
- AuthenticationManager.cs
- AuthenticationModuleElementCollection.cs
- TrustManagerMoreInformation.cs
- TextAutomationPeer.cs
- AttributeAction.cs
- Base64Decoder.cs
- SoapExtension.cs
- DiscreteKeyFrames.cs
- DesignTimeVisibleAttribute.cs
- BaseValidatorDesigner.cs
- ToolStripTextBox.cs
- FontDifferentiator.cs
- UInt32Converter.cs
- TreeViewDesigner.cs
- DataBinder.cs
- PhoneCallDesigner.cs
- NullableLongMinMaxAggregationOperator.cs
- AutoResetEvent.cs
- COM2IProvidePropertyBuilderHandler.cs
- TCEAdapterGenerator.cs
- DataSourceCacheDurationConverter.cs
- UDPClient.cs
- QilXmlReader.cs
- OleDbInfoMessageEvent.cs
- KeyInterop.cs
- COM2ColorConverter.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SpotLight.cs
- SafeTimerHandle.cs
- PrintPreviewGraphics.cs
- WebPartDescriptionCollection.cs
- EntityProviderServices.cs
- DependencyObjectProvider.cs
- WebHeaderCollection.cs
- NameSpaceExtractor.cs
- GridViewRow.cs
- PointAnimation.cs
- Stopwatch.cs
- RolePrincipal.cs
- SqlRetyper.cs
- GridViewEditEventArgs.cs
- TimeSpanValidatorAttribute.cs
- XmlDictionaryString.cs
- basevalidator.cs
- RectangleGeometry.cs
- UnsafeNativeMethods.cs
- SpeakCompletedEventArgs.cs
- NativeMethods.cs
- TextContainerChangedEventArgs.cs
- CheckBoxList.cs
- ReadContentAsBinaryHelper.cs
- Int32AnimationUsingKeyFrames.cs
- ProtocolsSection.cs
- Button.cs