/// Represents the base item class for all the metadata
/// </summary>
publicabstractclassGlobalItem:MetadataItem
{
#regionConstructors
/// <summary>
/// Implementing this internal constructor so that this class can't be derived
/// outside this assembly
/// </summary>
internalGlobalItem()
{
}
internalGlobalItem(MetadataFlagsflags)
:base(flags)
{
}
#endregion
#regionProperties
/// <summary>
/// Returns the DataSpace in which this type belongs to
/// </summary>
[MetadataProperty(typeof(DataSpace), false)]
internalDataSpaceDataSpace
{
get
{
// Since there can be row types that span across spaces and we can have collections to such row types, we need to exclude RowType and collection type in this assert check
Debug.Assert(GetDataSpace()!=(DataSpace)(-1)||this.BuiltInTypeKind==BuiltInTypeKind.RowType||this.BuiltInTypeKind==BuiltInTypeKind.CollectionType,"DataSpace must have some valid value");
returnGetDataSpace();
}
set
{
// Whenever you assign the data space value, it must be unassigned or re-assigned to the same value.
// The only exception being we sometimes need to create row types that contains types from various spaces
Debug.Assert(GetDataSpace()==(DataSpace)(-1)||GetDataSpace()==value||this.BuiltInTypeKind==BuiltInTypeKind.RowType||this.BuiltInTypeKind==BuiltInTypeKind.CollectionType,"Invalid Value being set for DataSpace");