This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static IEnumerable<U> SelectProjections<T, U>(this IEnumerable<T> @this, params Func<T, U>[] projections) | |
| { | |
| if (@this == null) | |
| throw new NullReferenceException(); | |
| if (projections == null || !projections.Any()) | |
| yield break; | |
| foreach (var item in @this) | |
| { | |
| foreach (var projection in projections) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline Concurrency::task<Platform::String^> ReadStringAsync(Platform::String^ filename) | |
| { | |
| using namespace Windows::Storage; | |
| using namespace Concurrency; | |
| auto folder = Windows::ApplicationModel::Package::Current->InstalledLocation; | |
| task<StorageFile^> getFileTask(folder->GetFileAsync(filename)); | |
| auto readBufferTask = getFileTask.then([] (StorageFile^ f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use in VS11 and .NET 4.5 or in VS10 with the Async CTP installed | |
| // | |
| namespace DataServiceAsyncExtensions | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Data.Services.Client; | |
| using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace System.Runtime.CompilerServices | |
| { | |
| [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] | |
| public sealed class CallerMemberNameAttribute : Attribute | |
| { | |
| public CallerMemberNameAttribute() | |
| { } | |
| } | |
| [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] |
NewerOlder