This file contains hidden or 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
public static async Task UpdateDynamicsRecordAsync(string recordId, string updateData) | |
{ | |
using (var httpClient = new HttpClient()) | |
{ | |
// Assume GetAccessTokenAsync is a helper method to retrieve the access token | |
var token = await GetAccessTokenAsync("https://your-dynamics-url/"); | |
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); | |
var content = new StringContent(updateData, Encoding.UTF8, "application/json"); | |
var response = await httpClient.PatchAsync($"https://your-dynamics-url/api/data/v9.0/records({recordId})", content); |
This file contains hidden or 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
{ | |
"IsEncrypted": false, | |
"Values": { | |
"AzureWebJobsStorage": "<storage-connection-string>", | |
"ServiceBusConnection": "<service-bus-connection-string>" | |
} | |
} |
This file contains hidden or 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
[FunctionName("ProcessQueueMessage")] | |
public static async Task Run( | |
[ServiceBusTrigger("queue-name", Connection = "ServiceBusConnection")] string message, | |
ILogger log) | |
{ | |
log.LogInformation($"Received message: {message}"); | |
// Process message: call further activity functions, update records, etc. | |
} |
This file contains hidden or 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 azureServiceTokenProvider = new AzureServiceTokenProvider(); | |
string accessToken = await azureServiceTokenProvider.GetAccessTokenAsync("https://servicebus.azure.net/"); | |
var client = new ServiceBusClient("<ServiceBusNamespace>", new DefaultAzureCredential()); | |
var sender = client.CreateSender("<QueueName>"); | |
await sender.SendMessageAsync(new ServiceBusMessage("Hello from Dynamics 365!")); |
This file contains hidden or 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
[FunctionName("OrchestrateWorkflow")] | |
public static async Task<List<string>> RunOrchestrator( | |
[OrchestrationTrigger] IDurableOrchestrationContext context) | |
{ | |
var outputs = new List<string>(); | |
// Call a task and wait for the result. | |
outputs.Add(await context.CallActivityAsync<string>("FetchData", "recordId")); | |
// Fan out parallel tasks |
This file contains hidden or 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
Upload(); | |
// https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-requests | |
// https://www.aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/ | |
void Upload() | |
{ | |
Console.WriteLine("init - upload file"); | |
using (var client = new HttpClient()) | |
{ | |
client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "API Service"); |
This file contains hidden or 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
<system.net> | |
<defaultProxy> | |
<proxy bypassonlocal="False" usesystemdefault="True" proxyaddress="http://127.0.0.1:8888" /> | |
</defaultProxy> | |
</system.net> |

This file contains hidden or 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
Step 1: Download the Windows 11 ISO file | |
Step 2: Insert your USB storage drive into your Mac | |
Step 3: Use the diskutil command to identify which disk your USB drive is mounted on | |
- diskutil list | |
Step 4: Format your USB Drive to work with Windows | |
- diskutil eraseDisk MS-DOS "WIN11" GPT /dev/disk2 (It may be disk3 or disk4) | |
Step 5: Use hdiutil to mount the Windows 10 folder and prepare it for transfer | |
- hdiutil mount ~/Downloads/Win11.iso | |
Step 6: Copy the Windows 11 ISO over to your USB Drive |
This file contains hidden or 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
require 'minitest/autorun' | |
require './nama.rb' | |
describe "Nama Multiplos" do | |
before do | |
@nn = Nama.new | |
end | |
it "retorna multiplos de 5" do | |
@nn.print(5).must_equal "Nama" |
NewerOlder