Exemple #1
0
        internal object HeapDeresolve(XElement serialized, IResolver resolver)
        {
            object instance;
            Guid   finalGuid;

            if (XMLUtility.GUIDAttributeConatins(serialized))
            {
                finalGuid = new Guid(XMLUtility.GuidOfAttributeInternal(serialized));
                instance  = resolver.GetTemplateInstance(serialized);
                if (instance != null)
                {
                    HeapManager.Managed.Add(finalGuid, instance);
                }
                DeresolveInternal(serialized, ref instance, resolver);
            }
            else
            {
                finalGuid = new Guid(XMLUtility.GuidOfValueInternal(serialized));
                instance  = HeapManager.Managed.ValueOf(finalGuid);
                if (instance == null)
                {
                    instance = AutoDeresolve(HeapManager.Serialized.ValueOf(finalGuid));;
                }
            }

            return(instance);
        }