VirtualFileBase 类

定义

提供 VirtualFileVirtualDirectory 对象的核心实现。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
继承
VirtualFileBase
派生

注解

VirtualFileBase抽象类提供和对象之间共享的公共方法和属性 VirtualFile VirtualDirectoryThe VirtualFileBase abstract class provides the common methods and properties shared between the VirtualFile and VirtualDirectory objects. 这些类的实现为 ASP.NET 运行时提供了对文件和用于编译的路径的访问。Implementations of these classes provide the ASP.NET runtime with access to files and paths used for compilation. 有关使用虚拟文件和路径的详细信息,请参阅 VirtualPathProvider 类。For more information on using virtual files and paths, see the VirtualPathProvider class.

实施者说明

从类继承时 VirtualFileBase ,必须重写 IsDirectory 属性,以指示派生对象是虚拟目录还是虚拟文件。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. 如果是从 VirtualFile 或类派生的 VirtualDirectory ,则 IsDirectory 已设置该属性。If you derive from either the VirtualFile or the VirtualDirectory class, the IsDirectory property is already set.

构造函数

VirtualFileBase()

初始化该类供继承的类实例使用。Initializes the class for use by an inherited class instance. 此构造函数只能由继承的类调用。This constructor can be called only by an inherited class.

属性

IsDirectory

在派生类中重写时,获取指示 VirtualFileBase 实例表示的是虚拟文件还是虚拟目录的值。When overridden in a derived class, gets a value indicating whether the VirtualFileBase instance represents a virtual file or a virtual directory.

Name

获取虚拟资源的显示名称。Gets the display name of the virtual resource.

VirtualPath

获取虚拟文件路径。Gets the virtual file path.

方法

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()
已过时。

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

通过禁止创建租约来给予 VirtualFileBase 实例无限的生存期。Gives a VirtualFileBase instance an infinite lifetime by preventing a lease from being created.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