public static InstanceExportDetailsUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new InstanceExportDetailsUnmarshaller();
            }

            return(instance);
        }
Beispiel #2
0
        public ExportTask Unmarshall(XmlUnmarshallerContext context)
        {
            ExportTask exportTask    = new ExportTask();
            int        originalDepth = context.CurrentDepth;
            int        targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 1;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("exportTaskId", targetDepth))
                    {
                        exportTask.ExportTaskId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("description", targetDepth))
                    {
                        exportTask.Description = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("state", targetDepth))
                    {
                        exportTask.State = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("statusMessage", targetDepth))
                    {
                        exportTask.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("instanceExport", targetDepth))
                    {
                        exportTask.InstanceExportDetails = InstanceExportDetailsUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("exportToS3", targetDepth))
                    {
                        exportTask.ExportToS3Task = ExportToS3TaskUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(exportTask);
                }
            }



            return(exportTask);
        }