internal PocoElementNode(Base root, string rootName = null)
        {
            Current      = root;
            _mySD        = (PocoComplexTypeSerializationInfo)PocoStructureDefinitionSummaryProvider.Provide(Current.GetType());
            InstanceType = InstanceType = ModelInfo.IsProfiledQuantity(root.TypeName) ? "Quantity" : root.TypeName;
            Definition   = Specification.ElementDefinitionSummary.ForRoot(_mySD, rootName ?? root.TypeName);

            Location  = InstanceType;
            ShortPath = InstanceType;
        }
        private PocoElementNode(Base instance, PocoElementNode parent, IElementDefinitionSummary definition, string location, string shortPath)
        {
            Current      = instance;
            _mySD        = (PocoComplexTypeSerializationInfo)PocoStructureDefinitionSummaryProvider.Provide(Current.GetType());
            InstanceType = determineInstanceType(Current, definition);
            Definition   = definition ?? throw Error.ArgumentNull(nameof(definition));

            ExceptionHandler = parent.ExceptionHandler;
            Location         = location;
            ShortPath        = shortPath;
        }
        internal PocoElementNode(Base parent, PocoStructureDefinitionSummaryProvider provider, string rootName = null)
        {
            Current      = parent;
            InstanceType = parent.TypeName;
            var typeInfo = provider.Provide(parent.GetType());

            Definition = Specification.ElementDefinitionSummary.ForRoot(rootName ?? parent.TypeName, typeInfo);
            Location   = InstanceType;
            ShortPath  = InstanceType;
            ArrayIndex = 0;
            Provider   = provider;
        }