public override bool CanRead(System.Xml.XmlReader reader)
        {
            if (reader == null)
                throw new ArgumentNullException("reader");

            return reader.IsStartElement("RDF", this.RdfNamespaceUri);
        }
        /// <summary>
        /// Lê comando.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadCommand(System.Xml.XmlReader p_reader)
        {
            System.Xml.XmlReader v_item;

            this.v_cmd = new Spartacus.Database.Command();

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "sql":
                            this.v_cmd.v_text = p_reader.ReadString();
                            break;
                        case "parameter":
                            v_item = p_reader.ReadSubtree();
                            this.ReadParameter(v_item);
                            v_item.Close();
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        public bool FromXml(ref System.Xml.XmlReader xr)
        {
            bool results = false;

            try
            {
                while (xr.Read())
                {
                    if (xr.IsStartElement())
                    {
                        if (!xr.IsEmptyElement)
                        {
                            switch (xr.Name)
                            {
                                case "Bvin":
                                    xr.Read();
                                    Bvin = xr.ReadString();
                                    break;
                                case "ControlName":
                                    xr.Read();
                                    ControlName = xr.ReadString();
                                    break;
                                case "SortOrder":
                                    xr.Read();
                                    SortOrder = int.Parse(xr.ReadString());
                                    break;
                                case "ColumnId":
                                    xr.Read();
                                    ColumnId = xr.ReadString();
                                    break;
                                case "SerializedSettings":
                                    xr.Read();
                                    string json = xr.ReadString();
                                    this.BaseSettings = MerchantTribe.Web.Json.ObjectFromJson<ContentBlockSettings>(json);
                                    break;
                                case "Lists":
                                    xr.Read();
                                    string jsonlist = xr.ReadString();
                                    this.Lists = MerchantTribe.Web.Json.ObjectFromJson<ContentBlockSettingList>(jsonlist);
                                    break;
                            }
                        }
                    }
                }

                results = true;
            }

            catch (XmlException XmlEx)
            {
                EventLog.LogEvent(XmlEx);
                results = false;
            }

            return results;

        }
Exemple #4
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();

            while (reader.IsStartElement())
            {
                reader.Read();
            }

            reader.Read();
        }
        public void ReadXml(System.Xml.XmlReader reader)
        {
            while (!reader.IsStartElement("BlockCache") && !reader.EOF)
                reader.Read();

            if (reader.EOF)
                return;

            if (reader.IsEmptyElement && reader.Name == "BlockCache")
            {
                reader.ReadStartElement("BlockCache");
                BlockCache = new SerializableDictionary<IPAddr, BlockedIP>();
            }
            else
            {
                reader.ReadStartElement("BlockCache");
                BlockCache = (SerializableDictionary<IPAddr, BlockedIP>)new XmlSerializer(typeof(SerializableDictionary<IPAddr, BlockedIP>)).Deserialize(reader);
                reader.ReadEndElement();
            }

            while (!reader.IsStartElement("dos_threshold") && !reader.EOF)
                reader.Read();

            if (reader.EOF)
                return;

            reader.ReadStartElement("dos_threshold");
            dos_threshold = (int)new XmlSerializer(typeof(int)).Deserialize(reader);
            reader.ReadEndElement();

            while (!reader.IsStartElement("Save") && !reader.EOF)
                reader.Read();

            if (reader.EOF)
                return;

            reader.ReadStartElement("Save");
            Save = (bool)new XmlSerializer(typeof(bool)).Deserialize(reader);
            reader.ReadEndElement();
        }
 private void HandleEponymousNode(System.Xml.XmlReader reader)
 {
     if (reader.IsStartElement() && !reader.IsEmptyElement)
     {
         HandleStartNode(reader);
     }
     else
     {
         AddCompletedObject(m_dataObject);
         IsFinished = true;
         m_dataObject = null;
     }
 }
