VirtualFileBase Class

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

Namespace:  System.Web.Hosting
Assembly:  System.Web (in System.Web.dll)

public abstract class VirtualFileBase : MarshalByRefObject

The VirtualFileBase type exposes the following members.

  NameDescription
Protected methodVirtualFileBaseInitializes the class for use by an inherited class instance. This constructor can be called only by an inherited class.
Top

  NameDescription
Public propertyIsDirectoryWhen overridden in a derived class, gets a value indicating whether the VirtualFileBase instance represents a virtual file or a virtual directory.
Public propertyNameGets the display name of the virtual resource.
Public propertyVirtualPathGets the virtual file path.
Top

  NameDescription
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceGives a VirtualFileBase instance an infinite lifetime by preventing a lease from being created. (Overrides MarshalByRefObject.InitializeLifetimeService().)
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft