- Service not reinvented by 3rd party
- VM not reinvented by 2nd device
- VM Responsible for wrapping DTOs
This file contains 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
static public UIImage StringToImage(string s, float fontSize) | |
{ | |
return StringToImage(s, UIFont.FromName("Helvetica", fontSize)); | |
} | |
static public UIImage StringToImage(string s, UIFont font) | |
{ | |
var ns = new NSString(s); | |
var size = ns.StringSize(font); | |
UIGraphics.BeginImageContext(size); |
This file contains 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 MonoTouch.UIKit; | |
public sealed class UIViewAnimations : IDisposable | |
{ | |
public UIViewAnimations(bool enabled) | |
{ | |
_wasEnabled = UIView.AnimationsEnabled; | |
UIView.AnimationsEnabled = enabled; | |
} |
This file contains 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 Unplugged | |
{ | |
public abstract class ListPickerViewModel<TItem> : UIPickerViewModel | |
{ | |
public TItem SelectedItem { get; private set; } | |
IList<TItem> _items; | |
public IList<TItem> Items | |
{ | |
get { return _items; } |
This file contains 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
$('#output').text('Ready'); | |
var splitArgList = function (s) { | |
var first_paren = s.indexOf('(') + 1; | |
var opening = s.substring(0, first_paren).trim(); | |
var args_closing = s.substring(first_paren); | |
var last_paren = args_closing.lastIndexOf(')'); | |
var args = args_closing.substring(0, last_paren) | |
var closing = args_closing.substring(last_paren).trim(); | |
return [opening, args, closing]; |
This file contains 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 System.Diagnostics; | |
namespace Unplugged.Visualization | |
{ | |
public class PerformanceMeter | |
{ | |
public int Count { get; private set; } | |
public double Minimum { get; private set; } | |
public double Maximum { get; private set; } |
This file contains 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 System.Collections.Generic; | |
using System.Linq; | |
using QuickGraph; | |
using QuickGraph.Algorithms; | |
using ServiceStack.OrmLite; | |
namespace Gists | |
{ | |
public static class CodeFirstDatabase |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- copy to ~/Library/XamarinStudio-5.0/Snippets/ as vmpc.template.xml --> | |
<CodeTemplates version="3.0"> | |
<CodeTemplate version="2.0"> | |
<Header> | |
<_Group>C#</_Group> | |
<Version /> | |
<MimeType>text/x-csharp</MimeType> | |
<Shortcut>vmpc</Shortcut> | |
<_Description>property changed</_Description> |
This file contains 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 Microsoft.Extensions.DependencyInjection; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Xunit.Sdk; | |
namespace Example.Testing | |
{ | |
/// <summary> |
This file contains 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; | |
namespace Example | |
{ | |
public static class TypeExtensions | |
{ | |
/// <summary> | |
/// Returns a default value for a given Type at run-time. | |
/// </summary> | |
public static object GetDefaultValue(this Type type) |
OlderNewer