System.Runtime.WindowsRuntime
Contains extension methods for the and interfaces in the Windows Runtime when developing Windows Store apps.
Creates a safe file handle for a the current storage file instance.
A storage file instance.
The kind of access that should be used when opening the file. The default value is .
The kind of stream sharing access other objects can have to the same file. The default value is .
Advanced options for creating the object. The default value is .
A safe file handle instance if the operation succeeds; if the conversion of the to an IStorageItemHandleAccess returns .
is .
Creates a safe file handle for a file that is in the current storage folder instance.
The current storage folder instance.
The name of the file that you want to get a handle to.
The mode in which the operating system should open the file.
A safe file handle instance if the operation succeeds; if the conversion of the to an IStorageFolderHandleAccess returns .
is .
-or-
is .
Creates a safe file handle for a file that is in the current storage folder instance.
The current storage folder instance.
The name of the file that you want to get a handle to.
The mode in which the operating system should open the file.
The kind of access that should be used when opening the file.
The kind of stream sharing access other objects can have to the same file. The default value is .
Advanced options for creating the object. The default value is .
A safe file handle instance if the operation succeeds; if the conversion of the to an IStorageFolderHandleAccess returns .
is .
-or-
is .
Retrieves a stream for reading from a specified file.
The Windows Runtime object to read from.
A task that represents the asynchronous read operation.
is .
The file could not be opened or retrieved as a stream.
Retrieves a stream for reading from a file in the specified parent folder.
The Windows Runtime object that contains the file to read from.
The path, relative to the root folder, to the file to read from.
A task that represents the asynchronous read operation.
or is .
is empty or contains only white-space characters.
The file could not be opened or retrieved as a stream.
Retrieves a stream for writing to a specified file.
The Windows Runtime object to write to.
A task that represents the asynchronous write operation.
is .
The file could not be opened or retrieved as a stream.
Retrieves a stream for writing to a file in the specified parent folder.
The Windows Runtime object that contains the file to write to.
The path, relative to the root folder, to the file to write to.
The Windows Runtime enumeration value that specifies the behavior to use when the name of the file to create is the same as the name of an existing file.
A task that represents the asynchronous write operation.
or is .
is empty or contains only white-space characters.
The file could not be opened or retrieved as a stream.
Contains extension methods for converting between streams in the Windows Runtime and managed streams in the .NET for Windows Store apps.
Converts a managed stream in the .NET for Windows Store apps to an input stream in the Windows Runtime.
The stream to convert.
A Windows Runtime object that represents the converted stream.
is .
The stream does not support reading.
Converts a managed stream in the .NET for Windows Store apps to an output stream in the Windows Runtime.
The stream to convert.
A Windows Runtime object that represents the converted stream.
is .
The stream does not support reading.
Converts the specified stream to a random access stream.
The stream to convert.
A Windows Runtime , which represents the converted stream.
Converts a random access stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps.
The Windows Runtime object to convert.
The converted stream.
is .
Converts a random access stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps using the specified buffer size.
The Windows Runtime object to convert.
The size, in bytes, of the buffer. This value cannot be negative, but it can be 0 (zero) to disable buffering.
The converted stream.
is .
is negative.
Converts an input stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps.
The Windows Runtime object to convert.
The converted stream.
is .
Converts an input stream in the Windows Runtime to a managed stream in the .NET for Windows 8.x Store apps using the specified buffer size.
The Windows Runtime object to convert.
The size, in bytes, of the buffer. This value cannot be negative, but it can be 0 (zero) to disable buffering.
The converted stream.
is .
is negative.
Converts an output stream in the Windows Runtime to a managed stream in the .NET for Windows 8.x Store apps.
The Windows Runtime object to convert.
The converted stream.
is .
Converts an output stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps using the specified buffer size.
The Windows Runtime object to convert.
The size, in bytes, of the buffer. This value cannot be negative, but it can be 0 (zero) to disable buffering.
The converted stream.
is .
is negative.
Provides factory methods to construct representations of managed tasks that are compatible with Windows Runtime asynchronous actions and operations.
Creates and starts a Windows Runtime asynchronous action by using a function that generates a started task. The task can support cancellation.
A delegate that represents the function that creates and starts the task. The started task is represented by the Windows Runtime asynchronous action that is returned. The function is passed a cancellation token that the task can monitor to be notified of cancellation requests; you can ignore the token if your task does not support cancellation.
A started Windows.Foundation.IAsyncAction instance that represents the task that is generated by .
is null.
returns an unstarted task.
Creates and starts a Windows Runtime asynchronous action that includes progress updates, by using a function that generates a started task. The task can support cancellation and progress reporting.
A delegate that represents the function that creates and starts the task. The started task is represented by the Windows Runtime asynchronous action that is returned. The function is passed a cancellation token that the task can monitor to be notified of cancellation requests, and an interface for reporting progress; you can ignore either or both of these arguments if your task does not support progress reporting or cancellation.
The type that is used for progress notifications.
A started Windows.Foundation.IAsyncActionWithProgress<TProgress> instance that represents the task that is generated by .
is null.
returns an unstarted task.
Creates and starts a Windows Runtime asynchronous operation by using a function that generates a started task that returns results. The task can support cancellation.
A delegate that represents the function that creates and starts the task. The started task is represented by the Windows Runtime asynchronous operation that is returned. The function is passed a cancellation token that the task can monitor to be notified of cancellation requests; you can ignore the token if your task does not support cancellation.
The type that returns the result.
A started Windows.Foundation.IAsyncOperation<TResult> instance that represents the task that is generated by .
is null.
returns an unstarted task.
Creates and starts a Windows Runtime asynchronous operation that includes progress updates, by using a function that generates a started task that returns results. The task can support cancellation and progress reporting.
A delegate that represents the function that creates and starts the task. The started task is represented by the Windows Runtime asynchronous action that is returned. The function is passed a cancellation token that the task can monitor to be notified of cancellation requests, and an interface for reporting progress; you can ignore either or both of these arguments if your task does not support progress reporting or cancellation.
The type that returns the result.
The type that is used for progress notifications.
A started Windows.Foundation.IAsyncOperationWithProgress<TResult,TProgress> instance that represents the task that is generated by .
is null.
returns an unstarted task.
Provides an implementation of the Windows Runtime IBuffer interface (Windows.Storage.Streams.IBuffer), and all additional required interfaces.
Returns a Windows.Storage.Streams.IBuffer interface that contains a specified range of bytes copied from a byte array. If the specified capacity is greater than the number of bytes copied, the rest of the buffer is zero-filled.
The byte array to copy from.
The offset in from which copying begins.
The number of bytes to copy.
The maximum number of bytes the buffer can hold; if this is greater than , the rest of the bytes in the buffer are initialized to 0 (zero).
A Windows.Storage.Streams.IBuffer interface that contains the specified range of bytes. If is greater than , the rest of the buffer is zero-filled.
, , or is less than 0 (zero).
is null.
Starting at , does not contain elements. -or-Starting at , does not contain elements.
Returns an empty Windows.Storage.Streams.IBuffer interface that has the specified maximum capacity.
The maximum number of bytes the buffer can hold.
A Windows.Storage.Streams.IBuffer interface that has the specified capacity and a Length property equal to 0 (zero).
is less than 0 (zero).
Provides extension methods for operating on Windows Runtime buffers (Windows.Storage.Streams.IBuffer interface).
Returns a Windows.Storage.Streams.IBuffer interface that represents the specified byte array.
The array to represent.
A Windows.Storage.Streams.IBuffer interface that represents the specified byte array.
is null.
Returns a Windows.Storage.Streams.IBuffer interface that represents a range of bytes in the specified byte array.
The array that contains the range of bytes that is represented by the IBuffer.
The offset in where the range begins.
The length of the range that is represented by the IBuffer.
An IBuffer interface that represents the specified range of bytes in .
is null.
or is less than 0 (zero).
The array is not large enough to serve as a backing store for the IBuffer; that is, the number of bytes in , beginning at , is less than .
Returns a Windows.Storage.Streams.IBuffer interface that represents a range of bytes in the specified byte array. Optionally sets the Length property of the IBuffer to a value that is less than the capacity.
The array that contains the range of bytes that is represented by the IBuffer.
The offset in where the range begins.
The value of the Length property of the IBuffer.
The size of the range that is represented by the IBuffer. The Capacity property of the IBuffer is set to this value.
An IBuffer interface that represents the specified range of bytes in and that has the specified Length property value.
is null.
, , or is less than 0 (zero).
is greater than . -or-The array is not large enough to serve as a backing store for the IBuffer; that is, the number of bytes in , beginning at , is less than or .
Returns a stream that represents the same memory that the specified Windows.Storage.Streams.IBuffer interface represents.
The IBuffer to represent as a stream.
A stream that represents the same memory that the specified Windows.Storage.Streams.IBuffer interface represents.
is null.
Copies bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), specifying the starting index in the source array, the starting index in the destination buffer, and the number of bytes to copy. The method does not update the Length property of the destination buffer.
The array to copy data from.
The index in to begin copying data from.
The buffer to copy data to.
The index in to begin copying data to.
The number of bytes to copy.
or is null.
, , or is less than 0 (zero).
is greater than or equal to the length of . -or-The number of bytes in , beginning at , is less than . -or-Copying bytes, beginning at , would exceed the capacity of .
Copies all bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), starting at offset 0 (zero) in both. The method does not update the length of the destination buffer.
The array to copy data from.
The buffer to copy data to.
or is null.
The size of exceeds the capacity of .
Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, starting at offset 0 (zero) in both.
The buffer to copy data from.
The array to copy data to.
or is null.
The size of exceeds the size of .
Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, specifying the starting index in the source buffer, the starting index in the destination array, and the number of bytes to copy.
The buffer to copy data from.
The index in to begin copying data from.
The array to copy data to.
The index in to begin copying data to.
The number of bytes to copy.
or is null.
, , or is less than 0 (zero).
is greater than or equal to the capacity of . -or- is greater than or equal to the length of . -or-The number of bytes in , beginning at , is less than . -or-Copying bytes, beginning at , would exceed the size of .
Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, specifying the starting index in the source, the starting index in the destination, and the number of bytes to copy.
The buffer to copy data from.
The index in to begin copying data from.
The buffer to copy data to.
The index in to begin copying data to.
The number of bytes to copy.
or is null.
, , or is less than 0 (zero).
is greater than or equal to the capacity of . -or- is greater than or equal to the capacity of . -or-The number of bytes in , beginning at , is less than . -or-Copying bytes, beginning at , would exceed the capacity of .
Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, starting at offset 0 (zero) in both.
The source buffer.
The destination buffer.
or is null.
The size of exceeds the capacity of .
Returns the byte at the specified offset in the specified Windows.Storage.Streams.IBuffer interface.
The buffer to get the byte from.
The offset of the byte.
The byte at the specified offset.
is null.
is less than 0 (zero).
is greater than or equal to the capacity of .
Returns a Windows.Storage.Streams.IBuffer interface that represents the same memory as the specified memory stream.
The stream that provides the backing memory for the IBuffer.
A Windows.Storage.Streams.IBuffer interface that is backed by the same memory that backs the specified memory stream.
Returns a Windows.Storage.Streams.IBuffer interface that represents a region within the memory that the specified memory stream represents.
The stream that shares memory with the IBuffer.
The position of the shared memory region in .
The maximum size of the shared memory region. If the number of bytes in , starting at , is less than , the IBuffer that is returned represents only the available bytes.
A Windows.Storage.Streams.IBuffer interface that is backed by a region within the memory that backs the specified memory stream.
is null.
or is less than 0 (zero).
is beyond the end of .
cannot expose its underlying memory buffer.
has been closed.
Returns a value that indicates whether two buffers (Windows.Storage.Streams.IBuffer objects) represent the same underlying memory region.
The first buffer.
The second buffer.
true if the memory regions that are represented by the two buffers have the same starting point; otherwise, false.
Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer). The size of the array is the value of the Length property of the IBuffer.
The buffer whose contents populate the new array.
A byte array that contains the bytes in the specified IBuffer, beginning at offset 0 (zero) and including a number of bytes equal to the value of the Length property of the IBuffer.
is null.
Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer), starting at a specified offset and including a specified number of bytes.
The buffer whose contents populate the new array.
The index in to begin copying data from.
The number of bytes to copy.
A byte array that contains the specified range of bytes.
is null.
or is less than 0 (zero).
is greater than or equal to the capacity of . -or-The number of bytes in , beginning at , is less than .
Provides extension methods for converting between tasks and Windows Runtime asynchronous actions and operations.
Returns a Windows Runtime asynchronous action that represents a started task.
The started task.
A instance that represents the started task.
is .
is an unstarted task.
Returns a Windows Runtime asynchronous operation that represents a started task that returns a result.
The started task.
The type that returns the result.
A instance that represents the started task.
is .
is an unstarted task.
Returns a task that represents a Windows Runtime asynchronous action.
The asynchronous action.
A task that represents the asynchronous action.
is .
Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.
The asynchronous action.
A token that can be used to request cancellation of the asynchronous action.
A task that represents the asynchronous action.
is .
Returns a task that represents a Windows Runtime asynchronous action.
The asynchronous action.
The type of object that provides data that indicates progress.
A task that represents the asynchronous action.
is .
Returns a task that represents a Windows Runtime asynchronous action that reports progress.
The asynchronous action.
An object that receives progress updates.
The type of object that provides data that indicates progress.
A task that represents the asynchronous action.
is .
Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.
The asynchronous action.
A token that can be used to request cancellation of the asynchronous action.
The type of object that provides data that indicates progress.
A task that represents the asynchronous action.
is .
Returns a task that represents a Windows Runtime asynchronous action that reports progress and can be cancelled.
The asynchronous action.
A token that can be used to request cancellation of the asynchronous action.
An object that receives progress updates.
The type of object that provides data that indicates progress.
A task that represents the asynchronous action.
is .
Returns a task that represents a Windows Runtime asynchronous operation returns a result.
The asynchronous operation.
The type of object that returns the result of the asynchronous operation.
A task that represents the asynchronous operation.
is .
Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.
The asynchronous operation.
A token that can be used to request cancellation of the asynchronous operation.
The type of object that returns the result of the asynchronous operation.
A task that represents the asynchronous operation.
is .
Returns a task that represents a Windows Runtime asynchronous operation returns a result.
The asynchronous operation.
The type of object that returns the result of the asynchronous operation.
The type of object that provides data that indicates progress.
A task that represents the asynchronous operation.
is .
Returns a task that represents Windows Runtime asynchronous operation that returns a result and reports progress.
The asynchronous operation.
An object that receives progress updates.
The type of object that returns the result of the asynchronous operation.
The type of object that provides data that indicates progress.
A task that represents the asynchronous operation.
is .
Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.
The asynchronous operation.
A token that can be used to request cancellation of the asynchronous operation.
The type of object that returns the result of the asynchronous operation.
The type of object that provides data that indicates progress.
A task that represents the asynchronous operation.
is .
Returns a task that represents a Windows Runtime asynchronous operation that returns a result, reports progress, and can be cancelled.
The asynchronous operation.
A token that can be used to request cancellation of the asynchronous operation.
An object that receives progress updates.
The type of object that returns the result of the asynchronous operation.
The type of object that provides data that indicates progress.
A task that represents the asynchronous operation.
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
The asynchronous action to await.
An object that awaits the specified asynchronous action.
Returns an object that awaits an asynchronous action that reports progress.
The asynchronous action to await.
The type of object that provides data that indicates progress.
An object that awaits the specified asynchronous action.
Returns an object that awaits an asynchronous operation that returns a result.
The asynchronous operation to await.
The type of object that returns the result of the asynchronous operation.
An object that awaits the specified asynchronous operation.
Returns an object that awaits an asynchronous operation that reports progress and returns a result.
The asynchronous operation to await.
The type of object that returns the result of the asynchronous operation.
The type of object that provides data that indicates progress.
An object that awaits the specified asynchronous operation.
Represents an x- and y-coordinate pair in two-dimensional space. Can also represent a logical point for certain property usages.
Initializes a struct that contains the specified values.
The x-coordinate value of the struct.
The y-coordinate value of the struct.
Determines whether the specified object is a and whether it contains the same values as this .
The object to compare.
if is a and contains the same and values as this ; otherwise, .
Compares two structs for equality.
The point to compare to this instance.
if both structs contain the same and values; otherwise, .
Returns the hash code for this .
The hash code for this struct.
Compares two structs for equality.
The first struct to compare.
The second struct to compare.
if both the and values of and are equal; otherwise, .
Compares two structs for inequality
The first point to compare.
The second point to compare.
if and have different or values; false if and have the same and values.
For a description of this member, see .
The string specifying the format to use, or to use the default format defined for the type of the implementation.
An object that provides formatting information for the value, or to obtain the numeric format information from the current culture.
A string containing the value of the current instance in the specified format.
Creates a representation of this .
A containing the and values of this struct.
Creates a representation of this using the specified culture-specific formatting information..
Culture-specific formatting information.
A containing the and values of this struct.
Gets or sets the -coordinate value of this struct.
The -coordinate value of this struct. The default value is 0.
Gets or sets the -coordinate value of this .
The -coordinate value of this struct. The default value is 0.
Describes the width, height, and point origin of a rectangle.
Initializes a struct that has the specified x-coordinate, y-coordinate, width, and height.
The x-coordinate of the top-left corner of the rectangle.
The y-coordinate of the top-left corner of the rectangle.
The width of the rectangle.
The height of the rectangle.
width or height are less than 0.
Initializes a struct that is exactly large enough to contain the two specified points.
The first point that the new rectangle must contain.
The second point that the new rectangle must contain.
Initializes a struct based on an origin and size.
The origin of the new .
The size of the new .
Gets the y-axis value of the bottom of the rectangle.
The y-axis value of the bottom of the rectangle. If the rectangle is empty, the value is .
Indicates whether the rectangle described by the contains the specified point.
The point to check.
if the rectangle described by the contains the specified point; otherwise, .
Gets a special value that represents a rectangle with no position or area.
The empty rectangle, which has and property values of , and has and property values of .
Indicates whether the specified object is equal to the current .
The object to compare to the current rectangle.
if is a and has the same x, y, width, and height values as the current ; otherwise, .
Indicates whether the specified is equal to the current .
The rectangle to compare to the current rectangle.
if the specified has the same x, y, width, and height property values as the current ; otherwise, .
Creates a hash code for the .
A hash code for the current struct.
Gets or sets the height of the rectangle.
A value that represents the height of the rectangle. The default is 0.
Finds the intersection of the rectangle represented by the current and the rectangle represented by the specified , and stores the result as the current .
The rectangle to intersect with the current rectangle.
Gets a value that indicates whether the rectangle is the rectangle.
if the rectangle is the rectangle; otherwise, .
Gets the x-axis value of the left side of the rectangle.
The x-axis value of the left side of the rectangle.
Compares two structs for equality.
The first rectangle to compare.
The second rectangle to compare.
if the structs have the same x, y, width, and height property values; otherwise, .
Compares two structs for inequality.
The first rectangle to compare.
The second rectangle to compare.
if the structs do not have the same x, y, width, and height property values; otherwise, .
Gets the x-axis value of the right side of the rectangle.
The x-axis value of the right side of the rectangle.
For a description of this member, see .
The string specifying the format to use, or to use the default format defined for the type of the IFormattable implementation.
An object that provides formatting information, or to obtain the numeric format information from the current culture.
A string containing the value of the current instance in the specified format.
Gets the y-axis position of the top of the rectangle.
The y-axis position of the top of the rectangle.
Returns a string representation of the struct.
A string representation of the current struct. The string has the following form: ",,,".
Returns a string representation of the rectangle by using the specified format provider.
Culture-specific formatting information.
A string representation of the current rectangle that is determined by the specified format provider.
Expands the rectangle represented by the current exactly enough to contain the specified point.
The point to include.
Expands the rectangle represented by the current exactly enough to contain the specified rectangle.
The rectangle to include.
Gets or sets the width of the rectangle.
A value that represents the width of the rectangle in pixels. The default is 0.
Specified a value less than 0.
Gets or sets the x-axis value of the left side of the rectangle.
The x-axis value of the left side of the rectangle. This value is interpreted as pixels within the coordinate space.
Gets or sets the y-axis value of the top side of the rectangle.
The y-axis value of the top side of the rectangle. This value is interpreted as pixels within the coordinate space..
Describes the width and height of an object.
Initializes a new instance of the struct and assigns it an initial width and height.
The initial width of the instance of .
The initial height of the instance of .
or are less than 0.
Gets a value that represents an empty .
An empty instance of .
Compares an object to an instance of for equality.
The object to compare.
if is a value and the sizes of the two objects are equal; otherwise, .
Compares a value to an instance of for equality.
The size to compare to this current instance of .
if the instances of are equal; otherwise, .
Gets the hash code for this instance of .
The hash code for this instance of .
Gets or sets the height of this instance of .
The of this instance of , in pixels. The default is 0. The value cannot be negative.
Specified a value less than 0.
Gets a value that indicates whether this instance of is .
if this instance of size is ; otherwise, .
Compares two instances of for equality.
The first instance of to compare.
The second instance of to compare.
if the two instances of are equal; otherwise, .
Compares two instances of for inequality.
The first instance of to compare.
The second instance of to compare.
if the instances of are not equal; otherwise, .
Returns a string representation of this .
A string representation of this .
Gets or sets the width of this instance of .
The of this instance of , in pixels. The default value is 0. The value cannot be negative.
Specified a value less than 0.
Describes a color in terms of alpha, red, green, and blue channels.
Gets or sets the sRGB alpha channel value of the color.
The sRGB alpha channel value of the color, as a value between 0 and 255.
Gets or sets the sRGB blue channel value of the color.
The sRGB blue channel value, as a value between 0 and 255.
Tests whether the specified object is a struct and is equivalent to the current color.
The object to compare to the current struct.
if the specified object is a struct and is identical to the current struct; otherwise, .
Tests whether the specified struct is identical to the current color.
The struct to compare to the current struct.
if the specified struct is identical to the current struct; otherwise, .
Creates a new struct by using the specified sRGB alpha channel and color channel values.
The alpha channel, , of the new color. The value must be between 0 and 255.
The red channel, , of the new color. The value must be between 0 and 255.
The green channel, , of the new color. The value must be between 0 and 255.
The blue channel, , of the new color. The value must be between 0 and 255.
A struct with the specified values.
Gets or sets the sRGB green channel value of the color.
The sRGB green channel value, as a value between 0 and 255.
Gets a hash code for the current struct.
A hash code for the current struct.
Tests whether two structs are identical.
The first struct to compare.
The second struct to compare.
if and are exactly identical; otherwise, .
Tests whether two structs are not identical.
The first struct to compare.
The second struct to compare.
if and are not equal; otherwise, .
Gets or sets the sRGB red channel value of the color.
The sRGB red channel value, as a value between 0 and 255.
For a description of this member, see .
The string specifying the format to use. -or- null to use the default format defined for the type of the IFormattable implementation.
An object that provides information for formatting this instance, or to obtain the numeric format information from the current culture.
A string containing the value of the current instance in the specified format.
Creates a string representation of the color using the ARGB channels in hex notation.
The string representation of the color.
Creates a string representation of the color by using the ARGB channels and the specified format provider.
An object that provides culture-specific formatting information.
The string representation of the color.