Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / MetadataPropertyAttribute.cs / 4 / 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
- DateTimeFormatInfo.cs
- FailedToStartupUIException.cs
- CompositeFontInfo.cs
- LicFileLicenseProvider.cs
- AngleUtil.cs
- MissingSatelliteAssemblyException.cs
- TdsParserSessionPool.cs
- SQLByte.cs
- SessionStateContainer.cs
- SignalGate.cs
- PageAsyncTaskManager.cs
- SyncMethodInvoker.cs
- WasAdminWrapper.cs
- LayoutUtils.cs
- TokenBasedSetEnumerator.cs
- SponsorHelper.cs
- FrameworkContentElementAutomationPeer.cs
- RestHandlerFactory.cs
- FlowLayout.cs
- ContentPlaceHolder.cs
- FixedSOMGroup.cs
- VisualCollection.cs
- FontNamesConverter.cs
- TextBreakpoint.cs
- DayRenderEvent.cs
- AggregationMinMaxHelpers.cs
- XmlUtf8RawTextWriter.cs
- WebPartsSection.cs
- ReadOnlyState.cs
- CodeTypeConstructor.cs
- ObjectQueryProvider.cs
- AppSettingsReader.cs
- OptionalMessageQuery.cs
- EnumMemberAttribute.cs
- FrugalMap.cs
- GroupPartitionExpr.cs
- RegionInfo.cs
- EntityTypeEmitter.cs
- SoapAttributes.cs
- WindowsSysHeader.cs
- ControlCollection.cs
- CompressionTransform.cs
- MimeBasePart.cs
- AlphabeticalEnumConverter.cs
- StylusPoint.cs
- TemplateInstanceAttribute.cs
- ContentElement.cs
- DbSetClause.cs
- RowsCopiedEventArgs.cs
- DataServiceQueryOfT.cs
- DynamicScriptObject.cs
- GeneralTransform3DCollection.cs
- TypeInitializationException.cs
- ClientType.cs
- IChannel.cs
- MouseEvent.cs
- ExtenderControl.cs
- ExecutedRoutedEventArgs.cs
- UnaryQueryOperator.cs
- LineSegment.cs
- SiteIdentityPermission.cs
- _CommandStream.cs
- SessionParameter.cs
- AccessDataSourceView.cs
- SharedStatics.cs
- RoutedEventHandlerInfo.cs
- ImpersonateTokenRef.cs
- HTTPNotFoundHandler.cs
- FragmentNavigationEventArgs.cs
- SmiEventStream.cs
- Profiler.cs
- PrintDialogException.cs
- MeshGeometry3D.cs
- TextElementEditingBehaviorAttribute.cs
- ImageInfo.cs
- Soap12ServerProtocol.cs
- PropertyDescriptorCollection.cs
- Set.cs
- DependsOnAttribute.cs
- ExtenderHelpers.cs
- StorageComplexTypeMapping.cs
- Control.cs
- mediaeventshelper.cs
- ConfigurationSchemaErrors.cs
- Win32.cs
- TraceLog.cs
- selecteditemcollection.cs
- InvokeHandlers.cs
- TextProviderWrapper.cs
- DurableInstance.cs
- AtomServiceDocumentSerializer.cs
- cookiecontainer.cs
- DateBoldEvent.cs
- BrowsableAttribute.cs
- FilterUserControlBase.cs
- TreeIterator.cs
- TypedMessageConverter.cs
- HebrewCalendar.cs
- CharacterMetricsDictionary.cs
- SmtpDigestAuthenticationModule.cs