diff --git a/APACHE-2.0-LICENSE.txt b/APACHE-2.0-LICENSE.txt new file mode 100644 index 000000000..a666c6e07 --- /dev/null +++ b/APACHE-2.0-LICENSE.txt @@ -0,0 +1,13 @@ +Copyright 2012 James South + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj b/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj index c8d790034..d5a7bd202 100644 --- a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj +++ b/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj @@ -83,6 +83,9 @@ ImageProcessor + + + diff --git a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs b/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs index 088053df6..938f3cf15 100644 --- a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs +++ b/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs @@ -1,67 +1,137 @@ -namespace ImageProcessor.Tests +// ----------------------------------------------------------------------- +// +// Copyright (c) James South. +// Licensed under the Apache License, Version 2.0. +// +// ----------------------------------------------------------------------- +namespace ImageProcessor.Tests { #region Using - using System; - using System.Diagnostics; using System.Drawing; - using System.IO; - using System.Text.RegularExpressions; using ImageProcessor.Imaging; using ImageProcessor.Processors; using Microsoft.VisualStudio.TestTools.UnitTesting; #endregion + /// + /// The regular expression unit tests. + /// This is a work in progress. YAWN! + /// [TestClass] public class RegularExpressionUnitTests { #region Regular Expression Tests + + /// + /// The alpha regex unit test. + /// [TestMethod] public void TestAlphaRegex() { - const string querystring = "alpha=56"; - const int expected = 56; + const string Querystring = "alpha=56"; + const int Expected = 56; Alpha alpha = new Alpha(); - alpha.MatchRegexIndex(querystring); + alpha.MatchRegexIndex(Querystring); int actual = alpha.DynamicParameter; - Assert.AreEqual(expected, actual); + Assert.AreEqual(Expected, actual); } + /// + /// The rotate regex unit test. + /// + [TestMethod] + public void TestCropRegex() + { + const string Querystring = "crop=0-0-150-300"; + Rectangle expected = new Rectangle(0, 0, 150, 300); + + Crop crop = new Crop(); + crop.MatchRegexIndex(Querystring); + + Rectangle actual = crop.DynamicParameter; + + Assert.AreEqual(expected, actual); + } + + /// + /// The filter regex unit test. + /// + [TestMethod] + public void TestFilterRegex() + { + // Should really write more for the other filters. + const string Querystring = "filter=lomograph"; + const string Expected = "lomograph"; + + Filter filter = new Filter(); + filter.MatchRegexIndex(Querystring); + + string actual = filter.DynamicParameter; + + Assert.AreEqual(Expected, actual); + } + + /// + /// The format regex unit test. + /// [TestMethod] public void TestFormatRegex() { - string querystring = "format=gif"; - string expected = "gif"; + const string Querystring = "format=gif"; + const string Expected = "gif"; Format format = new Format(); - format.MatchRegexIndex(querystring); + format.MatchRegexIndex(Querystring); string actual = format.DynamicParameter; - Assert.AreEqual(expected, actual); + Assert.AreEqual(Expected, actual); } + /// + /// The quality regex unit test. + /// [TestMethod] public void TestQualityRegex() { - string querystring = "quality=56"; - int expected = 56; + const string Querystring = "quality=56"; + const int Expected = 56; Quality quality = new Quality(); - quality.MatchRegexIndex(querystring); + quality.MatchRegexIndex(Querystring); int actual = quality.DynamicParameter; - Assert.AreEqual(expected, actual); + Assert.AreEqual(Expected, actual); + } + + /// + /// The resize regex unit test. + /// + [TestMethod] + public void TestResizeRegex() + { + const string Querystring = "width=300"; + Size expected = new Size(300, 0); + + Resize resize = new Resize(); + + resize.MatchRegexIndex(Querystring); + Size actual = resize.DynamicParameter; + + Assert.AreEqual(expected, actual); } + /// + /// The rotate regex unit test. + /// [TestMethod] public void TestRotateRegex() { - // Why does this fail? - string querystring = "rotate=270"; + const string Querystring = "rotate=270"; RotateLayer expected = new RotateLayer { Angle = 270, @@ -69,11 +139,13 @@ }; Rotate rotate = new Rotate(); - rotate.MatchRegexIndex(querystring); + rotate.MatchRegexIndex(Querystring); RotateLayer actual = rotate.DynamicParameter; - Assert.AreEqual(expected, actual); + // Can't use are equal on rotatelayer for some reason so test the two properties. + Assert.AreEqual(expected.Angle, actual.Angle); + Assert.AreEqual(expected.BackgroundColor, actual.BackgroundColor); } #endregion } diff --git a/src/ImageProcessor.Tests/app.config b/src/ImageProcessor.Tests/app.config new file mode 100644 index 000000000..80d104d02 --- /dev/null +++ b/src/ImageProcessor.Tests/app.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ImageProcessor.Web/Caching/Cache.cs b/src/ImageProcessor.Web/Caching/Cache.cs deleted file mode 100644 index 541173412..000000000 --- a/src/ImageProcessor.Web/Caching/Cache.cs +++ /dev/null @@ -1,457 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. -// -// ----------------------------------------------------------------------- - -namespace ImageProcessor.Web.Caching -{ - #region Using - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text.RegularExpressions; - using System.Threading.Tasks; - using System.Web; - using System.Web.Hosting; - using ImageProcessor.Helpers.Extensions; - using ImageProcessor.Web.Config; - #endregion - - /// - /// The cache. - /// - internal sealed class Cache - { - #region Fields - /// - /// The maximum number of days to cache files on the system for. - /// - internal static readonly int MaxFileCachedDuration = ImageProcessorConfig.Instance.MaxCacheDays; - - /// - /// The valid sub directory chars. This used in combination with the file limit per folder - /// allows the storage of 360,000 image files in the cache. - /// - private const string ValidSubDirectoryChars = "abcdefghijklmnopqrstuvwxyz0123456789"; - - /// - /// The maximum number of files allowed in the directory. - /// - /// - /// NTFS directories can handle up to 10,000 files in the directory before slowing down. - /// This will help us to ensure that don't go over that limit. - /// - /// - /// - /// - private const int MaxFilesCount = 10000; - - /// - /// The regular expression to search strings for file extensions. - /// - private static readonly Regex FormatRegex = new Regex( - @"(jpeg|png|bmp|gif)", RegexOptions.RightToLeft | RegexOptions.Compiled); - - /// - /// The regular expression to search strings for valid subfolder names. - /// We're specifically not using a shorter regex as we need to be able to iterate through - /// each match group. - /// - private static readonly Regex SubFolderRegex = - new Regex( - @"(\/(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|0|1|2|3|4|5|6|7|8|9)\/)", - RegexOptions.Compiled); - - /// - /// The absolute path to virtual cache path on the server. - /// - private static readonly string AbsoluteCachePath = - HostingEnvironment.MapPath(ImageProcessorConfig.Instance.VirtualCachePath); - - /// - /// The concurrent dictionary. - /// - private static ConcurrentDictionary concurrentDictionary = - new ConcurrentDictionary(); - - /// - /// The request path for the image. - /// - private string requestPath; - - /// - /// The image name - /// - private string imageName; - - /// - /// Whether the request is for a remote image. - /// - private bool isRemote; - #endregion - - #region Constructors - public Cache(string requestPath, string fullPath, string imageName, bool isRemote) - { - this.requestPath = requestPath; - this.imageName = imageName; - this.isRemote = isRemote; - this.CachedPath = this.GetCachePath(fullPath, imageName); - } - #endregion - - #region Properties - /// - /// Gets the cached path. - /// - internal string CachedPath { get; private set; } - #endregion - - #region Methods - #region Internal - /// - /// Converts an absolute file path - /// - /// The absolute path to convert. - /// The from the current context. - /// The virtual path to the file. - internal string GetVirtualPath(string absolutePath, HttpRequest request) - { - string applicationPath = request.PhysicalApplicationPath; - string virtualDir = request.ApplicationPath; - virtualDir = virtualDir == "/" ? virtualDir : (virtualDir + "/"); - - if (applicationPath != null) - { - return absolutePath.Replace(applicationPath, virtualDir).Replace(@"\", "/"); - } - - throw new InvalidOperationException( - "We can only map an absolute back to a relative path if the application path is available."); - } - - /// - /// Creates the cache directories for storing images. - /// - /// - /// The true if the cache directories are created successfully; otherwise, false. - /// - internal static /*async*/ Task CreateDirectoriesAsync() - { - return CreateDirectoriesAsyncTasks().ToTask(); - } - - /// - /// Adds an image to the cache. - /// - /// - /// The cached path. - /// - /// - /// The last write time. - /// - /// - /// The task. - /// - internal Task /*async*/ AddImageToCacheAsync(DateTime lastWriteTimeUtc) - { - return this.AddImageToCacheAsyncTask(lastWriteTimeUtc).ToTask(); - } - - /// - /// Returns a value indicating whether the original file is new or has been updated. - /// - /// - /// True if the the original file is new or has been updated; otherwise, false. - /// - internal /*async*/ Task isNewOrUpdatedFileAsync() - { - return this.isNewOrUpdatedFileAsyncTask().ToTask(); - } - - /// - /// Sets the LastWriteTime of the cached file to match the original file. - /// - /// The set to the last write time of the file. - /// - internal /*async*/ Task SetCachedLastWriteTimeAsync() - { - return this.SetCachedLastWriteTimeAsyncTask().ToTask(); - } - - /// - /// Purges any files from the file-system cache in the given folders. - /// - internal /*async*/ Task TrimCachedFoldersAsync() - { - return this.TrimCachedFoldersAsyncTask().ToTask(); - } - #endregion - - #region Private - /// - /// The create directories async tasks. - /// - /// - /// The . - /// - private static IEnumerable CreateDirectoriesAsyncTasks() - { - bool success = true; - - try - { - Parallel.ForEach( - ValidSubDirectoryChars.ToCharArray(), - (extension, loop) => - { - string path = Path.Combine(AbsoluteCachePath, extension.ToString(CultureInfo.InvariantCulture)); - DirectoryInfo directoryInfo = new DirectoryInfo(path); - - if (!directoryInfo.Exists) - { - directoryInfo.Create(); - } - }); - } - catch - { - success = false; - } - - yield return TaskEx.FromResult(success); - } - - /// - /// Adds an image to the cache. - /// - /// - /// The last write time. - /// - /// - /// The . - /// - private IEnumerable AddImageToCacheAsyncTask(DateTime lastWriteTimeUtc) - { - string key = Path.GetFileNameWithoutExtension(this.CachedPath); - DateTime expires = DateTime.UtcNow.AddDays(MaxFileCachedDuration).ToUniversalTime(); - CachedImage cachedImage = new CachedImage(this.CachedPath, MaxFileCachedDuration, lastWriteTimeUtc, expires); - PersistantDictionary.Instance.Add(key, cachedImage); - - yield break; - } - - /// - /// Returns a value indicating whether the original file is new or has been updated. - /// - /// - /// The . - /// - private IEnumerable isNewOrUpdatedFileAsyncTask() - { - string key = Path.GetFileNameWithoutExtension(this.CachedPath); - CachedImage cachedImage; - bool isUpdated = false; - - if (this.isRemote) - { - if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) - { - // Can't check the last write time so check to see if the cached image is set to expire - // or if the max age is different. - if (cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) - || cachedImage.MaxAge != MaxFileCachedDuration) - { - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) - { - isUpdated = true; - } - } - } - else - { - // Nothing in the cache so we should return true. - isUpdated = true; - } - } - - // Test now for locally requested files. - if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) - { - FileInfo imageFileInfo = new FileInfo(this.requestPath); - - if (imageFileInfo.Exists) - { - // Check to see if the last write time is different of whether the - // cached image is set to expire or if the max age is different. - if (imageFileInfo.LastWriteTimeUtc != cachedImage.LastWriteTimeUtc - || cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) - || cachedImage.MaxAge != MaxFileCachedDuration) - { - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) - { - isUpdated = true; - } - } - } - } - else - { - // Nothing in the cache so we should return true. - isUpdated = true; - } - - yield return TaskEx.FromResult(isUpdated); - } - - /// - /// Sets the LastWriteTime of the cached file to match the original file. - /// - /// - /// The original image path. - /// - /// - /// The cached image path. - /// - /// Whether the file is remote. - /// - /// The . - /// - private IEnumerable SetCachedLastWriteTimeAsyncTask() - { - FileInfo cachedFileInfo = new FileInfo(this.CachedPath); - DateTime lastWriteTime = DateTime.MinValue.ToUniversalTime(); - - if (isRemote) - { - if (cachedFileInfo.Exists) - { - lastWriteTime = cachedFileInfo.LastWriteTimeUtc; - } - } - else - { - FileInfo imageFileInfo = new FileInfo(this.requestPath); - - if (imageFileInfo.Exists && cachedFileInfo.Exists) - { - DateTime dateTime = imageFileInfo.LastWriteTimeUtc; - cachedFileInfo.LastWriteTimeUtc = dateTime; - - lastWriteTime = dateTime; - } - } - - yield return TaskEx.FromResult(lastWriteTime); - } - - /// - /// Purges any files from the file-system cache in the given folders. - /// - /// - /// The . - /// - private IEnumerable TrimCachedFoldersAsyncTask() - { - // Group each cache folder and clear any expired items or any that exeed - // the maximum allowable count. - var groups = PersistantDictionary.Instance.ToList() - .GroupBy(x => SubFolderRegex.Match(x.Value.Path).Value) - .Where(g => g.Count() > MaxFilesCount); - - foreach (var group in groups) - { - int groupCount = group.Count(); - - foreach (KeyValuePair pair in group.OrderBy(x => x.Value.ExpiresUtc)) - { - // If the group count is equal to the max count minus 1 then we know we - // are counting down from a full directory not simply clearing out - // expired items. - if (groupCount == MaxFilesCount - 1) - { - break; - } - - try - { - // Remove from the cache and delete each CachedImage. - FileInfo fileInfo = new FileInfo(pair.Value.Path); - string key = Path.GetFileNameWithoutExtension(fileInfo.Name); - CachedImage cachedImage; - - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) - { - fileInfo.Delete(); - groupCount -= 1; - } - } - catch (Exception) - { - // Do Nothing, skip to the next. - // TODO: Should we handle this? - continue; - } - } - } - - yield break; - } - - /// - /// Gets the full transformed cached path for the image. - /// The file names are stored as MD5 encrypted versions of the full request path. - /// This should make them unique enough to - /// - /// The original image path. - /// The original image name. - /// The full cached path for the image. - private string GetCachePath(string fullPath, string imageName) - { - string cachedPath = string.Empty; - - if (AbsoluteCachePath != null) - { - // Use an md5 hash of the full path including the querystring to create the image name. - // That name can also be used as a key for the cached image and we should be able to use - // The first character of that hash as a subfolder. - string parsedExtension = this.ParseExtension(fullPath); - string fallbackExtension = imageName.Substring(imageName.LastIndexOf(".", StringComparison.Ordinal) + 1); - string encryptedName = fullPath.ToMD5Fingerprint(); - string subpath = encryptedName.Substring(0, 1); - - string cachedFileName = string.Format( - "{0}.{1}", - encryptedName, - !string.IsNullOrWhiteSpace(parsedExtension) ? parsedExtension : fallbackExtension); - - cachedPath = Path.Combine(AbsoluteCachePath, subpath, cachedFileName); - } - - return cachedPath; - } - - /// - /// Returns the correct file extension for the given string input - /// - /// - /// The string to parse. - /// - /// - /// The correct file extension for the given string input if it can find one; otherwise an empty string. - /// - private string ParseExtension(string input) - { - Match match = FormatRegex.Match(input); - - return match.Success ? match.Value : string.Empty; - } - #endregion - #endregion - } -} diff --git a/src/ImageProcessor.Web/Caching/CachedImage.cs b/src/ImageProcessor.Web/Caching/CachedImage.cs index 7d01c168a..bc7ef15b7 100644 --- a/src/ImageProcessor.Web/Caching/CachedImage.cs +++ b/src/ImageProcessor.Web/Caching/CachedImage.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -42,21 +42,21 @@ namespace ImageProcessor.Web.Caching /// /// Gets or sets the value of the cached image. /// - public string Path { get; set; } + internal string Path { get; set; } /// /// Gets or sets the maximum age of the cached image in days. /// - public int MaxAge { get; set; } + internal int MaxAge { get; set; } /// /// Gets or sets the last write time of the cached image. /// - public DateTime LastWriteTimeUtc { get; set; } + internal DateTime LastWriteTimeUtc { get; set; } /// /// Gets or sets when the cached image should expire from the cache. /// - public DateTime ExpiresUtc { get; set; } + internal DateTime ExpiresUtc { get; set; } } } diff --git a/src/ImageProcessor.Web/Caching/Copy of DiskCache.cs b/src/ImageProcessor.Web/Caching/Copy of DiskCache.cs deleted file mode 100644 index 84fc204e3..000000000 --- a/src/ImageProcessor.Web/Caching/Copy of DiskCache.cs +++ /dev/null @@ -1,346 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. -// -// ----------------------------------------------------------------------- - -namespace ImageProcessor.Web.Caching -{ - #region Using - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text.RegularExpressions; - using System.Threading.Tasks; - using System.Web; - using System.Web.Hosting; - using ImageProcessor.Helpers.Extensions; - using ImageProcessor.Web.Config; - #endregion - - /// - /// Encapsulates methods to handle disk caching of images. - /// - internal sealed class DiskCache - { - #region Fields - /// - /// The maximum number of days to cache files on the system for. - /// - internal static readonly int MaxFileCachedDuration = ImageProcessorConfig.Instance.MaxCacheDays; - - /// - /// The valid sub directory chars. This used in combination with the file limit per folder - /// allows the storage of 360,000 image files in the cache. - /// - private const string ValidSubDirectoryChars = "abcdefghijklmnopqrstuvwxyz0123456789"; - - /// - /// The maximum number of files allowed in the directory. - /// - /// - /// NTFS directories can handle up to 10,000 files in the directory before slowing down. - /// This will help us to ensure that don't go over that limit. - /// - /// - /// - /// - private const int MaxFilesCount = 10000; - - /// - /// The regular expression to search strings for file extensions. - /// - private static readonly Regex FormatRegex = new Regex( - @"(jpeg|png|bmp|gif)", RegexOptions.RightToLeft | RegexOptions.Compiled); - - /// - /// The regular expression to search strings for valid subfolder names. - /// We're specifically not using a shorter regex as we need to be able to iterate through - /// each match group. - /// - private static readonly Regex SubFolderRegex = new Regex(@"(\/(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|0|1|2|3|4|5|6|7|8|9)\/)", RegexOptions.Compiled); - - /// - /// The absolute path to virtual cache path on the server. - /// - private static readonly string AbsoluteCachePath = - HostingEnvironment.MapPath(ImageProcessorConfig.Instance.VirtualCachePath); - - #endregion - - #region Methods - /// - /// The create cache paths. - /// - /// - /// The true if the cache directories are created successfully; otherwise, false. - /// - internal static bool CreateCacheDirectories() - { - try - { - Parallel.ForEach( - ValidSubDirectoryChars.ToCharArray(), - (extension, loop) => - { - string path = Path.Combine(AbsoluteCachePath, extension.ToString(CultureInfo.InvariantCulture)); - DirectoryInfo directoryInfo = new DirectoryInfo(path); - - if (!directoryInfo.Exists) - { - directoryInfo.Create(); - } - }); - } - catch - { - return false; - } - - return true; - } - - /// - /// Gets the full transformed cached path for the image. - /// The file names are stored as MD5 encrypted versions of the full request path. - /// This should make them unique enough to - /// - /// The original image path. - /// The original image name. - /// The full cached path for the image. - internal static string GetCachePath(string imagePath, string imageName) - { - string cachedPath = string.Empty; - - if (AbsoluteCachePath != null) - { - // Use an md5 hash of the full path including the querystring to create the image name. - // That name can also be used as a key for the cached image and we should be able to use - // The first character of that hash as a subfolder. - string parsedExtension = ParseExtension(imagePath); - string fallbackExtension = imageName.Substring(imageName.LastIndexOf(".", StringComparison.Ordinal) + 1); - string encryptedName = imagePath.ToMD5Fingerprint(); - string subpath = encryptedName.Substring(0, 1); - - string cachedFileName = string.Format( - "{0}.{1}", - encryptedName, - !string.IsNullOrWhiteSpace(parsedExtension) ? parsedExtension : fallbackExtension); - - cachedPath = Path.Combine(AbsoluteCachePath, subpath, cachedFileName); - } - - return cachedPath; - } - - /// - /// Adds an image to the cache. - /// - /// - /// The cached path. - /// - /// - /// The last write time. - /// - internal static void AddImageToCache(string cachedPath, DateTime lastWriteTimeUtc) - { - string key = Path.GetFileNameWithoutExtension(cachedPath); - DateTime expires = DateTime.UtcNow.AddDays(MaxFileCachedDuration).ToUniversalTime(); - CachedImage cachedImage = new CachedImage(cachedPath, MaxFileCachedDuration, lastWriteTimeUtc, expires); - PersistantDictionary.Instance.Add(key, cachedImage); - } - - /// - /// Converts an absolute file path - /// - /// The absolute path to convert. - /// The from the current context. - /// The virtual path to the file. - internal static string GetVirtualPath(string absolutePath, HttpRequest request) - { - string applicationPath = request.PhysicalApplicationPath; - string virtualDir = request.ApplicationPath; - virtualDir = virtualDir == "/" ? virtualDir : (virtualDir + "/"); - - if (applicationPath != null) - { - return absolutePath.Replace(applicationPath, virtualDir).Replace(@"\", "/"); - } - - throw new InvalidOperationException("We can only map an absolute back to a relative path if the application path is available."); - } - - /// - /// Returns a value indicating whether the original file has been updated. - /// - /// The original image path. - /// The cached image path. - /// Whether the file is a remote request. - /// - /// True if the the original file has been updated; otherwise, false. - /// - internal static bool IsUpdatedFile(string imagePath, string cachedImagePath, bool isRemote) - { - string key = Path.GetFileNameWithoutExtension(cachedImagePath); - CachedImage cachedImage; - - if (isRemote) - { - if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) - { - // Can't check the last write time so check to see if the cached image is set to expire - // or if the max age is different. - if (cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) - || cachedImage.MaxAge != MaxFileCachedDuration) - { - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) - { - // We can jump out here. - return true; - } - } - - return false; - } - - // Nothing in the cache so we should return true. - return true; - } - - // Test now for locally requested files. - if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) - { - FileInfo imageFileInfo = new FileInfo(imagePath); - - if (imageFileInfo.Exists) - { - // Check to see if the last write time is different of whether the - // cached image is set to expire or if the max age is different. - if (imageFileInfo.LastWriteTimeUtc != cachedImage.LastWriteTimeUtc - || cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) - || cachedImage.MaxAge != MaxFileCachedDuration) - { - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) - { - return true; - } - } - } - } - else - { - // Nothing in the cache so we should return true. - return true; - } - - return false; - } - - /// - /// Sets the LastWriteTime of the cached file to match the original file. - /// - /// - /// The original image path. - /// - /// - /// The cached image path. - /// - /// Whether the file is remote. - /// - /// The set to the last write time of the file. - /// - internal static DateTime SetCachedLastWriteTime(string imagePath, string cachedImagePath, bool isRemote) - { - FileInfo cachedFileInfo = new FileInfo(cachedImagePath); - - if (isRemote) - { - if (cachedFileInfo.Exists) - { - return cachedFileInfo.LastWriteTimeUtc; - } - } - - FileInfo imageFileInfo = new FileInfo(imagePath); - - if (imageFileInfo.Exists && cachedFileInfo.Exists) - { - DateTime dateTime = imageFileInfo.LastWriteTimeUtc; - cachedFileInfo.LastWriteTimeUtc = dateTime; - - return dateTime; - } - - return DateTime.MinValue.ToUniversalTime(); - } - - /// - /// Purges any files from the file-system cache in the given folders. - /// - internal static void TrimCachedFolders() - { - // Group each cache folder and clear any expired items or any that exeed - // the maximum allowable count. - var groups = PersistantDictionary.Instance.ToList() - .GroupBy(x => SubFolderRegex.Match(x.Value.Path).Value) - .Where(g => g.Count() > MaxFilesCount); - - foreach (var group in groups) - { - int groupCount = group.Count(); - - foreach (KeyValuePair pair in group.OrderBy(x => x.Value.ExpiresUtc)) - { - // If the group count is equal to the max count minus 1 then we know we - // are counting down from a full directory not simply clearing out - // expired items. - if (groupCount == MaxFilesCount - 1) - { - break; - } - - try - { - // Remove from the cache and delete each CachedImage. - FileInfo fileInfo = new FileInfo(pair.Value.Path); - string key = Path.GetFileNameWithoutExtension(fileInfo.Name); - CachedImage cachedImage; - - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) - { - fileInfo.Delete(); - groupCount -= 1; - } - } - catch (Exception) - { - // Do Nothing, skip to the next. - // TODO: Should we handle this? - continue; - } - } - } - } - - /// - /// Returns the correct file extension for the given string input - /// - /// - /// The string to parse. - /// - /// - /// The correct file extension for the given string input if it can find one; otherwise an empty string. - /// - private static string ParseExtension(string input) - { - Match match = FormatRegex.Match(input); - - return match.Success ? match.Value : string.Empty; - } - - #endregion - } -} diff --git a/src/ImageProcessor.Web/Caching/DiskCache.cs b/src/ImageProcessor.Web/Caching/DiskCache.cs index 84fc204e3..5ad38d051 100644 --- a/src/ImageProcessor.Web/Caching/DiskCache.cs +++ b/src/ImageProcessor.Web/Caching/DiskCache.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -10,6 +10,7 @@ namespace ImageProcessor.Web.Caching #region Using using System; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; @@ -19,10 +20,11 @@ namespace ImageProcessor.Web.Caching using System.Web.Hosting; using ImageProcessor.Helpers.Extensions; using ImageProcessor.Web.Config; + using ImageProcessor.Web.Helpers; #endregion /// - /// Encapsulates methods to handle disk caching of images. + /// The disk cache. /// internal sealed class DiskCache { @@ -61,7 +63,10 @@ namespace ImageProcessor.Web.Caching /// We're specifically not using a shorter regex as we need to be able to iterate through /// each match group. /// - private static readonly Regex SubFolderRegex = new Regex(@"(\/(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|0|1|2|3|4|5|6|7|8|9)\/)", RegexOptions.Compiled); + private static readonly Regex SubFolderRegex = + new Regex( + @"(\/([a-z]|[0-9])\/(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|0|1|2|3|4|5|6|7|8|9)\/)", + RegexOptions.Compiled); /// /// The absolute path to virtual cache path on the server. @@ -69,125 +74,176 @@ namespace ImageProcessor.Web.Caching private static readonly string AbsoluteCachePath = HostingEnvironment.MapPath(ImageProcessorConfig.Instance.VirtualCachePath); + /// + /// The request for the image. + /// + private readonly HttpRequest request; + + /// + /// The request path for the image. + /// + private readonly string requestPath; + + /// + /// The full path for the image. + /// + private readonly string fullPath; + + /// + /// The image name + /// + private readonly string imageName; + + /// + /// Whether the request is for a remote image. + /// + private readonly bool isRemote; + #endregion + + #region Constructors + /// + /// Initializes a new instance of the class. + /// + /// + /// The request for the image. + /// + /// + /// The request path for the image. + /// + /// + /// The full path for the image. + /// + /// + /// The image name. + /// + /// + /// Whether the request is for a remote image. + /// + public DiskCache(HttpRequest request, string requestPath, string fullPath, string imageName, bool isRemote) + { + this.request = request; + this.requestPath = requestPath; + this.fullPath = fullPath; + this.imageName = imageName; + this.isRemote = isRemote; + this.CachedPath = this.GetCachePath(); + } + #endregion + + #region Properties + /// + /// Gets the cached path. + /// + internal string CachedPath { get; private set; } #endregion #region Methods + #region Internal /// - /// The create cache paths. + /// Creates the series of directories required to house our cached images. + /// The images are stored in paths that are based upon the MD5 of their full request path + /// taking the first and last characters of the hash to determine their location. + /// ~/cache/a/1/ab04g67p91.jpg + /// This allows us to store 36 folders within 36 folders giving us a total of 12,960,000 images. /// /// - /// The true if the cache directories are created successfully; otherwise, false. + /// True if the directories are successfully created; otherwise, false. /// - internal static bool CreateCacheDirectories() + [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")] + internal static bool CreateDirectories() { + bool success = true; + try { + // Split up our characters into an array to loop though. + char[] characters = ValidSubDirectoryChars.ToCharArray(); + + // Loop through and create the first level. Parallel.ForEach( - ValidSubDirectoryChars.ToCharArray(), - (extension, loop) => + characters, + (character, loop) => { - string path = Path.Combine(AbsoluteCachePath, extension.ToString(CultureInfo.InvariantCulture)); - DirectoryInfo directoryInfo = new DirectoryInfo(path); + string firstSubPath = Path.Combine(AbsoluteCachePath, character.ToString(CultureInfo.InvariantCulture)); + DirectoryInfo directoryInfo = new DirectoryInfo(firstSubPath); if (!directoryInfo.Exists) { directoryInfo.Create(); + + // Loop through and create the second level. + Parallel.ForEach( + characters, + (subCharacter, subLoop) => + { + string secondSubPath = Path.Combine(firstSubPath, subCharacter.ToString(CultureInfo.InvariantCulture)); + DirectoryInfo subDirectoryInfo = new DirectoryInfo(secondSubPath); + + if (!subDirectoryInfo.Exists) + { + subDirectoryInfo.Create(); + } + }); } }); } catch { - return false; + success = false; } - return true; + return success; } /// - /// Gets the full transformed cached path for the image. - /// The file names are stored as MD5 encrypted versions of the full request path. - /// This should make them unique enough to + /// Gets the virtual path to the cached processed image. /// - /// The original image path. - /// The original image name. - /// The full cached path for the image. - internal static string GetCachePath(string imagePath, string imageName) + /// The virtual path to the cached processed image. + internal string GetVirtualCachedPath() { - string cachedPath = string.Empty; + string applicationPath = this.request.PhysicalApplicationPath; + string virtualDir = this.request.ApplicationPath; + virtualDir = virtualDir == "/" ? virtualDir : (virtualDir + "/"); - if (AbsoluteCachePath != null) + if (applicationPath != null) { - // Use an md5 hash of the full path including the querystring to create the image name. - // That name can also be used as a key for the cached image and we should be able to use - // The first character of that hash as a subfolder. - string parsedExtension = ParseExtension(imagePath); - string fallbackExtension = imageName.Substring(imageName.LastIndexOf(".", StringComparison.Ordinal) + 1); - string encryptedName = imagePath.ToMD5Fingerprint(); - string subpath = encryptedName.Substring(0, 1); - - string cachedFileName = string.Format( - "{0}.{1}", - encryptedName, - !string.IsNullOrWhiteSpace(parsedExtension) ? parsedExtension : fallbackExtension); - - cachedPath = Path.Combine(AbsoluteCachePath, subpath, cachedFileName); + return this.CachedPath.Replace(applicationPath, virtualDir).Replace(@"\", "/"); } - return cachedPath; + throw new InvalidOperationException( + "We can only map an absolute back to a relative path if the application path is available."); } /// /// Adds an image to the cache. /// - /// - /// The cached path. - /// /// /// The last write time. /// - internal static void AddImageToCache(string cachedPath, DateTime lastWriteTimeUtc) + /// + /// The . + /// + internal async Task AddImageToCacheAsync(DateTime lastWriteTimeUtc) { - string key = Path.GetFileNameWithoutExtension(cachedPath); + string key = Path.GetFileNameWithoutExtension(this.CachedPath); DateTime expires = DateTime.UtcNow.AddDays(MaxFileCachedDuration).ToUniversalTime(); - CachedImage cachedImage = new CachedImage(cachedPath, MaxFileCachedDuration, lastWriteTimeUtc, expires); - PersistantDictionary.Instance.Add(key, cachedImage); + CachedImage cachedImage = new CachedImage(this.CachedPath, MaxFileCachedDuration, lastWriteTimeUtc, expires); + await PersistantDictionary.Instance.AddAsync(key, cachedImage); } /// - /// Converts an absolute file path + /// Returns a value indicating whether the original file is new or has been updated. /// - /// The absolute path to convert. - /// The from the current context. - /// The virtual path to the file. - internal static string GetVirtualPath(string absolutePath, HttpRequest request) - { - string applicationPath = request.PhysicalApplicationPath; - string virtualDir = request.ApplicationPath; - virtualDir = virtualDir == "/" ? virtualDir : (virtualDir + "/"); - - if (applicationPath != null) - { - return absolutePath.Replace(applicationPath, virtualDir).Replace(@"\", "/"); - } - - throw new InvalidOperationException("We can only map an absolute back to a relative path if the application path is available."); - } - - /// - /// Returns a value indicating whether the original file has been updated. - /// - /// The original image path. - /// The cached image path. - /// Whether the file is a remote request. /// - /// True if the the original file has been updated; otherwise, false. + /// True if the the original file is new or has been updated; otherwise, false. /// - internal static bool IsUpdatedFile(string imagePath, string cachedImagePath, bool isRemote) + internal async Task IsNewOrUpdatedFileAsync() { - string key = Path.GetFileNameWithoutExtension(cachedImagePath); + string key = Path.GetFileNameWithoutExtension(this.CachedPath); CachedImage cachedImage; + bool isUpdated = false; - if (isRemote) + if (this.isRemote) { if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) { @@ -196,91 +252,114 @@ namespace ImageProcessor.Web.Caching if (cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) || cachedImage.MaxAge != MaxFileCachedDuration) { - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) + if (await PersistantDictionary.Instance.TryRemoveAsync(key)) { - // We can jump out here. - return true; + isUpdated = true; } } - - return false; } - - // Nothing in the cache so we should return true. - return true; + else + { + // Nothing in the cache so we should return true. + isUpdated = true; + } } - - // Test now for locally requested files. - if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) + else { - FileInfo imageFileInfo = new FileInfo(imagePath); - - if (imageFileInfo.Exists) + // Test now for locally requested files. + if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage)) { - // Check to see if the last write time is different of whether the - // cached image is set to expire or if the max age is different. - if (imageFileInfo.LastWriteTimeUtc != cachedImage.LastWriteTimeUtc - || cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) - || cachedImage.MaxAge != MaxFileCachedDuration) + FileInfo imageFileInfo = new FileInfo(this.requestPath); + + if (imageFileInfo.Exists) { - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) + // Check to see if the last write time is different of whether the + // cached image is set to expire or if the max age is different. + if (imageFileInfo.LastWriteTimeUtc != cachedImage.LastWriteTimeUtc + || cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration) + || cachedImage.MaxAge != MaxFileCachedDuration) { - return true; + if (await PersistantDictionary.Instance.TryRemoveAsync(key)) + { + isUpdated = true; + } } } } - } - else - { - // Nothing in the cache so we should return true. - return true; + else + { + // Nothing in the cache so we should return true. + isUpdated = true; + } } - return false; + return isUpdated; } /// /// Sets the LastWriteTime of the cached file to match the original file. /// - /// - /// The original image path. - /// - /// - /// The cached image path. - /// - /// Whether the file is remote. /// - /// The set to the last write time of the file. + /// The set to the last write time of the file. + /// + internal async Task SetCachedLastWriteTimeAsync() + { + // Create Action delegate for IsNewOrUpdatedFile. + return await TaskHelpers.Run(() => this.SetCachedLastWriteTime()); + } + + /// + /// Purges any files from the file-system cache in the given folders. + /// + /// + /// The . + /// + internal async Task TrimCachedFoldersAsync() + { + // Create Action delegate for TrimCachedFolders. + await TaskHelpers.Run(this.TrimCachedFolders); + } + #endregion + + #region Private + /// + /// Sets the LastWriteTime of the cached file to match the original file. + /// + /// + /// The of the original and cached file. /// - internal static DateTime SetCachedLastWriteTime(string imagePath, string cachedImagePath, bool isRemote) + private DateTime SetCachedLastWriteTime() { - FileInfo cachedFileInfo = new FileInfo(cachedImagePath); + FileInfo cachedFileInfo = new FileInfo(this.CachedPath); + DateTime lastWriteTime = DateTime.MinValue.ToUniversalTime(); - if (isRemote) + if (this.isRemote) { if (cachedFileInfo.Exists) { - return cachedFileInfo.LastWriteTimeUtc; + lastWriteTime = cachedFileInfo.LastWriteTimeUtc; } } - - FileInfo imageFileInfo = new FileInfo(imagePath); - - if (imageFileInfo.Exists && cachedFileInfo.Exists) + else { - DateTime dateTime = imageFileInfo.LastWriteTimeUtc; - cachedFileInfo.LastWriteTimeUtc = dateTime; + FileInfo imageFileInfo = new FileInfo(this.requestPath); - return dateTime; + if (imageFileInfo.Exists && cachedFileInfo.Exists) + { + DateTime dateTime = imageFileInfo.LastWriteTimeUtc; + cachedFileInfo.LastWriteTimeUtc = dateTime; + + lastWriteTime = dateTime; + } } - return DateTime.MinValue.ToUniversalTime(); + return lastWriteTime; } /// /// Purges any files from the file-system cache in the given folders. /// - internal static void TrimCachedFolders() + private async void TrimCachedFolders() { // Group each cache folder and clear any expired items or any that exeed // the maximum allowable count. @@ -307,24 +386,58 @@ namespace ImageProcessor.Web.Caching // Remove from the cache and delete each CachedImage. FileInfo fileInfo = new FileInfo(pair.Value.Path); string key = Path.GetFileNameWithoutExtension(fileInfo.Name); - CachedImage cachedImage; - if (PersistantDictionary.Instance.TryRemove(key, out cachedImage)) + if (await PersistantDictionary.Instance.TryRemoveAsync(key)) { fileInfo.Delete(); groupCount -= 1; } } - catch (Exception) + // ReSharper disable EmptyGeneralCatchClause + catch + // ReSharper restore EmptyGeneralCatchClause { - // Do Nothing, skip to the next. - // TODO: Should we handle this? - continue; + // Do nothing; skip to the next file. } } } } + /// + /// Gets the full transformed cached path for the image. + /// The images are stored in paths that are based upon the MD5 of their full request path + /// taking the first and last characters of the hash to determine their location. + /// ~/cache/a/1/ab04g67p91.jpg + /// This allows us to store 36 folders within 36 folders giving us a total of 12,960,000 images. + /// + /// The full cached path for the image. + [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")] + private string GetCachePath() + { + string cachedPath = string.Empty; + + if (AbsoluteCachePath != null) + { + // Use an md5 hash of the full path including the querystring to create the image name. + // That name can also be used as a key for the cached image and we should be able to use + // The first character of that hash as a subfolder. + string parsedExtension = this.ParseExtension(this.fullPath); + string fallbackExtension = this.imageName.Substring(this.imageName.LastIndexOf(".", StringComparison.Ordinal) + 1); + string encryptedName = this.fullPath.ToMD5Fingerprint(); + string firstSubpath = encryptedName.Substring(0, 1); + string secondSubpath = encryptedName.Substring(31, 1); + + string cachedFileName = string.Format( + "{0}.{1}", + encryptedName, + !string.IsNullOrWhiteSpace(parsedExtension) ? parsedExtension : fallbackExtension); + + cachedPath = Path.Combine(AbsoluteCachePath, firstSubpath, secondSubpath, cachedFileName); + } + + return cachedPath; + } + /// /// Returns the correct file extension for the given string input /// @@ -334,13 +447,13 @@ namespace ImageProcessor.Web.Caching /// /// The correct file extension for the given string input if it can find one; otherwise an empty string. /// - private static string ParseExtension(string input) + private string ParseExtension(string input) { Match match = FormatRegex.Match(input); return match.Success ? match.Value : string.Empty; } - + #endregion #endregion } } diff --git a/src/ImageProcessor.Web/Caching/PersistantDictionary.cs b/src/ImageProcessor.Web/Caching/PersistantDictionary.cs index f20efdf82..cd868f03c 100644 --- a/src/ImageProcessor.Web/Caching/PersistantDictionary.cs +++ b/src/ImageProcessor.Web/Caching/PersistantDictionary.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -10,9 +10,8 @@ namespace ImageProcessor.Web.Caching #region Using using System; using System.Collections.Generic; - + using System.Threading.Tasks; using ImageProcessor.Web.Helpers; - #endregion /// @@ -63,32 +62,24 @@ namespace ImageProcessor.Web.Caching /// /// The key of the item to remove. /// - /// - /// The value to assign the returned value to. - /// /// /// true if the removes an element with /// the specified key; otherwise, false. /// - public bool TryRemove(string key, out CachedImage value) + public async Task TryRemoveAsync(string key) { // No CachedImage to remove. if (!this.ContainsKey(key)) { - value = default(CachedImage); return false; } // Remove the CachedImage. - lock (SyncRoot) - { - value = this[key]; - this.Remove(key); - - this.SaveCache(key, value, true); + CachedImage value = this[key]; + this.Remove(key); - return true; - } + await this.SaveCacheAsync(key, value, true); + return true; } /// @@ -103,18 +94,15 @@ namespace ImageProcessor.Web.Caching /// /// The value of the item to add or get. /// - public new CachedImage Add(string key, CachedImage cachedImage) + public async Task AddAsync(string key, CachedImage cachedImage) { - lock (SyncRoot) + // Add the CachedImage. + if (await this.SaveCacheAsync(key, cachedImage, false)) { - // Add the CachedImage. - if (this.SaveCache(key, cachedImage, false)) - { - this[key] = cachedImage; - } - - return cachedImage; + this.Add(key, cachedImage); } + + return cachedImage; } #endregion @@ -133,16 +121,16 @@ namespace ImageProcessor.Web.Caching /// /// true, if the dictionary is saved to the file-system; otherwise, false. /// - private bool SaveCache(string key, CachedImage cachedImage, bool remove) + private async Task SaveCacheAsync(string key, CachedImage cachedImage, bool remove) { try { if (remove) { - return SQLContext.RemoveImage(key); + return await SQLContext.RemoveImageAsync(key); } - return SQLContext.AddImage(key, cachedImage); + return await SQLContext.AddImageAsync(key, cachedImage); } catch { diff --git a/src/ImageProcessor.Web/Caching/SQLContext.cs b/src/ImageProcessor.Web/Caching/SQLContext.cs index 05cd31aa1..70d62c1cd 100644 --- a/src/ImageProcessor.Web/Caching/SQLContext.cs +++ b/src/ImageProcessor.Web/Caching/SQLContext.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -12,8 +12,11 @@ namespace ImageProcessor.Web.Caching using System.Collections.Generic; using System.Data.SQLite; using System.IO; + using System.Threading.Tasks; using System.Web.Hosting; using ImageProcessor.Web.Config; + using ImageProcessor.Web.Helpers; + #endregion /// @@ -21,6 +24,7 @@ namespace ImageProcessor.Web.Caching /// internal sealed class SQLContext { + #region Fields /// /// The default path for cached folders on the server. /// @@ -34,12 +38,15 @@ namespace ImageProcessor.Web.Caching /// /// The connection string. /// - private static readonly string ConnectionString = string.Format("Data Source={0};Version=3;", IndexLocation); + private static readonly string ConnectionString = string.Format("Data Source={0};Version=3;", IndexLocation); + #endregion + #region Methods + #region Internal /// /// Creates the database if it doesn't already exist. /// - public static void CreateDatabase() + internal static void CreateDatabase() { if (!File.Exists(IndexLocation)) { @@ -84,6 +91,85 @@ namespace ImageProcessor.Web.Caching } } + /// + /// Gets all the images from the database. + /// + /// + /// The . + /// + internal static Dictionary GetImages() + { + Dictionary dictionary = new Dictionary(); + + try + { + using (SQLiteConnection connection = new SQLiteConnection(ConnectionString)) + { + connection.Open(); + + using (SQLiteCommand command = new SQLiteCommand(connection)) + { + command.CommandText = "SELECT * FROM names;"; + + SQLiteDataReader reader = command.ExecuteReader(); + + while (reader.Read()) + { + string key = reader["Key"].ToString(); + CachedImage image = new CachedImage( + reader["Path"].ToString(), + int.Parse(reader["MaxAge"].ToString()), + DateTime.Parse(reader["LastWriteTimeUtc"].ToString()).ToUniversalTime(), + DateTime.Parse(reader["ExpiresUtc"].ToString()).ToUniversalTime()); + + dictionary.Add(key, image); + } + } + } + + return dictionary; + } + catch + { + return new Dictionary(); + } + } + + /// + /// Adds a cached image to the database. + /// + /// + /// The key for the cached image. + /// + /// + /// The cached image to add. + /// + /// + /// The true if the addition of the cached image is added; otherwise, false. + /// + internal static async Task AddImageAsync(string key, CachedImage image) + { + // Create Action delegate for AddImage. + return await TaskHelpers.Run(() => AddImage(key, image)); + } + + /// + /// Removes a cached image from the database. + /// + /// + /// The key for the cached image. + /// + /// + /// The true if the addition of the cached image is removed; otherwise, false. + /// + internal static async Task RemoveImageAsync(string key) + { + // Create Action delegate for RemoveImage. + return await TaskHelpers.Run(() => RemoveImage(key)); + } + #endregion + + #region Private /// /// Adds a cached image to the database. /// @@ -96,7 +182,7 @@ namespace ImageProcessor.Web.Caching /// /// The true if the addition of the cached image is added; otherwise, false. /// - public static bool AddImage(string key, CachedImage image) + private static bool AddImage(string key, CachedImage image) { try { @@ -144,7 +230,7 @@ namespace ImageProcessor.Web.Caching /// /// The true if the addition of the cached image is removed; otherwise, false. /// - public static bool RemoveImage(string key) + private static bool RemoveImage(string key) { try { @@ -172,49 +258,7 @@ namespace ImageProcessor.Web.Caching return false; } } - - /// - /// Gets all the images from the database. - /// - /// - /// The . - /// - public static Dictionary GetImages() - { - Dictionary dictionary = new Dictionary(); - - try - { - using (SQLiteConnection connection = new SQLiteConnection(ConnectionString)) - { - connection.Open(); - - using (SQLiteCommand command = new SQLiteCommand(connection)) - { - command.CommandText = "SELECT * FROM names;"; - - SQLiteDataReader reader = command.ExecuteReader(); - - while (reader.Read()) - { - string key = reader["Key"].ToString(); - CachedImage image = new CachedImage( - reader["Path"].ToString(), - int.Parse(reader["MaxAge"].ToString()), - DateTime.Parse(reader["LastWriteTimeUtc"].ToString()).ToUniversalTime(), - DateTime.Parse(reader["ExpiresUtc"].ToString()).ToUniversalTime()); - - dictionary.Add(key, image); - } - } - } - - return dictionary; - } - catch - { - return new Dictionary(); - } - } + #endregion + #endregion } } diff --git a/src/ImageProcessor.Web/Config/ImageCacheSection.cs b/src/ImageProcessor.Web/Config/ImageCacheSection.cs index 012178f06..6a28d3229 100644 --- a/src/ImageProcessor.Web/Config/ImageCacheSection.cs +++ b/src/ImageProcessor.Web/Config/ImageCacheSection.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -15,7 +15,7 @@ namespace ImageProcessor.Web.Config /// /// Represents an image cache section within a configuration file. /// - public class ImageCacheSection : ConfigurationSection + public sealed class ImageCacheSection : ConfigurationSection { /// /// Gets or sets the virtual path of the cache folder. diff --git a/src/ImageProcessor.Web/Config/ImageProcessingSection.cs b/src/ImageProcessor.Web/Config/ImageProcessingSection.cs index 524cb7b49..ec20a7d14 100644 --- a/src/ImageProcessor.Web/Config/ImageProcessingSection.cs +++ b/src/ImageProcessor.Web/Config/ImageProcessingSection.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -16,7 +16,7 @@ namespace ImageProcessor.Web.Config /// Represents an image processing section within a configuration file. /// Nested syntax adapted from /// - public class ImageProcessingSection : ConfigurationSection + public sealed class ImageProcessingSection : ConfigurationSection { #region Properties /// diff --git a/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs b/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs index 94320e7a3..2ae42b659 100644 --- a/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs +++ b/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -18,7 +18,7 @@ namespace ImageProcessor.Web.Config /// Encapsulates methods to allow the retrieval of ImageProcessor settings. /// /// - public class ImageProcessorConfig + public sealed class ImageProcessorConfig { #region Fields /// @@ -111,7 +111,7 @@ namespace ImageProcessor.Web.Config { get { - return GetImageSecuritySection().WhiteList.Cast().Select(x => x.Url).ToArray(); + return GetImageSecuritySection().WhiteList.Cast().Select(x => x.Url).ToArray(); } } diff --git a/src/ImageProcessor.Web/Config/ImageSecuritySection.cs b/src/ImageProcessor.Web/Config/ImageSecuritySection.cs index aefb90779..ac20ff498 100644 --- a/src/ImageProcessor.Web/Config/ImageSecuritySection.cs +++ b/src/ImageProcessor.Web/Config/ImageSecuritySection.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -13,9 +13,9 @@ namespace ImageProcessor.Web.Config #endregion /// - /// Represents an imagecache section within a configuration file. + /// Represents an image security section within a configuration file. /// - public class ImageSecuritySection : ConfigurationSection + public sealed class ImageSecuritySection : ConfigurationSection { #region Properties /// @@ -122,11 +122,11 @@ namespace ImageProcessor.Web.Config /// /// The index of the whitelist item to get. /// The whitelist item at the given index. - public SafeURL this[int index] + public SafeUrl this[int index] { get { - return this.BaseGet(index) as SafeURL; + return this.BaseGet(index) as SafeUrl; } set @@ -148,7 +148,7 @@ namespace ImageProcessor.Web.Config /// protected override ConfigurationElement CreateNewElement() { - return new SafeURL(); + return new SafeUrl(); } /// @@ -158,14 +158,14 @@ namespace ImageProcessor.Web.Config /// The element key for a specified whitelist configuration element. protected override object GetElementKey(ConfigurationElement element) { - return ((SafeURL)element).Url; + return ((SafeUrl)element).Url; } } /// /// Represents a whitelist configuration element within the configuration. /// - public class SafeURL : ConfigurationElement + public class SafeUrl : ConfigurationElement { /// /// Gets or sets the url of the whitelisted file. diff --git a/src/ImageProcessor.Web/Helpers/AsyncIoExtensions.cs b/src/ImageProcessor.Web/Helpers/AsyncIoExtensions.cs deleted file mode 100644 index 977416786..000000000 --- a/src/ImageProcessor.Web/Helpers/AsyncIoExtensions.cs +++ /dev/null @@ -1,64 +0,0 @@ -// License: CPOL at http://www.codeproject.com/info/cpol10.aspx -using System.Collections.Generic; -using System.Net; -using System.Threading; -using System.Threading.Tasks; - -namespace System.IO -{ - public static class AsyncIoExtensions - { - public static Task GetRequestStreamAsync(this WebRequest webRequest) - { - return Task.Factory.FromAsync( - webRequest.BeginGetRequestStream, - ar => webRequest.EndGetRequestStream(ar), - null); - } - - public static Task GetResponseAsync(this WebRequest webRequest) - { - return Task.Factory.FromAsync( - webRequest.BeginGetResponse, - ar => webRequest.EndGetResponse(ar), - null); - } - - public static Task ReadAsync(this Stream input, Byte[] buffer, int offset, int count) - { - return Task.Factory.FromAsync( - input.BeginRead, - (Func)input.EndRead, - buffer, offset, count, - null); - } - - public static Task WriteAsync(this Stream input, Byte[] buffer, int offset, int count) - { - return Task.Factory.FromAsync( - input.BeginWrite, - input.EndWrite, - buffer, offset, count, - null); - } - - public static /*async*/ Task CopyToAsync(this Stream input, Stream output, CancellationToken cancellationToken = default(CancellationToken)) - { - return CopyToAsyncTasks(input, output, cancellationToken).ToTask(); - } - private static IEnumerable CopyToAsyncTasks(Stream input, Stream output, CancellationToken cancellationToken) - { - byte[] buffer = new byte[0x1000]; // 4 KiB - while (true) - { - cancellationToken.ThrowIfCancellationRequested(); - var readTask = input.ReadAsync(buffer, 0, buffer.Length); - yield return readTask; - if (readTask.Result == 0) break; - - cancellationToken.ThrowIfCancellationRequested(); - yield return output.WriteAsync(buffer, 0, readTask.Result); - } - } - } -} diff --git a/src/ImageProcessor.Web/Helpers/Copy of RemoteFile.cs b/src/ImageProcessor.Web/Helpers/Copy of RemoteFile.cs deleted file mode 100644 index aa17b0f4e..000000000 --- a/src/ImageProcessor.Web/Helpers/Copy of RemoteFile.cs +++ /dev/null @@ -1,347 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. -// -// ----------------------------------------------------------------------- - -namespace ImageProcessor.Web.Helpers -{ - #region Using - using System; - using System.Diagnostics.Contracts; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Net; - using System.Security; - using System.Text; - using ImageProcessor.Web.Config; - #endregion - - /// - /// Encapsulates methods used to download files from a website address. - /// - /// - /// - /// The purpose of this class is so there's one core way of downloading remote files with url[s] that are from - /// outside users. There's various areas in application where an attacker could supply an external url to the server - /// and tie up resources. - /// - /// For example, the ImageProcessingModule accepts off-server addresses as a path. An attacker could, for instance, pass the url - /// to a file that's a few gigs in size, causing the server to get out-of-memory exceptions or some other errors. An attacker - /// could also use this same method to use one application instance to hammer another site by, again, passing an off-server - /// address of the victims site to the ImageProcessingModule. - /// This class will not throw an exception if the Uri supplied points to a resource local to the running application instance. - /// - /// There shouldn't be any security issues there, as the internal WebRequest instance is still calling it remotely. - /// Any local files that shouldn't be accessed by this won't be allowed by the remote call. - /// - /// Adapted from BlogEngine.Net - /// - internal sealed class RemoteFile - { - #region Fields - /// - /// The white-list of url[s] from which to download remote files. - /// - private static readonly Uri[] RemoteFileWhiteList = ImageProcessorConfig.Instance.RemoteFileWhiteList; - - /// - /// The length of time, in milliseconds, that a remote file download attempt can last before timing out. - /// - private static readonly int TimeoutMilliseconds = ImageProcessorConfig.Instance.Timeout; - - /// - /// The maximum size, in bytes, that a remote file download attempt can download. - /// - private static readonly int MaxBytes = ImageProcessorConfig.Instance.MaxBytes; - - /// - /// Whether to allow remote downloads. - /// - private static readonly bool AllowRemoteDownloads = ImageProcessorConfig.Instance.AllowRemoteDownloads; - - /// - /// Whether this RemoteFile instance is ignoring remote download rules set in the current application - /// instance. - /// - private readonly bool ignoreRemoteDownloadSettings; - - /// - /// The Uri of the remote file being downloaded. - /// - private readonly Uri url; - - /// - /// The maximum allowable download size in bytes. - /// - private readonly int maxDownloadSize; - - /// - /// The length of time, in milliseconds, that a remote file download attempt can last before timing out. - /// - private int timeoutLength; - - /// - /// The WebResponse object used internally for this RemoteFile instance. - /// - private WebRequest webRequest; - #endregion - - #region Constructors - /// - /// Initializes a new instance of the RemoteFile class. - /// - /// The url of the file to be downloaded. - /// - /// If set to , then RemoteFile should ignore the current the applications instance's remote download settings; otherwise,. - /// - internal RemoteFile(Uri filePath, bool ignoreRemoteDownloadSettings) - { - Contract.Requires(filePath != null); - - this.url = filePath; - this.ignoreRemoteDownloadSettings = ignoreRemoteDownloadSettings; - this.timeoutLength = TimeoutMilliseconds; - this.maxDownloadSize = MaxBytes; - } - #endregion - - #region Properties - /// - /// Gets a value indicating whether this RemoteFile instance is ignoring remote download rules set in the - /// current application instance. - /// - /// This should only be set to true if the supplied url is a verified resource. Use at your own risk. - /// - /// - /// - /// if this RemoteFile instance is ignoring remote download rules set in the current - /// application instance; otherwise, . - /// - public bool IgnoreRemoteDownloadSettings - { - get - { - return this.ignoreRemoteDownloadSettings; - } - } - - /// - /// Gets the Uri of the remote file being downloaded. - /// - public Uri Uri - { - get - { - return this.url; - } - } - - /// - /// Gets or sets the length of time, in milliseconds, that a remote file download attempt can - /// last before timing out. - /// - /// - /// This value can only be set if the instance is supposed to ignore the remote download settings set - /// in the current application instance. - /// - /// - /// Set this value to 0 if there should be no timeout. - /// - /// - /// - public int TimeoutLength - { - get - { - return this.IgnoreRemoteDownloadSettings ? this.timeoutLength : TimeoutMilliseconds; - } - - set - { - if (!this.IgnoreRemoteDownloadSettings) - { - throw new SecurityException("Timeout length can not be adjusted on remote files that are abiding by remote download rules"); - } - - if (value < 0) - { - throw new ArgumentOutOfRangeException("TimeoutLength"); - } - - this.timeoutLength = value; - } - } - - /// - /// Gets or sets the maximum download size, in bytes, that a remote file download attempt can be. - /// - /// - /// This value can only be set if the instance is supposed to ignore the remote download settings set - /// in the current application instance. - /// - /// - /// Set this value to 0 if there should be no timeout. - /// - /// - /// - public int MaxDownloadSize - { - get - { - return this.IgnoreRemoteDownloadSettings ? this.maxDownloadSize : MaxBytes; - } - - set - { - if (!this.IgnoreRemoteDownloadSettings) - { - throw new SecurityException("Max Download Size can not be adjusted on remote files that are abiding by remote download rules"); - } - - if (value < 0) - { - throw new ArgumentOutOfRangeException("MaxDownloadSize"); - } - - this.timeoutLength = value; - } - } - #endregion - - #region Methods - #region Public - /// - /// Returns the WebResponse used to download this file. - /// - /// - /// This method is meant for outside users who need specific access to the WebResponse this class - /// generates. They're responsible for disposing of it. - /// - /// - /// - /// The WebResponse used to download this file. - public WebResponse GetWebResponse() - { - WebResponse response = this.GetWebRequest().GetResponse(); - - long contentLength = response.ContentLength; - - // WebResponse.ContentLength doesn't always know the value, it returns -1 in this case. - if (contentLength == -1) - { - // Response headers may still have the Content-Length inside of it. - string headerContentLength = response.Headers["Content-Length"]; - - if (!string.IsNullOrWhiteSpace(headerContentLength)) - { - contentLength = long.Parse(headerContentLength, CultureInfo.InvariantCulture); - } - } - - // We don't need to check the url here since any external urls are available only from the web.config. - if ((this.MaxDownloadSize > 0) && (contentLength > this.MaxDownloadSize)) - { - response.Close(); - throw new SecurityException("An attempt to download a remote file has been halted because the file is larger than allowed."); - } - - return response; - } - - /// - /// Returns the remote file as a String. - /// - /// This returns the resulting stream as a string as passed through a StreamReader. - /// - /// - /// The remote file as a String. - public string GetFileAsString() - { - using (WebResponse response = this.GetWebResponse()) - { - Stream responseStream = response.GetResponseStream(); - - if (responseStream != null) - { - // Pipe the stream to a stream reader with the required encoding format. - using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8)) - { - return reader.ReadToEnd(); - } - } - - return string.Empty; - } - } - #endregion - - #region Private - /// - /// Performs a check to see whether the application is able to download remote files. - /// - private void CheckCanDownload() - { - if (!this.IgnoreRemoteDownloadSettings && !AllowRemoteDownloads) - { - throw new SecurityException("application is not configured to allow remote file downloads."); - } - } - - /// - /// Creates the WebRequest object used internally for this RemoteFile instance. - /// - /// - /// - /// The WebRequest should not be passed outside of this instance, as it will allow tampering. Anyone - /// that needs more fine control over the downloading process should probably be using the WebRequest - /// class on its own. - /// - /// - private WebRequest GetWebRequest() - { - // Check downloads are allowed. - this.CheckCanDownload(); - - // Check the url is from a whitelisted location. - this.CheckSafeUrlLocation(); - - if (this.webRequest == null) - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(this.Uri); - request.Headers["Accept-Encoding"] = "gzip"; - request.Headers["Accept-Language"] = "en-us"; - request.Credentials = CredentialCache.DefaultNetworkCredentials; - request.AutomaticDecompression = DecompressionMethods.GZip; - - if (this.TimeoutLength > 0) - { - request.Timeout = this.TimeoutLength; - } - - this.webRequest = request; - } - - return this.webRequest; - } - - /// - /// Returns a value indicating whether the current url is in a list of safe download locations. - /// - private void CheckSafeUrlLocation() - { - bool validUrl = RemoteFileWhiteList.Any(item => item.Host.ToUpperInvariant().Equals(this.url.Host.ToUpperInvariant())); - - if (!validUrl) - { - throw new SecurityException("application is not configured to allow remote file downloads from this domain."); - } - } - #endregion - #endregion - } -} - - diff --git a/src/ImageProcessor.Web/Helpers/LockedDictionary.cs b/src/ImageProcessor.Web/Helpers/LockedDictionary.cs index 3f41d25cc..8cc26c06b 100644 --- a/src/ImageProcessor.Web/Helpers/LockedDictionary.cs +++ b/src/ImageProcessor.Web/Helpers/LockedDictionary.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- diff --git a/src/ImageProcessor.Web/Helpers/ObjectFactory.cs b/src/ImageProcessor.Web/Helpers/ObjectFactory.cs deleted file mode 100644 index e13a6885a..000000000 --- a/src/ImageProcessor.Web/Helpers/ObjectFactory.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace ImageProcessor.Web.Helpers -{ - using System.Linq.Expressions; - using System.Reflection; - - public class ObjectFactory - { - public delegate T ObjectActivator(params object[] args); - - public static ObjectActivator GetActivator(ConstructorInfo ctor) - { - Type type = ctor.DeclaringType; - ParameterInfo[] paramsInfo = ctor.GetParameters(); - - // Create a single param of type object[] - ParameterExpression param = Expression.Parameter(typeof(object[]), "args"); - - Expression[] argsExp = new Expression[paramsInfo.Length]; - - // Pick each arg from the params array - // and create a typed expression for them - for (int i = 0; i < paramsInfo.Length; i++) - { - Expression index = Expression.Constant(i); - Type paramType = paramsInfo[i].ParameterType; - - Expression paramAccessorExp = Expression.ArrayIndex(param, index); - - Expression paramCastExp = Expression.Convert(paramAccessorExp, paramType); - - argsExp[i] = paramCastExp; - } - - // Make a NewExpression that calls the - // ctor with the args we just created - NewExpression newExp = Expression.New(ctor, argsExp); - - // Create a lambda with the New - // Expression as body and our param object[] as arg - LambdaExpression lambda = Expression.Lambda(typeof(ObjectActivator), newExp, param); - - // Compile it - ObjectActivator compiled = (ObjectActivator)lambda.Compile(); - return compiled; - } - } -} diff --git a/src/ImageProcessor.Web/Helpers/ProcessorFactory.cs b/src/ImageProcessor.Web/Helpers/ProcessorFactory.cs deleted file mode 100644 index 922767b8f..000000000 --- a/src/ImageProcessor.Web/Helpers/ProcessorFactory.cs +++ /dev/null @@ -1,20 +0,0 @@ - - -namespace ImageProcessor.Web.Helpers -{ - using System; - using System.Linq.Expressions; - using ImageProcessor.Processors; - - public static class ProcessorFactory - { - public static T New() where T:IGraphicsProcessor - { - Type t = typeof(T); - Func method = Expression.Lambda>(Expression.Block(t, new Expression[] { Expression.New(t) })).Compile(); - - return method(); - } - } - -} diff --git a/src/ImageProcessor.Web/Helpers/RemoteFile.cs b/src/ImageProcessor.Web/Helpers/RemoteFile.cs index 794e6e98a..211d8e1f2 100644 --- a/src/ImageProcessor.Web/Helpers/RemoteFile.cs +++ b/src/ImageProcessor.Web/Helpers/RemoteFile.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -9,16 +9,15 @@ namespace ImageProcessor.Web.Helpers { #region Using using System; - using System.Diagnostics.Contracts; + using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Security; using System.Text; - using ImageProcessor.Web.Config; using System.Threading.Tasks; - using System.Collections.Generic; + using ImageProcessor.Web.Config; #endregion /// @@ -231,9 +230,32 @@ namespace ImageProcessor.Web.Helpers /// /// The . /// - internal /*async*/ Task GetWebResponseAsync() + internal async Task GetWebResponseAsync() { - return this.GetWebResponseAsyncTask().ToTask(); + WebResponse response = await this.GetWebRequest().GetResponseAsync(); + + long contentLength = response.ContentLength; + + // WebResponse.ContentLength doesn't always know the value, it returns -1 in this case. + if (contentLength == -1) + { + // Response headers may still have the Content-Length inside of it. + string headerContentLength = response.Headers["Content-Length"]; + + if (!string.IsNullOrWhiteSpace(headerContentLength)) + { + contentLength = long.Parse(headerContentLength, CultureInfo.InvariantCulture); + } + } + + // We don't need to check the url here since any external urls are available only from the web.config. + if ((this.MaxDownloadSize > 0) && (contentLength > this.MaxDownloadSize)) + { + response.Close(); + throw new SecurityException("An attempt to download a remote file has been halted because the file is larger than allowed."); + } + + return response; } /// @@ -243,7 +265,7 @@ namespace ImageProcessor.Web.Helpers /// /// /// The remote file as a String. - public string GetFileAsString() + internal string GetFileAsString() { Task responseTask = this.GetWebResponseAsync(); @@ -266,49 +288,6 @@ namespace ImageProcessor.Web.Helpers #endregion #region Private - /// - /// Returns the WebResponse used to download this file. - /// - /// - /// This method is meant for outside users who need specific access to the WebResponse this class - /// generates. They're responsible for disposing of it. - /// - /// - /// - /// - /// The . - /// - private IEnumerable GetWebResponseAsyncTask() - { - Task responseTask = this.GetWebRequest().GetResponseAsync(); - yield return responseTask; - - WebResponse response = responseTask.Result; - - long contentLength = response.ContentLength; - - // WebResponse.ContentLength doesn't always know the value, it returns -1 in this case. - if (contentLength == -1) - { - // Response headers may still have the Content-Length inside of it. - string headerContentLength = response.Headers["Content-Length"]; - - if (!string.IsNullOrWhiteSpace(headerContentLength)) - { - contentLength = long.Parse(headerContentLength, CultureInfo.InvariantCulture); - } - } - - // We don't need to check the url here since any external urls are available only from the web.config. - if ((this.MaxDownloadSize > 0) && (contentLength > this.MaxDownloadSize)) - { - response.Close(); - throw new SecurityException("An attempt to download a remote file has been halted because the file is larger than allowed."); - } - - yield return TaskEx.FromResult(response); - } - /// /// Performs a check to see whether the application is able to download remote files. /// @@ -373,5 +352,3 @@ namespace ImageProcessor.Web.Helpers #endregion } } - - diff --git a/src/ImageProcessor.Web/Helpers/TaskEx.cs b/src/ImageProcessor.Web/Helpers/TaskEx.cs deleted file mode 100644 index 6d85c45c1..000000000 --- a/src/ImageProcessor.Web/Helpers/TaskEx.cs +++ /dev/null @@ -1,174 +0,0 @@ -// License: CPOL at http://www.codeproject.com/info/cpol10.aspx - - -namespace System.Threading.Tasks -{ - using System.Collections.Generic; - - /// - /// Extensions related to the classes. - /// Supports implementing "async"-style methods in C#4 using iterators. - /// - /// - /// I would call this TaskExtensions, except that clients must name the class to use methods like . - /// Based on work from Await Tasks in C#4 using Iterators by Keith L Robertson. - /// - /// - public static class TaskEx - { - /// - /// Return a Completed with a specific value. - /// - /// - /// The result - /// - /// - /// The result Value. - /// - /// - /// The . - /// - public static Task FromResult(TResult resultValue) - { - var completionSource = new TaskCompletionSource(); - completionSource.SetResult(resultValue); - return completionSource.Task; - } - - /// - /// Transform an enumeration of into a single non-Result . - /// - /// - /// The tasks. - /// - /// - /// The . - /// - public static Task ToTask(this IEnumerable tasks) - { - return ToTask(tasks); - } - - /// - /// Transform an enumeration of into a single . - /// The final in must be a . - /// - /// - /// The task results - /// - /// - /// The tasks. - /// - /// - /// The . - /// - public static Task ToTask(this IEnumerable tasks) - { - var taskScheduler = - SynchronizationContext.Current == null - ? TaskScheduler.Default : TaskScheduler.FromCurrentSynchronizationContext(); - var taskEnumerator = tasks.GetEnumerator(); - var completionSource = new TaskCompletionSource(); - - // Clean up the enumerator when the task completes. - completionSource.Task.ContinueWith(t => taskEnumerator.Dispose(), taskScheduler); - - ToTaskDoOneStep(taskEnumerator, taskScheduler, completionSource, null); - return completionSource.Task; - } - - /// - /// If the previous task Canceled or Faulted, complete the master task with the same . - /// Obtain the next from the . - /// If none, complete the master task, possibly with the of the last task. - /// Otherwise, set up the task with a continuation to come do this again when it completes. - /// - private static void ToTaskDoOneStep( - IEnumerator taskEnumerator, TaskScheduler taskScheduler, - TaskCompletionSource completionSource, Task completedTask) - { - // Check status of previous nested task (if any), and stop if Canceled or Faulted. - TaskStatus status; - if (completedTask == null) - { - // This is the first task from the iterator; skip status check. - } - else if ((status = completedTask.Status) == TaskStatus.Canceled) - { - completionSource.SetCanceled(); - return; - } - else if (status == TaskStatus.Faulted) - { - completionSource.SetException(completedTask.Exception); - return; - } - - // Check for cancellation before looking for the next task. - // This causes a problem where the ultimate Task does not complete and fire any continuations; I don't know why. - // So cancellation from the Token must be handled within the iterator itself. - //if (cancellationToken.IsCancellationRequested) { - // completionSource.SetCanceled(); - // return; - //} - - // Find the next Task in the iterator; handle cancellation and other exceptions. - Boolean haveMore; - try - { - haveMore = taskEnumerator.MoveNext(); - - } - catch (OperationCanceledException cancExc) - { - //if (cancExc.CancellationToken == cancellationToken) completionSource.SetCanceled(); - //else completionSource.SetException(cancExc); - completionSource.SetCanceled(); - return; - } - catch (Exception exc) - { - completionSource.SetException(exc); - return; - } - - if (!haveMore) - { - // No more tasks; set the result from the last completed task (if any, unless no result is requested). - // We know it's not Canceled or Faulted because we checked at the start of this method. - if (typeof(TResult) == typeof(VoidResult)) - { // No result - completionSource.SetResult(default(TResult)); - } - else if (!(completedTask is Task)) - { // Wrong result - completionSource.SetException(new InvalidOperationException( - "Asynchronous iterator " + taskEnumerator + - " requires a final result task of type " + typeof(Task).FullName + - (completedTask == null ? ", but none was provided." : - "; the actual task type was " + completedTask.GetType().FullName))); - } - else - { - completionSource.SetResult(((Task)completedTask).Result); - } - } - else - { - // When the nested task completes, continue by performing this function again. - // Note: This is NOT a recursive call; the current method activation will complete - // almost immediately and independently of the lambda continuation. - taskEnumerator.Current.ContinueWith( - nextTask => ToTaskDoOneStep(taskEnumerator, taskScheduler, completionSource, nextTask), - taskScheduler); - } - } - - /// - /// Internal marker type for using to implement . - /// - private abstract class VoidResult - { - } - } -} diff --git a/src/ImageProcessor.Web/Helpers/TaskHelpers.cs b/src/ImageProcessor.Web/Helpers/TaskHelpers.cs new file mode 100644 index 000000000..d1975c0dd --- /dev/null +++ b/src/ImageProcessor.Web/Helpers/TaskHelpers.cs @@ -0,0 +1,52 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) James South. +// Licensed under the Apache License, Version 2.0. +// +// ----------------------------------------------------------------------- + +namespace ImageProcessor.Web.Helpers +{ + #region Using + using System; + using System.Threading.Tasks; + #endregion + + /// + /// Provides some syntactic sugar to run tasks. + /// + public sealed class TaskHelpers + { + /// + /// Queues the specified work to run on the ThreadPool and returns a Task handle for that work. + /// + /// The work to execute asynchronously + /// A Task that represents the work queued to execute in the ThreadPool. + /// + /// The parameter was null. + /// + public static Task Run(Action action) + { + Task task = new Task(action); + task.Start(); + return task; + } + + /// + /// Queues the specified work to run on the ThreadPool and returns a proxy for the + /// Task(TResult) returned by . + /// + /// The type of the result returned by the proxy Task. + /// The work to execute asynchronously + /// A Task(TResult) that represents a proxy for the Task(TResult) returned by . + /// + /// The parameter was null. + /// + public static Task Run(Func function) + { + Task task = new Task(function); + task.Start(); + return task; + } + } +} diff --git a/src/ImageProcessor.Web/HttpModules/Copy of ImageProcessingModule.cs b/src/ImageProcessor.Web/HttpModules/Copy of ImageProcessingModule.cs deleted file mode 100644 index 409181289..000000000 --- a/src/ImageProcessor.Web/HttpModules/Copy of ImageProcessingModule.cs +++ /dev/null @@ -1,342 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. -// -// ----------------------------------------------------------------------- - -namespace ImageProcessor.Web.HttpModules -{ - #region Using - using System; - using System.IO; - using System.Net; - using System.Reflection; - using System.Web; - using System.Web.Hosting; - using ImageProcessor.Helpers.Extensions; - using ImageProcessor.Imaging; - using ImageProcessor.Web.Caching; - using ImageProcessor.Web.Config; - using ImageProcessor.Web.Helpers; - #endregion - - /// - /// Processes any image requests within the web application. - /// - public class ImageProcessingModule : IHttpModule - { - #region Fields - /// - /// The key for storing the response type of the current image. - /// - private const string CachedResponseTypeKey = "CACHED_IMAGE_RESPONSE_TYPE"; - - /// - /// The value to prefix any remote image requests with to ensure they get captured. - /// - private static readonly string RemotePrefix = ImageProcessorConfig.Instance.RemotePrefix; - - /// - /// The object to lock against. - /// - private static readonly object SyncRoot = new object(); - - /// - /// The assembly version. - /// - private static readonly string AssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); - - /// - /// A value indicating whether the application has started. - /// - private static bool hasModuleInitialized; - #endregion - - /// - /// The delegate void representing the ProcessImage method. - /// - /// - /// the HttpContext object that provides - /// references to the intrinsic server objects - /// - private delegate void ProcessImageDelegate(HttpContext context); - - #region IHttpModule Members - /// - /// Initializes a module and prepares it to handle requests. - /// - /// - /// An that provides - /// access to the methods, properties, and events common to all - /// application objects within an ASP.NET application - /// - public void Init(HttpApplication context) - { - if (!hasModuleInitialized) - { - lock (SyncRoot) - { - if (!hasModuleInitialized) - { - DiskCache.CreateCacheDirectories(); - hasModuleInitialized = true; - } - } - } - - context.AddOnBeginRequestAsync(this.OnBeginAsync, this.OnEndAsync); - context.PreSendRequestHeaders += this.ContextPreSendRequestHeaders; - } - - /// - /// Disposes of the resources (other than memory) used by the module that implements . - /// - public void Dispose() - { - // Nothing to dispose. - } - #endregion - - /// - /// The that starts asynchronous processing - /// of the . - /// - /// The source of the event. - /// - /// An EventArgs that contains - /// the event data. - /// - /// - /// The delegate to call when the asynchronous method call is complete. - /// If the callback is null, the delegate is not called. - /// - /// - /// Any additional data needed to process the request. - /// - /// - /// The status of the asynchronous operation. - /// - private IAsyncResult OnBeginAsync(object sender, EventArgs e, AsyncCallback callBack, object state) - { - HttpContext context = ((HttpApplication)sender).Context; - - ProcessImageDelegate processImage = this.ProcessImage; - - return processImage.BeginInvoke(context, callBack, state); - } - - /// - /// The method that handles asynchronous events such as application events. - /// - /// - /// The that is the result of the - /// operation. - /// - private void OnEndAsync(IAsyncResult result) - { - // Ensure our ProcessImage has completed in the background. - while (!result.IsCompleted) - { - System.Threading.Thread.Sleep(1); - } - } - - /// - /// Occurs just before ASP.NET send HttpHeaders to the client. - /// - /// The source of the event. - /// An EventArgs that contains the event data. - private void ContextPreSendRequestHeaders(object sender, EventArgs e) - { - HttpContext context = ((HttpApplication)sender).Context; - - object responseTypeObject = context.Items[CachedResponseTypeKey]; - - if (responseTypeObject != null) - { - string responseType = (string)responseTypeObject; - - // Set the headers - this.SetHeaders(context, responseType); - - context.Items[CachedResponseTypeKey] = null; - } - } - - #region Private - /// - /// Processes the image. - /// - /// - /// the HttpContext object that provides - /// references to the intrinsic server objects - /// - private void ProcessImage(HttpContext context) - { - // Is this a remote file. - bool isRemote = context.Request.Path.Equals(RemotePrefix, StringComparison.OrdinalIgnoreCase); - string path = string.Empty; - string queryString = string.Empty; - - if (isRemote) - { - // We need to split the querystring to get the actual values we want. - string urlDecode = HttpUtility.UrlDecode(context.Request.QueryString.ToString()); - - if (urlDecode != null) - { - string[] paths = urlDecode.Split('?'); - - path = paths[0]; - - if (paths.Length > 1) - { - queryString = paths[1]; - } - } - } - else - { - path = HostingEnvironment.MapPath(context.Request.Path); - queryString = HttpUtility.UrlDecode(context.Request.QueryString.ToString()); - } - - // Only process requests that pass our sanitizing filter. - if (ImageUtils.IsValidImageExtension(path) && !string.IsNullOrWhiteSpace(queryString)) - { - if (this.FileExists(path, isRemote)) - { - string fullPath = string.Format("{0}?{1}", path, queryString); - string imageName = Path.GetFileName(path); - string cachedPath = DiskCache.GetCachePath(fullPath, imageName); - bool isUpdated = DiskCache.IsUpdatedFile(path, cachedPath, isRemote); - - // Only process if the file has been updated. - if (isUpdated) - { - // Process the image. - using (ImageFactory imageFactory = new ImageFactory()) - { - if (isRemote) - { - Uri uri = new Uri(path); - RemoteFile remoteFile = new RemoteFile(uri, false); - - using (MemoryStream memoryStream = new MemoryStream()) - { - using (Stream responseStream = remoteFile.GetWebResponse().GetResponseStream()) - { - if (responseStream != null) - { - //lock (SyncRoot) - //{ - // Trim the cache. - DiskCache.TrimCachedFolders(); - - responseStream.CopyTo(memoryStream); - - imageFactory.Load(memoryStream) - .AddQueryString(queryString) - .Format(ImageUtils.GetImageFormat(imageName)) - .AutoProcess().Save(cachedPath); - - // Ensure that the LastWriteTime property of the source and cached file match. - DateTime dateTime = DiskCache.SetCachedLastWriteTime(path, cachedPath, true); - - // Add to the cache. - DiskCache.AddImageToCache(cachedPath, dateTime); - //} - } - } - } - } - else - { - //lock (SyncRoot) - //{ - // Trim the cache. - DiskCache.TrimCachedFolders(); - - imageFactory.Load(fullPath).AutoProcess().Save(cachedPath); - - // Ensure that the LastWriteTime property of the source and cached file match. - DateTime dateTime = DiskCache.SetCachedLastWriteTime(path, cachedPath, false); - - // Add to the cache. - DiskCache.AddImageToCache(cachedPath, dateTime); - //} - } - } - } - - context.Items[CachedResponseTypeKey] = ImageUtils.GetResponseType(imageName).ToDescription(); - - // The cached file is valid so just rewrite the path. - context.RewritePath(DiskCache.GetVirtualPath(cachedPath, context.Request), false); - } - } - } - - /// - /// returns a value indicating whether a file exists. - /// - /// The path to the file to check. - /// Whether the file is remote. - /// True if the file exists, otherwise false. - /// If the file is remote the method will always return true. - private bool FileExists(string path, bool isRemote) - { - if (isRemote) - { - return true; - } - - FileInfo fileInfo = new FileInfo(path); - return fileInfo.Exists; - } - - /// - /// This will make the browser and server keep the output - /// in its cache and thereby improve performance. - /// See http://en.wikipedia.org/wiki/HTTP_ETag - /// - /// - /// the HttpContext object that provides - /// references to the intrinsic server objects - /// - /// The HTTP MIME type to to send. - private void SetHeaders(HttpContext context, string responseType) - { - HttpResponse response = context.Response; - - response.ContentType = responseType; - - response.AddHeader("Image-Served-By", "ImageProcessor/" + AssemblyVersion); - - HttpCachePolicy cache = response.Cache; - - cache.VaryByHeaders["Accept-Encoding"] = true; - - int maxDays = DiskCache.MaxFileCachedDuration; - - cache.SetExpires(DateTime.Now.ToUniversalTime().AddDays(maxDays)); - cache.SetMaxAge(new TimeSpan(maxDays, 0, 0, 0)); - cache.SetRevalidation(HttpCacheRevalidation.AllCaches); - - string incomingEtag = context.Request.Headers["If-None-Match"]; - - cache.SetCacheability(HttpCacheability.Public); - - if (incomingEtag == null) - { - return; - } - - response.Clear(); - response.StatusCode = (int)HttpStatusCode.NotModified; - response.SuppressContent = true; - } - #endregion - } -} \ No newline at end of file diff --git a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs index 431582a76..59e85afa8 100644 --- a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs +++ b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -12,6 +12,8 @@ namespace ImageProcessor.Web.HttpModules using System.IO; using System.Net; using System.Reflection; + using System.Threading; + using System.Threading.Tasks; using System.Web; using System.Web.Hosting; using ImageProcessor.Helpers.Extensions; @@ -19,20 +21,18 @@ namespace ImageProcessor.Web.HttpModules using ImageProcessor.Web.Caching; using ImageProcessor.Web.Config; using ImageProcessor.Web.Helpers; - using System.Threading.Tasks; - using System.Collections.Generic; #endregion /// /// Processes any image requests within the web application. /// - public class ImageProcessingModule : IHttpModule + public sealed class ImageProcessingModule : IHttpModule { #region Fields /// /// The key for storing the response type of the current image. /// - private const string CachedResponseTypeKey = "CACHED_IMAGE_RESPONSE_TYPE"; + private const string CachedResponseTypeKey = "CACHED_IMAGE_RESPONSE_TYPE_054F217C-11CF-49FF-8D2F-698E8E6EB58F"; /// /// The value to prefix any remote image requests with to ensure they get captured. @@ -40,19 +40,19 @@ namespace ImageProcessor.Web.HttpModules private static readonly string RemotePrefix = ImageProcessorConfig.Instance.RemotePrefix; /// - /// The object to lock against. + /// The assembly version. /// - private static readonly object SyncRoot = new object(); + private static readonly string AssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); /// - /// The assembly version. + /// The value that acts as a basis to check that the startup code has only been ran once. /// - private static readonly string AssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + private static int initCheck; /// /// A value indicating whether the application has started. /// - private static bool hasModuleInitialized; + private readonly bool hasModuleInitialized = initCheck == 1; #endregion #region IHttpModule Members @@ -66,17 +66,11 @@ namespace ImageProcessor.Web.HttpModules /// public void Init(HttpApplication context) { - if (!hasModuleInitialized) + if (!this.hasModuleInitialized) { - lock (SyncRoot) - { - if (!hasModuleInitialized) - { - Cache.CreateDirectoriesAsync(); - //DiskCache.CreateCacheDirectories(); - hasModuleInitialized = true; - } - } + Interlocked.CompareExchange(ref initCheck, 1, 0); + + DiskCache.CreateDirectories(); } context.BeginRequest += this.ContextBeginRequest; @@ -97,10 +91,10 @@ namespace ImageProcessor.Web.HttpModules /// /// The source of the event. /// An EventArgs that contains the event data. - private void ContextBeginRequest(object sender, EventArgs e) + private async void ContextBeginRequest(object sender, EventArgs e) { HttpContext context = ((HttpApplication)sender).Context; - this.ProcessImage(context); + await this.ProcessImageAsync(context); } /// @@ -126,30 +120,6 @@ namespace ImageProcessor.Web.HttpModules } #region Private - /// - /// Processes the image. - /// - /// - /// the HttpContext object that provides - /// references to the intrinsic server objects - /// - private void ProcessImage(HttpContext context) - { - this.ProcessImageAsync(context); - } - - /// - /// Processes the image. - /// - /// - /// the HttpContext object that provides - /// references to the intrinsic server objects - /// - private /*async*/ Task ProcessImageAsync(HttpContext context) - { - return this.ProcessImageAsyncTask(context).ToTask(); - } - /// /// Processes the image. /// @@ -158,19 +128,19 @@ namespace ImageProcessor.Web.HttpModules /// references to the intrinsic server objects /// /// - /// The . + /// The . /// - private IEnumerable ProcessImageAsyncTask(HttpContext context) + private async Task ProcessImageAsync(HttpContext context) { - // Is this a remote file. - bool isRemote = context.Request.Path.Equals(RemotePrefix, StringComparison.OrdinalIgnoreCase); + HttpRequest request = context.Request; + bool isRemote = request.Path.Equals(RemotePrefix, StringComparison.OrdinalIgnoreCase); string requestPath = string.Empty; string queryString = string.Empty; if (isRemote) { // We need to split the querystring to get the actual values we want. - string urlDecode = HttpUtility.UrlDecode(context.Request.QueryString.ToString()); + string urlDecode = HttpUtility.UrlDecode(request.QueryString.ToString()); if (urlDecode != null) { @@ -186,129 +156,87 @@ namespace ImageProcessor.Web.HttpModules } else { - requestPath = HostingEnvironment.MapPath(context.Request.Path); - queryString = HttpUtility.UrlDecode(context.Request.QueryString.ToString()); + requestPath = HostingEnvironment.MapPath(request.Path); + queryString = HttpUtility.UrlDecode(request.QueryString.ToString()); } // Only process requests that pass our sanitizing filter. if (ImageUtils.IsValidImageExtension(requestPath) && !string.IsNullOrWhiteSpace(queryString)) { - if (this.FileExists(requestPath, isRemote)) - { + string fullPath = string.Format("{0}?{1}", requestPath, queryString); + string imageName = Path.GetFileName(requestPath); - string fullPath = string.Format("{0}?{1}", requestPath, queryString); - string imageName = Path.GetFileName(requestPath); + // Create a new cache to help process and cache the request. + DiskCache cache = new DiskCache(request, requestPath, fullPath, imageName, isRemote); - // Create a new cache to help process and cache the request. - Cache cache = new Cache(requestPath, fullPath, imageName, isRemote); + // Is the file new or updated? + bool isNewOrUpdated = await cache.IsNewOrUpdatedFileAsync(); - // Is the file new or updated? - Task isUpdatedTask = cache.isNewOrUpdatedFileAsync(); - yield return isUpdatedTask; - bool isNewOrUpdated = isUpdatedTask.Result; - - // Only process if the file has been updated. - if (isNewOrUpdated) + // Only process if the file has been updated. + if (isNewOrUpdated) + { + // Process the image. + using (ImageFactory imageFactory = new ImageFactory()) { - // Process the image. - using (ImageFactory imageFactory = new ImageFactory()) + if (isRemote) { - if (isRemote) - { - Uri uri = new Uri(requestPath); - - HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri); + Uri uri = new Uri(requestPath); - Task responseTask = webRequest.GetResponseAsync(); - yield return responseTask; - //RemoteFile remoteFile = new RemoteFile(uri, false); + RemoteFile remoteFile = new RemoteFile(uri, false); - //Task getWebResponseTask = remoteFile.GetWebResponseAsync(); - //yield return getWebResponseTask; + // Prevent response blocking. + WebResponse webResponse = await remoteFile.GetWebResponseAsync().ConfigureAwait(false); - using (MemoryStream memoryStream = new MemoryStream()) + using (MemoryStream memoryStream = new MemoryStream()) + { + using (WebResponse response = webResponse) { - using (WebResponse response = responseTask.Result) + using (Stream responseStream = response.GetResponseStream()) { - using (Stream responseStream = response.GetResponseStream()) + if (responseStream != null) { - if (responseStream != null) - { - // Trim the cache. - Task trimCachedFoldersTask = cache.TrimCachedFoldersAsync(); - yield return trimCachedFoldersTask; - - responseStream.CopyTo(memoryStream); - - imageFactory.Load(memoryStream) - .AddQueryString(queryString) - .Format(ImageUtils.GetImageFormat(imageName)) - .AutoProcess().Save(cache.CachedPath); - - // Ensure that the LastWriteTime property of the source and cached file match. - Task setCachedLastWriteTimeTask = cache.SetCachedLastWriteTimeAsync(); - yield return setCachedLastWriteTimeTask; - DateTime dateTime = setCachedLastWriteTimeTask.Result; - - // Add to the cache. - Task addImageToCacheTask = cache.AddImageToCacheAsync(dateTime); - yield return addImageToCacheTask; - } - } + // Trim the cache. + await cache.TrimCachedFoldersAsync(); - } - } - } - else - { - // Trim the cache. - Task trimCachedFoldersTask = cache.TrimCachedFoldersAsync(); - yield return trimCachedFoldersTask; + responseStream.CopyTo(memoryStream); - imageFactory.Load(fullPath).AutoProcess().Save(cache.CachedPath); + imageFactory.Load(memoryStream) + .AddQueryString(queryString) + .Format(ImageUtils.GetImageFormat(imageName)) + .AutoProcess().Save(cache.CachedPath); - // Ensure that the LastWriteTime property of the source and cached file match. - Task setCachedLastWriteTimeTask = cache.SetCachedLastWriteTimeAsync(); - yield return setCachedLastWriteTimeTask; - DateTime dateTime = setCachedLastWriteTimeTask.Result; - - // Add to the cache. - Task addImageToCacheTask = cache.AddImageToCacheAsync(dateTime); - yield return addImageToCacheTask; + // Ensure that the LastWriteTime property of the source and cached file match. + DateTime dateTime = await cache.SetCachedLastWriteTimeAsync(); + // Add to the cache. + await cache.AddImageToCacheAsync(dateTime); + } + } + } } } - } + else + { + // Trim the cache. + await cache.TrimCachedFoldersAsync(); - context.Items[CachedResponseTypeKey] = ImageUtils.GetResponseType(imageName).ToDescription(); + imageFactory.Load(fullPath).AutoProcess().Save(cache.CachedPath); - // The cached file is valid so just rewrite the path. - context.RewritePath(cache.GetVirtualPath(cache.CachedPath, context.Request), false); - yield break; + // Ensure that the LastWriteTime property of the source and cached file match. + DateTime dateTime = await cache.SetCachedLastWriteTimeAsync(); + // Add to the cache. + await cache.AddImageToCacheAsync(dateTime); + } + } } - } - - yield break; - } + // Store the response type in the context for later retrieval. + context.Items[CachedResponseTypeKey] = ImageUtils.GetResponseType(imageName).ToDescription(); - /// - /// returns a value indicating whether a file exists. - /// - /// The path to the file to check. - /// Whether the file is remote. - /// True if the file exists, otherwise false. - /// If the file is remote the method will always return true. - private bool FileExists(string path, bool isRemote) - { - if (isRemote) - { - return true; + // The cached file is valid so just rewrite the path. + context.RewritePath(cache.GetVirtualCachedPath(), false); } - - FileInfo fileInfo = new FileInfo(path); - return fileInfo.Exists; } /// @@ -327,7 +255,7 @@ namespace ImageProcessor.Web.HttpModules response.ContentType = responseType; - response.AddHeader("Image-Served-By", "ImageProcessor/" + AssemblyVersion); + response.AddHeader("Image-Served-By", "ImageProcessor.Web/" + AssemblyVersion); HttpCachePolicy cache = response.Cache; diff --git a/src/ImageProcessor.Web/ImageFactoryExtensions.cs b/src/ImageProcessor.Web/ImageFactoryExtensions.cs index 93e383fae..2a6eb26a9 100644 --- a/src/ImageProcessor.Web/ImageFactoryExtensions.cs +++ b/src/ImageProcessor.Web/ImageFactoryExtensions.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Copyright (c) James South. -// Dual licensed under the MIT or GPL Version 2 licenses. +// Licensed under the Apache License, Version 2.0. // // ----------------------------------------------------------------------- @@ -38,17 +38,18 @@ namespace ImageProcessor.Web { if (factory.ShouldProcess) { + // It's faster to lock and run through our activated list than to create new instances. lock (SyncRoot) { // Get a list of all graphics processors that have parsed and matched the querystring. - List list = + List graphicsProcessors = ImageProcessorConfig.Instance.GraphicsProcessors .Where(x => x.MatchRegexIndex(factory.QueryString) != int.MaxValue) .OrderBy(y => y.SortOrder) .ToList(); // Loop through and process the image. - foreach (IGraphicsProcessor graphicsProcessor in list) + foreach (IGraphicsProcessor graphicsProcessor in graphicsProcessors) { factory.Image = graphicsProcessor.ProcessImage(factory); } diff --git a/src/ImageProcessor.Web/ImageProcessor.Web.csproj b/src/ImageProcessor.Web/ImageProcessor.Web.csproj index 8ea6cfe26..51aff4acc 100644 --- a/src/ImageProcessor.Web/ImageProcessor.Web.csproj +++ b/src/ImageProcessor.Web/ImageProcessor.Web.csproj @@ -66,6 +66,18 @@ MinimumRecommendedRules.ruleset + + False + ..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + @@ -78,6 +90,14 @@ ..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.Linq.dll + + + ..\packages\Microsoft.Bcl.1.0.16-rc\lib\net40\System.Runtime.dll + + + ..\packages\Microsoft.Bcl.1.0.16-rc\lib\net40\System.Threading.Tasks.dll + False + @@ -87,10 +107,8 @@ - - - + @@ -110,9 +128,16 @@ + + + + + xcopy /y "$(TargetPath)" "$(SolutionDir)\Test\Test\bin" +xcopy /y "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)\Test\Test\bin" + -
-
-
+
+
+
- - - + + + - - - - - + + + + + - + - - - - - - + + + + + + - + - - + + - - + + + + + + + + + + - + - + - - + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/License.rtf.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/License.rtf.REMOVED.git-id new file mode 100644 index 000000000..f8589ed0b --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/License.rtf.REMOVED.git-id @@ -0,0 +1 @@ +30ff7aa1ad2a7eedde4972dee464f229d4459439 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/Microsoft.Bcl.1.0.16-rc.nupkg.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/Microsoft.Bcl.1.0.16-rc.nupkg.REMOVED.git-id new file mode 100644 index 000000000..1e6cabeae --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/Microsoft.Bcl.1.0.16-rc.nupkg.REMOVED.git-id @@ -0,0 +1 @@ +168ac0ce88f1c4eeb97a4ad4665e4f0f3bfc4fd6 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/Microsoft.Bcl.1.0.16-rc.nuspec b/src/packages/Microsoft.Bcl.1.0.16-rc/Microsoft.Bcl.1.0.16-rc.nuspec new file mode 100644 index 000000000..5e1b53ed7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/Microsoft.Bcl.1.0.16-rc.nuspec @@ -0,0 +1,44 @@ + + + + Microsoft.Bcl + 1.0.16-rc + BCL Portability Pack for .NET Framework 4, Silverlight 4 and 5, and Windows Phone 7.5 + Microsoft + Microsoft + http://go.microsoft.com/fwlink/?LinkID=261998&clcid=0x409 + true + This packages enables projects targeting .NET Framework 4, Silverlight 4 and 5, and Windows Phone 7.5 (including any portable library combinations) to use new types from later versions of .NET including: + +CallerMemberNameAttribute +CallerLineNumberAttribute +CallerFilePathAttribute +Tuple<T1, T2, ...> +IProgress<T> +IStructuralComparable +IStructuralEquatable +Task + +These types are "unified" to their later version equivalent. For example, when running on .NET Framework 4.5, IProgress<T> from this package will be seen by the runtime as the same type as the one already in the platform. + +This package is not required for projects targeting .NET Framework 4.5 or .NET for Windows Store apps. For known issues, please see: http://blogs.msdn.com/b/bclteam/p/asynctargetingpackkb.aspx. + Adds support for types from later versions to .NET Framework 4, Silverlight 4 and 5, and Windows Phone 7.5. + Copyright © Microsoft Corporation + BCL Microsoft System Task IProgress + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/ReleaseNotes.txt b/src/packages/Microsoft.Bcl.1.0.16-rc/ReleaseNotes.txt new file mode 100644 index 000000000..1bb9317db --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/ReleaseNotes.txt @@ -0,0 +1,24 @@ +Changes in 1.0.16-rc +- Fixed: Adding empty content to .NET 4.5, Windows Phone 8, Windows 8 and portable combinations, so that app.config transforms + are not applied to projects targeting them. + +Changes in 1.0.15-rc + +- Fixed: System.Runtime is missing a type forward for Tuple + +Changes in 1.0.14-rc + +- Fixed: System.Runtime now has a fixed version for Phone 7.x due to the lack of a way to redirect them to a later version. + +Changes in 1.0.13-rc + +- Fixed: First-chance exceptions when running on Phone 7.x + +Changes in 1.0.12-rc + +- Fixed: Microsoft.Bcl.targets are not imported when using NuGet 2.0 to install Microsoft.Bcl +- Changed: Pulled build targets into a separate package (Microsoft.Bcl.Build) so other BCL packages can depend on it. + +Changes in 1.0.11-beta + +- Initial release \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/net40/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/net40/app.config.transform new file mode 100644 index 000000000..f9f9fa9b5 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/net40/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/net40/web.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/net40/web.config.transform new file mode 100644 index 000000000..f9f9fa9b5 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/net40/web.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/net45/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/net45/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8+wp71/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8+wp71/app.config.transform new file mode 100644 index 000000000..5fb1d8a00 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8+wp71/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8+wp8/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8+wp8/app.config.transform new file mode 100644 index 000000000..1aca32200 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8+wp8/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8/app.config.transform new file mode 100644 index 000000000..1aca32200 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl4+win8/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl5+win8+wp8/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl5+win8+wp8/app.config.transform new file mode 100644 index 000000000..f9f9fa9b5 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+sl5+win8+wp8/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+win8+wp8/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+win8+wp8/app.config.transform new file mode 100644 index 000000000..f9f9fa9b5 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+win8+wp8/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+win8/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+win8/app.config.transform new file mode 100644 index 000000000..f9f9fa9b5 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net40+win8/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net45+win8+wp8/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/portable-net45+win8+wp8/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl4-windowsphone71/app.config.transform b/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl4-windowsphone71/app.config.transform new file mode 100644 index 000000000..5fb1d8a00 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl4-windowsphone71/app.config.transform @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl4/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl4/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl5/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/sl5/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/win8/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/win8/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/content/wp8/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/content/wp8/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Threading.Tasks.dll new file mode 100644 index 000000000..d8ea84fcc Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Threading.Tasks.xml new file mode 100644 index 000000000..b47921e5d --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net40/System.Threading.Tasks.xml @@ -0,0 +1,475 @@ + + + + System.Threading.Tasks + + + + Holds state related to the builder's IAsyncStateMachine. + This is a mutable struct. Be very delicate with it. + + + A reference to the heap-allocated state machine object associated with this builder. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument is null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + + Gets the Action to use with an awaiter's OnCompleted or UnsafeOnCompleted method. + On first invocation, the supplied state machine will be boxed. + + Specifies the type of the method builder used. + Specifies the type of the state machine used. + The builder. + The state machine. + An Action to provide to the awaiter. + + + Provides the ability to invoke a state machine's MoveNext method under a supplied ExecutionContext. + + + The context with which to run MoveNext. + + + The state machine whose MoveNext method should be invoked. + + + Initializes the runner. + The context with which to run MoveNext. + + + Invokes MoveNext under the provided context. + + + Cached delegate used with ExecutionContext.Run. + + + Invokes the MoveNext method on the supplied IAsyncStateMachine. + The IAsyncStateMachine machine instance. + + + Provides a base class used to cache tasks of a specific return type. + Specifies the type of results the cached tasks return. + + + + A singleton cache for this result type. + This may be null if there are no cached tasks for this TResult. + + + + Creates a non-disposable task. + The result for the task. + The cacheable task. + + + Creates a cache. + A task cache for this result type. + + + Gets a cached task if one exists. + The result for which we want a cached task. + A cached task if one exists; otherwise, null. + + + Provides a cache for Boolean tasks. + + + A true task. + + + A false task. + + + Gets a cached task for the Boolean result. + true or false + A cached task for the Boolean result. + + + Provides a cache for zero Int32 tasks. + + + The minimum value, inclusive, for which we want a cached task. + + + The maximum value, exclusive, for which we want a cached task. + + + The cache of Task{Int32}. + + + Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX). + + + Gets a cached task for the zero Int32 result. + The integer value + A cached task for the Int32 result or null if not cached. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + Represents an asynchronous method builder. + + + A cached VoidTaskResult task used for builders that complete synchronously. + + + The generic builder object to which this non-generic instance delegates. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state. + + The builder is not initialized. + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + + Gets the for this builder. + The representing the builder's asynchronous operation. + The builder is not initialized. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + A cached task for default(TResult). + + + State related to the IAsyncStateMachine. + + + The lazily-initialized task. + Must be named m_task for debugger step-over to work correctly. + + + The lazily-initialized task completion source. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state with the specified result. + + The result to use to complete the task. + The task has already completed. + + + + Completes the builder by using either the supplied completed task, or by completing + the builder's previously accessed task using default(TResult). + + A task already completed with the value default(TResult). + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + This should only be invoked from within an asynchronous method, + and only by the debugger. + + + + + Gets a task for the specified result. This will either + be a cached or new task, never null. + + The result for which we need a task. + The completed task containing the result. + + + Gets the lazily-initialized TaskCompletionSource. + + + Gets the for this builder. + The representing the builder's asynchronous operation. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return void. + This type is intended for compiler use only. + + + + The synchronization context associated with this operation. + + + State related to the IAsyncStateMachine. + + + An object used by the debugger to uniquely identify this builder. Lazily initialized. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Registers with UnobservedTaskException to suppress exception crashing. + + + Non-zero if PreventUnobservedTaskExceptions has already been invoked. + + + Initializes a new . + The initialized . + + + Initializes the . + The synchronizationContext associated with this operation. This may be null. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument was null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + Completes the method builder successfully. + + + Faults the method builder with an exception. + The exception that is the cause of this fault. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + + + Notifies the current synchronization context that the operation completed. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger and only in a single-threaded manner. + + + + + Represents state machines generated for asynchronous methods. + This type is intended for compiler use only. + + + + Moves the state machine to its next state. + + + Configures the state machine with a heap-allocated replica. + The heap-allocated replica. + + + + Represents an awaiter used to schedule continuations when an await operation completes. + + + + + Represents an operation that will schedule continuations when the operation completes. + + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. + + + Used with Task(of void) + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net45/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/net45/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Runtime.dll new file mode 100644 index 000000000..5ecd561ad Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Runtime.xml new file mode 100644 index 000000000..53f5bef44 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Runtime.xml @@ -0,0 +1,860 @@ + + + + System.Runtime + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Argument must be of type {0}.. + + + + + Looks up a localized string similar to The last element of an eight element tuple must be a Tuple.. + + + + + Defines methods to support the comparison of objects for structural equality. + + + + + Determines whether an object is structurally equal to the current instance. + + The object to compare with the current instance. + An object that determines whether the current instance and other are equal. + true if the two objects are equal; otherwise, false. + + + + Returns a hash code for the current instance. + + An object that computes the hash code of the current object. + The hash code for the current instance. + + + + Supports the structural comparison of collection objects. + + + + + Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order. + + The object to compare with the current instance. + An object that compares members of the current collection object with the corresponding members of other. + An integer that indicates the relationship of the current collection object to other. + + This instance and other are not the same type. + + + + + Encapsulates a method that has five parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + + Helper so we can call some tuple methods recursively without knowing the underlying types. + + + + + Provides static methods for creating tuple objects. + + + + + Creates a new 1-tuple, or singleton. + + The type of the only component of the tuple. + The value of the only component of the tuple. + A tuple whose value is (item1). + + + + Creates a new 3-tuple, or pair. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + An 2-tuple (pair) whose value is (item1, item2). + + + + Creates a new 3-tuple, or triple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + An 3-tuple (triple) whose value is (item1, item2, item3). + + + + Creates a new 4-tuple, or quadruple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + An 4-tuple (quadruple) whose value is (item1, item2, item3, item4). + + + + Creates a new 5-tuple, or quintuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + An 5-tuple (quintuple) whose value is (item1, item2, item3, item4, item5). + + + + Creates a new 6-tuple, or sextuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + An 6-tuple (sextuple) whose value is (item1, item2, item3, item4, item5, item6). + + + + Creates a new 7-tuple, or septuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + An 7-tuple (septuple) whose value is (item1, item2, item3, item4, item5, item6, item7). + + + + Creates a new 8-tuple, or octuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + The type of the eighth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + The value of the eighth component of the tuple. + An 8-tuple (octuple) whose value is (item1, item2, item3, item4, item5, item6, item7, item8). + + + + Represents a 1-tuple, or singleton. + + The type of the tuple's only component. + + + + Initializes a new instance of the class. + + The value of the current tuple object's single component. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the tuple object's single component. + + + The value of the current tuple object's single component. + + + + + Represents an 2-tuple, or pair. + + The type of the first component of the tuple. + The type of the second component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Represents an 3-tuple, or triple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Represents an 4-tuple, or quadruple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Represents an 5-tuple, or quintuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Represents an 6-tuple, or sextuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Gets the value of the current tuple object's sixth component. + + + The value of the current tuple object's sixth component. + + + + + Represents an 7-tuple, or septuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Gets the value of the current tuple object's sixth component. + + + The value of the current tuple object's sixth component. + + + + + Gets the value of the current tuple object's seventh component. + + + The value of the current tuple object's seventh component. + + + + + Represents an n-tuple, where n is 8 or greater. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + Any generic Tuple object that defines the types of the tuple's remaining components. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + Any generic Tuple object that contains the values of the tuple's remaining components. + + rest is not a generic Tuple object. + + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Gets the value of the current tuple object's sixth component. + + + The value of the current tuple object's sixth component. + + + + + Gets the value of the current tuple object's seventh component. + + + The value of the current tuple object's seventh component. + + + + + Gets the current tuple object's remaining components. + + + The value of the current tuple object's remaining components. + + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll.REMOVED.git-id new file mode 100644 index 000000000..eeeb938bd --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll.REMOVED.git-id @@ -0,0 +1 @@ +9962594785f41f62455059efef8b8007e719a054 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.xml.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.xml.REMOVED.git-id new file mode 100644 index 000000000..5db91daf8 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.xml.REMOVED.git-id @@ -0,0 +1 @@ +6c770122e85766385d4408b770fac43f117b065a \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll.REMOVED.git-id new file mode 100644 index 000000000..eeeb938bd --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll.REMOVED.git-id @@ -0,0 +1 @@ +9962594785f41f62455059efef8b8007e719a054 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.xml.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.xml.REMOVED.git-id new file mode 100644 index 000000000..5db91daf8 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.xml.REMOVED.git-id @@ -0,0 +1 @@ +6c770122e85766385d4408b770fac43f117b065a \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll.REMOVED.git-id new file mode 100644 index 000000000..eeeb938bd --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll.REMOVED.git-id @@ -0,0 +1 @@ +9962594785f41f62455059efef8b8007e719a054 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Threading.Tasks.xml.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Threading.Tasks.xml.REMOVED.git-id new file mode 100644 index 000000000..5db91daf8 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl4+win8/System.Threading.Tasks.xml.REMOVED.git-id @@ -0,0 +1 @@ +6c770122e85766385d4408b770fac43f117b065a \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll new file mode 100644 index 000000000..d8ea84fcc Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.xml new file mode 100644 index 000000000..b47921e5d --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.xml @@ -0,0 +1,475 @@ + + + + System.Threading.Tasks + + + + Holds state related to the builder's IAsyncStateMachine. + This is a mutable struct. Be very delicate with it. + + + A reference to the heap-allocated state machine object associated with this builder. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument is null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + + Gets the Action to use with an awaiter's OnCompleted or UnsafeOnCompleted method. + On first invocation, the supplied state machine will be boxed. + + Specifies the type of the method builder used. + Specifies the type of the state machine used. + The builder. + The state machine. + An Action to provide to the awaiter. + + + Provides the ability to invoke a state machine's MoveNext method under a supplied ExecutionContext. + + + The context with which to run MoveNext. + + + The state machine whose MoveNext method should be invoked. + + + Initializes the runner. + The context with which to run MoveNext. + + + Invokes MoveNext under the provided context. + + + Cached delegate used with ExecutionContext.Run. + + + Invokes the MoveNext method on the supplied IAsyncStateMachine. + The IAsyncStateMachine machine instance. + + + Provides a base class used to cache tasks of a specific return type. + Specifies the type of results the cached tasks return. + + + + A singleton cache for this result type. + This may be null if there are no cached tasks for this TResult. + + + + Creates a non-disposable task. + The result for the task. + The cacheable task. + + + Creates a cache. + A task cache for this result type. + + + Gets a cached task if one exists. + The result for which we want a cached task. + A cached task if one exists; otherwise, null. + + + Provides a cache for Boolean tasks. + + + A true task. + + + A false task. + + + Gets a cached task for the Boolean result. + true or false + A cached task for the Boolean result. + + + Provides a cache for zero Int32 tasks. + + + The minimum value, inclusive, for which we want a cached task. + + + The maximum value, exclusive, for which we want a cached task. + + + The cache of Task{Int32}. + + + Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX). + + + Gets a cached task for the zero Int32 result. + The integer value + A cached task for the Int32 result or null if not cached. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + Represents an asynchronous method builder. + + + A cached VoidTaskResult task used for builders that complete synchronously. + + + The generic builder object to which this non-generic instance delegates. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state. + + The builder is not initialized. + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + + Gets the for this builder. + The representing the builder's asynchronous operation. + The builder is not initialized. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + A cached task for default(TResult). + + + State related to the IAsyncStateMachine. + + + The lazily-initialized task. + Must be named m_task for debugger step-over to work correctly. + + + The lazily-initialized task completion source. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state with the specified result. + + The result to use to complete the task. + The task has already completed. + + + + Completes the builder by using either the supplied completed task, or by completing + the builder's previously accessed task using default(TResult). + + A task already completed with the value default(TResult). + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + This should only be invoked from within an asynchronous method, + and only by the debugger. + + + + + Gets a task for the specified result. This will either + be a cached or new task, never null. + + The result for which we need a task. + The completed task containing the result. + + + Gets the lazily-initialized TaskCompletionSource. + + + Gets the for this builder. + The representing the builder's asynchronous operation. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return void. + This type is intended for compiler use only. + + + + The synchronization context associated with this operation. + + + State related to the IAsyncStateMachine. + + + An object used by the debugger to uniquely identify this builder. Lazily initialized. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Registers with UnobservedTaskException to suppress exception crashing. + + + Non-zero if PreventUnobservedTaskExceptions has already been invoked. + + + Initializes a new . + The initialized . + + + Initializes the . + The synchronizationContext associated with this operation. This may be null. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument was null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + Completes the method builder successfully. + + + Faults the method builder with an exception. + The exception that is the cause of this fault. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + + + Notifies the current synchronization context that the operation completed. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger and only in a single-threaded manner. + + + + + Represents state machines generated for asynchronous methods. + This type is intended for compiler use only. + + + + Moves the state machine to its next state. + + + Configures the state machine with a heap-allocated replica. + The heap-allocated replica. + + + + Represents an awaiter used to schedule continuations when an await operation completes. + + + + + Represents an operation that will schedule continuations when the operation completes. + + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. + + + Used with Task(of void) + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Threading.Tasks.dll new file mode 100644 index 000000000..d8ea84fcc Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Threading.Tasks.xml new file mode 100644 index 000000000..b47921e5d --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8+wp8/System.Threading.Tasks.xml @@ -0,0 +1,475 @@ + + + + System.Threading.Tasks + + + + Holds state related to the builder's IAsyncStateMachine. + This is a mutable struct. Be very delicate with it. + + + A reference to the heap-allocated state machine object associated with this builder. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument is null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + + Gets the Action to use with an awaiter's OnCompleted or UnsafeOnCompleted method. + On first invocation, the supplied state machine will be boxed. + + Specifies the type of the method builder used. + Specifies the type of the state machine used. + The builder. + The state machine. + An Action to provide to the awaiter. + + + Provides the ability to invoke a state machine's MoveNext method under a supplied ExecutionContext. + + + The context with which to run MoveNext. + + + The state machine whose MoveNext method should be invoked. + + + Initializes the runner. + The context with which to run MoveNext. + + + Invokes MoveNext under the provided context. + + + Cached delegate used with ExecutionContext.Run. + + + Invokes the MoveNext method on the supplied IAsyncStateMachine. + The IAsyncStateMachine machine instance. + + + Provides a base class used to cache tasks of a specific return type. + Specifies the type of results the cached tasks return. + + + + A singleton cache for this result type. + This may be null if there are no cached tasks for this TResult. + + + + Creates a non-disposable task. + The result for the task. + The cacheable task. + + + Creates a cache. + A task cache for this result type. + + + Gets a cached task if one exists. + The result for which we want a cached task. + A cached task if one exists; otherwise, null. + + + Provides a cache for Boolean tasks. + + + A true task. + + + A false task. + + + Gets a cached task for the Boolean result. + true or false + A cached task for the Boolean result. + + + Provides a cache for zero Int32 tasks. + + + The minimum value, inclusive, for which we want a cached task. + + + The maximum value, exclusive, for which we want a cached task. + + + The cache of Task{Int32}. + + + Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX). + + + Gets a cached task for the zero Int32 result. + The integer value + A cached task for the Int32 result or null if not cached. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + Represents an asynchronous method builder. + + + A cached VoidTaskResult task used for builders that complete synchronously. + + + The generic builder object to which this non-generic instance delegates. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state. + + The builder is not initialized. + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + + Gets the for this builder. + The representing the builder's asynchronous operation. + The builder is not initialized. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + A cached task for default(TResult). + + + State related to the IAsyncStateMachine. + + + The lazily-initialized task. + Must be named m_task for debugger step-over to work correctly. + + + The lazily-initialized task completion source. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state with the specified result. + + The result to use to complete the task. + The task has already completed. + + + + Completes the builder by using either the supplied completed task, or by completing + the builder's previously accessed task using default(TResult). + + A task already completed with the value default(TResult). + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + This should only be invoked from within an asynchronous method, + and only by the debugger. + + + + + Gets a task for the specified result. This will either + be a cached or new task, never null. + + The result for which we need a task. + The completed task containing the result. + + + Gets the lazily-initialized TaskCompletionSource. + + + Gets the for this builder. + The representing the builder's asynchronous operation. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return void. + This type is intended for compiler use only. + + + + The synchronization context associated with this operation. + + + State related to the IAsyncStateMachine. + + + An object used by the debugger to uniquely identify this builder. Lazily initialized. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Registers with UnobservedTaskException to suppress exception crashing. + + + Non-zero if PreventUnobservedTaskExceptions has already been invoked. + + + Initializes a new . + The initialized . + + + Initializes the . + The synchronizationContext associated with this operation. This may be null. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument was null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + Completes the method builder successfully. + + + Faults the method builder with an exception. + The exception that is the cause of this fault. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + + + Notifies the current synchronization context that the operation completed. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger and only in a single-threaded manner. + + + + + Represents state machines generated for asynchronous methods. + This type is intended for compiler use only. + + + + Moves the state machine to its next state. + + + Configures the state machine with a heap-allocated replica. + The heap-allocated replica. + + + + Represents an awaiter used to schedule continuations when an await operation completes. + + + + + Represents an operation that will schedule continuations when the operation completes. + + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. + + + Used with Task(of void) + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Threading.Tasks.dll new file mode 100644 index 000000000..d8ea84fcc Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Threading.Tasks.xml new file mode 100644 index 000000000..b47921e5d --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net40+win8/System.Threading.Tasks.xml @@ -0,0 +1,475 @@ + + + + System.Threading.Tasks + + + + Holds state related to the builder's IAsyncStateMachine. + This is a mutable struct. Be very delicate with it. + + + A reference to the heap-allocated state machine object associated with this builder. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument is null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + + Gets the Action to use with an awaiter's OnCompleted or UnsafeOnCompleted method. + On first invocation, the supplied state machine will be boxed. + + Specifies the type of the method builder used. + Specifies the type of the state machine used. + The builder. + The state machine. + An Action to provide to the awaiter. + + + Provides the ability to invoke a state machine's MoveNext method under a supplied ExecutionContext. + + + The context with which to run MoveNext. + + + The state machine whose MoveNext method should be invoked. + + + Initializes the runner. + The context with which to run MoveNext. + + + Invokes MoveNext under the provided context. + + + Cached delegate used with ExecutionContext.Run. + + + Invokes the MoveNext method on the supplied IAsyncStateMachine. + The IAsyncStateMachine machine instance. + + + Provides a base class used to cache tasks of a specific return type. + Specifies the type of results the cached tasks return. + + + + A singleton cache for this result type. + This may be null if there are no cached tasks for this TResult. + + + + Creates a non-disposable task. + The result for the task. + The cacheable task. + + + Creates a cache. + A task cache for this result type. + + + Gets a cached task if one exists. + The result for which we want a cached task. + A cached task if one exists; otherwise, null. + + + Provides a cache for Boolean tasks. + + + A true task. + + + A false task. + + + Gets a cached task for the Boolean result. + true or false + A cached task for the Boolean result. + + + Provides a cache for zero Int32 tasks. + + + The minimum value, inclusive, for which we want a cached task. + + + The maximum value, exclusive, for which we want a cached task. + + + The cache of Task{Int32}. + + + Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX). + + + Gets a cached task for the zero Int32 result. + The integer value + A cached task for the Int32 result or null if not cached. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + Represents an asynchronous method builder. + + + A cached VoidTaskResult task used for builders that complete synchronously. + + + The generic builder object to which this non-generic instance delegates. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state. + + The builder is not initialized. + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + + Gets the for this builder. + The representing the builder's asynchronous operation. + The builder is not initialized. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + A cached task for default(TResult). + + + State related to the IAsyncStateMachine. + + + The lazily-initialized task. + Must be named m_task for debugger step-over to work correctly. + + + The lazily-initialized task completion source. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state with the specified result. + + The result to use to complete the task. + The task has already completed. + + + + Completes the builder by using either the supplied completed task, or by completing + the builder's previously accessed task using default(TResult). + + A task already completed with the value default(TResult). + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + This should only be invoked from within an asynchronous method, + and only by the debugger. + + + + + Gets a task for the specified result. This will either + be a cached or new task, never null. + + The result for which we need a task. + The completed task containing the result. + + + Gets the lazily-initialized TaskCompletionSource. + + + Gets the for this builder. + The representing the builder's asynchronous operation. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return void. + This type is intended for compiler use only. + + + + The synchronization context associated with this operation. + + + State related to the IAsyncStateMachine. + + + An object used by the debugger to uniquely identify this builder. Lazily initialized. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Registers with UnobservedTaskException to suppress exception crashing. + + + Non-zero if PreventUnobservedTaskExceptions has already been invoked. + + + Initializes a new . + The initialized . + + + Initializes the . + The synchronizationContext associated with this operation. This may be null. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument was null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + Completes the method builder successfully. + + + Faults the method builder with an exception. + The exception that is the cause of this fault. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + + + Notifies the current synchronization context that the operation completed. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger and only in a single-threaded manner. + + + + + Represents state machines generated for asynchronous methods. + This type is intended for compiler use only. + + + + Moves the state machine to its next state. + + + Configures the state machine with a heap-allocated replica. + The heap-allocated replica. + + + + Represents an awaiter used to schedule continuations when an await operation completes. + + + + + Represents an operation that will schedule continuations when the operation completes. + + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. + + + Used with Task(of void) + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net45+win8+wp8/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/portable-net45+win8+wp8/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Runtime.dll new file mode 100644 index 000000000..5ecd561ad Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Runtime.xml new file mode 100644 index 000000000..53f5bef44 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Runtime.xml @@ -0,0 +1,860 @@ + + + + System.Runtime + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Argument must be of type {0}.. + + + + + Looks up a localized string similar to The last element of an eight element tuple must be a Tuple.. + + + + + Defines methods to support the comparison of objects for structural equality. + + + + + Determines whether an object is structurally equal to the current instance. + + The object to compare with the current instance. + An object that determines whether the current instance and other are equal. + true if the two objects are equal; otherwise, false. + + + + Returns a hash code for the current instance. + + An object that computes the hash code of the current object. + The hash code for the current instance. + + + + Supports the structural comparison of collection objects. + + + + + Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order. + + The object to compare with the current instance. + An object that compares members of the current collection object with the corresponding members of other. + An integer that indicates the relationship of the current collection object to other. + + This instance and other are not the same type. + + + + + Encapsulates a method that has five parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + + Helper so we can call some tuple methods recursively without knowing the underlying types. + + + + + Provides static methods for creating tuple objects. + + + + + Creates a new 1-tuple, or singleton. + + The type of the only component of the tuple. + The value of the only component of the tuple. + A tuple whose value is (item1). + + + + Creates a new 3-tuple, or pair. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + An 2-tuple (pair) whose value is (item1, item2). + + + + Creates a new 3-tuple, or triple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + An 3-tuple (triple) whose value is (item1, item2, item3). + + + + Creates a new 4-tuple, or quadruple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + An 4-tuple (quadruple) whose value is (item1, item2, item3, item4). + + + + Creates a new 5-tuple, or quintuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + An 5-tuple (quintuple) whose value is (item1, item2, item3, item4, item5). + + + + Creates a new 6-tuple, or sextuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + An 6-tuple (sextuple) whose value is (item1, item2, item3, item4, item5, item6). + + + + Creates a new 7-tuple, or septuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + An 7-tuple (septuple) whose value is (item1, item2, item3, item4, item5, item6, item7). + + + + Creates a new 8-tuple, or octuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + The type of the eighth component of the tuple. + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + The value of the eighth component of the tuple. + An 8-tuple (octuple) whose value is (item1, item2, item3, item4, item5, item6, item7, item8). + + + + Represents a 1-tuple, or singleton. + + The type of the tuple's only component. + + + + Initializes a new instance of the class. + + The value of the current tuple object's single component. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the tuple object's single component. + + + The value of the current tuple object's single component. + + + + + Represents an 2-tuple, or pair. + + The type of the first component of the tuple. + The type of the second component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Represents an 3-tuple, or triple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Represents an 4-tuple, or quadruple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Represents an 5-tuple, or quintuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Represents an 6-tuple, or sextuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Gets the value of the current tuple object's sixth component. + + + The value of the current tuple object's sixth component. + + + + + Represents an 7-tuple, or septuple. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Gets the value of the current tuple object's sixth component. + + + The value of the current tuple object's sixth component. + + + + + Gets the value of the current tuple object's seventh component. + + + The value of the current tuple object's seventh component. + + + + + Represents an n-tuple, where n is 8 or greater. + + The type of the first component of the tuple. + The type of the second component of the tuple. + The type of the third component of the tuple. + The type of the fourth component of the tuple. + The type of the fifth component of the tuple. + The type of the sixth component of the tuple. + The type of the seventh component of the tuple. + Any generic Tuple object that defines the types of the tuple's remaining components. + + + + Initializes a new instance of the class. + + The value of the first component of the tuple. + The value of the second component of the tuple. + The value of the third component of the tuple. + The value of the fourth component of the tuple. + The value of the fifth component of the tuple. + The value of the sixth component of the tuple. + The value of the seventh component of the tuple. + Any generic Tuple object that contains the values of the tuple's remaining components. + + rest is not a generic Tuple object. + + + + + Returns a value that indicates whether the current tuple object is equal to a specified object. + + The object to compare with this instance. + true if the current instance is equal to the specified object; otherwise, false. + + + + Calculates the hash code for the current tuple object. + + A 32-bit signed integer hash code. + + + + Returns a string that represents the value of this tuple instance. + + The string representation of this tuple object. + + + + Gets the value of the current tuple object's first component. + + + The value of the current tuple object's first component. + + + + + Gets the value of the current tuple object's second component. + + + The value of the current tuple object's second component. + + + + + Gets the value of the current tuple object's third component. + + + The value of the current tuple object's third component. + + + + + Gets the value of the current tuple object's fourth component. + + + The value of the current tuple object's fourth component. + + + + + Gets the value of the current tuple object's fifth component. + + + The value of the current tuple object's fifth component. + + + + + Gets the value of the current tuple object's sixth component. + + + The value of the current tuple object's sixth component. + + + + + Gets the value of the current tuple object's seventh component. + + + The value of the current tuple object's seventh component. + + + + + Gets the current tuple object's remaining components. + + + The value of the current tuple object's remaining components. + + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Threading.Tasks.dll.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Threading.Tasks.dll.REMOVED.git-id new file mode 100644 index 000000000..eeeb938bd --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Threading.Tasks.dll.REMOVED.git-id @@ -0,0 +1 @@ +9962594785f41f62455059efef8b8007e719a054 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Threading.Tasks.xml.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Threading.Tasks.xml.REMOVED.git-id new file mode 100644 index 000000000..5db91daf8 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4-windowsphone71/System.Threading.Tasks.xml.REMOVED.git-id @@ -0,0 +1 @@ +6c770122e85766385d4408b770fac43f117b065a \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Threading.Tasks.dll.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Threading.Tasks.dll.REMOVED.git-id new file mode 100644 index 000000000..eeeb938bd --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Threading.Tasks.dll.REMOVED.git-id @@ -0,0 +1 @@ +9962594785f41f62455059efef8b8007e719a054 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Threading.Tasks.xml.REMOVED.git-id b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Threading.Tasks.xml.REMOVED.git-id new file mode 100644 index 000000000..5db91daf8 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl4/System.Threading.Tasks.xml.REMOVED.git-id @@ -0,0 +1 @@ +6c770122e85766385d4408b770fac43f117b065a \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Runtime.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Runtime.dll new file mode 100644 index 000000000..a79fae2ff Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Runtime.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Runtime.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Runtime.xml new file mode 100644 index 000000000..93cb00d74 --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Runtime.xml @@ -0,0 +1,56 @@ + + + + System.Runtime + + + + Defines a provider for progress updates. + The type of progress update value. + + + Reports a progress update. + The value of the updated progress. + + + Identities the async state machine type for this method. + + + Identities the state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + Gets the type that implements the state machine. + + + Initializes the attribute. + The type that implements the state machine. + + + + Allows you to obtain the method or property name of the caller to the method. + + + + + Allows you to obtain the line number in the source file at which the method is called. + + + + + Allows you to obtain the full path of the source file that contains the caller. + This is the file path at the time of compile. + + + + Identities the iterator state machine type for this method. + + + Initializes the attribute. + The type that implements the state machine. + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Threading.Tasks.dll new file mode 100644 index 000000000..d8ea84fcc Binary files /dev/null and b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Threading.Tasks.xml new file mode 100644 index 000000000..b47921e5d --- /dev/null +++ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/sl5/System.Threading.Tasks.xml @@ -0,0 +1,475 @@ + + + + System.Threading.Tasks + + + + Holds state related to the builder's IAsyncStateMachine. + This is a mutable struct. Be very delicate with it. + + + A reference to the heap-allocated state machine object associated with this builder. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument is null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + + Gets the Action to use with an awaiter's OnCompleted or UnsafeOnCompleted method. + On first invocation, the supplied state machine will be boxed. + + Specifies the type of the method builder used. + Specifies the type of the state machine used. + The builder. + The state machine. + An Action to provide to the awaiter. + + + Provides the ability to invoke a state machine's MoveNext method under a supplied ExecutionContext. + + + The context with which to run MoveNext. + + + The state machine whose MoveNext method should be invoked. + + + Initializes the runner. + The context with which to run MoveNext. + + + Invokes MoveNext under the provided context. + + + Cached delegate used with ExecutionContext.Run. + + + Invokes the MoveNext method on the supplied IAsyncStateMachine. + The IAsyncStateMachine machine instance. + + + Provides a base class used to cache tasks of a specific return type. + Specifies the type of results the cached tasks return. + + + + A singleton cache for this result type. + This may be null if there are no cached tasks for this TResult. + + + + Creates a non-disposable task. + The result for the task. + The cacheable task. + + + Creates a cache. + A task cache for this result type. + + + Gets a cached task if one exists. + The result for which we want a cached task. + A cached task if one exists; otherwise, null. + + + Provides a cache for Boolean tasks. + + + A true task. + + + A false task. + + + Gets a cached task for the Boolean result. + true or false + A cached task for the Boolean result. + + + Provides a cache for zero Int32 tasks. + + + The minimum value, inclusive, for which we want a cached task. + + + The maximum value, exclusive, for which we want a cached task. + + + The cache of Task{Int32}. + + + Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX). + + + Gets a cached task for the zero Int32 result. + The integer value + A cached task for the Int32 result or null if not cached. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + Represents an asynchronous method builder. + + + A cached VoidTaskResult task used for builders that complete synchronously. + + + The generic builder object to which this non-generic instance delegates. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state. + + The builder is not initialized. + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + + Gets the for this builder. + The representing the builder's asynchronous operation. + The builder is not initialized. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return . + This type is intended for compiler use only. + + + AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value. + Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, + or else the copies may end up building distinct Task instances. + + + + A cached task for default(TResult). + + + State related to the IAsyncStateMachine. + + + The lazily-initialized task. + Must be named m_task for debugger step-over to work correctly. + + + The lazily-initialized task completion source. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Initializes a new . + The initialized . + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Completes the in the + RanToCompletion state with the specified result. + + The result to use to complete the task. + The task has already completed. + + + + Completes the builder by using either the supplied completed task, or by completing + the builder's previously accessed task using default(TResult). + + A task already completed with the value default(TResult). + The task has already completed. + + + + Completes the in the + Faulted state with the specified exception. + + The to use to fault the task. + The argument is null (Nothing in Visual Basic). + The task has already completed. + + + + Called by the debugger to request notification when the first wait operation + (await, Wait, Result, etc.) on this builder's task completes. + + + true to enable notification; false to disable a previously set notification. + + + This should only be invoked from within an asynchronous method, + and only by the debugger. + + + + + Gets a task for the specified result. This will either + be a cached or new task, never null. + + The result for which we need a task. + The completed task containing the result. + + + Gets the lazily-initialized TaskCompletionSource. + + + Gets the for this builder. + The representing the builder's asynchronous operation. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger, and only in a single-threaded manner + when no other threads are in the middle of accessing this property or this.Task. + + + + + Provides a builder for asynchronous methods that return void. + This type is intended for compiler use only. + + + + The synchronization context associated with this operation. + + + State related to the IAsyncStateMachine. + + + An object used by the debugger to uniquely identify this builder. Lazily initialized. + + + Temporary support for disabling crashing if tasks go unobserved. + + + Registers with UnobservedTaskException to suppress exception crashing. + + + Non-zero if PreventUnobservedTaskExceptions has already been invoked. + + + Initializes a new . + The initialized . + + + Initializes the . + The synchronizationContext associated with this operation. This may be null. + + + Initiates the builder's execution with the associated state machine. + Specifies the type of the state machine. + The state machine instance, passed by reference. + The argument was null (Nothing in Visual Basic). + + + Associates the builder with the state machine it represents. + The heap-allocated state machine object. + The argument was null (Nothing in Visual Basic). + The builder is incorrectly initialized. + + + Perform any initialization necessary prior to lifting the builder to the heap. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + + Schedules the specified state machine to be pushed forward when the specified awaiter completes. + + Specifies the type of the awaiter. + Specifies the type of the state machine. + The awaiter. + The state machine. + + + Completes the method builder successfully. + + + Faults the method builder with an exception. + The exception that is the cause of this fault. + The argument is null (Nothing in Visual Basic). + The builder is not initialized. + + + Notifies the current synchronization context that the operation completed. + + + + Gets an object that may be used to uniquely identify this builder to the debugger. + + + This property lazily instantiates the ID in a non-thread-safe manner. + It must only be used by the debugger and only in a single-threaded manner. + + + + + Represents state machines generated for asynchronous methods. + This type is intended for compiler use only. + + + + Moves the state machine to its next state. + + + Configures the state machine with a heap-allocated replica. + The heap-allocated replica. + + + + Represents an awaiter used to schedule continuations when an await operation completes. + + + + + Represents an operation that will schedule continuations when the operation completes. + + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + + + Schedules the continuation action to be invoked when the instance completes. + The action to invoke when the operation completes. + The argument is null (Nothing in Visual Basic). + Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. + + + Used with Task(of void) + + + diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/win8/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/win8/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.1.0.16-rc/lib/wp8/_._ b/src/packages/Microsoft.Bcl.1.0.16-rc/lib/wp8/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/License.rtf.REMOVED.git-id b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/License.rtf.REMOVED.git-id new file mode 100644 index 000000000..8185ccb31 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/License.rtf.REMOVED.git-id @@ -0,0 +1 @@ +bbb92174d8581c8d4488c9bf9adad8a19468bb02 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/Microsoft.Bcl.Async.1.0.14-rc.nupkg.REMOVED.git-id b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/Microsoft.Bcl.Async.1.0.14-rc.nupkg.REMOVED.git-id new file mode 100644 index 000000000..c87c54077 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/Microsoft.Bcl.Async.1.0.14-rc.nupkg.REMOVED.git-id @@ -0,0 +1 @@ +5758724dea24c0cf57ec902add6f5f6302655f96 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/Microsoft.Bcl.Async.1.0.14-rc.nuspec b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/Microsoft.Bcl.Async.1.0.14-rc.nuspec new file mode 100644 index 000000000..af299caee --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/Microsoft.Bcl.Async.1.0.14-rc.nuspec @@ -0,0 +1,39 @@ + + + + Microsoft.Bcl.Async + 1.0.14-rc + Async for .NET Framework 4, Silverlight 4 and 5, and Windows Phone 7.5 and 8 + Microsoft + Microsoft + http://go.microsoft.com/fwlink/?LinkID=262007&clcid=0x409 + true + This package enables Visual Studio 2012 projects targeting .NET Framework 4 (with KB2468871), Silverlight 4 and 5, and Windows Phone 7.5 (including any portable library combinations) to use the new 'async' and 'await' keywords. This package also includes Task-based extension methods that allow using some of the existing asynchronous APIs with the new language keywords. Windows Phone 8 projects can use this package to get access to async extension methods for the networking types. + +This package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5 or .NET for Windows Store apps when consuming a library that uses this package. For known issues, please see: http://blogs.msdn.com/b/bclteam/p/asynctargetingpackkb.aspx. + Enables usage of the 'async' and 'await' keywords from projects targeting .NET Framework 4 (with KB2468871), Silverlight 4 and 5, and Windows Phone 7.5 and 8. + + Copyright © Microsoft Corporation + + BCL Microsoft System Async Await Asynchronous + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/ReleaseNotes.txt b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/ReleaseNotes.txt new file mode 100644 index 000000000..6099fc6be --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/ReleaseNotes.txt @@ -0,0 +1,18 @@ +Changes in 1.0.14-rc +- Changed: Moved to latest Microsoft.Bcl package (1.0.16-rc). + +Changes in 1.0.13-beta +- Fixed: ConfigureAwait(false) still continue on captured context when using Async Targeting Pack (http://connect.microsoft.com/VisualStudio/feedback/details/767008/configureawait-false-still-continue-on-captured-context-when-using-async-targeting-pack) +- Fixed: Silverlight 4 projects now get Microsoft.Threading.Tasks.Extensions.Silverlight +- Added: Package now references System.Net.dll automatically for .NET 4.0 projects so that networking extension methods work out of the box. +- Changed: Moved types in Microsoft.Threading.Tasks from System.* to Microsoft.* namespace to prevent name conflicts +- Changed: Package now includes Microsoft.Threading.Tasks for .NET 4.5, Windows Store apps and Windows Phone 8 projects to enable the consumption of custom awaiters. +- Changed: Microsoft.Bcl dependency is now not included for .NET 4.5, Windows Store apps and Windows Phone 8 projects because it is not needed. + +Changes in 1.0.12-beta + +- Fixed: TypeLoadException when using Async for WP7.5 version 1.0.11-beta (https://connect.microsoft.com/VisualStudio/feedback/details/768521/system-typeloadexception-when-using-async-for-wp7-5-version-1-0-11-beta) + +Changes in 1.0.11-beta + +- Initial release \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll new file mode 100644 index 000000000..1b1590ecf Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.xml new file mode 100644 index 000000000..6fad7c97a --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.xml @@ -0,0 +1,684 @@ + + + + Microsoft.Threading.Tasks.Extensions.Desktop + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + Provides asynchronous wrappers for .NET Framework operations. + + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Downloads the resource with the specified URI as a byte array, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded data. + + + Downloads the resource with the specified URI as a byte array, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded data. + + + Downloads the resource with the specified URI to a local file, asynchronously. + The WebClient. + The URI from which to download data. + The name of the local file that is to receive the data. + A Task that contains the downloaded data. + + + Downloads the resource with the specified URI to a local file, asynchronously. + The WebClient. + The URI from which to download data. + The name of the local file that is to receive the data. + A Task that contains the downloaded data. + + + Uploads data to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads a file to the specified resource, asynchronously. + The WebClient. + The URI to which the file should be uploaded. + A path to the file to upload. + A Task containing the data in the response from the upload. + + + Uploads a file to the specified resource, asynchronously. + The WebClient. + The URI to which the file should be uploaded. + A path to the file to upload. + A Task containing the data in the response from the upload. + + + Uploads a file to the specified resource, asynchronously. + The WebClient. + The URI to which the file should be uploaded. + The HTTP method that should be used to upload the file. + A path to the file to upload. + A Task containing the data in the response from the upload. + + + Uploads a file to the specified resource, asynchronously. + The WebClient. + The URI to which the file should be uploaded. + The HTTP method that should be used to upload the file. + A path to the file to upload. + A Task containing the data in the response from the upload. + + + Causes an online announcement (Hello) message to be sent asynchronously with the specified endpoint discovery metadata and user-defined state. The specified is called when the operation completes. + Task instance. + The endpoint discovery metadata. + The source. + + + Causes an offline announcement (Bye) message to be sent asynchronously with the specified endpoint discovery metadata and user-defined state. The specified is called when the operation completes. + Task instance. + The endpoint discovery metadata. + The source. + + + Begins asynchronously retrieving an incoming request. + Task object that indicates the status of the asynchronous operation. + A Win32 function call failed. Check the exception's property to determine the cause of the exception. + This object has not been started or is currently stopped. + This object is closed. + The source. + + + Starts an asynchronous request for the client's X.509 v.3 certificate. + Task that indicates the status of the operation. + The source. + + + Called by clients to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. This method does not block. + Task object indicating the status of the asynchronous operation. + The authentication failed. You can use this object to retry the authentication. + The authentication failed. You can use this object to retry the authentication. + This object has been closed. + Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client. + The source. + + + Called by clients to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified credentials. This method does not block. + Task object indicating the status of the asynchronous operation. + The that is used to establish the identity of the client. + The Service Principal Name (SPN) that uniquely identifies the server to authenticate. + is null.- or - is null. + The authentication failed. You can use this object to retry the authentication. + The authentication failed. You can use this object to retry the authentication. + This object has been closed. + Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client. + The source. + + + Called by clients to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified credentials and channel binding. This method does not block. + Task object indicating the status of the asynchronous operation. + The that is used to establish the identity of the client. + The that is used for extended protection. + The Service Principal Name (SPN) that uniquely identifies the server to authenticate. + is null.- or - is null. + The authentication failed. You can use this object to retry the authentication. + The authentication failed. You can use this object to retry the authentication. + Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client. + This object has been closed. + The source. + + + Called by servers to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. This method does not block. + Task object indicating the status of the asynchronous operation. + The authentication failed. You can use this object to retry the authentication. + The authentication failed. You can use this object to retry the authentication. + This object has been closed. + Windows 95 and Windows 98 are not supported. + The source. + + + Called by servers to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified extended protection policy. This method does not block. + Task object indicating the status of the asynchronous operation. + The that is used for extended protection. + The and on the extended protection policy passed in the parameter are both null. + The authentication failed. You can use this object to retry the authentication. + The authentication failed. You can use this object to retry the authentication. + Windows 95 and Windows 98 are not supported. + This object has been closed. + The source. + + + Called by servers to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified server credentials and authentication options. This method does not block. + Task object indicating the status of the asynchronous operation. + The that is used to establish the identity of the client. + One of the values, indicating the security services for the stream. + One of the values, indicating how the server can use the client's credentials to access resources. + is null. + must be , , or , + The authentication failed. You can use this object to retry the authentication. + The authentication failed. You can use this object to retry the authentication. + This object has been closed. + Authentication has already occurred.- or -This stream was used previously to attempt authentication as the client. You cannot use the stream to retry authentication as the server. + Windows 95 and Windows 98 are not supported. + The source. + + + Called by clients to begin an asynchronous operation to authenticate the server and optionally the client. + Task object that indicates the status of the asynchronous operation. + The name of the server that shares this . + is null. + The authentication failed and left this object in an unusable state. + Authentication has already occurred.-or-Server authentication using this was tried previously.-or- Authentication is already in progress. + This object has been closed. + The source. + + + Called by servers to begin an asynchronous operation to authenticate the client and optionally the server in a client-server connection. + Task object indicating the status of the asynchronous operation. + The X509Certificate used to authenticate the server. + is null. + The authentication failed and left this object in an unusable state. + Authentication has already occurred.-or-Client authentication using this was tried previously.-or- Authentication is already in progress. + This object has been closed. + The method is not supported on Windows 95, Windows 98, or Windows Millennium. + The source. + + + Starts an asynchronous request for a remote host connection. The host is specified by a host name and a port number. + Task that represents the asynchronous connection. + The name of the remote host. + The port number of the remote host. + is null. + The has been closed. + This method is valid for sockets in the or families. + The port number is not valid. + The is ing. + + The source. + + + Starts an asynchronous request for a remote host connection. The host is specified by an and a port number. + Task that represents the asynchronous connection. + The of the remote host. + The port number of the remote host. + is null. + An error occurred when attempting to access the socket. See the Remarks section for more information. + The has been closed. + The is not in the socket family. + The port number is not valid. + The length of is zero. + The is ing. + + The source. + + + Starts an asynchronous request for a remote host connection. The host is specified by an array and a port number. + Task that represents the asynchronous connections. + At least one , designating the remote host. + The port number of the remote host. + is null. + An error occurred when attempting to access the socket. See the Remarks section for more information. + The has been closed. + This method is valid for sockets that use or . + The port number is not valid. + The length of is zero. + The is ing. + + The source. + + + Starts an asynchronous operation to accept an incoming connection attempt. + Task that represents the asynchronous creation of the . + An error occurred while attempting to access the socket. See the Remarks section for more information. + The has been closed. + + The source. + + + Starts an asynchronous operation to accept an incoming connection attempt. + Task that represents the asynchronous creation of the . + An error occurred while attempting to access the socket. See the Remarks section for more information. + The has been closed. + + The source. + + + Sends a datagram to a destination asynchronously. The destination is specified by a . + Task object that represents the asynchronous send. + A array that contains the data to be sent. + The number of bytes to send. + The that represents the destination for the data. + The source. + + + Sends a datagram to a remote host asynchronously. The destination was specified previously by a call to . + Task object that represents the asynchronous send. + A array that contains the data to be sent. + The number of bytes to send. + The source. + + + Sends a datagram to a remote host asynchronously. The destination was specified previously by a call to . + Task object that represents the asynchronous send. + A array that contains the data to be sent. + The number of bytes to send. + The host name. + The host name. + The source. + + + Starts an asynchronous request to retrieve the stable unicast IP address table on the local computer. + Task that represents the asynchronous request. + This method is not implemented on the platform. This method uses the native NotifyStableUnicastIpAddressTable function that is supported on Windows Vista and later. + The call to the native NotifyStableUnicastIpAddressTable function failed. + The source. + + + Opens the connection asynchronously. + The source. + Task that represents the asynchronous request. + + + Opens the connection asynchronously. + The source. + The cancellation token. + Task that represents the asynchronous request. + + + Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this , given a callback procedure and state information. + Task that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns the number of affected rows. + Any error that occurred while executing the command text. + The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this . + 2 + The source. + + + Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this , given a callback procedure and state information. + Task that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns the number of affected rows. + Any error that occurred while executing the command text. + The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this . + 2 + The cancellation token. + The source. + + + Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and returns results as an object, using a callback procedure. + Task that can be used to poll, wait for results, or both; this value is also needed when the is called, which returns the results of the command as XML. + Any error that occurred while executing the command text. + The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this . + 2 + The source. + + + Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and returns results as an object, using a callback procedure. + Task that can be used to poll, wait for results, or both; this value is also needed when the is called, which returns the results of the command as XML. + Any error that occurred while executing the command text. + The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this . + 2 + The cancellation token. + The source. + + + Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and retrieves one or more result sets from the server, given a callback procedure and state information. + Task that can be used to poll, wait for results, or both; this value is also needed when invoking , which returns a instance which can be used to retrieve the returned rows. + Any error that occurred while executing the command text. + The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this . + 2 + The source. + + + Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and retrieves one or more result sets from the server, given a callback procedure and state information. + Task that can be used to poll, wait for results, or both; this value is also needed when invoking , which returns a instance which can be used to retrieve the returned rows. + Any error that occurred while executing the command text. + The name/value pair "Asynchronous Processing=true" was not included within the connection string defining the connection for this . + 2 + The cancellation token. + The source. + + + Starts an asynchronous method call that returns a . + The metadata. + The source. + + + Starts an asynchronous method call that returns a using the specified address, callback, asynchronous state, and download mechanism. + The metadata obtained from the specified . + The address of the metadata. + The value to use when downloading the metadata. + The source. + + + Starts an asynchronous method call that returns a using the specified address, callback, and asynchronous state. + The metadata obtained from the specified . + The address of the metadata. + The source. + + + + Begins an asynchronous find operation with the specified criteria. + + The discovery client. + The criteria for finding services. + A Task that represents the asynchronous operation. + + + + Begins an asynchronous resolve operation with the specified criteria. + + The discovery client. + The criteria for matching a service endpoint. + A Task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + An IPAddress that identifies the computer that is the destination for the ICMP echo message. + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + + A String that identifies the computer that is the destination for the ICMP echo message. + The value specified for this parameter can be a host name or a string representation of an IP address. + + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + An IPAddress that identifies the computer that is the destination for the ICMP echo message. + + An Int32 value that specifies the maximum number of milliseconds (after sending the echo message) + to wait for the ICMP echo reply message. + + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + + A String that identifies the computer that is the destination for the ICMP echo message. + The value specified for this parameter can be a host name or a string representation of an IP address. + + + An Int32 value that specifies the maximum number of milliseconds (after sending the echo message) + to wait for the ICMP echo reply message. + + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + An IPAddress that identifies the computer that is the destination for the ICMP echo message. + + An Int32 value that specifies the maximum number of milliseconds (after sending the echo message) + to wait for the ICMP echo reply message. + + + A Byte array that contains data to be sent with the ICMP echo message and returned + in the ICMP echo reply message. The array cannot contain more than 65,500 bytes. + + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + + A String that identifies the computer that is the destination for the ICMP echo message. + The value specified for this parameter can be a host name or a string representation of an IP address. + + + An Int32 value that specifies the maximum number of milliseconds (after sending the echo message) + to wait for the ICMP echo reply message. + + + A Byte array that contains data to be sent with the ICMP echo message and returned + in the ICMP echo reply message. The array cannot contain more than 65,500 bytes. + + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + An IPAddress that identifies the computer that is the destination for the ICMP echo message. + + An Int32 value that specifies the maximum number of milliseconds (after sending the echo message) + to wait for the ICMP echo reply message. + + + A Byte array that contains data to be sent with the ICMP echo message and returned + in the ICMP echo reply message. The array cannot contain more than 65,500 bytes. + + A PingOptions object used to control fragmentation and Time-to-Live values for the ICMP echo message packet. + A task that represents the asynchronous operation. + + + + Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message. + + The Ping. + + A String that identifies the computer that is the destination for the ICMP echo message. + The value specified for this parameter can be a host name or a string representation of an IP address. + + + An Int32 value that specifies the maximum number of milliseconds (after sending the echo message) + to wait for the ICMP echo reply message. + + + A Byte array that contains data to be sent with the ICMP echo message and returned + in the ICMP echo reply message. The array cannot contain more than 65,500 bytes. + + A PingOptions object used to control fragmentation and Time-to-Live values for the ICMP echo message packet. + A task that represents the asynchronous operation. + + + The core implementation of SendTaskAsync. + The Ping. + A user-defined object stored in the resulting Task. + + A delegate that initiates the asynchronous send. + The provided TaskCompletionSource must be passed as the user-supplied state to the actual Ping.SendAsync method. + + + + + Sends an e-mail message asynchronously. + The client. + A String that contains the address information of the message sender. + A String that contains the address that the message is sent to. + A String that contains the subject line for the message. + A String that contains the message body. + A Task that represents the asynchronous send. + + + Sends an e-mail message asynchronously. + The client. + A MailMessage that contains the message to send. + A Task that represents the asynchronous send. + + + The core implementation of SendTaskAsync. + The client. + The user-supplied state. + + A delegate that initiates the asynchronous send. + The provided TaskCompletionSource must be passed as the user-supplied state to the actual SmtpClient.SendAsync method. + + + + + Provides asynchronous wrappers for the class. + + + Asynchronously returns the Internet Protocol (IP) addresses for the specified host. + The host name or IP address to resolve. + An array of type System.Net.IPAddress that holds the IP addresses for the host specified. + + + Asynchronously resolves an IP address to an System.Net.IPHostEntry instance. + The IP address to resolve. + An System.Net.IPHostEntry instance that contains address information about the host. + + + Asynchronously resolves an IP address to an System.Net.IPHostEntry instance. + The host name or IP address to resolve. + An System.Net.IPHostEntry instance that contains address information about the host. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000..883cc9404 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.xml new file mode 100644 index 000000000..af646a2d0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.Extensions.xml @@ -0,0 +1,275 @@ + + + + Microsoft.Threading.Tasks.Extensions + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The cancellation token. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + The cancellation token. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads a maximum of count characters from the reader asynchronously and writes + the data to buffer, beginning at index. + + + When the operation completes, contains the specified character array with the + values between index and (index + count - 1) replaced by the characters read + from the current source. + + + The maximum number of characters to read. If the end of the stream is reached + before count of characters is read into buffer, the current method returns. + + The place in buffer at which to begin writing. + the source reader. + A Task that represents the asynchronous operation. + + + + Reads asynchronously a maximum of count characters from the current stream, and writes the + data to buffer, beginning at index. + + The source reader. + + When this method returns, this parameter contains the specified character + array with the values between index and (index + count -1) replaced by the + characters read from the current source. + + The position in buffer at which to begin writing. + The maximum number of characters to read. + A Task that represents the asynchronous operation. + + + + Reads a line of characters from the reader and returns the string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + + Reads all characters from the current position to the end of the TextReader + and returns them as one string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + Writes a string asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + Writes a line terminator asynchronously to a text stream. + The writer. + A Task representing the asynchronous write. + + + Writes a string followed by a line terminator asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char followed by a line terminator asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + + Clears all buffers for the current writer and causes any buffered data to + be written to the underlying device. + + The writer. + A Task representing the asynchronous flush. + + + Starts an asynchronous request for a web resource. + Task that represents the asynchronous request. + The stream is already in use by a previous call to . + + The source. + + + Starts an asynchronous request for a object to use to write data. + Task that represents the asynchronous request. + The property is GET and the application writes to the stream. + The stream is being used by a previous call to . + No write stream is available. + + The source. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net40/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net45/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net45/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net45/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net45/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net45/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/net45/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000..883cc9404 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.xml new file mode 100644 index 000000000..af646a2d0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.xml @@ -0,0 +1,275 @@ + + + + Microsoft.Threading.Tasks.Extensions + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The cancellation token. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + The cancellation token. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads a maximum of count characters from the reader asynchronously and writes + the data to buffer, beginning at index. + + + When the operation completes, contains the specified character array with the + values between index and (index + count - 1) replaced by the characters read + from the current source. + + + The maximum number of characters to read. If the end of the stream is reached + before count of characters is read into buffer, the current method returns. + + The place in buffer at which to begin writing. + the source reader. + A Task that represents the asynchronous operation. + + + + Reads asynchronously a maximum of count characters from the current stream, and writes the + data to buffer, beginning at index. + + The source reader. + + When this method returns, this parameter contains the specified character + array with the values between index and (index + count -1) replaced by the + characters read from the current source. + + The position in buffer at which to begin writing. + The maximum number of characters to read. + A Task that represents the asynchronous operation. + + + + Reads a line of characters from the reader and returns the string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + + Reads all characters from the current position to the end of the TextReader + and returns them as one string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + Writes a string asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + Writes a line terminator asynchronously to a text stream. + The writer. + A Task representing the asynchronous write. + + + Writes a string followed by a line terminator asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char followed by a line terminator asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + + Clears all buffers for the current writer and causes any buffered data to + be written to the underlying device. + + The writer. + A Task representing the asynchronous flush. + + + Starts an asynchronous request for a web resource. + Task that represents the asynchronous request. + The stream is already in use by a previous call to . + + The source. + + + Starts an asynchronous request for a object to use to write data. + Task that represents the asynchronous request. + The property is GET and the application writes to the stream. + The stream is being used by a previous call to . + No write stream is available. + + The source. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000..883cc9404 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.xml new file mode 100644 index 000000000..af646a2d0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.xml @@ -0,0 +1,275 @@ + + + + Microsoft.Threading.Tasks.Extensions + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The cancellation token. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + The cancellation token. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads a maximum of count characters from the reader asynchronously and writes + the data to buffer, beginning at index. + + + When the operation completes, contains the specified character array with the + values between index and (index + count - 1) replaced by the characters read + from the current source. + + + The maximum number of characters to read. If the end of the stream is reached + before count of characters is read into buffer, the current method returns. + + The place in buffer at which to begin writing. + the source reader. + A Task that represents the asynchronous operation. + + + + Reads asynchronously a maximum of count characters from the current stream, and writes the + data to buffer, beginning at index. + + The source reader. + + When this method returns, this parameter contains the specified character + array with the values between index and (index + count -1) replaced by the + characters read from the current source. + + The position in buffer at which to begin writing. + The maximum number of characters to read. + A Task that represents the asynchronous operation. + + + + Reads a line of characters from the reader and returns the string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + + Reads all characters from the current position to the end of the TextReader + and returns them as one string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + Writes a string asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + Writes a line terminator asynchronously to a text stream. + The writer. + A Task representing the asynchronous write. + + + Writes a string followed by a line terminator asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char followed by a line terminator asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + + Clears all buffers for the current writer and causes any buffered data to + be written to the underlying device. + + The writer. + A Task representing the asynchronous flush. + + + Starts an asynchronous request for a web resource. + Task that represents the asynchronous request. + The stream is already in use by a previous call to . + + The source. + + + Starts an asynchronous request for a object to use to write data. + Task that represents the asynchronous request. + The property is GET and the application writes to the stream. + The stream is being used by a previous call to . + No write stream is available. + + The source. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/portable-net45+win8/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll new file mode 100644 index 000000000..f4e02a1ec Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.xml new file mode 100644 index 000000000..515d7031d --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.xml @@ -0,0 +1,141 @@ + + + + Microsoft.Threading.Tasks.Extensions.Phone + + + + + Provides asynchronous wrappers for .NET Framework operations. + + + Provides asynchronous wrappers for .NET Framework operations. + + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Asynchronously invokes an Action on the Dispatcher. + The Dispatcher. + The action to invoke. + A Task that represents the execution of the action. + + + Asynchronously invokes an Action on the Dispatcher. + The Dispatcher. + The function to invoke. + A Task that represents the execution of the function. + + + Used with Task(of void) + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000..883cc9404 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.xml new file mode 100644 index 000000000..af646a2d0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.xml @@ -0,0 +1,275 @@ + + + + Microsoft.Threading.Tasks.Extensions + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The cancellation token. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + The cancellation token. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads a maximum of count characters from the reader asynchronously and writes + the data to buffer, beginning at index. + + + When the operation completes, contains the specified character array with the + values between index and (index + count - 1) replaced by the characters read + from the current source. + + + The maximum number of characters to read. If the end of the stream is reached + before count of characters is read into buffer, the current method returns. + + The place in buffer at which to begin writing. + the source reader. + A Task that represents the asynchronous operation. + + + + Reads asynchronously a maximum of count characters from the current stream, and writes the + data to buffer, beginning at index. + + The source reader. + + When this method returns, this parameter contains the specified character + array with the values between index and (index + count -1) replaced by the + characters read from the current source. + + The position in buffer at which to begin writing. + The maximum number of characters to read. + A Task that represents the asynchronous operation. + + + + Reads a line of characters from the reader and returns the string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + + Reads all characters from the current position to the end of the TextReader + and returns them as one string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + Writes a string asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + Writes a line terminator asynchronously to a text stream. + The writer. + A Task representing the asynchronous write. + + + Writes a string followed by a line terminator asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char followed by a line terminator asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + + Clears all buffers for the current writer and causes any buffered data to + be written to the underlying device. + + The writer. + A Task representing the asynchronous flush. + + + Starts an asynchronous request for a web resource. + Task that represents the asynchronous request. + The stream is already in use by a previous call to . + + The source. + + + Starts an asynchronous request for a object to use to write data. + Task that represents the asynchronous request. + The property is GET and the application writes to the stream. + The stream is being used by a previous call to . + No write stream is available. + + The source. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll new file mode 100644 index 000000000..f760d6da3 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.xml new file mode 100644 index 000000000..950e092f0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.xml @@ -0,0 +1,141 @@ + + + + Microsoft.Threading.Tasks.Extensions.Silverlight + + + + + Provides asynchronous wrappers for .NET Framework operations. + + + Provides asynchronous wrappers for .NET Framework operations. + + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Asynchronously invokes an Action on the Dispatcher. + The Dispatcher. + The action to invoke. + A Task that represents the execution of the action. + + + Asynchronously invokes an Action on the Dispatcher. + The Dispatcher. + The function to invoke. + A Task that represents the execution of the function. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + Used with Task(of void) + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000..883cc9404 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.xml new file mode 100644 index 000000000..af646a2d0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.Extensions.xml @@ -0,0 +1,275 @@ + + + + Microsoft.Threading.Tasks.Extensions + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The cancellation token. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + The cancellation token. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads a maximum of count characters from the reader asynchronously and writes + the data to buffer, beginning at index. + + + When the operation completes, contains the specified character array with the + values between index and (index + count - 1) replaced by the characters read + from the current source. + + + The maximum number of characters to read. If the end of the stream is reached + before count of characters is read into buffer, the current method returns. + + The place in buffer at which to begin writing. + the source reader. + A Task that represents the asynchronous operation. + + + + Reads asynchronously a maximum of count characters from the current stream, and writes the + data to buffer, beginning at index. + + The source reader. + + When this method returns, this parameter contains the specified character + array with the values between index and (index + count -1) replaced by the + characters read from the current source. + + The position in buffer at which to begin writing. + The maximum number of characters to read. + A Task that represents the asynchronous operation. + + + + Reads a line of characters from the reader and returns the string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + + Reads all characters from the current position to the end of the TextReader + and returns them as one string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + Writes a string asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + Writes a line terminator asynchronously to a text stream. + The writer. + A Task representing the asynchronous write. + + + Writes a string followed by a line terminator asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char followed by a line terminator asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + + Clears all buffers for the current writer and causes any buffered data to + be written to the underlying device. + + The writer. + A Task representing the asynchronous flush. + + + Starts an asynchronous request for a web resource. + Task that represents the asynchronous request. + The stream is already in use by a previous call to . + + The source. + + + Starts an asynchronous request for a object to use to write data. + Task that represents the asynchronous request. + The property is GET and the application writes to the stream. + The stream is being used by a previous call to . + No write stream is available. + + The source. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/sl4/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/win8/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/win8/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/win8/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/win8/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/win8/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/win8/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll new file mode 100644 index 000000000..f4e02a1ec Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.xml new file mode 100644 index 000000000..515d7031d --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.xml @@ -0,0 +1,141 @@ + + + + Microsoft.Threading.Tasks.Extensions.Phone + + + + + Provides asynchronous wrappers for .NET Framework operations. + + + Provides asynchronous wrappers for .NET Framework operations. + + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Downloads the resource with the specified URI as a string, asynchronously. + The WebClient. + The URI from which to download data. + A Task that contains the downloaded string. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a readable stream for the data downloaded from a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Opens a writeable stream for uploading data to a resource, asynchronously. + The WebClient. + The URI for which the stream should be opened. + The HTTP method that should be used to open the stream. + A Task that contains the opened stream. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Uploads data in a string to the specified resource, asynchronously. + The WebClient. + The URI to which the data should be uploaded. + The HTTP method that should be used to upload the data. + The data to upload. + A Task containing the data in the response from the upload. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Converts a path to a Uri using the WebClient's logic. + Based on WebClient's private GetUri method. + + + Asynchronously invokes an Action on the Dispatcher. + The Dispatcher. + The action to invoke. + A Task that represents the execution of the action. + + + Asynchronously invokes an Action on the Dispatcher. + The Dispatcher. + The function to invoke. + A Task that represents the execution of the function. + + + Used with Task(of void) + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000..883cc9404 Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.xml new file mode 100644 index 000000000..af646a2d0 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.Extensions.xml @@ -0,0 +1,275 @@ + + + + Microsoft.Threading.Tasks.Extensions + + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + + Provides asynchronous wrappers for .NET Framework operations. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + A Task that represents the asynchronous read. + The source. + The buffer to read data into. + The byte offset in at which to begin reading. + The maximum number of bytes to read. + The cancellation token. + The array length minus is less than . + is null. + or is negative. + An asynchronous read was attempted past the end of the file. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Writes asynchronously a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + A Task that represents the asynchronous write. + The source. + The buffer containing data to write to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The maximum number of bytes to write. + The cancellation token. + length minus is less than . + is null. + or is negative. + The stream does not support writing. + The stream is closed. + An I/O error occurred. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Flushes asynchronously the current stream. + + A Task that represents the asynchronous flush. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads all the bytes from the current stream and writes them to the destination stream. + + The source stream. + The stream that will contain the contents of the current stream. + The size of the buffer. This value must be greater than zero. The default size is 4096. + The cancellation token to use to cancel the asynchronous operation. + A Task that represents the asynchronous operation. + + + + Reads a maximum of count characters from the reader asynchronously and writes + the data to buffer, beginning at index. + + + When the operation completes, contains the specified character array with the + values between index and (index + count - 1) replaced by the characters read + from the current source. + + + The maximum number of characters to read. If the end of the stream is reached + before count of characters is read into buffer, the current method returns. + + The place in buffer at which to begin writing. + the source reader. + A Task that represents the asynchronous operation. + + + + Reads asynchronously a maximum of count characters from the current stream, and writes the + data to buffer, beginning at index. + + The source reader. + + When this method returns, this parameter contains the specified character + array with the values between index and (index + count -1) replaced by the + characters read from the current source. + + The position in buffer at which to begin writing. + The maximum number of characters to read. + A Task that represents the asynchronous operation. + + + + Reads a line of characters from the reader and returns the string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + + Reads all characters from the current position to the end of the TextReader + and returns them as one string asynchronously. + + the source reader. + A Task that represents the asynchronous operation. + + + Writes a string asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + Writes a line terminator asynchronously to a text stream. + The writer. + A Task representing the asynchronous write. + + + Writes a string followed by a line terminator asynchronously to a text stream. + The writer. + The string to write. + A Task representing the asynchronous write. + + + Writes a char followed by a line terminator asynchronously to a text stream. + The writer. + The char to write. + A Task representing the asynchronous write. + + + Writes a char array followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + A Task representing the asynchronous write. + + + Writes a subarray of characters followed by a line terminator asynchronously to a text stream. + The writer. + The buffer to write. + Starting index in the buffer. + The number of characters to write. + A Task representing the asynchronous write. + + + + Clears all buffers for the current writer and causes any buffered data to + be written to the underlying device. + + The writer. + A Task representing the asynchronous flush. + + + Starts an asynchronous request for a web resource. + Task that represents the asynchronous request. + The stream is already in use by a previous call to . + + The source. + + + Starts an asynchronous request for a object to use to write data. + Task that represents the asynchronous request. + The property is GET and the application writes to the stream. + The stream is being used by a previous call to . + No write stream is available. + + The source. + + + diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.dll b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.dll new file mode 100644 index 000000000..1b202dc8b Binary files /dev/null and b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.dll differ diff --git a/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.xml b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.xml new file mode 100644 index 000000000..5c22030d7 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Async.1.0.14-rc/lib/wp8/Microsoft.Threading.Tasks.xml @@ -0,0 +1,630 @@ + + + + Microsoft.Threading.Tasks + + + + + Provides extension methods for threading-related types. + + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time in milliseconds for the source to be canceled. + + + Cancels the after the specified duration. + The CancellationTokenSource. + The due time for the source to be canceled. + + + Gets an awaiter used to await this . + The task to await. + An awaiter instance. + + + Gets an awaiter used to await this . + Specifies the type of data returned by the task. + The task to await. + An awaiter instance. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Creates and configures an awaitable object for awaiting the specified task. + The task to be awaited. + + true to automatic marshag back to the original call site's current SynchronizationContext + or TaskScheduler; otherwise, false. + + The instance to be awaited. + + + Event handler for progress reports. + Specifies the type of data for the progress report. + The sender of the report. + The reported value. + + + + Provides an IProgress{T} that invokes callbacks for each reported progress value. + + Specifies the type of the progress report value. + + Any handler provided to the constructor or event handlers registered with + the event are invoked through a + instance captured + when the instance is constructed. If there is no current SynchronizationContext + at the time of construction, the callbacks will be invoked on the ThreadPool. + + + + The synchronization context captured upon construction. This will never be null. + + + The handler specified to the constructor. This may be null. + + + A cached delegate used to post invocation to the synchronization context. + + + Initializes the . + + + Initializes the with the specified callback. + + A handler to invoke for each reported progress value. This handler will be invoked + in addition to any delegates registered with the event. + + The is null (Nothing in Visual Basic). + + + Reports a progress change. + The value of the updated progress. + + + Reports a progress change. + The value of the updated progress. + + + Invokes the action and event callbacks. + The progress value. + + + Raised for each reported progress value. + + Handlers registered with this event will be invoked on the + captured when the instance was constructed. + + + + Holds static values for . + This avoids one static instance per type T. + + + A default synchronization context that targets the ThreadPool. + + + Throws the exception on the ThreadPool. + The exception to propagate. + The target context on which to propagate the exception. Null to use the ThreadPool. + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The to await. + + true to attempt to marshal the continuation back to the original context captured + when BeginAwait is called; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable object that allows for configured awaits on . + This type is intended for compiler use only. + + + The underlying awaitable on whose logic this awaitable relies. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Gets an awaiter for this awaitable. + The awaiter. + + + Provides an awaiter for a . + This type is intended for compiler use only. + + + The task being awaited. + + + Whether to attempt marshaling back to the original context. + + + Initializes the . + The awaitable . + + true to attempt to marshal the continuation back to the original context captured; otherwise, false. + + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The default value to use for continueOnCapturedContext. + + + Error message for GetAwaiter. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + + Fast checks for the end of an await operation to determine whether more needs to be done + prior to completing the await. + + The awaited task. + + + Handles validations on tasks that aren't successfully completed. + The awaited task. + + + Throws an exception to handle a task that completed in a state other than RanToCompletion. + + + Schedules the continuation onto the associated with this . + The awaited task. + The action to invoke when the await operation completes. + Whether to capture and marshal back to the current context. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Invokes the delegate in a try/catch that will propagate the exception asynchronously on the ThreadPool. + + + + Copies the exception's stack trace so its stack trace isn't overwritten. + The exception to prepare. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Whether the current thread is appropriate for inlining the await continuation. + + + Provides an awaiter for awaiting a . + This type is intended for compiler use only. + + + The task being awaited. + + + Initializes the . + The to be awaited. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Schedules the continuation onto the associated with this . + The action to invoke when the await operation completes. + The argument is null (Nothing in Visual Basic). + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was not yet completed. + The task was canceled. + The task completed in a Faulted state. + + + Gets whether the task being awaited is completed. + This property is intended for compiler user rather than use directly in code. + The awaiter was not properly initialized. + + + Provides an awaitable context for switching into a target environment. + This type is intended for compiler use only. + + + Gets an awaiter for this . + An awaiter for this awaitable. + This method is intended for compiler user rather than use directly in code. + + + Provides an awaiter that switches into a target environment. + This type is intended for compiler use only. + + + A completed task. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Posts the back to the current context. + The action to invoke asynchronously. + The awaiter was not properly initialized. + + + Ends the await operation. + + + Gets whether a yield is not required. + This property is intended for compiler user rather than use directly in code. + + + Provides methods for creating and manipulating tasks. + + + Creates a task that runs the specified action. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified action. + The action to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute. + The CancellationToken to use to request cancellation of this task. + A task that represents the completion of the function. + The argument is null. + + + Creates a task that runs the specified function. + The function to execute asynchronously. + A task that represents the completion of the action. + The argument is null. + + + Creates a task that runs the specified function. + The action to execute. + The CancellationToken to use to cancel the task. + A task that represents the completion of the action. + The argument is null. + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + Starts a Task that will complete after the specified due time. + The delay in milliseconds before the returned task completes. + A CancellationToken that may be used to cancel the task before the due time occurs. + The timed Task. + + The argument must be non-negative or -1 and less than or equal to Int32.MaxValue. + + + + An already completed task. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + A Task that represents the completion of all of the provided tasks. + + If any of the provided Tasks faults, the returned Task will also fault, and its Exception will contain information + about all of the faulted tasks. If no Tasks fault but one or more Tasks is canceled, the returned + Task will also be canceled. + + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete only when all of the provided collection of Tasks has completed. + The Tasks to monitor for completion. + + A callback invoked when all of the tasks complete successfully in the RanToCompletion state. + This callback is responsible for storing the results into the TaskCompletionSource. + + A Task that represents the completion of all of the provided tasks. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates a Task that will complete when any of the tasks in the provided collection completes. + The Tasks to be monitored. + + A Task that represents the completion of any of the provided Tasks. The completed Task is this Task's result. + + Any Tasks that fault will need to have their exceptions observed elsewhere. + The argument is null. + The argument contains a null reference. + + + Creates an already completed from the specified result. + The result from which to create the completed task. + The completed task. + + + Creates an awaitable that asynchronously yields back to the current context when awaited. + + A context that, when awaited, will asynchronously transition back into the current context. + If SynchronizationContext.Current is non-null, that is treated as the current context. + Otherwise, TaskScheduler.Current is treated as the current context. + + + + Adds the target exception to the list, initializing the list if it's null. + The list to which to add the exception and initialize if the list is null. + The exception to add, and unwrap if it's an aggregate. + + + Returns a canceled task. + The cancellation token. + The canceled task. + + + Returns a canceled task. + Specifies the type of the result. + The cancellation token. + The canceled task. + + + + Completes the Task if the user state matches the TaskCompletionSource. + + Specifies the type of data returned by the Task. + The TaskCompletionSource. + The completion event arguments. + Whether we require the tcs to match the e.UserState. + A function that gets the result with which to complete the task. + An action used to unregister work when the operaiton completes. + + + diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/License.rtf.REMOVED.git-id b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/License.rtf.REMOVED.git-id new file mode 100644 index 000000000..f8589ed0b --- /dev/null +++ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/License.rtf.REMOVED.git-id @@ -0,0 +1 @@ +30ff7aa1ad2a7eedde4972dee464f229d4459439 \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/Microsoft.Bcl.Build.1.0.0-rc.nupkg b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/Microsoft.Bcl.Build.1.0.0-rc.nupkg new file mode 100644 index 000000000..6d6ed7dde Binary files /dev/null and b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/Microsoft.Bcl.Build.1.0.0-rc.nupkg differ diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/Microsoft.Bcl.Build.1.0.0-rc.nuspec b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/Microsoft.Bcl.Build.1.0.0-rc.nuspec new file mode 100644 index 000000000..8db99ef1b --- /dev/null +++ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/Microsoft.Bcl.Build.1.0.0-rc.nuspec @@ -0,0 +1,17 @@ + + + + Microsoft.Bcl.Build + 1.0.0-rc + Microsoft BCL Build Components + Microsoft + Microsoft + http://go.microsoft.com/fwlink/?LinkID=261998&clcid=0x409 + true + This package provides build infrastructure components so that projects referencing specific Microsoft packages can successfully build. + Provides build infrastructure components for Microsoft packages. + Copyright © Microsoft Corporation + BCL Microsoft + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/net40/_._ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/net40/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/netcore45/_._ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/netcore45/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/portable-net40+win8+sl4+wp71/_._ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/portable-net40+win8+sl4+wp71/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/sl4-windowsphone71/_._ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/sl4-windowsphone71/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/sl4/_._ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/content/sl4/_._ new file mode 100644 index 000000000..e69de29bb diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Install.ps1 b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Install.ps1 new file mode 100644 index 000000000..66af15130 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Install.ps1 @@ -0,0 +1,18 @@ +param($installPath, $toolsPath, $package, $project) + # This is the MSBuild targets file to add + $targetsFile = [System.IO.Path]::Combine($toolsPath, $package.Id + '.targets') + + # Need to load MSBuild assembly if it's not loaded yet. + Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' + + # Grab the loaded MSBuild project for the project + $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 + + # Make the path to the targets file relative. + $projectUri = new-object Uri('file://' + $project.FullName) + $targetUri = new-object Uri('file://' + $targetsFile) + $relativePath = $projectUri.MakeRelativeUri($targetUri).ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar) + + # Add the import and save the project + $msbuild.Xml.AddImport($relativePath) | out-null + $project.Save() \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Microsoft.Bcl.Build.targets b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Microsoft.Bcl.Build.targets new file mode 100644 index 000000000..2ec961a79 --- /dev/null +++ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Microsoft.Bcl.Build.targets @@ -0,0 +1,31 @@ + + + + + + false + + + $(ProjectConfigFileName) + + + + + + <_FullFrameworkReferenceAssemblyPaths>$(TargetFrameworkDirectory) + + + \ No newline at end of file diff --git a/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Uninstall.ps1 b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Uninstall.ps1 new file mode 100644 index 000000000..e43af29de --- /dev/null +++ b/src/packages/Microsoft.Bcl.Build.1.0.0-rc/tools/Uninstall.ps1 @@ -0,0 +1,13 @@ +param($installPath, $toolsPath, $package, $project) + + # Need to load MSBuild assembly if it's not loaded yet. + Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' + + # Grab the loaded MSBuild project for the project + $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 + $importToRemove = $msbuild.Xml.Imports | Where-Object { $_.Project.Endswith($package.Id + '.targets') } + + # Add the import and save the project + $msbuild.Xml.RemoveChild($importToRemove) | out-null + $project.Save() + \ No newline at end of file