Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
UFileToFileName.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Globalization;
5 
6 using SiliconStudio.Core.IO;
7 
8 namespace SiliconStudio.Presentation.ValueConverters
9 {
10  /// <summary>
11  /// This converter will convert an <see cref="UFile"/> to a string representing the file name.
12  /// </summary>
13  public class UFileToFileName : OneWayValueConverter<UFileToFileName>
14  {
15  /// <inheritdoc/>
16  public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
17  {
18  var ufile = (UFile)value;
19  return ufile.GetFileName();
20  }
21  }
22 }
override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
This converter will convert an UFile to a string representing the file name.
Defines a normalized file path. See UPath for details. This class cannot be inherited.
Definition: UFile.cs:13