コード例 #1
0
 public EventListResult(JEventListResult jResult) : base(jResult)
 {
     if (jResult == null)
     {
         Images       = new List <ImageImpl>();
         Dates        = new DateImpl[0];
         Place        = new Place(new JPlace());
         Location     = new LocationImpl(new JLocation());
         Participants = new List <Participant>();
         Categories   = new string[0];
         return;
     }
     Id = jResult.Id;
     PublicationDate = DateTimeHelper.GetDateTimeFromUnixTime(jResult.Publication_Date);
     Dates           = jResult.Dates.Select(d => new DateImpl(d));
     Title           = jResult.Title;
     ShortTitle      = jResult.Short_Title;
     Slug            = jResult.Slug;
     Place           = new Place(jResult.Place);
     Description     = jResult.Description;
     BodyText        = jResult.Body_Text;
     Location        = new LocationImpl(jResult.Location);
     Categories      = jResult.Categories;
     Tagline         = jResult.Tagline;
     AgeRestriction  = jResult.Age_Restriction == "0" ? "0+" : jResult.Age_Restriction;
     Price           = jResult.Price;
     IsFree          = jResult.Is_Free;
     Images          = jResult.Images.Select(i => new ImageImpl(i));
     SiteUrl         = jResult.Site_Url;
     Tags            = jResult.Tags;
     Participants    = jResult.Participants.Select(p => new Participant(p));
 }
コード例 #2
0
        public SelectionItem(JSelectionItem jSelectionItem)
        {
            if (jSelectionItem == null)
            {
                Place      = new Place(null);
                Daterange  = new DateImpl(null);
                FirstImage = new ImageImpl(null);
                return;
            }

            Id          = jSelectionItem.Id;
            Title       = jSelectionItem.Title;
            Description = jSelectionItem.Description;
            CType       = jSelectionItem.CType;
            Place       = new Place(jSelectionItem.Place);
            Daterange   = new DateImpl(jSelectionItem.Daterange);
            FirstImage  = new ImageImpl(jSelectionItem.first_image);
            ItemUrl     = jSelectionItem.Item_url;
        }
コード例 #3
0
        public SearchResult(JSearchResult jResult) : base(jResult)
        {
            if (jResult == null)
            {
                Place      = new Place(new JPlace());
                Coords     = new Coordinates(new JCoordinates());
                Dates      = new DateImpl(new JDate());
                FirstImage = new ImageImpl(new JImage());
                return;
            }

            Id          = jResult.Id;
            Title       = jResult.Title;
            Description = jResult.Description;
            Address     = jResult.Address;
            IsClosed    = jResult.Is_Closed;
            IsStub      = jResult.Is_Stub;
            CType       = jResult.Ctype.GetCType();
            Place       = new Place(jResult.Place);
            Coords      = new Coordinates(jResult.Coords);
            FirstImage  = new ImageImpl(jResult.first_image);
            ItemUrl     = jResult.item_url;
            Dates       = new DateImpl(jResult.Daterange);
        }