3 writes to _reflector
System.Xaml (3)
System\Xaml\XamlType.cs (3)
54
_reflector
= TypeReflector.UnknownReflector;
71
_reflector
= reflector ?? new TypeReflector(underlyingType);
1394
Interlocked.CompareExchange(ref
_reflector
, reflector, null);
125 references to _reflector
System.Xaml (125)
System\Xaml\XamlType.cs (125)
76
_reflector
.Invoker = invoker;
84
if (!
_reflector
.BaseTypeIsSet)
86
_reflector
.BaseType = LookupBaseType();
88
return
_reflector
.BaseType;
97
if (
_reflector
.Invoker is null)
99
_reflector
.Invoker = LookupInvoker() ?? XamlTypeInvoker.UnknownInvoker;
101
return
_reflector
.Invoker;
122
return
_reflector
.IsUnknown;
196
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by IsDictionary");
197
if (
_reflector
.KeyType is null)
199
_reflector
.KeyType = LookupKeyType() ?? XamlLanguage.Object;
201
return
_reflector
.KeyType;
213
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by GetCollectionKind");
214
if (
_reflector
.ItemType is null)
216
_reflector
.ItemType = LookupItemType() ?? XamlLanguage.Object;
218
return
_reflector
.ItemType;
232
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by GetCollectionKind");
233
if (
_reflector
.AllowedContentTypes is null)
235
_reflector
.AllowedContentTypes = LookupAllowedContentTypes() ??
238
return
_reflector
.AllowedContentTypes;
250
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by IsCollection");
251
if (
_reflector
.ContentWrappers is null)
253
_reflector
.ContentWrappers = LookupContentWrappers() ??
256
return
_reflector
.ContentWrappers;
265
if (!
_reflector
.TypeConverterIsSet)
267
_reflector
.TypeConverter = LookupTypeConverter();
269
return
_reflector
.TypeConverter;
278
if (!
_reflector
.ValueSerializerIsSet)
280
_reflector
.ValueSerializer = LookupValueSerializer();
282
return
_reflector
.ValueSerializer;
291
if (!
_reflector
.ContentPropertyIsSet)
293
_reflector
.ContentProperty = LookupContentProperty();
295
return
_reflector
.ContentProperty;
304
if (!
_reflector
.DeferringLoaderIsSet)
306
_reflector
.DeferringLoader = LookupDeferringLoader();
308
return
_reflector
.DeferringLoader;
320
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by IsMarkupExtension");
321
if (
_reflector
.MarkupExtensionReturnType is null)
323
_reflector
.MarkupExtensionReturnType = LookupMarkupExtensionReturnType() ?? XamlLanguage.Object;
325
return
_reflector
.MarkupExtensionReturnType;
335
if (!
_reflector
.Members.TryGetValue(name, out result) && !
_reflector
.Members.IsComplete)
338
result =
_reflector
.Members.TryAdd(name, result);
346
if (!
_reflector
.Members.IsComplete)
353
_reflector
.Members.TryAdd(member.Name, member);
356
_reflector
.Members.IsComplete = true;
360
return
_reflector
.Members.Values;
369
if (!
_reflector
.TryGetAliasedProperty(directive, out result))
372
_reflector
.TryAddAliasedProperty(directive, result);
381
if (!
_reflector
.AttachableMembers.TryGetValue(name, out result) &&
382
!
_reflector
.AttachableMembers.IsComplete)
385
result =
_reflector
.AttachableMembers.TryAdd(name, result);
393
if (!
_reflector
.AttachableMembers.IsComplete)
400
_reflector
.AttachableMembers.TryAdd(member.Name, member);
403
_reflector
.AttachableMembers.IsComplete = true;
405
return
_reflector
.AttachableMembers.Values;
446
if (!
_reflector
.TryGetPositionalParameters(parameterCount, out result))
449
result =
_reflector
.TryAddPositionalParameters(parameterCount, result);
495
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by ItemType");
496
if (!
_reflector
.IsReadOnlyMethodIsSet)
500
_reflector
.IsReadOnlyMethod = CollectionReflector.
505
_reflector
.IsReadOnlyMethod = null;
508
return
_reflector
.IsReadOnlyMethod;
516
if (!
_reflector
.XamlSetMarkupExtensionHandlerIsSet)
518
_reflector
.XamlSetMarkupExtensionHandler = LookupSetMarkupExtensionHandler();
520
return
_reflector
.XamlSetMarkupExtensionHandler;
529
if (!
_reflector
.XamlSetTypeConverterHandlerIsSet)
531
_reflector
.XamlSetTypeConverterHandler = LookupSetTypeConverterHandler();
533
return
_reflector
.XamlSetTypeConverterHandler;
546
if (!
_reflector
.AddMethodIsSet)
549
_reflector
.AddMethod = CollectionReflector.LookupAddMethod(UnderlyingType, collectionKind);
551
return
_reflector
.AddMethod;
563
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by GetCollectionKind");
564
if (!
_reflector
.GetEnumeratorMethodIsSet)
566
_reflector
.GetEnumeratorMethod = CollectionReflector.GetEnumeratorMethod(UnderlyingType);
568
return
_reflector
.GetEnumeratorMethod;
599
if (
_reflector
.ExcludedReadOnlyMembers is null)
601
_reflector
.ExcludedReadOnlyMembers = LookupAllExcludedReadOnlyMembers() ?? EmptyList<XamlMember>.Value;
603
return
_reflector
.ExcludedReadOnlyMembers;
728
_reflector
.AddMethod = addMethod;
772
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
773
List<Type> wrapperTypes =
_reflector
.GetAllAttributeContents<Type>(typeof(ContentWrapperAttribute));
809
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
810
Type[] loaderTypes =
_reflector
.GetAttributeTypes(typeof(XamlDeferLoadAttribute), 2);
883
if (
_reflector
is not null)
885
return
_reflector
.IsUnknown;
894
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
895
if (
_reflector
.IsAttributePresent(typeof(WhitespaceSignificantCollectionAttribute)))
906
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
907
return
_reflector
.GetFlag(BoolTypeBits.WhitespaceSignificantCollection).Value;
964
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
965
Type returnType =
_reflector
.GetAttributeType(typeof(MarkupExtensionReturnTypeAttribute));
986
return
_reflector
.LookupAllAttachableMembers(SchemaContext);
1000
_reflector
.LookupAllMembers(out properties, out events, out result);
1038
PropertyInfo pi =
_reflector
.LookupProperty(name);
1049
EventInfo ei =
_reflector
.LookupEvent(name);
1066
if (
_reflector
.LookupAttachableProperty(name, out getter, out setter))
1075
setter =
_reflector
.LookupAttachableEvent(name);
1095
if (
_reflector
.ReflectedPositionalParameters is null)
1097
_reflector
.ReflectedPositionalParameters = LookupAllPositionalParameters();
1100
_reflector
.ReflectedPositionalParameters.TryGetValue(parameterCount, out result);
1128
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1129
if (
_reflector
.IsAttributePresent(typeof(AmbientAttribute)))
1140
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1141
return
_reflector
.GetFlag(BoolTypeBits.Ambient).Value;
1150
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1151
Type converterType =
_reflector
.GetAttributeType(typeof(TypeConverterAttribute));
1194
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1195
Type converterType =
_reflector
.GetAttributeType(typeof(ValueSerializerAttribute));
1236
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1237
if (
_reflector
.IsAttributePresent(typeof(TrimSurroundingWhitespaceAttribute)))
1253
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1254
bool? usable =
_reflector
.GetAttributeValue<bool>(typeof(UsableDuringInitializationAttribute));
1322
if (!
_reflector
.CustomAttributeProviderIsSet)
1324
_reflector
.CustomAttributeProvider = LookupCustomAttributeProvider();
1327
return
_reflector
.CustomAttributeProvider is not null || UnderlyingTypeInternal.Value is not null;
1400
if (
_reflector
is null)
1409
if (!
_reflector
.CollectionKindIsSet)
1411
_reflector
.CollectionKind = LookupCollectionKind();
1413
return
_reflector
.CollectionKind;
1419
bool? result =
_reflector
.GetFlag(flagBit);
1423
_reflector
.SetFlag(flagBit, result.Value);
1542
IList<PropertyInfo> excludedMembers =
_reflector
.LookupRemainingProperties();
1688
Debug.Assert(
_reflector
is not null, "_reflector should have been initialized by AreAttributesAvailable");
1692
result =
_reflector
.GetAttributeString(attributeType, out checkedInherited);