Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Pryor jonpryor

View GitHub Profile
View App.cs
namespace MobileSample_Android
{
[Application(Label = "AndroidPlayground")]
public class App : Application
{
readonly AutoSuspendHelper suspendHelper;
public App(IntPtr handle, JniHandleOwnership transfer)
: base (handle, transfer)
{
View gist:4635021
static readonly IList<ViewModel> registeredEntities = new List<ViewModel>();
protected static IList<ViewModel> RegisteredViewModels
{
get
{
return registeredEntities;
}
}
View gist:3932606
/*
## Mono JIT compiler version 2.10.9 (tarball Mon May 7 20:25:51 EDT 2012)
DynamicMethod creation: 0.0453009000ms
LINQ expressions creation: 0.0971724000ms
Delegate creation: 0.0044351000ms
DynamicMethod invocation: 0.0000612000ms
Expression invocation: 0.0000609000ms
MethodInfo invocation: 0.0007135000ms
Delegate invocation: 0.0000619000ms
View gist:1107454
/* output:
# test2: (* 10 10 )
# test: (+ 10 ((* 10 10 )))
# test2: (* 10 10 )
*/
namespace Schemin.AST
{
public interface IScheminType
{
View Range spec
Range:
Min/Max rather than Start/End, better naming when dealing with non-contiguous ranges.
Start and end values are inclusive.
How enumeration works for stepping, etc is left to the class to decide, provide a static class with some standard implementations that use Math<T>.
Assumption is the main IRange<T> can be either contiguous or non-contiguous
Assumptions for SubRanges():
No two sub-ranges overlap.
Each sub-range is atomic (ie contiguous).