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 IModule Add(String key, String typeName, IList<String> options, FileInfo configFile) | |
{ | |
this.CheckIfDisposed(); | |
if (!(options.Contains("separate") || this._tainted)) | |
{ | |
this.Parent.Parent.MainAppDomain.DoCallBack(() => | |
{ | |
this.Directory.GetFiles("*.dll") | |
.Concat(this.Directory.GetFiles(".exe")) | |
.ForEach(f => Assembly.LoadFrom(f.FullName)); |
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 IModule Add(String key, String typeName, IList<String> options, FileInfo configFile) | |
{ | |
this.CheckIfDisposed(); | |
Tuple<String, String> id = Tuple.Create(key, typeName); | |
return this.Modules.ContainsKey(id) | |
? this.Modules[id] | |
: (options.Contains("separate") | |
? Activator.CreateInstance( | |
this.AppDomain, |
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 IModule Add(String key, String typeName, IList<String> options, FileInfo configFile) | |
{ | |
this.CheckIfDisposed(); | |
Tuple<String, String> id = Tuple.Create(key, typeName); | |
return this.Modules.ContainsKey(id) | |
? this.Modules[id] | |
: Activator.CreateInstance( | |
this.AppDomain, | |
this.GetAssemblyByName(typeName).FullName, | |
typeName |
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
import clr | |
clr.AddReferenceToFile("EventAction.dll") | |
from System import * | |
from System.Windows.Controls import * | |
from Solar import * | |
from Solar.Models import * | |
from XSpect.Contributions.Solar import * | |
def _fav(s): | |
with TwitterClient(Client.Instance.Accounts[0]) as client: |
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
// before: | |
// Twitter ユーザ (account) の投稿 (ID: 12345678) | |
account.Act("Status", 12345678).Add( | |
// DateTime.UtcNow に作成された | |
a => a.Advertise(DateTime.UtcNow, AdvertisementFlags.Created), | |
// その本文は "@foobar ほげほげ #fugo" である | |
a => a.Act("Body", "@foobar ほげほげ #fugo"), | |
// @foobar への reply である (参照先の Status を表す Activity は別途取ってくるのです>< | |
a => a.Act("Reply", inReplyToStatus) | |
// ハッシュタグ "fugo" を含む |
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 Boolean Equals(Activity left, Activity right) | |
{ | |
return ReferenceEquals(left, right) | |
|| (ReferenceEquals(left, null) && ReferenceEquals(right, null) && left.Id.Equals(right.Id)); | |
} | |
public static Int32 Compare(Activity left, Activity right) | |
{ | |
Int32 result; | |
return left == right |
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 System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using Raven.Client.Converters; | |
using Raven.Client.Document; |
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
var sample = new Exception("foo", | |
new Exception("bar", | |
new Exception("baz", | |
new Exception("qux", | |
new Exception("hoge", | |
new Exception("fugo")))))); | |
((Func<Exception, Exception>) (ex => ex != null ? ex.InnerException : null)) | |
.Unfold(sample) | |
.TakeWhile(ex => ex != null) |
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
--- Dynamic.cs (format-modified) 6f57b4ac9bbd3a75acc5f275cd1e5afce4208c6e | |
+++ Dynamic.cs (Extension Methods Support) | |
@@ -1,10 +1,11 @@ | |
// Original: Copyright (C) Microsoft Corporation. All rights reserved. | |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
+using System.Runtime.CompilerServices; | |
using System.Text; |
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
clr.AddReference("System.CoreEx") | |
clr.AddReference("System.Reactive") | |
from System import ObservableExtensions | |
from System.Collections.Generic import IEvent | |
from System.Concurrency import * | |
from System.Linq import * | |
from Ignition import EventArgs | |
if not TwitterClient.CurrentInstance: |