Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / MetadataPropertyAttribute.cs / 1305376 / MetadataPropertyAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Data.Common; using System.Diagnostics; namespace System.Data.Metadata.Edm { ////// Attribute used to mark up properties that should appear in the MetadataItem.MetadataProperties collection /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class MetadataPropertyAttribute : Attribute { ////// Initializes a new attribute with built in type kind /// /// Built in type setting Type property /// Sets IsCollectionType property internal MetadataPropertyAttribute(BuiltInTypeKind builtInTypeKind, bool isCollectionType) : this(MetadataItem.GetBuiltInType(builtInTypeKind), isCollectionType) { } ////// Initializes a new attribute with primitive type kind /// /// Primitive type setting Type property /// Sets IsCollectionType property internal MetadataPropertyAttribute(PrimitiveTypeKind primitiveTypeKind, bool isCollectionType) : this(MetadataItem.EdmProviderManifest.GetPrimitiveType(primitiveTypeKind), isCollectionType) { } ////// Initialize a new attribute with complex type kind (corresponding the the CLR type) /// /// CLR type setting Type property /// Sets IsCollectionType property internal MetadataPropertyAttribute(Type type, bool isCollection) : this(ClrComplexType.CreateReadonlyClrComplexType(type, type.Namespace ?? string.Empty, type.Name), isCollection) { } ////// Initialize a new attribute /// /// Sets Type property /// Sets IsCollectionType property private MetadataPropertyAttribute(EdmType type, bool isCollectionType) { Debug.Assert(null != type); _type = type; _isCollectionType = isCollectionType; } private readonly EdmType _type; private readonly bool _isCollectionType; ////// Gets EDM type for values stored in property. /// internal EdmType Type { get { return _type; } } ////// Gets bool indicating whether this is a collection type. /// internal bool IsCollectionType { get { return _isCollectionType; } } } } // 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
- DbMetaDataCollectionNames.cs
- VerificationException.cs
- ObjectComplexPropertyMapping.cs
- RawMouseInputReport.cs
- XmlSubtreeReader.cs
- SoundPlayer.cs
- Viewport2DVisual3D.cs
- WaitForChangedResult.cs
- HTMLTextWriter.cs
- ClientBuildManager.cs
- ClientSettingsProvider.cs
- FontStyle.cs
- TextElementAutomationPeer.cs
- MailBnfHelper.cs
- RIPEMD160Managed.cs
- SQLChars.cs
- ExpressionBuilder.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- CodeActivityContext.cs
- TimeManager.cs
- TypeName.cs
- AddingNewEventArgs.cs
- NativeMethods.cs
- XmlUtil.cs
- SynchronizationLockException.cs
- FormViewPagerRow.cs
- AppSettingsReader.cs
- NoneExcludedImageIndexConverter.cs
- rsa.cs
- HttpListenerContext.cs
- ScriptModule.cs
- DbExpressionRules.cs
- BinaryFormatterSinks.cs
- TemplateBamlTreeBuilder.cs
- DataRowExtensions.cs
- TabletCollection.cs
- _NegotiateClient.cs
- ControlBuilderAttribute.cs
- ShimAsPublicXamlType.cs
- WindowsStatic.cs
- TypeSystem.cs
- KeyEvent.cs
- CachedFontFace.cs
- TCEAdapterGenerator.cs
- WeakReferenceList.cs
- XmlTextEncoder.cs
- FacetEnabledSchemaElement.cs
- Executor.cs
- ImmutableObjectAttribute.cs
- SqlCommandBuilder.cs
- DbDataAdapter.cs
- TextEditorSpelling.cs
- SemanticAnalyzer.cs
- MenuAdapter.cs
- Selection.cs
- ReliableRequestSessionChannel.cs
- DataListItemCollection.cs
- ClientSettingsProvider.cs
- VectorCollectionValueSerializer.cs
- QilIterator.cs
- InputMethod.cs
- NativeObjectSecurity.cs
- HttpHandlersInstallComponent.cs
- XmlSchemaValidationException.cs
- CacheEntry.cs
- ReadOnlyNameValueCollection.cs
- PartBasedPackageProperties.cs
- xmlglyphRunInfo.cs
- CompositeDuplexBindingElementImporter.cs
- InstancePersistence.cs
- ToolStripComboBox.cs
- HttpConfigurationSystem.cs
- OleDbConnection.cs
- Errors.cs
- ReliabilityContractAttribute.cs
- XmlAttributeOverrides.cs
- XmlEntityReference.cs
- SignHashRequest.cs
- MessageParameterAttribute.cs
- DynamicObject.cs
- ColumnResult.cs
- Shape.cs
- CommonXSendMessage.cs
- XamlGridLengthSerializer.cs
- ErrorLog.cs
- HtmlInputReset.cs
- HtmlTableRowCollection.cs
- ProfileEventArgs.cs
- ArithmeticException.cs
- DataError.cs
- PageStatePersister.cs
- RichTextBox.cs
- SafeRightsManagementEnvironmentHandle.cs
- ParagraphVisual.cs
- TypedCompletedAsyncResult.cs
- CompareValidator.cs
- CodeEventReferenceExpression.cs
- RegexCaptureCollection.cs
- GuidConverter.cs
- RecognizerStateChangedEventArgs.cs