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
#region Process auto layout | |
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints(); | |
var btnPadding = 61; | |
var tblPadding = 100; | |
var btnWidth = 100; | |
var btnHeight = 50; | |
// constraints |
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
using System.Diagnostics; | |
using System.Web; | |
using Hangfire; | |
using Hangfire.SimpleInjector; | |
using GlobalConfiguration = System.Web.Http.GlobalConfiguration; | |
namespace NameSpace | |
{ | |
public class WebApiApplication : HttpApplication | |
{ |
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
<div class="card @Class" @attributes="InputAttributes"> | |
@if (Title != null) | |
{ | |
<div class="card-header"> | |
<h5 class="card-title">@Title</h5> | |
</div> | |
} | |
<div class="card-body"> | |
@ChildContent | |
</div> |
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
/// <summary> | |
/// ComponentBase with DataContext | |
/// </summary> | |
public class ContextComponentBase : ComponentBase | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
protected ViewModelBase DataContext { get; set; } |
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
curl -v -X PUT "https://bot.api.chat/v1/bots/botName/scenario" | |
-H "Content-Type: application/xml" | |
-H "Cache-Control: no-cache" | |
-H "Ocp-Apim-Subscription-Key: your-subscription-key" | |
--data-raw ' | |
<bot> | |
<states> | |
<state name="Start"> | |
<transition input="hello" next="Start">Hello from chatbot</transition> | |
<transition input="*" next="Start" morphology="msg">You send me {msg}</transition> |
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
// check your functions version in .csproj | |
// check your function is out-of-process (assembly file) | |
<AzureFunctionsVersion>v4</AzureFunctionsVersion> | |
// install package | |
Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson | |
// provide startup class | |
[assembly: FunctionsStartup(typeof(Xakpc.FeedbackBots.Startup))] |
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
// check your functions version in .csproj | |
// check your function is out-of-process (assembly file) | |
<AzureFunctionsVersion>v4</AzureFunctionsVersion> | |
// install package | |
Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson | |
// it will give you generic JsonResult | |
/// <summary> | |
/// Creates a new <see cref="JsonResult"/> with the given <paramref name="value"/>. |
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
using System; | |
using System.IO; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using System.Xml.Serialization; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Logging; |
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
using Microsoft.AspNetCore.Mvc; | |
var builder = WebApplication.CreateBuilder(args); | |
// Add services to the container. | |
builder.Services.Configure<RouteHandlerOptions>(o => o.ThrowOnBadRequest = true); | |
var app = builder.Build(); | |
// middleware to check content-type header | |
app.Use(async (context, next) => |
OlderNewer