internal override void Refresh()
 {
     _input    = null;
     _preview  = null;
     _encoding = null;
     base.Refresh();
 }
        /// <summary>
        /// Creates an instance of ChannelPreviewData class from an instance of ChannelPreview.
        /// </summary>
        /// <param name="preview">Channel Preview to copy into newly created instance.</param>
        public ChannelPreviewData(ChannelPreview preview)
        {
            if (preview == null)
            {
                throw new ArgumentNullException("preview");
            }

            AccessControl = preview.AccessControl == null
                ? null
                : new ChannelAccessControlData(preview.AccessControl);

            if (preview.Endpoints != null)
            {
                Endpoints = preview.Endpoints
                            .Select(e => e == null ? null : new ChannelEndpointData(e))
                            .ToList();
            }
        }
        /// <summary>
        /// Creates an instance of ChannelPreviewData class from an instance of ChannelPreview.
        /// </summary>
        /// <param name="preview">Channel Preview to copy into newly created instance.</param>
        public ChannelPreviewData(ChannelPreview preview)
        {
            if (preview == null)
            {
                throw new ArgumentNullException("preview");
            }

            AccessControl = preview.AccessControl == null
                ? null
                : new ChannelAccessControlData(preview.AccessControl);

            if (preview.Endpoints != null)
            {
                Endpoints = preview.Endpoints
                    .Select(e => e == null ? null : new ChannelEndpointData(e))
                    .ToList();
            }
        }