4 using System.Collections.Generic;
6 namespace SiliconStudio.Core.Reflection
13 private static readonly List<IMemberDescriptor> EmptyMembers =
new List<IMemberDescriptor>();
23 if (!IsPrimitive(type))
24 throw new ArgumentException(
"Type [{0}] is not a primitive");
26 Category = DescriptorCategory.Primitive;
36 switch (Type.GetTypeCode(type))
40 return type == typeof(
string) || type == typeof(TimeSpan) || type == typeof(DateTime);
Default implementation of a ITypeDescriptor.
Describe a member of an object.
Describes a descriptor for a primitive (bool, char, sbyte, byte, int, uint, long, ulong...
override System.Collections.Generic.List< IMemberDescriptor > PrepareMembers()
PrimitiveDescriptor(ITypeDescriptorFactory factory, Type type)
Initializes a new instance of the ObjectDescriptor class.
static bool IsPrimitive(Type type)
Determines whether the specified type is a primitive.
A factory to create an instance of a ITypeDescriptor