private void BuildContentPane()
 {
     this.m_content.DetachAllChildren();
     foreach (CommunityStream allStream in this.m_community.GetAllStreams())
     {
         GameObject             gameObject = this.m_content.AddAsChildObject(this.m_channelSelectPrefab);
         CommunityChannelButton component  = gameObject.GetComponent <CommunityChannelButton>();
         component.SetCommunityInfo(this.m_community, allStream);
         component.GetComponentInChildren <Button>().onClick.AddListener(() => this.m_selectCallback(component));
         component.GetComponentInChildren <Button>().onClick.AddListener(this.m_cleanupCallback);
     }
 }
        private void BuildContentPane()
        {
            this.m_content.DetachAllChildren();
            ReadOnlyCollection <CommunityStream> allStreams = this.m_community.GetAllStreams();

            foreach (CommunityStream stream in allStreams)
            {
                GameObject             gameObject    = this.m_content.AddAsChildObject(this.m_channelSelectPrefab);
                CommunityChannelButton channelButton = gameObject.GetComponent <CommunityChannelButton>();
                channelButton.SetCommunityInfo(this.m_community, stream);
                channelButton.GetComponentInChildren <Button>().onClick.AddListener(delegate
                {
                    this.m_selectCallback.Invoke(channelButton);
                });
                channelButton.GetComponentInChildren <Button>().onClick.AddListener(this.m_cleanupCallback);
            }
        }