asp.net - why does the compiler complain about missing ctor of WebSocketHandler? -


i'm trying use websocket in project. so, installed package microsoft asp.net signalr, consists of websockethandler abstract class. defined class inheriting websockethandler, compiler complains: 'microsoft.aspnet.signalr.websockets.websockethandler' not contain constructor takes 0 arguments'. seems wierd me, because definitioin of websockethandler ctor gets nullable value, means ctor no parameter, definition looks this: protected websockethandler(int? maxincomingmessagesize);

can tell me problem is? thanks.

protected member accessible derived class instances , there's nothing special it. nothing special in class itself, either @ websockethandler.cs.

it mens need pass in nullable type, not mean can't arguments.

int? maxincomingmessagesize = 0; var socket = new websockethandler(maxincomingmessagesize); 

in derived class could/should define "constructor takes 0 arguments".

public class myhandler : websockethandler {     // not mandatory     public myhandler()       :this(null)      {}      // mandatory     public myhandler(int? maxincomingmessagesize)       :base(maxincomingmessagesize)      {} } 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -