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
- ChangeInterceptorAttribute.cs
- XmlNodeChangedEventArgs.cs
- MethodExpr.cs
- DesignTimeTemplateParser.cs
- WebPartZone.cs
- Membership.cs
- ErrorHandler.cs
- UInt32Converter.cs
- FlowDocumentScrollViewer.cs
- OutOfProcStateClientManager.cs
- RawStylusInputCustomDataList.cs
- FrameworkElement.cs
- EntitySqlQueryCacheKey.cs
- SoapAttributeOverrides.cs
- CultureInfoConverter.cs
- TdsParserStateObject.cs
- ProvidersHelper.cs
- XmlNavigatorStack.cs
- XPathNodeHelper.cs
- IdentitySection.cs
- CollectionDataContractAttribute.cs
- ScrollProviderWrapper.cs
- Marshal.cs
- ToolboxBitmapAttribute.cs
- DesignerWithHeader.cs
- TemplateColumn.cs
- InstanceHandleReference.cs
- SingleAnimationUsingKeyFrames.cs
- WorkflowApplicationIdleEventArgs.cs
- DesignBindingPicker.cs
- ArraySegment.cs
- RegexInterpreter.cs
- QualifiedId.cs
- PropertyDescriptorGridEntry.cs
- CodeDomExtensionMethods.cs
- AnimationException.cs
- LogManagementAsyncResult.cs
- BaseDataBoundControl.cs
- UnsafeNativeMethods.cs
- JsonFormatGeneratorStatics.cs
- DataSourceDesigner.cs
- Registry.cs
- GeometryValueSerializer.cs
- RtfToXamlReader.cs
- ByteAnimation.cs
- BamlTreeNode.cs
- ChannelDemuxer.cs
- OciLobLocator.cs
- UInt64Converter.cs
- LayoutTableCell.cs
- ContactManager.cs
- DSASignatureDeformatter.cs
- Label.cs
- GetPageNumberCompletedEventArgs.cs
- QueuePropertyVariants.cs
- DiscoveryDocumentSerializer.cs
- Cursor.cs
- TargetParameterCountException.cs
- RegexWorker.cs
- CommonDialog.cs
- NetworkCredential.cs
- IntegerValidatorAttribute.cs
- WindowsTokenRoleProvider.cs
- SAPICategories.cs
- DataGridViewCellValueEventArgs.cs
- AccessedThroughPropertyAttribute.cs
- ChangeConflicts.cs
- ICspAsymmetricAlgorithm.cs
- ActiveDocumentEvent.cs
- RawKeyboardInputReport.cs
- ValidationHelpers.cs
- TextDecoration.cs
- XmlSchemaGroup.cs
- WindowsToolbar.cs
- XmlBuffer.cs
- AggregationMinMaxHelpers.cs
- Html32TextWriter.cs
- BulletChrome.cs
- ExternalDataExchangeService.cs
- xamlnodes.cs
- IgnoreFileBuildProvider.cs
- CommandEventArgs.cs
- ValidatorUtils.cs
- WebPartEditorOkVerb.cs
- UserThread.cs
- XPathItem.cs
- SamlAudienceRestrictionCondition.cs
- ProvidersHelper.cs
- RtfControlWordInfo.cs
- DocumentPageView.cs
- KoreanCalendar.cs
- HwndAppCommandInputProvider.cs
- ReadOnlyHierarchicalDataSource.cs
- ChildDocumentBlock.cs
- WindowClosedEventArgs.cs
- SparseMemoryStream.cs
- String.cs
- ValidationRule.cs
- FrameworkElementAutomationPeer.cs
- TrackingProfileDeserializationException.cs