コード例 #1
0
        internal override string Execute(System.Collections.Specialized.NameValueCollection commandParameters)
        {
            int streamID;
            int userID;

            if (!Helper.TryGetUserID(_session, out userID))
            {
                return(String.Empty);
            }

            string error = ValidateIntParameter(commandParameters, "streamID", out streamID);

            if (error != String.Empty)
            {
                return(error);
            }

            ChannelProperties contentStream;

            BLClient client = null;

            // call WCF BLL Method
            try
            {
                client = new BLClient();

                contentStream = client.GetChannelProperties(userID, streamID);
            }
            catch (Exception exception)
            {
                return(ErrorWrapper.SendError(exception.Message));
            }
            finally
            {
                if (client != null)
                {
                    client.Dispose();
                }
            }

            return(Flatten(contentStream));
        }