public static CloudIotService CreateAuthorizedClient()
{
GoogleCredential credential =
GoogleCredential.GetApplicationDefaultAsync().Result;
// Inject the Cloud IoT Core Service scope
if (credential.IsCreateScopedRequired)
{
credential = credential.CreateScoped(new[]
{
CloudIotService.Scope.CloudPlatform // Used for IoT + PubSub + IAM
//CloudIotService.Scope.Cloudiot // Can be used if not accessing Pub/Sub
});
}
return new CloudIotService(new BaseClientService.Initializer
{
HttpClientInitializer = credential,
GZipEnabled = false
});
}
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Difficile da capire"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Informazioni o codice di esempio errati"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Mancano le informazioni o gli esempi di cui ho bisogno"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Problema di traduzione"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Altra"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Facile da capire"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Il problema è stato risolto"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Altra"
}]