In this workshop, we'll add a new in
expression to C#, with example use cases shown below:
x in 1..10 // x >= 1 && x < 10
'a' in "bar" // "bar".IndexOf('a') >= 0 -or- "bar".Contains('a')
x in xs // xs.Contains(x)
using Microsoft.AspNetCore.Http.Features; | |
using Microsoft.AspNetCore.Http; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Builder; | |
namespace Lakerfield.Net.ProxyApp.Middleware | |
{ | |
/// <summary> | |
/// Fix to disable websockets over non http/1.1 connections | |
/// Implementation of comment https://github.com/microsoft/reverse-proxy/issues/1375#issuecomment-1312799130 |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Print ZPL from browser</title> | |
</head> | |
<body> | |
<h1>Test page for print ZPL from browser!</h1> | |
<script type="text/javascript"> | |
function printZpl(zpl) { |
I hereby claim:
To claim this, I am signing this object:
// A WCF SelfHost GZip Content-Encoding implementation for .NET 4.5 based on: | |
// Work of Francesco De Vittori @ http://www.frenk.com/2009/12/gzip-compression-wcfsilverlight/ | |
// and Microsoft’s Compression Encoder sample http://msdn.microsoft.com/en-us/library/ms751458.aspx | |
// Files of blog post: http://lakerfield.eu/post/2014/06/17/A-WCF-SelfHost-GZip-Content-Encoding-implementation-for-NET-45.aspx | |
_serviceHost = new ServiceHost(typeof(MyService), new Uri(Options.Url)); | |
var encoding = new GZipMessageEncodingBindingElement(new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8)); |