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