Skip to content

Instantly share code, notes, and snippets.

Benjamin Abt BenjaminAbt

Block or report user

Report or block BenjaminAbt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
BenjaminAbt / QueueDemoService.cs
Created Mar 6, 2016
Azure Service Bus Queue Demo Service
View QueueDemoService.cs
// QueueClient des NuGet Pakets WindowsAzure.ServiceBus
_queueClient = QueueClient.CreateFromConnectionString( connectionString, queueName );
// Senden von Nachrichten
// Es empfiehlt sich hier die Serialisierung der Daten, bei Strings zb. als Json
_queueClient.Send( new BrokeredMessage( JsonConvert.SerializeObject( payload ) ) );
// Nachrichten werden über Callbacks empfangen
// Der Einfachheit halber biete ich den QueueService Empfängern die Informationen als Event an
// Niemand muss dabei periodische die Queue anfragen, ob es neue Nachrichten gibt
View license-generation.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using Newtonsoft.Json;
namespace ConsoleApp6
public class Program
View ODataorg_Samples_Product_9_FeaturedProduct.json
"Description":"Classic, refreshing lemonade (Single bottle)",
View ODataorg_Samples_Products_NamePriceByFilterPrice5.json
BenjaminAbt / ODataorg_Samples_Products_IDName.json
Created Feb 13, 2016
View ODataorg_Samples_Products_IDName.json
BenjaminAbt / ODataorg_Samples_Products.json
Last active Feb 13, 2016
View ODataorg_Samples_Products.json
"Description":"Whole grain bread",
View ODataorg_Samples_Products_metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<edmx:Edmx xmlns:edmx="" Version="4.0">
<Schema xmlns="" Namespace="ODataDemo">
<EntityType Name="Product">
<PropertyRef Name="ID" />
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
View MicrosoftBand_UWPVM_HeartRateBinding.cs
/// <summary>
/// Receives new heart rate and sets <see cref="HeartRate"/>
/// </summary>
private void OnHeartRate( object sender, EventArgs e )
MsBandHeartRateEventArgs args = e as MsBandHeartRateEventArgs;
if( args != null )
_uiFactory.StartNew( () =>
BenjaminAbt / MicrosoftBandSDK_StartReadingHeartBeat.cs
Created Jan 12, 2016
Get heart beat from Microsoft Band SDK
View MicrosoftBandSDK_StartReadingHeartBeat.cs
// Check if really consented and check if permissions are granted
if( isConsented || uc == UserConsent.Granted )
// provide new rate via event
bandClient.SensorManager.HeartRate.ReadingChanged += FireHeartRate;
// Start reading
return ( await andClient.SensorManager.HeartRate.StartReadingsAsync() );
BenjaminAbt / MicrosoftBandSDK_GetConsents.cs
Created Jan 12, 2016
Get consents from Microsoft Band SDK
View MicrosoftBandSDK_GetConsents.cs
// Get User Consent of current band
UserConsent uc = bandClient.SensorManager.HeartRate.GetCurrentUserConsent();
bool isConsented = false;
if( uc == UserConsent.NotSpecified )
isConsented = await bandClient.SensorManager.HeartRate.RequestUserConsentAsync();
You can’t perform that action at this time.