BeginSerializeObject(
            Object serializedObject
            )
        {
            DocumentPaginator paginator = (DocumentPaginator)serializedObject;

            NgcSerializationManager.StartDocument(paginator, true);

            NGCSerializerContext context = new NGCSerializerContext(this,
                                                                    null,
                                                                    SerializerAction.endPersistObjectData);

            NgcSerializationManager.OperationStack.Push(context);



            if (paginator != null)
            {
                NGCDocumentPaginatorSerializerContext
                    paginatorContext = new NGCDocumentPaginatorSerializerContext(this,
                                                                                 paginator,
                                                                                 0,
                                                                                 SerializerAction.serializeNextDocumentPage);

                NgcSerializationManager.OperationStack.Push(paginatorContext);
            }
        }
        SerializeNextDocumentPage(
            NGCSerializerContext context
            )
        {
            NGCDocumentPaginatorSerializerContext paginatorContext = context as NGCDocumentPaginatorSerializerContext;

            if (paginatorContext != null)
            {
                DocumentPaginator paginator = paginatorContext.Paginator;
                int index = paginatorContext.Index;

                if (!paginator.IsPageCountValid ||
                    (index < paginator.PageCount))
                {
                    index++;


                    NGCDocumentPaginatorSerializerContext
                        nextContext = new NGCDocumentPaginatorSerializerContext(this,
                                                                                paginator,
                                                                                index,
                                                                                SerializerAction.serializeNextDocumentPage);


                    NgcSerializationManager.OperationStack.Push(nextContext);

                    DocumentPage page = Toolbox.GetPage(paginator, index - 1);

                    ReachSerializer serializer = SerializationManager.GetSerializer(page);

                    if (serializer != null)
                    {
                        serializer.SerializeObject(page);
                    }
                }
            }
            else
            {
            }
        }