このGistはコンソールでのコマンドのみでWPFを変化させるものです。
自動化スクリプトなど、人がGUIに触れずに動くことを想定しています。
メモリリークや例外、ファイル分けなどは、あまり考慮していません。
極力MVVMに沿うように心掛けたので、ちょっと回りくどい実装です。
- Models
- Collections.cs
データの実態二つ
public void Parse(IEnumerable<string> data) | |
{ | |
DateTime start = DateTime.Now; | |
var stream = data.Where(x => !string.IsNullOrEmpty(x)); | |
if (stream.First().StartsWith("surf", false, null)) | |
{ | |
throw new FileFormatException("SURF Header"); | |
} | |
public void Parse(IEnumerable<string> data) | |
{ | |
DateTime start = DateTime.Now; | |
var stream = data.Where(x => !string.IsNullOrEmpty(x)); | |
if (stream.First().StartsWith("surf", false, null)) | |
{ | |
throw new FileFormatException("SURF Header"); | |
} |
This Gist is my experimental code of explanation for logic circuit with C#.
I think, using Reactive Extension, we can write more smart code for circuit(not only logical one).
This class means logic wire. Logic gate elements are also provided.
For IObservalble<bool> instances with default value, factory method "CreateWithDefault" is exist.
This Gist is experimental logic circuit description with C#.
I think, using Reactive Extension(Rx), we can write electrical circuit easily.
Previous Gist Code
This class means logic wire. Logic gates are defined as operator override.
This Gist is experimental logic circuit description with C#.
I think, using Reactive Extension(Rx), we can write electrical circuit easily.
Previous Gist Code
This class means logic wire. Logic gates are defined as operator override.
fun main(args: Array<String>) { | |
setup() | |
} | |
var turtles = arrayOf<Turtle>() | |
infix inline fun <T : Turtle> T.ask(job: T.() -> Unit): Unit = job(this) | |
infix inline fun <T : Turtle> Array<T>.ask(job: T.() -> Unit): Unit { | |
for (t in this) { |