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
// ------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by SpecFlow (http://www.specflow.org/). | |
// SpecFlow Version:1.8.1.0 | |
// SpecFlow Generator Version:1.8.0.0 | |
// Runtime Version:4.0.30319.261 | |
// | |
// Changes to this file may cause incorrect behavior and will be lost if | |
// the code is regenerated. | |
// </auto-generated> |
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.Dynamic; | |
using NUnit.Framework; | |
namespace DynamicTest | |
{ | |
public class TestObject : DynamicObject | |
{ | |
public override bool TryGetMember(GetMemberBinder binder, out object result) | |
{ | |
if (binder.Name == "MeaningOfLife") |
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
1. Create console app. | |
2. Install log4net, Serilog and Serilog.Sinks.log4net NuGet packages. | |
3. Add log4net.config: | |
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | |
</configSections> |
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
{"Timestamp":"2014-12-01T00:00:13.2834210+01:00","Level":"Debug","MessageTemplate":"Fetching all changes from domain {Domain} since {SinceTime} (UTC: {SinceUTC})","RenderedMessage":"Fetching all changes from domain \"ndoa\" since 11/30/2014 13:42:14 (UTC: 11/30/2014 12:42:14)","Properties":{"Domain":"ndoa","SinceTime":"2014-11-30T13:42:14.0000000+01:00","SinceUTC":"2014-11-30T12:42:14.0000000Z"}} | |
{"Timestamp":"2014-12-01T00:00:13.2990212+01:00","Level":"Debug","MessageTemplate":"Search called for provider {ProviderName} with query={Query}","RenderedMessage":"Search called for provider \"g3db\" with query=\"Bridge.AssetService.G3.Queries.G3DbNotificationsByDateTimeQuery\"","Properties":{"ProviderName":"g3db","Query":"Bridge.AssetService.G3.Queries.G3DbNotificationsByDateTimeQuery","clientIp":"2002:a044:1512::a044:1512","sessionId":null}} | |
{"Timestamp":"2014-12-01T00:00:13.2990212+01:00","Level":"Debug","MessageTemplate":"Querying database for modified clips (including metadata-changed) newer than {ModifiedDate} |
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
open System | |
open System.IO | |
open System.Diagnostics | |
open System.Collections.Generic | |
// Generic method to run parallel computations applied to elements of a collection | |
let runParallel f xs = | |
Async.Parallel [ for x in xs -> async { return f x } ] | |
|> Async.RunSynchronously |
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
Run(() => | |
{ | |
TrelloProcessor.WaitForPendingRequests = true; | |
var card = new Card("5609144868309d39826b61f1"); | |
card.Name = "UPDATED: " + card.Name; | |
TrelloProcessor.Shutdown(); | |
}); |
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
Run(() => | |
{ | |
TrelloProcessor.WaitForPendingRequests = true; | |
var card = new Card("5609144868309d39826b61f1"); | |
card.Comments.Add("New comment"); | |
TrelloProcessor.Shutdown(); | |
}); |
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
[<AutoOpen>] | |
module SftpActors | |
open System | |
open Akka | |
open Akka.FSharp | |
open SftpClient | |
type SftpCommand = | |
| ListDirectory of Url | |
| UploadFile of UncPath * Url |
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
let sftpActor (clientFactory : IClientFactory) (mailbox: Actor<_>) = | |
let rec disconnected () = | |
actor { | |
let! message = mailbox.Receive () | |
match message with | |
| Connect -> | |
let connection = clientFactory.CreateSftpClient() | |
connection.Connect() |
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.Linq; | |
using System.Threading.Tasks; | |
using Akka.Actor; | |
using Shared; | |
using Messages; | |
namespace Actors |
OlderNewer