commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
6d43f6dbbe7c47ac78c251e78746b7345eed34ae
Set improved ThreadPool values for nancy
xitrum-framework/FrameworkBenchmarks,actframework/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,testn/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,doom369/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zloster/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,joshk/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,testn/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,herloct/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zloster/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Verber/FrameworkBenchmarks,torhve/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,leafo/FrameworkBenchmarks,jamming/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,grob/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,grob/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Verber/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zapov/FrameworkBenchmarks,torhve/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,doom369/FrameworkBenchmarks,testn/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,doom369/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,leafo/FrameworkBenchmarks,testn/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,herloct/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zloster/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,methane/FrameworkBenchmarks,zloster/FrameworkBenchmarks,leafo/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,herloct/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,doom369/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,torhve/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,sxend/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,zapov/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,leafo/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,dmacd/FB-try1,RockinRoel/FrameworkBenchmarks,joshk/FrameworkBenchmarks,actframework/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,grob/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,valyala/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,testn/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,herloct/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,joshk/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,leafo/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,torhve/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,testn/FrameworkBenchmarks,methane/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,khellang/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sgml/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,methane/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jamming/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,valyala/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,khellang/FrameworkBenchmarks,dmacd/FB-try1,jamming/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Verber/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,methane/FrameworkBenchmarks,Verber/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,actframework/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,herloct/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,joshk/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,methane/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,leafo/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,sgml/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,grob/FrameworkBenchmarks,sgml/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jamming/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,methane/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,khellang/FrameworkBenchmarks,valyala/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,valyala/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,doom369/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zloster/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,actframework/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,valyala/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jamming/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,jamming/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,denkab/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,zapov/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,actframework/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,dmacd/FB-try1,seem-sky/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Verber/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,leafo/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,sgml/FrameworkBenchmarks,methane/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,testn/FrameworkBenchmarks,leafo/FrameworkBenchmarks,methane/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,doom369/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,dmacd/FB-try1,yunspace/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,torhve/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,sgml/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,sxend/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,zapov/FrameworkBenchmarks,torhve/FrameworkBenchmarks,zapov/FrameworkBenchmarks,denkab/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,methane/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,denkab/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,grob/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,denkab/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sxend/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,grob/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,dmacd/FB-try1,xitrum-framework/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,sxend/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zapov/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,testn/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,grob/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,dmacd/FB-try1,steveklabnik/FrameworkBenchmarks,torhve/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,herloct/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,sgml/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,sgml/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,denkab/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zapov/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,dmacd/FB-try1,Synchro/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,sgml/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,herloct/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jamming/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sgml/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,herloct/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,actframework/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,valyala/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sxend/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,actframework/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,torhve/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sxend/FrameworkBenchmarks,grob/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,joshk/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,zapov/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,testn/FrameworkBenchmarks,methane/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,joshk/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,valyala/FrameworkBenchmarks,methane/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Verber/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,torhve/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zloster/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,methane/FrameworkBenchmarks,zapov/FrameworkBenchmarks,grob/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,doom369/FrameworkBenchmarks,leafo/FrameworkBenchmarks,valyala/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,zloster/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Verber/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,jamming/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,dmacd/FB-try1,youprofit/FrameworkBenchmarks,testn/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,herloct/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sxend/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,leafo/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,torhve/FrameworkBenchmarks,sgml/FrameworkBenchmarks,zapov/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zapov/FrameworkBenchmarks,sxend/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,methane/FrameworkBenchmarks,herloct/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,testn/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zloster/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,doom369/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,actframework/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,herloct/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,valyala/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,dmacd/FB-try1,zdanek/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,valyala/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,herloct/FrameworkBenchmarks,testn/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,valyala/FrameworkBenchmarks,denkab/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,doom369/FrameworkBenchmarks,joshk/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,sxend/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jamming/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,joshk/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,joshk/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Verber/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,doom369/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,leafo/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zapov/FrameworkBenchmarks,grob/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,joshk/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sxend/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,dmacd/FB-try1,lcp0578/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,torhve/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,denkab/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,denkab/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,sxend/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,khellang/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zloster/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,leafo/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,dmacd/FB-try1,seem-sky/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zloster/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,actframework/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sgml/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,grob/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,methane/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,doom369/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,testn/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,dmacd/FB-try1,greg-hellings/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zapov/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,grob/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,joshk/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zapov/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,doom369/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,joshk/FrameworkBenchmarks,testn/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,zloster/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zloster/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,actframework/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,actframework/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,doom369/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jamming/FrameworkBenchmarks,valyala/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jamming/FrameworkBenchmarks,sgml/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,torhve/FrameworkBenchmarks,grob/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,grob/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,herloct/FrameworkBenchmarks
nancy/src/Global.asax.cs
nancy/src/Global.asax.cs
using System; using System.Collections.Generic; using System.Web; using Nancy; using Nancy.ErrorHandling; using System.Threading; namespace NancyBenchmark { public class Global : HttpApplication { protected void Application_Start() { var threads = 40 * Environment.ProcessorCount; ThreadPool.SetMaxThreads(threads, threads); ThreadPool.SetMinThreads(threads, threads); } } }
using System; using System.Collections.Generic; using System.Web; using Nancy; using Nancy.ErrorHandling; namespace NancyBenchmark { public class Global : HttpApplication { protected void Application_Start() { } } }
bsd-3-clause
C#
31514213cc2a5ab87f86016cd3cc91268f7302b2
Bump version
Deadpikle/NetSparkle,Deadpikle/NetSparkle
AssemblyInfo.cs
AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("NetSparkle")] [assembly: AssemblyDescription("NetSparkle is an auto update framework for .NET developers")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NetSparkle")] [assembly: AssemblyCopyright("Portions Copyright © Dirk Eisenberg 2010, Deadpikle 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("279448fc-5103-475e-b209-68f3268df7b5")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.16.5")] [assembly: AssemblyFileVersion("0.16.5")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("NetSparkle")] [assembly: AssemblyDescription("NetSparkle is an auto update framework for .NET developers")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NetSparkle")] [assembly: AssemblyCopyright("Portions Copyright © Dirk Eisenberg 2010, Deadpikle 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("279448fc-5103-475e-b209-68f3268df7b5")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.16.3")] [assembly: AssemblyFileVersion("0.16.3")]
mit
C#
73d53e64dcb398c4aefa767bfc09092116330327
debug hooks into when a package is created
rzhw/Squirrel.Windows,rzhw/Squirrel.Windows
src/CreateReleasePackage/Program.cs
src/CreateReleasePackage/Program.cs
using System; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using MarkdownSharp; using Shimmer.Core; namespace CreateReleasePackage { public class Program { static int Main(string[] args) { #if DEBUG // NB: If you want to debug through Setup.exe, uncommenting this // will make your life much easier Debugger.Launch(); #endif var optParams = ParseCommands.ParseOptions(args); if (optParams == null) { return -1; } var targetDir = optParams["target"]; var package = new ReleasePackage(optParams["input"]); var targetFile = Path.Combine(targetDir, package.SuggestedReleaseFileName); var fullRelease = package.CreateReleasePackage(targetFile, optParams["pkgdir"] != "" ? optParams["pkgdir"] : null, input => (new Markdown()).Transform(input)); var releaseFile = Path.Combine(targetDir, "RELEASES"); if (File.Exists(releaseFile)) { var releaseEntries = ReleaseEntry.ParseReleaseFile(File.ReadAllText(releaseFile, Encoding.UTF8)); var latestFullRelease = releaseEntries .Where(x => x.IsDelta == false) .MaxBy(x => x.Version) .Select(x => new ReleasePackage(Path.Combine(targetDir, x.Filename), true)) .FirstOrDefault(); var deltaFile = Path.Combine(targetDir, package.SuggestedReleaseFileName.Replace("full", "delta")); Console.WriteLine("{0} {1}", latestFullRelease.InputPackageFile, deltaFile); var deltaBuilder = new DeltaPackageBuilder(); deltaBuilder.CreateDeltaPackage(package, latestFullRelease, deltaFile); } ReleaseEntry.BuildReleasesFile(targetDir); Console.WriteLine(fullRelease); return 0; } } }
using System; using System.IO; using System.Linq; using System.Text; using MarkdownSharp; using Shimmer.Core; namespace CreateReleasePackage { public class Program { static int Main(string[] args) { var optParams = ParseCommands.ParseOptions(args); if (optParams == null) { return -1; } var targetDir = optParams["target"]; var package = new ReleasePackage(optParams["input"]); var targetFile = Path.Combine(targetDir, package.SuggestedReleaseFileName); var fullRelease = package.CreateReleasePackage(targetFile, optParams["pkgdir"] != "" ? optParams["pkgdir"] : null, input => (new Markdown()).Transform(input)); var releaseFile = Path.Combine(targetDir, "RELEASES"); if (File.Exists(releaseFile)) { var releaseEntries = ReleaseEntry.ParseReleaseFile(File.ReadAllText(releaseFile, Encoding.UTF8)); var latestFullRelease = releaseEntries .Where(x => x.IsDelta == false) .MaxBy(x => x.Version) .Select(x => new ReleasePackage(Path.Combine(targetDir, x.Filename), true)) .FirstOrDefault(); var deltaFile = Path.Combine(targetDir, package.SuggestedReleaseFileName.Replace("full", "delta")); Console.WriteLine("{0} {1}", latestFullRelease.InputPackageFile, deltaFile); var deltaBuilder = new DeltaPackageBuilder(); deltaBuilder.CreateDeltaPackage(package, latestFullRelease, deltaFile); } ReleaseEntry.BuildReleasesFile(targetDir); Console.WriteLine(fullRelease); return 0; } } }
mit
C#
8b28500020fe920441d12a155e160dc09788ed00
correct work directory on startup
GangZhuo/kcptun-gui-windows
kcptun-gui/Program.cs
kcptun-gui/Program.cs
using System; using System.IO; using System.Windows.Forms; using kcptun_gui.Controller; using kcptun_gui.View; namespace kcptun_gui { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Directory.SetCurrentDirectory(Application.StartupPath); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (!Logging.OpenLogFile()) { MessageBox.Show($"Can't access the file '{Logging.LogFilePath}', it is maybe used by another process.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } MainController controller = new MainController(); MenuViewController viewController = new MenuViewController(controller); controller.Start(); Application.Run(); } } }
using System; using System.Windows.Forms; using kcptun_gui.Controller; using kcptun_gui.View; namespace kcptun_gui { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (!Logging.OpenLogFile()) { MessageBox.Show($"Can't access the file '{Logging.LogFilePath}', it is maybe used by another process.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } MainController controller = new MainController(); MenuViewController viewController = new MenuViewController(controller); controller.Start(); Application.Run(); } } }
mit
C#
652ad264202769987b16c9083975d6ada5c7ef56
Update dependencies for Cake 0.19.0
bholmes/XamarinComponents,xamarin/XamarinComponents,xamarin/XamarinComponents,bholmes/XamarinComponents,xamarin/XamarinComponents,xamarin/XamarinComponents,bholmes/XamarinComponents,bholmes/XamarinComponents,bholmes/XamarinComponents,xamarin/XamarinComponents,bholmes/XamarinComponents,xamarin/XamarinComponents
common.cake
common.cake
#tool nuget:?package=XamarinComponent&version=1.1.0.42 #addin nuget:?package=Cake.XCode&version=2.0.13 #addin nuget:?package=Cake.Xamarin.Build&version=1.1.13 #addin nuget:?package=Cake.Xamarin&version=1.3.0.15 #addin nuget:?package=Cake.FileHelpers&version=1.0.4 void BuildXCodeFatLibrary(FilePath xcodeProject, string target, string libraryTitle = null, FilePath fatLibrary = null, DirectoryPath workingDirectory = null, string targetFolderName = null) { if (!IsRunningOnUnix()) { Warning("{0} is not available on the current platform.", "xcodebuild"); return; } libraryTitle = libraryTitle ?? target; fatLibrary = fatLibrary ?? string.Format("lib{0}.a", libraryTitle); workingDirectory = workingDirectory ?? Directory("./externals/"); var output = string.Format("lib{0}.a", libraryTitle); var i386 = string.Format("lib{0}-i386.a", libraryTitle); var x86_64 = string.Format("lib{0}-x86_64.a", libraryTitle); var armv7 = string.Format("lib{0}-armv7.a", libraryTitle); var armv7s = string.Format("lib{0}-armv7s.a", libraryTitle); var arm64 = string.Format("lib{0}-arm64.a", libraryTitle); var buildArch = new Action<string, string, FilePath>((sdk, arch, dest) => { if (!FileExists(dest)) { XCodeBuild(new XCodeBuildSettings { Project = workingDirectory.CombineWithFilePath(xcodeProject).ToString(), Target = target, Sdk = sdk, Arch = arch, Configuration = "Release", }); var tmpOutputPath = workingDirectory.Combine("build").Combine("Release-" + sdk); if (!string.IsNullOrEmpty (targetFolderName)) tmpOutputPath = tmpOutputPath.Combine (targetFolderName); var outputPath = tmpOutputPath.CombineWithFilePath(output); CopyFile(outputPath, dest); } }); buildArch("iphonesimulator", "i386", workingDirectory.CombineWithFilePath(i386)); buildArch("iphonesimulator", "x86_64", workingDirectory.CombineWithFilePath(x86_64)); buildArch("iphoneos", "armv7", workingDirectory.CombineWithFilePath(armv7)); buildArch("iphoneos", "armv7s", workingDirectory.CombineWithFilePath(armv7s)); buildArch("iphoneos", "arm64", workingDirectory.CombineWithFilePath(arm64)); RunLipoCreate(workingDirectory, fatLibrary, i386, x86_64, armv7, armv7s, arm64); }
#tool nuget:?package=XamarinComponent&version=1.1.0.42 #addin nuget:?package=Cake.XCode&version=2.0.9 #addin nuget:?package=Cake.Xamarin.Build&version=1.1.8 #addin nuget:?package=Cake.Xamarin&version=1.3.0.3 #addin nuget:?package=Cake.FileHelpers&version=1.0.3.2 void BuildXCodeFatLibrary(FilePath xcodeProject, string target, string libraryTitle = null, FilePath fatLibrary = null, DirectoryPath workingDirectory = null, string targetFolderName = null) { if (!IsRunningOnUnix()) { Warning("{0} is not available on the current platform.", "xcodebuild"); return; } libraryTitle = libraryTitle ?? target; fatLibrary = fatLibrary ?? string.Format("lib{0}.a", libraryTitle); workingDirectory = workingDirectory ?? Directory("./externals/"); var output = string.Format("lib{0}.a", libraryTitle); var i386 = string.Format("lib{0}-i386.a", libraryTitle); var x86_64 = string.Format("lib{0}-x86_64.a", libraryTitle); var armv7 = string.Format("lib{0}-armv7.a", libraryTitle); var armv7s = string.Format("lib{0}-armv7s.a", libraryTitle); var arm64 = string.Format("lib{0}-arm64.a", libraryTitle); var buildArch = new Action<string, string, FilePath>((sdk, arch, dest) => { if (!FileExists(dest)) { XCodeBuild(new XCodeBuildSettings { Project = workingDirectory.CombineWithFilePath(xcodeProject).ToString(), Target = target, Sdk = sdk, Arch = arch, Configuration = "Release", }); var tmpOutputPath = workingDirectory.Combine("build").Combine("Release-" + sdk); if (!string.IsNullOrEmpty (targetFolderName)) tmpOutputPath = tmpOutputPath.Combine (targetFolderName); var outputPath = tmpOutputPath.CombineWithFilePath(output); CopyFile(outputPath, dest); } }); buildArch("iphonesimulator", "i386", workingDirectory.CombineWithFilePath(i386)); buildArch("iphonesimulator", "x86_64", workingDirectory.CombineWithFilePath(x86_64)); buildArch("iphoneos", "armv7", workingDirectory.CombineWithFilePath(armv7)); buildArch("iphoneos", "armv7s", workingDirectory.CombineWithFilePath(armv7s)); buildArch("iphoneos", "arm64", workingDirectory.CombineWithFilePath(arm64)); RunLipoCreate(workingDirectory, fatLibrary, i386, x86_64, armv7, armv7s, arm64); }
mit
C#
2bc33d0c82601cc78ed3f88107daf49a3d1dc951
Update CSharpCompiler.cs
drew-r/Goose
CSharpCompiler.cs
CSharpCompiler.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.CodeDom.Compiler; using Microsoft.CSharp; using System.IO; using System.Reflection; namespace Goose { static class CSharpCompiler { public static Assembly Compile(string assemblyName, string[] src) { return Compile(assemblyName, src, null); } public static Assembly Compile(string outputPath, string[] src, params string[] referencedAssemblies) { CSharpCodeProvider codeProvider = new CSharpCodeProvider(); CompilerParameters paras = new CompilerParameters() { OutputAssembly = outputPath }; if (referencedAssemblies != null) { foreach (string referencedAssembly in referencedAssemblies) { paras.ReferencedAssemblies.Add(referencedAssembly); } } CompilerResults results = codeProvider.CompileAssemblyFromSource(paras,src); if (results.Errors.Count > 0) { string msg = ""; foreach (CompilerError err in results.Errors) { msg = String.Concat(msg, err.ErrorNumber, ": ", err.ErrorText," @ ", err.FileName , " L" , err.Line , " C" , err.Column); } throw new Exception("Compilation error(s)..." + msg); } return results.CompiledAssembly; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.CodeDom.Compiler; using Microsoft.CSharp; using System.IO; using System.Reflection; namespace Goose { static class CSharpCompiler { public static Assembly Compile(string assemblyName, string[] src) { return Compile(assemblyName, src, null); } public static Assembly Compile(string outputPath, string[] src, params string[] referencedAssemblies) { CSharpCodeProvider codeProvider = new CSharpCodeProvider(); CompilerParameters paras = new CompilerParameters() { OutputAssembly = outputPath }; if (referencedAssemblies != null) { foreach (string referencedAssembly in referencedAssemblies) { paras.ReferencedAssemblies.Add(referencedAssembly); } } CompilerResults results = codeProvider.CompileAssemblyFromSource(paras,src); if (results.Errors.Count > 0) { string msg = ""; foreach (CompilerError err in results.Errors) { msg = String.Concat(msg, err.ErrorNumber + ": " + err.ErrorText + " @ " + err.FileName + " L" + err.Line + " C" + err.Column); } throw new Exception("Compilation error(s)..." + msg); } return results.CompiledAssembly; } } }
mit
C#
b09ae2d0edb1cafe24a9ca920b5b3d48cfd604b0
Fix model class
tobyclh/UnityCNTK,tobyclh/UnityCNTK
Assets/UnityCNTK/Scripts/CNTKManager.cs
Assets/UnityCNTK/Scripts/CNTKManager.cs
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UnityCNTK{ public class CNTKManager : MonoBehaviour { public static CNTKManager instance; public List<Model> managedModels = new List<Model>(); void Start () { MakeSingleton(); } // Update is called once per frame void Update () { } private void MakeSingleton() { if (instance != null && instance != this ) { Debug.LogError("Only 1 CNTK manager allowed in a scene, destroying"); Destroy(this); } else { instance = this; } } } }
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UnityCNTK{ public class CNTKManager : MonoBehaviour { public static CNTKManager instance; public List<StreamingModel<IConvertible, IConvertible>> managedModels = new List<StreamingModel<IConvertible, IConvertible>>(); void Start () { MakeSingleton(); } // Update is called once per frame void Update () { } private void MakeSingleton() { if (instance != null && instance != this ) { Debug.LogError("Only 1 CNTK manager allowed in a scene, destroying"); Destroy(this); } else { instance = this; } } } }
mit
C#
f27214d7797b811e3f7bdbb558d072d1dfefaa5e
Remove unused TokenKind.Unknown.
plioi/parsley
src/Parsley/TokenKind.cs
src/Parsley/TokenKind.cs
using System.Text.RegularExpressions; namespace Parsley; public abstract class TokenKind { public static readonly TokenKind EndOfInput = new Empty("end of input"); readonly string name; protected TokenKind(string name) { this.name = name; } public bool TryMatch(Text text, out Token token) { var match = Match(text); if (match.Success) { token = new Token(this, text.Position, match.Value); return true; } token = null; return false; } protected abstract MatchResult Match(Text text); public string Name => name; public override string ToString() => name; } public class Pattern : TokenKind { readonly TokenRegex regex; public Pattern(string name, string pattern, params RegexOptions[] regexOptions) : base(name) { regex = new TokenRegex(pattern, regexOptions); } protected override MatchResult Match(Text text) => text.Match(regex); } public class Keyword : Pattern { public Keyword(string word) : base(word, word + @"\b") { if (word.Any(ch => !char.IsLetter(ch))) throw new ArgumentException("Keywords may only contain letters.", nameof(word)); } } public class Operator : TokenKind { readonly string symbol; public Operator(string symbol) : base(symbol) { this.symbol = symbol; } protected override MatchResult Match(Text text) { var peek = text.Peek(symbol.Length); if (peek == symbol) return MatchResult.Succeed(peek); return MatchResult.Fail; } } public class Empty : TokenKind { public Empty(string name) : base(name) { } protected override MatchResult Match(Text text) { if (text.EndOfInput) return MatchResult.Succeed(""); return MatchResult.Fail; } }
using System.Text.RegularExpressions; namespace Parsley; public abstract class TokenKind { public static readonly TokenKind EndOfInput = new Empty("end of input"); public static readonly TokenKind Unknown = new Pattern("Unknown", @".+"); readonly string name; protected TokenKind(string name) { this.name = name; } public bool TryMatch(Text text, out Token token) { var match = Match(text); if (match.Success) { token = new Token(this, text.Position, match.Value); return true; } token = null; return false; } protected abstract MatchResult Match(Text text); public string Name => name; public override string ToString() => name; } public class Pattern : TokenKind { readonly TokenRegex regex; public Pattern(string name, string pattern, params RegexOptions[] regexOptions) : base(name) { regex = new TokenRegex(pattern, regexOptions); } protected override MatchResult Match(Text text) => text.Match(regex); } public class Keyword : Pattern { public Keyword(string word) : base(word, word + @"\b") { if (word.Any(ch => !char.IsLetter(ch))) throw new ArgumentException("Keywords may only contain letters.", nameof(word)); } } public class Operator : TokenKind { readonly string symbol; public Operator(string symbol) : base(symbol) { this.symbol = symbol; } protected override MatchResult Match(Text text) { var peek = text.Peek(symbol.Length); if (peek == symbol) return MatchResult.Succeed(peek); return MatchResult.Fail; } } public class Empty : TokenKind { public Empty(string name) : base(name) { } protected override MatchResult Match(Text text) { if (text.EndOfInput) return MatchResult.Succeed(""); return MatchResult.Fail; } }
mit
C#
bc0e1d8c37272acf7a75c048036c512d42777bcf
Remove dead newline
peppy/osu,UselessToucan/osu,ppy/osu,UselessToucan/osu,smoogipoo/osu,NeoAdonis/osu,peppy/osu-new,peppy/osu,UselessToucan/osu,NeoAdonis/osu,smoogipoo/osu,smoogipooo/osu,NeoAdonis/osu,smoogipoo/osu,ppy/osu,peppy/osu,ppy/osu
osu.Game.Rulesets.Catch/Mods/CatchModFloatingFruits.cs
osu.Game.Rulesets.Catch/Mods/CatchModFloatingFruits.cs
using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.UI; using osu.Game.Screens.Play; namespace osu.Game.Rulesets.Catch.Mods { public class CatchModFloatingFruits : Mod, IApplicableToDrawableRuleset<CatchHitObject> { public override string Name => "Floating Fruits"; public override string Acronym => "FF"; public override string Description => "The fruits are... floating?"; public override double ScoreMultiplier => 1; public override IconUsage? Icon => FontAwesome.Solid.Cloud; public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset) { drawableRuleset.Anchor = Anchor.Centre; drawableRuleset.Origin = Anchor.Centre; drawableRuleset.Scale = new osuTK.Vector2(1, -1); } } }
using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.UI; using osu.Game.Screens.Play; namespace osu.Game.Rulesets.Catch.Mods { public class CatchModFloatingFruits : Mod, IApplicableToDrawableRuleset<CatchHitObject> { public override string Name => "Floating Fruits"; public override string Acronym => "FF"; public override string Description => "The fruits are... floating?"; public override double ScoreMultiplier => 1; public override IconUsage? Icon => FontAwesome.Solid.Cloud; public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset) { drawableRuleset.Anchor = Anchor.Centre; drawableRuleset.Origin = Anchor.Centre; drawableRuleset.Scale = new osuTK.Vector2(1, -1); } } }
mit
C#
a4390c5ca0cbadb34b55c1fe1996527a6c5ef980
Rename TimeStamp to EventTimeStamp to avoid confusion with native Azure Table Storage "Timestamp" column
stemarie/log4net.Azure,GrzegorzBlok/log4net.Azure,BhupinderAnand/log4net.azure,baumerik/log4net.Azure
log4net.Azure/AzureLoggingEventEntity.cs
log4net.Azure/AzureLoggingEventEntity.cs
using System; using System.Collections; using System.Globalization; using System.Text; using Microsoft.WindowsAzure.Storage.Table; using log4net.Core; namespace log4net.Appender { internal sealed class AzureLoggingEventEntity : TableEntity { public AzureLoggingEventEntity(LoggingEvent e) { Domain = e.Domain; Identity = e.Identity; Level = e.Level; LoggerName = e.LoggerName; var sb = new StringBuilder(e.Properties.Count); foreach (DictionaryEntry entry in e.Properties) { sb.AppendFormat("{0}:{1}", entry.Key, entry.Value); sb.AppendLine(); } Properties = sb.ToString(); Message = e.RenderedMessage; ThreadName = e.ThreadName; EventTimeStamp = e.TimeStamp; UserName = e.UserName; PartitionKey = e.LoggerName; RowKey = MakeRowKey(e); } private static string MakeRowKey(LoggingEvent loggingEvent) { return string.Format("{0}.{1}", loggingEvent.TimeStamp.ToString("yyyy_MM_dd_HH_mm_ss_fffffff", DateTimeFormatInfo.InvariantInfo), Guid.NewGuid().ToString().ToLower()); } public string UserName { get; set; } public DateTime EventTimeStamp { get; set; } public string ThreadName { get; set; } public string Message { get; set; } public string Properties { get; set; } public string LoggerName { get; set; } public Level Level { get; set; } public string Identity { get; set; } public string Domain { get; set; } } }
using System; using System.Collections; using System.Globalization; using System.Text; using Microsoft.WindowsAzure.Storage.Table; using log4net.Core; namespace log4net.Appender { internal sealed class AzureLoggingEventEntity : TableEntity { public AzureLoggingEventEntity(LoggingEvent e) { Domain = e.Domain; Identity = e.Identity; Level = e.Level; LoggerName = e.LoggerName; var sb = new StringBuilder(e.Properties.Count); foreach (DictionaryEntry entry in e.Properties) { sb.AppendFormat("{0}:{1}", entry.Key, entry.Value); sb.AppendLine(); } Properties = sb.ToString(); Message = e.RenderedMessage; ThreadName = e.ThreadName; TimeStamp = e.TimeStamp; UserName = e.UserName; PartitionKey = e.LoggerName; RowKey = MakeRowKey(e); } private static string MakeRowKey(LoggingEvent loggingEvent) { return string.Format("{0}.{1}", loggingEvent.TimeStamp.ToString("yyyy_MM_dd_HH_mm_ss_fffffff", DateTimeFormatInfo.InvariantInfo), Guid.NewGuid().ToString().ToLower()); } public string UserName { get; set; } public DateTime TimeStamp { get; set; } public string ThreadName { get; set; } public string Message { get; set; } public string Properties { get; set; } public string LoggerName { get; set; } public Level Level { get; set; } public string Identity { get; set; } public string Domain { get; set; } } }
mit
C#
a7ed373d784fa30215ee18ce403a346daefd4ce9
Add support for vscode install via snap
droyad/Assent
src/Assent/Reporters/DiffPrograms/VsCodeDiffProgram.cs
src/Assent/Reporters/DiffPrograms/VsCodeDiffProgram.cs
using System; using System.Collections.Generic; using System.Linq; namespace Assent.Reporters.DiffPrograms { public class VsCodeDiffProgram : DiffProgramBase { static VsCodeDiffProgram() { var paths = new List<string>(); if (DiffReporter.IsWindows) { paths.AddRange(WindowsProgramFilePaths .Select(p => $@"{p}\Microsoft VS Code\Code.exe") .ToArray()); } else { paths.Add("/usr/local/bin/code"); paths.Add("/snap/bin/code"); } DefaultSearchPaths = paths; } public static readonly IReadOnlyList<string> DefaultSearchPaths; public VsCodeDiffProgram() : base(DefaultSearchPaths) { } public VsCodeDiffProgram(IReadOnlyList<string> searchPaths) : base(searchPaths) { } protected override string CreateProcessStartArgs(string receivedFile, string approvedFile) { return $"--diff --wait --new-window \"{receivedFile}\" \"{approvedFile}\""; } } }
using System; using System.Collections.Generic; using System.Linq; namespace Assent.Reporters.DiffPrograms { public class VsCodeDiffProgram : DiffProgramBase { static VsCodeDiffProgram() { var paths = new List<string>(); if (DiffReporter.IsWindows) { paths.AddRange(WindowsProgramFilePaths .Select(p => $@"{p}\Microsoft VS Code\Code.exe") .ToArray()); } else { paths.Add("/usr/local/bin/code"); } DefaultSearchPaths = paths; } public static readonly IReadOnlyList<string> DefaultSearchPaths; public VsCodeDiffProgram() : base(DefaultSearchPaths) { } public VsCodeDiffProgram(IReadOnlyList<string> searchPaths) : base(searchPaths) { } protected override string CreateProcessStartArgs(string receivedFile, string approvedFile) { return $"--diff --wait --new-window \"{receivedFile}\" \"{approvedFile}\""; } } }
mit
C#
3fe3f861a92c0a50c169f778a80ed7b861befe7a
Convert NameHint comment to a map, and parse the value
kamsar/Rainbow
src/Rainbow.Storage.Yaml/OutputModel/YamlFieldValue.cs
src/Rainbow.Storage.Yaml/OutputModel/YamlFieldValue.cs
using System; using Rainbow.Formatting.FieldFormatters; using Rainbow.Model; namespace Rainbow.Storage.Yaml.OutputModel { public class YamlFieldValue : IComparable<YamlFieldValue> { public Guid Id { get; set; } public string NameHint { get; set; } public string Type { get; set; } public string Value { get; set; } public Guid? BlobId { get; set; } public int CompareTo(YamlFieldValue other) { return Id.CompareTo(other.Id); } public void LoadFrom(IItemFieldValue field, IFieldFormatter[] formatters) { Id = field.FieldId; NameHint = field.NameHint; BlobId = field.BlobId; string value = field.Value; foreach(var formatter in formatters) { if (formatter.CanFormat(field)) { value = formatter.Format(field); Type = field.FieldType; break; } } Value = value; } public void WriteYaml(YamlWriter writer) { writer.WriteBeginListItem("ID", Id.ToString("D")); if (!string.IsNullOrWhiteSpace(NameHint)) { writer.WriteMap("Hint", NameHint); } if(BlobId.HasValue) writer.WriteMap("BlobID", BlobId.Value.ToString("D")); if(Type != null) writer.WriteMap("Type", Type); writer.WriteMap("Value", Value); } public bool ReadYaml(YamlReader reader) { var id = reader.PeekMap(); if (!id.HasValue) { return false; } var key = id.Value.Key; if (!key.Equals("ID", StringComparison.Ordinal)) { if (key.Equals("Languages", StringComparison.Ordinal) || key.Equals("Language", StringComparison.Ordinal) || key.Equals("Version")) return false; throw new FormatException(reader.CreateErrorMessage("Cannot read field value. Expected 'ID' map, found '" + id.Value.Key + "' instead.")); } Id = reader.ReadExpectedGuidMap("ID"); var hint = reader.PeekMap(); if (hint.HasValue && hint.Value.Key.Equals("Hint")) { NameHint = reader.ReadExpectedMap("Hint"); } var blob = reader.PeekMap(); if (blob.HasValue && blob.Value.Key.Equals("BlobID")) { BlobId = reader.ReadExpectedGuidMap("BlobID"); } var type = reader.PeekMap(); if (type.HasValue && type.Value.Key.Equals("Type")) { reader.ReadMap(); Type = type.Value.Value; } Value = reader.ReadExpectedMap("Value"); return true; } } }
using System; using Rainbow.Formatting.FieldFormatters; using Rainbow.Model; namespace Rainbow.Storage.Yaml.OutputModel { public class YamlFieldValue : IComparable<YamlFieldValue> { public Guid Id { get; set; } public string NameHint { get; set; } public string Type { get; set; } public string Value { get; set; } public Guid? BlobId { get; set; } public int CompareTo(YamlFieldValue other) { return Id.CompareTo(other.Id); } public void LoadFrom(IItemFieldValue field, IFieldFormatter[] formatters) { Id = field.FieldId; NameHint = field.NameHint; BlobId = field.BlobId; string value = field.Value; foreach(var formatter in formatters) { if (formatter.CanFormat(field)) { value = formatter.Format(field); Type = field.FieldType; break; } } Value = value; } public void WriteYaml(YamlWriter writer) { writer.WriteBeginListItem("ID", Id.ToString("D")); if (!string.IsNullOrWhiteSpace(NameHint)) { writer.WriteComment(NameHint); } if(BlobId.HasValue) writer.WriteMap("BlobID", BlobId.Value.ToString("D")); if(Type != null) writer.WriteMap("Type", Type); writer.WriteMap("Value", Value); } public bool ReadYaml(YamlReader reader) { var id = reader.PeekMap(); if (!id.HasValue) { return false; } var key = id.Value.Key; if (!key.Equals("ID", StringComparison.Ordinal)) { if (key.Equals("Languages", StringComparison.Ordinal) || key.Equals("Language", StringComparison.Ordinal) || key.Equals("Version")) return false; throw new FormatException(reader.CreateErrorMessage("Cannot read field value. Expected 'ID' map, found '" + id.Value.Key + "' instead.")); } Id = reader.ReadExpectedGuidMap("ID"); var blob = reader.PeekMap(); if (blob.HasValue && blob.Value.Key.Equals("BlobID")) { BlobId = reader.ReadExpectedGuidMap("BlobID"); } var type = reader.PeekMap(); if (type.HasValue && type.Value.Key.Equals("Type")) { reader.ReadMap(); Type = type.Value.Value; } Value = reader.ReadExpectedMap("Value"); return true; } } }
mit
C#
eb5e7402c3b86a4ce19243aaf678d8206c16edf3
Remove obsolete method in `ModAutoplay`
smoogipoo/osu,NeoAdonis/osu,peppy/osu,ppy/osu,NeoAdonis/osu,peppy/osu,peppy/osu,smoogipoo/osu,NeoAdonis/osu,smoogipooo/osu,ppy/osu,ppy/osu,smoogipoo/osu
osu.Game/Rulesets/Mods/ModAutoplay.cs
osu.Game/Rulesets/Mods/ModAutoplay.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Graphics.Sprites; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Replays; using osu.Game.Scoring; namespace osu.Game.Rulesets.Mods { public abstract class ModAutoplay : Mod, IApplicableFailOverride, ICreateReplay { public override string Name => "Autoplay"; public override string Acronym => "AT"; public override IconUsage? Icon => OsuIcon.ModAuto; public override ModType Type => ModType.Automation; public override string Description => "Watch a perfect automated play through the song."; public override double ScoreMultiplier => 1; public bool PerformFail() => false; public bool RestartOnFail => false; public override bool UserPlayable => false; public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModFailCondition), typeof(ModNoFail) }; public override bool HasImplementation => GetType().GenericTypeArguments.Length == 0; public virtual Score CreateReplayScore(IBeatmap beatmap, IReadOnlyList<Mod> mods) => new Score { Replay = new Replay() }; } }
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Graphics.Sprites; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Replays; using osu.Game.Scoring; namespace osu.Game.Rulesets.Mods { public abstract class ModAutoplay : Mod, IApplicableFailOverride, ICreateReplay { public override string Name => "Autoplay"; public override string Acronym => "AT"; public override IconUsage? Icon => OsuIcon.ModAuto; public override ModType Type => ModType.Automation; public override string Description => "Watch a perfect automated play through the song."; public override double ScoreMultiplier => 1; public bool PerformFail() => false; public bool RestartOnFail => false; public override bool UserPlayable => false; public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModFailCondition), typeof(ModNoFail) }; public override bool HasImplementation => GetType().GenericTypeArguments.Length == 0; [Obsolete("Use the mod-supporting override")] // can be removed 20210731 public virtual Score CreateReplayScore(IBeatmap beatmap) => new Score { Replay = new Replay() }; #pragma warning disable 618 public virtual Score CreateReplayScore(IBeatmap beatmap, IReadOnlyList<Mod> mods) => CreateReplayScore(beatmap); #pragma warning restore 618 } }
mit
C#
b317e257aac9965dfbf36a36049e5c403776cf5c
decrease car count on it's destroyed
shenchi/traffic_control_game
Assets/Scripts/GamePlay.cs
Assets/Scripts/GamePlay.cs
using UnityEngine; using System.Collections; /// <summary> /// Overall control /// </summary> public class GamePlay : MonoBehaviour { public static GamePlay Instance { get; private set; } /// <summary> /// The main camera in the scene /// </summary> public Camera m_Camera; /// <summary> /// Time duration for eath level /// </summary> public float RoundTime; /// <summary> /// LayerMask for objects that response to user clicks /// </summary> public LayerMask m_LayerMaskForClick; /// <summary> /// A list of car spawn points in the level /// </summary> public GameObject[] spawner; /// <summary> /// The maximum amount of cars in game at a given time /// </summary> public int maxCarCount = 0; /// <summary> /// The top number of cars for each level (so that at one time the maximum amount of cars won't increase) /// </summary> public int topCarCount = 30; /// <summary> /// The number of cars currently in the level /// </summary> public int carCount = 0; /// <summary> /// The number of spawners /// </summary> public int spawnerCount; void Awake() { Instance = this; DontDestroyOnLoad(gameObject); spawner = GameObject.FindGameObjectsWithTag("spawner"); } void Start() { spawnerCount = spawner.Length; Random.InitState((int)Time.time); } void Update() { if (Input.GetMouseButtonUp(0)) { Ray ray = m_Camera.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; if (Physics.Raycast(ray, out hitInfo, float.MaxValue, m_LayerMaskForClick)) { TrafficLight trafficLight = hitInfo.transform.GetComponent<TrafficLight>(); if (null != trafficLight) { trafficLight.Switch(); } } } if (maxCarCount <= topCarCount) { maxCarCount = (int)Time.realtimeSinceStartup; } if(carCount <= maxCarCount) { spawner[(int)Random.Range(0, spawnerCount - 0.1f)].GetComponent<VehicleSpawner>().spawnVehicle(); carCount++; } print("maxCarCount: " + maxCarCount + " carCount" + carCount); } public void OnVehicleDestoried() { carCount--; } }
using UnityEngine; using System.Collections; /// <summary> /// Overall control /// </summary> public class GamePlay : MonoBehaviour { public static GamePlay Instance { get; private set; } /// <summary> /// The main camera in the scene /// </summary> public Camera m_Camera; /// <summary> /// Time duration for eath level /// </summary> public float RoundTime; /// <summary> /// LayerMask for objects that response to user clicks /// </summary> public LayerMask m_LayerMaskForClick; /// <summary> /// A list of car spawn points in the level /// </summary> public GameObject[] spawner; /// <summary> /// The maximum amount of cars in game at a given time /// </summary> public int maxCarCount = 0; /// <summary> /// The top number of cars for each level (so that at one time the maximum amount of cars won't increase) /// </summary> public int topCarCount = 30; /// <summary> /// The number of cars currently in the level /// </summary> public int carCount = 0; /// <summary> /// The number of spawners /// </summary> public int spawnerCount; void Awake() { Instance = this; DontDestroyOnLoad(gameObject); spawner = GameObject.FindGameObjectsWithTag("spawner"); } void Start() { spawnerCount = spawner.Length; Random.InitState((int)Time.time); } void Update() { if (Input.GetMouseButtonUp(0)) { Ray ray = m_Camera.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; if (Physics.Raycast(ray, out hitInfo, float.MaxValue, m_LayerMaskForClick)) { TrafficLight trafficLight = hitInfo.transform.GetComponent<TrafficLight>(); if (null != trafficLight) { trafficLight.Switch(); } } } if (maxCarCount <= topCarCount) { maxCarCount = (int)Time.realtimeSinceStartup; } if(carCount <= maxCarCount) { spawner[(int)Random.Range(0, spawnerCount - 0.1f)].GetComponent<VehicleSpawner>().spawnVehicle(); carCount++; } print("maxCarCount: " + maxCarCount + " carCount" + carCount); } public void OnVehicleDestoried() { } }
mit
C#
e79fd665f146589e319d6dcf6d0c75b3146fa872
Cover Ensure class
aritters/Ritter,arsouza/Aritter,arsouza/Aritter
tests/Infra.Crosscutting.Tests/Ensuring/Ensure_That.cs
tests/Infra.Crosscutting.Tests/Ensuring/Ensure_That.cs
using System; using FluentAssertions; using Xunit; namespace Ritter.Infra.Crosscutting.Tests.Ensuring { public class Ensure_That { [Fact] public void ThrowExceptionGivenFalse() { Action act = () => Ensure.That(false); act.Should().Throw<Exception>().And.Message.Should().Be(""); } [Fact] public void ThrowExceptionGivenFalseAndNotEmptyMessage() { Action act = () => Ensure.That(false, "Test"); act.Should().Throw<Exception>().And.Message.Should().Be("Test"); } [Fact] public void EnsureGivenTrue() { Action act = () => Ensure.That(true); act.Should().NotThrow<Exception>(); } [Fact] public void EnsureGivenTrueAndNotEmptyMessage() { Action act = () => Ensure.That(true, "Test"); act.Should().NotThrow<Exception>(); } [Fact] public void ThrowExceptionGivenFalsePredicate() { Action act = () => Ensure.That(() => false); act.Should().Throw<Exception>().And.Message.Should().Be(""); } [Fact] public void ThrowExceptionGivenFalsePredicateAndNotEmptyMessage() { Action act = () => Ensure.That(() => false, "Test"); act.Should().Throw<Exception>().And.Message.Should().Be("Test"); } [Fact] public void EnsureGivenTruePredicate() { Action act = () => Ensure.That(() => true); act.Should().NotThrow<Exception>(); } [Fact] public void EnsureGivenTruePredicateAndNotEmptyMessage() { Action act = () => Ensure.That(() => true, "Test"); act.Should().NotThrow<Exception>(); } } }
using FluentAssertions; using System; using Xunit; namespace Ritter.Infra.Crosscutting.Tests.Ensuring { public class Ensure_That { [Fact] public void ThrowExceptionGivenFalse() { Action act = () => Ensure.That(false); act.Should().Throw<Exception>().And.Message.Should().Be(""); } [Fact] public void ThrowExceptionGivenFalseAndNotEmptyMessage() { Action act = () => Ensure.That(false, "Test"); act.Should().Throw<Exception>().And.Message.Should().Be("Test"); } [Fact] public void EnsureGivenTrue() { Action act = () => Ensure.That(true); act.Should().NotThrow<Exception>(); } [Fact] public void EnsureGivenTrueAndNotEmptyMessage() { Action act = () => Ensure.That(true, "Test"); act.Should().NotThrow<Exception>(); } } }
mit
C#
d88eb3de5f6c831acdbc9033b0092f3f6cade28e
test for gtalk integration
int32at/utils
src/Tests/ConfigTests.cs
src/Tests/ConfigTests.cs
using System; using int32.Utils.Configuration; using int32.Utils.Extensions; using NUnit.Framework; namespace Tests { [TestFixture] public class ConfigTests { [TestCase] public void Config_Create_Object() { var config = new Config(); Assert.IsNotNull(config); } [TestCase] public void Config_GetAndSet_Simple() { const int expected = 3; var config = new Config(); config.Set(new ConfigEntry("MyKey", expected)); Assert.AreEqual(expected, config.Get<int>("MyKey")); Assert.AreEqual(expected, config["MyKey"].As<int>()); } [TestCase] public void Config_GetAndSet_NotFound() { const int expected = 3; var config = new Config(); config.Set(new ConfigEntry("MyKey", expected)); Assert.Throws<ArgumentNullException>(() => config.Get<int>("MyKey1")); } [TestCase] public void Config_GetAndSet_Remove() { const int expected = 3; var config = new Config(); config.Set(new ConfigEntry("MyKey", expected)); Assert.AreEqual(expected, config.Get<int>("MyKey")); config.Remove("MyKey"); Assert.Throws<ArgumentNullException>(() => config.Get<int>("MyKey")); } [TestCase] public void Config_LoadFrom_ConfigManager() { //load the app config file var cfg = Config.Create(); Assert.Greater(cfg.Count, 0); } } }
using System; using int32.Utils.Configuration; using int32.Utils.Extensions; using NUnit.Framework; namespace Tests { [TestFixture] public class ConfigTests { [TestCase] public void Config_Create_Object() { var config = new Config(); Assert.IsNotNull(config); } [TestCase] public void Config_GetAndSet_Simple() { const int expected = 3; var config = new Config(); config.Set(new ConfigEntry("MyKey", expected)); Assert.AreEqual(expected, config.Get<int>("MyKey")); Assert.AreEqual(expected, config["MyKey"].As<int>()); } [TestCase] public void Config_GetAndSet_NotFound() { const int expected = 3; var config = new Config(); config.Set(new ConfigEntry("MyKey", expected)); Assert.Throws<ArgumentNullException>(() => config.Get<int>("MyKey1")); } [TestCase] public void Config_GetAndSet_Remove() { const int expected = 3; var config = new Config(); config.Set(new ConfigEntry("MyKey", expected)); Assert.AreEqual(expected, config.Get<int>("MyKey")); config.Remove("MyKey"); Assert.Throws<ArgumentNullException>(() => config.Get<int>("MyKey")); } [TestCase] public void Config_LoadFrom_ConfigManager() { //load the app config file var cfg = Config.Create(); Assert.Greater(cfg.Count, 0); } } }
mit
C#
ee5c4b563f0f9be715188d123a4bed3eddc8ae82
delete japanese language
Codeer-Software/Friendly.XamControls
Project/Friendly.XamControls/Properties/AssemblyInfo.cs
Project/Friendly.XamControls/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Friendly.XamControls")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Friendly.XamControls")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("e1191c67-8b5f-410b-b870-951c0870927d")] [assembly: AssemblyVersion("0.0.0.1")] [assembly: AssemblyFileVersion("0.0.0.1")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 // アセンブリに関連付けられている情報を変更するには、 // これらの属性値を変更してください。 [assembly: AssemblyTitle("Friendly.XamControls")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Friendly.XamControls")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 // その型の ComVisible 属性を true に設定してください。 [assembly: ComVisible(false)] // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です [assembly: Guid("e1191c67-8b5f-410b-b870-951c0870927d")] // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: // // Major Version // Minor Version // Build Number // Revision // // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.1")] [assembly: AssemblyFileVersion("0.0.0.1")]
apache-2.0
C#
c42dcd9133684e0697b5564ea3d786d8f48d40ba
update version
prodot/ReCommended-Extension
Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
using System.Reflection; using ReCommendedExtension; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle(ZoneMarker.ExtensionName)] [assembly: AssemblyDescription(ZoneMarker.ExtensionDescription)] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("prodot GmbH")] [assembly: AssemblyProduct(ZoneMarker.ExtensionId)] [assembly: AssemblyCopyright("© 2012-2021 prodot GmbH")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("5.5.5.0")] [assembly: AssemblyFileVersion("5.5.5")]
using System.Reflection; using ReCommendedExtension; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle(ZoneMarker.ExtensionName)] [assembly: AssemblyDescription(ZoneMarker.ExtensionDescription)] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("prodot GmbH")] [assembly: AssemblyProduct(ZoneMarker.ExtensionId)] [assembly: AssemblyCopyright("© 2012-2021 prodot GmbH")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("5.5.4.0")] [assembly: AssemblyFileVersion("5.5.4")]
apache-2.0
C#
de1b2ce9da6a18c2570728b62ef99782a1d0d59c
Add ignore route for favicon
JeremySkinner/git-dot-aspx,kaa/git-dot-aspx,kaa/git-dot-aspx,linquize/git-dot-aspx,akrisiun/git-dot-aspx,linquize/git-dot-aspx,JeremySkinner/git-dot-aspx,akrisiun/git-dot-aspx,hafstrom/git-dot-aspx,kaa/git-dot-aspx,hafstrom/git-dot-aspx,hafstrom/git-dot-aspx,JeremySkinner/git-dot-aspx,akrisiun/git-dot-aspx,linquize/git-dot-aspx
GitAspx/Global.asax.cs
GitAspx/Global.asax.cs
namespace GitAspx { using System; using System.Web; using System.Web.Mvc; using System.Web.Routing; using GitAspx.Lib; using StructureMap; using StructureMap.Configuration.DSL; public class MvcApplication : HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("favicon.ico"); routes.MapRoute("DirectoryList", "", new {controller = "DirectoryList", action = "Index"}); routes.MapRoute("info-refs", "{project}/info/refs", new {controller = "InfoRefs", action = "Execute"}, new {method = new HttpMethodConstraint("GET")}); routes.MapRoute("upload-pack", "{project}/git-upload-pack", new {controller = "Rpc", action = "UploadPack"}, new {method = new HttpMethodConstraint("POST")}); routes.MapRoute("receive-pack", "{project}/git-receive-pack", new {controller = "Rpc", action = "ReceivePack"}, new {method = new HttpMethodConstraint("POST")}); routes.MapRoute("project", "{project}"); } protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); ObjectFactory.Initialize(cfg => cfg.AddRegistry(new AppRegistry())); ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory()); } private class AppRegistry : Registry { public AppRegistry() { For<AppSettings>() .Singleton() .Use(AppSettings.FromAppConfig); } } } }
namespace GitAspx { using System.Web; using System.Web.Mvc; using System.Web.Routing; using GitAspx.Lib; using StructureMap; using StructureMap.Configuration.DSL; public class MvcApplication : HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute("DirectoryList", "", new {controller = "DirectoryList", action = "Index"}); routes.MapRoute("info-refs", "{project}/info/refs", new {controller = "InfoRefs", action = "Execute"}, new {method = new HttpMethodConstraint("GET")}); routes.MapRoute("upload-pack", "{project}/git-upload-pack", new {controller = "Rpc", action = "UploadPack"}, new {method = new HttpMethodConstraint("POST")}); routes.MapRoute("receive-pack", "{project}/git-receive-pack", new {controller = "Rpc", action = "ReceivePack"}, new {method = new HttpMethodConstraint("POST")}); routes.MapRoute("project", "{project}"); } protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); ObjectFactory.Initialize(cfg => cfg.AddRegistry(new AppRegistry())); ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory()); } private class AppRegistry : Registry { public AppRegistry() { For<AppSettings>() .Singleton() .Use(AppSettings.FromAppConfig); } } } }
apache-2.0
C#
ed1108cc64c680df3d93ea9fb93f4ccb010bb2b4
bump version
distantcam/Anotar,mstyura/Anotar,modulexcite/Anotar,Fody/Anotar
CommonAssemblyInfo.cs
CommonAssemblyInfo.cs
using System.Reflection; [assembly: AssemblyTitle("Anotar")] [assembly: AssemblyProduct("Anotar")] [assembly: AssemblyVersion("1.8.1.0")] [assembly: AssemblyFileVersion("1.8.1.0")]
using System.Reflection; [assembly: AssemblyTitle("Anotar")] [assembly: AssemblyProduct("Anotar")] [assembly: AssemblyVersion("1.8.0.0")] [assembly: AssemblyFileVersion("1.8.0.0")]
mit
C#
ed15c8b7680373929ed3f257de9c761e05e17191
fix version
Fody/EmptyConstructor
CommonAssemblyInfo.cs
CommonAssemblyInfo.cs
using System.Reflection; [assembly: AssemblyTitle("EmptyConstructor")] [assembly: AssemblyProduct("EmptyConstructor")] [assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyFileVersion("0.1.0.0")]
using System.Reflection; [assembly: AssemblyTitle("EmptyConstructor")] [assembly: AssemblyProduct("EmptyConstructor")] [assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyFileVersion("1.1.0.0")]
mit
C#
cac86181b7aac98713d056d2a7ffb56e7e0829ae
implement VerbAttribute
dimaaan/NOpt
NOpt/VerbAttribute.cs
NOpt/VerbAttribute.cs
using System; namespace NOpt { /// <summary> /// A command to execute. /// Verb must be first argument. /// <example> /// "git commit". Commit is a verb. /// Other examples: /// program save -f file /// program load -f file /// "save" and "load" is a verbs /// </example> /// </summary> [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)] public sealed class VerbAttribute : Attribute { public VerbAttribute(string name) { Name = name; } public string Name { get; set; } } }
using System; namespace NOpt { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)] public sealed class VerbAttribute : Attribute { } }
mit
C#
07296c1f3cc75d396b959ce25a57edceeaa45f41
Update Exercise8A.cs
lizaamini/CSharpExercises
Sheet-8/Exercise8A.cs
Sheet-8/Exercise8A.cs
using System; namespace Exercise8A { class MainClass { public static void Main (string[] args) { Console.WriteLine ("Please enter a sentence: "); String input = Console.ReadLine (); input = removeSpaces (input); input = reverseSentence (input); input = toggleCase (input); Console.WriteLine (input); } public static String reverseSentence(String sentence) { char[] reversedSentence = sentence.ToCharArray (); Array.Reverse (reversedSentence); return new string (reversedSentence); } public static String removeSpaces(String sentence) { sentence = sentence.Replace (" ", ""); return sentence; } public static String toggleCase(String sentence) { String toggledSentence = ""; char[] charArray = sentence.ToCharArray (); for (int i = 0; i < charArray.Length; i++) { if (i % 2 == 0) toggledSentence += Char.ToUpper (charArray[i]); else toggledSentence += Char.ToLower (charArray[i]); } return toggledSentence; } } }
mit
C#
cb102f3435f94ce84d740cd2ea38abe6cce3c650
Remove unused property
z4kn4fein/stashbox
src/Exceptions/CompositionRootNotFoundException.cs
src/Exceptions/CompositionRootNotFoundException.cs
using System; using System.Reflection; #if HAS_SERIALIZABLE using System.Runtime.Serialization; #endif namespace Stashbox.Exceptions { /// <summary> /// Occurs when composing requested but no <see cref="ICompositionRoot"/> is present in the given assembly. /// </summary> #if HAS_SERIALIZABLE [Serializable] #endif public class CompositionRootNotFoundException : Exception { /// <summary> /// Constructs a <see cref="CompositionRootNotFoundException"/>. /// </summary> /// <param name="assembly">The scanned assembly.</param> /// <param name="innerException">The inner exception.</param> public CompositionRootNotFoundException(Assembly assembly, Exception innerException = null) : base($"No ICompositionRoot found in the given assembly: {assembly.FullName}.", innerException) { } #if HAS_SERIALIZABLE /// <inheritdoc /> protected CompositionRootNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } #endif } }
using System; using System.Reflection; #if HAS_SERIALIZABLE using System.Runtime.Serialization; #endif namespace Stashbox.Exceptions { /// <summary> /// Occurs when composing requested but no <see cref="ICompositionRoot"/> is present in the given assembly. /// </summary> #if HAS_SERIALIZABLE [Serializable] #endif public class CompositionRootNotFoundException : Exception { /// <summary> /// The scanned assembly. /// </summary> public Assembly Assembly { get; } /// <summary> /// Constructs a <see cref="CompositionRootNotFoundException"/>. /// </summary> /// <param name="assembly">The scanned assembly.</param> /// <param name="innerException">The inner exception.</param> public CompositionRootNotFoundException(Assembly assembly, Exception innerException = null) : base($"No ICompositionRoot found in the given assembly: {assembly.FullName}.", innerException) { this.Assembly = assembly; } #if HAS_SERIALIZABLE /// <inheritdoc /> protected CompositionRootNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } #endif } }
mit
C#
97247b7a673fa552b9f8f5b66aa87e9dfe2293c0
Fix unset key
peppy/osu,NeoAdonis/osu,NeoAdonis/osu,smoogipoo/osu,peppy/osu-new,smoogipoo/osu,ppy/osu,smoogipooo/osu,peppy/osu,smoogipoo/osu,NeoAdonis/osu,UselessToucan/osu,ppy/osu,UselessToucan/osu,ppy/osu,UselessToucan/osu,peppy/osu
osu.Game/Online/Multiplayer/MultiplayerRoomSettings.cs
osu.Game/Online/Multiplayer/MultiplayerRoomSettings.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable enable using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using MessagePack; using osu.Game.Online.API; namespace osu.Game.Online.Multiplayer { [Serializable] [MessagePackObject] public class MultiplayerRoomSettings : IEquatable<MultiplayerRoomSettings> { [Key(0)] public int BeatmapID { get; set; } [Key(1)] public int RulesetID { get; set; } [Key(2)] public string BeatmapChecksum { get; set; } = string.Empty; [Key(3)] public string Name { get; set; } = "Unnamed room"; [NotNull] [Key(4)] public IEnumerable<APIMod> Mods { get; set; } = Enumerable.Empty<APIMod>(); [NotNull] [Key(5)] public IEnumerable<APIMod> AllowedMods { get; set; } = Enumerable.Empty<APIMod>(); public bool Equals(MultiplayerRoomSettings other) => BeatmapID == other.BeatmapID && BeatmapChecksum == other.BeatmapChecksum && Mods.SequenceEqual(other.Mods) && AllowedMods.SequenceEqual(other.AllowedMods) && RulesetID == other.RulesetID && Name.Equals(other.Name, StringComparison.Ordinal); public override string ToString() => $"Name:{Name}" + $" Beatmap:{BeatmapID} ({BeatmapChecksum})" + $" Mods:{string.Join(',', Mods)}" + $" AllowedMods:{string.Join(',', AllowedMods)}" + $" Ruleset:{RulesetID}"; } }
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable enable using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using MessagePack; using osu.Game.Online.API; namespace osu.Game.Online.Multiplayer { [Serializable] [MessagePackObject] public class MultiplayerRoomSettings : IEquatable<MultiplayerRoomSettings> { [Key(0)] public int BeatmapID { get; set; } [Key(1)] public int RulesetID { get; set; } [Key(2)] public string BeatmapChecksum { get; set; } = string.Empty; [Key(3)] public string Name { get; set; } = "Unnamed room"; [NotNull] [Key(4)] public IEnumerable<APIMod> Mods { get; set; } = Enumerable.Empty<APIMod>(); [NotNull] public IEnumerable<APIMod> AllowedMods { get; set; } = Enumerable.Empty<APIMod>(); public bool Equals(MultiplayerRoomSettings other) => BeatmapID == other.BeatmapID && BeatmapChecksum == other.BeatmapChecksum && Mods.SequenceEqual(other.Mods) && AllowedMods.SequenceEqual(other.AllowedMods) && RulesetID == other.RulesetID && Name.Equals(other.Name, StringComparison.Ordinal); public override string ToString() => $"Name:{Name}" + $" Beatmap:{BeatmapID} ({BeatmapChecksum})" + $" Mods:{string.Join(',', Mods)}" + $" AllowedMods:{string.Join(',', AllowedMods)}" + $" Ruleset:{RulesetID}"; } }
mit
C#
053175a5a6fc017cde833ec308e723a286d6ed0b
Fix http://issues.umbraco.org/issue/U4-9562
tcmorris/Umbraco-CMS,abjerner/Umbraco-CMS,hfloyd/Umbraco-CMS,rasmuseeg/Umbraco-CMS,JeffreyPerplex/Umbraco-CMS,abjerner/Umbraco-CMS,abryukhov/Umbraco-CMS,umbraco/Umbraco-CMS,abjerner/Umbraco-CMS,tcmorris/Umbraco-CMS,mattbrailsford/Umbraco-CMS,WebCentrum/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,robertjf/Umbraco-CMS,bjarnef/Umbraco-CMS,leekelleher/Umbraco-CMS,hfloyd/Umbraco-CMS,rasmuseeg/Umbraco-CMS,tcmorris/Umbraco-CMS,hfloyd/Umbraco-CMS,WebCentrum/Umbraco-CMS,NikRimington/Umbraco-CMS,tompipe/Umbraco-CMS,bjarnef/Umbraco-CMS,marcemarc/Umbraco-CMS,abryukhov/Umbraco-CMS,arknu/Umbraco-CMS,arknu/Umbraco-CMS,aadfPT/Umbraco-CMS,tompipe/Umbraco-CMS,marcemarc/Umbraco-CMS,mattbrailsford/Umbraco-CMS,leekelleher/Umbraco-CMS,dawoe/Umbraco-CMS,aadfPT/Umbraco-CMS,lars-erik/Umbraco-CMS,madsoulswe/Umbraco-CMS,dawoe/Umbraco-CMS,PeteDuncanson/Umbraco-CMS,aaronpowell/Umbraco-CMS,aadfPT/Umbraco-CMS,tcmorris/Umbraco-CMS,kgiszewski/Umbraco-CMS,nul800sebastiaan/Umbraco-CMS,base33/Umbraco-CMS,tcmorris/Umbraco-CMS,aaronpowell/Umbraco-CMS,jchurchley/Umbraco-CMS,nul800sebastiaan/Umbraco-CMS,mattbrailsford/Umbraco-CMS,hfloyd/Umbraco-CMS,marcemarc/Umbraco-CMS,KevinJump/Umbraco-CMS,madsoulswe/Umbraco-CMS,lars-erik/Umbraco-CMS,abryukhov/Umbraco-CMS,KevinJump/Umbraco-CMS,bjarnef/Umbraco-CMS,lars-erik/Umbraco-CMS,marcemarc/Umbraco-CMS,aaronpowell/Umbraco-CMS,arknu/Umbraco-CMS,dawoe/Umbraco-CMS,marcemarc/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,rasmuseeg/Umbraco-CMS,robertjf/Umbraco-CMS,bjarnef/Umbraco-CMS,base33/Umbraco-CMS,madsoulswe/Umbraco-CMS,jchurchley/Umbraco-CMS,tcmorris/Umbraco-CMS,kgiszewski/Umbraco-CMS,leekelleher/Umbraco-CMS,NikRimington/Umbraco-CMS,NikRimington/Umbraco-CMS,lars-erik/Umbraco-CMS,PeteDuncanson/Umbraco-CMS,hfloyd/Umbraco-CMS,KevinJump/Umbraco-CMS,base33/Umbraco-CMS,leekelleher/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,lars-erik/Umbraco-CMS,nul800sebastiaan/Umbraco-CMS,dawoe/Umbraco-CMS,robertjf/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,umbraco/Umbraco-CMS,robertjf/Umbraco-CMS,JeffreyPerplex/Umbraco-CMS,jchurchley/Umbraco-CMS,tompipe/Umbraco-CMS,dawoe/Umbraco-CMS,JeffreyPerplex/Umbraco-CMS,mattbrailsford/Umbraco-CMS,abryukhov/Umbraco-CMS,WebCentrum/Umbraco-CMS,abjerner/Umbraco-CMS,umbraco/Umbraco-CMS,robertjf/Umbraco-CMS,KevinJump/Umbraco-CMS,arknu/Umbraco-CMS,leekelleher/Umbraco-CMS,KevinJump/Umbraco-CMS,PeteDuncanson/Umbraco-CMS,umbraco/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,kgiszewski/Umbraco-CMS
src/Umbraco.Web/HealthCheck/HealthCheckResolver.cs
src/Umbraco.Web/HealthCheck/HealthCheckResolver.cs
using System; using System.Collections.Generic; using System.Web; using Umbraco.Core.Logging; using Umbraco.Core.ObjectResolution; namespace Umbraco.Web.HealthCheck { /// <summary> /// Resolves all health check instances /// </summary> /// <remarks> /// Each instance scoped to the lifespan of the http request /// </remarks> public class HealthCheckResolver : LazyManyObjectsResolverBase<HealthCheckResolver, HealthCheck>, IHealthCheckResolver { public HealthCheckResolver(ILogger logger, Func<IEnumerable<Type>> lazyTypeList) : base(new HealthCheckServiceProvider(), logger, lazyTypeList, ObjectLifetimeScope.HttpRequest) { } /// <summary> /// Returns all health check instances /// </summary> public IEnumerable<HealthCheck> HealthChecks { get { return Values; } } /// <summary> /// This will ctor the HealthCheck instances /// </summary> /// <remarks> /// This is like a super crappy DI - in v8 we have real DI /// </remarks> private class HealthCheckServiceProvider : IServiceProvider { public object GetService(Type serviceType) { var normalArgs = new[] { typeof(HealthCheckContext) }; var found = serviceType.GetConstructor(normalArgs); if (found != null) { return found.Invoke(new object[] { new HealthCheckContext(new HttpContextWrapper(HttpContext.Current), UmbracoContext.Current) }); } //use normal ctor return Activator.CreateInstance(serviceType); } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.ObjectResolution; using Umbraco.Core.Persistence.SqlSyntax; namespace Umbraco.Web.HealthCheck { /// <summary> /// Resolves all health check instances /// </summary> /// <remarks> /// Each instance scoped to the lifespan of the http request /// </remarks> internal class HealthCheckResolver : LazyManyObjectsResolverBase<HealthCheckResolver, HealthCheck>, IHealthCheckResolver { public HealthCheckResolver(ILogger logger, Func<IEnumerable<Type>> lazyTypeList) : base(new HealthCheckServiceProvider(), logger, lazyTypeList, ObjectLifetimeScope.HttpRequest) { } /// <summary> /// Returns all health check instances /// </summary> public IEnumerable<HealthCheck> HealthChecks { get { return Values; } } /// <summary> /// This will ctor the HealthCheck instances /// </summary> /// <remarks> /// This is like a super crappy DI - in v8 we have real DI /// </remarks> private class HealthCheckServiceProvider : IServiceProvider { public object GetService(Type serviceType) { var normalArgs = new[] { typeof(HealthCheckContext) }; var found = serviceType.GetConstructor(normalArgs); if (found != null) { return found.Invoke(new object[] { new HealthCheckContext(new HttpContextWrapper(HttpContext.Current), UmbracoContext.Current) }); } //use normal ctor return Activator.CreateInstance(serviceType); } } } }
mit
C#
38fefdab56e31110b535bd892cb12e13d380a73f
Change comments header
Minesweeper-6-Team-Project-Telerik/Minesweeper-6
src2/ConsoleMinesweeper/Properties/AssemblyInfo.cs
src2/ConsoleMinesweeper/Properties/AssemblyInfo.cs
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Telerik Academy"> // Teamwork Project "Minesweeper-6" // </copyright> // <summary> // AssemblyInfo.cs // </summary> // -------------------------------------------------------------------------------------------------------------------- using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ConsoleMinesweeper")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ConsoleMinesweeper")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("fce0c6ac-91a0-4252-986f-440a664c0648")] // Version information for an assembly consists of the following four values: // Major Version // Minor Version // Build Number // Revision // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company=""> // // </copyright> // <summary> // AssemblyInfo.cs // </summary> // -------------------------------------------------------------------------------------------------------------------- using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ConsoleMinesweeper")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ConsoleMinesweeper")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("fce0c6ac-91a0-4252-986f-440a664c0648")] // Version information for an assembly consists of the following four values: // Major Version // Minor Version // Build Number // Revision // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
mit
C#
412df5795756bd26fda0f3497d24a43be039b5d5
Add the extension method ToSJIS()
y-iihoshi/REIMU_Plugins_V2,y-iihoshi/REIMU_Plugins_V2
Common/StringExtensions.cs
Common/StringExtensions.cs
using System.Linq; using System.Text; namespace ReimuPlugins.Common { public static class StringExtensions { public static string ToCStr(this string str) { return str.Contains('\0') ? str : str + '\0'; } public static string Convert(this string str, Encoding src, Encoding dst) { return dst.GetString(Encoding.Convert(src, dst, src.GetBytes(str))); } public static string ToSJIS(this string str) { return str.Convert(Enc.UTF8, Enc.SJIS); } } }
using System.Linq; using System.Text; namespace ReimuPlugins.Common { public static class StringExtensions { public static string ToCStr(this string str) { return str.Contains('\0') ? str : str + '\0'; } public static string Convert(this string str, Encoding src, Encoding dst) { return dst.GetString(Encoding.Convert(src, dst, src.GetBytes(str))); } } }
bsd-2-clause
C#
e9ea56fe3d5375474069d401f5581addeb3469ea
Update TransformWalls.cs
softwarejimenez/funnyBall
Scripts/TransformWalls.cs
Scripts/TransformWalls.cs
using UnityEngine; using System.Collections; public class TransformWalls : MonoBehaviour { //declare all atribute public GameObject board; public GameObject WallsHorizontal; public GameObject WallsNorth; public GameObject WallsSouth; public GameObject WallsVertical; public GameObject WallsWest; public GameObject WallsEast; public GameObject Cylinders; public GameObject CylinderA1; public GameObject CylinderA2; public GameObject CylinderA3; public GameObject CylinderA4; public float ScaleX,ScaleZ; public float heightWalls; public float heightCylinder; // Use this for initialization. //we position and scale the elements of the main board. void Start () { //board board.transform.localPosition= new Vector3(0, 0, 0); board.transform.localScale = new Vector3(ScaleX, 1, ScaleZ); //walls //Horizontal Walls WallsHorizontal.transform.localPosition= new Vector3 (0, (heightWalls/2)-0.5F, 0); WallsHorizontal.transform.localScale = new Vector3(ScaleX, heightWalls, 1F); //North Walls float positionZ = (ScaleZ / 2) + 0.5F; WallsNorth.transform.localPosition= new Vector3 (0, 0, positionZ); WallsNorth.transform.localScale = new Vector3(1, 1, 1); //South Walls WallsSouth.transform.localPosition= new Vector3 (0, 0, -positionZ); WallsSouth.transform.localScale = new Vector3(1, 1, 1); //Vertical Walls WallsVertical.transform.localPosition= new Vector3 (0, (heightWalls/2)-0.5F, 0); WallsVertical.transform.localScale = new Vector3(1, heightWalls, ScaleZ); //west walls float positionX = (ScaleX / 2) + 0.5F; WallsWest.transform.localPosition= new Vector3 (positionX, 0,0 ); WallsWest.transform.localScale = new Vector3(1, 1, 1); //Eeast Walls WallsEast.transform.localPosition= new Vector3 (-positionX, 0,0 ); WallsEast.transform.localScale = new Vector3(1, 1, 1); //cylinders Cylinders.transform.localPosition= new Vector3 (0, (heightCylinder)-0.5F, 0); Cylinders.transform.localScale = new Vector3(1, heightCylinder, 1); CylinderA1.transform.localPosition = new Vector3 (positionX, 0, positionZ); CylinderA2.transform.localPosition = new Vector3 (-positionX, 0, positionZ); CylinderA3.transform.localPosition = new Vector3 (-positionX, 0, -positionZ); CylinderA4.transform.localPosition = new Vector3 (positionX, 0, -positionZ); } }
using UnityEngine; using System.Collections; public class TransforWalls : MonoBehaviour { public GameObject board; public GameObject WallsHorizontal; public GameObject WallsNorth; public GameObject WallsSouth; public GameObject WallsVertical; public GameObject WallsWest; public GameObject WallsEast; public GameObject CylinderA1; public GameObject CylinderA2; public GameObject CylinderA3; public GameObject CylinderA4; public float ScaleX,ScaleZ; // Use this for initialization void Start () { board.transform.localPosition= new Vector3(0, 0, 0); board.transform.localScale = new Vector3(ScaleX, 1, ScaleZ); WallsHorizontal.transform.localPosition= new Vector3 (0, 1.5F, 0); WallsHorizontal.transform.localScale = new Vector3(ScaleX, 4, 1F); float positionZ = (ScaleZ / 2) + 0.5F; WallsNorth.transform.localPosition= new Vector3 (0, 0, positionZ); WallsNorth.transform.localScale = new Vector3(1, 1, 1); WallsSouth.transform.localPosition= new Vector3 (0, 0, -positionZ); WallsSouth.transform.localScale = new Vector3(1, 1, 1); WallsVertical.transform.localPosition= new Vector3 (0, 1.5F, 0); WallsVertical.transform.localScale = new Vector3(1, 4, ScaleZ); float positionX = (ScaleX / 2) + 0.5F; WallsWest.transform.localPosition= new Vector3 (positionX, 0,0 ); WallsWest.transform.localScale = new Vector3(1, 1, 1); WallsEast.transform.localPosition= new Vector3 (-positionX, 0,0 ); WallsEast.transform.localScale = new Vector3(1, 1, 1); CylinderA1.transform.localPosition = new Vector3 (positionX, 0, positionZ); CylinderA2.transform.localPosition = new Vector3 (-positionX, 0, positionZ); CylinderA3.transform.localPosition = new Vector3 (-positionX, 0, -positionZ); CylinderA4.transform.localPosition = new Vector3 (positionX, 0, -positionZ); } // Update is called once per frame void Update () { } }
agpl-3.0
C#
167e3c09577dcbd9295dbceed5afb7dc9d487d30
Fix typo in build. We should add tests.
abock/EquifaxGuid
EquifaxGuid/EquifaxGuid.cs
EquifaxGuid/EquifaxGuid.cs
using System; namespace Equifax { /// <summary> /// Creates globally secure Equifax-style GUIDs. /// </summary> public static class Guid { /// <summary> /// Creates a new Equifax secure GUID using the current UTC time. /// UTC ensures global consistency and uniqueness. /// </summary> public static System.Guid NewGuid() => NewGuid(DateTime.UtcNow); /// <summary> /// Creates a new Equifax secure GUID from the provided time stamp, /// assumed to already have been secured for uniqueness. /// </summary> public static System.Guid NewGuid(DateTime secureTimestamp) => new System.Guid( "00000000-0000-0000-0000-00" + $"{secureTimestamp.Month:00}" + $"{secureTimestamp.Day:00}" + $"{secureTimestamp.Year % 100:00}" + $"{secureTimestamp.Hour:00}" + $"{secureTimestamp.Minute:00}"); } }
using System; namespace Equifax { /// <summary> /// Creates globally secure Equifax-style GUIDs. /// </summary> public static class Guid { /// <summary> /// Creates a new Equifax secure GUID using the current UTC time. /// UTC ensures global consistency and uniqueness. /// </summary> public static System.Guid NewGuid() => NewGuid(DateTime.UtcNow); /// <summary> /// Creates a new Equifax secure GUID from the provided time stamp, /// assumed to already have been secured for uniqueness. /// </summary> public static System.Guid NewGuid(DateTime secureTimestamp) => new System.Guid( "00000000-0000-0000-0000-00" + $"{secureTimestamp.Month:00}" + $"{secureTimestamp.Day:00}" + $"{secureTimestamp.Year % 100:00}" + $"{secureTimestamp.Hour:00}" + $"{secureTimestamp.Minute:00}");\ } }
mit
C#
6b521c6781347bb23e84e95c56130a9227a1eba0
bump version to 3.0.2
FatturaElettronicaPA/FatturaElettronicaPA.Forms
Properties/AssemblyInfo.cs
Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("FatturaElettronica.Forms")] [assembly: AssemblyDescription("Windows.Forms per FatturaElettronica.NET")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nicola Iarocci, CIR2000")] [assembly: AssemblyProduct("FatturaElettronica.Forms")] [assembly: AssemblyCopyright("Copyright © CIR2000 2017-2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a82cf38b-b7fe-42ae-b114-dc8fed8bd718")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.0.2.0")] [assembly: AssemblyFileVersion("3.0.2.0")]
using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("FatturaElettronica.Forms")] [assembly: AssemblyDescription("Windows.Forms per FatturaElettronica.NET")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nicola Iarocci, CIR2000")] [assembly: AssemblyProduct("FatturaElettronica.Forms")] [assembly: AssemblyCopyright("Copyright © CIR2000 2017-2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a82cf38b-b7fe-42ae-b114-dc8fed8bd718")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.0.0.0")] [assembly: AssemblyFileVersion("3.0.0.0")]
bsd-3-clause
C#
6a87faf65288f0ad5d1518eb8a24387b00b834c0
Bump version
nixxquality/WebMConverter,Yuisbean/WebMConverter,o11c/WebMConverter
Properties/AssemblyInfo.cs
Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("WebM for Retards")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WebM for Retards")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("88d1c5f0-e3e0-445a-8e11-a02441ab6ca8")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.15.0")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("WebM for Retards")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WebM for Retards")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("88d1c5f0-e3e0-445a-8e11-a02441ab6ca8")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.14.0")]
mit
C#
90aad3b785f4854e768922491bd7ad849fa82a18
Stop the loop when there are no subscribers
AvaloniaUI/Avalonia,Perspex/Perspex,jkoritzinsky/Avalonia,jkoritzinsky/Avalonia,AvaloniaUI/Avalonia,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,wieslawsoltes/Perspex,AvaloniaUI/Avalonia,SuperJMN/Avalonia,akrisiun/Perspex,jkoritzinsky/Avalonia,AvaloniaUI/Avalonia,jkoritzinsky/Perspex,AvaloniaUI/Avalonia,grokys/Perspex,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,Perspex/Perspex,SuperJMN/Avalonia,wieslawsoltes/Perspex,SuperJMN/Avalonia,SuperJMN/Avalonia,wieslawsoltes/Perspex,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,SuperJMN/Avalonia,AvaloniaUI/Avalonia,wieslawsoltes/Perspex,AvaloniaUI/Avalonia,jkoritzinsky/Avalonia,SuperJMN/Avalonia,grokys/Perspex,SuperJMN/Avalonia
src/Avalonia.Visuals/Rendering/SleepLoopRenderTimer.cs
src/Avalonia.Visuals/Rendering/SleepLoopRenderTimer.cs
using System; using System.Diagnostics; using System.Threading; namespace Avalonia.Rendering { public class SleepLoopRenderTimer : IRenderTimer { private Action<TimeSpan> _tick; private int _count; private readonly object _lock = new object(); private bool _running; private readonly Stopwatch _st = Stopwatch.StartNew(); private readonly TimeSpan _timeBetweenTicks; public SleepLoopRenderTimer(int fps) { _timeBetweenTicks = TimeSpan.FromSeconds(1d / fps); } public event Action<TimeSpan> Tick { add { lock (_lock) { _tick += value; _count++; if (_running) return; _running = true; new Thread(LoopProc) { IsBackground = true }.Start(); } } remove { lock (_lock) { _tick -= value; _count--; } } } void LoopProc() { var now = _st.Elapsed; var lastTick = now; while (true) { var timeTillNextTick = lastTick + _timeBetweenTicks - now; if (timeTillNextTick.TotalMilliseconds > 1) Thread.Sleep(timeTillNextTick); lock (_lock) { if (_count == 0) { _running = false; return; } } _tick?.Invoke(now); now = _st.Elapsed; } } } }
using System; using System.Diagnostics; using System.Threading; namespace Avalonia.Rendering { public class SleepLoopRenderTimer : IRenderTimer { public event Action<TimeSpan> Tick; public SleepLoopRenderTimer(int fps) { var timeBetweenTicks = TimeSpan.FromSeconds(1d / fps); new Thread(() => { var st = Stopwatch.StartNew(); var now = st.Elapsed; var lastTick = now; while (true) { var timeTillNextTick = lastTick + timeBetweenTicks - now; if (timeTillNextTick.TotalMilliseconds > 1) Thread.Sleep(timeTillNextTick); Tick?.Invoke(now); now = st.Elapsed; } }) { IsBackground = true }.Start(); } } }
mit
C#
27ef556e272dc9a97f54cb0a3a06188dd72559bb
Remove ReSharper moans from MemberFactory.
GiveCampUK/GiveCRM,GiveCampUK/GiveCRM
src/GiveCRM.BusinessLogic/ExcelImport/MemberFactory.cs
src/GiveCRM.BusinessLogic/ExcelImport/MemberFactory.cs
using System; using System.Collections.Generic; using GiveCRM.Models; namespace GiveCRM.BusinessLogic.ExcelImport { internal class MemberFactory : IMemberFactory { public Member CreateMember(IDictionary<string, object> memberData) { return DictionaryToMember.ToMember(memberData); } private static class DictionaryToMember { internal static Member ToMember(IEnumerable<KeyValuePair<string, object>> source) { var member = Activator.CreateInstance<Member>(); if (source == null) { return member; } foreach (var property in source) { member.GetType().GetProperty(property.Key).SetValue(member, property.Value, null); } return member; } } } }
using System; using System.Collections.Generic; using GiveCRM.Models; namespace GiveCRM.BusinessLogic.ExcelImport { internal class MemberFactory : IMemberFactory { public Member CreateMember(IDictionary<string, object> memberData) { return DictionaryToMember.ToMember(memberData); } internal static class DictionaryToMember { internal static Member ToMember(IDictionary<string, object> source) { var member = Activator.CreateInstance<Member>(); if (source == null) { return member; } foreach (var property in source) { member.GetType().GetProperty(property.Key).SetValue(member, property.Value, null); } return member; } } } }
mit
C#
32b99e82374700b728a0ef97d6a6380d0fa07ca0
remove unnecessary parameters in StripeChargeListOptions
weizensnake/stripe.net,weizensnake/stripe.net
src/Stripe/Services/Charges/StripeChargeListOptions.cs
src/Stripe/Services/Charges/StripeChargeListOptions.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; namespace Stripe { public class StripeChargeListOptions : StripeListOptions { [JsonProperty("customer")] public string CustomerId { get; set; } [JsonProperty("created")] public StripeDateFilter Created { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; namespace Stripe { public class StripeChargeListOptions : StripeListOptions { [JsonProperty("customer")] public string CustomerId { get; set; } [JsonProperty("created")] public StripeDateFilter Created { get; set; } [JsonProperty( "ending_before" )] public string EndingBefore { get; set; } [JsonProperty( "starting_after" )] public string StartingAfter { get; set; } [JsonProperty( "limit" )] public int? Limit { get; set; } } }
apache-2.0
C#
beb0e5f2505238cfaee13ebf7df3b3bdc578bd39
Fix typo
mattgwagner/Battery-Commander,mattgwagner/Battery-Commander,mattgwagner/Battery-Commander,mattgwagner/Battery-Commander
Battery-Commander.Web/Views/Supervisors/List.cshtml
Battery-Commander.Web/Views/Supervisors/List.cshtml
@model BatteryCommander.Web.Controllers.SupervisorsController.SupervisorListModel @{ ViewBag.Title = "Batch Update Supervisors"; } <div class="page-header"> <h1>@ViewBag.Title <span class="badge">@Model.Rows.Count</span></h1> </div> @using (Html.BeginForm("Save", "Supervisors", FormMethod.Post)) { @Html.AntiForgeryToken() @Html.HiddenFor(_ => _.Unit) <table class="table table-striped"> <thead> <tr> <th>Unit</th> <th>Soldier</th> <th>Supervisor</th> </tr> </thead> <tbody> @for (var i = 0; i < Model.Rows.Count; ++i) { <tr> <td>@Html.DisplayFor(_ => Model.Rows[i].Soldier.Unit)</td> <td> @Html.HiddenFor(_ => Model.Rows[i].SoldierId) @Html.DisplayFor(_ => Model.Rows[i].Soldier) </td> <td> @Html.DropDownListFor(_ => Model.Rows[i].SupervisorId, Model.Soldiers, "-- Select a Supervisor --", new { @class = "select2" }) </td> </tr> } </tbody> </table> <button type="submit" name="Save">Save Updates</button> }
@model BatteryCommander.Web.Controllers.SupervisorsController.SupervisorListModel @{ ViewBag.Title = "Batch Update Supervisors"; } <div class="page-header"> <h1>@ViewBag.Title <span class="badge">@Model.Rows.Count</span></h1> </div> @using (Html.BeginForm("Save", "Supervisors", FormMethod.Post)) { @Html.AntiForgeryToken() @Html.HideenFor(_ => _.Unit) <table class="table table-striped"> <thead> <tr> <th>Unit</th> <th>Soldier</th> <th>Supervisor</th> </tr> </thead> <tbody> @for (var i = 0; i < Model.Rows.Count; ++i) { <tr> <td>@Html.DisplayFor(_ => Model.Rows[i].Soldier.Unit)</td> <td> @Html.HiddenFor(_ => Model.Rows[i].SoldierId) @Html.DisplayFor(_ => Model.Rows[i].Soldier) </td> <td> @Html.DropDownListFor(_ => Model.Rows[i].SupervisorId, Model.Soldiers, "-- Select a Supervisor --", new { @class = "select2" }) </td> </tr> } </tbody> </table> <button type="submit" name="Save">Save Updates</button> }
mit
C#
c741e9df4740dc8afa0ad324b272f2ad9f30ecb8
Add `AuthenticationFlow` in `ChargePaymentMethodDetailsCardThreeDSecure`
stripe/stripe-dotnet
src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails/ChargePaymentMethodDetailsCardThreeDSecure.cs
src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails/ChargePaymentMethodDetailsCardThreeDSecure.cs
namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity<ChargePaymentMethodDetailsCardThreeDSecure> { /// <summary> /// Whether or not authentication was performed. 3D Secure will succeed without /// authentication when the card is not enrolled. /// </summary> [JsonProperty("authenticated")] public bool Authenticated { get; set; } /// <summary> /// For authenticated transactions: whether issuing bank authenticated the cardholder with a /// traditional challenge screen, or with device data via the 3DS2 frictionless flow. One of /// <c>challenge</c> or <c>frictionless</c>. /// </summary> [JsonProperty("authentication_flow")] public string AuthenticationFlow { get; set; } /// <summary> /// Indicates the outcome of 3D Secure authentication. /// </summary> [JsonProperty("result")] public string Result { get; set; } /// <summary> /// Additional information about why 3D Secure succeeded or failed. /// </summary> [JsonProperty("result_reason")] public string ResultReason { get; set; } /// <summary> /// Whether or not 3D Secure succeeded. /// </summary> [JsonProperty("succeeded")] public bool Succeeded { get; set; } /// <summary> /// The version of 3D Secure that was used for this payment. /// </summary> [JsonProperty("version")] public string Version { get; set; } } }
namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity<ChargePaymentMethodDetailsCardThreeDSecure> { /// <summary> /// Whether or not authentication was performed. 3D Secure will succeed without /// authentication when the card is not enrolled. /// </summary> [JsonProperty("authenticated")] public bool Authenticated { get; set; } /// <summary> /// Indicates the outcome of 3D Secure authentication. /// </summary> [JsonProperty("result")] public string Result { get; set; } /// <summary> /// Additional information about why 3D Secure succeeded or failed. /// </summary> [JsonProperty("result_reason")] public string ResultReason { get; set; } /// <summary> /// Whether or not 3D Secure succeeded. /// </summary> [JsonProperty("succeeded")] public bool Succeeded { get; set; } /// <summary> /// The version of 3D Secure that was used for this payment. /// </summary> [JsonProperty("version")] public string Version { get; set; } } }
apache-2.0
C#
2711dca062dde45fa2257f27c45fdb25adb7f919
Fix compile error.
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
test/HelloCoreClrApp.Test/WebApi/WebHostServiceTest.cs
test/HelloCoreClrApp.Test/WebApi/WebHostServiceTest.cs
using System; using System.Threading; using System.Threading.Tasks; using FakeItEasy; using FluentAssertions; using HelloCoreClrApp.WebApi; using Microsoft.Extensions.Configuration; using SimpleInjector; using Xunit; namespace HelloCoreClrApp.Test.WebApi { public class WebHostServiceTest { [Fact] public async Task ShouldStartAndStopTestAsync() { Startup.Container = new Container(); var conf = A.Fake<IConfiguration>(); var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(500)); var sut = new WebHostService(); await sut.Run(conf, cts.Token); cts.IsCancellationRequested.Should().BeTrue(); } } }
using System; using System.Threading; using System.Threading.Tasks; using FakeItEasy; using FluentAssertions; using HelloCoreClrApp.WebApi; using Microsoft.Extensions.Configuration; using SimpleInjector; using Xunit; namespace HelloCoreClrApp.Test.WebApi { public class WebHostServiceTest { [Fact] public async Task ShouldStartAndStopTestAsync() { Startup.Container = new Container(); var conf = A.Fake<IConfiguration>(); var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(500)); await WebHostService.Run(conf, cts.Token); cts.IsCancellationRequested.Should().BeTrue(); } } }
mit
C#
510187a14a55157f1e3960bdc19a9baf59118639
Revert The use of Post TFS2010 authentication method
jeremy-sylvis-tmg/git-tfs,modulexcite/git-tfs,codemerlin/git-tfs,guyboltonking/git-tfs,kgybels/git-tfs,codemerlin/git-tfs,adbre/git-tfs,jeremy-sylvis-tmg/git-tfs,WolfVR/git-tfs,WolfVR/git-tfs,PKRoma/git-tfs,WolfVR/git-tfs,bleissem/git-tfs,NathanLBCooper/git-tfs,modulexcite/git-tfs,git-tfs/git-tfs,bleissem/git-tfs,codemerlin/git-tfs,NathanLBCooper/git-tfs,kgybels/git-tfs,NathanLBCooper/git-tfs,kgybels/git-tfs,steveandpeggyb/Public,guyboltonking/git-tfs,steveandpeggyb/Public,adbre/git-tfs,andyrooger/git-tfs,modulexcite/git-tfs,vzabavnov/git-tfs,pmiossec/git-tfs,guyboltonking/git-tfs,jeremy-sylvis-tmg/git-tfs,bleissem/git-tfs,steveandpeggyb/Public,adbre/git-tfs
GitTfs.VsCommon/TfsHelper.Vs2012Base.cs
GitTfs.VsCommon/TfsHelper.Vs2012Base.cs
using System; using System.IO; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.Framework.Client; using Microsoft.TeamFoundation.Framework.Common; using Microsoft.TeamFoundation.VersionControl.Client; using StructureMap; using Sep.Git.Tfs.Core.TfsInterop; namespace Sep.Git.Tfs.VsCommon { public abstract class TfsHelperVs2012Base : TfsHelperBase { protected abstract string TfsVersionString { get; } protected TfsHelperVs2012Base(TextWriter stdout, TfsApiBridge bridge, IContainer container) : base(stdout, bridge, container) { } protected override bool HasWorkItems(Changeset changeset) { return Retry.Do(() => changeset.AssociatedWorkItems.Length > 0); } private string vsInstallDir; protected override string GetVsInstallDir() { if (vsInstallDir == null) { vsInstallDir = TryGetRegString(@"Software\WOW6432Node\Microsoft\VisualStudio\" + TfsVersionString, "InstallDir") ?? TryGetRegString(@"Software\Microsoft\VisualStudio\" + TfsVersionString, "InstallDir") ?? TryGetUserRegString(@"Software\WOW6432Node\Microsoft\WDExpress\" + TfsVersionString + "_Config", "InstallDir") ?? TryGetUserRegString(@"Software\Microsoft\WDExpress\" + TfsVersionString + "_Config", "InstallDir"); } return vsInstallDir; } private IIdentityManagementService GroupSecurityService { get { return GetService<IIdentityManagementService>(); } } public override IIdentity GetIdentity(string username) { return _bridge.Wrap<WrapperForIdentity, TeamFoundationIdentity>(Retry.Do(() => GroupSecurityService.ReadIdentity(IdentitySearchFactor.AccountName, username, MembershipQuery.None, ReadIdentityOptions.None))); } protected override TfsTeamProjectCollection GetTfsCredential(Uri uri) { #pragma warning disable 618 return HasCredentials ? new TfsTeamProjectCollection(uri, GetCredential(), new UICredentialsProvider()) : new TfsTeamProjectCollection(uri, new UICredentialsProvider()); #pragma warning restore 618 } } }
using System; using System.IO; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.Framework.Client; using Microsoft.TeamFoundation.Framework.Common; using Microsoft.TeamFoundation.VersionControl.Client; using StructureMap; using Sep.Git.Tfs.Core.TfsInterop; namespace Sep.Git.Tfs.VsCommon { public abstract class TfsHelperVs2012Base : TfsHelperBase { protected abstract string TfsVersionString { get; } protected TfsHelperVs2012Base(TextWriter stdout, TfsApiBridge bridge, IContainer container) : base(stdout, bridge, container) { } protected override bool HasWorkItems(Changeset changeset) { return Retry.Do(() => changeset.AssociatedWorkItems.Length > 0); } private string vsInstallDir; protected override string GetVsInstallDir() { if (vsInstallDir == null) { vsInstallDir = TryGetRegString(@"Software\WOW6432Node\Microsoft\VisualStudio\" + TfsVersionString, "InstallDir") ?? TryGetRegString(@"Software\Microsoft\VisualStudio\" + TfsVersionString, "InstallDir") ?? TryGetUserRegString(@"Software\WOW6432Node\Microsoft\WDExpress\" + TfsVersionString + "_Config", "InstallDir") ?? TryGetUserRegString(@"Software\Microsoft\WDExpress\" + TfsVersionString + "_Config", "InstallDir"); } return vsInstallDir; } private IIdentityManagementService GroupSecurityService { get { return GetService<IIdentityManagementService>(); } } public override IIdentity GetIdentity(string username) { return _bridge.Wrap<WrapperForIdentity, TeamFoundationIdentity>(Retry.Do(() => GroupSecurityService.ReadIdentity(IdentitySearchFactor.AccountName, username, MembershipQuery.None, ReadIdentityOptions.None))); } protected override TfsTeamProjectCollection GetTfsCredential(Uri uri) { var basicAuthCredential = new BasicAuthCredential(GetCredential()); return new TfsTeamProjectCollection(uri, new TfsClientCredentials(basicAuthCredential) { AllowInteractive = !HasCredentials }); } } }
apache-2.0
C#
af7bd046408f9cd6fcd0f4ff97b1eef634205b6b
remove header forwarding
nopara73/HiddenWallet,nopara73/HiddenWallet,nopara73/HiddenWallet,nopara73/HiddenWallet
HiddenWallet.ChaumianTumbler/Startup.cs
HiddenWallet.ChaumianTumbler/Startup.cs
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.AspNetCore.SignalR; using System.IO; using Swashbuckle.AspNetCore.Swagger; using Microsoft.AspNetCore.HttpOverrides; namespace HiddenWallet.ChaumianTumbler { public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddSignalR(); //Must come before .AddMvc() services.AddMvc(); services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "HiddenWallet.ChaumianTumbler", Version = "v1" }); }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IHubContext<TumblerHub> context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseSignalR(routes => { routes.MapHub<TumblerHub>("chaumianTumbler"); }); //Must come before .UseMvc() app.UseMvc(); var applicationLifetime = app.ApplicationServices.GetRequiredService<IApplicationLifetime>(); applicationLifetime.ApplicationStopping.Register(OnShutdownAsync); app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "HiddenWallet.ChaumianTumbler V1"); }); NotificationBroadcaster notificationBroadcast = NotificationBroadcaster.Instance; notificationBroadcast.SignalRHub = context; } private async void OnShutdownAsync() { Global.StateMachineJobCancel?.Cancel(); if(Global.StateMachineJob != null) { await Global.StateMachineJob; } Global.StateMachine?.Dispose(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.AspNetCore.SignalR; using System.IO; using Swashbuckle.AspNetCore.Swagger; using Microsoft.AspNetCore.HttpOverrides; namespace HiddenWallet.ChaumianTumbler { public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddSignalR(); //Must come before .AddMvc() services.AddMvc(); services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "HiddenWallet.ChaumianTumbler", Version = "v1" }); }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IHubContext<TumblerHub> context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto }); app.UseSignalR(routes => { routes.MapHub<TumblerHub>("chaumianTumbler"); }); //Must come before .UseMvc() app.UseMvc(); var applicationLifetime = app.ApplicationServices.GetRequiredService<IApplicationLifetime>(); applicationLifetime.ApplicationStopping.Register(OnShutdownAsync); app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "HiddenWallet.ChaumianTumbler V1"); }); NotificationBroadcaster notificationBroadcast = NotificationBroadcaster.Instance; notificationBroadcast.SignalRHub = context; } private async void OnShutdownAsync() { Global.StateMachineJobCancel?.Cancel(); if(Global.StateMachineJob != null) { await Global.StateMachineJob; } Global.StateMachine?.Dispose(); } } }
mit
C#
83528e160251d1956bc2b2bba8dc9331c56180ce
Fix implement LLVMConstHelper#IntegerType
lury-lang/lury,HaiTo/lury,nokok/lury
src/Lury/Compiling/LLVMConstHelper.cs
src/Lury/Compiling/LLVMConstHelper.cs
// // LLVMConstHelper.cs // // Author: // Tomona Nanase <nanase@users.noreply.github.com> // // The MIT License (MIT) // // Copyright (c) 2015 Tomona Nanase // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using LLVMSharp; using System.Runtime.InteropServices; namespace Lury.Compiling { public class LLVMConstHelper { #region -- Private Fields -- private LLVMHelper llvmHelper; #region Value Constants private static readonly LLVMBool @false = new LLVMBool(0); private static readonly LLVMBool @true = new LLVMBool(1); #endregion #region Type private LLVMTypeRef booleanType; #endregion #endregion #region -- Public Properties -- public LLVMHelper LLVMHelper { get { return this.llvmHelper; } } #region Value Constants private LLVMBool False { get { return @false; } } private LLVMBool True { get { return @true; } } #endregion #region Type private LLVMTypeRef IntegerType { get { return this.integerType.Pointer != IntPtr.Zero ? this.integerType : (this.integerType = LLVM.Int64TypeInContext(this.llvmHelper.Context)); } } #endregion #endregion #region -- Constructors -- public LLVMConstHelper(LLVMHelper llvmHelper) { this.llvmHelper = llvmHelper; } #endregion #region -- Public Methods -- #endregion } }
// // LLVMConstHelper.cs // // Author: // Tomona Nanase <nanase@users.noreply.github.com> // // The MIT License (MIT) // // Copyright (c) 2015 Tomona Nanase // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using LLVMSharp; using System.Runtime.InteropServices; namespace Lury.Compiling { public class LLVMConstHelper { #region -- Private Fields -- private LLVMHelper llvmHelper; #region Value Constants private static readonly LLVMBool @false = new LLVMBool(0); private static readonly LLVMBool @true = new LLVMBool(1); #endregion #region Type private LLVMTypeRef booleanType; #endregion #endregion #region -- Public Properties -- public LLVMHelper LLVMHelper { get { return this.llvmHelper; } } #region Value Constants private LLVMBool False { get { return @false; } } private LLVMBool True { get { return @true; } } #endregion #region Type private LLVMTypeRef BooleanType { get { return this.booleanType ?? (this.booleanType = LLVM.Int1TypeInContext(this.llvmHelper.Context)); } } #endregion #endregion #region -- Constructors -- public LLVMConstHelper(LLVMHelper llvmHelper) { this.llvmHelper = llvmHelper; } #endregion #region -- Public Methods -- #endregion } }
mit
C#
77406e47fc77e41f7d5d77c4ac71924efd59b41b
add dialog service to container
kdotdk/MVVMLightAndMVVMDialogs
MvvmLight/ViewModel/ViewModelLocator.cs
MvvmLight/ViewModel/ViewModelLocator.cs
/* In App.xaml: <Application.Resources> <vm:ViewModelLocatorTemplate xmlns:vm="clr-namespace:MvvmLight.ViewModel" x:Key="Locator" /> </Application.Resources> In the View: DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" */ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Ioc; using Microsoft.Practices.ServiceLocation; using MvvmDialogs; using MvvmLight.Model; namespace MvvmLight.ViewModel { /// <summary> /// This class contains static references to all the view models in the /// application and provides an entry point for the bindings. /// <para> /// See http://www.mvvmlight.net /// </para> /// </summary> public class ViewModelLocator { static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); if (ViewModelBase.IsInDesignModeStatic) { SimpleIoc.Default.Register<IDataService, Design.DesignDataService>(); } else { SimpleIoc.Default.Register<IDataService, DataService>(); } SimpleIoc.Default.Register<IDialogService>(() => new DialogService()); SimpleIoc.Default.Register<MainViewModel>(); } /// <summary> /// Gets the Main property. /// </summary> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "This non-static member is needed for data binding purposes.")] public MainViewModel Main { get { return ServiceLocator.Current.GetInstance<MainViewModel>(); } } /// <summary> /// Cleans up all the resources. /// </summary> public static void Cleanup() { } } }
/* In App.xaml: <Application.Resources> <vm:ViewModelLocatorTemplate xmlns:vm="clr-namespace:MvvmLight.ViewModel" x:Key="Locator" /> </Application.Resources> In the View: DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" */ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Ioc; using Microsoft.Practices.ServiceLocation; using MvvmDialogs; using MvvmLight.Model; namespace MvvmLight.ViewModel { /// <summary> /// This class contains static references to all the view models in the /// application and provides an entry point for the bindings. /// <para> /// See http://www.mvvmlight.net /// </para> /// </summary> public class ViewModelLocator { static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); if (ViewModelBase.IsInDesignModeStatic) { SimpleIoc.Default.Register<IDataService, Design.DesignDataService>(); } else { SimpleIoc.Default.Register<IDataService, DataService>(); } // Did try to manual register DialogService below - but it is not possible because of multiple constructs with no default constructor annotation // SimpleIoc.Default.Register<IDialogService, DialogService>(); SimpleIoc.Default.Register<MainViewModel>(); } /// <summary> /// Gets the Main property. /// </summary> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "This non-static member is needed for data binding purposes.")] public MainViewModel Main { get { return ServiceLocator.Current.GetInstance<MainViewModel>(); } } /// <summary> /// Cleans up all the resources. /// </summary> public static void Cleanup() { } } }
mit
C#
a4925997f3a43c3218b929a90686f9d60a3fc180
add GetPropertyRoutes and GetTypeEntity
signumsoftware/framework,avifatal/framework,AlejandroCano/framework,avifatal/framework,AlejandroCano/framework,signumsoftware/framework
Signum.React/ApiControllers/ReflectionController.cs
Signum.React/ApiControllers/ReflectionController.cs
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; using System.Net.Http; using System.Reflection; using System.Web.Http; using Signum.Entities; using Signum.React.Facades; using Signum.Utilities; using Signum.Engine; using Signum.React.Filters; using Signum.Entities.Basics; using Signum.Engine.Basics; namespace Signum.React.ApiControllers { public class ReflectionController : ApiController { [Route("api/reflection/types"), HttpGet, AllowAnonymous] public Dictionary<string, TypeInfoTS> Types() { return ReflectionServer.GetTypeInfoTS(); } [Route("api/reflection/propertyRoutes/{typeName}"), HttpGet] public List<string> GetPropertyRoutes(string typeName) { Type type = TypeLogic.GetType(typeName); var res = PropertyRoute.GenerateRoutes(type).Select(a => a.PropertyString()).ToList(); return res; } [Route("api/reflection/typeEntity/{typeName}"), HttpGet] public TypeEntity GetTypeEntity(string typeName) { return TypeLogic.GetType(typeName).ToTypeEntity(); } } }
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; using System.Net.Http; using System.Reflection; using System.Web.Http; using Signum.Entities; using Signum.React.Facades; using Signum.Utilities; using Signum.Engine; using Signum.React.Filters; namespace Signum.React.ApiControllers { public class ReflectionController : ApiController { [Route("api/reflection/types"), HttpGet, AllowAnonymous] public Dictionary<string, TypeInfoTS> Types() { return ReflectionServer.GetTypeInfoTS(); } } }
mit
C#
b029bc8a06d4e03657e165e62fbbf1997e347f53
Add test
sakapon/Samples-2017
ProxySample/ProxyableConsole/Program.cs
ProxySample/ProxyableConsole/Program.cs
using System; namespace ProxyableConsole { class Program { static void Main(string[] args) { var result = Proxyable.Body(() => { Console.WriteLine("Body"); return 123; }) .Aspect(f => { Console.WriteLine("Before"); var r = f(); Console.WriteLine("After"); return r; }) .Aspect(f => { Console.WriteLine("Begin"); var r = f(); Console.WriteLine("End"); return r; }) .Execute(); Proxyable.Body(() => Console.WriteLine("Body")) .Aspect(a => { Console.WriteLine("Before"); a(); Console.WriteLine("After"); }) .Aspect(a => { Console.WriteLine("Begin"); a(); Console.WriteLine("End"); }) .Execute(); } } }
using System; namespace ProxyableConsole { class Program { static void Main(string[] args) { var result = Proxyable.Body(() => { Console.WriteLine("Body"); return 123; }) .Aspect(f => { Console.WriteLine("Before"); var r = f(); Console.WriteLine("After"); return r; }) .Aspect(f => { Console.WriteLine("Begin"); var r = f(); Console.WriteLine("End"); return r; }) .Execute(); } } }
mit
C#
ec4917f19d2cd80bef7266eb9f1903145916f7ec
add RemoveCacheByPrefix method
roman-yagodin/R7.University,roman-yagodin/R7.University,roman-yagodin/R7.University
R7.University/Components/CacheHelper.cs
R7.University/Components/CacheHelper.cs
// // CacheHelper.cs // // Author: // Roman M. Yagodin <roman.yagodin@gmail.com> // // Copyright (c) 2014 Roman M. Yagodin // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.ObjectModel; using DotNetNuke.Common.Utilities; using DotNetNuke.Services.Cache; namespace R7.University.Components { public static class CacheHelper { public static bool Exists (string key) { return DataCache.GetCache (key) != null; } public static void Set<T> (T toSet, string key, int seconds) { DataCache.SetCache (key, toSet, TimeSpan.FromSeconds (seconds)); } public static T Get<T> (string key) { return (T) DataCache.GetCache (key); } public static T TryGet<T> (string key, T defValue) { var obj = DataCache.GetCache (key); if (obj != null) return (T) obj; return defValue; } /// <summary> /// Remove all cache keys with specified prefix /// </summary> /// <param name="cacheKeyPrefix">Cache key prefix.</param> public static void RemoveCacheByPrefix (string cacheKeyPrefix) { // get all cache keys with s var cacheKeys = new Collection<string> (); var cacheEnumerator = CachingProvider.Instance ().GetEnumerator (); while (cacheEnumerator.MoveNext ()) { var cacheKey = cacheEnumerator.Key.ToString (); if (cacheKey.StartsWith ("DNN_" + cacheKeyPrefix, StringComparison.InvariantCultureIgnoreCase)) { cacheKeys.Add (cacheKey); } } foreach (var cacheKey in cacheKeys) { // Substring (4) removes DNN_ prefix DataCache.RemoveCache (cacheKey.Substring (4)); } } } }
// // CacheHelper.cs // // Author: // Roman M. Yagodin <roman.yagodin@gmail.com> // // Copyright (c) 2014 Roman M. Yagodin // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using DotNetNuke.Common.Utilities; namespace R7.University.Components { public static class CacheHelper { public static bool Exists (string key) { return DataCache.GetCache (key) != null; } public static void Set<T> (T toSet, string key, int seconds) { DataCache.SetCache (key, toSet, TimeSpan.FromSeconds (seconds)); } public static T Get<T> (string key) { return (T) DataCache.GetCache (key); } public static T TryGet<T> (string key, T defValue) { var obj = DataCache.GetCache (key); if (obj != null) return (T) obj; return defValue; } } }
agpl-3.0
C#
8fd8b43f1166f9baedca4b4d1d98a2429f537549
Use th esupplied access mappign instead of looking it up a second time.
tfsaggregator/tfsaggregator,tfsaggregator/tfsaggregator-webhooks
Aggregator.Core/Extensions/LocationServiceExtensions.cs
Aggregator.Core/Extensions/LocationServiceExtensions.cs
#if TFS2015u2 using System; using System.Diagnostics.CodeAnalysis; using Microsoft.TeamFoundation.Framework.Server; using Microsoft.VisualStudio.Services.Location; using Microsoft.VisualStudio.Services.Location.Server; namespace Aggregator.Core.Extensions { public static class LocationServiceExtensions { public static Uri GetSelfReferenceUri(this ILocationService self, IVssRequestContext context, AccessMapping mapping) { string url = self.GetSelfReferenceUrl(context, mapping); return new Uri(url, UriKind.Absolute); } } } #endif
#if TFS2015u2 using System; using System.Diagnostics.CodeAnalysis; using Microsoft.TeamFoundation.Framework.Server; using Microsoft.VisualStudio.Services.Location; using Microsoft.VisualStudio.Services.Location.Server; namespace Aggregator.Core.Extensions { public static class LocationServiceExtensions { [SuppressMessage("Maintainability", "S1172:Unused method parameters should be removed", Justification = "Required by original interface", Scope = "member", Target = "~M:Aggregator.Core.Extensions.LocationServiceExtensions.GetSelfReferenceUri(Microsoft.VisualStudio.Services.Location.Server.ILocationService,Microsoft.TeamFoundation.Framework.Server.IVssRequestContext,Microsoft.VisualStudio.Services.Location.AccessMapping)~System.Uri")] public static Uri GetSelfReferenceUri(this ILocationService self, IVssRequestContext context, AccessMapping mapping) { string url = self.GetSelfReferenceUrl(context, self.GetDefaultAccessMapping(context)); return new Uri(url, UriKind.Absolute); } } } #endif
apache-2.0
C#
81e3e8194591fafcd94252ac2ae2685671086f9b
update version
prodot/ReCommended-Extension
Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
using System.Reflection; using ReCommendedExtension; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle(ZoneMarker.ExtensionName)] [assembly: AssemblyDescription(ZoneMarker.ExtensionDescription)] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("prodot GmbH")] [assembly: AssemblyProduct(ZoneMarker.ExtensionId)] [assembly: AssemblyCopyright("© 2012-2016 prodot GmbH")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.0.2.0")] [assembly: AssemblyFileVersion("1.0.2")]
using System.Reflection; using ReCommendedExtension; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle(ZoneMarker.ExtensionName)] [assembly: AssemblyDescription(ZoneMarker.ExtensionDescription)] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("prodot GmbH")] [assembly: AssemblyProduct(ZoneMarker.ExtensionId)] [assembly: AssemblyCopyright("© 2012-2016 prodot GmbH")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.0.1.0")] [assembly: AssemblyFileVersion("1.0.1")]
apache-2.0
C#
c1d32b40fdfdcfa3434bb97a9c110e6d80c5260e
update version
prodot/ReCommended-Extension
Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
Sources/ReCommendedExtension/Properties/AssemblyInfo.cs
using System.Reflection; using ReCommendedExtension; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle(ZoneMarker.ExtensionName)] [assembly: AssemblyDescription(ZoneMarker.ExtensionDescription)] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("prodot GmbH")] [assembly: AssemblyProduct(ZoneMarker.ExtensionId)] [assembly: AssemblyCopyright("© 2012-2021 prodot GmbH")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("5.5.6.0")] [assembly: AssemblyFileVersion("5.5.6")]
using System.Reflection; using ReCommendedExtension; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle(ZoneMarker.ExtensionName)] [assembly: AssemblyDescription(ZoneMarker.ExtensionDescription)] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("prodot GmbH")] [assembly: AssemblyProduct(ZoneMarker.ExtensionId)] [assembly: AssemblyCopyright("© 2012-2021 prodot GmbH")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("5.5.5.0")] [assembly: AssemblyFileVersion("5.5.5")]
apache-2.0
C#
a733811b446384ac1e610d1aaf7e1d6b9f9aaa60
remove unused methods
brandonprry/gray_hat_csharp_code
ch8_automating_cuckoo/cuckoo-sharp/CuckooManager.cs
ch8_automating_cuckoo/cuckoo-sharp/CuckooManager.cs
using System; using System.Collections.Generic; using System.IO; using Newtonsoft.Json.Linq; namespace cuckoosharp { public class CuckooManager : IDisposable { CuckooSession _session = null; public CuckooManager (CuckooSession session) { _session = session; } public int CreateTask(Task task) { string param = null, uri = "/tasks/create/"; object val = null; if (task is FileTask) { byte[] data; using (FileStream str = new FileStream((task as FileTask).Filepath, FileMode.Open, FileAccess.Read)) { data = new byte[str.Length]; str.Read(data, 0, data.Length); } uri += (param = "file"); val = new FileParameter(data, (task as FileTask).Filepath, "application/binary"); } IDictionary<string, object> parms = new Dictionary<string, object>(); parms.Add(param, val); parms.Add("package", task.Package); parms.Add("timeout", task.Timeout.ToString()); parms.Add("options", task.Options); parms.Add("machine", task.Machine); parms.Add("platform", task.Platform); parms.Add("custom", task.Custom); parms.Add("memory", task.EnableMemoryDump.ToString()); parms.Add("enforce_timeout", task.EnableEnforceTimeout.ToString()); JObject resp = _session.ExecuteCommand(uri, "POST", parms); return (int)resp["task_id"]; } public Task GetTaskDetails(int id) { string uri = "/tasks/view/" + id; JObject resp = _session.ExecuteCommand(uri, "GET"); return TaskFactory.CreateTask(resp["task"]); } public JObject GetTaskReport(int id) { return GetTaskReport(id, "json"); } public JObject GetTaskReport(int id, string type) { string uri = "/tasks/report/" + id + "/" + type; JObject resp = _session.ExecuteCommand(uri, "GET"); return resp; } public void Dispose() { _session = null; } } }
using System; using System.Collections.Generic; using System.IO; using Newtonsoft.Json.Linq; namespace cuckoosharp { public class CuckooManager : IDisposable { CuckooSession _session = null; public CuckooManager (CuckooSession session) { _session = session; } public int CreateTask(Task task) { string param = null, uri = "/tasks/create/"; object val = null; if (task is FileTask) { byte[] data; using (FileStream str = new FileStream((task as FileTask).Filepath, FileMode.Open, FileAccess.Read)) { data = new byte[str.Length]; str.Read (data, 0, data.Length); } uri += (param = "file"); val = new FileParameter(data, (task as FileTask).Filepath, "application/binary"); } IDictionary<string, object> parms = new Dictionary<string, object>(); parms.Add(param, val); parms.Add("package", task.Package); parms.Add("timeout", task.Timeout.ToString()); parms.Add("options", task.Options); parms.Add("machine", task.Machine); parms.Add("platform", task.Platform); parms.Add("custom", task.Custom); parms.Add("memory", task.EnableMemoryDump.ToString()); parms.Add("enforce_timeout", task.EnableEnforceTimeout.ToString()); JObject resp = _session.ExecuteCommand(uri, "POST", parms); return (int)resp["task_id"]; } public List<Task> GetTasks(int limit) { string uri = "/tasks/list/" + (limit == -1 ? string.Empty : limit.ToString()); JObject resp = _session.ExecuteCommand(uri, "GET"); List<Task> tasks = new List<Task>(); foreach (JToken obj in resp["tasks"]) tasks.Add(TaskFactory.CreateTask(obj)); return tasks; } public List<Task> GetTasks() { return GetTasks(-1); } public Task GetTaskDetails(int id) { string uri = "/tasks/view/" + id; JObject resp = _session.ExecuteCommand(uri, "GET"); return TaskFactory.CreateTask(resp["task"]); } public JObject GetTaskReport(int id) { return GetTaskReport(id, "json"); } public JObject GetTaskReport(int id, string type) { string uri = "/tasks/report/" + id + "/" + type; JObject resp = _session.ExecuteCommand(uri, "GET"); return resp; } public void Dispose() { _session = null; } } }
bsd-3-clause
C#
0050c84dce808dd4568c986725a7e1c2c3340bd4
add some other string validators
gradientspace/frame3Sharp
util/StringValidators.cs
util/StringValidators.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace f3 { public static class StringValidators { // // only allows signed real-valued input // valid characters are 0 to 9, . and - , strings with other characters are rejected // "." is replaced with "0." // "-." is replaced with "-0." public static string SignedRealEdit(string oldStr, string newStr) { int N = newStr.Length; if (N == 0) return newStr; int num_dots = 0; for ( int i = 0; i < N; ++i ) { char c = newStr[i]; if (char.IsDigit(c) == false && c != '-' && c != '.') return oldStr; if (c == '-' && i != 0) return oldStr; if (c == '.') { num_dots++; if (num_dots > 1) return oldStr; } } if (N == 1 && newStr[0] == '.') return "0."; if (N == 2 && newStr[0] == '-' && newStr[1] == '.') return "-0."; return newStr; } public static string BasicAlphaNumericText(string oldStr, string newStr) { string cleanString = Regex.Replace(newStr, @"[^a-zA-Z0-9\-\_]", ""); return cleanString; } public static string KeyboardSymbolsText(string oldStr, string newStr) { string cleanString = Regex.Replace(newStr, @"[^a-zA-Z0-9\-\_\,\.\?\*\#\(\)\[\]\<\>\\\/ ]", ""); return cleanString; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace f3 { public static class StringValidators { // // only allows signed real-valued input // valid characters are 0 to 9, . and - , strings with other characters are rejected // "." is replaced with "0." // "-." is replaced with "-0." public static string SignedRealEdit(string oldStr, string newStr) { int N = newStr.Length; if (N == 0) return newStr; int num_dots = 0; for ( int i = 0; i < N; ++i ) { char c = newStr[i]; if (char.IsDigit(c) == false && c != '-' && c != '.') return oldStr; if (c == '-' && i != 0) return oldStr; if (c == '.') { num_dots++; if (num_dots > 1) return oldStr; } } if (N == 1 && newStr[0] == '.') return "0."; if (N == 2 && newStr[0] == '-' && newStr[1] == '.') return "-0."; return newStr; } } }
mit
C#
d3b7d8d660dcc02b5be6956ce25071ca95dfbf9f
Add comment.
mavasani/roslyn,eriawan/roslyn,abock/roslyn,reaction1989/roslyn,genlu/roslyn,aelij/roslyn,genlu/roslyn,jmarolf/roslyn,gafter/roslyn,VSadov/roslyn,KevinRansom/roslyn,AlekseyTs/roslyn,dpoeschl/roslyn,stephentoub/roslyn,dpoeschl/roslyn,tmat/roslyn,CyrusNajmabadi/roslyn,wvdd007/roslyn,weltkante/roslyn,swaroop-sridhar/roslyn,shyamnamboodiripad/roslyn,weltkante/roslyn,ErikSchierboom/roslyn,davkean/roslyn,CyrusNajmabadi/roslyn,tmat/roslyn,xasx/roslyn,brettfo/roslyn,tannergooding/roslyn,weltkante/roslyn,gafter/roslyn,AlekseyTs/roslyn,cston/roslyn,nguerrera/roslyn,agocke/roslyn,davkean/roslyn,VSadov/roslyn,sharwell/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,jasonmalinowski/roslyn,diryboy/roslyn,eriawan/roslyn,cston/roslyn,dotnet/roslyn,jcouv/roslyn,AmadeusW/roslyn,VSadov/roslyn,brettfo/roslyn,diryboy/roslyn,tannergooding/roslyn,xasx/roslyn,agocke/roslyn,mgoertz-msft/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,heejaechang/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,MichalStrehovsky/roslyn,jcouv/roslyn,mgoertz-msft/roslyn,KirillOsenkov/roslyn,dotnet/roslyn,KirillOsenkov/roslyn,panopticoncentral/roslyn,abock/roslyn,davkean/roslyn,panopticoncentral/roslyn,jcouv/roslyn,shyamnamboodiripad/roslyn,shyamnamboodiripad/roslyn,tmeschter/roslyn,cston/roslyn,mavasani/roslyn,DustinCampbell/roslyn,ErikSchierboom/roslyn,dotnet/roslyn,brettfo/roslyn,physhi/roslyn,DustinCampbell/roslyn,physhi/roslyn,ErikSchierboom/roslyn,AmadeusW/roslyn,MichalStrehovsky/roslyn,jmarolf/roslyn,nguerrera/roslyn,MichalStrehovsky/roslyn,dpoeschl/roslyn,aelij/roslyn,wvdd007/roslyn,KevinRansom/roslyn,nguerrera/roslyn,bartdesmet/roslyn,mavasani/roslyn,KirillOsenkov/roslyn,tmeschter/roslyn,agocke/roslyn,AmadeusW/roslyn,jasonmalinowski/roslyn,gafter/roslyn,tmat/roslyn,abock/roslyn,jmarolf/roslyn,reaction1989/roslyn,eriawan/roslyn,wvdd007/roslyn,genlu/roslyn,swaroop-sridhar/roslyn,swaroop-sridhar/roslyn,tmeschter/roslyn,DustinCampbell/roslyn,xasx/roslyn,tannergooding/roslyn,bartdesmet/roslyn,stephentoub/roslyn,jasonmalinowski/roslyn,aelij/roslyn,AlekseyTs/roslyn,reaction1989/roslyn,panopticoncentral/roslyn,diryboy/roslyn,heejaechang/roslyn,heejaechang/roslyn,CyrusNajmabadi/roslyn,sharwell/roslyn,stephentoub/roslyn,mgoertz-msft/roslyn,physhi/roslyn,sharwell/roslyn,KevinRansom/roslyn,bartdesmet/roslyn
src/Features/CSharp/Portable/ConvertAnonymousTypeToTuple/CSharpConvertAnonymousTypeToTupleDiagnosticAnalyzer.cs
src/Features/CSharp/Portable/ConvertAnonymousTypeToTuple/CSharpConvertAnonymousTypeToTupleDiagnosticAnalyzer.cs
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.Diagnostics; namespace Microsoft.CodeAnalysis.CSharp.ConvertAnonymousTypeToTuple { [DiagnosticAnalyzer(LanguageNames.CSharp)] internal class CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider : AbstractCodeStyleDiagnosticAnalyzer { public CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider() : base(IDEDiagnosticIds.ConvertAnonymousTypeToTupleDiagnosticId, new LocalizableResourceString(nameof(FeaturesResources.Convert_anonymous_type_to_tuple), FeaturesResources.ResourceManager, typeof(FeaturesResources)), new LocalizableResourceString(nameof(FeaturesResources.Convert_anonymous_type_to_tuple), FeaturesResources.ResourceManager, typeof(FeaturesResources))) { } public override DiagnosticAnalyzerCategory GetAnalyzerCategory() => DiagnosticAnalyzerCategory.SemanticSpanAnalysis; public override bool OpenFileOnly(Workspace workspace) => false; protected override void InitializeWorker(AnalysisContext context) => context.RegisterCompilationStartAction(csac => { // Only bother to offer to convert to a tuple if we actually know about System.ValueTuple. var valueTupleType = csac.Compilation.GetTypeByMetadataName(typeof(ValueTuple).FullName); if (valueTupleType != null) { csac.RegisterSyntaxNodeAction( AnalyzeSyntax, SyntaxKind.AnonymousObjectCreationExpression); } }); // Analysis is trivial. All anonymous types are marked as being convertible to a tuple. private void AnalyzeSyntax(SyntaxNodeAnalysisContext context) => context.ReportDiagnostic( Diagnostic.Create(HiddenDescriptor, context.Node.GetFirstToken().GetLocation())); } }
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.Diagnostics; namespace Microsoft.CodeAnalysis.CSharp.ConvertAnonymousTypeToTuple { [DiagnosticAnalyzer(LanguageNames.CSharp)] internal class CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider : AbstractCodeStyleDiagnosticAnalyzer { public CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider() : base(IDEDiagnosticIds.ConvertAnonymousTypeToTupleDiagnosticId, new LocalizableResourceString(nameof(FeaturesResources.Convert_anonymous_type_to_tuple), FeaturesResources.ResourceManager, typeof(FeaturesResources)), new LocalizableResourceString(nameof(FeaturesResources.Convert_anonymous_type_to_tuple), FeaturesResources.ResourceManager, typeof(FeaturesResources))) { } public override DiagnosticAnalyzerCategory GetAnalyzerCategory() => DiagnosticAnalyzerCategory.SemanticSpanAnalysis; public override bool OpenFileOnly(Workspace workspace) => false; protected override void InitializeWorker(AnalysisContext context) => context.RegisterCompilationStartAction(csac => { var valueTupleType = csac.Compilation.GetTypeByMetadataName(typeof(ValueTuple).FullName); if (valueTupleType != null) { csac.RegisterSyntaxNodeAction( AnalyzeSyntax, SyntaxKind.AnonymousObjectCreationExpression); } }); private void AnalyzeSyntax(SyntaxNodeAnalysisContext context) { context.ReportDiagnostic( Diagnostic.Create(HiddenDescriptor, context.Node.GetFirstToken().GetLocation())); } } }
mit
C#
d7e6f63cfd02c775549da45ee895def4b640a575
Mark assembly as CLSCompliant (#33)
ermshiperete/icu-dotnet,conniey/icu-dotnet,ermshiperete/icu-dotnet,sillsdev/icu-dotnet,conniey/icu-dotnet,sillsdev/icu-dotnet
source/icu.net/Properties/AssemblyInfo.cs
source/icu.net/Properties/AssemblyInfo.cs
// Copyright (c) 2007-2017 SIL International // This software is licensed under the MIT license (http://opensource.org/licenses/MIT) using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("icu.net")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("SIL International")] [assembly: AssemblyProduct("icu.net")] [assembly: AssemblyCopyright("Copyright © SIL International 2007-2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("3439151b-347b-4321-9f2f-d5fa28b46477")]
// Copyright (c) 2007-2017 SIL International // This software is licensed under the MIT license (http://opensource.org/licenses/MIT) using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("icu.net")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("SIL International")] [assembly: AssemblyProduct("icu.net")] [assembly: AssemblyCopyright("Copyright © SIL International 2007-2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("3439151b-347b-4321-9f2f-d5fa28b46477")]
mit
C#
b459d716d09e73682c5d8284aee795d36300b5d7
Fix company name within assembly info. Previous version was part of namespace refactor. I used a global find/replace.
khalidabuhakmeh/descriptor,billboga/descriptor,ritterim/descriptor,kendaleiv/descriptor,kendaleiv/descriptor
src/Descriptor/Properties/AssemblyInfo.cs
src/Descriptor/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Descriptor")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Ritter Insurance Marketing, Inc.")] [assembly: AssemblyProduct("Descriptor")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("0e1b96f1-d3f9-4d47-8d97-748faafe5478")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Descriptor")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("RimDev Insurance Marketing, Inc.")] [assembly: AssemblyProduct("Descriptor")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("0e1b96f1-d3f9-4d47-8d97-748faafe5478")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
mit
C#
6d24da0f4baa4b1f07436203178cd38d1c44d6a6
Remove extra xml comment in ExecutionContext.cs (#1614)
joemcbride/graphql-dotnet,graphql-dotnet/graphql-dotnet,graphql-dotnet/graphql-dotnet,joemcbride/graphql-dotnet,graphql-dotnet/graphql-dotnet
src/GraphQL/Execution/ExecutionContext.cs
src/GraphQL/Execution/ExecutionContext.cs
using System; using System.Collections.Generic; using System.Linq; using System.Threading; using GraphQL.Instrumentation; using GraphQL.Language.AST; using GraphQL.Types; namespace GraphQL.Execution { public class ExecutionContext : IExecutionContext { public Document Document { get; set; } public ISchema Schema { get; set; } public object RootValue { get; set; } public IDictionary<string, object> UserContext { get; set; } public Operation Operation { get; set; } public Fragments Fragments { get; set; } = new Fragments(); public Variables Variables { get; set; } public ExecutionErrors Errors { get; set; } = new ExecutionErrors(); public CancellationToken CancellationToken { get; set; } public Metrics Metrics { get; set; } public List<IDocumentExecutionListener> Listeners { get; set; } public bool ThrowOnUnhandledException { get; set; } public Action<UnhandledExceptionContext> UnhandledExceptionDelegate { get; set; } public int? MaxParallelExecutionCount { get; set; } public Dictionary<string, object> Extensions { get; set; } = new Dictionary<string, object>(); } }
using System; using System.Collections.Generic; using System.Linq; using System.Threading; using GraphQL.Instrumentation; using GraphQL.Language.AST; using GraphQL.Types; namespace GraphQL.Execution { public class ExecutionContext : IExecutionContext { public Document Document { get; set; } public ISchema Schema { get; set; } public object RootValue { get; set; } public IDictionary<string, object> UserContext { get; set; } public Operation Operation { get; set; } public Fragments Fragments { get; set; } = new Fragments(); public Variables Variables { get; set; } public ExecutionErrors Errors { get; set; } = new ExecutionErrors(); public CancellationToken CancellationToken { get; set; } public Metrics Metrics { get; set; } public List<IDocumentExecutionListener> Listeners { get; set; } public bool ThrowOnUnhandledException { get; set; } /// <summary> /// Allows to override, hide, modify or just log the unhandled exception before wrap it into ExecutionError. /// This can be useful for hiding error messages that reveal server implementation details. /// </summary> public Action<UnhandledExceptionContext> UnhandledExceptionDelegate { get; set; } public int? MaxParallelExecutionCount { get; set; } public Dictionary<string, object> Extensions { get; set; } = new Dictionary<string, object>(); } }
mit
C#
fe58617b83f9c107ecdf8033e416d4a28eedcd71
Add a comment so i dont forget to do this.
jacksonh/manos,jacksonh/manos,jmptrader/manos,jacksonh/manos,jacksonh/manos,mdavid/manos-spdy,jmptrader/manos,jmptrader/manos,jacksonh/manos,mdavid/manos-spdy,jmptrader/manos,jmptrader/manos,jmptrader/manos,mdavid/manos-spdy,mdavid/manos-spdy,jacksonh/manos,jacksonh/manos,jmptrader/manos,mdavid/manos-spdy,jacksonh/manos,mdavid/manos-spdy,jmptrader/manos,mdavid/manos-spdy
src/Manos/Manos.IO/WriteBytesOperation.cs
src/Manos/Manos.IO/WriteBytesOperation.cs
// // Copyright (C) 2010 Jackson Harper (jackson@manosdemono.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // using System; using System.Net.Sockets; using System.Collections; using System.Collections.Generic; namespace Manos.IO { public class WriteBytesOperation : IWriteOperation { private IList<ArraySegment<byte>> bytes; private WriteCallback callback; private static int counter = 0; private int index = ++counter; public WriteBytesOperation (IList<ArraySegment<byte>> bytes, WriteCallback callback) { this.bytes = bytes; this.callback = callback; } public WriteCallback Callback { get { return callback; } set { if (value == null) throw new ArgumentNullException ("value"); callback = value; } } public bool IsComplete { get; private set; } public bool Combine (IWriteOperation other) { WriteBytesOperation write_op = other as WriteBytesOperation; if (write_op == null) return false; foreach (var op in write_op.bytes) { bytes.Add (op); } // // TODO: We need to get a list of all the callbacks and their offsets // then we can raise them properly when their data has been written // this will also require moving the callback invocation into the // WriteOperation // if (other.Callback != null) callback = other.Callback; return true; } public void BeginWrite (IOStream stream) { } public void HandleWrite (IOStream stream) { while (bytes.Count > 0) { int len = -1; try { len = stream.socket.Send (bytes); } catch (SocketException se) { if (se.SocketErrorCode == SocketError.WouldBlock || se.SocketErrorCode == SocketError.TryAgain) return; stream.Close (); } catch (Exception e) { stream.Close (); } finally { if (len != -1) IOStream.AdjustSegments (len, bytes); } } IsComplete = (bytes.Count == 0); } public void EndWrite (IOStream stream) { } } }
// // Copyright (C) 2010 Jackson Harper (jackson@manosdemono.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // using System; using System.Net.Sockets; using System.Collections; using System.Collections.Generic; namespace Manos.IO { public class WriteBytesOperation : IWriteOperation { private IList<ArraySegment<byte>> bytes; private WriteCallback callback; private static int counter = 0; private int index = ++counter; public WriteBytesOperation (IList<ArraySegment<byte>> bytes, WriteCallback callback) { this.bytes = bytes; this.callback = callback; } public WriteCallback Callback { get { return callback; } set { if (value == null) throw new ArgumentNullException ("value"); callback = value; } } public bool IsComplete { get; private set; } public bool Combine (IWriteOperation other) { WriteBytesOperation write_op = other as WriteBytesOperation; if (write_op == null) return false; foreach (var op in write_op.bytes) { bytes.Add (op); } if (other.Callback != null) callback = other.Callback; return true; } public void BeginWrite (IOStream stream) { } public void HandleWrite (IOStream stream) { while (bytes.Count > 0) { int len = -1; try { len = stream.socket.Send (bytes); } catch (SocketException se) { if (se.SocketErrorCode == SocketError.WouldBlock || se.SocketErrorCode == SocketError.TryAgain) return; stream.Close (); } catch (Exception e) { stream.Close (); } finally { if (len != -1) IOStream.AdjustSegments (len, bytes); } } IsComplete = (bytes.Count == 0); } public void EndWrite (IOStream stream) { } } }
mit
C#
68104c4fee33561a2e31a43a78a7e3cc3c4c52c6
Fix NH-2927 - Oracle Dialect does not handle the correct resolution for timestamp version columns
fredericDelaporte/nhibernate-core,RogerKratz/nhibernate-core,ngbrown/nhibernate-core,gliljas/nhibernate-core,ManufacturingIntelligence/nhibernate-core,gliljas/nhibernate-core,lnu/nhibernate-core,RogerKratz/nhibernate-core,lnu/nhibernate-core,nkreipke/nhibernate-core,fredericDelaporte/nhibernate-core,lnu/nhibernate-core,livioc/nhibernate-core,livioc/nhibernate-core,nhibernate/nhibernate-core,livioc/nhibernate-core,alobakov/nhibernate-core,nkreipke/nhibernate-core,nkreipke/nhibernate-core,alobakov/nhibernate-core,gliljas/nhibernate-core,ngbrown/nhibernate-core,fredericDelaporte/nhibernate-core,RogerKratz/nhibernate-core,ManufacturingIntelligence/nhibernate-core,nhibernate/nhibernate-core,ManufacturingIntelligence/nhibernate-core,alobakov/nhibernate-core,hazzik/nhibernate-core,gliljas/nhibernate-core,nhibernate/nhibernate-core,hazzik/nhibernate-core,hazzik/nhibernate-core,nhibernate/nhibernate-core,hazzik/nhibernate-core,ngbrown/nhibernate-core,RogerKratz/nhibernate-core,fredericDelaporte/nhibernate-core
src/NHibernate/Dialect/Oracle9iDialect.cs
src/NHibernate/Dialect/Oracle9iDialect.cs
using System.Data; using NHibernate.SqlCommand; using NHibernate.SqlTypes; namespace NHibernate.Dialect { public class Oracle9iDialect : Oracle8iDialect { public override string CurrentTimestampSelectString { get { return "select systimestamp from dual"; } } public override string CurrentTimestampSQLFunctionName { get { // the standard SQL function name is current_timestamp... return "current_timestamp"; } } protected override void RegisterDateTimeTypeMappings() { RegisterColumnType(DbType.Date, "DATE"); RegisterColumnType(DbType.DateTime, "TIMESTAMP(4)"); RegisterColumnType(DbType.Time, "TIMESTAMP(4)"); } public override long TimestampResolutionInTicks { // matches precision of TIMESTAMP(4) get { return 1000L; } } public override string GetSelectClauseNullString(SqlType sqlType) { return GetBasicSelectClauseNullString(sqlType); } public override CaseFragment CreateCaseFragment() { // Oracle did add support for ANSI CASE statements in 9i return new ANSICaseFragment(this); } } }
using System.Data; using NHibernate.SqlCommand; using NHibernate.SqlTypes; namespace NHibernate.Dialect { public class Oracle9iDialect : Oracle8iDialect { public override string CurrentTimestampSelectString { get { return "select systimestamp from dual"; } } public override string CurrentTimestampSQLFunctionName { get { // the standard SQL function name is current_timestamp... return "current_timestamp"; } } protected override void RegisterDateTimeTypeMappings() { RegisterColumnType(DbType.Date, "DATE"); RegisterColumnType(DbType.DateTime, "TIMESTAMP(4)"); RegisterColumnType(DbType.Time, "TIMESTAMP(4)"); } public override string GetSelectClauseNullString(SqlType sqlType) { return GetBasicSelectClauseNullString(sqlType); } public override CaseFragment CreateCaseFragment() { // Oracle did add support for ANSI CASE statements in 9i return new ANSICaseFragment(this); } } }
lgpl-2.1
C#
5f1d44a2bef173fc2745e0e1212672db4e3b5d86
Update inspectcode / CodeFileSanity versions used in CI
ppy/osu,peppy/osu-new,peppy/osu,NeoAdonis/osu,UselessToucan/osu,smoogipoo/osu,smoogipoo/osu,ppy/osu,smoogipoo/osu,NeoAdonis/osu,UselessToucan/osu,ppy/osu,NeoAdonis/osu,UselessToucan/osu,peppy/osu,peppy/osu,smoogipooo/osu
build/InspectCode.cake
build/InspectCode.cake
#addin "nuget:?package=CodeFileSanity&version=0.0.36" #addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2020.1.3" #tool "nuget:?package=NVika.MSBuild&version=1.0.1" var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First(); /////////////////////////////////////////////////////////////////////////////// // ARGUMENTS /////////////////////////////////////////////////////////////////////////////// var target = Argument("target", "CodeAnalysis"); var configuration = Argument("configuration", "Release"); var rootDirectory = new DirectoryPath(".."); var sln = rootDirectory.CombineWithFilePath("osu.sln"); var desktopSlnf = rootDirectory.CombineWithFilePath("osu.Desktop.slnf"); /////////////////////////////////////////////////////////////////////////////// // TASKS /////////////////////////////////////////////////////////////////////////////// // windows only because both inspectcode and nvika depend on net45 Task("InspectCode") .WithCriteria(IsRunningOnWindows()) .Does(() => { InspectCode(desktopSlnf, new InspectCodeSettings { CachesHome = "inspectcode", OutputFile = "inspectcodereport.xml", ArgumentCustomization = arg => { if (AppVeyor.IsRunningOnAppVeyor) // Don't flood CI output arg.Append("--verbosity:WARN"); return arg; }, }); int returnCode = StartProcess(nVikaToolPath, $@"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors"); if (returnCode != 0) throw new Exception($"inspectcode failed with return code {returnCode}"); }); Task("CodeFileSanity") .Does(() => { ValidateCodeSanity(new ValidateCodeSanitySettings { RootDirectory = rootDirectory.FullPath, IsAppveyorBuild = AppVeyor.IsRunningOnAppVeyor }); }); Task("CodeAnalysis") .IsDependentOn("CodeFileSanity") .IsDependentOn("InspectCode"); RunTarget(target);
#addin "nuget:?package=CodeFileSanity&version=0.0.33" #addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2019.3.2" #tool "nuget:?package=NVika.MSBuild&version=1.0.1" var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First(); /////////////////////////////////////////////////////////////////////////////// // ARGUMENTS /////////////////////////////////////////////////////////////////////////////// var target = Argument("target", "CodeAnalysis"); var configuration = Argument("configuration", "Release"); var rootDirectory = new DirectoryPath(".."); var sln = rootDirectory.CombineWithFilePath("osu.sln"); var desktopSlnf = rootDirectory.CombineWithFilePath("osu.Desktop.slnf"); /////////////////////////////////////////////////////////////////////////////// // TASKS /////////////////////////////////////////////////////////////////////////////// // windows only because both inspectcode and nvika depend on net45 Task("InspectCode") .WithCriteria(IsRunningOnWindows()) .Does(() => { InspectCode(desktopSlnf, new InspectCodeSettings { CachesHome = "inspectcode", OutputFile = "inspectcodereport.xml", ArgumentCustomization = arg => { if (AppVeyor.IsRunningOnAppVeyor) // Don't flood CI output arg.Append("--verbosity:WARN"); return arg; }, }); int returnCode = StartProcess(nVikaToolPath, $@"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors"); if (returnCode != 0) throw new Exception($"inspectcode failed with return code {returnCode}"); }); Task("CodeFileSanity") .Does(() => { ValidateCodeSanity(new ValidateCodeSanitySettings { RootDirectory = rootDirectory.FullPath, IsAppveyorBuild = AppVeyor.IsRunningOnAppVeyor }); }); Task("CodeAnalysis") .IsDependentOn("CodeFileSanity") .IsDependentOn("InspectCode"); RunTarget(target);
mit
C#
95f37e35fdfc7ecb8b98d2304930f5cd167ea5a3
Fix for CA1826 Enumerable.First
pakdev/roslyn-analyzers,mavasani/roslyn-analyzers,dotnet/roslyn-analyzers,pakdev/roslyn-analyzers,mavasani/roslyn-analyzers,dotnet/roslyn-analyzers
src/Microsoft.NetCore.Analyzers/Core/Runtime/DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectly.Fixer.cs
src/Microsoft.NetCore.Analyzers/Core/Runtime/DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectly.Fixer.cs
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Operations; using Microsoft.CodeAnalysis.Text; using System.Collections.Immutable; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace Microsoft.NetCore.Analyzers.Runtime { /// <summary> /// RS0014: Do not use Enumerable methods on indexable collections. Instead use the collection directly /// </summary> public abstract class DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyFixer : CodeFixProvider { public sealed override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyAnalyzer.RuleId); public sealed override FixAllProvider GetFixAllProvider() { // See https://github.com/dotnet/roslyn/blob/master/docs/analyzers/FixAllProvider.md for more information on Fix All Providers return WellKnownFixAllProviders.BatchFixer; } public sealed override Task RegisterCodeFixesAsync(CodeFixContext context) { var diagnostic = context.Diagnostics[0]; var codeAction = CodeAction.Create("Use indexer", c => UseCollectionDirectly(context.Document, context.Span, c)); context.RegisterCodeFix(codeAction, diagnostic); // Fixer not yet implemented. return Task.CompletedTask; } private async Task<Document> UseCollectionDirectly(Document document, TextSpan span, CancellationToken c) { var syntaxRoot = await document.GetSyntaxRootAsync(c); var semanticModel = await document.GetSemanticModelAsync(c); var invocationSyntax = GetSyntaxOfType<InvocationExpressionSyntax>(syntaxRoot.FindNode(span)); var invocationOp = (IInvocationOperation)semanticModel.GetOperation(invocationSyntax); //implemented for "Enumerable.First" only if (invocationOp.TargetMethod.Name != "First") { return document; } var collectionSyntax = GetSyntaxOfType<ExpressionSyntax>(invocationOp.Arguments[0].Syntax); var generator = SyntaxGenerator.GetGenerator(document); var trailing = collectionSyntax.GetTrailingTrivia(); collectionSyntax = collectionSyntax.WithTrailingTrivia(SyntaxTriviaList.Empty); var indexSyntax = generator.LiteralExpression(0); var elementAccessSyntax = generator.ElementAccessExpression(collectionSyntax, indexSyntax).WithTrailingTrivia(trailing); var newSyntaxRoot = syntaxRoot.ReplaceNode(invocationSyntax, elementAccessSyntax); return document.WithSyntaxRoot(newSyntaxRoot); } private T GetSyntaxOfType<T>(SyntaxNode node) { if (!(node is T result)) { result = node .ChildNodes() .OfType<T>() .First(); } return result; } } }
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.CodeFixes; using System.Collections.Immutable; using System.Threading.Tasks; namespace Microsoft.NetCore.Analyzers.Runtime { /// <summary> /// RS0014: Do not use Enumerable methods on indexable collections. Instead use the collection directly /// </summary> public abstract class DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyFixer : CodeFixProvider { public sealed override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyAnalyzer.RuleId); public sealed override FixAllProvider GetFixAllProvider() { // See https://github.com/dotnet/roslyn/blob/master/docs/analyzers/FixAllProvider.md for more information on Fix All Providers return WellKnownFixAllProviders.BatchFixer; } public sealed override Task RegisterCodeFixesAsync(CodeFixContext context) { // Fixer not yet implemented. return Task.CompletedTask; } } }
mit
C#
93f629e61e3241f8cf9621aef09b5df33426d5a0
Bump version.
mios-fi/mios.mail.templating
Library/Properties/AssemblyInfo.cs
Library/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Mios.Mail.Templating")] [assembly: AssemblyDescription("Library for generating e-mails from Razor templates")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Mios e-Solutions")] [assembly: AssemblyProduct("Mios.Mail.Templating")] [assembly: AssemblyCopyright("Copyright © Mios e-Solutions")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("75b050cf-1ef2-4409-b059-04fa5466001b")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.4.0.0")] [assembly: AssemblyFileVersion("2.4.0.0")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Mios.Mail.Templating")] [assembly: AssemblyDescription("Library for generating e-mails from Razor templates")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Mios e-Solutions")] [assembly: AssemblyProduct("Mios.Mail.Templating")] [assembly: AssemblyCopyright("Copyright © Mios e-Solutions")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("75b050cf-1ef2-4409-b059-04fa5466001b")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.2.1.0")] [assembly: AssemblyFileVersion("2.2.1.0")]
bsd-2-clause
C#
d21e5d4ec305a4197080030535551b4e74dce3be
Fix event
DaggerES/LunaMultiPlayer,gavazquez/LunaMultiPlayer,gavazquez/LunaMultiPlayer,gavazquez/LunaMultiPlayer
LmpClient/Harmony/Part_Decouple.cs
LmpClient/Harmony/Part_Decouple.cs
using Harmony; using LmpClient.Events; // ReSharper disable All namespace LmpClient.Harmony { /// <summary> /// This harmony patch is intended to trigger an event when decoupling a part /// </summary> [HarmonyPatch(typeof(Part))] [HarmonyPatch("decouple")] public class Part_Decouple { [HarmonyPrefix] private static void PrefixDecouple(Part __instance, float breakForce, ref Vessel __state) { __state = __instance.vessel; PartEvent.onPartDecoupling.Fire(__instance, breakForce); } [HarmonyPostfix] private static void PostfixDecouple(Part __instance, float breakForce, ref Vessel __state) { PartEvent.onPartDecoupled.Fire(__instance, breakForce, __state); } } }
using Harmony; using LmpClient.Events; // ReSharper disable All namespace LmpClient.Harmony { /// <summary> /// This harmony patch is intended to trigger an event when decoupling a part /// </summary> [HarmonyPatch(typeof(Part))] [HarmonyPatch("decouple")] public class Part_Decouple { [HarmonyPrefix] private static void PrefixDecouple(Part __instance, float breakForce, Vessel __state) { __state = __instance.vessel; PartEvent.onPartDecoupling.Fire(__instance, breakForce); } [HarmonyPostfix] private static void PostfixDecouple(Part __instance, float breakForce, Vessel __state) { PartEvent.onPartDecoupled.Fire(__instance, breakForce, __state); } } }
mit
C#
1570deefae3e560568d071ae5cb171b1e90d8cff
Add some default text to the report issue link
kamsar/Unicorn,kamsar/Unicorn
src/Unicorn/ControlPanel/Controls/QuickReference.cs
src/Unicorn/ControlPanel/Controls/QuickReference.cs
using System.Web.UI; using Sitecore.Configuration; namespace Unicorn.ControlPanel.Controls { /// <summary> /// Quick reference about what commands mean /// </summary> internal class QuickReference : IControlPanelControl { public void Render(HtmlTextWriter writer) { writer.Write(@" <article>"); writer.Write(@" <h2>Reference</h2>"); writer.Write("<section>"); writer.Write("<h3>What is Sync?</h3>"); writer.Write("<p>Runs a synchronization operation, which will sync serialized items into Sitecore. The serialized state is merged into the database state, making additions, modifications, and deletions (in some cases) as needed.</p>"); writer.Write("<p class=\"help\">Note: if you only need to sync part of a configuration, you can use the <em>Update Tree</em> command on the Developer tab of the Sitecore ribbon. When used on a Unicorn item, it performs a partial sync."); writer.Write("</section>"); writer.Write("<section>"); writer.Write("<h3>What is Reserialize?</h3>"); writer.Write("<p>This clears the serialized data and refills it with the items in the Sitecore database. This should be done if you add or remove items from your predicate after initial serialization.</p>"); writer.Write("<p class=\"help\">Note: if you only need to reserialize part of a configuration, you can use the <em>Dump Tree</em> command on the Developer tab of the Sitecore ribbon. When used on a Unicorn item, it performs a partial reserialize."); writer.Write("</section>"); writer.Write("<section>"); writer.Write("<h3>Documentation</h3>"); writer.Write("<p>Looking for something else? Here are some places to get help.</p>"); writer.Write(@" <ul> <li><a href=""https://github.com/kamsar/Unicorn/blob/master/Build/Unicorn.nuget/readme.txt"">Unicorn Getting Started/Installation</a></li> <li><a href=""https://github.com/kamsar/Unicorn/blob/master/README.md"">Unicorn Documentation</a></li> <li><a href=""https://github.com/kamsar/Unicorn/tree/master/src/Unicorn/Standard%20Config%20Files"">Default Configuration Files</a></li> <li><a href=""http://kamsar.net/index.php/category/Unicorn/"">Unicorn Blog Posts</a></li> <li><a href=""https://visualstudiogallery.msdn.microsoft.com/64439022-f470-422a-b663-fbb89aaf6e86"">Unicorn Control Panel for Visual Studio</a></li> <li><a href=""https://github.com/kamsar/Unicorn/issues/new?title=Issue with Unicorn {0} on Sitecore {1}&amp;body=Please include what you were doing before the issue occurred, complete text of any error messages, and if appropriate your Unicorn configuration setup. Thanks!"">Found a problem? Report an issue on GitHub.</a></li> </ul> ", UnicornVersion.Current, About.Version); writer.Write("</section>"); writer.Write(@" </article>"); } } }
using System.Web.UI; namespace Unicorn.ControlPanel.Controls { /// <summary> /// Quick reference about what commands mean /// </summary> internal class QuickReference : IControlPanelControl { public void Render(HtmlTextWriter writer) { writer.Write(@" <article>"); writer.Write(@" <h2>Reference</h2>"); writer.Write("<section>"); writer.Write("<h3>What is Sync?</h3>"); writer.Write("<p>Runs a synchronization operation, which will sync serialized items into Sitecore. The serialized state is merged into the database state, making additions, modifications, and deletions (in some cases) as needed.</p>"); writer.Write("<p class=\"help\">Note: if you only need to sync part of a configuration, you can use the <em>Update Tree</em> command on the Developer tab of the Sitecore ribbon. When used on a Unicorn item, it performs a partial sync."); writer.Write("</section>"); writer.Write("<section>"); writer.Write("<h3>What is Reserialize?</h3>"); writer.Write("<p>This clears the serialized data and refills it with the items in the Sitecore database. This should be done if you add or remove items from your predicate after initial serialization.</p>"); writer.Write("<p class=\"help\">Note: if you only need to reserialize part of a configuration, you can use the <em>Dump Tree</em> command on the Developer tab of the Sitecore ribbon. When used on a Unicorn item, it performs a partial reserialize."); writer.Write("</section>"); writer.Write("<section>"); writer.Write("<h3>Documentation</h3>"); writer.Write("<p>Looking for something else? Here are some places to get help.</p>"); writer.Write(@" <ul> <li><a href=""https://github.com/kamsar/Unicorn/blob/master/Build/Unicorn.nuget/readme.txt"">Unicorn Getting Started/Installation</a></li> <li><a href=""https://github.com/kamsar/Unicorn/blob/master/README.md"">Unicorn Documentation</a></li> <li><a href=""https://github.com/kamsar/Unicorn/tree/master/src/Unicorn/Standard%20Config%20Files"">Default Configuration Files</a></li> <li><a href=""http://kamsar.net/index.php/category/Unicorn/"">Unicorn Blog Posts</a></li> <li><a href=""https://visualstudiogallery.msdn.microsoft.com/64439022-f470-422a-b663-fbb89aaf6e86"">Unicorn Control Panel for Visual Studio</a></li> <li><a href=""https://github.com/kamsar/Unicorn/issues/new"">Found a problem? Report an issue on GitHub.</a></li> </ul> "); writer.Write("</section>"); writer.Write(@" </article>"); } } }
mit
C#
c54e746370bd0ac8dc9136a7c329d835d82d0a0f
Integrate cell resources with player resources code
MarjieVolk/Backfire
Assets/CellFeatures/NurseryResource.cs
Assets/CellFeatures/NurseryResource.cs
using UnityEngine; using System.Collections; public class NurseryResource : CellFeature { public override int Amount { set { _amount = value; FindObjectOfType<Resources>().addPlacementResource(_amount - value); } } // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
using UnityEngine; using System.Collections; public class NurseryResource : CellFeature { public override int Amount { set { // add _amount - value to the player's resource store _amount = value; Debug.Log("child thingy"); } } // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
mit
C#
e8f0f9a8cec01995fdbb74089f51a7933b64d738
use routing in aspnet core tests
luchaoshuai/aspnetboilerplate,verdentk/aspnetboilerplate,carldai0106/aspnetboilerplate,ryancyq/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,carldai0106/aspnetboilerplate,ryancyq/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,carldai0106/aspnetboilerplate,luchaoshuai/aspnetboilerplate,verdentk/aspnetboilerplate,ryancyq/aspnetboilerplate,ilyhacker/aspnetboilerplate,ilyhacker/aspnetboilerplate,ryancyq/aspnetboilerplate,ilyhacker/aspnetboilerplate,carldai0106/aspnetboilerplate,verdentk/aspnetboilerplate
test/Abp.AspNetCore.Tests/App/Startup.cs
test/Abp.AspNetCore.Tests/App/Startup.cs
using System; using Abp.AspNetCore.Configuration; using Abp.AspNetCore.Mvc.Extensions; using Abp.AspNetCore.TestBase; using Abp.Reflection.Extensions; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace Abp.AspNetCore.App { public class Startup { public IServiceProvider ConfigureServices(IServiceCollection services) { var mvc = services.AddMvc().AddXmlSerializerFormatters(); mvc.PartManager.ApplicationParts.Add(new AssemblyPart(typeof(AbpAspNetCoreModule).GetAssembly())); //Configure Abp and Dependency Injection return services.AddAbp<AppModule>(options => { //Test setup options.SetupTest(); }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseAbp(); //Initializes ABP framework. app.UseRouting(); app.UseEndpoints(endpoints => { app.ApplicationServices.GetRequiredService<IAbpAspNetCoreConfiguration>() .EndpointConfiguration .ConfigureAllEndpoints(endpoints); }); } } }
using System; using Abp.AspNetCore.Configuration; using Abp.AspNetCore.Mvc.Extensions; using Abp.AspNetCore.TestBase; using Abp.Reflection.Extensions; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace Abp.AspNetCore.App { public class Startup { public IServiceProvider ConfigureServices(IServiceCollection services) { var mvc = services.AddMvc().AddXmlSerializerFormatters(); mvc.PartManager.ApplicationParts.Add(new AssemblyPart(typeof(AbpAspNetCoreModule).GetAssembly())); //Configure Abp and Dependency Injection return services.AddAbp<AppModule>(options => { //Test setup options.SetupTest(); }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseAbp(); //Initializes ABP framework. app.UseEndpoints(endpoints => { app.ApplicationServices.GetRequiredService<IAbpAspNetCoreConfiguration>() .EndpointConfiguration .ConfigureAllEndpoints(endpoints); }); } } }
mit
C#
95fbf5a7c0e4a1ae9a2bb21c689e10479ccc527c
bump version
0x53A/PropertyChanged,user1568891/PropertyChanged,Fody/PropertyChanged
CommonAssemblyInfo.cs
CommonAssemblyInfo.cs
using System.Reflection; [assembly: AssemblyTitle("PropertyChanged")] [assembly: AssemblyProduct("PropertyChanged")] [assembly: AssemblyCompany("Simon Cropp and Contributors")] [assembly: AssemblyDescription("Fody add-in for injecting INotifyPropertyChanged code into properties.")] [assembly: AssemblyVersion("1.50.0")] [assembly: AssemblyFileVersion("1.50.0")]
using System.Reflection; [assembly: AssemblyTitle("PropertyChanged")] [assembly: AssemblyProduct("PropertyChanged")] [assembly: AssemblyCompany("Simon Cropp and Contributors")] [assembly: AssemblyDescription("Fody add-in for injecting INotifyPropertyChanged code into properties.")] [assembly: AssemblyVersion("1.49.1")] [assembly: AssemblyFileVersion("1.49.1")]
mit
C#
40e6b68367ddd71edcb31664a54a9db42eb5b61d
Fix casing of jQuery validation fallback test
pakrym/kudutest,pakrym/kudutest,aspnet/live.asp.net,reactiveui/website,sejka/live.asp.net,aspnet/live.asp.net,sejka/live.asp.net,reactiveui/website,aspnet/live.asp.net,reactiveui/website,reactiveui/website
src/live.asp.net/Views/Shared/_ValidationScripts.cshtml
src/live.asp.net/Views/Shared/_ValidationScripts.cshtml
<environment names="Development"> <script src="~/lib/jquery-validation/jquery.validate.js"></script> <script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script> </environment> <environment names="Staging,Production"> <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js" asp-fallback-src="~/lib/jquery-validation/jquery.validate.js" asp-fallback-test="window.jQuery && window.jQuery.validator"> </script> <script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js" asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js" asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"> </script> </environment>
<environment names="Development"> <script src="~/lib/jquery-validation/jquery.validate.js"></script> <script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script> </environment> <environment names="Staging,Production"> <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js" asp-fallback-src="~/lib/jquery-validation/jquery.validate.js" asp-fallback-test="window.jquery && window.jquery.validator"> </script> <script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js" asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js" asp-fallback-test="window.jquery && window.jquery.validator && window.jquery.validator.unobtrusive"> </script> </environment>
mit
C#
b4976cfcd1712cdf3a27f228f2f5358d10e83a38
Implement IComparable interface for sorting
jsvasani/TFSHistorySearch
TfsHelper/TfsChangeset.cs
TfsHelper/TfsChangeset.cs
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TfsHelperLib { public class TfsChangeset : IComparable { public int ChangesetId { get; set; } public string Owner { get; set; } public DateTime CreationDate { get; set; } public string Comment { get; set; } public string Changes_0_ServerItem { get; set; } public int CompareTo(object obj) { return ChangesetId.CompareTo(((TfsChangeset)obj).ChangesetId); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TfsHelperLib { public class TfsChangeset { public int ChangesetId { get; set; } public string Owner { get; set; } public DateTime CreationDate { get; set; } public string Comment { get; set; } public string Changes_0_ServerItem { get; set; } } }
mit
C#
45472614ce77679a84ddcd4524c187f7255254f9
Add test log row
michael-reichenauer/GitMind
GitMind/MainWindowViews/WindowOwner.cs
GitMind/MainWindowViews/WindowOwner.cs
using System; using System.Windows; using GitMind.Utils; namespace GitMind.MainWindowViews { [SingleInstance] internal class WindowOwner { private readonly Lazy<MainWindow> mainWindow; public WindowOwner(Lazy<MainWindow> mainWindow) { this.mainWindow = mainWindow; } public static implicit operator Window(WindowOwner owner) => owner.Window; public Window Window { get { if (Application.Current?.MainWindow is MainWindow) { return mainWindow.Value; } Log.Warn("Main Window is null"); return null; } } public System.Windows.Forms.IWin32Window Win32Window { get { var source = PresentationSource.FromVisual(Window) as System.Windows.Interop.HwndSource; System.Windows.Forms.IWin32Window win = new OldWindow(source.Handle); return win; } } private class OldWindow : System.Windows.Forms.IWin32Window { private readonly IntPtr _handle; public OldWindow(IntPtr handle) { _handle = handle; } IntPtr System.Windows.Forms.IWin32Window.Handle => _handle; } } }
using System; using System.Windows; using GitMind.Utils; namespace GitMind.MainWindowViews { [SingleInstance] internal class WindowOwner { private readonly Lazy<MainWindow> mainWindow; public WindowOwner(Lazy<MainWindow> mainWindow) { this.mainWindow = mainWindow; } public static implicit operator Window(WindowOwner owner) => owner.Window; public Window Window { get { if (Application.Current?.MainWindow is MainWindow) { return mainWindow.Value; } return null; } } public System.Windows.Forms.IWin32Window Win32Window { get { var source = PresentationSource.FromVisual(Window) as System.Windows.Interop.HwndSource; System.Windows.Forms.IWin32Window win = new OldWindow(source.Handle); return win; } } private class OldWindow : System.Windows.Forms.IWin32Window { private readonly IntPtr _handle; public OldWindow(IntPtr handle) { _handle = handle; } IntPtr System.Windows.Forms.IWin32Window.Handle => _handle; } } }
mit
C#
de6dbea40aceb695cfadb4b1394313f60eca32df
fix namespace
darrenkopp/SassyStudio
SassyStudio.2012/Resources.Designer.cs
SassyStudio.2012/Resources.Designer.cs
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:2.0.50727.42 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace SassyStudio { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DarrenKopp.SassyStudioPackage.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:2.0.50727.42 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace DarrenKopp.SassyStudioPackage { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DarrenKopp.SassyStudioPackage.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
mit
C#
380f5b6d41769b6d0a40e46614d1251189e54c12
Use CustomAlignedContainer to handle ImageViewBackend events
cra0zy/xwt,lytico/xwt,hamekoz/xwt,antmicro/xwt,mono/xwt,hwthomas/xwt,TheBrainTech/xwt
Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs
Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs
// // ImageViewBackend.cs // // Author: // Lluis Sanchez <lluis@xamarin.com> // // Copyright (c) 2011 Xamarin Inc // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using AppKit; using Xwt.Backends; namespace Xwt.Mac { public class ImageViewBackend: ViewBackend<NSView,IWidgetEventSink>, IImageViewBackend { CustomAlignedContainer Container { get { return (CustomAlignedContainer)base.Widget; } } public new NSImageView Widget { get { return (NSImageView)Container.Child; } } public ImageViewBackend () { } public override void Initialize () { base.Initialize (); ViewObject = new CustomAlignedContainer (EventSink, ApplicationContext, new NSImageView ()); } protected override Size GetNaturalSize () { NSImage img = Widget.Image; return img == null ? Size.Zero : img.Size.ToXwtSize (); } public void SetImage (ImageDescription image) { if (image.IsNull) { Widget.Image = null; return; } Widget.Image = image.ToNSImage (); Widget.SetFrameSize (Widget.Image.Size); } } }
// // ImageViewBackend.cs // // Author: // Lluis Sanchez <lluis@xamarin.com> // // Copyright (c) 2011 Xamarin Inc // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using AppKit; using Xwt.Backends; namespace Xwt.Mac { public class ImageViewBackend: ViewBackend<NSImageView,IWidgetEventSink>, IImageViewBackend { public ImageViewBackend () { } public override void Initialize () { base.Initialize (); ViewObject = new CustomNSImageView (); } protected override Size GetNaturalSize () { NSImage img = Widget.Image; return img == null ? Size.Zero : img.Size.ToXwtSize (); } public void SetImage (ImageDescription image) { if (image.IsNull) { Widget.Image = null; return; } Widget.Image = image.ToNSImage (); Widget.SetFrameSize (Widget.Image.Size); } } class CustomNSImageView: NSImageView, IViewObject { public NSView View { get { return this; } } public ViewBackend Backend { get; set; } public override void ResetCursorRects () { base.ResetCursorRects (); if (Backend.Cursor != null) AddCursorRect (Bounds, Backend.Cursor); } } }
mit
C#
b60ccec34933fdc44ced6061068c82ec262476ad
Bump version to 0.11.1
quisquous/cactbot,quisquous/cactbot,quisquous/cactbot,quisquous/cactbot,quisquous/cactbot,quisquous/cactbot
CactbotOverlay/Properties/AssemblyInfo.cs
CactbotOverlay/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("CactbotOverlay")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CactbotOverlay")] [assembly: AssemblyCopyright("Copyright 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("a7324717-0785-49ac-95e9-dc01bd7fbe7c")] // Version: // - Major Version // - Minor Version // - Build Number // - Revision // GitHub has only 3 version components, so Revision should always be 0. [assembly: AssemblyVersion("0.11.1.0")] [assembly: AssemblyFileVersion("0.11.1.0")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("CactbotOverlay")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CactbotOverlay")] [assembly: AssemblyCopyright("Copyright 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("a7324717-0785-49ac-95e9-dc01bd7fbe7c")] // Version: // - Major Version // - Minor Version // - Build Number // - Revision // GitHub has only 3 version components, so Revision should always be 0. [assembly: AssemblyVersion("0.11.0.0")] [assembly: AssemblyFileVersion("0.11.0.0")]
apache-2.0
C#
c86bd26e0ef4786f7f9ecfa7415df9d6d7e2dd2d
Delete previous files
sakapon/Samples-2013
BasicSample/ExcelMediaConsole/Program.cs
BasicSample/ExcelMediaConsole/Program.cs
using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; namespace ExcelMediaConsole { class Program { static void Main(string[] args) { var excelFilePath = "Book1.xlsx"; var outputDirPath = "Media"; Directory.CreateDirectory(outputDirPath); using (var archive = ZipFile.OpenRead(excelFilePath)) { // In case of Excel, the path separator is "/" not "\". var query = archive.Entries .Where(e => e.FullName.StartsWith("xl/media/", StringComparison.InvariantCultureIgnoreCase)); foreach (var entry in query) { var filePath = Path.Combine(outputDirPath, entry.Name); entry.ExtractToFile(filePath, true); } } } static void ExtractAndZip() { var targetFilePath = "Book1.xlsx"; var extractDirPath = "Book1"; var zipFilePath = "Book1.zip"; if (Directory.Exists(extractDirPath)) { Directory.Delete(extractDirPath, true); } ZipFile.ExtractToDirectory(targetFilePath, extractDirPath); File.Delete(zipFilePath); ZipFile.CreateFromDirectory(extractDirPath, zipFilePath); } } }
using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; namespace ExcelMediaConsole { class Program { static void Main(string[] args) { var excelFilePath = "Book1.xlsx"; var outputDirPath = "Media"; Directory.CreateDirectory(outputDirPath); using (var archive = ZipFile.OpenRead(excelFilePath)) { // In case of Excel, the path separator is "/" not "\". var query = archive.Entries .Where(e => e.FullName.StartsWith("xl/media/", StringComparison.InvariantCultureIgnoreCase)); foreach (var entry in query) { var filePath = Path.Combine(outputDirPath, entry.Name); entry.ExtractToFile(filePath, true); } } } static void ExtractAndZip() { var targetFilePath = "Book1.xlsx"; var extractDirPath = "Book1"; var zipFilePath = "Book1.zip"; ZipFile.ExtractToDirectory(targetFilePath, extractDirPath); ZipFile.CreateFromDirectory(extractDirPath, zipFilePath); } } }
mit
C#
6a433850145c487fe1db09ab9655fc685713050c
Change IGuild parameter to ulong
Nanabell/NoAdsHere
NoAdsHere/Commands/Master/MasterModule.cs
NoAdsHere/Commands/Master/MasterModule.cs
using System.Threading.Tasks; using Discord; using Discord.Commands; using NoAdsHere.Common; using NoAdsHere.Common.Preconditions; namespace NoAdsHere.Commands.Master { public class MasterModule : ModuleBase { [Command("Reset Guild")] [RequirePermission(AccessLevel.Master)] public async Task Reset(ulong guildId) { await Task.CompletedTask; } } }
using System.Threading.Tasks; using Discord; using Discord.Commands; using NoAdsHere.Common; using NoAdsHere.Common.Preconditions; namespace NoAdsHere.Commands.Master { public class MasterModule : ModuleBase { [Command("Reset Guild")] [RequirePermission(AccessLevel.Master)] public async Task Reset(IGuild guild) { await Task.CompletedTask; } } }
mit
C#
a32cb1b8db80cec2bdd168fa00bdf2432ccdfa26
Use correct JSON Converter
Baggykiin/Curse.NET
Curse.NET/SocketModel/MessageResponse.cs
Curse.NET/SocketModel/MessageResponse.cs
using System; using Newtonsoft.Json; namespace Curse.NET.SocketModel { public class MessageResponse : ResponseBody { public string ClientID { get; set; } public string ServerID { get; set; } public string ConversationID { get; set; } public string ContactID { get; set; } public int ConversationType { get; set; } public string RootConversationID { get; set; } [JsonConverter(typeof(MillisecondEpochConverter))] public DateTime Timestamp { get; set; } public int SenderID { get; set; } public string SenderName { get; set; } public int SenderPermissions { get; set; } public int[] SenderRoles { get; set; } public int SenderVanityRole { get; set; } public object[] Mentions { get; set; } public int RecipientID { get; set; } public string Body { get; set; } public bool IsDeleted { get; set; } [JsonConverter(typeof(MicrosecondEpochConverter))] public DateTime DeletedTimestamp { get; set; } public int DeletedUserID { get; set; } public object DeletedUsername { get; set; } [JsonConverter(typeof(MillisecondEpochConverter))] public DateTime EditedTimestamp { get; set; } public int EditedUserID { get; set; } public object EditedUsername { get; set; } public int LikeCount { get; set; } public object[] LikeUserIDs { get; set; } public object[] LikeUsernames { get; set; } public object[] ContentTags { get; set; } public object[] Attachments { get; set; } public int NotificationType { get; set; } public object[] EmoteSubstitutions { get; set; } public object ExternalChannelID { get; set; } public object ExternalUserID { get; set; } public object ExternalUsername { get; set; } public object ExternalUserDisplayName { get; set; } public object ExternalUserColor { get; set; } public object[] Badges { get; set; } public int BitsUsed { get; set; } public override string ToString() => $"{SenderName}: {Body}"; } }
using System; using Newtonsoft.Json; namespace Curse.NET.SocketModel { public class MessageResponse : ResponseBody { public string ClientID { get; set; } public string ServerID { get; set; } public string ConversationID { get; set; } public string ContactID { get; set; } public int ConversationType { get; set; } public string RootConversationID { get; set; } [JsonConverter(typeof(MicrosecondEpochConverter))] public DateTime Timestamp { get; set; } public int SenderID { get; set; } public string SenderName { get; set; } public int SenderPermissions { get; set; } public int[] SenderRoles { get; set; } public int SenderVanityRole { get; set; } public object[] Mentions { get; set; } public int RecipientID { get; set; } public string Body { get; set; } public bool IsDeleted { get; set; } [JsonConverter(typeof(MicrosecondEpochConverter))] public DateTime DeletedTimestamp { get; set; } public int DeletedUserID { get; set; } public object DeletedUsername { get; set; } [JsonConverter(typeof(MicrosecondEpochConverter))] public DateTime EditedTimestamp { get; set; } public int EditedUserID { get; set; } public object EditedUsername { get; set; } public int LikeCount { get; set; } public object[] LikeUserIDs { get; set; } public object[] LikeUsernames { get; set; } public object[] ContentTags { get; set; } public object[] Attachments { get; set; } public int NotificationType { get; set; } public object[] EmoteSubstitutions { get; set; } public object ExternalChannelID { get; set; } public object ExternalUserID { get; set; } public object ExternalUsername { get; set; } public object ExternalUserDisplayName { get; set; } public object ExternalUserColor { get; set; } public object[] Badges { get; set; } public int BitsUsed { get; set; } public override string ToString() => $"{SenderName}: {Body}"; } }
mit
C#
4a0bc6be92d107675a40e24eae60e2b79f6a264f
Remove unused field
mika76/mamesaver
Mamesaver/MultiFormApplicationContext.cs
Mamesaver/MultiFormApplicationContext.cs
using System.Collections.Generic; using System.Threading; using System.Windows.Forms; namespace Mamesaver { public class MultiFormApplicationContext : ApplicationContext { private int _openForms; public MultiFormApplicationContext(List<Form> forms) { foreach (var form in forms) { form.FormClosed += FormClosed; form.Show(); _openForms++; } } private void FormClosed(object sender, FormClosedEventArgs args) { //When we have closed the last of the "starting" forms, //end the program. if (Interlocked.Decrement(ref _openForms) == 0) ExitThread(); } } }
using System.Collections.Generic; using System.Threading; using System.Windows.Forms; namespace Mamesaver { public class MultiFormApplicationContext : ApplicationContext { private readonly List<Form> _forms; private int _openForms; public MultiFormApplicationContext(List<Form> forms) { _forms = forms; foreach (var form in forms) { form.FormClosed += FormClosed; form.Show(); _openForms++; } } private void FormClosed(object sender, FormClosedEventArgs args) { //When we have closed the last of the "starting" forms, //end the program. if (Interlocked.Decrement(ref _openForms) == 0) ExitThread(); } } }
mit
C#
0292dd400c6f6ac75cd36ba4e275323cd8a9556d
Add classes for Formula
sakapon/Samples-2016,sakapon/Samples-2016
MathSample/NumberGuessConsole/Program.cs
MathSample/NumberGuessConsole/Program.cs
using System; using System.Collections.Generic; using System.Linq; using Blaze.Propositions; using static Blaze.Propositions.Formula; namespace NumberGuessConsole { class Program { static void Main(string[] args) { } } public static class FormulaHelper { // formula の中から変数を取得します。なければ作成します。 public static VariableFormula<TStatement> GetVariable<TStatement>(this Formula formula, TStatement statement) => formula.GetDescendants() .OfType<VariableFormula<TStatement>>() .Distinct() .Where(v => Equals(v.Statement, statement)) .FirstOrDefault() ?? Variable(statement); public static VariableFormula<TStatement> GetVariable<TStatement>(this Formula formula, VariableFormula<TStatement> variable) => formula.GetVariable(variable.Statement); public static VariableFormula<TStatement> CreateProposition<TStatement>(TStatement statement, bool? truthValue) { var v = Variable(statement); v.Value = truthValue; return v; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NumberGuessConsole { class Program { static void Main(string[] args) { } } }
mit
C#
68986cdc42332c63a3141b6cca4a45a1536ef869
remove unused args
Pondidum/NuCache,Pondidum/NuCache,Pondidum/NuCache
NuCache/Controllers/PackageController.cs
NuCache/Controllers/PackageController.cs
using System; using System.IO; using System.Net.Http; using System.Net.Http.Headers; using System.Reflection; using System.Threading.Tasks; using System.Web.Http; using System.Xml.Linq; using NuCache.Infrastructure; namespace NuCache.Controllers { public class PackagesController : ApiController { private readonly PackageCache _cache; private readonly WebClient _client; public PackagesController(PackageCache cache, WebClient client) { _cache = cache; _client = client; } private Uri BuildUri(Uri input) { var builder = new UriBuilder(input); builder.Host = "nuget.org"; builder.Port = -1; return builder.Uri; } [HttpGet] public async Task<HttpResponseMessage> Get() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> Metadata() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> List() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> Search() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> FindPackagesByID() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> GetPackageByID() { var result = await _client.GetResponseAsync(BuildUri(Request.RequestUri)); //not certain why this gets missed by the web client on a download var name = Path.GetFileName(result.RequestMessage.RequestUri.AbsolutePath); result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") { FileName = name}; return result; } } }
using System; using System.IO; using System.Net.Http; using System.Net.Http.Headers; using System.Reflection; using System.Threading.Tasks; using System.Web.Http; using System.Xml.Linq; using NuCache.Infrastructure; namespace NuCache.Controllers { public class PackagesController : ApiController { private readonly PackageCache _cache; private readonly WebClient _client; public PackagesController(PackageCache cache, WebClient client) { _cache = cache; _client = client; } private Uri BuildUri(Uri input) { var builder = new UriBuilder(input); builder.Host = "nuget.org"; builder.Port = -1; return builder.Uri; } [HttpGet] public async Task<HttpResponseMessage> Get() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> Metadata() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> List() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> Search() { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> FindPackagesByID(string id) { return await _client.GetResponseAsync(BuildUri(Request.RequestUri)); } [HttpGet] public async Task<HttpResponseMessage> GetPackageByID(string packageID, string version) { var result = await _client.GetResponseAsync(BuildUri(Request.RequestUri)); //not certain why this gets missed by the web client on a download var name = Path.GetFileName(result.RequestMessage.RequestUri.AbsolutePath); result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") { FileName = name}; return result; } } }
lgpl-2.1
C#
92294677af403b460f3bbe5e3fbe48a35c2e8bb5
remove unused imports
Pondidum/NuCache,Pondidum/NuCache,Pondidum/NuCache
NuCache/Controllers/PackageController.cs
NuCache/Controllers/PackageController.cs
using System.Net.Http; using System.Web.Http; using System.Threading.Tasks; namespace NuCache.Controllers { public class PackagesController : ApiController { private readonly IPackageSource _packageSource; public PackagesController(IPackageSource source) { _packageSource = source; } [HttpGet] public async Task<HttpResponseMessage> Get() { return await _packageSource.Get(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> Metadata() { return await _packageSource.Metadata(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> List() { return await _packageSource.List(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> Search() { return await _packageSource.Search(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> FindPackagesByID() { return await _packageSource.FindPackagesByID(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> GetPackageByID() { return await _packageSource.GetPackageByID(Request.RequestUri); } } }
using System.Net.Http; using System.Web.Http; using System.Threading.Tasks; using NuCache.Infrastructure; namespace NuCache.Controllers { public class PackagesController : ApiController { private readonly IPackageSource _packageSource; public PackagesController(IPackageSource source) { _packageSource = source; } [HttpGet] public async Task<HttpResponseMessage> Get() { return await _packageSource.Get(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> Metadata() { return await _packageSource.Metadata(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> List() { return await _packageSource.List(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> Search() { return await _packageSource.Search(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> FindPackagesByID() { return await _packageSource.FindPackagesByID(Request.RequestUri); } [HttpGet] public async Task<HttpResponseMessage> GetPackageByID() { return await _packageSource.GetPackageByID(Request.RequestUri); } } }
lgpl-2.1
C#
f239aa43d8665c4709258aab9cb255a8e348e2ba
Change model reference with old namespace to new
erooijak/oogstplanner,erooijak/oogstplanner,erooijak/oogstplanner,erooijak/oogstplanner
Oogstplanner.Web/Views/Crop/Index.cshtml
Oogstplanner.Web/Views/Crop/Index.cshtml
@model IEnumerable<Oogstplanner.Models.Crop> @{ ViewBag.Title = "Gewassen"; } <div id="top"></div> <div id="yearCalendar"> <h1>Dit zijn de gewassen in onze database:</h1> <table class="table table-striped"> <tr> <th>Naam</th><th>Ras</th><th>Categorie</th><th>Opp. per 1</th> <th>Opp. per zak</th><th>Prijs per zakje</th><th>Zaaimaanden</th><th>Oogstmaanden</th> </tr> <tbody> @foreach (var crop in Model) { <tr> <td>@crop.Name</td><td>@crop.Race</td><td>@crop.Category</td><td>@crop.AreaPerCrop</td> <td>@crop.AreaPerBag</td><td>@crop.PricePerBag</td> <td>@crop.SowingMonths</td><td>@crop.HarvestingMonths</td> </tr> } </tbody> </table> </div> @Html.ActionLink("Terug naar Zaaien en oogsten", "Index", "Home", null, null)
@model IEnumerable<Zk.Models.Crop> @{ ViewBag.Title = "Gewassen"; } <div id="top"></div> <div id="yearCalendar"> <h1>Dit zijn de gewassen in onze database:</h1> <table class="table table-striped"> <tr> <th>Naam</th><th>Ras</th><th>Categorie</th><th>Opp. per 1</th> <th>Opp. per zak</th><th>Prijs per zakje</th><th>Zaaimaanden</th><th>Oogstmaanden</th> </tr> <tbody> @foreach (var crop in Model) { <tr> <td>@crop.Name</td><td>@crop.Race</td><td>@crop.Category</td><td>@crop.AreaPerCrop</td> <td>@crop.AreaPerBag</td><td>@crop.PricePerBag</td> <td>@crop.SowingMonths</td><td>@crop.HarvestingMonths</td> </tr> } </tbody> </table> </div> @Html.ActionLink("Terug naar Zaaien en oogsten", "Index", "Home", null, null)
mit
C#
02e72b76ae6ccff43d6c548e4b55b8be25779f37
Make a call using System.Net.WebClient
ShippingEasy/shipping_easy-dotnet,ShippingEasy/shipping_easy-dotnet
ShippingEasy/Client.cs
ShippingEasy/Client.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ShippingEasy { public class Client { public string Greet() { var url = "172.16.65.1:5000/api/orders?api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1421359500&api_signature=28ecb63dc43dc1246dabacf517c758152c5131f5ab3dda75b0cce6e61ba5d7d9"; var client = new System.Net.WebClient(); var query = "?api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1421362783&api_signature=325faf574c1c767cb0628968c12543de2f2c27488afab05962abd98b91849eb8"; var uri = new UriBuilder("http", "172.16.65.1", 5000, "/api/orders",query).ToString(); var response = client.DownloadString(uri); return response; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ShippingEasy { public class Client { public string Greet() { return "Hi there"; } } }
mit
C#
b7dacbd2918bde4615fa3e6c6b6da68166173ac5
Fix magboots atmos wind protection (#7663)
space-wizards/space-station-14,space-wizards/space-station-14,space-wizards/space-station-14,space-wizards/space-station-14,space-wizards/space-station-14,space-wizards/space-station-14
Content.Server/Clothing/MagbootsSystem.cs
Content.Server/Clothing/MagbootsSystem.cs
using Content.Server.Atmos.Components; using Content.Server.Clothing.Components; using Content.Shared.Alert; using Content.Shared.Clothing; using Content.Shared.Inventory.Events; namespace Content.Server.Clothing { public sealed class MagbootsSystem : SharedMagbootsSystem { [Dependency] private readonly AlertsSystem _alertsSystem = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent<MagbootsComponent, GotEquippedEvent>(OnGotEquipped); SubscribeLocalEvent<MagbootsComponent, GotUnequippedEvent>(OnGotUnequipped); } public void UpdateMagbootEffects(EntityUid parent, EntityUid uid, bool state, MagbootsComponent? component) { if (!Resolve(uid, ref component)) return; state = state && component.On; if (TryComp(parent, out MovedByPressureComponent? movedByPressure)) { movedByPressure.Enabled = !state; } if (state) { _alertsSystem.ShowAlert(parent, AlertType.Magboots); } else { _alertsSystem.ClearAlert(parent, AlertType.Magboots); } } private void OnGotUnequipped(EntityUid uid, MagbootsComponent component, GotUnequippedEvent args) { if (args.Slot == "shoes") { UpdateMagbootEffects(args.Equipee, uid, false, component); } } private void OnGotEquipped(EntityUid uid, MagbootsComponent component, GotEquippedEvent args) { if (args.Slot == "shoes") { UpdateMagbootEffects(args.Equipee, uid, true, component); } } } }
using Content.Server.Atmos.Components; using Content.Server.Clothing.Components; using Content.Shared.Alert; using Content.Shared.Clothing; using Content.Shared.Inventory.Events; namespace Content.Server.Clothing { public sealed class MagbootsSystem : SharedMagbootsSystem { [Dependency] private readonly AlertsSystem _alertsSystem = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent<MagbootsComponent, GotEquippedEvent>(OnGotEquipped); SubscribeLocalEvent<MagbootsComponent, GotUnequippedEvent>(OnGotUnequipped); } public void UpdateMagbootEffects(EntityUid parent, EntityUid uid, bool state, MagbootsComponent? component) { if (!Resolve(uid, ref component)) return; state = state && component.On; if (TryComp(parent, out MovedByPressureComponent? movedByPressure)) { movedByPressure.Enabled = state; } if (state) { _alertsSystem.ShowAlert(parent, AlertType.Magboots); } else { _alertsSystem.ClearAlert(parent, AlertType.Magboots); } } private void OnGotUnequipped(EntityUid uid, MagbootsComponent component, GotUnequippedEvent args) { if (args.Slot == "shoes") { UpdateMagbootEffects(args.Equipee, uid, false, component); } } private void OnGotEquipped(EntityUid uid, MagbootsComponent component, GotEquippedEvent args) { if (args.Slot == "shoes") { UpdateMagbootEffects(args.Equipee, uid, true, component); } } } }
mit
C#
093e5a58d5e0f5de893e2f2d98248d65dfa6b870
Fix reordering. I had accidentally put the Index hidden filed outside the <li> element.
ivanz/ASP.NET-MVC-Collection-Editing,ivanz/ASP.NET-MVC-Collection-Editing
CollectionEditing/Views/User/MovieEntryEditor.cshtml
CollectionEditing/Views/User/MovieEntryEditor.cshtml
@model CollectionEditing.Models.Movie <li style="padding-bottom:15px"> @using (Html.BeginCollectionItem("FavouriteMovies")) { <img src="@Url.Content("~/Content/images/draggable-icon.png")" style="cursor: move" alt=""/> @Html.LabelFor(model => model.Title) @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) @Html.LabelFor(model => model.Rating) @Html.EditorFor(model => model.Rating) @Html.ValidationMessageFor(model => model.Rating) <a href="#" onclick="$(this).parent().remove();">Delete</a> } </li>
@model CollectionEditing.Models.Movie @using (Html.BeginCollectionItem("FavouriteMovies")) { <li style="padding-bottom:15px"> <img src="@Url.Content("~/Content/images/draggable-icon.png")" style="cursor: move" alt=""/> @Html.LabelFor(model => model.Title) @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) @Html.LabelFor(model => model.Rating) @Html.EditorFor(model => model.Rating) @Html.ValidationMessageFor(model => model.Rating) <a href="#" onclick="$(this).parent().remove();">Delete</a> </li> }
mit
C#
26091c87ed02aac7e705746a264e62bef4dbb9f7
fix error
chinaboard/CoralSea,chinaboard/CoralSea,chinaboard/CoralSea
CoralSea/CoralSea.Business/Rank/RankLevelBusiness.cs
CoralSea/CoralSea.Business/Rank/RankLevelBusiness.cs
using CoralSea.IBusiness.Rank; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CoralSea.Model.Rank; namespace CoralSea.Business.Rank { public class RankLevelBusiness : IRankLevelBusiness { public RankLevelModel GetRankLevel(int integral) { var model = new RankLevelModel() { Integral = integral }; model.Level = GetLevel(integral); model.Crown = model.Level / 4 / 4 / 4; model.Sun = model.Level / 4 / 4 - model.Crown * 4; model.Sun = model.Sun < 0 ? 0 : model.Sun; model.Moon = model.Level / 4 - model.Sun * 4 - model.Crown * 16; model.Moon = model.Moon < 0 ? 0 : model.Moon; model.Star = model.Level - model.Moon * 4 - model.Sun * 16 - model.Crown * 64; model.Star = model.Star < 0 ? 0 : model.Star; return model; } public int GetLevel(int integral) { for (int i = 2; i < 200; i++) if (i * i + 4 * i > integral) return i - 1; return 1; } } }
using CoralSea.IBusiness.Rank; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CoralSea.Model.Rank; namespace CoralSea.Business.Rank { public class RankLevelBusiness : IRankLevelBusiness { public RankLevelModel GetRankLevel(int integral) { var model = new RankLevelModel() { Integral = integral }; model.Level = GetLevel(integral); model.Crown = model.Level / 4 / 4 / 4; model.Sun = model.Level / 4 / 4 - model.Crown * 4; model.Sun = model.Sun < 0 ? 0 : model.Sun; model.Moon = model.Level / 4 - model.Sun * 4 - model.Crown * 16; model.Moon = model.Moon < 0 ? 0 : model.Moon; model.Star = model.Level - model.Moon * 4 - model.Sun * 16 - model.Crown * 64; model.Star = model.Star < 0 ? 0 : model.Star; return model; } public int GetLevel(int integral) { for (int i = 2; i < 200; i++) if (i * i + 4 * i >= integral) return i - 1; return 1; } } }
mit
C#
5b2a1faa1d6a217281689a13fc901fb4b982d030
Move next step calculation to a property
dmweis/DynamixelServo,dmweis/DynamixelServo,dmweis/DynamixelServo,dmweis/DynamixelServo
DynamixelServo.Quadruped/BasicQuadrupedGaitEngine.cs
DynamixelServo.Quadruped/BasicQuadrupedGaitEngine.cs
using System; using System.Numerics; namespace DynamixelServo.Quadruped { public class BasicQuadrupedGaitEngine : QuadrupedGaitEngine { private const int Speed = 12; private float NextStepLength => Speed * 0.001f * TimeSincelastTick; private int _currentIndex; private readonly Vector3[] _positions = { new Vector3(-5, 5, 3), new Vector3(5, 5, -3), new Vector3(5, -5, 3), new Vector3(-5, -5, -3) }; private const float LegHeight = -11f; private const int LegDistance = 15; private Vector3 _lastWrittenPosition = Vector3.Zero; public BasicQuadrupedGaitEngine(QuadrupedIkDriver driver) : base(driver) { Driver.Setup(); Driver.StandUpfromGround(); StartEngine(); } protected override void EngineSpin() { if (_lastWrittenPosition.Similar(_positions[_currentIndex], 0.25f)) { _currentIndex++; if (_currentIndex >= _positions.Length) { _currentIndex = 0; } } _lastWrittenPosition = _lastWrittenPosition.MoveTowards(_positions[_currentIndex], NextStepLength); Driver.MoveAbsoluteCenterMass(_lastWrittenPosition, LegDistance, LegHeight); } } }
using System; using System.Numerics; namespace DynamixelServo.Quadruped { public class BasicQuadrupedGaitEngine : QuadrupedGaitEngine { private const int Speed = 12; private int _currentIndex; private readonly Vector3[] _positions = { new Vector3(-5, 5, 3), new Vector3(5, 5, -3), new Vector3(5, -5, 3), new Vector3(-5, -5, -3) }; private const float LegHeight = -11f; private const int LegDistance = 15; private Vector3 _lastWrittenPosition = Vector3.Zero; public BasicQuadrupedGaitEngine(QuadrupedIkDriver driver) : base(driver) { Driver.Setup(); Driver.StandUpfromGround(); StartEngine(); } protected override void EngineSpin() { if (_lastWrittenPosition.Similar(_positions[_currentIndex], 0.25f)) { _currentIndex++; if (_currentIndex >= _positions.Length) { _currentIndex = 0; } } _lastWrittenPosition = _lastWrittenPosition.MoveTowards(_positions[_currentIndex], Speed * 0.001f * TimeSincelastTick); Driver.MoveAbsoluteCenterMass(_lastWrittenPosition, LegDistance, LegHeight); } } }
apache-2.0
C#
e13ad433ff4fe248ea4603235f4a383e54e9e798
Update test console project
kdelmonte/active-directory-utilities
TestConsole/Program.cs
TestConsole/Program.cs
using System; using ActiveDirectoryUtilities; namespace TestConsole { class Program { static void Main(string[] args) { Console.WriteLine("Enter the domain name"); var domainName = Console.ReadLine(); // Set credentials of the user account that we will use to perform the domain // the active directory operations. This user must have access to the AD Console.WriteLine("Enter the operating user name"); var operatingUsername = Console.ReadLine(); Console.WriteLine("Enter the operating user password"); var operatingUserPassword = Console.ReadLine(); // Instantiate the class using the variables above Console.WriteLine("Test reading entire Active Directory"); var activeDirectory = new ActiveDirectory(domainName,operatingUsername,operatingUserPassword); activeDirectory.Populate(true); // Authenticate a user Console.WriteLine("Testing user authentication"); Console.WriteLine("Enter the user name"); var username = Console.ReadLine(); Console.WriteLine("Enter the password"); var password = Console.ReadLine(); if (activeDirectory.AuthenticateUser(username, password)) { Console.WriteLine("You have been authenticated"); } else { Console.WriteLine("User/Password combination is incorrect"); } Console.ReadKey(); } } }
using System; using ActiveDirectoryUtilities; namespace Test { class Program { static void Main(string[] args) { var domainName = ""; // Set credentials of the user account that we will use to perform the domain // the active directory operations. This user must have access to the AD var operatingUsername = ""; var operatingUserPassword = ""; // Instantiate the class using the variables above var activeDirectory = new ActiveDirectory(domainName,operatingUsername,operatingUserPassword); activeDirectory.Populate(true); // Authenticate a user if (activeDirectory.AuthenticateUser("", "")) { Console.WriteLine("You have been authenticated"); } else { Console.WriteLine("User/Password combination is incorrect"); } Console.ReadKey(); } } }
mit
C#
d37f8b9dac4c164efa16be16df6894223a70bc0f
Fix crash when project settings do not deserialize properly (HT-268)
sillsdev/hearthis,sillsdev/hearthis,sillsdev/hearthis
src/HearThis/Script/ProjectSettings.cs
src/HearThis/Script/ProjectSettings.cs
// -------------------------------------------------------------------------------------------- #region // Copyright (c) 2016, SIL International. All Rights Reserved. // <copyright from='2016' to='2016' company='SIL International'> // Copyright (c) 2016, SIL International. All Rights Reserved. // // Distributable under the terms of the MIT License (http://sil.mit-license.org/) // </copyright> #endregion // -------------------------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Xml.Serialization; using HearThis.Properties; namespace HearThis.Script { [Serializable] [XmlRoot(ElementName = "ProjectInfo", Namespace = "", IsNullable = false)] public class ProjectSettings { private bool _newlyCreatedSettingsForExistingProject; public ProjectSettings() { // Set defaults ClauseBreakCharacters = ", ; :"; AdditionalBlockBreakCharacters = ""; Version = Settings.Default.CurrentDataVersion; } /// <summary> /// This setting is not persisted, as it is only needed during data migration. It allows us to /// correctly handle two edge cases: 1) a project from an early version of HearThis is /// getting settings for the very first time or 2) the settings were corrupted in a way that /// prevented them from being deserialized. Note that in the latter case, we can't know for /// sure which data migration steps need to be done because we don't know which version the /// project was at when things went awry. /// </summary> [XmlIgnore] internal bool NewlyCreatedSettingsForExistingProject { get => _newlyCreatedSettingsForExistingProject; set { _newlyCreatedSettingsForExistingProject = value; Version = 0; } } [XmlAttribute("version")] public int Version { get; set; } [XmlAttribute("breakAtParagraphBreaks")] [DefaultValue(false)] public bool BreakAtParagraphBreaks { get; set; } [XmlAttribute("breakQuotesIntoBlocks")] [DefaultValue(false)] public bool BreakQuotesIntoBlocks { get; set; } [XmlAttribute("clauseBreakCharacters")] [DefaultValue(", ; :")] public string ClauseBreakCharacters { get; set; } [XmlAttribute("additionalBlockBreakCharacters")] [DefaultValue("")] public string AdditionalBlockBreakCharacters { get; set; } } }
// -------------------------------------------------------------------------------------------- #region // Copyright (c) 2016, SIL International. All Rights Reserved. // <copyright from='2016' to='2016' company='SIL International'> // Copyright (c) 2016, SIL International. All Rights Reserved. // // Distributable under the terms of the MIT License (http://sil.mit-license.org/) // </copyright> #endregion // -------------------------------------------------------------------------------------------- using System; using System.Xml.Serialization; using HearThis.Properties; namespace HearThis.Script { [Serializable] [XmlRoot(ElementName = "ProjectInfo", Namespace = "", IsNullable = false)] public class ProjectSettings { private bool _newlyCreatedSettingsForExistingProject; public ProjectSettings() { // Set default Clause-Break Characters ClauseBreakCharacters = ", ; :"; Version = Settings.Default.CurrentDataVersion; } /// <summary> /// This setting is not persisted, as it is only needed during data migration. It allows us to /// correctly handle two edge cases: 1) a project from an early version of HearThis is /// getting settings for the very first time or 2) the settings were corrupted in a way that /// prevented them from being deserialized. Note that in the latter case, we can't know for /// sure which data migration steps need to be done because we don't know which version the /// project was at when things went awry. /// </summary> [XmlIgnore] internal bool NewlyCreatedSettingsForExistingProject { get => _newlyCreatedSettingsForExistingProject; set { _newlyCreatedSettingsForExistingProject = value; Version = 0; } } [XmlAttribute("version")] public int Version { get; set; } [XmlAttribute("breakAtParagraphBreaks")] public bool BreakAtParagraphBreaks { get; set; } [XmlAttribute("breakQuotesIntoBlocks")] public bool BreakQuotesIntoBlocks { get; set; } [XmlAttribute("clauseBreakCharacters")] public string ClauseBreakCharacters { get; set; } [XmlAttribute("additionalBlockBreakCharacters")] public string AdditionalBlockBreakCharacters { get; set; } } }
mit
C#
ceec4364dd3d0fbd94c3bc0aabf33fa65c87074c
Bump to 2.0.1
hudl/Mjolnir,courtneyklatt/Mjolnir
Hudl.Mjolnir/Properties/AssemblyInfo.cs
Hudl.Mjolnir/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Hudl.Mjolnir")] [assembly: AssemblyDescription("Fault tolerance library for protecting against cascading failure. Uses thread pools and circuit breakers to isolate problems and fail fast.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Hudl")] [assembly: AssemblyProduct("Hudl.Mjolnir")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Hudl.Mjolnir.Tests")] [assembly: InternalsVisibleTo("Hudl.Mjolnir.SystemTests")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("97b23684-6c4a-4749-b307-5867cbce2dff")] // Used for NuGet packaging, uses semantic versioning: major.minor.patch-prerelease. [assembly: AssemblyInformationalVersion("2.0.1")] // Keep this the same as AssemblyInformationalVersion. [assembly: AssemblyFileVersion("2.0.1")] // ONLY change this when the major version changes; never with minor/patch/build versions. // It'll almost always be the major version followed by three zeroes (e.g. 1.0.0.0). [assembly: AssemblyVersion("2.0.0.0")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Hudl.Mjolnir")] [assembly: AssemblyDescription("Fault tolerance library for protecting against cascading failure. Uses thread pools and circuit breakers to isolate problems and fail fast.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Hudl")] [assembly: AssemblyProduct("Hudl.Mjolnir")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Hudl.Mjolnir.Tests")] [assembly: InternalsVisibleTo("Hudl.Mjolnir.SystemTests")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("97b23684-6c4a-4749-b307-5867cbce2dff")] // Used for NuGet packaging, uses semantic versioning: major.minor.patch-prerelease. [assembly: AssemblyInformationalVersion("2.0.0")] // Keep this the same as AssemblyInformationalVersion. [assembly: AssemblyFileVersion("2.0.0")] // ONLY change this when the major version changes; never with minor/patch/build versions. // It'll almost always be the major version followed by three zeroes (e.g. 1.0.0.0). [assembly: AssemblyVersion("2.0.0.0")]
apache-2.0
C#
0e8e2d5980f8539c543695b3c2e24dda98ee2338
修正 FormButtonGroupItem 未完成的 Bug
yonglehou/Jumony,wukaixian/Jumony,wukaixian/Jumony,zpzgone/Jumony,zpzgone/Jumony,yonglehou/Jumony
Ivony.Html.Forms/FormButtonGroupItem.cs
Ivony.Html.Forms/FormButtonGroupItem.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ivony.Fluent; namespace Ivony.Html.Forms { /// <summary> /// 定义按钮组组控件的项,即单个按钮 /// </summary> public sealed class FormButtonGroupItem : FormGroupControlItem { internal FormButtonGroupItem( FormButtonGroup groupControl, IHtmlElement element ) : base( groupControl ) { if ( groupControl == null ) throw new ArgumentNullException( "groupControl" ); if ( element == null ) throw new ArgumentNullException( "element" ); if ( !element.Name.EqualsIgnoreCase( "input" ) ) throw new InvalidOperationException(); if ( !element.Attribute( "name" ).Value().EqualsIgnoreCase( groupControl.Name ) ) throw new InvalidOperationException(); var type = element.Attribute( "type" ).Value(); if ( type.EqualsIgnoreCase( "radio" ) ) ButtonType = FormGroupButtonType.RadioButton; else if ( type.EqualsIgnoreCase( "checkbox" ) ) ButtonType = FormGroupButtonType.RadioButton; else throw new InvalidOperationException(); Element = element; } /// <summary> /// 定义按钮的元素 /// </summary> public IHtmlElement Element { get; private set; } /// <summary> /// 控件值,当按钮处于被选中状态时应当提供的值 /// </summary> public override string Value { get { return Element.Attribute( "value" ).Value(); } } /// <summary> /// 按钮是否处于选中状态 /// </summary> public override bool Selected { get { return Element.Attribute( "checked" ) != null; } set { if ( value ) Element.SetAttribute( "checked" ); else Element.RemoveAttribute( "checked" ); } } /// <summary> /// 按钮类型 /// </summary> public FormGroupButtonType ButtonType { get; private set; } } /// <summary> /// 定义按钮组控件类型 /// </summary> public enum FormGroupButtonType { /// <summary>单选按钮</summary> RadioButton, /// <summary>多选按钮</summary> CheckBox } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ivony.Fluent; namespace Ivony.Html.Forms { /// <summary> /// 定义按钮组组控件的项,即单个按钮 /// </summary> public sealed class FormButtonGroupItem : FormGroupControlItem { internal FormButtonGroupItem( FormButtonGroup groupControl, IHtmlElement element ) : base( groupControl ) { if ( groupControl == null ) throw new ArgumentNullException( "groupControl" ); if ( element == null ) throw new ArgumentNullException( "element" ); if ( !element.Name.EqualsIgnoreCase( "input" ) ) throw new InvalidOperationException(); if ( !element.Attribute( "name" ).Value().EqualsIgnoreCase( groupControl.Name ) ) throw new InvalidOperationException(); var type = element.Attribute( "type" ).Value(); if ( type.EqualsIgnoreCase( "radio" ) ) ButtonType = FormGroupButtonType.RadioButton; else if ( type.EqualsIgnoreCase( "checkbox" ) ) ButtonType = FormGroupButtonType.RadioButton; else throw new InvalidOperationException(); Element = element; } /// <summary> /// 定义按钮的元素 /// </summary> public IHtmlElement Element { get; private set; } /// <summary> /// 控件值,当按钮处于被选中状态时应当提供的值 /// </summary> public override string Value { get { throw new NotImplementedException(); } } /// <summary> /// 按钮是否处于选中状态 /// </summary> public override bool Selected { get { return Element.Attribute( "checked" ) != null; } set { if ( value ) Element.SetAttribute( "checked" ); else Element.RemoveAttribute( "checked" ); } } /// <summary> /// 按钮类型 /// </summary> public FormGroupButtonType ButtonType { get; private set; } } /// <summary> /// 定义按钮组控件类型 /// </summary> public enum FormGroupButtonType { /// <summary>单选按钮</summary> RadioButton, /// <summary>多选按钮</summary> CheckBox } }
apache-2.0
C#
72ab17cbf7fc5bbd65b15775ef37a5aca5a674e5
make sure test db is created with all options
os2kitos/kitos,os2kitos/kitos,os2kitos/kitos,os2kitos/kitos
Tools.Test.Database/Model/Tasks/EnableAllOptionsTask.cs
Tools.Test.Database/Model/Tasks/EnableAllOptionsTask.cs
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using Core.DomainModel; namespace Tools.Test.Database.Model.Tasks { public class EnableAllOptionsTask : DatabaseTask { public EnableAllOptionsTask(string connectionString) : base(connectionString) { } public override bool Execute() { using (var context = CreateKitosContext()) { var optionTypes = LoadAllOptionTypes(); foreach (var optionType in optionTypes) { Console.Out.WriteLine("Enabling all options of type:" + optionType.Name); var dbSet = context.Set(optionType).ToListAsync().GetAwaiter().GetResult(); EnableAllLocalOptions(dbSet); context.SaveChanges(); } } return true; } private static IEnumerable<Type> LoadAllOptionTypes() { var optionTypes = typeof(OptionEntity<>) .Assembly .GetExportedTypes() .Where(x => x.IsAbstract == false && IsOptionType(x)) .ToList(); return optionTypes; } private static bool IsOptionType(Type type) { var baseType = type.BaseType; return baseType?.IsGenericType == true && baseType.GetGenericTypeDefinition() == typeof(OptionEntity<>); } private static void EnableAllLocalOptions(IEnumerable<object> contextLocalGoalTypes) { foreach (dynamic localOption in contextLocalGoalTypes) { localOption.IsLocallyAvailable = true; localOption.IsEnabled = true; localOption.IsObligatory = true; //Makes it immediately available in all organizations } } } }
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using Core.DomainModel; namespace Tools.Test.Database.Model.Tasks { public class EnableAllOptionsTask : DatabaseTask { public EnableAllOptionsTask(string connectionString) : base(connectionString) { } public override bool Execute() { using (var context = CreateKitosContext()) { var optionTypes = LoadAllOptionTypes(); foreach (var optionType in optionTypes) { Console.Out.WriteLine("Enabling all options of type:" + optionType.Name); var dbSet = context.Set(optionType).ToListAsync().GetAwaiter().GetResult(); EnableAllLocalOptions(dbSet); context.SaveChanges(); } } return true; } private static IEnumerable<Type> LoadAllOptionTypes() { var optionTypes = typeof(OptionEntity<>) .Assembly .GetExportedTypes() .Where(x => x.IsAbstract == false && IsOptionType(x)) .ToList(); return optionTypes; } private static bool IsOptionType(Type type) { var baseType = type.BaseType; return baseType?.IsGenericType == true && baseType.GetGenericTypeDefinition() == typeof(OptionEntity<>); } private static void EnableAllLocalOptions(IEnumerable<object> contextLocalGoalTypes) { foreach (dynamic localOption in contextLocalGoalTypes) { localOption.IsLocallyAvailable = true; localOption.IsEnabled = true; } } } }
mpl-2.0
C#
ced0f8bf47d6f2875e7f225d1f6c542ba24b4460
Implement IsValidDestination for Rook
ProgramFOX/Chess.NET
ChessDotNet/Pieces/Rook.cs
ChessDotNet/Pieces/Rook.cs
using System; namespace ChessDotNet.Pieces { public class Rook : ChessPiece { public override Player Owner { get; set; } public Rook(Player owner) { Owner = owner; } public override string GetFenCharacter() { return Owner == Player.White ? "R" : "r"; } public override bool IsValidDestination(Position origin, Position destination, ChessGame game) { Utilities.ThrowIfNull(origin, "origin"); Utilities.ThrowIfNull(destination, "destination"); PositionDistance posDelta = new PositionDistance(origin, destination); if (posDelta.DistanceX != 0 && posDelta.DistanceY != 0) return false; bool increasingRank = (int)destination.Rank > (int)origin.Rank; bool increasingFile = (int)destination.File > (int)origin.File; if (posDelta.DistanceX == 0) { int f = (int)origin.File; for (int r = (int)origin.Rank + (increasingRank ? 1 : -1); increasingRank ? r < (int)destination.Rank : r > (int)destination.Rank; r += increasingRank ? 1 : -1) { if (game.GetPieceAt((File)f, (Rank)r).Owner != Player.None) { return false; } } } else // (posDelta.DeltaY == 0) { int r = (int)origin.Rank; for (int f = (int)origin.File + (increasingFile ? 1 : -1); increasingFile ? f < (int)destination.File : f > (int)destination.File; f += increasingFile ? 1 : -1) { if (game.GetPieceAt((File)f, (Rank)r).Owner != Player.None) { return false; } } } return true; } } }
namespace ChessDotNet.Pieces { public class Rook : ChessPiece { public override Player Owner { get; set; } public Rook(Player owner) { Owner = owner; } public override string GetFenCharacter() { return Owner == Player.White ? "R" : "r"; } } }
mit
C#
f5d2472462463f1aad1c1e6893488400119e1a51
Update version to 1.2
M-Yankov/SWapi-CSharp
SWapi-CSharp/Properties/AssemblyInfo.cs
SWapi-CSharp/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SWapi-CSharp")] [assembly: AssemblyDescription("An package that works with https://swapi.dev/")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SWapi-CSharp")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("cdcde2c9-059d-4da4-8b17-1f3142857f6c")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.2.0.0")] [assembly: AssemblyFileVersion("1.2.0.0")]
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SWapi-CSharp")] [assembly: AssemblyDescription("An package that works with https://swapi.dev/")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SWapi-CSharp")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("cdcde2c9-059d-4da4-8b17-1f3142857f6c")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.1")] [assembly: AssemblyFileVersion("1.0.0.1")]
mit
C#
0e9eebe60220fe91e797a470faec920a8c81184c
undo comment
BD-IATI/edi,BD-IATI/edi,BD-IATI/edi,BD-IATI/edi
AIMS_BD_IATI.Service/Program.cs
AIMS_BD_IATI.Service/Program.cs
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using AIMS_BD_IATI.Library; using AIMS_BD_IATI.Library.Parser; using AIMS_BD_IATI.Library.Parser.ParserIATIv1; using AIMS_BD_IATI.Library.Parser.ParserIATIv2; namespace AIMS_BD_IATI.Service { class Program { static void Main(string[] args) { Console.WriteLine("Parsing Started..."); IParserIATI parserIATI; string activitiesURL; //Parser v2.01 parserIATI = new ParserIATIv2(); //activitiesURL = "http://datastore.iatistandard.org/api/1/access/activity.xml?recipient-country=BD&reporting-org=CA-3&stream=True" //single activity : "http://datastore.iatistandard.org/api/1/access/activity.xml?iati-identifier=CA-3-A035529001 //Params: activity.xml or activity.json, recipient-country=BD, reporting-org=CA-3 //activitiesURL = Common.iati_url + "recipient-country=" + Common.iati_recipient_country + "&reporting-org=" + "CA-3" + "&stream="+Common.iati_stream; activitiesURL = "http://localhost:1000/UploadedFiles/activity_GB-1_2.xml"; //"http://localhost:1000/UploadedFiles/activity_CA-3_2.xml"; var returnResult2 = (XmlResultv2)parserIATI.ParseIATIXML(activitiesURL); //Parser v1.05 parserIATI = new ParserIATIv1(); //activitiesURL = "http://datastore.iatistandard.org/api/1/access/activity.xml?recipient-country=BD&reporting-org=GB-1&stream=True"; //Params: activity.xml or activity.json, recipient-country=BD, reporting-org=GB-1 or XM-DAC-12-1 activitiesURL = "http://localhost:1000/UploadedFiles/activity_GB-1_2.xml"; var returnResult1 = (XmlResultv1)parserIATI.ParseIATIXML(activitiesURL); //ToDo Conversion //XmlResultv2 returnResult2 = (XmlResultv1)returnResult1; //returnResult2.AnyAttr Console.WriteLine("Parsing completed!"); Console.ReadLine(); } } }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using AIMS_BD_IATI.Library; using AIMS_BD_IATI.Library.Parser; using AIMS_BD_IATI.Library.Parser.ParserIATIv1; using AIMS_BD_IATI.Library.Parser.ParserIATIv2; namespace AIMS_BD_IATI.Service { class Program { static void Main(string[] args) { Console.WriteLine("Parsing Started..."); IParserIATI parserIATI; string activitiesURL; //Parser v2.01 parserIATI = new ParserIATIv2(); //activitiesURL = "http://datastore.iatistandard.org/api/1/access/activity.xml?recipient-country=BD&reporting-org=CA-3&stream=True" //single activity : "http://datastore.iatistandard.org/api/1/access/activity.xml?iati-identifier=CA-3-A035529001 //Params: activity.xml or activity.json, recipient-country=BD, reporting-org=CA-3 //activitiesURL = Common.iati_url + "recipient-country=" + Common.iati_recipient_country + "&reporting-org=" + "CA-3" + "&stream="+Common.iati_stream; activitiesURL = "http://localhost:1000/UploadedFiles/activity_GB-1_2.xml"; //"http://localhost:1000/UploadedFiles/activity_CA-3_2.xml"; var returnResult2 = (XmlResultv2)parserIATI.ParseIATIXML(activitiesURL); //Parser v1.05 parserIATI = new ParserIATIv1(); //activitiesURL = "http://datastore.iatistandard.org/api/1/access/activity.xml?recipient-country=BD&reporting-org=GB-1&stream=True"; //Params: activity.xml or activity.json, recipient-country=BD, reporting-org=GB-1 or XM-DAC-12-1 activitiesURL = "http://localhost:1000/UploadedFiles/activity_GB-1_2.xml"; var returnResult1 = (XmlResultv1)parserIATI.ParseIATIXML(activitiesURL); //ToDo Conversion and AIMS pull //XmlResultv2 returnResult2 = (XmlResultv1)returnResult1; //returnResult2.AnyAttr Console.WriteLine("Parsing completed!"); Console.ReadLine(); } } }
agpl-3.0
C#
20eedfc6c0245311c7fa4ceb6441f0ed24ba11ba
Add known default relations
pardahlman/akeneo-csharp
Akeneo/Common/AkeneoDefaults.cs
Akeneo/Common/AkeneoDefaults.cs
namespace Akeneo.Common { public class AkeneoDefaults { public const string DefaultAttributeGroup = "other"; public const string DefaultChannel = "ecommerce"; public const string Category = "master"; public const string IdentifierAttribute = "sku"; public const string PackAssociation = "PACK"; public const string SubstitutionAssociation = "SUBSTITUTION"; public const string UpsellAssociation = "UPSELL"; public const string CrossSellAssociation = "X_SELL"; } }
namespace Akeneo.Common { public class AkeneoDefaults { public const string DefaultAttributeGroup = "other"; public const string DefaultChannel = "ecommerce"; public const string Category = "master"; public const string IdentifierAttribute = "sku"; } }
mit
C#
2dc61f77cba60aca1b8a8e9a762102e5d59d9b59
Update CameraControl.cs
mitjmcc/Seasick,mitjmcc/Seasick
Assets/Scripts/CameraControl.cs
Assets/Scripts/CameraControl.cs
using UnityEngine; using System.Collections; public class CameraControl : MonoBehaviour { public GameObject target; public float maxSpeed; public float maxVertSpeed; public float maxDistance; float horizAxis; float vertAxis; float mWheel; int zoomSpeed = 4; // Use this for initialization void Start () { } // Update is called once per frame void Update () { horizAxis = Input.GetAxis ("Horizontal"); vertAxis = Input.GetAxis ("Vertical"); mWheel = Input.GetAxis ("Mouse ScrollWheel"); Vector3 vertTranslate = new Vector3 (0, vertAxis * maxVertSpeed, 0); Vector3 horizTranslate = new Vector3 (horizAxis * maxSpeed, 0, 0); transform.Translate (horizTranslate); Vector3 targetPos = target.transform.position; transform.Translate (vertTranslate); transform.LookAt (targetPos); if (mWheel > 0) { camera.fieldOfView = camera.fieldOfView - zoomSpeed; if (camera.fieldOfView <= 40) { camera.fieldOfView = 40; } } else if (mWheel < 0) { camera.fieldOfView = camera.fieldOfView + zoomSpeed; if (camera.fieldOfView >= 85) { camera.fieldOfView = 85; } // Camera.main.fieldOfView = Mathf.Max (Camera.main.fieldOfView + 2, 85.0); } } }
using UnityEngine; using System.Collections; public class CameraControl : MonoBehaviour { public GameObject target; public float maxSpeed; public float maxVertSpeed; public float maxDistance; float horizAxis; float vertAxis; float mWheel; // Use this for initialization void Start () { } // Update is called once per frame void Update () { horizAxis = Input.GetAxis ("Horizontal"); vertAxis = Input.GetAxis ("Vertical"); Vector3 vertTranslate = new Vector3(0, vertAxis * maxVertSpeed, 0); Vector3 horizTranslate = new Vector3 (horizAxis * maxSpeed, 0, 0); transform.Translate (horizTranslate); Vector3 targetPos = target.transform.position; transform.Translate (vertTranslate); transform.LookAt (targetPos); } }
mit
C#
0e966317c31f551cdf363a83ad6e682af41e501c
Remove studio repo Create call used for testing
meutley/ISTS
src/Application/Studios/StudioService.cs
src/Application/Studios/StudioService.cs
using System; using System.Collections.Generic; using System.Linq; using AutoMapper; using ISTS.Domain.Studios; namespace ISTS.Application.Studios { public class StudioService : IStudioService { private readonly IStudioRepository _studioRepository; private readonly IMapper _mapper; public StudioService( IStudioRepository studioRepository, IMapper mapper) { _studioRepository = studioRepository; _mapper = mapper; } public StudioDto Create(string name, string friendlyUrl) { var entity = _studioRepository.Create(name, friendlyUrl); var result = _mapper.Map<StudioDto>(entity); return result; } public List<StudioDto> GetAll() { var entities = _studioRepository.Get().ToList(); var result = _mapper.Map<List<StudioDto>>(entities); return result; } public StudioDto Get(Guid id) { var entity = _studioRepository.Get(id); var result = _mapper.Map<StudioDto>(entity); return result; } public StudioRoomDto CreateRoom(Guid studioId, string name) { var studio = _studioRepository.Get(studioId); var model = studio.CreateRoom(name); var result = _studioRepository.CreateRoom(model.StudioId, model.Name); var studioRoomDto = _mapper.Map<StudioRoomDto>(result); return studioRoomDto; } } }
using System; using System.Collections.Generic; using System.Linq; using AutoMapper; using ISTS.Domain.Studios; namespace ISTS.Application.Studios { public class StudioService : IStudioService { private readonly IStudioRepository _studioRepository; private readonly IMapper _mapper; public StudioService( IStudioRepository studioRepository, IMapper mapper) { _studioRepository = studioRepository; _mapper = mapper; } public StudioDto Create(string name, string friendlyUrl) { var entity = _studioRepository.Create(name, friendlyUrl); var result = _mapper.Map<StudioDto>(entity); return result; } public List<StudioDto> GetAll() { var entities = _studioRepository.Get().ToList(); var result = _mapper.Map<List<StudioDto>>(entities); return result; } public StudioDto Get(Guid id) { // var entity = _studioRepository.Get(id); var entity = _studioRepository.Create("My Studio", "mystudio"); var result = _mapper.Map<StudioDto>(entity); return result; } public StudioRoomDto CreateRoom(Guid studioId, string name) { var studio = _studioRepository.Get(studioId); var model = studio.CreateRoom(name); var result = _studioRepository.CreateRoom(model.StudioId, model.Name); var studioRoomDto = _mapper.Map<StudioRoomDto>(result); return studioRoomDto; } } }
mit
C#
4703ca17d088451ecbb8901cf5a5ea76708bf439
Create canvas with live cells before drawing on screen.
kubkon/GameOfLifeApplication
GameOfLifeApplication/Form1.cs
GameOfLifeApplication/Form1.cs
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace GameOfLifeApplication { public partial class Form1 : Form { private World world = null; private Image liveCellImg; private Size cellSize; private int maxIterations = 200; private int rows = 20; private int columns = 20; private int initLiveCells = 150; public Form1() { InitializeComponent(); // Load images representing live and dead cell liveCellImg = Image.FromFile(@"..\..\assets\live_cell.bmp"); cellSize = new Size(10, 10); // Create new instance of the World world = new World(rows, columns, initLiveCells); } private void drawWorld() { var canvas = new Bitmap(rows * cellSize.Width, columns * cellSize.Height); var child = Graphics.FromImage(canvas); child.Clear(Color.White); for (int i = 0; i < world.rows; i++) { for (int j = 0; j < world.columns; j++) { var location = new Point(i * cellSize.Width, j * cellSize.Height); if (world.grid[i, j] == World.State.Live) child.DrawImage(liveCellImg, new Rectangle(location, cellSize)); } } var master = simulationPreviewBox.CreateGraphics(); master.DrawImage(canvas, 0, 0); } private void runSimulationClick(object sender, EventArgs e) { world.Randomise(); for (int i = 0; i < maxIterations; i++) { drawWorld(); if (world.Evolve()) break; } } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace GameOfLifeApplication { public partial class Form1 : Form { private World world = null; private Image liveCellImg; private Image deadCellImg; private Size cellSize; private int maxIterations = 200; private int rows = 20; private int columns = 20; private int initLiveCells = 200; public Form1() { InitializeComponent(); // Load images representing live and dead cell liveCellImg = Image.FromFile(@"..\..\assets\live_cell.bmp"); deadCellImg = Image.FromFile(@"..\..\assets\dead_cell.bmp"); cellSize = new Size(10, 10); // Create new instance of the World world = new World(rows, columns, initLiveCells); } private void drawWorld() { var g = simulationPreviewBox.CreateGraphics(); for (int i = 0; i < world.rows; i++) { for (int j = 0; j < world.columns; j++) { var location = new Point(i*cellSize.Height, j*cellSize.Width); if (world.grid[i, j] == World.State.Live) g.DrawImage(liveCellImg, new Rectangle(location, cellSize)); else g.DrawImage(deadCellImg, new Rectangle(location, cellSize)); } } } private void runSimulationClick(object sender, EventArgs e) { world.Randomise(); for (int i = 0; i < maxIterations; i++) { drawWorld(); if (world.Evolve()) break; } } } }
mit
C#
07ba37326292ecec4a011f8f155cd7e3bfe5543e
disable machineip test
aloneguid/logmagic
test/LogMagic.Test/EnrichersTest.cs
test/LogMagic.Test/EnrichersTest.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LogMagic.Enrichers; using Xunit; namespace LogMagic.Test { public class EnrichersTest { private TestWriter _writer; private ILog _log; public EnrichersTest() { _writer = new TestWriter(); L.Config.ClearWriters(); L.Config.ClearEnrichers(); L.Config .WriteTo.Trace() .WriteTo.Custom(_writer); _log = L.G<FormattingTest>(); } //[Fact]//reflection is not working for some reason public void MethodName_ThisMethod_Matches() { L.Config.EnrichWith.MethodName(); _log.D("method call"); Assert.Equal("LogMagic.Test.EnrichersTest.MethodName_ThisMethod_Matches()", (string)_writer.Event.GetProperty(KnownProperty.MethodName)); } //[Fact] reflection problems public void MethodName_MethodWithParameters_ParametersFormatted() { L.Config.EnrichWith.MethodName(); MethodWithParameters(null, 1, Guid.NewGuid()); Assert.Equal("LogMagic.Test.EnrichersTest.MethodWithParameters(String s, Int32 i, Guid g)", (string)_writer.Event.GetProperty("method")); } private string MethodWithParameters(string s, int i, Guid g) { _log.D("parameters method"); return s; } //[Fact] doesn't always work on some systems, needs to be investigated public void MachineIp_Current_ReturnsSomething() { L.Config.EnrichWith.MachineIpAddress(); _log.D("what's this machine IP?"); string address = (string)_writer.Event.GetProperty(KnownProperty.NodeIp); _log.D("address: {ipAddress}", address); Assert.NotNull(address); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LogMagic.Enrichers; using Xunit; namespace LogMagic.Test { public class EnrichersTest { private TestWriter _writer; private ILog _log; public EnrichersTest() { _writer = new TestWriter(); L.Config.ClearWriters(); L.Config .WriteTo.Trace() .WriteTo.Custom(_writer); _log = L.G<FormattingTest>(); } //[Fact]//reflection is not working for some reason public void MethodName_ThisMethod_Matches() { L.Config.EnrichWith.MethodName(); _log.D("method call"); Assert.Equal("LogMagic.Test.EnrichersTest.MethodName_ThisMethod_Matches()", (string)_writer.Event.GetProperty(KnownProperty.MethodName)); } //[Fact] reflection problems public void MethodName_MethodWithParameters_ParametersFormatted() { L.Config.EnrichWith.MethodName(); MethodWithParameters(null, 1, Guid.NewGuid()); Assert.Equal("LogMagic.Test.EnrichersTest.MethodWithParameters(String s, Int32 i, Guid g)", (string)_writer.Event.GetProperty("method")); } private string MethodWithParameters(string s, int i, Guid g) { _log.D("parameters method"); return s; } [Fact] public void MachineIp_Current_ReturnsSomething() { L.Config.EnrichWith.MachineIpAddress(); _log.D("what's this machine IP?"); string address = (string)_writer.Event.GetProperty(KnownProperty.NodeIp); _log.D("address: {ipAddress}", address); Assert.NotNull(address); } } }
mit
C#
d0a752248ec92ca0703a0439d1260cd81ba9dc2a
Make ActionDelete.ActionAlias public again
marcemarc/Umbraco-CMS,arknu/Umbraco-CMS,KevinJump/Umbraco-CMS,abryukhov/Umbraco-CMS,umbraco/Umbraco-CMS,KevinJump/Umbraco-CMS,KevinJump/Umbraco-CMS,KevinJump/Umbraco-CMS,abjerner/Umbraco-CMS,umbraco/Umbraco-CMS,abjerner/Umbraco-CMS,abryukhov/Umbraco-CMS,umbraco/Umbraco-CMS,KevinJump/Umbraco-CMS,abjerner/Umbraco-CMS,abryukhov/Umbraco-CMS,arknu/Umbraco-CMS,marcemarc/Umbraco-CMS,marcemarc/Umbraco-CMS,arknu/Umbraco-CMS,arknu/Umbraco-CMS,umbraco/Umbraco-CMS,abryukhov/Umbraco-CMS,abjerner/Umbraco-CMS,marcemarc/Umbraco-CMS,marcemarc/Umbraco-CMS
src/Umbraco.Core/Actions/ActionDelete.cs
src/Umbraco.Core/Actions/ActionDelete.cs
// Copyright (c) Umbraco. // See LICENSE for more details. namespace Umbraco.Cms.Core.Actions { /// <summary> /// This action is invoked when a document, media, member is deleted /// </summary> public class ActionDelete : IAction { /// <summary> /// The unique action alias /// </summary> public const string ActionAlias = "delete"; /// <summary> /// The unique action letter /// </summary> public const char ActionLetter = 'D'; /// <inheritdoc/> public char Letter => ActionLetter; /// <inheritdoc/> public string Alias => ActionAlias; /// <inheritdoc/> public string Category => Constants.Conventions.PermissionCategories.ContentCategory; /// <inheritdoc/> public string Icon => "icon-delete"; /// <inheritdoc/> public bool ShowInNotifier => true; /// <inheritdoc/> public bool CanBePermissionAssigned => true; } }
// Copyright (c) Umbraco. // See LICENSE for more details. namespace Umbraco.Cms.Core.Actions { /// <summary> /// This action is invoked when a document, media, member is deleted /// </summary> public class ActionDelete : IAction { /// <summary> /// The unique action alias /// </summary> private const string ActionAlias = "delete"; /// <summary> /// The unique action letter /// </summary> public const char ActionLetter = 'D'; /// <inheritdoc/> public char Letter => ActionLetter; /// <inheritdoc/> public string Alias => ActionAlias; /// <inheritdoc/> public string Category => Constants.Conventions.PermissionCategories.ContentCategory; /// <inheritdoc/> public string Icon => "icon-delete"; /// <inheritdoc/> public bool ShowInNotifier => true; /// <inheritdoc/> public bool CanBePermissionAssigned => true; } }
mit
C#
68d7acc201c77531a7816a032123f51213c527a2
Add Initialize method
ektrah/nsec
src/Cryptography/Sodium.cs
src/Cryptography/Sodium.cs
using System; using static Interop.Libsodium; namespace NSec.Cryptography { // // Libsodium Versions // // Version | Major | Minor // ------- | ----- | ----- // 1.0.0 | 7 | 2 // 1.0.1 | 7 | 3 // 1.0.2 | 7 | 4 // 1.0.3 | 7 | 5 // 1.0.4 | 7 | 6 // 1.0.5 | 7 | 6 // 1.0.6 | 8 | 0 // 1.0.7 | 9 | 0 // 1.0.8 | 9 | 1 // 1.0.9 | 9 | 2 // 1.0.10 | 9 | 2 // 1.0.11 | 9 | 3 // internal static class Sodium { private static readonly Lazy<int> s_initialized = new Lazy<int>(new Func<int>(sodium_init)); private static readonly Lazy<int> s_versionMajor = new Lazy<int>(new Func<int>(sodium_library_version_major)); private static readonly Lazy<int> s_versionMinor = new Lazy<int>(new Func<int>(sodium_library_version_minor)); public static void Initialize() { if (!TryInitialize()) { throw new InvalidOperationException(); } } public static bool IsVersionOrLater(int major, int minor) { return (s_versionMajor.Value > major) || (s_versionMajor.Value == major && s_versionMinor.Value >= minor); } public static bool TryInitialize() { // Require libsodium 1.0.9 or later if (!IsVersionOrLater(9, 2)) { return false; } // sodium_init() returns 0 on success, -1 on failure, and 1 if the // library had already been initialized. We call sodium_init() only // once, but if another library p/invokes into libsodium it might // already have been called. return (s_initialized.Value == 0) || (s_initialized.Value == 1); } } }
using System; using static Interop.Libsodium; namespace NSec.Cryptography { // // Libsodium Versions // // Version | Major | Minor // ------- | ----- | ----- // 1.0.0 | 7 | 2 // 1.0.1 | 7 | 3 // 1.0.2 | 7 | 4 // 1.0.3 | 7 | 5 // 1.0.4 | 7 | 6 // 1.0.5 | 7 | 6 // 1.0.6 | 8 | 0 // 1.0.7 | 9 | 0 // 1.0.8 | 9 | 1 // 1.0.9 | 9 | 2 // 1.0.10 | 9 | 2 // 1.0.11 | 9 | 3 // internal static class Sodium { private static readonly Lazy<int> s_initialized = new Lazy<int>(new Func<int>(sodium_init)); private static readonly Lazy<int> s_versionMajor = new Lazy<int>(new Func<int>(sodium_library_version_major)); private static readonly Lazy<int> s_versionMinor = new Lazy<int>(new Func<int>(sodium_library_version_minor)); public static bool IsVersionOrLater(int major, int minor) { return (s_versionMajor.Value > major) || (s_versionMajor.Value == major && s_versionMinor.Value >= minor); } public static bool TryInitialize() { // Require libsodium 1.0.9 or later if (!IsVersionOrLater(9, 2)) { return false; } // sodium_init() returns 0 on success, -1 on failure, and 1 if the // library had already been initialized. We call sodium_init() only // once, but if another library p/invokes into libsodium it might // already have been called. return (s_initialized.Value == 0) || (s_initialized.Value == 1); } } }
mit
C#
01ac19fdbb96cea3f36da3ce4b5ed39d1994658a
Set legacy version of osu!classic skin to 2.0
NeoAdonis/osu,UselessToucan/osu,2yangk23/osu,NeoAdonis/osu,johnneijzen/osu,EVAST9919/osu,NeoAdonis/osu,2yangk23/osu,EVAST9919/osu,smoogipoo/osu,peppy/osu,ppy/osu,smoogipooo/osu,UselessToucan/osu,peppy/osu,UselessToucan/osu,johnneijzen/osu,ppy/osu,smoogipoo/osu,peppy/osu,smoogipoo/osu,ppy/osu,peppy/osu-new
osu.Game/Skinning/DefaultLegacySkin.cs
osu.Game/Skinning/DefaultLegacySkin.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Audio; using osu.Framework.IO.Stores; using osuTK.Graphics; namespace osu.Game.Skinning { public class DefaultLegacySkin : LegacySkin { public DefaultLegacySkin(IResourceStore<byte[]> storage, AudioManager audioManager) : base(Info, storage, audioManager, string.Empty) { Configuration.CustomColours["SliderBall"] = new Color4(2, 170, 255, 255); Configuration.ComboColours.AddRange(new[] { new Color4(255, 192, 0, 255), new Color4(0, 202, 0, 255), new Color4(18, 124, 255, 255), new Color4(242, 24, 57, 255), }); Configuration.LegacyVersion = 2.0; } public static SkinInfo Info { get; } = new SkinInfo { ID = -1, // this is temporary until database storage is decided upon. Name = "osu!classic", Creator = "team osu!" }; } }
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Audio; using osu.Framework.IO.Stores; using osuTK.Graphics; namespace osu.Game.Skinning { public class DefaultLegacySkin : LegacySkin { public DefaultLegacySkin(IResourceStore<byte[]> storage, AudioManager audioManager) : base(Info, storage, audioManager, string.Empty) { Configuration.CustomColours["SliderBall"] = new Color4(2, 170, 255, 255); Configuration.ComboColours.AddRange(new[] { new Color4(255, 192, 0, 255), new Color4(0, 202, 0, 255), new Color4(18, 124, 255, 255), new Color4(242, 24, 57, 255), }); } public static SkinInfo Info { get; } = new SkinInfo { ID = -1, // this is temporary until database storage is decided upon. Name = "osu!classic", Creator = "team osu!" }; } }
mit
C#
114369831df684d05ee19ac70a9873ff8b5f8c9f
Update model data annotations
RubenLaube-Pohto/asp.net-project
Models/MessageModel.cs
Models/MessageModel.cs
using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; namespace ChatApp.Models { public class MessagesContext : DbContext { public MessagesContext(DbContextOptions<MessagesContext> options) : base(options) { } public DbSet<Message> Messages { get; set; } } public static class MessagesContextFactory { // Crete new context. Also initializes the database if it doesn't exist. public static MessagesContext Create(string connectionString) { var optionsBuilder = new DbContextOptionsBuilder<MessagesContext>(); optionsBuilder.UseMySql(connectionString); var context = new MessagesContext(optionsBuilder.Options); // Usefull for database creation when it doesn't exist yet. context.Database.EnsureCreated(); return context; } } // TODO: Add some controls on datatype with regards to databse. public class Message { [Key] public int Id { get; set; } [Required] [MaxLength(20)] public string Author { get; set; } [Required] public string Text { get; set; } [Required] public DateTime Timestamp { get; set; } public Message() { this.Author = string.Empty; this.Text = string.Empty; } public Message(string author, string text, DateTime timestamp) { this.Author = author; this.Text = text; this.Timestamp = timestamp; } } }
using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; namespace ChatApp.Models { public class MessagesContext : DbContext { public MessagesContext(DbContextOptions<MessagesContext> options) : base(options) { } public DbSet<Message> Messages { get; set; } } public static class MessagesContextFactory { // Crete new context. Also initializes the database if it doesn't exist. public static MessagesContext Create(string connectionString) { var optionsBuilder = new DbContextOptionsBuilder<MessagesContext>(); optionsBuilder.UseMySql(connectionString); var context = new MessagesContext(optionsBuilder.Options); // Usefull for database creation when it doesn't exist yet. context.Database.EnsureCreated(); return context; } } // TODO: Add some controls on datatype with regards to databse. public class Message { [Key] public int Id { get; set; } [RequiredAttribute] public string Author { get; set; } [RequiredAttribute] public string Text { get; set; } public DateTime Timestamp { get; set; } public Message() { this.Author = string.Empty; this.Text = string.Empty; } public Message(string author, string text, DateTime timestamp) { this.Author = author; this.Text = text; this.Timestamp = timestamp; } } }
mit
C#