Exemple #7
0
        public override void UnpersistBag(IParamBag target, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of elements which contain actual param values
            IExtractKthCoreParamBag bag = (IExtractKthCoreParamBag)target;

            if (reader.Name == "K")
            {
                bag.K = UnpersistK(reader);
            }

            if (reader.IsStartElement() && !reader.IsEmptyElement)
            {
                reader.Read();
            }
        }
        public override void HandleNode(System.Xml.XmlReader reader)
        {
            if (reader.LocalName == "majorFont" ||
                reader.LocalName == "minorFont")
            {
                HandleEponymousNode(reader);
                return;
            }
            if (string.IsNullOrEmpty(reader.LocalName) || !reader.IsStartElement())
            {
                return;
            }

            HandleNamedNode(reader);
        }
        public override void HandleNode(System.Xml.XmlReader reader)
        {
            if (reader.IsEmptyElement)
            {
                return;
            }

            if (!Context.IsWordMLPrefix(reader.Prefix))
                return;

            if (reader.IsStartElement())
            {
                HandleStartNode(reader);
                return;
            }
            return;
        }
Exemple #10
0
        public virtual void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();

            while (reader.IsStartElement())
            {
                if (reader.Name == "Name")
                {
                    Name = reader.ReadElementContentAsString();
                }
                else
                {
                    reader.Read();
                }
            }

            reader.ReadEndElement();
        }
Exemple #11
0
        public override void UnpersistBag(IParamBag target, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of elements which contain actual param values
            IExportNetworkParamBag bag = (IExportNetworkParamBag)target;

            bool loopAgain = false;
            int ctr = 0;
            do
            {
                if (reader.Name == bag.FileName_ParamName)
                {
                    bag.FileName = UnpersistFileName(reader);
                    ctr++;
                    loopAgain = true;
                }
                else if (reader.Name == bag.ExportNodeAttributes_ParamName)
                {
                    bag.ExportNodeAttributes = UnpersistExportNodeAttributes(reader);
                    ctr++;
                    loopAgain = true;
                }
                else if (reader.Name == bag.ExportEdgeAttributes_ParamName)
                {
                    bag.ExportEdgeAttributes = UnpersistExportEdgeAttributes(reader);
                    ctr++;
                    loopAgain = true;
                }
                else if (reader.Name == bag.FileType_ParamName)
                {
                    bag.FileType = UnpersistFileType(reader);
                    ctr++;
                    loopAgain = true;
                }
                else
                    loopAgain = false;
            } while (loopAgain && (ctr < (bag.Count + 1)));  // get out after each

            if (reader.IsStartElement() && !reader.IsEmptyElement)
            {
                reader.Read();
            }
        }
Exemple #12
0
        public void UnpersistMgr(IParamMgr target, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of element "ParamMgr"
            if (reader.Name == "ParamMgr" && !reader.IsEmptyElement)
            {
                reader.ReadStartElement("ParamMgr");

                IExportNetworkParamMgr mgr = (IExportNetworkParamMgr)target;

                using (ExportNetworkParamBagUnpersister unpersiter = new ExportNetworkParamBagUnpersister())
                {
                    unpersiter.UnpersistBag(mgr.Bag, reader);
                }

                if (reader.IsStartElement() && !reader.IsEmptyElement)
                {
                    reader.Read();
                }
            }
        }
Exemple #13
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();

            while (reader.IsStartElement())
            {
                if (reader.Name == "Name")
                {
                    Name = reader.ReadElementContentAsString();
                }
                else if (reader.Name == "RealPath")
                {
                    RealPath = reader.ReadElementContentAsString();
                }
                else
                {
                    reader.Read();
                }
            }

            reader.ReadEndElement();
        }
Exemple #14
0
        public void Read(out string id, out Domain domain, out string attribName, out Type attribType, out object defaultVal, System.Xml.XmlReader reader)
        {
            id = null;
            domain = Domain.all;
            attribName = null;
            attribType = null;
            defaultVal = null;

            reader.MoveToAttribute("id");
            id = reader["id"];

            reader.MoveToAttribute("for");
            domain = (Domain)Enum.Parse(typeof(Domain), reader["for"]);

            reader.MoveToAttribute("attr.name");
            attribName = reader["attr.name"];

            reader.MoveToAttribute("attr.type");
            attribType = GraphMLConvert.ToType(reader["attr.type"]);

            reader.MoveToElement();

            // if there is a default value element, read it and convet
            if (reader.ReadToDescendant("default"))
            {
                string defaultValStr = null;
                ReadDefault(out defaultValStr, reader);
                defaultVal = ConvertDefaultValStr(defaultValStr, attribType);
                if (!reader.IsStartElement() && reader.Name=="default")
                        reader.Read();  // read the end tag element of default
            }
            else
            {
                // default value is system default
                defaultVal = GetDefault( attribType);
            }
        }
