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
- ServicePointManagerElement.cs
- SimpleHandlerBuildProvider.cs
- EnumMemberAttribute.cs
- AttachmentCollection.cs
- RuntimeCompatibilityAttribute.cs
- DictionarySectionHandler.cs
- SynchronizationContext.cs
- CachedPathData.cs
- Lease.cs
- EventProviderWriter.cs
- ConsumerConnectionPointCollection.cs
- AlphabeticalEnumConverter.cs
- JsonQueryStringConverter.cs
- _SecureChannel.cs
- TransformConverter.cs
- ScriptingRoleServiceSection.cs
- HtmlElementCollection.cs
- DiagnosticsConfiguration.cs
- CommandID.cs
- IdentifierCollection.cs
- CompositeDispatchFormatter.cs
- TabItemWrapperAutomationPeer.cs
- ContractNamespaceAttribute.cs
- DeclaredTypeElementCollection.cs
- ResXDataNode.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- DataGridViewRowCancelEventArgs.cs
- Rotation3D.cs
- GenericAuthenticationEventArgs.cs
- DbConnectionStringCommon.cs
- SHA1CryptoServiceProvider.cs
- DataControlFieldHeaderCell.cs
- DBSchemaRow.cs
- Environment.cs
- PropertyChangingEventArgs.cs
- SerialStream.cs
- SqlAliasesReferenced.cs
- KnownBoxes.cs
- DataGridViewLinkCell.cs
- TypographyProperties.cs
- SequenceDesigner.cs
- PropertyMap.cs
- ToolStripArrowRenderEventArgs.cs
- Splitter.cs
- sqlinternaltransaction.cs
- GroupBox.cs
- Point3DIndependentAnimationStorage.cs
- CoTaskMemSafeHandle.cs
- WindowsComboBox.cs
- DayRenderEvent.cs
- SkinBuilder.cs
- XPathItem.cs
- ControlIdConverter.cs
- ReceiveErrorHandling.cs
- LOSFormatter.cs
- CodeGenerator.cs
- OrderingExpression.cs
- JsonUriDataContract.cs
- ProtocolsSection.cs
- SqlNotificationRequest.cs
- Hyperlink.cs
- BitSet.cs
- CommandBindingCollection.cs
- AlphabeticalEnumConverter.cs
- HttpDictionary.cs
- DoubleAnimationUsingKeyFrames.cs
- entityreference_tresulttype.cs
- PolicyException.cs
- DependencyPropertyKind.cs
- ThumbAutomationPeer.cs
- SelectedGridItemChangedEvent.cs
- CompositeControl.cs
- QueryContinueDragEvent.cs
- WsatAdminException.cs
- DSACryptoServiceProvider.cs
- SmiEventSink.cs
- RoleService.cs
- CompilationLock.cs
- DbParameterCollection.cs
- TableRowCollection.cs
- InstanceOwner.cs
- HostedAspNetEnvironment.cs
- StringFunctions.cs
- CodeObject.cs
- IIS7UserPrincipal.cs
- objectresult_tresulttype.cs
- basecomparevalidator.cs
- ILGenerator.cs
- TextOnlyOutput.cs
- DataGridColumnHeader.cs
- ObjectConverter.cs
- Expressions.cs
- HtmlInputCheckBox.cs
- DoubleAnimationUsingKeyFrames.cs
- GeneralTransform3DCollection.cs
- AVElementHelper.cs
- HttpRuntimeSection.cs
- BamlRecordHelper.cs
- ButtonFieldBase.cs
- CompositionCommandSet.cs