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
- PageAsyncTaskManager.cs
- ResourceReader.cs
- CookieProtection.cs
- Latin1Encoding.cs
- EntityContainerEmitter.cs
- DataGridBoolColumn.cs
- DefaultWorkflowLoaderService.cs
- DataGridSortCommandEventArgs.cs
- hwndwrapper.cs
- LinqDataSourceUpdateEventArgs.cs
- FormsAuthentication.cs
- PriorityBinding.cs
- AppSettingsSection.cs
- CrossAppDomainChannel.cs
- SqlMultiplexer.cs
- FormView.cs
- ConnectionPointCookie.cs
- SystemIcmpV6Statistics.cs
- PackWebResponse.cs
- TraversalRequest.cs
- ExpressionHelper.cs
- TableLayoutSettings.cs
- UnsafeMethods.cs
- embossbitmapeffect.cs
- cookieexception.cs
- RequiredFieldValidator.cs
- NavigatorOutput.cs
- DeflateEmulationStream.cs
- WebHeaderCollection.cs
- WebPageTraceListener.cs
- Effect.cs
- SiteMembershipCondition.cs
- OleDbConnectionInternal.cs
- CapiNative.cs
- ZipPackagePart.cs
- FixedSOMLineCollection.cs
- ZipArchive.cs
- DesignTimeVisibleAttribute.cs
- ShaderRenderModeValidation.cs
- ControlPaint.cs
- CheckPair.cs
- MediaTimeline.cs
- TransformerConfigurationWizardBase.cs
- ObjectViewFactory.cs
- SendingRequestEventArgs.cs
- XmlTextEncoder.cs
- NonSerializedAttribute.cs
- PropertyMapper.cs
- UnsafeNativeMethods.cs
- GroupLabel.cs
- ConditionCollection.cs
- GZipStream.cs
- HostAdapter.cs
- WebPartConnectionCollection.cs
- OciEnlistContext.cs
- WindowsToolbarAsMenu.cs
- DbParameterHelper.cs
- WinCategoryAttribute.cs
- TreeNodeEventArgs.cs
- ContainsRowNumberChecker.cs
- OdbcError.cs
- OdbcException.cs
- MemberJoinTreeNode.cs
- unsafenativemethodsother.cs
- Win32MouseDevice.cs
- CellCreator.cs
- _Win32.cs
- embossbitmapeffect.cs
- DocumentCollection.cs
- TextElement.cs
- BitmapEffectGeneralTransform.cs
- SqlUnionizer.cs
- WorkflowPersistenceContext.cs
- TextServicesLoader.cs
- TextEffect.cs
- ToolStripItemDesigner.cs
- WindowsListViewItemCheckBox.cs
- RequestSecurityTokenSerializer.cs
- EditorAttribute.cs
- DirectionalLight.cs
- __TransparentProxy.cs
- Cursors.cs
- Annotation.cs
- InfoCardCryptoHelper.cs
- ProfileGroupSettings.cs
- SubclassTypeValidatorAttribute.cs
- Transactions.cs
- SaveWorkflowCommand.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- Localizer.cs
- _UriTypeConverter.cs
- FrameworkElementAutomationPeer.cs
- DragEvent.cs
- HttpHandlersSection.cs
- ScriptManager.cs
- RelationshipEndMember.cs
- SecurityMessageProperty.cs
- FrameDimension.cs
- InheritanceService.cs
- ColumnHeader.cs