Exemple #15
0
        /// <summary>
        /// Deserialize from XML
        /// </summary>
        /// <param name="reader">   XML reader</param>
        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader)
        {
            ChessBoard.MovePosS movePos;
            bool                bIsEmpty;

            m_listMovePos.Clear();
            if (reader.MoveToContent() != XmlNodeType.Element || reader.LocalName != "MoveList") {
                throw new SerializationException("Unknown format");
            } else {
                bIsEmpty     = reader.IsEmptyElement;
                m_iPosInList = Int32.Parse(reader.GetAttribute("PositionInList"));
                if (bIsEmpty) {
                    reader.Read();
                } else {
                    if (reader.ReadToDescendant("Move")) {
                        while (reader.IsStartElement()) {
                            movePos = new ChessBoard.MovePosS();
                            movePos.OriginalPiece   = (ChessBoard.PieceE)Enum.Parse(typeof(ChessBoard.SerPieceE), reader.GetAttribute("OriginalPiece"));
                            movePos.StartPos        = (byte)Int32.Parse(reader.GetAttribute("StartingPosition"));
                            movePos.EndPos          = (byte)Int32.Parse(reader.GetAttribute("EndingPosition"));
                            movePos.Type            = (ChessBoard.MoveTypeE)Enum.Parse(typeof(ChessBoard.MoveTypeE), reader.GetAttribute("MoveType"));
                            m_listMovePos.Add(movePos);
                            reader.ReadStartElement("Move");
                        }
                    }
                    reader.ReadEndElement();
                }
            }
        }
 public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) {
     return xmlReader.IsStartElement(@"IOSLaunchOptionsSecure", @"");
 }
 public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) {
     return xmlReader.IsStartElement(@"TcpLaunchOptions", @"http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014");
 }
 public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) {
     return xmlReader.IsStartElement(@"Command", @"");
 }
 public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) {
     return xmlReader.IsStartElement(@"BaseLaunchOptionsLaunchCompleteCommand", @"");
 }
        /// <summary>
        /// Lê informações sobre as configurações do relatório.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadSettings(System.Xml.XmlReader p_reader)
        {
            this.v_settings = new Spartacus.Reporting.Settings();
            System.Xml.XmlReader v_item;

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "layout":
                            if (p_reader.ReadString() == "PORTRAIT")
                                this.v_settings.v_layout = Spartacus.Reporting.PageLayout.PORTRAIT;
                            else
                                this.v_settings.v_layout = Spartacus.Reporting.PageLayout.LANDSCAPE;
                            break;
                        case "topmargin":
                            this.v_settings.SetMargin(Spartacus.Reporting.PageMargin.TOP, p_reader.ReadString());
                            break;
                        case "bottommargin":
                            this.v_settings.SetMargin(Spartacus.Reporting.PageMargin.BOTTOM, p_reader.ReadString());
                            break;
                        case "leftmargin":
                            this.v_settings.SetMargin(Spartacus.Reporting.PageMargin.LEFT, p_reader.ReadString());
                            break;
                        case "rightmargin":
                            this.v_settings.SetMargin(Spartacus.Reporting.PageMargin.RIGHT, p_reader.ReadString());
                            break;
                        case "dataheaderborder":
                            this.v_settings.v_dataheaderborder = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "datafieldborder":
                            this.v_settings.v_datafieldborder = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "groupheaderborder":
                            this.v_settings.v_groupheaderborder = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "groupfooterborder":
                            this.v_settings.v_groupfooterborder = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "reportheaderborder":
                            this.v_settings.v_reportheaderborder = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "reportfooterborder":
                            this.v_settings.v_reportfooterborder = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "dataheadercolor":
                            this.v_settings.v_dataheadercolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "datafieldevencolor":
                            this.v_settings.v_datafieldevencolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "datafieldoddcolor":
                            this.v_settings.v_datafieldoddcolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "groupheaderevencolor":
                            this.v_settings.v_groupheaderevencolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "groupheaderoddcolor":
                            this.v_settings.v_groupheaderoddcolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "groupfooterevencolor":
                            this.v_settings.v_groupfooterevencolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "groupfooteroddcolor":
                            this.v_settings.v_groupfooteroddcolor = this.v_settings.GetColor(p_reader.ReadString());
                            break;
                        case "reportheaderfont":
                            this.v_settings.v_reportheaderfont = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(this.v_settings.v_reportheaderfont, v_item);
                            v_item.Close();
                            break;
                        case "reportfooterfont":
                            this.v_settings.v_reportfooterfont = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(this.v_settings.v_reportfooterfont, v_item);
                            v_item.Close();
                            break;
                        case "dataheaderfont":
                            this.v_settings.v_dataheaderfont = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(this.v_settings.v_dataheaderfont, v_item);
                            v_item.Close();
                            break;
                        case "datafieldfont":
                            this.v_settings.v_datafieldfont = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(this.v_settings.v_datafieldfont, v_item);
                            v_item.Close();
                            break;
                        case "groupheaderfont":
                            this.v_settings.v_groupheaderfont = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(this.v_settings.v_groupheaderfont, v_item);
                            v_item.Close();
                            break;
                        case "groupfooterfont":
                            this.v_settings.v_groupfooterfont = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(this.v_settings.v_groupfooterfont, v_item);
                            v_item.Close();
                            break;
                        case "showdataheader":
                            if (p_reader.ReadString() == "TRUE")
                                this.v_settings.v_showdataheader = true;
                            else
                                this.v_settings.v_showdataheader = false;
                            break;
                        default:
                            break;
                    }
                }
            }
        }
 public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) {
     return xmlReader.IsStartElement(@"TargetArchitecture", @"");
 }
        /// <summary>
        /// Lê parâmetro.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadParameter(System.Xml.XmlReader p_reader)
        {
            string v_name = null;
            Spartacus.Database.Type v_type = Spartacus.Database.Type.STRING;
            Spartacus.Database.Locale v_locale = Spartacus.Database.Locale.EUROPEAN;
            string v_dateformat = null;
            string v_description = null;
            string v_lookup = null;

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "name":
                            v_name = p_reader.ReadString();
                            break;
                        case "type":
                            switch(p_reader.ReadString())
                            {
                                case "INTEGER":
                                    v_type = Spartacus.Database.Type.INTEGER;
                                    break;
                                case "REAL":
                                    v_type = Spartacus.Database.Type.REAL;
                                    break;
                                case "BOOLEAN":
                                    v_type = Spartacus.Database.Type.BOOLEAN;
                                    break;
                                case "CHAR":
                                    v_type = Spartacus.Database.Type.CHAR;
                                    break;
                                case "DATE":
                                    v_type = Spartacus.Database.Type.DATE;
                                    break;
                                case "STRING":
                                    v_type = Spartacus.Database.Type.STRING;
                                    break;
                                case "QUOTEDSTRING":
                                    v_type = Spartacus.Database.Type.QUOTEDSTRING;
                                    break;
                                case "UNDEFINED":
                                    v_type = Spartacus.Database.Type.UNDEFINED;
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "locale":
                            switch(p_reader.ReadString())
                            {
                                case "EUROPEAN":
                                    v_locale = Spartacus.Database.Locale.EUROPEAN;
                                    break;
                                case "AMERICAN":
                                    v_locale = Spartacus.Database.Locale.AMERICAN;
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "dateformat":
                            v_dateformat = p_reader.ReadString();
                            break;
                        case "description":
                            v_description = p_reader.ReadString();
                            break;
                        case "lookup":
                            v_lookup = p_reader.ReadString();
                            break;
                        default:
                            break;
                    }
                }
            }

            this.v_cmd.AddParameter(v_name, v_type);
            if (v_type == Spartacus.Database.Type.REAL)
                this.v_cmd.SetLocale(v_name, v_locale);
            else
                if (v_type == Spartacus.Database.Type.DATE)
                    this.v_cmd.SetDateFormat(v_name, v_dateformat);
            this.v_cmd.SetDescription(v_name, v_description);
            this.v_cmd.SetLookup(v_name, v_lookup);
        }
        /// <summary>
        /// Lê informações sobre a conexão.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadConnection(System.Xml.XmlReader p_reader)
        {
            string v_type = null;
            string v_provider = null;
            string v_host = null;
            string v_port = null;
            string v_service = null;
            string v_user = null;
            string v_password = null;

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "type":
                            v_type = p_reader.ReadString();
                            break;
                        case "provider":
                            v_provider = p_reader.ReadString();
                            break;
                        case "host":
                            v_host = p_reader.ReadString();
                            break;
                        case "port":
                            v_port = p_reader.ReadString();
                            break;
                        case "service":
                            v_service = p_reader.ReadString();
                            break;
                        case "user":
                            v_user = p_reader.ReadString();
                            break;
                        case "password":
                            v_password = p_reader.ReadString();
                            break;
                        default:
                            break;
                    }
                }
            }

            switch (v_type.ToLower())
            {
                case "firebird":
                    this.v_database = new Spartacus.Database.Firebird(v_host, v_port, v_service, v_user, v_password);
                    break;
                case "firebirdembed":
                    this.v_database = new Spartacus.Database.FirebirdEmbed(v_service, v_user, v_password);
                    break;
                case "mysql":
                    this.v_database = new Spartacus.Database.Mysql(v_host, v_port, v_service, v_user, v_password);
                    break;
                case "odbc":
                    this.v_database = new Spartacus.Database.Odbc(v_service, v_user, v_password);
                    break;
                case "oledb":
                    this.v_database = new Spartacus.Database.Oledb(v_provider, v_host, v_port, v_service, v_user, v_password);
                    break;
                case "postgresql":
                    this.v_database = new Spartacus.Database.Postgresql(v_host, v_port, v_service, v_user, v_password);
                    break;
                case "sqlite":
                    this.v_database = new Spartacus.Database.Sqlite(v_service);
                    break;
                case "oracle":
                    this.v_database = new Spartacus.Database.Oracle(v_host, v_port, v_service, v_user, v_password);
                    break;
                case "memory":
                    this.v_database = new Spartacus.Database.Memory();
                    break;
                default:
                    this.v_database = null;
                    break;
            }
        }
        /// <summary>
        /// Lê um único campo de um cabeçalho de grupo.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        /// <param name="p_group">Grupo do relatório.</param>
        private void ReadGroupHeaderField(System.Xml.XmlReader p_reader, Spartacus.Reporting.Group p_group)
        {
            Spartacus.Reporting.Field v_field;
            System.Xml.XmlReader v_item;

            v_field = new Spartacus.Reporting.Field();

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "title":
                            v_field.v_title = p_reader.ReadString();
                            break;
                        case "column":
                            v_field.v_column = p_reader.ReadString();
                            break;
                        case "align":
                            switch (p_reader.ReadString())
                            {
                                case "LEFT":
                                    v_field.v_align = Spartacus.Reporting.FieldAlignment.LEFT;
                                    break;
                                case "RIGHT":
                                    v_field.v_align = Spartacus.Reporting.FieldAlignment.RIGHT;
                                    break;
                                case "CENTER":
                                    v_field.v_align = Spartacus.Reporting.FieldAlignment.CENTER;
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "fill":
                            v_field.v_fill = double.Parse(p_reader.ReadString());
                            break;
                        case "type":
                            v_field.SetType(p_reader.ReadString());
                            break;
                        case "groupedvalue":
                            if (p_reader.ReadString() == "FALSE")
                                v_field.v_groupedvalue = false;
                            else
                                v_field.v_groupedvalue = true;
                            break;
                        case "row":
                            v_field.v_row = System.Convert.ToInt32(p_reader.ReadString());
                            break;
                        case "format":
                            v_field.v_format = p_reader.ReadString();
                            break;
                        case "border":
                            v_field.v_border = new Spartacus.Reporting.Border(p_reader.ReadString());
                            break;
                        case "blank":
                            v_field.v_blank = p_reader.ReadString();
                            break;
                        case "font":
                            v_field.v_font = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(v_field.v_font, v_item);
                            v_item.Close();
                            break;
                        default:
                            break;
                    }
                }
            }

            if ((v_field.v_row + 1) > p_group.v_numrowsheader)
                p_group.v_numrowsheader = v_field.v_row + 1;

            p_group.v_headerfields.Add(v_field);
        }
 /// <summary>
 /// Generates an object from its XML representation.
 /// </summary>
 /// <param name="reader">The <see cref="XmlReader" /> stream from which the object is deserialized.</param>
 public void ReadXml(System.Xml.XmlReader reader)
 {
   while (reader.Read())
   {
     if (reader.IsStartElement())
     {
       switch (reader.Name)
       {
         case IdElementName:
           this.Id = reader.ReadString();
           break;
         case TitleElementName:
           this.Title = reader.ReadString();
           break;
         case DescriptionElementName:
           this.Description = reader.ReadString();
           break;
         case SubmittedUrlElementName:
           this.SubmittedUrl = reader.ReadString();
           break;
         case ShortenedUrlElementName:
           this.ShortenedUrl = reader.ReadString();
           break;
         case ResolvedUrlElementName:
           this.ResolvedUrl = reader.ReadString();
           break;
         case SubmittedImageUrlElementName:
           this.SubmittedImageUrl = reader.ReadString();
           break;
         case ThumbnailUrlElementName:
           this.ThumbnailUrl = reader.ReadString();
           break;
       }
     }
   }
 }
        /// <summary>
        /// Lê campos de um cabeçalho de grupo.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        /// <param name="p_group">Grupo do relatório.</param>
        private void ReadGroupHeaderFields(System.Xml.XmlReader p_reader, Spartacus.Reporting.Group p_group)
        {
            System.Xml.XmlReader v_item;

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement() && p_reader.Name == "headerfield")
                {
                    v_item = p_reader.ReadSubtree();
                    this.ReadGroupHeaderField(v_item, p_group);
                    v_item.Close();
                }
            }
        }
        /// <summary>
        /// Lê grupos do relatório.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadGroups(System.Xml.XmlReader p_reader)
        {
            System.Xml.XmlReader v_item;

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement() && p_reader.Name == "group")
                {
                    v_item = p_reader.ReadSubtree();
                    this.ReadGroup(v_item);
                    v_item.Close();
                }
            }
        }
        /// <summary>
        /// Lê objeto do cabeçalho do relatório.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadHeaderObject(System.Xml.XmlReader p_reader)
        {
            Spartacus.Reporting.Object v_object;
            System.Xml.XmlReader v_item;

            v_object = new Spartacus.Reporting.Object();

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "type":
                            switch (p_reader.ReadString())
                            {
                                case "IMAGE":
                                    v_object.v_type = Spartacus.Reporting.ObjectType.IMAGE;
                                    break;
                                case "TEXT":
                                    v_object.v_type = Spartacus.Reporting.ObjectType.TEXT;
                                    break;
                                case "PAGENUMBER":
                                    v_object.v_type = Spartacus.Reporting.ObjectType.PAGENUMBER;
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "column":
                            v_object.v_column = p_reader.ReadString();
                            break;
                        case "posx":
                            v_object.SetPosX(p_reader.ReadString());
                            break;
                        case "posy":
                            v_object.SetPosY(p_reader.ReadString());
                            break;
                        case "align":
                            switch (p_reader.ReadString())
                            {
                                case "LEFT":
                                    v_object.v_align = Spartacus.Reporting.FieldAlignment.LEFT;
                                    break;
                                case "RIGHT":
                                    v_object.v_align = Spartacus.Reporting.FieldAlignment.RIGHT;
                                    break;
                                case "CENTER":
                                    v_object.v_align = Spartacus.Reporting.FieldAlignment.CENTER;
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "font":
                            v_object.v_font = new Spartacus.Reporting.Font();
                            v_item = p_reader.ReadSubtree();
                            this.ReadFont(v_object.v_font, v_item);
                            v_item.Close();
                            break;
                        default:
                            break;
                    }
                }
            }

            this.v_header.v_objects.Add(v_object);
        }
 public override bool CanDeserialize(System.Xml.XmlReader xmlReader) {
     return xmlReader.IsStartElement("definitions", ServiceDescription.Namespace);
 }
        /// <summary>
        /// Lê cabeçalho do relatório.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadHeader(System.Xml.XmlReader p_reader)
        {
            System.Xml.XmlReader v_item;

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "height":
                            this.v_header.SetHeight(p_reader.ReadString());
                            break;
                        case "object":
                            v_item = p_reader.ReadSubtree();
                            this.ReadHeaderObject(v_item);
                            v_item.Close();
                            break;
                        default:
                            break;
                    }
                }
            }

            this.v_header.v_border = this.v_settings.v_reportheaderborder;
        }