var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var queue = storage.AddQueues("queue");
var blob = storage.AddBlobs("blob");
var eventHubs = builder.AddAzureEventHubs("eventhubs").UseExisting().AddEventHub("myhub");
var serviceBus = builder.AddAzureServiceBus("messaging").UseExisting().WithQueue("myqueue");- Damian Edward's Minimal Playground: https://github.com/DamianEdwards/MinimalApiPlayground
- Contoso Construction API with Azure Deployment Scripts: https://github.com/bradygaster/Contoso.Construction
- .NET Conf 2021 Demo App: https://github.com/halter73/Contoso.Construction
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
| tri_num=[ | |
| [75], | |
| [95, 64], | |
| [17, 47, 82], | |
| [18, 35, 87, 10], | |
| [20, 04, 82, 47, 65], | |
| [19, 01, 23, 75, 03, 34], | |
| [88, 02, 77, 73, 07, 63, 67], | |
| [99, 65, 04, 28, 06, 16, 70, 92], | |
| [41, 41, 26, 56, 83, 40, 80, 70, 33], |
Note
The details shared here are based on the prototyping done as of 2/3/2024. If you're reading this gist at a later time, the details might have changed. In any case, it's here for archival reasons.
This gist is written in response to a tweet by Adam Storr (@WestDiscGolf) in response to a code sample that was shared of the current prototype of our workstream to sharpen up event-based apps.
Sure. The "with provider" and "map events" methods, how they work together and are processed under the hood. For example when/how a message arrives and triggers the binding/handler. Thanks for your reply :-)
The prototype code looks like this:
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
| using System.Net; | |
| using System.Text; | |
| var port = 8080; | |
| var server = new Server(port); | |
| server.UseAuthentication(); | |
| server.UseRouting(); | |
| server.UseNotFoundPage(); |
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
| from datetime import date | |
| sundays=0 | |
| for year in range(1901,2001): | |
| for month in range(1,13): | |
| if date(year,month,1).weekday()==6: | |
| sundays+=1 | |
| print sundays |
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
| make: Entering directory '/home/captainsafia/github.com/dotnet/runtime/src/mono/wasm' | |
| /home/captainsafia/github.com/dotnet/runtime/dotnet.sh build --configuration debug --nologo /p:TargetArchitecture=wasm /p:TargetOS=Browser /p:Configuration=Debug /p:RuntimeConfiguration=Release /home/captainsafia/github.com/dotnet/runtime/src/mono/wasm/debugger/tests/debugger-test | |
| Determining projects to restore... | |
| All projects are up-to-date for restore. | |
| Determining projects to restore... | |
| All projects are up-to-date for restore. | |
| WasmAppBuilder -> /home/captainsafia/github.com/dotnet/runtime/artifacts/bin/WasmAppBuilder/Debug/net5.0/WasmAppBuilder.dll | |
| WasmAppBuilder -> /home/captainsafia/github.com/dotnet/runtime/artifacts/bin/WasmAppBuilder/Debug/net5.0/publish/ | |
| debugger-test -> /home/captainsafia/github.com/dotnet/runtime/artifacts/bin/debugger-test/wasm/Debug/debugger-test.dll |
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
| # Prints username@hostname working-directory> | |
| function prompt_party { | |
| PS1="\[\033[38;5;$(jot -r 1 1 256)m\]\u\[\033[00m\]" | |
| PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]@\[\033[00m\]" | |
| PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]\h\[\033[00m\] " | |
| PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]\w\[\033[00m\]> " | |
| } | |
| PROMPT_COMMAND=prompt_party |
This file has been truncated, but you can view the full file.
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
| ã ÏΩ`$YY/>=3;≥3ô˜˚π€Û⁄I≤ìÓŒ£ìÃÑ:ùN¶ôºHw2+Œ⁄V∫+IÌTW5U’yÃ≤¿" Ëe—ã¢"EPƒ'ˇ{UTƒr≈+ | |
| xˇ»S\‰≠ÇäWÓy’˚‘©Í$›]=ª∞ªIͺæsŒÔ˚ŒwæÛùÔÏ⁄≤eK€Cs√Ç4./é | |
| "?ÕiK≈gU^Q„EÆ¢qǧr_ÊaA(rö Kj|X‰Ó»©ëë˘û‚í¨jÒØÄÒ≤:_ƒRl^êDyÒøæ˜ΩÔÌGˇ˘û◊"{@”ú≤Z_‰ïüyÈÊî¡O‹ª5“ˆ–±tUQxIõÕ¶´¢VU¯áx©k6WsùÉ?•◊È€7©ã™ßh|)y Ú8≠Û¯\.=5í)åeÛÖTÓ∆t*ó+LÇkÒT•"›û‘*'FsZµ$»—¥\‚c\•OÀíHU„£ | |
| WÊWdÂ∂áâ—κX·ïh˚/ïxÖW:ÏŸ'∏‚TŒ#ÁÖâ¢v\ÊJBQëUyAÀs "Ø©3<Wö탵ÌöRÂ#ÖÁ–ÊkQ–ñ™Û±¢\éódM‚µ8ßV¿è¢¨Ò˘ÑÏzx:]OçÂ∂%V€¶s›üå¥õπ;¢óFª¯XEëÀ≠PSQ( ¢¨®fl_`y‰Ò«/Ω¯“¬ÓKèÌΩÙ¯•ˆÓûπÃN…Ω,(=^Z~‰ÒK›=Àó¢±éKÌœÒ è?]S´≈"Ø™è<ÓìèWYy‰Ò;•`Æ5ûdÕ.D∑èß&«⁄x©0õãÕÊGª˜LŒM“#x ∂vΩH>33QòûôõIMÊ23πÏ‘‰éÓXfl@¨˜¿»T~2ì/\ü ”©¸ı | |
| }zj|j∂∏Œ%Í—˛Ù‘‰H™êæÕÄ…ÿ*…˜‰Æg∆«ÔçæäflQóvéOçM¶&2{¨ÕÇ<„s„ëfi˚çÈÒl!üœLdÚ3flW»er∞Ÿëã=•~`a`æ´Øßo°´Ø/¡u]MÙp]Ω|i†o`∞ƒœóv‰'¶G≤3›ÒeNâ/»b ˆ±‘_Ë}°tµwMÍÔª3∏ÿ/ˆı]]],™} øE)ûèü®ùÕéè‰S3cô¸‘l~z6àÀNé!∞Ó'®Œç‹P°®ππÓÒSK∑„…X"÷ùHt)≈Xw¨'—óËçu_çÁJ∑’623SS˘¡ı∂±"c8;ŸC´ &-ó°PTë`ê «óª˚bÄ$8KßÊ≤3˘Ÿ‘x!39W…ÊR√„à©âȸ÷Óû6ãòyAmfÜW™"?Û´‡+¶ t(^Tÿè€NUcÍ“ 2≥„˘Ïxf.3^üö∫1;IϱÇ|«≤Z |
NewerOlder