ISupportFullName Interface

Declares the property used to store a full path to the file specified by the object which implements the IFileData interface.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.Persistent.Base.v18.1.dll

Declaration

public interface ISupportFullName
Public Interface ISupportFullName

You can implement the ISupportFullName interface in your custom class that supports IFileData to access the file's full path. XAF assigns the file's full path to the ISupportFullName.FullName property before the IFileData.LoadFromStream method is called.

Note

In ASP.NET applications, the FullName property stores the file's name only, because a web browser doesn't allow reading the uploaded file full path for security reasons (see UploadedFile.FileName).

You can implement ISupportFullName in your custom FileData object:

using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
// ...
public class FileDataEx : FileData, ISupportFullName {
    public FileDataEx(Session session) : base(session) { }
    private string fullName;
    [ModelDefault("AllowEdit", "False")]
    public string FullName {
        get { return fullName; }
        set { SetPropertyValue("FullName", ref fullName, value); }
    }
}
[DefaultClassOptions]
public class DemoObject : BaseObject {
    public DemoObject(Session session)
        : base(session) { }
    private FileDataEx file;
    public FileDataEx File {
        get { return file; }
        set { SetPropertyValue("File", ref file, value); }
    }
}

See Also