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
- ClickablePoint.cs
- HandleCollector.cs
- NameScopePropertyAttribute.cs
- MethodExpr.cs
- ToolStripMenuItem.cs
- BitmapEffectGroup.cs
- IERequestCache.cs
- SamlConstants.cs
- XmlSchemaSimpleType.cs
- LassoHelper.cs
- VectorAnimationBase.cs
- VerificationAttribute.cs
- ThemeInfoAttribute.cs
- LambdaValue.cs
- PriorityChain.cs
- SchemaTableColumn.cs
- HtmlMeta.cs
- TdsEnums.cs
- Perspective.cs
- Verify.cs
- ScaleTransform3D.cs
- ToolStripPanelSelectionGlyph.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- GridViewUpdatedEventArgs.cs
- PointCollectionConverter.cs
- ExtendedTransformFactory.cs
- MeasureItemEvent.cs
- LoginCancelEventArgs.cs
- ScanQueryOperator.cs
- WebServiceParameterData.cs
- RequestContext.cs
- HostedTcpTransportManager.cs
- PaginationProgressEventArgs.cs
- EventData.cs
- JavaScriptString.cs
- CacheAxisQuery.cs
- MediaPlayer.cs
- Constant.cs
- BamlLocalizableResource.cs
- BinaryMethodMessage.cs
- ISCIIEncoding.cs
- FormsAuthenticationConfiguration.cs
- FontResourceCache.cs
- TextParagraphProperties.cs
- ExternalCalls.cs
- CultureInfoConverter.cs
- DefaultAsyncDataDispatcher.cs
- FormViewModeEventArgs.cs
- UnlockCardRequest.cs
- TabControlToolboxItem.cs
- Registry.cs
- FormViewDeleteEventArgs.cs
- DataGridItem.cs
- FormCollection.cs
- AutomationPattern.cs
- DesignerRegionMouseEventArgs.cs
- MissingMethodException.cs
- CapabilitiesAssignment.cs
- CompositeDataBoundControl.cs
- MaskedTextBox.cs
- SqlServer2KCompatibilityAnnotation.cs
- DateTimeConstantAttribute.cs
- SQLBoolean.cs
- InstanceValue.cs
- Send.cs
- SettingsPropertyNotFoundException.cs
- Domain.cs
- WebRequestModulesSection.cs
- RequiredFieldValidator.cs
- ObjectRef.cs
- TextCollapsingProperties.cs
- SelectionItemProviderWrapper.cs
- InvokeDelegate.cs
- SchemaImporterExtensionElementCollection.cs
- JoinGraph.cs
- CatalogPartChrome.cs
- ReadOnlyObservableCollection.cs
- ElementNotAvailableException.cs
- XmlSchemaObjectTable.cs
- RepeatInfo.cs
- ComplexTypeEmitter.cs
- DragEventArgs.cs
- TagPrefixCollection.cs
- TransformGroup.cs
- initElementDictionary.cs
- JoinTreeNode.cs
- UnsafeNativeMethods.cs
- TransactionTraceIdentifier.cs
- ClientApiGenerator.cs
- XmlBinaryReader.cs
- SqlFactory.cs
- MarkupCompilePass2.cs
- BinaryUtilClasses.cs
- __Filters.cs
- TypeConverterValueSerializer.cs
- HashFinalRequest.cs
- GetPageCompletedEventArgs.cs
- DataGridViewComboBoxColumn.cs
- DataBoundControl.cs
- ReadOnlyDictionary.cs