Beispiel #1
0
        /// <summary>
        /// "Construct" this object using a StorageFile object/media file.
        /// </summary>
        /// <param name="file">The file</param>
        /// <returns>The newly constructed NBImage object</returns>
        public static Task <NBImage> FromStorageFileAsync(StorageFile file)
        {
            NBImage nbImage = new NBImage(file);

            return(nbImage.SetupPropertiesAsync());
        }
Beispiel #2
0
        /// <summary>
        /// The most basic way of "constructing" this object by providing all the needed info.
        /// </summary>
        /// <param name="path">Path to the media file.</param>
        /// <param name="name">Name of the file</param>
        /// <param name="format">Extension of the file.</param>
        /// <returns>The newly constructed NBImage object</returns>
        public static Task <NBImage> FromGivenInfoAsync(string path, string name, string format)
        {
            NBImage nbImage = new NBImage(path, name, format);

            return(nbImage.SetupPropertiesAsync());
        }