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
// https://msdn.microsoft.com/en-us/magazine/dd569760.aspx | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace OperationQueueTest |
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
// https://bugzilla.xamarin.com/show_bug.cgi?id=21981#c5 | |
using Xamarin.Forms; | |
[assembly: ExportImageSourceHandler(typeof(UriImageSource), typeof(iOS.Renderers.ImageLoaderSourceHandler))] | |
namespace iOS.Renderers | |
{ | |
using System.Collections.Generic; | |
using System.Threading; |
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
// http://forums.xamarin.com/discussion/comment/133731/#Comment_133731 | |
public partial class Page1 | |
{ | |
public Page1() | |
{ | |
this.InitializeComponent(); | |
this.Entry.TextChanged += this.EntryOnTextChanged; | |
} | |
// |
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
// https://msdn.microsoft.com/en-us/library/hh228604(v=vs.110).aspx | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Text; | |
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
// http://blog.stephencleary.com/2013/01/async-oop-2-constructors.html | |
public sealed class MyClass | |
{ | |
private MyData asyncData; | |
private MyClass() { ... } | |
private async Task<MyClass> InitializeAsync() | |
{ | |
asyncData = await GetDataAsync(); |
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
// http://blog.stephencleary.com/2015/04/a-tour-of-task-part-10-promise-tasks.html | |
interface IPlugin | |
{ | |
// Permit each plugin to initialize asynchronously. | |
Task InitializeAsync(); | |
} | |
class MyPlugin : IPlugin | |
{ |
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
// List of interesting NuGet PCLs | |
Conditions | |
ExifLib | |
SharpSerializer | |
PCLStorage | |
BouncyCastlePCL (encryption) | |
Sockets | |
MathNet.Numerics | |
Zeroconf (Bonjour) |
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
using System; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Xaml; | |
namespace Test | |
{ | |
public class DataTemplateSelectorExtension : IMarkupExtension | |
{ | |
public Page Page { get; set; } |
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
// http://www.knowing.net/index.php/2014/07/10/ | |
interface IFoo | |
{ | |
//Methods defined here, as always, must be implemented | |
void Necessary (); | |
} | |
static class IFoo_Extensions | |
{ |
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
// http://blog.adamkemp.com/2014/10/c-finalizers-and-idisposable.html | |
public class UnmanagedResourceHolder : IDisposable | |
{ | |
private bool _disposed; | |
private OtherDisposableObject _otherDisposable; | |
public UnmanagedResourceHolder() | |
{ | |
AcquireUnmanagedResource(); |