Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / EdmScalarPropertyAttribute.cs / 2 / 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
- ListViewItem.cs
- DataControlFieldCollection.cs
- PersonalizablePropertyEntry.cs
- ContextMenuStripGroup.cs
- SmiRequestExecutor.cs
- WebColorConverter.cs
- Path.cs
- ObjectItemConventionAssemblyLoader.cs
- DbConnectionInternal.cs
- LogicalExpressionEditor.cs
- ProtocolsConfigurationHandler.cs
- RegexCaptureCollection.cs
- SqlRowUpdatedEvent.cs
- DetailsViewDeleteEventArgs.cs
- Menu.cs
- DummyDataSource.cs
- StylusDownEventArgs.cs
- COAUTHIDENTITY.cs
- SQLRoleProvider.cs
- EntityReference.cs
- EmptyTextWriter.cs
- DataGridView.cs
- AutoCompleteStringCollection.cs
- ControlEvent.cs
- StringUtil.cs
- CustomTypeDescriptor.cs
- SQLInt32.cs
- WebPartVerb.cs
- WindowsTokenRoleProvider.cs
- DataTrigger.cs
- OdbcTransaction.cs
- SqlCommandBuilder.cs
- PropertyMapper.cs
- RelationshipEndCollection.cs
- ModuleConfigurationInfo.cs
- ValueTypeFixupInfo.cs
- ImageAutomationPeer.cs
- WebPartDescriptionCollection.cs
- Transform.cs
- WebUtil.cs
- TcpTransportBindingElement.cs
- CheckBoxAutomationPeer.cs
- PreProcessor.cs
- RepeatButtonAutomationPeer.cs
- XmlUtf8RawTextWriter.cs
- UriPrefixTable.cs
- DrawListViewSubItemEventArgs.cs
- CodeDOMProvider.cs
- VirtualizedCellInfoCollection.cs
- HyperlinkAutomationPeer.cs
- XomlCompiler.cs
- ArrayItemReference.cs
- CodeArgumentReferenceExpression.cs
- ConstraintManager.cs
- InternalBase.cs
- ReadOnlyNameValueCollection.cs
- SafeSecurityHandles.cs
- DirectoryRootQuery.cs
- TableSectionStyle.cs
- TextTabProperties.cs
- DependencySource.cs
- XmlSchemaObjectCollection.cs
- Bitmap.cs
- IndexedGlyphRun.cs
- ModifiableIteratorCollection.cs
- NumberFormatInfo.cs
- QueryContinueDragEvent.cs
- AspCompat.cs
- RequiredFieldValidator.cs
- DispatchChannelSink.cs
- EncodingTable.cs
- WindowsSolidBrush.cs
- SamlAssertion.cs
- PostBackOptions.cs
- JoinQueryOperator.cs
- EventArgs.cs
- SQLSingle.cs
- ScriptHandlerFactory.cs
- Size.cs
- SqlConnectionHelper.cs
- BindingContext.cs
- MetadataCache.cs
- CodeGenerator.cs
- _ConnectOverlappedAsyncResult.cs
- PersonalizationStateInfoCollection.cs
- SharedPersonalizationStateInfo.cs
- ControlBuilder.cs
- EmptyEnumerator.cs
- Parsers.cs
- DbLambda.cs
- WorkflowInstanceRecord.cs
- DynamicILGenerator.cs
- HtmlFormParameterReader.cs
- XmlFormatWriterGenerator.cs
- WebServiceHandler.cs
- PropertyRef.cs
- PropertyGridCommands.cs
- QuestionEventArgs.cs
- CompressStream.cs
- Parser.cs