Skip to content

Instantly share code, notes, and snippets.

View pksorensen's full-sized avatar

Poul Kjeldager Sørensen pksorensen

View GitHub Profile
var clientParams = new WebDavClientParams
{
BaseAddress = new Uri("https://xxxxx.agillic.eu/"),
Credentials = new NetworkCredential("", "")
};
var _client = new WebDavClient(clientParams);
var result = await _client.Propfind("https://xxxx.agillic.eu/api/export/files/ActivitiesExport/");
foreach(var f in result.Resources)
{
docker run -p 8081:8081 -e WEBSITE_SITE_NAME=localhost -e WEBSITE_AUTH_ENABLED=True -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=localhost -e WEBSITE_INSTANCE_ID=localhost -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_AUTH_ALLOWED_AUDIENCES=http://localhost:8081/.auth/login/aad/callback -e WEBSITE_AUTH_AUTO_AAD=False -e WEBSITE_AUTH_CLIENT_ID=<DIN_CLIENT_ID> -e "WEBSITE_AUTH_CLIENT_SECRET=<DIN_CLIENT_SECRET>" -e WEBSITE_AUTH_DEFAULT_PROVIDER=AzureActiveDirectory -e WEBSITE_AUTH_ENABLED=True -e WEBSITE_AUTH_ENCRYPTION_KEY=ECC9D390636194F030ADE3E6C46DC7ED375070C6A5F1238393C51F3BF6502BC4 -e WEBSITE_AUTH_LOGOUT_PATH=/.auth/logout -e WEBSITE_AUTH_OPENID_ISSUER=https://sts.windows.net/<DIN_TENANTID>/ -e WEBSITE_AUTH_SIGNING_KEY=1368BF474BE23E06A30FF7BE7A7296A3060E18AA1309E091E1293962B58D2F2E -e WEBSITE_AUTH_TOKEN_STORE=True -e WEBSITE_AUTH_UNAUTHENTICATED_ACTION=AllowAnonymous -e WEBSITE_AUTH_PRESERVE_URL_FRAGMENT=true -e WEBSITE_CORS_SUPPORT_CREDENTIALS=true -e HOME=/home appsvc/middleware:1.3.2 /Host.ListenUrl=http:/
var columnSet = ColumnSetBuilder.Generate<msnfp_Transaction>(x => x.msnfp_TransactionId, x=>x.msnfp_Amount);
var columnSet2 = ColumnSetBuilder.Generate<msnfp_Transaction>(x =>new { x.msnfp_TransactionId, x.msnfp_Amount });
public static class ColumnSetBuilder
{
public static ColumnSet Generate<T>(params Expression<Func<T,object>>[] expressions)
{
return new ColumnSet(expressions.Select(k => ParseExpression(k)).ToArray());
{
"upstreams": {
"contosocorp-cdn": {
"servers": [
{
"host": "ammo.blob.core.windows.net",
"weigth": 1
}
]
},
{
"id": "587cb1d3-aba7-495d-a068-088ac3d98441",
"eventType": "change",
"subject": "cds/environments/danchurchaidtest/entities/contact/9622eea7-a9b0-ea11-a812-000d3a2abf56/changesets/2020-06-17T14:48:55Z",
"data": {
"before": {
"dca_consent": false,
"statecode": 0,
"modifiedon": "2020-06-17T14:48:55Z",
"dca_gdiigiftstatus": false,
[TestClass]
public class EventDrivenBlobUpdateTest
{
[TestMethod]
public async Task CombineBlocksAutomatically()
{
var account = CloudStorageAccount.DevelopmentStorageAccount;
var container = account.CreateCloudBlobClient().GetContainerReference("testcontianer");
await container.DeleteIfExistsAsync();
await container.CreateAsync();
public class ServiceRegistrations
{
public class HandlerWrapper
{
private IServiceScopeFactory serviceScopeFactory;
private Type handlertype;
private MethodInfo method;
public HandlerWrapper(IServiceScopeFactory serviceScopeFactory, Type messageType)
[assembly: WebJobsStartup(typeof(AuthorizeBindingStartup))]
namespace CustomBinding
{
public static class AuthorizeBindingExtension
{
public static IWebJobsBuilder AddMyFileReaderBinding(this IWebJobsBuilder builder)
{
if (builder == null)
{
public class EventPublisher
{
private readonly EventGridConfiguration options;
private readonly IHostingEnvironment environment;
public EventPublisher(IOptions<EventGridConfiguration> options, IHostingEnvironment environment)
{
this.options = options?.Value ?? throw new ArgumentNullException(nameof(options));
this.environment = environment ?? throw new ArgumentNullException(nameof(environment));
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using IOBoard.DataIngestor.Common;
using System.Linq;
using SInnovations.Azure.TableStorageRepository.Queryable;
using System.Text;
using System.Collections.Generic;