TypeUsage 類別

定義

描述型別以及該型別的 Facet 組。Describes a type and a set of facets for that type.

public ref class TypeUsage sealed : System::Data::Metadata::Edm::MetadataItem
public sealed class TypeUsage : System.Data.Metadata.Edm.MetadataItem
type TypeUsage = class
    inherit MetadataItem
Public NotInheritable Class TypeUsage
Inherits MetadataItem
繼承
TypeUsage

屬性

BuiltInTypeKind

取得這個 TypeUsage 的內建型別類型。Gets the built-in type kind for this TypeUsage.

Documentation

取得或設定與這個型別相關聯的文件。Gets or sets the documentation associated with this type.

(繼承來源 MetadataItem)
EdmType

取得這個 TypeUsage 所描述的型別資訊。Gets the type information described by this TypeUsage.

Facets

取得這個 TypeUsage 所描述型別的 Facet 清單。Gets the list of facets for the type that is described by this TypeUsage.

MetadataProperties

取得目前型別的屬性清單。Gets the list of properties of the current type.

(繼承來源 MetadataItem)

方法

CreateBinaryTypeUsage(PrimitiveType, Boolean)

建立 TypeUsage 物件,以使用指定的 Facet 值來描述二進位型別。Creates a TypeUsage object to describe a binary type by using the specified facet values.

CreateBinaryTypeUsage(PrimitiveType, Boolean, Int32)

建立 TypeUsage 物件,以使用指定的 Facet 值來描述二進位型別。Creates a TypeUsage object to describe a binary type by using the specified facet values.

CreateDateTimeOffsetTypeUsage(PrimitiveType, Nullable<Byte>)

建立 DateTimeOffsetTypeUsage 物件,其型別為參數描述的型別。Creates a DateTimeOffsetTypeUsage object of the type that the parameters describe.

CreateDateTimeTypeUsage(PrimitiveType, Nullable<Byte>)

建立 DateTimeTypeUsage 物件,其型別為參數描述的型別。Creates a DateTimeTypeUsage object of the type that the parameters describe.

CreateDecimalTypeUsage(PrimitiveType)

建立 TypeUsage 物件,以描述具有無限制的精確度和小數點位數 Facet 值的十進位型別。Creates a TypeUsage object to describe a decimal type with unbounded precision and scale facet values.

CreateDecimalTypeUsage(PrimitiveType, Byte, Byte)

建立 TypeUsage 物件,以使用指定的 Facet 值來描述十進位型別。Creates a TypeUsage object to describe a decimal type by using the specified facet values.

CreateDefaultTypeUsage(EdmType)

使用指定的概念模型型別,建立 TypeUsage 物件。Creates a TypeUsage object with the specified conceptual model type.

CreateStringTypeUsage(PrimitiveType, Boolean, Boolean)

建立 TypeUsage 物件,以使用指定的 Facet 值與無限制的 MaxLength 來描述字串型別。Creates a TypeUsage object to describe a string type by using the specified facet values and unbounded MaxLength.

CreateStringTypeUsage(PrimitiveType, Boolean, Boolean, Int32)

建立 TypeUsage 物件,以使用指定的 Facet 值來描述字串型別。Creates a TypeUsage object to describe a string type by using the specified facet values.

CreateTimeTypeUsage(PrimitiveType, Nullable<Byte>)

建立 TimeTypeUsage 物件,其型別為參數描述的型別。Creates a TimeTypeUsage object of the type that the parameters describe.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IsSubtypeOf(TypeUsage)

檢查這個 TypeUsage 是否為指定的 TypeUsage 的子型別。Checks whether this TypeUsage is a subtype of the specified TypeUsage.

MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回這個 TypeUsage 所描述型別的完整名稱。Returns the full name of the type described by this TypeUsage.

擴充方法

Constant(TypeUsage, Object)

使用給定的常數值,建立指定基本型別的新 DbConstantExpressionCreates a new DbConstantExpression of the specified primitive type with the given constant value.

New(TypeUsage, IEnumerable<DbExpression>)

建立新的 DbNewInstanceExpressionCreates a new DbNewInstanceExpression. 如果型別引數是集合型別,則這些引數會用於指定集合的項目。If the type argument is a collection type, the arguments specify the elements of the collection. 否則,這些引數會用來做為新執行個體中的屬性或資料行值。Otherwise the arguments are used as property or column values in the new instance.

New(TypeUsage, DbExpression[])

建立新的 DbNewInstanceExpressionCreates a new DbNewInstanceExpression. 如果型別引數是集合型別,則這些引數會用於指定集合的項目。If the type argument is a collection type, the arguments specify the elements of the collection. 否則,這些引數會用來做為新執行個體中的屬性或資料行值。Otherwise the arguments are used as property or column values in the new instance.

NewEmptyCollection(TypeUsage)

建立新的 DbNewInstanceExpression,這個運算式會建構指定集合型別的空集合。Creates a new DbNewInstanceExpression that constructs an empty collection of the specified collection type.

Null(TypeUsage)

建立新的 DbNullExpression,這個運算式表示具型別的 null 值。Creates a new DbNullExpression, which represents a typed null value.

Parameter(TypeUsage, String)

建立新的 DbParameterReferenceExpression,這個運算式會使用指定的名稱和型別,參考參數。Creates a new DbParameterReferenceExpression that references a parameter with the specified name and type.

Variable(TypeUsage, String)

建立新的 DbVariableReferenceExpression,這個運算式會使用指定的名稱和型別,參考變數。Creates a new DbVariableReferenceExpression that references a variable with the specified name and type.

適用於