VirtualFileBase VirtualFileBase VirtualFileBase VirtualFileBase Class


Provides the core implementation for the VirtualFile and VirtualDirectory objects. An abstract class, it cannot be instantiated.

public ref class VirtualFileBase abstract : MarshalByRefObject
public abstract class VirtualFileBase : MarshalByRefObject
type VirtualFileBase = class
    inherit MarshalByRefObject
Public MustInherit Class VirtualFileBase
Inherits MarshalByRefObject


The VirtualFileBase abstract class provides the common methods and properties shared between the VirtualFile and VirtualDirectory objects. Implementations of these classes provide the ASP.NET runtime with access to files and paths used for compilation. For more information on using virtual files and paths, see the VirtualPathProvider class.

Notes to Inheritors

When you inherit from the VirtualFileBase class, you must override the IsDirectory property to indicate whether the derived object is a virtual directory or a virtual file. If you derive from either the VirtualFile or the VirtualDirectory class, the IsDirectory property is already set.


VirtualFileBase() VirtualFileBase() VirtualFileBase() VirtualFileBase()

Initializes the class for use by an inherited class instance. This constructor can be called only by an inherited class.


IsDirectory IsDirectory IsDirectory IsDirectory

When overridden in a derived class, gets a value indicating whether the VirtualFileBase instance represents a virtual file or a virtual directory.

Name Name Name Name

Gets the display name of the virtual resource.

VirtualPath VirtualPath VirtualPath VirtualPath

Gets the virtual file path.


CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Gives a VirtualFileBase instance an infinite lifetime by preventing a lease from being created.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also