/// <summary>
        /// Provides a suitable preview sound for the given object or null if none is available.
        /// </summary>
        /// <param name="obj">The object being previewed</param>
        public static Sound GetPreviewSound(object obj)
        {
            PreviewSoundQuery query = new PreviewSoundQuery(obj);

            GetPreview(query);
            return(query.Result);
        }
Exemple #2
0
        void IPreviewGenerator.Perform(IPreviewQuery query)
        {
            PreviewImageQuery imgQuery = query as PreviewImageQuery;

            if (imgQuery != null)
            {
                this.Perform((T)query.Source, imgQuery);
                return;
            }
            PreviewSoundQuery sndQuery = query as PreviewSoundQuery;

            if (sndQuery != null)
            {
                this.Perform((T)query.Source, sndQuery);
                return;
            }
        }
Exemple #3
0
 public virtual void Perform(T obj, PreviewSoundQuery query)
 {
 }