Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / MetadataPropertyAttribute.cs / 4 / MetadataPropertyAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....],[....] //--------------------------------------------------------------------- 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. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....],[....] //--------------------------------------------------------------------- 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
- ListQueryResults.cs
- SQLDouble.cs
- BuildResult.cs
- CodeObjectCreateExpression.cs
- EntitySqlException.cs
- TemplatedMailWebEventProvider.cs
- SurrogateDataContract.cs
- QilScopedVisitor.cs
- DecimalAverageAggregationOperator.cs
- ScrollPattern.cs
- FixedSOMTableRow.cs
- Identity.cs
- SynchronizationLockException.cs
- RadioButtonStandardAdapter.cs
- TokenizerHelper.cs
- EventArgs.cs
- EdmItemCollection.cs
- DayRenderEvent.cs
- TemplateBindingExtensionConverter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- RC2.cs
- DependencyPropertyConverter.cs
- PingOptions.cs
- VirtualDirectoryMapping.cs
- TypeInitializationException.cs
- RetrieveVirtualItemEventArgs.cs
- SelectorAutomationPeer.cs
- AspNetCacheProfileAttribute.cs
- DataGridColumnCollection.cs
- LogWriteRestartAreaAsyncResult.cs
- ClassDataContract.cs
- PixelFormatConverter.cs
- RegistryKey.cs
- RightsManagementEncryptedStream.cs
- RawStylusInputCustomDataList.cs
- FullTextState.cs
- Point4D.cs
- ParameterElementCollection.cs
- HMACRIPEMD160.cs
- XmlSerializerObjectSerializer.cs
- StringBuilder.cs
- RootBrowserWindowProxy.cs
- XmlUTF8TextWriter.cs
- HtmlEmptyTagControlBuilder.cs
- ReferentialConstraint.cs
- BlurBitmapEffect.cs
- RootBrowserWindow.cs
- CodeGotoStatement.cs
- PartialCachingAttribute.cs
- DataBinder.cs
- SymbolUsageManager.cs
- Menu.cs
- _BaseOverlappedAsyncResult.cs
- AttachedProperty.cs
- StateManagedCollection.cs
- MenuItemBinding.cs
- SubMenuStyle.cs
- TreeNodeBindingCollection.cs
- XmlMemberMapping.cs
- SeekStoryboard.cs
- TextEffect.cs
- XmlNotation.cs
- ElementsClipboardData.cs
- BindableAttribute.cs
- TypeSystemProvider.cs
- XmlNamedNodeMap.cs
- TriState.cs
- AmbiguousMatchException.cs
- validationstate.cs
- EdmError.cs
- EncryptedKey.cs
- SQLUtility.cs
- WorkflowQueueInfo.cs
- ContainerVisual.cs
- DataRow.cs
- StringValueSerializer.cs
- EdmComplexTypeAttribute.cs
- MarkupCompiler.cs
- MarkupCompilePass2.cs
- XhtmlStyleClass.cs
- FreezableDefaultValueFactory.cs
- SafeLibraryHandle.cs
- GridViewRowCollection.cs
- XPathSelfQuery.cs
- TextParagraphProperties.cs
- DataGridRowClipboardEventArgs.cs
- CodeAssignStatement.cs
- EmptyEnumerator.cs
- UIElement3D.cs
- FixedSOMImage.cs
- Int64AnimationUsingKeyFrames.cs
- HttpCapabilitiesEvaluator.cs
- AccessDataSourceWizardForm.cs
- ListView.cs
- MaterialGroup.cs
- SqlTransaction.cs
- TextEffect.cs
- LinkUtilities.cs
- TextUtf8RawTextWriter.cs
- OracleCommand.cs