System.Runtime.Serialization.Formatters.Binary.ObjectReader.RegisterObject C# (CSharp) Method

RegisterObject() private method

private RegisterObject ( object obj, ParseRecord pr, ParseRecord objectPr, bool bIsString ) : void
obj object
pr ParseRecord
objectPr ParseRecord
bIsString bool
return void
        private void RegisterObject(object obj, ParseRecord pr, ParseRecord objectPr, bool bIsString)
        {
            if (!pr._isRegistered)
            {
                pr._isRegistered = true;

                SerializationInfo si = null;
                long parentId = 0;
                MemberInfo memberInfo = null;
                int[] indexMap = null;

                if (objectPr != null)
                {
                    indexMap = objectPr._indexMap;
                    parentId = objectPr._objectId;

                    if (objectPr._objectInfo != null)
                    {
                        if (!objectPr._objectInfo._isSi)
                        {
                            // ParentId is only used if there is a memberInfo
                            memberInfo = objectPr._objectInfo.GetMemberInfo(pr._name);
                        }
                    }
                }
                // SerializationInfo is always needed for ISerialization                        
                si = pr._si;

                if (bIsString)
                {
                    _objectManager.RegisterString((string)obj, pr._objectId, si, parentId, memberInfo);
                }
                else
                {
                    _objectManager.RegisterObject(obj, pr._objectId, si, parentId, memberInfo, indexMap);
                }
            }
        }

Same methods

ObjectReader::RegisterObject ( object obj, ParseRecord pr, ParseRecord objectPr ) : void