2 writes to _cache
System.Runtime.Serialization.Formatters (2)
System\Runtime\Serialization\Formatters\Binary\BinaryObjectInfo.cs (2)
484
_cache
= new SerObjectInfoCache(_objectType!);
489
_cache
= new SerObjectInfoCache(_objectType!);
45 references to _cache
System.Runtime.Serialization.Formatters (45)
System\Runtime\Serialization\Formatters\Binary\BinaryObjectInfo.cs (45)
490
_cache
._memberInfos = FormatterServices.GetSerializableMembers(_objectType!, _context);
491
_count =
_cache
._memberInfos.Length;
492
_cache
._memberNames = new string[_count];
493
_cache
._memberTypes = new Type[_count];
498
_cache
._memberNames[i] =
_cache
._memberInfos[i].Name;
499
_cache
._memberTypes[i] = GetMemberType(
_cache
._memberInfos[i]);
508
if (
_cache
== null)
518
if (
_cache
._memberInfos == null)
524
return position != -1 ?
_cache
._memberInfos[position] : null;
536
Type type = _isTyped ?
_cache
!._memberTypes![position] : _memberTypesList![position];
577
if (memberData == null &&
_cache
!= null)
579
Debug.Assert(
_cache
._memberNames != null);
580
memberData = new object[
_cache
._memberNames.Length];
607
Debug.Assert(
_cache
!= null &&
_cache
._memberInfos != null);
608
_objectManager.RecordFixup(objectId,
_cache
._memberInfos[position], idRef);
618
Debug.Assert(
_cache
!= null &&
_cache
._memberInfos != null);
619
FormatterServices.PopulateObjectMembers(obj,
_cache
._memberInfos, memberData);
626
if (
_cache
== null)
631
Debug.Assert(
_cache
._memberNames != null);
632
if (
_cache
._memberNames.Length > 0 &&
_cache
._memberNames[_lastPosition].Equals(name))
636
else if ((++_lastPosition <
_cache
._memberNames.Length) && (
_cache
._memberNames[_lastPosition].Equals(name)))
643
for (int i = 0; i <
_cache
._memberNames.Length; i++)
645
if (
_cache
._memberNames[i].Equals(name))
665
if (
_cache
== null)
670
Debug.Assert(
_cache
._memberInfos != null);
671
if (
_cache
._memberTypes == null)
673
_cache
._memberTypes = new Type[_count];
676
_cache
._memberTypes[i] = GetMemberType(
_cache
._memberInfos[i]);
681
if (inMemberNames.Length <
_cache
._memberInfos.Length)
686
Type[] outMemberTypes = new Type[
_cache
._memberInfos.Length];
688
for (int i = 0; i <
_cache
._memberInfos.Length; i++)
690
if (!memberMissing && inMemberNames[i].Equals(
_cache
._memberInfos[i].Name))
692
outMemberTypes[i] =
_cache
._memberTypes[i];
700
if (
_cache
._memberInfos[i].Name.Equals(inMemberNames[j]))
702
outMemberTypes[i] =
_cache
._memberTypes[i];
712
_cache
._memberInfos[i].GetCustomAttribute<OptionalFieldAttribute>(inherit: false) == null)
714
Debug.Assert(
_cache
._memberNames != null);
715
throw new SerializationException(SR.Format(SR.Serialization_MissingMember,
_cache
._memberNames[i], objectType, typeof(OptionalFieldAttribute).FullName));