Skip to content

Instantly share code, notes, and snippets.

<img src="images/fcnantes-champions-95.jpg"
srcset="images/fcnantes-champions-95.jpg 200w, images/fcnantes-champions-95-400.jpg 400w,
images/fcnantes-champions-95-600.jpg 600w,
images/fcnantes-champions-95-800.jpg 800w">
System.register(["Utilitary"], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 &amp;&amp; context_1.id;
/* ETC */
});
//# sourceMappingURL=myStoredProcedure.js.map
function myStoredProcedure(arg1, arg2){ /* you can place all the arguments you want here*/
//The body of the function here
//you set the response like this
var context = getContext();
context.setBody(myResult);
}
public class DocumentClientWrapped : IDocumentClientWrapped
{
private class RetriableEnumerable<T> : IEnumerable<T>
{
private readonly IEnumerable<T> _t;
public RetriableEnumerable(IEnumerable<T> t)
{
_t = t;
}
IDocumentClientWrapped client = /* instanciation */;
IRetryQueryable<MyType> query = client.CreateDocumentQuery<MyType>(/* get usual uri using the UriFactory*/);
IEnumerable<string> = query.AsRetryEnumerable().Where(c => c.Member1 == "SomeValue").Select(c=>c.StringMember2);
/* manipulate your in memory enumeration as you wish*/
IDocumentClientWrapped client = /* instanciation */;
IRetryQueryable<MyType> query = client.CreateDocumentQuery<MyType>(/* get usual uri using the UriFactory*/);
IEnumerable<string> = query.Where(c => c.Member1 == "SomeValue").Select(c=>c.StringMember2).AsRetryEnumerable();
/* manipulate your in memory enumeration as you wish*/
public interface IRetryQueryable<T>
{
IRetryQueryable<T> Where(Expression<Func<T, bool>> predicate);
IDocumentQuery<T> AsDocumentQuery();
IEnumerable<T> AsRetryEnumerable();
IRetryQueryable<TResult> SelectMany<TResult>(Expression<Func<T, IEnumerable<TResult>>> predicate);
public interface IDocumentClientWrapped : IDisposable
{
/* Some command like methods*/
Task DeleteDocumentAsync(Uri uri);
Task CreateDocumentAsync(Uri uri, object obj);
/* Some query like methods*/
IRetryQueryable<T> CreateDocumentQuery<T>(Uri documentUri, FeedOptions feedOptions = null);
$hostName = $env:FtpHostName
$repoDir = $env:RepoDir
$userName = $env:FtpUserName
$pwd = $env:FtpUserPwd
$sitePath = Join-Path $repoDir -ChildPath "_site"
$windscpPath = Join-Path $repoDir -ChildPath "ignored\build\WinSCP"
$dllPath = Join-Path $windscpPath -ChildPath "WinSCPnet.dll"
$exePath = Join-Path $windscpPath -ChildPath "WinSCP.exe"
$repoDir = $env:RepoDir
cd $repoDir #change location and go to the repository
Exec{Invoke-Expression "&amp; jekyll build"} #invoke Jekyll from Powershell command line