Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / MetadataPropertyAttribute.cs / 1 / 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
- CodeSubDirectoriesCollection.cs
- InternalSafeNativeMethods.cs
- ComponentCollection.cs
- InvalidOperationException.cs
- DocumentXmlWriter.cs
- SqlDataSourceCache.cs
- RequestCachePolicy.cs
- AssociationSet.cs
- DelegateArgumentValue.cs
- WindowsRegion.cs
- CheckBox.cs
- IDispatchConstantAttribute.cs
- Events.cs
- ServicePointManager.cs
- AbsoluteQuery.cs
- Attributes.cs
- CellParagraph.cs
- SerTrace.cs
- StylusTip.cs
- SHA512.cs
- ChtmlLinkAdapter.cs
- CollectionBase.cs
- DetectRunnableInstancesTask.cs
- DPTypeDescriptorContext.cs
- StylusCaptureWithinProperty.cs
- FileCodeGroup.cs
- StreamFormatter.cs
- ResourceExpressionEditorSheet.cs
- Image.cs
- HostExecutionContextManager.cs
- EdmComplexTypeAttribute.cs
- TextEmbeddedObject.cs
- ResourceManager.cs
- ScaleTransform3D.cs
- RadioButtonPopupAdapter.cs
- TdsParserSafeHandles.cs
- FormViewDeletedEventArgs.cs
- Triplet.cs
- SoapParser.cs
- UnitySerializationHolder.cs
- TypeUsage.cs
- SelectionItemProviderWrapper.cs
- JsonReaderWriterFactory.cs
- HierarchicalDataSourceDesigner.cs
- WebPartCloseVerb.cs
- WebRequestModuleElement.cs
- WindowsListViewScroll.cs
- GridViewEditEventArgs.cs
- WsatProxy.cs
- DbModificationClause.cs
- FirstQueryOperator.cs
- ErrorProvider.cs
- activationcontext.cs
- SiteMapHierarchicalDataSourceView.cs
- MimeObjectFactory.cs
- ToolTip.cs
- CodeConditionStatement.cs
- ToRequest.cs
- FileDialog_Vista_Interop.cs
- EncoderParameters.cs
- BigInt.cs
- XPathDocumentBuilder.cs
- RowUpdatingEventArgs.cs
- ResourceDefaultValueAttribute.cs
- TreeNodeCollection.cs
- SelectionEditor.cs
- BindingNavigator.cs
- translator.cs
- XmlRootAttribute.cs
- DataBinder.cs
- CalendarDateRange.cs
- PriorityRange.cs
- WrapPanel.cs
- OrderByQueryOptionExpression.cs
- RunClient.cs
- DBDataPermissionAttribute.cs
- ArrayTypeMismatchException.cs
- ConfigXmlAttribute.cs
- EventMap.cs
- SubclassTypeValidatorAttribute.cs
- DataContractSet.cs
- EmbeddedMailObjectsCollection.cs
- RegistryDataKey.cs
- GridErrorDlg.cs
- BuilderInfo.cs
- PageTheme.cs
- MailAddressCollection.cs
- DatePicker.cs
- TitleStyle.cs
- TypeContext.cs
- ClaimTypeElementCollection.cs
- RecordsAffectedEventArgs.cs
- Base64WriteStateInfo.cs
- AliasExpr.cs
- FontNamesConverter.cs
- ReflectTypeDescriptionProvider.cs
- RuntimeUtils.cs
- XPathSingletonIterator.cs
- EntitySetDataBindingList.cs
- InstanceDataCollection.cs