125 references to PropertyType
mscorlib (125)
system\runtime\interopservices\windowsruntime\clripropertyvalueimpl.cs (77)
20private PropertyType _type; 24private static volatile Tuple<Type, PropertyType>[] s_numericScalarTypes; 26internal CLRIPropertyValueImpl(PropertyType type, Object data) 32private static Tuple<Type, PropertyType>[] NumericScalarTypes { 35Tuple<Type, PropertyType>[] numericScalarTypes = new Tuple<Type, PropertyType>[] { 36new Tuple<Type, PropertyType>(typeof(Byte), PropertyType.UInt8), 37new Tuple<Type, PropertyType>(typeof(Int16), PropertyType.Int16), 38new Tuple<Type, PropertyType>(typeof(UInt16), PropertyType.UInt16), 39new Tuple<Type, PropertyType>(typeof(Int32), PropertyType.Int32), 40new Tuple<Type, PropertyType>(typeof(UInt32), PropertyType.UInt32), 41new Tuple<Type, PropertyType>(typeof(Int64), PropertyType.Int64), 42new Tuple<Type, PropertyType>(typeof(UInt64), PropertyType.UInt64), 43new Tuple<Type, PropertyType>(typeof(Single), PropertyType.Single), 44new Tuple<Type, PropertyType>(typeof(Double), PropertyType.Double) 54public PropertyType Type { 81return CoerceScalarValue<Byte>(PropertyType.UInt8); 87return CoerceScalarValue<Int16>(PropertyType.Int16); 92return CoerceScalarValue<UInt16>(PropertyType.UInt16); 98return CoerceScalarValue<Int32>(PropertyType.Int32); 104return CoerceScalarValue<UInt32>(PropertyType.UInt32); 110return CoerceScalarValue<Int64>(PropertyType.Int64); 116return CoerceScalarValue<UInt64>(PropertyType.UInt64); 122return CoerceScalarValue<Single>(PropertyType.Single); 128return CoerceScalarValue<Double>(PropertyType.Double); 134if (this.Type != PropertyType.Char16) 143if (this.Type != PropertyType.Boolean) 152return CoerceScalarValue<String>(PropertyType.String); 158if (this.Type != PropertyType.Inspectable) 168return CoerceScalarValue<Guid>(PropertyType.Guid); 175if (this.Type != PropertyType.DateTime) 184if (this.Type != PropertyType.TimeSpan) 194if (this.Type != PropertyType.Point) 205if (this.Type != PropertyType.Size) 216if (this.Type != PropertyType.Rect) 226return CoerceArrayValue<Byte>(PropertyType.UInt8Array); 232return CoerceArrayValue<Int16>(PropertyType.Int16Array); 238return CoerceArrayValue<UInt16>(PropertyType.UInt16Array); 244return CoerceArrayValue<Int32>(PropertyType.Int32Array); 250return CoerceArrayValue<UInt32>(PropertyType.UInt32Array); 256return CoerceArrayValue<Int64>(PropertyType.Int64Array); 262return CoerceArrayValue<UInt64>(PropertyType.UInt64Array); 268return CoerceArrayValue<Single>(PropertyType.SingleArray); 274return CoerceArrayValue<Double>(PropertyType.DoubleArray); 280if (this.Type != PropertyType.Char16Array) 289if (this.Type != PropertyType.BooleanArray) 298return CoerceArrayValue<String>(PropertyType.StringArray); 304if (this.Type != PropertyType.InspectableArray) 313return CoerceArrayValue<Guid>(PropertyType.GuidArray); 319if (this.Type != PropertyType.DateTimeArray) 328if (this.Type != PropertyType.TimeSpanArray) 338if (this.Type != PropertyType.PointArray) 349if (this.Type != PropertyType.SizeArray) 361if (this.Type != PropertyType.RectArray) 368private T[] CoerceArrayValue<T>(PropertyType unboxType) { 382PropertyType scalarType = Type - 1024; 400private T CoerceScalarValue<T>(PropertyType unboxType) 410private static T CoerceScalarValue<T>(PropertyType type, object value) { 413if (!IsCoercable(type, value) && type != PropertyType.Inspectable) { 421if (type == PropertyType.String && typeof(T) == typeof(Guid)) { 424else if (type == PropertyType.Guid && typeof(T) == typeof(String)) { 429foreach (Tuple<Type, PropertyType> numericScalar in NumericScalarTypes) { 449if (type == PropertyType.Inspectable && ipv != null) { 486private static bool IsCoercable(PropertyType type, object data) { 488if (type == PropertyType.Guid || type == PropertyType.String) { 496private static bool IsNumericScalarImpl(PropertyType type, object data) { 501foreach (Tuple<Type, PropertyType> numericScalar in NumericScalarTypes) {
system\runtime\interopservices\windowsruntime\clrireferenceimpl.cs (47)
23public CLRIReferenceImpl(PropertyType type, T obj) 102public CLRIReferenceArrayImpl(PropertyType type, T[] obj) 302return new CLRIReferenceImpl<int>(PropertyType.Int32, (int)obj); 304return new CLRIReferenceImpl<String>(PropertyType.String, (String)obj); 306return new CLRIReferenceImpl<byte>(PropertyType.UInt8, (byte)obj); 308return new CLRIReferenceImpl<short>(PropertyType.Int16, (short)obj); 310return new CLRIReferenceImpl<ushort>(PropertyType.UInt16, (ushort)obj); 312return new CLRIReferenceImpl<uint>(PropertyType.UInt32, (uint)obj); 314return new CLRIReferenceImpl<long>(PropertyType.Int64, (long)obj); 316return new CLRIReferenceImpl<ulong>(PropertyType.UInt64, (ulong)obj); 318return new CLRIReferenceImpl<float>(PropertyType.Single, (float)obj); 320return new CLRIReferenceImpl<double>(PropertyType.Double, (double)obj); 322return new CLRIReferenceImpl<char>(PropertyType.Char16, (char)obj); 324return new CLRIReferenceImpl<bool>(PropertyType.Boolean, (bool)obj); 326return new CLRIReferenceImpl<Guid>(PropertyType.Guid, (Guid)obj); 328return new CLRIReferenceImpl<DateTimeOffset>(PropertyType.DateTime, (DateTimeOffset)obj); 330return new CLRIReferenceImpl<TimeSpan>(PropertyType.TimeSpan, (TimeSpan)obj); 332return new CLRIReferenceImpl<Object>(PropertyType.Inspectable, (Object)obj); 335return new CLRIReferenceImpl<Type>(PropertyType.Other, (Type)obj); 339PropertyType? propType = null; 342propType = PropertyType.Point; 346propType = PropertyType.Rect; 350propType = PropertyType.Size; 354propType = PropertyType.Other; 379return new CLRIReferenceArrayImpl<int>(PropertyType.Int32Array, (int[])obj); 381return new CLRIReferenceArrayImpl<String>(PropertyType.StringArray, (String[])obj); 383return new CLRIReferenceArrayImpl<byte>(PropertyType.UInt8Array, (byte[])obj); 385return new CLRIReferenceArrayImpl<short>(PropertyType.Int16Array, (short[])obj); 387return new CLRIReferenceArrayImpl<ushort>(PropertyType.UInt16Array, (ushort[])obj); 389return new CLRIReferenceArrayImpl<uint>(PropertyType.UInt32Array, (uint[])obj); 391return new CLRIReferenceArrayImpl<long>(PropertyType.Int64Array, (long[])obj); 393return new CLRIReferenceArrayImpl<ulong>(PropertyType.UInt64Array, (ulong[])obj); 395return new CLRIReferenceArrayImpl<float>(PropertyType.SingleArray, (float[])obj); 397return new CLRIReferenceArrayImpl<double>(PropertyType.DoubleArray, (double[])obj); 399return new CLRIReferenceArrayImpl<char>(PropertyType.Char16Array, (char[])obj); 401return new CLRIReferenceArrayImpl<bool>(PropertyType.BooleanArray, (bool[])obj); 403return new CLRIReferenceArrayImpl<Guid>(PropertyType.GuidArray, (Guid[])obj); 405return new CLRIReferenceArrayImpl<DateTimeOffset>(PropertyType.DateTimeArray, (DateTimeOffset[])obj); 407return new CLRIReferenceArrayImpl<TimeSpan>(PropertyType.TimeSpanArray, (TimeSpan[])obj); 410return new CLRIReferenceArrayImpl<Type>(PropertyType.OtherArray, (Type[])obj); 413PropertyType? propType = null; 416propType = PropertyType.PointArray; 420propType = PropertyType.RectArray; 424propType = PropertyType.SizeArray; 442propType = PropertyType.OtherArray; 447propType = PropertyType.OtherArray; 460return new CLRIReferenceArrayImpl<Object>(PropertyType.InspectableArray, (Object[])obj);
system\runtime\interopservices\windowsruntime\ipropertyvalue.cs (1)
21PropertyType Type