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
- HandoffBehavior.cs
- SessionStateContainer.cs
- TypedReference.cs
- SQLBinary.cs
- precedingsibling.cs
- HtmlElementCollection.cs
- StoreAnnotationsMap.cs
- Attributes.cs
- NativeMethods.cs
- PolyBezierSegment.cs
- Point3DAnimationUsingKeyFrames.cs
- GacUtil.cs
- InternalResources.cs
- FixedSOMPageConstructor.cs
- StoreItemCollection.cs
- EncryptedPackage.cs
- CharUnicodeInfo.cs
- KernelTypeValidation.cs
- Constraint.cs
- StatusBarPanelClickEvent.cs
- OperatorExpressions.cs
- SQLByteStorage.cs
- DictionarySurrogate.cs
- AvTraceFormat.cs
- RawStylusActions.cs
- RelatedPropertyManager.cs
- CodeTypeDelegate.cs
- MetadataPropertyvalue.cs
- RijndaelManaged.cs
- AdornerLayer.cs
- SmiEventSink_DeferedProcessing.cs
- DeferredSelectedIndexReference.cs
- WhitespaceRule.cs
- peernodeimplementation.cs
- clipboard.cs
- BindingWorker.cs
- DrawingState.cs
- CompositionDesigner.cs
- HandleScope.cs
- UnknownBitmapEncoder.cs
- ClientProxyGenerator.cs
- CodePrimitiveExpression.cs
- TdsRecordBufferSetter.cs
- SQLRoleProvider.cs
- DocobjHost.cs
- BuildProviderAppliesToAttribute.cs
- ThreadStartException.cs
- WebResourceAttribute.cs
- HeaderFilter.cs
- OdbcFactory.cs
- UIPropertyMetadata.cs
- MultipartContentParser.cs
- MasterPageBuildProvider.cs
- SmiXetterAccessMap.cs
- InvalidateEvent.cs
- DataGridLinkButton.cs
- OLEDB_Util.cs
- TypeLibConverter.cs
- StatusBarItemAutomationPeer.cs
- XmlSchemaImport.cs
- AtomContentProperty.cs
- DbMetaDataColumnNames.cs
- ReturnType.cs
- RijndaelManaged.cs
- SourceSwitch.cs
- FormsAuthenticationCredentials.cs
- PasswordDeriveBytes.cs
- LongValidatorAttribute.cs
- RegisteredScript.cs
- JournalNavigationScope.cs
- FlowDocumentReaderAutomationPeer.cs
- StringWriter.cs
- ConfigXmlText.cs
- XpsDocumentEvent.cs
- DesignTimeParseData.cs
- TaiwanCalendar.cs
- CornerRadius.cs
- SessionStateItemCollection.cs
- ColorConvertedBitmap.cs
- ConstrainedDataObject.cs
- DataGridViewRowsAddedEventArgs.cs
- TextTrailingWordEllipsis.cs
- NotifyCollectionChangedEventArgs.cs
- VisualCollection.cs
- WindowsSlider.cs
- PreservationFileReader.cs
- BitmapDownload.cs
- SoapAttributeOverrides.cs
- ProbeDuplexAsyncResult.cs
- StrokeSerializer.cs
- HttpApplicationFactory.cs
- XmlSerializationReader.cs
- EditCommandColumn.cs
- TextBreakpoint.cs
- XmlReflectionImporter.cs
- ReadOnlyCollectionBase.cs
- QueryPageSettingsEventArgs.cs
- Comparer.cs
- ReceiveReply.cs
- XmlLinkedNode.cs