SaaS CMS has officially launched! Learn more now.

Class AllowedTypesAttribute

Assigns types that the property accepts adding.

Inheritance
System.Object
System.Attribute
AllowedTypesAttribute
Implements
System.Runtime.InteropServices._Attribute
System.Web.Mvc.IMetadataAware
Inherited Members
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.Equals(System.Object)
System.Attribute.GetHashCode()
System.Attribute.Match(System.Object)
System.Attribute.IsDefaultAttribute()
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfoCount(System.UInt32)
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfo(System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.GetIDsOfNames(System.Guid, System.IntPtr, System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.Invoke(System.UInt32, System.Guid, System.UInt32, System.Int16, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr)
System.Attribute.TypeId
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.ObjectEditing
Assembly: EPiServer.Shell.dll
Version: 7.19.2
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class AllowedTypesAttribute : Attribute, _Attribute, IMetadataAware

Constructors

AllowedTypesAttribute()

Initializes a new instance of the AllowedTypesAttribute class.

Declaration
public AllowedTypesAttribute()

AllowedTypesAttribute(Type[])

Initializes a new instance of the AllowedTypesAttribute class.

Declaration
public AllowedTypesAttribute(params Type[] allowedTypes)
Parameters
Type Name Description
System.Type[] allowedTypes

The allowed types.

Properties

AllowedTypes

Gets the allowed types.

Declaration
public Type[] AllowedTypes { get; }
Property Value
Type Description
System.Type[]

The allowed types.

AllowedTypesFormatSuffix

Gets or sets the allowed types format suffix.

Declaration
public string AllowedTypesFormatSuffix { get; set; }
Property Value
Type Description
System.String

The allowed types format suffix.

Methods

OnMetadataCreated(ModelMetadata)

Adds the allowed types to the metadata.

Declaration
public void OnMetadataCreated(ModelMetadata metadata)
Parameters
Type Name Description
System.Web.Mvc.ModelMetadata metadata

The model metadata.

Implements

System.Runtime.InteropServices._Attribute
System.Web.Mvc.IMetadataAware

Extension Methods