コード例 #1
0
 internal static File LoadFileWithId(int id)
 {
     try
     {
         var media = new Media(id);
         var file  = new File();
         LoadMediaBase(file, media);
         file.FileName = media.Text;
         file.MultilanguageFileName = media.HasProperty("title") ? media.getProperty("title").Value.ToString() : media.Text;
         return(file);
     }
     catch (Exception)
     {
         return(null);
     }
 }
コード例 #2
0
		internal static File LoadFileWithId(int id)
		{
			try
			{
				var media = new Media(id);
				var file = new File();
				LoadMediaBase(file, media);
				file.FileName = media.Text;
				file.MultilanguageFileName = media.HasProperty("title") ? media.getProperty("title").Value.ToString() : media.Text;
				return file;
			}
			catch (Exception)
			{
				return null;
			}
		}