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
- SourceFileBuildProvider.cs
- FlowDocumentPage.cs
- Convert.cs
- WasEndpointConfigContainer.cs
- TimeSpanOrInfiniteValidator.cs
- InternalPermissions.cs
- StandardToolWindows.cs
- SetStateDesigner.cs
- DataControlFieldHeaderCell.cs
- CapiSymmetricAlgorithm.cs
- DataBoundControlAdapter.cs
- SHA256Cng.cs
- TraceXPathNavigator.cs
- WebProxyScriptElement.cs
- LookupNode.cs
- GroupBoxAutomationPeer.cs
- ConnectivityStatus.cs
- ObjectStateEntry.cs
- SafeFileMappingHandle.cs
- ByteStorage.cs
- SeekableReadStream.cs
- ComboBoxRenderer.cs
- ScrollContentPresenter.cs
- SamlNameIdentifierClaimResource.cs
- CustomErrorsSectionWrapper.cs
- Comparer.cs
- SqlClientPermission.cs
- DefaultPropertyAttribute.cs
- ToolboxItemFilterAttribute.cs
- Table.cs
- Variant.cs
- ModelTreeEnumerator.cs
- Page.cs
- RemotingSurrogateSelector.cs
- TdsEnums.cs
- TextPenaltyModule.cs
- SmiMetaDataProperty.cs
- ThicknessAnimationBase.cs
- PropertyEmitterBase.cs
- DesignerVerb.cs
- SHA1CryptoServiceProvider.cs
- SQLBytesStorage.cs
- ResXFileRef.cs
- StateItem.cs
- DataGridViewColumnEventArgs.cs
- DrawingState.cs
- EventDescriptor.cs
- IChannel.cs
- Visual.cs
- BrowserCapabilitiesFactory.cs
- AutomationFocusChangedEventArgs.cs
- CharacterShapingProperties.cs
- ContentValidator.cs
- GroupBoxRenderer.cs
- IUnknownConstantAttribute.cs
- Compiler.cs
- RectAnimationUsingKeyFrames.cs
- MimeTypeMapper.cs
- IndentTextWriter.cs
- PropertyAccessVisitor.cs
- CodeDomSerializationProvider.cs
- XmlChildNodes.cs
- ObjectItemAttributeAssemblyLoader.cs
- TdsValueSetter.cs
- ComPlusSynchronizationContext.cs
- ConnectionStringSettingsCollection.cs
- DataGridRelationshipRow.cs
- XmlSchemaResource.cs
- AudioFileOut.cs
- TextBoxDesigner.cs
- DesignerCategoryAttribute.cs
- WaitHandle.cs
- PersonalizationStateInfo.cs
- DrawingBrush.cs
- RecipientInfo.cs
- SliderAutomationPeer.cs
- DbUpdateCommandTree.cs
- ViewUtilities.cs
- TypedServiceOperationListItem.cs
- RegexGroupCollection.cs
- WorkflowOwnershipException.cs
- MdImport.cs
- WorkflowRuntimeServiceElementCollection.cs
- ContractTypeNameCollection.cs
- SecureUICommand.cs
- DesignerHierarchicalDataSourceView.cs
- ToolStripSplitButton.cs
- DataViewManagerListItemTypeDescriptor.cs
- Rect3DValueSerializer.cs
- PathFigure.cs
- FormViewPageEventArgs.cs
- IndentTextWriter.cs
- XmlTextEncoder.cs
- AnonymousIdentificationModule.cs
- GridItemProviderWrapper.cs
- SerializationObjectManager.cs
- PageThemeBuildProvider.cs
- MenuAdapter.cs
- QilLoop.cs
- FunctionImportMapping.cs