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
- ArgumentsParser.cs
- _TransmitFileOverlappedAsyncResult.cs
- FileRecordSequenceCompletedAsyncResult.cs
- DataGridBoolColumn.cs
- RegexGroup.cs
- TableItemProviderWrapper.cs
- Identifier.cs
- SeekStoryboard.cs
- DataSourceCacheDurationConverter.cs
- LoginView.cs
- CombinedTcpChannel.cs
- DesignerFrame.cs
- DataListItemCollection.cs
- ResetableIterator.cs
- KeyedQueue.cs
- ImageListUtils.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- WebMessageBodyStyleHelper.cs
- TimelineClockCollection.cs
- RichTextBoxAutomationPeer.cs
- XPathAncestorIterator.cs
- XmlSerializationGeneratedCode.cs
- UnsafeNativeMethods.cs
- TiffBitmapDecoder.cs
- CharEnumerator.cs
- TaiwanCalendar.cs
- SQLInt16.cs
- SqlAggregateChecker.cs
- DataGridViewAutoSizeModeEventArgs.cs
- PrintPreviewDialog.cs
- StreamAsIStream.cs
- TypefaceMap.cs
- RNGCryptoServiceProvider.cs
- Attributes.cs
- StrongNameIdentityPermission.cs
- ConfigurationManagerInternal.cs
- HttpResponseBase.cs
- FileDialog.cs
- CustomErrorsSection.cs
- XmlDocumentType.cs
- UnionCqlBlock.cs
- ScrollData.cs
- ChildTable.cs
- RenderData.cs
- ControlBuilder.cs
- FileIOPermission.cs
- XmlnsDefinitionAttribute.cs
- TextContainerChangedEventArgs.cs
- BamlReader.cs
- SqlMethodAttribute.cs
- CodeMemberField.cs
- ComponentChangingEvent.cs
- CacheAxisQuery.cs
- dataSvcMapFileLoader.cs
- SQLCharsStorage.cs
- ConfigurationStrings.cs
- PropertyStore.cs
- XmlSchemaValidator.cs
- GraphicsContext.cs
- COSERVERINFO.cs
- TreeViewImageKeyConverter.cs
- TextLineBreak.cs
- DataReaderContainer.cs
- _PooledStream.cs
- RayHitTestParameters.cs
- ContentPosition.cs
- GeneralTransform3DCollection.cs
- ActivityCollectionMarkupSerializer.cs
- TerminatorSinks.cs
- Rights.cs
- ObjectMaterializedEventArgs.cs
- DataGridTablesFactory.cs
- TextTreeNode.cs
- OneToOneMappingSerializer.cs
- XmlBindingWorker.cs
- DocumentCollection.cs
- ComponentCollection.cs
- ConstrainedDataObject.cs
- SerializationTrace.cs
- _HelperAsyncResults.cs
- MarkupCompilePass1.cs
- AutomationPropertyInfo.cs
- PerformanceCounters.cs
- StringValidatorAttribute.cs
- TableAutomationPeer.cs
- GridViewUpdatedEventArgs.cs
- ReadOnlyCollectionBase.cs
- FlatButtonAppearance.cs
- HierarchicalDataTemplate.cs
- ToolStripItemCollection.cs
- BlobPersonalizationState.cs
- HostedHttpRequestAsyncResult.cs
- IPAddressCollection.cs
- FunctionDefinition.cs
- DeferredSelectedIndexReference.cs
- CompositeScriptReference.cs
- FocusChangedEventArgs.cs
- LinkGrep.cs
- ProfileParameter.cs
- Oid.cs