mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
920148e05b
ISerializationBinder is added only in whitelist mode. Types for whitelisting should be registered manually via new API `Module.StartAsync()` or attribute `AllowedSerializableType(name)`
16 lines
345 B
C#
16 lines
345 B
C#
using BotFramework;
|
|
using System;
|
|
|
|
namespace Kruzya.TelegramBot.Core
|
|
{
|
|
public class AbsoluteUriParser : IParameterParser<Uri>
|
|
{
|
|
public Uri DefaultInstance() => null;
|
|
|
|
public bool TryGetValue(string text, out Uri result)
|
|
{
|
|
return Uri.TryCreate(text, UriKind.Absolute, out result);
|
|
}
|
|
}
|
|
}
|