อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


IResourceWriter Interface

Definition

Provides the base functionality for writing resources to an output file or stream.

C#
public interface IResourceWriter : IDisposable
C#
[System.Runtime.InteropServices.ComVisible(true)]
public interface IResourceWriter : IDisposable
Derived
Attributes
Implements

Remarks

Resource writers are used to write resources to files in a particular file format. Implement this interface if you want to control the way in which a resource file is written (for example, to store resources in something other than a .txt, .resx, or binary .resources file). Otherwise, use the default ResourceWriter class, which writes resources to a binary .resources file, or the ResXResourceWriter class, which writes resources to an XML resource (.resx) file.

Methods

AddResource(String, Byte[])

Adds an 8-bit unsigned integer array as a named resource to the list of resources to be written.

AddResource(String, Object)

Adds a named resource of type Object to the list of resources to be written.

AddResource(String, String)

Adds a named resource of type String to the list of resources to be written.

Close()

Closes the underlying resource file or stream, ensuring all the data has been written to the file.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
Generate()

Writes all the resources added by the AddResource(String, String) method to the output file or stream.

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also