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
- AmbientLight.cs
- GetPageNumberCompletedEventArgs.cs
- GPPOINT.cs
- Column.cs
- ReadOnlyMetadataCollection.cs
- sqlmetadatafactory.cs
- Button.cs
- HttpResponse.cs
- SrgsRulesCollection.cs
- NameNode.cs
- ProfileManager.cs
- Automation.cs
- TemplateBindingExpressionConverter.cs
- MarkupWriter.cs
- XsltFunctions.cs
- SchemaExporter.cs
- Logging.cs
- ScriptResourceHandler.cs
- HttpResponse.cs
- WmlTextBoxAdapter.cs
- BindingSourceDesigner.cs
- DataList.cs
- EdmType.cs
- HashAlgorithm.cs
- CodeFieldReferenceExpression.cs
- EntityProxyFactory.cs
- ApplicationSettingsBase.cs
- CircleHotSpot.cs
- DictionaryContent.cs
- LingerOption.cs
- SqlRowUpdatingEvent.cs
- EntityDataReader.cs
- FilterableAttribute.cs
- ObjectDataSourceView.cs
- AccessText.cs
- BulletedList.cs
- DBBindings.cs
- TypeLoadException.cs
- AuthenticatingEventArgs.cs
- Graphics.cs
- RegexGroup.cs
- SignatureResourcePool.cs
- HandleExceptionArgs.cs
- HttpListenerResponse.cs
- FunctionQuery.cs
- XmlJsonWriter.cs
- BuildManager.cs
- DesignBindingConverter.cs
- EventLogInternal.cs
- XmlLoader.cs
- TabControlCancelEvent.cs
- WrapPanel.cs
- wgx_render.cs
- AncestorChangedEventArgs.cs
- WebPartVerb.cs
- ListViewEditEventArgs.cs
- SharedPersonalizationStateInfo.cs
- OptimisticConcurrencyException.cs
- SystemInformation.cs
- XmlSubtreeReader.cs
- SystemInfo.cs
- XmlSchemaAnnotation.cs
- ConfigurationSection.cs
- WindowsScroll.cs
- panel.cs
- CanonicalXml.cs
- FileEnumerator.cs
- PersonalizationState.cs
- HwndProxyElementProvider.cs
- InnerItemCollectionView.cs
- OleDbCommandBuilder.cs
- FullTextBreakpoint.cs
- WebHttpBehavior.cs
- ElementUtil.cs
- BrowserCapabilitiesCompiler.cs
- DataBoundControlDesigner.cs
- SqlTrackingWorkflowInstance.cs
- InvokeProviderWrapper.cs
- CodeIndexerExpression.cs
- Transform.cs
- TrackingValidationObjectDictionary.cs
- SyndicationSerializer.cs
- ProcessThreadCollection.cs
- CharacterBufferReference.cs
- ForceCopyBuildProvider.cs
- complextypematerializer.cs
- ArrayConverter.cs
- WmpBitmapEncoder.cs
- Helper.cs
- SafeEventLogWriteHandle.cs
- LabelLiteral.cs
- KoreanLunisolarCalendar.cs
- ContentPathSegment.cs
- DbSource.cs
- XmlIncludeAttribute.cs
- DesignerSerializationOptionsAttribute.cs
- HttpProtocolReflector.cs
- TreeNodeStyleCollection.cs
- WebPartsPersonalizationAuthorization.cs
- PlatformNotSupportedException.cs