Skip to main content

Peter Marshall

Sunday Bike run bike

1 min read

 

 

 Cycle to wooton roundabout and back 

 

Route map for Martins To Roundabout by Peter Marshall on plotaroute.com

 

Route map for V Short Run by Peter Marshall on plotaroute.com

Down hill and back up

Route map for Martins Down Hill And Back by Peter Marshall on plotaroute.com

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall

Call Service Fabric endpoint internally

1 min read

        private async Task CallServiceAsync()
        {
            string schedulerServiceName = "fabric:/DataServices/Scheduler";
            var resolver = ServicePartitionResolver.GetDefault();
            var partition = await resolver.ResolveAsync(new Uri(schedulerServiceName), ServicePartitionKey.Singleton, CancellationToken.None);
            var endpoints = JObject.Parse(partition.GetEndpoint().Address)["Endpoints"];
            var endpoint = endpoints[""].ToString().TrimEnd('/');
            string method = "/api/scheduler/classes/sync";
            var client = new HttpClient();
            client.DefaultRequestHeaders.Accept.Clear();
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            var getTask = client.GetAsync(endpoint + method);
            var msg = await getTask;
        }

Peter Marshall

Peter Marshall

Adding an existing project to GitHub using the command line - User Documentation

Was a great help this morning gettig this stuff into github

Peter Marshall

Call Service Fabric endpoint internally

1 min read

        private async Task CallServiceAsync()
        {
            string schedulerServiceName = "fabric:/DataServices/Scheduler";
            var resolver = ServicePartitionResolver.GetDefault();
            var partition = await resolver.ResolveAsync(new Uri(schedulerServiceName), ServicePartitionKey.Singleton, CancellationToken.None);
            var endpoints = JObject.Parse(partition.GetEndpoint().Address)["Endpoints"];
            var endpoint = endpoints[""].ToString().TrimEnd('/');
            string method = "/api/scheduler/classes/sync";
            var client = new HttpClient();
            client.DefaultRequestHeaders.Accept.Clear();
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            var getTask = client.GetAsync(endpoint + method);
            var msg = await getTask;
        }