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
/// <summary> | |
/// This will return a camel-cased string, so that it reads as a normal string, by adding a space before each capital letter. | |
/// </summary> | |
public static string SpaceOutCamelCasing(this string theWord) | |
{ | |
char[] temp = theWord.ToCharArray(); | |
string Result = ""; | |
foreach (char c in temp) | |
if (c.ToString() == c.ToString().ToUpper()) |
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
#I @"Tools\Fake" | |
#r "FakeLib.dll" | |
open Fake | |
let buildNumber = | |
if hasBuildParam "version" then getBuildParam "version" else | |
if isLocalBuild then "0" else | |
buildVersion | |
let version = |
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
// Get GL Journals using the ?offset=xxx parameter | |
List<Journal> allJournals = new List<Journal>(); | |
List<Journal> batchOfJournals; | |
int skip = 0; | |
while ((batchOfJournals = repository.Journals.Skip(skip).ToList()).Count > 0) | |
{ | |
Console.WriteLine("Fetched {0} journals from API using skip={1}", batchOfJournals.Count, skip); | |
allJournals.AddRange(batchOfJournals); |
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
var querystrings = new System.Collections.Generic.Dictionary<string, string>(); | |
querystrings.Add("where", "ContactNumber = \"123\""); | |
querystrings.Add("order", "Name DESC"); | |
IConsumerRequest filteredGetContactRequest = consumerSession | |
.Request() | |
.ForMethod("GET") | |
.WithQueryParameters((IDictionary)querystrings) | |
.ForUri(new Uri("https://api.xero.com/api.xro/2.0/Contacts")) | |
.SignWithToken(accessToken); |