Exemplo n.º 1
0
        private static Person readPerson(string str)
        {
            Person person = new Person();

            if (str.Contains("@") && str.Contains(".") && !str.Contains(" "))
            {
                person.Name = str;
                person.Email = str;
            }
            else
                person.Name = str;

            return person;
        }
Exemplo n.º 2
0
        private static Person readPerson(XmlReader reader)
        {
            Person person = new Person();

            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element)
                {
                    switch (reader.Name)
                    {
                        case "name":
                            reader.MoveToContent();
                            person.Name = reader.ReadString();
                            break;
                        case "email":
                            reader.MoveToContent();
                            person.Email = reader.ReadString();
                            break;
                        case "uri":
                            reader.MoveToContent();
                            person.Uri = reader.ReadString();
                            break;
                    }
                }
            }

            return person;
        }
Exemplo n.º 3
0
 public Feed(Feed feed)
 {
     this.authors = feed.authors;
     this.categories = feed.categories;
     this.cloud = feed.cloud;
     this.contributors = feed.contributors;
     this.copyright = feed.copyright;
     this.description = feed.description;
     this.generator = feed.generator;
     this.icon = feed.icon;
     this.id = feed.id;
     this.image = feed.image;
     this.items = feed.items;
     this.language = feed.language;
     this.modules = feed.modules;
     this.published = feed.published;
     this.rssDocumentation = feed.rssDocumentation;
     this.skipDays = feed.skipDays;
     this.skipHours = feed.skipHours;
     this.title = feed.title;
     this.ttl = feed.ttl;
     this.updated = feed.updated;
     this.version = feed.version;
     this.webMaster = feed.webMaster;
     this.webUri = feed.webUri;
     this.xmlUri = feed.xmlUri;
 }