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
<script autostart="false" src="_framework/blazor.server.js"></script> | |
<script> | |
async function connectionDown(options) { | |
console.log("Connection Down - you could do some UI here..."); | |
for (let i = 0; i < options.maxRetries; i++) { | |
console.log("Waiting for reconnect attempt #"+(i+1)+" ..."); | |
await this.delay(options.retryIntervalMilliseconds); | |
if (this.isDisposed) { | |
break; | |
} |
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
// Parse string initData from telegram. | |
var data = HttpUtility.ParseQueryString(initData); | |
// Put data in a alphabetically sorted dict. | |
var dataDict = new SortedDictionary<string, string>( | |
data.AllKeys.ToDictionary(x => x!, x => data[x]!), | |
StringComparer.Ordinal); | |
// Constant key to genrate secret key. | |
var constantKey = "WebAppData"; |