Пример #1
0
 public Channel(string mature,
                string background,
                string updatedAt,
                long id,
                JArray teamsA,
                string status,
                string logo,
                string url,
                string displayName,
                string game,
                string banner,
                string name,
                string videoBanner,
                string chat,
                string subscriptions,
                string features,
                string commercial,
                string streamKey,
                string editors,
                string videos,
                string self,
                string follows,
                string createdAt,
                string profileBanner,
                string primaryTeamName,
                string primaryTeamDisplayName,
                long?views,
                long?followers,
                Twixel twixel)
 {
     teams = new List <Team>();
     if (teamsA != null)
     {
         foreach (JObject team in teamsA)
         {
             teams.Add(twixel.LoadTeam(team));
         }
     }
     this.mature = mature;
     if (background != null)
     {
         this.background = new WebUrl(background);
     }
     this.updatedAt = updatedAt;
     this.id        = id;
     this.status    = status;
     if (logo != null)
     {
         this.logo = new WebUrl(logo);
     }
     this.url         = new WebUrl(url);
     this.displayName = displayName;
     this.game        = game;
     if (banner != null)
     {
         this.banner = new WebUrl(banner);
     }
     this.name = name;
     if (videoBanner != null)
     {
         this.videoBanner = new WebUrl(videoBanner);
     }
     this.chat          = new WebUrl(chat);
     this.subscriptions = new WebUrl(subscriptions);
     this.features      = new WebUrl(features);
     this.commercial    = new WebUrl(commercial);
     this.streamKey     = new WebUrl(streamKey);
     this.editors       = new WebUrl(editors);
     this.videos        = new WebUrl(videos);
     this.self          = new WebUrl(self);
     this.follows       = new WebUrl(follows);
     this.createdAt     = createdAt;
     if (profileBanner != null)
     {
         this.profileBanner = new WebUrl(profileBanner);
     }
     if (primaryTeamName != null)
     {
         this.primaryTeamName = primaryTeamName;
     }
     if (primaryTeamDisplayName != null)
     {
         this.primaryTeamDisplayName = primaryTeamDisplayName;
     }
     this.views     = views;
     this.followers = followers;
 }