Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / MetadataPropertyAttribute.cs / 2 / 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
- TableParaClient.cs
- UIElement3D.cs
- ObjectKeyFrameCollection.cs
- CodeDefaultValueExpression.cs
- FilteredAttributeCollection.cs
- MemberMemberBinding.cs
- VarRefManager.cs
- BaseInfoTable.cs
- TextRange.cs
- StrongBox.cs
- ElementHost.cs
- CodeArgumentReferenceExpression.cs
- APCustomTypeDescriptor.cs
- APCustomTypeDescriptor.cs
- HttpConfigurationSystem.cs
- SecurityPolicySection.cs
- DynamicControlParameter.cs
- TimeSpan.cs
- ValidatorCollection.cs
- OutputCacheSection.cs
- TableLayoutSettings.cs
- Transform3D.cs
- DbParameterCollectionHelper.cs
- AspCompat.cs
- HandoffBehavior.cs
- RelationshipNavigation.cs
- DiagnosticsConfiguration.cs
- ResourceManagerWrapper.cs
- EdmRelationshipRoleAttribute.cs
- ResourcePart.cs
- BaseResourcesBuildProvider.cs
- XmlReflectionMember.cs
- WebPartUtil.cs
- BaseDataListDesigner.cs
- XmlSerializationWriter.cs
- Comparer.cs
- SubqueryRules.cs
- ImageKeyConverter.cs
- DashStyle.cs
- HttpRequest.cs
- BoolLiteral.cs
- XmlSchemaAttribute.cs
- GrabHandleGlyph.cs
- formatter.cs
- SynchronizationLockException.cs
- ProfilePropertySettings.cs
- ConstantExpression.cs
- ResourceKey.cs
- DoubleAnimation.cs
- DataGridPagerStyle.cs
- LambdaCompiler.Generated.cs
- PackWebRequest.cs
- VectorCollection.cs
- AlphabetConverter.cs
- InputDevice.cs
- DataGridRelationshipRow.cs
- odbcmetadatafactory.cs
- wmiprovider.cs
- BatchServiceHost.cs
- FormatException.cs
- SamlConditions.cs
- IImplicitResourceProvider.cs
- SerializationEventsCache.cs
- XmlNodeChangedEventArgs.cs
- UmAlQuraCalendar.cs
- DataFormats.cs
- XsltInput.cs
- SetStoryboardSpeedRatio.cs
- OpenFileDialog.cs
- UpdatePanelTrigger.cs
- WebPartDeleteVerb.cs
- ListViewPagedDataSource.cs
- ProgramPublisher.cs
- InternalBufferManager.cs
- WmlImageAdapter.cs
- FlowDocumentView.cs
- AsymmetricSignatureFormatter.cs
- PersistenceTypeAttribute.cs
- DecimalConverter.cs
- SecurityStateEncoder.cs
- MessageVersionConverter.cs
- RSAPKCS1SignatureFormatter.cs
- TreeNodeStyleCollection.cs
- DataGridToolTip.cs
- MemberRelationshipService.cs
- SpellerInterop.cs
- DbConnectionPoolCounters.cs
- HtmlShim.cs
- SingleResultAttribute.cs
- FlowDocument.cs
- BinarySerializer.cs
- ConnectionInterfaceCollection.cs
- SafeEventLogWriteHandle.cs
- ChannelBinding.cs
- UserControlBuildProvider.cs
- WeakReferenceKey.cs
- ToolZone.cs
- Filter.cs
- PrtCap_Builder.cs
- ReflectTypeDescriptionProvider.cs