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
manager.RestorePublisher(eventHubsName, deviceName); // 既にRestore済みでも、エラーにならない |
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 serviceNamespace = "<SERVICE_NAMESPACE>"; | |
var eventHubsName = "<EVENTHUBS_NAME>"; | |
var deviceName = "myDevice"; | |
// 管理権限を持つ共有アクセスポリシー | |
var sharedAccessPolicyName = "<NAME>"; | |
var sharedAccessPolicyKey = "<KEY>"; | |
// メタデータの取得 | |
var manageTokenProvider = TokenProvider.CreateSharedAccessSignatureTokenProvider(sharedAccessPolicyName, sharedAccessPolicyKey); |
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 serviceNamespace = "<SERVICE_NAMESPACE>"; | |
var eventHubsName = "<EVENTHUBs_NAME>"; | |
var deviceName = "myDevice"; // 認証ユーザーのIdとかをセット | |
// 管理ポータルで設定した共有アクセスポリシーの情報 | |
var sharedAccessPolicyName = "<NAME>"; | |
var sharedAccessPolicyKey = "<KEY>"; | |
// <EVENTHUBS_NAME>/publishers/<PUBLISHER_NAME> | |
var resourcePath = String.Format("{0}/publishers/{1}", eventHubsName, deviceName); |
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
static void SASを用いたデバイス認証によるデータ送信() | |
{ | |
var serviceNamespace = "<SERVICE_NAMESPACE>"; | |
var eventHubsName = "<EVENTHUBs_NAME>"; | |
var deviceName = "myDevice"; // 認証ユーザーのIdとかをセット | |
// 管理ポータルで設定した共有アクセスポリシーの情報 | |
var sharedAccessPolicyName = "<NAME>"; | |
var sharedAccessPolicyKey = "<KEY>"; |
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 _mediaServicesAccountName = "<アカウント名>"; | |
var _mediaServicesAccountKey = "<アカウントキー>"; | |
var _cachedCredentials = new MediaServicesCredentials( | |
_mediaServicesAccountName, | |
_mediaServicesAccountKey); | |
var _context = new CloudMediaContext(_cachedCredentials); | |
var file = "BigBuckBunny.mp4"; | |
var assetName = Path.GetFileNameWithoutExtension(file); |