Google.Apis Enum which represents the status of the current download. The download has not started. Data is being downloaded. The download was completed successfully. The download failed. Reports download progress. Gets the current status of the upload. Gets the number of bytes received from the server. Gets an exception if one occurred. Media download which uses download file part by part, by . An event which notifies when the download status has been changed. Gets or sets the chunk size to download, it defines the size of each part. Downloads synchronously the given URL to the given stream. Downloads asynchronously the given URL to the given stream. Downloads asynchronously the given URL to the given stream. This download method supports a cancellation token to cancel a request before it was completed. In case the download fails will contain the exception that cause the failure. The only exception which will be thrown is which indicates that the task was canceled. A media downloader implementation which handles media downloads. The service which this downloader belongs to. Maximum chunk size. Default value is 10*MB. Gets or sets the amount of data that will be downloaded before notifying the caller of the download's progress. Must not exceed . Default value is . The range header for the request, if any. This can be used to download specific parts of the requested media. A provider for response stream interceptors. Each time a response is produced, the provider is called, and can return null if interception is not required, or an interceptor for that response. The provider itself should not read the response's content stream, but can check headers. Download progress model, which contains the status of the download, the amount of bytes whose where downloaded so far, and an exception in case an error had occurred. Constructs a new progress instance. The status of the download. The number of bytes received so far. Constructs a new progress instance. An exception which occurred during the download. The number of bytes received before the exception occurred. Gets or sets the status of the download. Gets or sets the amount of bytes that have been downloaded so far. Gets or sets the exception which occurred during the download or null. Updates the current progress and call the event to notify listeners. Constructs a new downloader with the given client service. Gets or sets the callback for modifying requests made when downloading. CountedBuffer bundles together a byte buffer and a count of valid bytes. How many bytes at the beginning of Data are valid. Returns true if the buffer contains no data. Read data from stream until the stream is empty or the buffer is full. Stream from which to read. Cancellation token for the operation. Remove the first n bytes of the buffer. Move any remaining valid bytes to the beginning. Trying to remove more bytes than the buffer contains just clears the buffer. The number of bytes to remove. The core download logic. We download the media and write it to an output stream ChunkSize bytes at a time, raising the ProgressChanged event after each chunk. The chunking behavior is largely a historical artifact: a previous implementation issued multiple web requests, each for ChunkSize bytes. Now we do everything in one request, but the API and client-visible behavior are retained for compatibility. The URL of the resource to download. The download will download the resource into this stream. A cancellation token to cancel this download in the middle. A task with the download progress object. If an exception occurred during the download, its property will contain the exception. Called when a successful HTTP response is received, allowing subclasses to examine headers. For unsuccessful responses, an appropriate exception is thrown immediately, without this method being called. HTTP response received. Called when an HTTP response is received, allowing subclasses to examine data before it's written to the client stream. Byte array containing the data downloaded. Length of data downloaded in this chunk, in bytes. Called when a download has completed, allowing subclasses to perform any final validation or transformation. Defines the behaviour/header used for sending an etag along with a request. The default etag behaviour will be determined by the type of the request. The ETag won't be added to the header of the request. The ETag will be added as an "If-Match" header. A request sent with an "If-Match" header will only succeed if both ETags are identical. The ETag will be added as an "If-None-Match" header. A request sent with an "If-None-Match" header will only succeed if ETags are not identical. Common error handling code for the Media API. Creates a suitable exception for an HTTP response, attempting to parse the body as JSON but falling back to just using the text as the message. Creates a suitable exception for an HTTP response, attempting to parse the body as JSON but falling back to just using the text as the message. A batch request which represents individual requests to Google servers. You should add a single service request using the method and execute all individual requests using . More information about the batch protocol is available in https://developers.google.com/storage/docs/json_api/v1/how-tos/batch. Current implementation doesn't retry on unsuccessful individual response and doesn't support requests with different access tokens (different users or scopes). A concrete type callback for an individual response. The response type. The content response or null if the request failed. Error or null if the request succeeded. The request index. The HTTP individual response. This inner class represents an individual inner request. Gets or sets the client service request. Gets or sets the response class type. A callback method which will be called after an individual response was parsed. The content response or null if the request failed. Error or null if the request succeeded. The request index. The HTTP individual response. This generic inner class represents an individual inner request with a generic response type. Gets or sets a concrete type callback for an individual response. Constructs a new batch request using the given service. See for more information. Constructs a new batch request using the given service. The service's HTTP client is used to create a request to the given server URL and its serializer members are used to serialize the request and deserialize the response. Gets the count of all queued requests. Queues an individual request. The response's type. The individual request. A callback which will be called after a response was parsed. Asynchronously executes the batch request. Asynchronously executes the batch request. Cancellation token to cancel operation. Parses the given string content to a HTTP response. Creates the batch outer request content which includes all the individual requests to Google servers. Creates the individual server request. Creates a string representation that includes the request's headers and content based on the input HTTP request message. Represents an abstract request base class to make requests to a service. Unsuccessful response handlers for this request only. Exception handlers for this request only. Unsuccessful response handlers for this request only. Credential to use for this request. If implements then it will also be included as a handler of an unsuccessful response. Add an unsuccessful response handler for this request only. The unsuccessful response handler. Must not be null. Add an exception handler for this request only. The exception handler. Must not be null. Add an unsuccessful response handler for this request only. The unsuccessful response handler. Must not be null. Represents an abstract, strongly typed request base class to make requests to a service. Supports a strongly typed response. The type of the response object The class logger. The service on which this request will be executed. Defines whether the E-Tag will be used in a specified way or be ignored. Gets or sets the callback for modifying HTTP requests made by this service request. Override for service-wide validation configuration in . If this is null (the default) then the value from the service initializer is used to determine whether or not parameters should be validated client-side. If this is non-null, it overrides whatever value is specified in the service. Creates a new service request. Initializes request's parameters. Inherited classes MUST override this method to add parameters to the dictionary. Sync executes the request without parsing the result. Parses the response and deserialize the content into the requested response object. Creates the which is used to generate a request. A new builder instance which contains the HTTP method and the right Uri with its path and query parameters. Generates the right URL for this request. Returns the body of this request. The body of this request. Adds the right ETag action (e.g. If-Match) header to the given HTTP request if the body contains ETag. Returns the default ETagAction for a specific HTTP verb. Adds path and query parameters to the given requestBuilder. Extension methods for request objects. Allows a request to be configured in a fluent manner, where normally separate statements are required after the request creation method is called. The type of the request to configure. The request to configure. Must not be null. The configuration action to apply to the request. This is typically setting properties. Must not be null. The value of , after applying the configuration action. Extension methods to . Sets the content of the request by the given body and the the required GZip configuration. The request. The service. The body of the future request. If null do nothing. Indicates if the content will be wrapped in a GZip stream, or a regular string stream will be used. Creates a GZip content based on the given content. Content to GZip. GZiped HTTP content. Creates a GZip stream by the given serialized object. A client service request which supports both sync and async execution to get the stream. Gets the name of the method to which this request belongs. Gets the rest path of this request. Gets the HTTP method of this request. Gets the parameters information for this specific request. Gets the service which is related to this request. Creates a HTTP request message with all path and query parameters, ETag, etc. If null use the service default GZip behavior. Otherwise indicates if GZip is enabled or disabled. Executes the request asynchronously and returns the result stream. Executes the request asynchronously and returns the result stream. A cancellation token to cancel operation. Executes the request and returns the result stream. A client service request which inherits from and represents a specific service request with the given response type. It supports both sync and async execution to get the response. Executes the request asynchronously and returns the result object. Executes the request asynchronously and returns the result object. A cancellation token to cancel operation. Executes the request and returns the result object. Interface containing additional response-properties which will be added to every schema type which is a direct response to a request. The e-tag of this response. Will be set by the service deserialization method, or the by json response parser if implemented on service. A page streamer is a helper to provide both synchronous and asynchronous page streaming of a listable or queryable resource. The expected usage pattern is to create a single paginator for a resource collection, and then use the instance methods to obtain paginated results. To construct a page streamer to return snippets from the YouTube v3 Data API, you might use code such as the following. The pattern for other APIs would be very similar, with the request.PageToken, response.NextPageToken and response.Items properties potentially having different names. Constructing the page streamer doesn't require any service references or authentication, so it's completely safe to perform this in a type initializer. ( (request, token) => request.PageToken = token, response => response.NextPageToken, response => response.Items); ]]> The type of resource being paginated The type of request used to fetch pages The type of response obtained when fetching pages The type of the "next page token", which must be a reference type; a null reference for a token indicates the end of a stream of pages. Creates a paginator for later use. Action to modify a request to include the specified page token. Must not be null. Function to extract the next page token from a response. Must not be null. Function to extract a sequence of resources from a response. Must not be null, although it can return null if it is passed a response which contains no resources. Lazily fetches resources a page at a time. The initial request to send. If this contains a page token, that token is maintained. This will be modified with new page tokens over time, and should not be changed by the caller. (The caller should clone the request if they want an independent object to use in other calls or to modify.) Must not be null. A sequence of resources, which are fetched a page at a time. Must not be null. Asynchronously (but eagerly) fetches a complete set of resources, potentially making multiple requests. The initial request to send. If this contains a page token, that token is maintained. This will be modified with new page tokens over time, and should not be changed by the caller. (The caller should clone the request if they want an independent object to use in other calls or to modify.) Must not be null. A sequence of resources, which are fetched asynchronously and a page at a time. A task whose result (when complete) is the complete set of results fetched starting with the given request, and continuing to make further requests until a response has no "next page" token. Helps build version strings for the x-goog-api-client header. The value is a space-separated list of name/value pairs, where the value should be a semantic version string. Names must be unique. The name of the header to set. Appends the given name/version string to the list. The name. Must not be null or empty, or contain a space or a slash. The version. Must not be null, or contain a space or a slash. Appends a name/version string, taking the version from the version of the assembly containing the given type. Appends the .NET environment information to the list. Clones this VersionHeaderBuilder, creating an independent copy with the same names/values. A clone of this builder. A base class for a client service which provides common mechanism for all services, like serialization and GZip support. It should be safe to use a single service instance to make server requests concurrently from multiple threads. This class adds a special to the execute interceptor list, which uses the given Authenticator. It calls to its applying authentication method, and injects the "Authorization" header in the request. If the given Authenticator implements , this class adds the Authenticator to the 's unsuccessful response handler list. The class logger. The default maximum allowed length of a URL string for GET requests. An initializer class for the client service. Gets or sets the factory for creating instance. If this property is not set the service uses a new instance. Gets or sets a HTTP client initializer which is able to customize properties on and . Get or sets the exponential back-off policy used by the service. Default value is UnsuccessfulResponse503, which means that exponential back-off is used on 503 abnormal HTTP response. If the value is set to None, no exponential back-off policy is used, and it's up to the user to configure the in an to set a specific back-off implementation (using ). Gets or sets whether this service supports GZip. Default value is true. Gets or sets the serializer. Default value is . Gets or sets the API Key. Default value is null. Gets or sets Application name to be used in the User-Agent header. Default value is null. Maximum allowed length of a URL string for GET requests. Default value is 2048. If the value is set to 0, requests will never be modified due to URL string length. Gets or sets the base URI to use for the service. If the value is null, the default base URI for the service is used. Builder for the x-goog-api-client header, collecting version information. Services automatically add the API library version to this. Most users will never need to configure this, but higher level abstraction Google libraries may add their own version here. Determines whether request parameters are validated (client-side) by default. Defaults to true. This can be overridden on a per-request basis using . Constructs a new initializer with default values. Constructs a new base client with the specified initializer. Determines whether or not request parameters should be validated client-side. This may be overridden on a per-request basis. The BaseUri provided in the initializer, which may be null. Returns true if this service contains the specified feature. Creates the back-off handler with . Overrides this method to change the default behavior of back-off handler (e.g. you can change the maximum waited request's time span, or create a back-off handler with you own implementation of ). The URI used for batch operations. The path used for batch operations. Client service contains all the necessary information a Google service requires. Each concrete has a reference to a service for important properties like API key, application name, base Uri, etc. This service interface also contains serialization methods to serialize an object to stream and deserialize a stream into an object. Gets the HTTP client which is used to create requests. Gets a HTTP client initializer which is able to custom properties on and . Gets the service name. Gets the BaseUri of the service. All request paths should be relative to this URI. Gets the BasePath of the service. Gets the supported features by this service. Gets or sets whether this service supports GZip. Gets the API-Key (DeveloperKey) which this service uses for all requests. Gets the application name to be used in the User-Agent header. Sets the content of the request by the given body and the this service's configuration. First the body object is serialized by the Serializer and then, if GZip is enabled, the content will be wrapped in a GZip stream, otherwise a regular string stream will be used. Gets the Serializer used by this service. Serializes an object into a string representation. Deserializes a response into the specified object. Deserializes an error response into a object. If no error is found in the response. Enum to communicate the status of an upload for progress reporting. The upload has not started. The upload is initializing. Data is being uploaded. The upload completed successfully. The upload failed. Interface reporting upload progress. Gets the current status of the upload Gets the approximate number of bytes sent to the server. Gets an exception if one occurred. Interface IUploadSessionData: Provides UploadUri for client to persist. Allows resuming an upload after a program restart for seekable ContentStreams. Defines the data passed from the ResumeableUpload class upon initiation of an upload. When the client application adds an event handler for the UploadSessionData event, the data defined in this interface (currently the UploadURI) is passed as a parameter to the event handler procedure. An event handler for the UploadSessionData event is only required if the application will support resuming the upload after a program restart. The resumable session URI (UploadUri) Media upload which uses Google's resumable media upload protocol to upload data. See: https://developers.google.com/drive/manage-uploads#resumable for more information on the protocol. The class logger. Minimum chunk size (except the last one). Default value is 256*KB. Default chunk size. Default value is 10*MB. Defines how many bytes are read from the input stream in each stream read action. The read will continue until we read or we reached the end of the stream. Indicates the stream's size is unknown. Content-Range header value for the body upload of zero length files. The x-goog-api-client header value used for resumable uploads initiated without any options or an HttpClient. Creates a instance. The data to be uploaded. Must not be null. The options for the upload operation. May be null. Creates a instance for a resumable upload session which has already been initiated. See https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#start-resumable for more information about initiating resumable upload sessions and saving the session URI, or upload URI. The session URI of the resumable upload session. Must not be null. The data to be uploaded. Must not be null. The options for the upload operation. May be null. The instance which can be used to upload the specified content. Gets the options used to control the resumable upload. Gets the HTTP client to use to make requests. Gets or sets the stream to upload. Gets or sets the length of the steam. Will be if the media content length is unknown. The buffer used for reading from the stream, to prepare HTTP requests. This is used for both seekable and non-seekable streams, but in a slightly different way: with seekable streams, we never reuse any *data* between chunks, just the allocated byte arrays. For non-seekable streams, if some of the data we sent was not received by the server, we reuse the data in the buffer. Gets or sets the resumable session URI. See https://developers.google.com/drive/manage-uploads#save-session-uri" for more details. Gets or sets the amount of bytes the server had received so far. Gets or sets the amount of bytes the client had sent so far. Change this value ONLY for testing purposes! Gets or sets the size of each chunk sent to the server. Chunks (except the last chunk) must be a multiple of to be compatible with Google upload servers. Event called whenever the progress of the upload changes. Interceptor used to propagate data successfully uploaded on each chunk. Callback class that is invoked on abnormal response or an exception. This class changes the request to query the current status of the upload in order to find how many bytes were successfully uploaded before the error occurred. See https://developers.google.com/drive/manage-uploads#resume-upload for more details. Constructs a new callback and register it as unsuccessful response handler and exception handler on the configurable message handler. Changes the request in order to resume the interrupted upload. Class that communicates the progress of resumable uploads to a container. Create a ResumableUploadProgress instance. The status of the upload. The number of bytes sent so far. Create a ResumableUploadProgress instance. An exception that occurred during the upload. The number of bytes sent before this exception occurred. Current state of progress of the upload. Updates the current progress and call the event to notify listeners. Get the current progress state. An IUploadProgress describing the current progress of the upload. Event called when an UploadUri is created. Not needed if the application program will not support resuming after a program restart. Within the event, persist the UploadUri to storage. It is strongly recommended that the full path filename (or other media identifier) is also stored so that it can be compared to the current open filename (media) upon restart. Data to be passed to the application program to allow resuming an upload after a program restart. Create a ResumeableUploadSessionData instance to pass the UploadUri to the client. The resumable session URI. Send data (UploadUri) to application so it can store it to persistent storage. Uploads the content to the server. This method is synchronous and will block until the upload is completed. In case the upload fails the will contain the exception that cause the failure. Uploads the content asynchronously to the server. Uploads the content to the server using the given cancellation token. In case the upload fails will contain the exception that cause the failure. The only exception which will be thrown is which indicates that the task was canceled. A cancellation token to cancel operation. Resumes the upload from the last point it was interrupted. Use when resuming and the program was not restarted. Resumes the upload from the last point it was interrupted. Use when the program was restarted and you wish to resume the upload that was in progress when the program was halted. Implemented only for ContentStreams where .CanSeek is True. In your application's UploadSessionData Event Handler, store UploadUri.AbsoluteUri property value (resumable session URI string value) to persistent storage for use with Resume() or ResumeAsync() upon a program restart. It is strongly recommended that the FullPathFilename of the media file that is being uploaded is saved also so that a subsequent execution of the program can compare the saved FullPathFilename value to the FullPathFilename of the media file that it has opened for uploading. You do not need to seek to restart point in the ContentStream file. VideosResource.InsertMediaUpload UploadUri property value that was saved to persistent storage during a prior execution. Asynchronously resumes the upload from the last point it was interrupted. You do not need to seek to restart point in the ContentStream file. Asynchronously resumes the upload from the last point it was interrupted. Use when resuming and the program was not restarted. You do not need to seek to restart point in the ContentStream file. A cancellation token to cancel the asynchronous operation. Asynchronously resumes the upload from the last point it was interrupted. Use when resuming and the program was restarted. Implemented only for ContentStreams where .CanSeek is True. In your application's UploadSessionData Event Handler, store UploadUri.AbsoluteUri property value (resumable session URI string value) to persistent storage for use with Resume() or ResumeAsync() upon a program restart. It is strongly recommended that the FullPathFilename of the media file that is being uploaded is saved also so that a subsequent execution of the program can compare the saved FullPathFilename value to the FullPathFilename of the media file that it has opened for uploading. You do not need to seek to restart point in the ContentStream file. VideosResource.InsertMediaUpload UploadUri property value that was saved to persistent storage during a prior execution. Asynchronously resumes the upload from the last point it was interrupted. Use when the program was restarted and you wish to resume the upload that was in progress when the program was halted. Implemented only for ContentStreams where .CanSeek is True. In your application's UploadSessionData Event Handler, store UploadUri.AbsoluteUri property value (resumable session URI string value) to persistent storage for use with Resume() or ResumeAsync() upon a program restart. It is strongly recommended that the FullPathFilename of the media file that is being uploaded is saved also so that a subsequent execution of the program can compare the saved FullPathFilename value to the FullPathFilename of the media file that it has opened for uploading. You do not need to seek to restart point in the ContentStream file. VideosResource.InsertMediaUpload UploadUri property value that was saved to persistent storage during a prior execution. A cancellation token to cancel the asynchronous operation. The core logic for uploading a stream. It is used by the upload and resume methods. Initiates the resumable upload session and returns the session URI, or upload URI. See https://developers.google.com/drive/manage-uploads#start-resumable and https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#start-resumable for more information. The token to monitor for cancellation requests. The task containing the session URI to use for the resumable upload. Process a response from the final upload chunk call. The response body from the final uploaded chunk. Uploads the next chunk of data to the server. True if the entire media has been completely uploaded. Handles a media upload HTTP response. True if the entire media has been completely uploaded. Creates a instance using the error response from the server. The error response. An exception which can be thrown by the caller. A callback when the media was uploaded successfully. Prepares the given request with the next chunk in case the steam length is unknown. Prepares the given request with the next chunk in case the steam length is known. Returns the next byte index need to be sent. Build a content range header of the form: "bytes X-Y/T" where: X is the first byte being sent. Y is the last byte in the range being sent (inclusive). T is the total number of bytes in the range or * for unknown size. See: RFC2616 HTTP/1.1, Section 14.16 Header Field Definitions, Content-Range http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16 Start of the chunk. Size of the chunk being sent. The content range header value. A buffer to be uploaded. This abstraction allows us to use small byte arrays, avoiding anything which might end up on the large object heap. The upload using this buffer; used to find the chunk size etc. The capacity of this buffer; will read until the buffer contains this much data. The amount of usable data within the buffer. The data in the buffer, divided into blocks each of size (at most) . Reads from the stream until the stream has run out of data, or the buffer is full. The stream to read from true if the stream is exhausted; false otherwise Resets the length of this buffer to 0, *effectively* discarding the data within it. (The blocks are actually retained for reuse.) Returns the block that contains the specified offset, creating it if necessary. The offset within the buffer to fetch the block for. The offset within the returned block corresponding to within the buffer. The block for the given position. Moves any unsent data to the start of this buffer, based on the number of bytes we actually sent, and the number of bytes the server received. Creates an HttpContent for the data in this buffer, up to bytes. The length of the content. Determines how much data should actually be sent from this buffer. A read-only stream reading from an UploadBuffer, reading all the blocks in turn. Media upload which uses Google's resumable media upload protocol to upload data. See: https://developers.google.com/drive/manage-uploads#resumable for more information on the protocol. The type of the body of this request. Generally this should be the metadata related to the content to be uploaded. Must be serializable to/from JSON. Payload description headers, describing the content itself. Payload description headers, describing the content itself. Specify the type of this upload (this class supports resumable only). The uploadType parameter value for resumable uploads. Create a resumable upload instance with the required parameters. The client service. The path for this media upload method. The HTTP method to start this upload. The stream containing the content to upload. Content type of the content to be uploaded. Some services may allow this to be null; others require a content type to be specified and will fail when the upload is started if the value is null. Caller is responsible for maintaining the open until the upload is completed. Caller is responsible for closing the . Gets or sets the service. Gets or sets the path of the method (combined with ) to produce absolute Uri. Gets or sets the HTTP method of this upload (used to initialize the upload). Gets or sets the stream's Content-Type. Gets or sets the body of this request. Creates a request to initialize a request. Reflectively enumerate the properties of this object looking for all properties containing the RequestParameterAttribute and copy their values into the request builder. Media upload which uses Google's resumable media upload protocol to upload data. The version with two types contains both a request object and a response object. See: https://developers.google.com/gdata/docs/resumable_upload for information on the protocol. The type of the body of this request. Generally this should be the metadata related to the content to be uploaded. Must be serializable to/from JSON. The type of the response body. Create a resumable upload instance with the required parameters. The client service. The path for this media upload method. The HTTP method to start this upload. The stream containing the content to upload. Content type of the content to be uploaded. Considerations regarding : If is seekable, then the stream position will be reset to 0 before reading commences. If is not seekable, then it will be read from its current position. Caller is responsible for maintaining the open until the upload is completed. Caller is responsible for closing the . The response body. This property will be set during upload. The event is triggered when this has been set. Event which is called when the response metadata is processed. Process the response body Options for operations. Gets or sets the HTTP client to use when starting the upload sessions and uploading data. Gets or sets the callback for modifying the session initiation request. See https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#start-resumable for more information. Note: If these options are used with a created using , this property will be ignored as the session has already been initiated. Gets or sets the serializer to use when parsing error responses. Gets or sets the name of the service performing the upload. This will be used to set the in the event of an error. Gets the as a if it is an instance of one. File data store that implements . This store creates a different file for each combination of type and key. This file data store stores a JSON format of the specified object. Gets the full folder path. Constructs a new file data store. If fullPath is false the path will be used as relative to Environment.SpecialFolder.ApplicationData" on Windows, or $HOME on Linux and MacOS, otherwise the input folder will be treated as absolute. The folder is created if it doesn't exist yet. Folder path. Defines whether the folder parameter is absolute or relative to Environment.SpecialFolder.ApplicationData on Windows, or$HOME on Linux and MacOS. Stores the given value for the given key. It creates a new file (named ) in . The type to store in the data store. The key. The value to store in the data store. Deletes the given key. It deletes the named file in . The key to delete from the data store. Returns the stored value for the given key or null if the matching file ( in doesn't exist. The type to retrieve. The key to retrieve from the data store. The stored object. Clears all values in the data store. This method deletes all files in . Creates a unique stored key based on the key and the class type. The object key. The type to store or retrieve. A null datastore. Nothing is stored, nothing is retrievable. Construct a new null datastore, that stores nothing. Asynchronously returns the stored value for the given key or null if not found. This implementation of will always return a completed task with a result of null. The type to retrieve from the data store. The key to retrieve its value. Always null. Asynchronously stores the given value for the given key (replacing any existing value). This implementation of does not store the value, and will not return it in future calls to . The type to store in the data store. The key. The value. A task that completes immediately.