VirtualFileBase 類別

定義

提供 VirtualFileVirtualDirectory 物件的核心實作。Provides the core implementation for the VirtualFile and VirtualDirectory objects. 它是抽象類別 (Abstract Class),所以不能具現化 (Instantiated)。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. 如果您是從 VirtualFileVirtualDirectory 類別衍生,則 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)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。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()
已過時。

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。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()

藉由防止建立使用期 (Lease),為 VirtualFileBase 執行個體提供無限的存留期 (Lifetime)。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)

適用於

另請參閱