Skip to main content
.NET 8.0+

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.v24.2.dll

Declaration

public interface ISupportFullName

Remarks

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 Web Forms 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.EF;
using System.ComponentModel.DataAnnotations;
// ...
public class FileDataEx : FileData, ISupportFullName {
    private string fullName;
    [ModelDefault("AllowEdit", "False")]
    public virtual string FullName {
        get { return fullName; }
        set { SetPropertyValue(ref fullName, value); }
    }
}
public class DemoObject : BaseObject {
    public virtual FileDataEx File { get; set; }
}

// Make sure that you use options.UseChangeTrackingProxies() in your DbContext settings.
See Also