Пример #1
0
        public RatingContract[] GetRatings()
        {
            IMusicProcessor processor = Factory.GetIMusicProcessorInstance();
            var             ratings   = processor.GetRatings();

            RatingContract[] output = new RatingContract[ratings.Length];

            for (int i = 0; i < ratings.Length; i++)
            {
                output[i] = new RatingContract(ratings[i]);
            }

            return(output);
        }
Пример #2
0
        public RatingContract[] GetRatingsForUser(string id)
        {
            IMusicProcessor processor = Factory.GetIMusicProcessorInstance();
            var             ratings   = processor.GetRatings(Int32.Parse(id));

            if (ratings == null)
            {
                return(null);
            }

            RatingContract[] output = new RatingContract[ratings.Length];

            for (int i = 0; i < ratings.Length; i++)
            {
                output[i] = new RatingContract(ratings[i]);
            }

            return(output);
        }