├── .gitattributes ├── .gitignore ├── .nuget ├── NuGet.Config ├── NuGet.exe └── NuGet.targets ├── Img ├── glimpse_history_clientgrouping.jpg ├── glimpse_infotab_exception.jpg ├── glimpse_lightnode_timeline.jpg ├── glimpse_standalone_launch.jpg ├── lightnode_glimpse_infotab.jpg └── swagger_support.jpg ├── LICENSE ├── LightNode.sln ├── NuGet ├── Glimpse.LightNode.nuspec ├── LightNode.Client.PCL.T4.nuspec ├── LightNode.Client.UniRx.T4.nuspec ├── LightNode.Client.Unity.T4.nuspec ├── LightNode.Core.nuspec ├── LightNode.Diagnostics.EventSource.nuspec ├── LightNode.Formatter.Jil.LZ4.nuspec ├── LightNode.Formatter.Jil.nuspec ├── LightNode.Formatter.JsonNet.nuspec ├── LightNode.Formatter.MsgPack.nuspec ├── LightNode.Formatter.ProtoBuf.nuspec ├── LightNode.Server.nuspec ├── LightNode.Swagger.nuspec ├── LightNode2.nuspec ├── NuGet.exe ├── ReadMe.txt ├── pack.bat ├── pack_LightNode2.bat ├── push.bat └── push_LightNode2.bat ├── Performance ├── AspNetMVC │ ├── AspNetMVC.csproj │ ├── Controller │ │ └── HomeController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── Web.config.uninstall.xdt │ └── packages.config ├── LightNode.Helios │ ├── LightNode.Helios.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── LightNode.Performance │ ├── LightNode.Performance.csproj │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ └── LocalIIS.pubxml │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── LightNode.SelfHost │ ├── App.config │ ├── LightNode.SelfHost.csproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── Nancy │ ├── Nancy.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── PerfTest.ClientRunner │ ├── App.config │ ├── PerfTest.ClientRunner.csproj │ ├── Program.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── RawHttpHandler │ ├── AsyncHandler.ashx │ ├── AsyncHandler.ashx.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RawHttpHandler.csproj │ ├── SyncHandler.ashx │ ├── SyncHandler.ashx.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── RawOwinHandler │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RawOwinHandler.csproj │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── ServiceStack │ ├── Global.asax │ ├── Global.asax.cs │ ├── Hello.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ServiceStack.csproj │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── WcfService │ ├── Global.asax │ ├── Global.asax.cs │ ├── IHome.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── WcfService.csproj │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── WebAPI │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── WebAPI.csproj │ └── packages.config └── ab │ ├── ab.exe │ └── run.bat ├── README.md ├── Sample ├── AspNetCoreSample │ ├── AspNetCoreSample.xproj │ ├── Program.cs │ ├── Project_Readme.html │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── project.json │ ├── project.lock.json │ └── web.config ├── LightNode.Sample.Client │ ├── App.config │ ├── LightNode.Sample.Client.csproj │ ├── Program.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LightNode.Sample.GimpseUse │ ├── LightNode.Sample.GlimpseUse.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── LightNode.Sample.Server.ForAngularClient │ ├── App.config │ ├── LightNode.Sample.Server.ForAngularClient.csproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config └── LightNode.Sample.Server.SelfHost │ ├── App.config │ ├── LightNode.Sample.Server.SelfHost.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── Source ├── Glimpse.LightNode │ ├── EnableGlimpseMiddleware.cs │ ├── Glimpse.LightNode.csproj │ ├── GlimpseProfilingOperationCoordinator.cs │ ├── LightNodeTab.cs │ ├── Messages.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── LightNode.Client.AngularJS.T4 │ ├── LightNode.Client.AngularJS.T4.csproj │ ├── Scripts │ │ └── typings │ │ │ ├── angularjs │ │ │ ├── angular-animate.d.ts │ │ │ ├── angular-component-router.d.ts │ │ │ ├── angular-cookies.d.ts │ │ │ ├── angular-mocks.d.ts │ │ │ ├── angular-resource.d.ts │ │ │ ├── angular-route.d.ts │ │ │ ├── angular-sanitize.d.ts │ │ │ └── angular.d.ts │ │ │ ├── es6-promise │ │ │ └── es6-promise.d.ts │ │ │ └── jquery │ │ │ └── jquery.d.ts │ ├── app.js │ ├── app.js.map │ ├── app.ts │ ├── index.html │ ├── light-node-client.js │ ├── light-node-client.js.map │ ├── light-node-client.ts │ ├── light-node-client.tt │ ├── packages.config │ ├── web.Debug.config │ ├── web.Release.config │ └── web.config ├── LightNode.Client.PCL.T4 │ ├── LightNode.Client.PCL.T4.csproj │ ├── LightNodeClient.tt │ ├── LightNodeClient1.Generated.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── app.config ├── LightNode.Client.UniRx.T4 │ ├── LightNode.Client.UniRx.T4.csproj │ ├── LightNodeClient.Generated.cs │ ├── LightNodeClient.tt │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UniRx │ │ └── Scripts │ │ │ ├── Disposables │ │ │ ├── BooleanDisposable.cs │ │ │ ├── CompositeDisposable.cs │ │ │ ├── Disposable.cs │ │ │ ├── ICancelable.cs │ │ │ ├── MultipleAssignmentDisposable.cs │ │ │ ├── ScheduledDisposable.cs │ │ │ ├── SerialDisposable.cs │ │ │ └── SingleAssignmentDisposable.cs │ │ │ ├── EventPattern.cs │ │ │ ├── Notification.cs │ │ │ ├── Notifiers │ │ │ ├── BooleanNotifier.cs │ │ │ ├── CountNotifier.cs │ │ │ └── ScheduledNotifier.cs │ │ │ ├── Observable.Aggregate.cs │ │ │ ├── Observable.Binding.cs │ │ │ ├── Observable.Blocking.cs │ │ │ ├── Observable.Concatenate.cs │ │ │ ├── Observable.Concurrency.cs │ │ │ ├── Observable.Conversions.cs │ │ │ ├── Observable.Creation.cs │ │ │ ├── Observable.ErrorHandling.cs │ │ │ ├── Observable.Events.cs │ │ │ ├── Observable.Joins.cs │ │ │ ├── Observable.Paging.cs │ │ │ ├── Observable.Time.cs │ │ │ ├── Observable.cs │ │ │ ├── Observer.cs │ │ │ ├── Schedulers │ │ │ ├── CurrentThreadScheduler.cs │ │ │ ├── ImmediateScheduler.cs │ │ │ ├── Scheduler.cs │ │ │ └── ThreadPoolScheduler.cs │ │ │ ├── Subjects │ │ │ ├── AsyncSubject.cs │ │ │ ├── BehaviorSubject.cs │ │ │ ├── ConnectableObservable.cs │ │ │ ├── ISubject.cs │ │ │ ├── ReplaySubject.cs │ │ │ └── Subject.cs │ │ │ ├── System │ │ │ ├── IProgress.cs │ │ │ ├── Tuple.cs │ │ │ └── Unit.cs │ │ │ ├── TimeInterval.cs │ │ │ ├── Timestamped.cs │ │ │ └── UnityEngineBridge │ │ │ ├── CancellationToken.cs │ │ │ ├── MainThreadDispatcher.cs │ │ │ ├── MainThreadScheduler.cs │ │ │ ├── Observable.Unity.cs │ │ │ └── ObservableWWW.cs │ ├── UnityEngine.dll │ └── packages.config ├── LightNode.Client.Unity.T4 │ ├── LightNode.Client.Unity.T4.csproj │ ├── LightNodeClient.Generated.cs │ ├── LightNodeClient.tt │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UnityEngine.dll │ ├── bin │ │ └── Debug │ │ │ └── UnityEngine.dll │ └── packages.config ├── LightNode.Core │ ├── Formatter │ │ ├── IContentFormatter.cs │ │ └── StandardContentFormatters.cs │ ├── LightNode.Core.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── LightNode.Diagnostics.EventSource │ ├── LightNode.Diagnostics.EventSource.csproj │ ├── LightNodeEventSource.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LightNode.Formatter.Jil.LZ4 │ ├── LZ4JilContentFormatter.cs │ ├── LightNode.Formatter.Jil.LZ4.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── LightNode.Formatter.Jil │ ├── JilContentFormatter.cs │ ├── LightNode.Formatter.Jil.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── LightNode.Formatter.JsonNet │ ├── JsonNetContentFormatter.cs │ ├── LightNode.Formatter.JsonNet.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── LightNode.Formatter.MsgPack │ ├── LightNode.Formatter.MsgPack.csproj │ ├── MsgPackContentFormatter.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── LightNode.Formatter.ProtoBuf │ ├── LightNode.Formatter.ProtoBuf.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ProtoBufContentFormatter.cs │ └── packages.config ├── LightNode.Server │ ├── DebugOnlyClientGenerateAttribute.cs │ ├── DefineTypeScriptGenerateAttribute.cs │ ├── Diagnostics │ │ └── ILightNodeLogger.cs │ ├── Formatter │ │ └── JavaScriptContentFormatter.cs │ ├── IgnoreClientGenerateAttribute.cs │ ├── IgnoreOperationAttribute.cs │ ├── LightNode.Server.csproj │ ├── LightNodeContract.cs │ ├── LightNodeFilterAttribute.cs │ ├── LightNodeOptions.cs │ ├── LightNodeServer.cs │ ├── LightNodeServerMiddleware.cs │ ├── OperationContext.cs │ ├── OperationCoordinator.cs │ ├── OperationHandler.cs │ ├── OperationOptionAttribute.cs │ ├── ParameterBinder.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RequestPath.cs │ ├── ReturnStatusCodeException.cs │ ├── TypeBinder.cs │ ├── Utility │ │ ├── MetaEnum.cs │ │ ├── OwinConstants.cs │ │ ├── OwinHelper.cs │ │ ├── UnclosableStream.cs │ │ └── Utils.cs │ ├── ValueProvider.cs │ └── packages.config ├── LightNode.Swagger │ ├── LightNode.Swagger.csproj │ ├── LightNodeSwaggerMiddleware.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Schema │ │ └── SwaggerDocument.cs │ ├── SwaggerOptions.cs │ ├── SwaggerUI │ │ ├── css │ │ │ ├── print.css │ │ │ ├── reset.css │ │ │ ├── screen.css │ │ │ ├── style.css │ │ │ └── typography.css │ │ ├── fonts │ │ │ ├── droid-sans-v6-latin-700.eot │ │ │ ├── droid-sans-v6-latin-700.svg │ │ │ ├── droid-sans-v6-latin-700.ttf │ │ │ ├── droid-sans-v6-latin-700.woff │ │ │ ├── droid-sans-v6-latin-700.woff2 │ │ │ ├── droid-sans-v6-latin-regular.eot │ │ │ ├── droid-sans-v6-latin-regular.svg │ │ │ ├── droid-sans-v6-latin-regular.ttf │ │ │ ├── droid-sans-v6-latin-regular.woff │ │ │ └── droid-sans-v6-latin-regular.woff2 │ │ ├── images │ │ │ ├── explorer_icons.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ ├── logo_small.png │ │ │ ├── pet_store_api.png │ │ │ ├── throbber.gif │ │ │ └── wordnik_api.png │ │ ├── index.html │ │ ├── lang │ │ │ ├── en.js │ │ │ ├── es.js │ │ │ ├── pt.js │ │ │ ├── ru.js │ │ │ ├── tr.js │ │ │ ├── translator.js │ │ │ └── zh-cn.js │ │ ├── lib │ │ │ ├── backbone-min.js │ │ │ ├── handlebars-2.0.0.js │ │ │ ├── highlight.7.3.pack.js │ │ │ ├── jquery-1.8.0.min.js │ │ │ ├── jquery.ba-bbq.min.js │ │ │ ├── jquery.slideto.min.js │ │ │ ├── jquery.wiggle.min.js │ │ │ ├── marked.js │ │ │ ├── swagger-oauth.js │ │ │ ├── underscore-min.js │ │ │ └── underscore-min.map │ │ ├── o2c.html │ │ ├── swagger-ui.js │ │ └── swagger_schema.json │ └── packages.config └── LightNode2 │ ├── Diagnostics │ └── ILightNodeLogger.cs │ ├── Formatter │ ├── IContentFormatter.cs │ ├── JsonContentFormatter.cs │ └── StandardContentFormatters.cs │ ├── LightNode2.xproj │ ├── Properties │ └── AssemblyInfo.cs │ ├── Server │ ├── DebugOnlyClientGenerateAttribute.cs │ ├── DefineTypeScriptGenerateAttribute.cs │ ├── IgnoreClientGenerateAttribute.cs │ ├── IgnoreOperationAttribute.cs │ ├── LightNodeContract.cs │ ├── LightNodeFilterAttribute.cs │ ├── LightNodeOptions.cs │ ├── LightNodeServer.cs │ ├── LightNodeServerMiddleware.cs │ ├── OperationContext.cs │ ├── OperationCoordinator.cs │ ├── OperationHandler.cs │ ├── OperationOptionAttribute.cs │ ├── ParameterBinder.cs │ ├── RequestPath.cs │ ├── ReturnStatusCodeException.cs │ ├── TypeBinder.cs │ ├── Utility │ │ ├── HttpContextHelper.cs │ │ ├── MetaEnum.cs │ │ ├── TypeHelper.cs │ │ ├── UnclosableStream.cs │ │ └── Utils.cs │ └── ValueProvider.cs │ ├── Swagger │ ├── LightNodeSwaggerMiddleware.cs │ ├── Schema │ │ └── SwaggerDocument.cs │ ├── SwaggerOptions.cs │ └── SwaggerUI │ │ ├── css │ │ ├── print.css │ │ ├── reset.css │ │ ├── screen.css │ │ ├── style.css │ │ └── typography.css │ │ ├── fonts │ │ ├── DroidSans-Bold.ttf │ │ └── DroidSans.ttf │ │ ├── images │ │ ├── collapse.gif │ │ ├── expand.gif │ │ ├── explorer_icons.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── logo_small.png │ │ ├── pet_store_api.png │ │ ├── throbber.gif │ │ └── wordnik_api.png │ │ ├── index.html │ │ ├── lang │ │ ├── en.js │ │ ├── es.js │ │ ├── fr.js │ │ ├── geo.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── ko-kr.js │ │ ├── pl.js │ │ ├── pt.js │ │ ├── ru.js │ │ ├── tr.js │ │ ├── translator.js │ │ └── zh-cn.js │ │ ├── lib │ │ ├── backbone-min.js │ │ ├── es5-shim.js │ │ ├── handlebars-2.0.0.js │ │ ├── highlight.9.1.0.pack.js │ │ ├── highlight.9.1.0.pack_extended.js │ │ ├── jquery-1.8.0.min.js │ │ ├── jquery.ba-bbq.min.js │ │ ├── jquery.slideto.min.js │ │ ├── jquery.wiggle.min.js │ │ ├── js-yaml.min.js │ │ ├── jsoneditor.min.js │ │ ├── lodash.min.js │ │ ├── marked.js │ │ ├── object-assign-pollyfill.js │ │ └── swagger-oauth.js │ │ ├── o2c.html │ │ ├── swagger-ui.js │ │ └── swagger-ui.min.js │ ├── project.json │ └── project.lock.json ├── Tests ├── LightNode.Client.Tests │ ├── ChainingAssertion.MSTest.cs │ ├── LightNode.Client.Tests.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config └── LightNode.Server.Tests │ ├── BasicOperation.cs │ ├── ChainingAssertion.MSTest.cs │ ├── DiagnosticsTest.cs │ ├── FilterTest.cs │ ├── IgnoreOperationTest.cs │ ├── LightNode.Server.Tests.csproj │ ├── MetaEnumTest.cs │ ├── MockEnv.cs │ ├── NegotiateFormatterTest.cs │ ├── ParameterCheckTest.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── ReturnStatusCodeTest.cs │ ├── ValueProviderTest.cs │ └── packages.config └── global.json /.gitattributes: -------------------------------------------------------------------------------- 1 | Source/LightNode.Swagger/SwaggerUI/* linguist-vendored 2 | Source/LightNode2/Swagger/SwaggerUI/* linguist-vendored 3 | -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/.nuget/NuGet.exe -------------------------------------------------------------------------------- /Img/glimpse_history_clientgrouping.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Img/glimpse_history_clientgrouping.jpg -------------------------------------------------------------------------------- /Img/glimpse_infotab_exception.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Img/glimpse_infotab_exception.jpg -------------------------------------------------------------------------------- /Img/glimpse_lightnode_timeline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Img/glimpse_lightnode_timeline.jpg -------------------------------------------------------------------------------- /Img/glimpse_standalone_launch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Img/glimpse_standalone_launch.jpg -------------------------------------------------------------------------------- /Img/lightnode_glimpse_infotab.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Img/lightnode_glimpse_infotab.jpg -------------------------------------------------------------------------------- /Img/swagger_support.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Img/swagger_support.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Yoshifumi Kawai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /NuGet/Glimpse.LightNode.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Glimpse.LightNode 5 | 1.6.6.1 6 | Glimpse.LightNode 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Profiler for Glimpse. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC Glimpse 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NuGet/LightNode.Client.PCL.T4.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Client.PCL.T4 5 | 1.6.6.1 6 | LightNode.Client.PCL.T4 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Client for PCL and HttpClient. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /NuGet/LightNode.Client.UniRx.T4.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Client.UniRx.T4 5 | 1.6.3 6 | LightNode.Client.UniRx.T4 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Client for Unity with UniRx. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC Unity 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /NuGet/LightNode.Client.Unity.T4.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Client.Unity.T4 5 | 0.4.0 6 | LightNode.Client.Unity.T4 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Client for Unity. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC Unity 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /NuGet/LightNode.Core.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Core 5 | 1.6.6.1 6 | LightNode.Core 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Common Core Interfaces. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /NuGet/LightNode.Diagnostics.EventSource.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Diagnostics.EventSource 5 | 1.6.6.1 6 | LightNode.Diagnostics.EventSource 7 | neuecc 8 | neuecc 9 | false 10 | EventSource logging for LightNode(as Micro REST/RPC Framework). 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /NuGet/LightNode.Formatter.Jil.LZ4.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Formatter.Jil.LZ4 5 | 1.6.6.1 6 | LightNode.Formatter.Jil.LZ4 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Formatter for JSON by Jil + LZ4. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NuGet/LightNode.Formatter.Jil.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Formatter.Jil 5 | 1.6.6.1 6 | LightNode.Formatter.Jil 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Formatter for JSON by Jil. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NuGet/LightNode.Formatter.JsonNet.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Formatter.JsonNet 5 | 1.6.6.1 6 | LightNode.Formatter.JsonNet 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Formatter by Json.NET. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NuGet/LightNode.Formatter.MsgPack.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Formatter.MsgPack 5 | 1.6.6.1 6 | LightNode.Formatter.MsgPack 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Formatter by MsgPack. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NuGet/LightNode.Formatter.ProtoBuf.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Formatter.ProtoBuf 5 | 1.6.6.1 6 | LightNode.Formatter.ProtoBuf 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Formatter by ProtoBuf. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NuGet/LightNode.Server.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Server 5 | 1.6.6.1 6 | LightNode.Server 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(as Micro REST/RPC Framework) Server. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /NuGet/LightNode.Swagger.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Swagger 5 | 1.6.6.1 6 | LightNode.Swagger 7 | neuecc 8 | neuecc 9 | false 10 | Swagger integration for LightNode(as Micro REST/RPC Framework). 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | Owin Rest RPC Swagger 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NuGet/LightNode2.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode 5 | 2.0.4-beta 6 | LightNode 7 | neuecc 8 | neuecc 9 | false 10 | LightNode(Micro REST/RPC Framework) for ASP.NET Core. 11 | en-US 12 | http://opensource.org/licenses/MIT 13 | https://github.com/neuecc/LightNode 14 | ASPNETCore Rest RPC 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /NuGet/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/NuGet/NuGet.exe -------------------------------------------------------------------------------- /NuGet/pack.bat: -------------------------------------------------------------------------------- 1 | nuget pack LightNode.Core.nuspec 2 | nuget pack LightNode.Server.nuspec 3 | nuget pack LightNode.Client.PCL.T4.nuspec 4 | nuget pack LightNode.Client.UniRx.T4.nuspec 5 | nuget pack LightNode.Formatter.ProtoBuf.nuspec 6 | nuget pack LightNode.Formatter.MsgPack.nuspec 7 | nuget pack LightNode.Formatter.JsonNet.nuspec 8 | nuget pack LightNode.Formatter.Jil.nuspec 9 | nuget pack LightNode.Formatter.Jil.LZ4.nuspec 10 | nuget pack Glimpse.LightNode.nuspec 11 | nuget pack LightNode.Swagger.nuspec 12 | nuget pack LightNode.Diagnostics.EventSource.nuspec -------------------------------------------------------------------------------- /NuGet/pack_LightNode2.bat: -------------------------------------------------------------------------------- 1 | nuget pack LightNode2.nuspec -------------------------------------------------------------------------------- /NuGet/push.bat: -------------------------------------------------------------------------------- 1 | nuget push LightNode.Core.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 2 | nuget push LightNode.Server.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 3 | nuget push LightNode.Client.PCL.T4.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 4 | nuget push LightNode.Client.UniRx.T4.1.6.3.nupkg -Source https://www.nuget.org/api/v2/package 5 | nuget push LightNode.Formatter.ProtoBuf.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 6 | nuget push LightNode.Formatter.MsgPack.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 7 | nuget push LightNode.Formatter.JsonNet.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 8 | nuget push LightNode.Formatter.Jil.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 9 | nuget push LightNode.Formatter.Jil.LZ4.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 10 | nuget push Glimpse.LightNode.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 11 | nuget push LightNode.Swagger.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package 12 | nuget push LightNode.Diagnostics.EventSource.1.6.6.1.nupkg -Source https://www.nuget.org/api/v2/package -------------------------------------------------------------------------------- /NuGet/push_LightNode2.bat: -------------------------------------------------------------------------------- 1 | nuget push LightNode.2.0.4-beta.nupkg -Source https://www.nuget.org/api/v2/package -------------------------------------------------------------------------------- /Performance/AspNetMVC/Controller/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | 8 | namespace AspNetMVC 9 | { 10 | public class HomeController : Controller 11 | { 12 | public JsonResult Get(string name, int x, int y, MyEnum e) 13 | { 14 | return new JsonNetResult(new MyClass { Name = name, Sum = (x + y) * (int)e }); 15 | } 16 | } 17 | 18 | public class MyClass 19 | { 20 | public string Name { get; set; } 21 | public int Sum { get; set; } 22 | } 23 | 24 | public enum MyEnum 25 | { 26 | A = 2, 27 | B = 3, 28 | C = 4 29 | } 30 | 31 | public class JsonNetResult : JsonResult 32 | { 33 | private readonly object _data; 34 | 35 | public JsonNetResult(object data) 36 | { 37 | if (data == null) 38 | { 39 | throw new ArgumentNullException("data"); 40 | } 41 | 42 | _data = data; 43 | } 44 | 45 | public override void ExecuteResult(ControllerContext context) 46 | { 47 | if (context == null) 48 | { 49 | throw new ArgumentNullException("context"); 50 | } 51 | 52 | var response = context.HttpContext.Response; 53 | response.ContentType = "application/json"; 54 | var writer = new JsonTextWriter(response.Output); 55 | var serializer = JsonSerializer.Create(new JsonSerializerSettings()); 56 | serializer.Serialize(writer, _data); 57 | writer.Flush(); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Performance/AspNetMVC/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="AspNetMVC.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Performance/AspNetMVC/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using System.Web.Routing; 4 | 5 | namespace AspNetMVC 6 | { 7 | public class Global : System.Web.HttpApplication 8 | { 9 | 10 | protected void Application_Start(object sender, EventArgs e) 11 | { 12 | RouteConfig.RegisterRoutes(RouteTable.Routes); 13 | } 14 | 15 | protected void Session_Start(object sender, EventArgs e) 16 | { 17 | 18 | } 19 | 20 | protected void Application_BeginRequest(object sender, EventArgs e) 21 | { 22 | 23 | } 24 | 25 | protected void Application_AuthenticateRequest(object sender, EventArgs e) 26 | { 27 | 28 | } 29 | 30 | protected void Application_Error(object sender, EventArgs e) 31 | { 32 | 33 | } 34 | 35 | protected void Session_End(object sender, EventArgs e) 36 | { 37 | 38 | } 39 | 40 | protected void Application_End(object sender, EventArgs e) 41 | { 42 | 43 | } 44 | } 45 | 46 | public class RouteConfig 47 | { 48 | public static void RegisterRoutes(RouteCollection routes) 49 | { 50 | routes.MapRoute( 51 | name: "Default", 52 | url: "{controller}/{action}/{id}", 53 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 54 | ); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /Performance/AspNetMVC/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("AspNetMVC")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AspNetMVC")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("6ac36ddc-811d-4dc3-90d2-f8b34f9d0a9f")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/AspNetMVC/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/AspNetMVC/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/AspNetMVC/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Performance/AspNetMVC/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Performance/AspNetMVC/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Performance/LightNode.Helios/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("LightNode.Helios")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Helios")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("54768dc3-0d05-49ae-a7dd-3ce633aa2952")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/LightNode.Helios/Startup.cs: -------------------------------------------------------------------------------- 1 | using Owin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace LightNode.Helios 8 | { 9 | public class Startup 10 | { 11 | public void Configuration(IAppBuilder app) 12 | { 13 | app.UseLightNode(new LightNode.Server.LightNodeOptions(Server.AcceptVerbs.Get | Server.AcceptVerbs.Post, 14 | new LightNode.Formatter.JsonNetContentFormatter())); 15 | } 16 | } 17 | 18 | public class Perf : LightNode.Server.LightNodeContract 19 | { 20 | public MyClass Echo(string name, int x, int y, MyEnum e) 21 | { 22 | return new MyClass { Name = name, Sum = (x + y) * (int)e }; 23 | } 24 | } 25 | 26 | public class MyClass 27 | { 28 | public string Name { get; set; } 29 | public int Sum { get; set; } 30 | } 31 | 32 | public enum MyEnum 33 | { 34 | A = 2, 35 | B = 3, 36 | C = 4 37 | } 38 | } -------------------------------------------------------------------------------- /Performance/LightNode.Helios/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/LightNode.Helios/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/LightNode.Helios/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Performance/LightNode.Helios/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Performance/LightNode.Performance/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("LightNode.Performance")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Performance")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("8ee50ce6-2ac4-4cd7-9324-6b0bc89db7e0")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/LightNode.Performance/Properties/PublishProfiles/LocalIIS.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | FileSystem 9 | Release 10 | Any CPU 11 | 12 | True 13 | False 14 | C:\inetpub\wwwroot 15 | False 16 | 17 | -------------------------------------------------------------------------------- /Performance/LightNode.Performance/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/LightNode.Performance/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/LightNode.Performance/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Performance/LightNode.Performance/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Performance/LightNode.SelfHost/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Performance/LightNode.SelfHost/Program.cs: -------------------------------------------------------------------------------- 1 | using LightNode.Server; 2 | using Microsoft.Owin.Hosting; 3 | using Owin; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace LightNode.SelfHost 11 | { 12 | class Program 13 | { 14 | static void Main(string[] args) 15 | { 16 | using (WebApp.Start("http://localhost:12345")) 17 | { 18 | Console.ReadLine(); 19 | } 20 | } 21 | } 22 | 23 | public class Startup 24 | { 25 | public void Configuration(IAppBuilder appa) 26 | { 27 | appa.UseLightNode(new LightNode.Server.LightNodeOptions(Server.AcceptVerbs.Get | Server.AcceptVerbs.Post, 28 | new LightNode.Formatter.JsonNetContentFormatter())); 29 | } 30 | } 31 | 32 | public class Perf : LightNode.Server.LightNodeContract 33 | { 34 | public MyClass Echo(string name, int x, int y, MyEnum e) 35 | { 36 | return new MyClass { Name = name, Sum = (x + y) * (int)e }; 37 | } 38 | 39 | public void Test(string a = null, int? x = null) 40 | { 41 | } 42 | 43 | public System.Threading.Tasks.Task Te() 44 | { 45 | return System.Threading.Tasks.Task.FromResult(1); 46 | } 47 | 48 | public void TestArray(string[] array, int[] array2) 49 | { 50 | } 51 | 52 | [Post] 53 | public string PostString(string hoge) 54 | { 55 | return hoge; 56 | } 57 | } 58 | 59 | public class MyClass 60 | { 61 | public string Name { get; set; } 62 | public int Sum { get; set; } 63 | } 64 | 65 | public enum MyEnum 66 | { 67 | A = 2, 68 | B = 3, 69 | C = 4 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Performance/LightNode.SelfHost/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.SelfHost")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.SelfHost")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("29c81c1d-1dae-4d06-bbe1-926741f4e5de")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Performance/LightNode.SelfHost/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Performance/Nancy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("Nancy")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Nancy")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("b7e2336a-d6d1-4934-ac30-37af030d54b1")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/Nancy/Startup.cs: -------------------------------------------------------------------------------- 1 | using Nancy; 2 | using Owin; 3 | 4 | namespace Nancyfx 5 | { 6 | public class Startup 7 | { 8 | public void Configuration(IAppBuilder app) 9 | { 10 | app.UseNancy(new Nancy.Owin.NancyOptions 11 | { 12 | Bootstrapper = new DefaultNancyBootstrapper() 13 | }); 14 | } 15 | } 16 | 17 | public class HomeModule : NancyModule 18 | { 19 | public HomeModule() 20 | { 21 | Get["/{name}/{x}/{y}/{e}"] = (x) => 22 | { 23 | return Response.AsJson(new MyClass { Name = x.name, Sum = ((int)x.x + (int)x.y) * (int)x.e }); 24 | }; 25 | } 26 | } 27 | 28 | public class MyClass 29 | { 30 | public string Name { get; set; } 31 | public int Sum { get; set; } 32 | } 33 | 34 | public enum MyEnum 35 | { 36 | A = 2, 37 | B = 3, 38 | C = 4 39 | } 40 | } -------------------------------------------------------------------------------- /Performance/Nancy/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/Nancy/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/Nancy/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Performance/Nancy/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Performance/PerfTest.ClientRunner/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Performance/PerfTest.ClientRunner/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("PerfTest.ClientRunner")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PerfTest.ClientRunner")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("8a8ba86f-6f78-40ff-be5d-24e9b3add0d1")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/AsyncHandler.ashx: -------------------------------------------------------------------------------- 1 | <%@ WebHandler Language="C#" CodeBehind="AsyncHandler.ashx.cs" Class="RawHttpHandler.AsyncHandler" %> 2 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/AsyncHandler.ashx.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace RawHttpHandler 8 | { 9 | public class AsyncHandler : HttpTaskAsyncHandler 10 | { 11 | public override System.Threading.Tasks.Task ProcessRequestAsync(HttpContext context) 12 | { 13 | var name = context.Request.QueryString.Get("name"); 14 | var x = int.Parse(context.Request.QueryString.Get("x")); 15 | var y = int.Parse(context.Request.QueryString.Get("y")); 16 | var e = Enum.Parse(typeof(MyEnum), context.Request.QueryString.Get("e")); 17 | 18 | var mc = new MyClass { Name = name, Sum = (x + y) * (int)e }; 19 | 20 | context.Response.ContentType = "application/json"; 21 | 22 | var json = JsonConvert.SerializeObject(mc); 23 | var enc = System.Text.Encoding.UTF8.GetBytes(json); 24 | context.Response.ContentType = "application/json"; 25 | return context.Response.OutputStream.WriteAsync(enc, 0, enc.Length); 26 | } 27 | 28 | public override bool IsReusable 29 | { 30 | get 31 | { 32 | return false; 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Performance/RawHttpHandler/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("RawHttpHandler")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RawHttpHandler")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("ef396eb3-89b0-4deb-bf4a-d9f683711779")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/SyncHandler.ashx: -------------------------------------------------------------------------------- 1 | <%@ WebHandler Language="C#" CodeBehind="SyncHandler.ashx.cs" Class="RawHttpHandler.SyncHandler" %> 2 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/SyncHandler.ashx.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace RawHttpHandler 9 | { 10 | public class SyncHandler : IHttpHandler 11 | { 12 | public void ProcessRequest(HttpContext context) 13 | { 14 | var name = context.Request.QueryString.Get("name"); 15 | var x = int.Parse(context.Request.QueryString.Get("x")); 16 | var y = int.Parse(context.Request.QueryString.Get("y")); 17 | var e = Enum.Parse(typeof(MyEnum), context.Request.QueryString.Get("e")); 18 | 19 | var mc = new MyClass { Name = name, Sum = (x + y) * (int)e }; 20 | 21 | context.Response.ContentType = "application/json"; 22 | 23 | var json = JsonConvert.SerializeObject(mc); 24 | var enc = System.Text.Encoding.UTF8.GetBytes(json); 25 | context.Response.ContentType = "application/json"; 26 | context.Response.OutputStream.Write(enc, 0, enc.Length); 27 | } 28 | 29 | public bool IsReusable 30 | { 31 | get 32 | { 33 | return false; 34 | } 35 | } 36 | } 37 | 38 | 39 | public class MyClass 40 | { 41 | public string Name { get; set; } 42 | public int Sum { get; set; } 43 | } 44 | 45 | public enum MyEnum 46 | { 47 | A = 2, 48 | B = 3, 49 | C = 4 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /Performance/RawHttpHandler/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Performance/RawHttpHandler/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Performance/RawOwinHandler/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("RawOwinHandler")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RawOwinHandler")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("8b9d05c6-4743-4a4f-a85c-11bb79b52fb2")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/RawOwinHandler/Startup.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Owin; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using System.Web; 9 | 10 | namespace RawOwinHandler 11 | { 12 | public class Startup 13 | { 14 | readonly static Task EmptyTask = Task.FromResult(null); 15 | 16 | public void Configuration(IAppBuilder app) 17 | { 18 | app.Run(context => 19 | { 20 | var name = context.Request.Query.Get("name"); 21 | var x = int.Parse(context.Request.Query.Get("x")); 22 | var y = int.Parse(context.Request.Query.Get("y")); 23 | var e = Enum.Parse(typeof(MyEnum), context.Request.Query.Get("e")); 24 | 25 | var mc = new MyClass { Name = name, Sum = (x + y) * (int)e }; 26 | 27 | var json = JsonConvert.SerializeObject(mc); 28 | var enc = System.Text.Encoding.UTF8.GetBytes(json); 29 | context.Response.ContentType = "application/json"; 30 | 31 | // sync write or async write 32 | if (context.Request.Query.Get("sync") == "true") 33 | { 34 | context.Response.Body.Write(enc, 0, enc.Length); 35 | return EmptyTask; // Task.FromResult(null) 36 | } 37 | else 38 | { 39 | return context.Response.Body.WriteAsync(enc, 0, enc.Length); 40 | } 41 | }); 42 | } 43 | } 44 | 45 | public class MyClass 46 | { 47 | public string Name { get; set; } 48 | public int Sum { get; set; } 49 | } 50 | 51 | public enum MyEnum 52 | { 53 | A = 2, 54 | B = 3, 55 | C = 4 56 | } 57 | } -------------------------------------------------------------------------------- /Performance/RawOwinHandler/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/RawOwinHandler/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/RawOwinHandler/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Performance/RawOwinHandler/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Performance/ServiceStack/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="ServiceStack.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Performance/ServiceStack/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Security; 6 | using System.Web.SessionState; 7 | 8 | namespace ServiceStack 9 | { 10 | public class Global : HttpApplication 11 | { 12 | public class AppHost : AppHostBase 13 | { 14 | public AppHost() : base("Hello Web Services", typeof(HelloService).Assembly) { } 15 | 16 | public override void Configure(Funq.Container container) 17 | { 18 | 19 | } 20 | } 21 | 22 | protected void Application_Start(object sender, EventArgs e) 23 | { 24 | new AppHost().Init(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Performance/ServiceStack/Hello.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace ServiceStack 7 | { 8 | [Route("/Get/{Name}/{x}/{y}/{e}")] 9 | public class Dto 10 | { 11 | public string Name { get; set; } 12 | public int x { get; set; } 13 | public int y { get; set; } 14 | public MyEnum e { get; set; } 15 | } 16 | 17 | public class MyClass 18 | { 19 | public string Name { get; set; } 20 | public int Sum { get; set; } 21 | } 22 | 23 | public enum MyEnum 24 | { 25 | A = 2, 26 | B = 3, 27 | C = 4 28 | } 29 | public class HelloService : Service 30 | { 31 | public MyClass Any(Dto request) 32 | { 33 | return new MyClass { Name = request.Name, Sum = (request.x + request.y) * (int)request.e }; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Performance/ServiceStack/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("ServiceStack")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ServiceStack")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("199b0343-6cbf-499d-9d1c-2896bcddaf8a")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/ServiceStack/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/ServiceStack/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/ServiceStack/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Performance/ServiceStack/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Performance/WcfService/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="WcfService.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Performance/WcfService/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.ServiceModel.Activation; 5 | using System.Web; 6 | using System.Web.Routing; 7 | using System.Web.Security; 8 | using System.Web.SessionState; 9 | 10 | namespace WcfService 11 | { 12 | public class Global : System.Web.HttpApplication 13 | { 14 | protected void Application_Start(object sender, EventArgs e) 15 | { 16 | RouteTable.Routes.Add( 17 | new ServiceRoute("Home", 18 | new WebServiceHostFactory(), 19 | typeof(Home))); 20 | } 21 | 22 | protected void Session_Start(object sender, EventArgs e) 23 | { 24 | 25 | } 26 | 27 | protected void Application_BeginRequest(object sender, EventArgs e) 28 | { 29 | 30 | } 31 | 32 | protected void Application_AuthenticateRequest(object sender, EventArgs e) 33 | { 34 | 35 | } 36 | 37 | protected void Application_Error(object sender, EventArgs e) 38 | { 39 | 40 | } 41 | 42 | protected void Session_End(object sender, EventArgs e) 43 | { 44 | 45 | } 46 | 47 | protected void Application_End(object sender, EventArgs e) 48 | { 49 | 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Performance/WcfService/IHome.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.ServiceModel; 6 | using System.ServiceModel.Activation; 7 | using System.ServiceModel.Web; 8 | using System.Text; 9 | 10 | namespace WcfService 11 | { 12 | [ServiceContract] 13 | public interface IHome 14 | { 15 | [OperationContract] 16 | [WebGet(ResponseFormat=WebMessageFormat.Json, UriTemplate="?name={name}&x={x}&y={y}&e={e}")] 17 | MyClass GetData(string name, int x, int y, MyEnum e); 18 | } 19 | 20 | [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] 21 | public class Home : IHome 22 | { 23 | public MyClass GetData(string name, int x, int y, MyEnum e) 24 | { 25 | return new MyClass { Name = name, Sum = (x + y) * (int)e }; 26 | } 27 | } 28 | 29 | [DataContract] 30 | public class MyClass 31 | { 32 | [DataMember] 33 | public string Name { get; set; } 34 | [DataMember] 35 | public int Sum { get; set; } 36 | } 37 | 38 | public enum MyEnum 39 | { 40 | A = 2, 41 | B = 3, 42 | C = 4 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Performance/WcfService/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットを使用して制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("WcfService")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WcfService")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("e4bc9488-64ae-45b9-adda-a31c92ec01f8")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、'*' を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Performance/WcfService/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/WcfService/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/WcfService/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Performance/WebAPI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("WebAPI")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebAPI")] 13 | [assembly: AssemblyCopyright("Copyright (C) 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("768bb01d-d586-48f6-aaa7-463f26762731")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Performance/WebAPI/Startup.cs: -------------------------------------------------------------------------------- 1 | using Owin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | using System.Web.Http; 7 | 8 | namespace WebAPI 9 | { 10 | public class Startup 11 | { 12 | public void Configuration(IAppBuilder app) 13 | { 14 | var config = new HttpConfiguration(); 15 | config.MapHttpAttributeRoutes(); 16 | config.Formatters.Remove(config.Formatters.XmlFormatter); 17 | app.UseWebApi(config); 18 | } 19 | } 20 | 21 | public class PerfController : ApiController 22 | { 23 | [HttpGet] 24 | [Route("Get/{name}/{x}/{y}/{e}")] 25 | public MyClass Get(string name, int x, int y, MyEnum e) 26 | { 27 | return new MyClass { Name = name, Sum = (x + y) * (int)e }; 28 | } 29 | } 30 | 31 | public class MyClass 32 | { 33 | public string Name { get; set; } 34 | public int Sum { get; set; } 35 | } 36 | public enum MyEnum 37 | { 38 | A = 2, 39 | B = 3, 40 | C = 4 41 | } 42 | } -------------------------------------------------------------------------------- /Performance/WebAPI/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Performance/WebAPI/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Performance/WebAPI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Performance/ab/ab.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Performance/ab/ab.exe -------------------------------------------------------------------------------- /Performance/ab/run.bat: -------------------------------------------------------------------------------- 1 | ab.exe -n 40000 -c 20 "http://localhost/LightNode.Performance/Perf/Echo?name=hogehoge&x=10&y=20&e=2" 2 | ab.exe -n 40000 -c 20 "http://localhost/LightNode.Helios/Perf/Echo?name=hogehoge&x=10&y=20&e=2" 3 | ab.exe -n 40000 -c 20 "http://localhost/AspNetMVC/Home/Get?name=hogehoge&x=10&y=20&e=2" 4 | ab.exe -n 40000 -c 20 "http://localhost/Nancy/hogehoge/10/20/2" 5 | ab.exe -n 40000 -c 20 "http://localhost/RawHttpHandler/SyncHandler.ashx?name=hogehoge&x=10&y=20&e=2" 6 | ab.exe -n 40000 -c 20 "http://localhost/RawHttpHandler/ASyncHandler.ashx?name=hogehoge&x=10&y=20&e=2" 7 | ab.exe -n 40000 -c 20 "http://localhost/RawOwinHandler?sync=true&name=hogehoge&x=10&y=20&e=2" 8 | ab.exe -n 40000 -c 20 "http://localhost/RawOwinHandler?sync=false&name=hogehoge&x=10&y=20&e=2" 9 | ab.exe -n 40000 -c 20 "http://localhost/ServiceStack/Get/hogehoge/10/20/2.json" 10 | ab.exe -n 40000 -c 20 "http://localhost/WcfService/Home/?name=hogehoge&x=10&y=20&e=2" 11 | ab.exe -n 40000 -c 20 "http://localhost/WebAPI/Get/hogehoge/20/10/2" 12 | ab.exe -n 40000 -c 20 "http://localhost:12345/Perf/Echo?name=hogehoge&x=10&y=20&e=2" -------------------------------------------------------------------------------- /Sample/AspNetCoreSample/AspNetCoreSample.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 0ea8f2c9-a92c-4ee3-b43b-9a96498b6800 10 | AspNetCoreSample 11 | .\obj 12 | .\bin\ 13 | v4.6.1 14 | 15 | 16 | 2.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sample/AspNetCoreSample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Hosting; 7 | 8 | namespace AspNetCoreSample 9 | { 10 | public class Program 11 | { 12 | public static void Main(string[] args) 13 | { 14 | var host = new WebHostBuilder() 15 | .UseKestrel() 16 | .UseContentRoot(Directory.GetCurrentDirectory()) 17 | .UseIISIntegration() 18 | .UseStartup() 19 | .Build(); 20 | 21 | host.Run(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sample/AspNetCoreSample/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:15944/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "WebApplicationCore1": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "launchUrl": "http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Sample/AspNetCoreSample/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.App": { 4 | "version": "1.0.0", 5 | "type": "platform" 6 | }, 7 | "Microsoft.AspNetCore.Diagnostics": "1.0.0", 8 | "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 9 | "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", 10 | "Microsoft.Extensions.Logging.Console": "1.0.0", 11 | "LightNode2": "2.0.0-*" 12 | }, 13 | 14 | "tools": { 15 | "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" 16 | }, 17 | 18 | "frameworks": { 19 | "netcoreapp1.0": { 20 | "imports": [ 21 | "dotnet5.6", 22 | "portable-net45+win8" 23 | ] 24 | } 25 | }, 26 | 27 | "buildOptions": { 28 | "emitEntryPoint": true, 29 | "preserveCompilationContext": true, 30 | "xmlDoc": true, 31 | "nowarn": [ "1591" ] 32 | }, 33 | 34 | "runtimeOptions": { 35 | "configProperties": { 36 | "System.GC.Server": true 37 | } 38 | }, 39 | 40 | "publishOptions": { 41 | "include": [ 42 | "wwwroot", 43 | "web.config" 44 | ] 45 | }, 46 | 47 | "scripts": { 48 | "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Sample/AspNetCoreSample/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Client/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Client/Program.cs: -------------------------------------------------------------------------------- 1 | using LightNode.Server; 2 | // using LightNode.Client; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace LightNode.Sample.Client 11 | { 12 | class Program 13 | { 14 | static void Main(string[] args) 15 | { 16 | // not yet... 17 | 18 | // var client = new LightNodeClient("http://localhost:12345") { ContentFormatter = new LightNode.Formatter.JavaScriptContentTypeFormatter() }; 19 | 20 | throw new ReturnStatusCodeException(System.Net.HttpStatusCode.BadRequest, content: "だめだったんじゃもん!"); 21 | 22 | // var v = client.My.EchoAsync("hogehoge").Result; 23 | // Console.WriteLine(v); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Client/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Sample.Client")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Sample.Client")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("1aad78ed-77a4-4f4d-a35d-04f970038fb2")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.GimpseUse/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は、以下の属性セットによって 6 | // 制御されます。アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更します。 8 | [assembly: AssemblyTitle("LightNode.Sample.GimpseUse")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Sample.GimpseUse")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、 18 | // COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。 19 | // COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("bd459459-c56c-4e7c-83c3-bcc39b9b1b18")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // メジャー バージョン 28 | // マイナー バージョン 29 | // ビルド番号 30 | // リビジョン 31 | // 32 | // すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 33 | // 既定値にすることができます: 34 | [assembly: AssemblyVersion("1.6.3.0")] 35 | [assembly: AssemblyFileVersion("1.6.3.0")] 36 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.GimpseUse/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 30 | 31 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.GimpseUse/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 31 | 32 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.GimpseUse/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Server.ForAngularClient/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Server.ForAngularClient/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Sample.Server.ForAngularClient")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Sample.Server.ForAngularClient")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("7d45f2cc-bcd4-4b10-959b-e875a632269d")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Server.ForAngularClient/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Server.SelfHost/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Server.SelfHost/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Sample.Server.SelfHost")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Sample.Server.SelfHost")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("4f986fb3-0ac6-4951-9fd7-987fd6b77004")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.6.3.0")] 36 | [assembly: AssemblyFileVersion("1.6.3.0")] 37 | -------------------------------------------------------------------------------- /Sample/LightNode.Sample.Server.SelfHost/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Source/Glimpse.LightNode/EnableGlimpseMiddleware.cs: -------------------------------------------------------------------------------- 1 | using Glimpse.LightNode; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | 6 | namespace Glimpse.LightNode 7 | { 8 | using Glimpse.Core.Framework; 9 | using System.Web; 10 | using AppFunc = Func, Task>; 11 | 12 | public class EnableGlimpseMiddleware 13 | { 14 | readonly AppFunc next; 15 | 16 | public EnableGlimpseMiddleware(AppFunc next) 17 | { 18 | this.next = next; 19 | } 20 | 21 | public Task Invoke(IDictionary environment) 22 | { 23 | return next(environment).ContinueWith((_, state) => 24 | { 25 | var context = (state as HttpContext); 26 | if (context == null) return; 27 | 28 | var runtime = context.Application["__GlimpseRuntime"] as IGlimpseRuntime; 29 | if (runtime == null) return; 30 | 31 | try 32 | { 33 | runtime.EndRequest(); 34 | } 35 | catch { } 36 | }, System.Web.HttpContext.Current); 37 | } 38 | } 39 | } 40 | 41 | namespace Owin 42 | { 43 | public static class GlimpseLightNodeMiddlewareExtensions 44 | { 45 | public static IAppBuilder EnableGlimpse(this IAppBuilder app) 46 | { 47 | return app.Use(typeof(EnableGlimpseMiddleware)); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Source/Glimpse.LightNode/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("Glimpse.LightNode")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("Glimpse.LightNode")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("2002a68f-268f-4692-bedb-3d9a92112860")] 16 | 17 | [assembly: AssemblyVersion("1.6.6.1")] 18 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/Glimpse.LightNode/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Source/LightNode.Client.AngularJS.T4/Scripts/typings/angularjs/angular-sanitize.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for Angular JS 1.3 (ngSanitize module) 2 | // Project: http://angularjs.org 3 | // Definitions by: Diego Vilar 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped 5 | 6 | 7 | /// 8 | 9 | declare module "angular-sanitize" { 10 | var _: string; 11 | export = _; 12 | } 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | // ngSanitize module (angular-sanitize.js) 16 | /////////////////////////////////////////////////////////////////////////////// 17 | declare module angular.sanitize { 18 | 19 | /////////////////////////////////////////////////////////////////////////// 20 | // SanitizeService 21 | // see http://docs.angularjs.org/api/ngSanitize.$sanitize 22 | /////////////////////////////////////////////////////////////////////////// 23 | interface ISanitizeService { 24 | (html: string): string; 25 | } 26 | 27 | /////////////////////////////////////////////////////////////////////////// 28 | // Filters included with the ngSanitize 29 | // see https://github.com/angular/angular.js/tree/v1.2.0/src/ngSanitize/filter 30 | /////////////////////////////////////////////////////////////////////////// 31 | export module filter { 32 | 33 | // Finds links in text input and turns them into html links. 34 | // Supports http/https/ftp/mailto and plain email address links. 35 | // see http://code.angularjs.org/1.2.0/docs/api/ngSanitize.filter:linky 36 | interface ILinky { 37 | (text: string, target?: string): string; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Source/LightNode.Client.AngularJS.T4/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LightNode.Client.AngularJS.T4 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 |
14 | 15 |
16 | 20 |
21 |
    22 |
  • 23 | {{log}} 24 |
  • 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /Source/LightNode.Client.AngularJS.T4/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Source/LightNode.Client.AngularJS.T4/web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /Source/LightNode.Client.AngularJS.T4/web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /Source/LightNode.Client.AngularJS.T4/web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Source/LightNode.Client.PCL.T4/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LightNode.Client 9 | { 10 | class Program 11 | { 12 | static async Task Run() 13 | { 14 | var client = new LightNodeClient("http://localhost:54097"); 15 | 16 | var tasks = Enumerable.Range(1, 1).Select(_ => 17 | { 18 | // return client.Perf.EchoAsync("hoge", 10, 2, Performance.MyEnum.B); 19 | 20 | return client.Perf.TeAsync(); 21 | }); 22 | 23 | await Task.WhenAll(tasks); 24 | } 25 | 26 | static void Main(string[] args) 27 | { 28 | var sw = Stopwatch.StartNew(); 29 | Run().Wait(); 30 | 31 | Console.WriteLine(sw.Elapsed); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Source/LightNode.Client.PCL.T4/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Client.PCL.T4")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Client.PCL.T4")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("4bd414de-327a-4f29-8887-e06efa67168e")] 16 | 17 | [assembly: AssemblyCopyright("Copyright (C) 2014")] 18 | [assembly: AssemblyVersion("0.4.0.0")] 19 | [assembly: AssemblyFileVersion("0.4.0.0")] -------------------------------------------------------------------------------- /Source/LightNode.Client.PCL.T4/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Client.UniRx.T4")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Client.UniRx.T4")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("9621c22e-480f-4b62-8488-ce7d5714d3fe")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Disposables/BooleanDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace UniRx 5 | { 6 | public class BooleanDisposable : IDisposable, ICancelable 7 | { 8 | public bool IsDisposed { get; private set; } 9 | 10 | public BooleanDisposable() 11 | { 12 | 13 | } 14 | 15 | internal BooleanDisposable(bool isDisposed) 16 | { 17 | IsDisposed = isDisposed; 18 | } 19 | 20 | public void Dispose() 21 | { 22 | if (!IsDisposed) IsDisposed = true; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Disposables/Disposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace UniRx 5 | { 6 | public static class Disposable 7 | { 8 | public static readonly IDisposable Empty = EmptyDisposable.Singleton; 9 | 10 | public static IDisposable Create(Action disposeAction) 11 | { 12 | return new AnonymousDisposable(disposeAction); 13 | } 14 | 15 | class EmptyDisposable : IDisposable 16 | { 17 | public static EmptyDisposable Singleton = new EmptyDisposable(); 18 | 19 | private EmptyDisposable() 20 | { 21 | 22 | } 23 | 24 | public void Dispose() 25 | { 26 | } 27 | } 28 | 29 | class AnonymousDisposable : IDisposable 30 | { 31 | bool isDisposed = false; 32 | readonly Action dispose; 33 | 34 | public AnonymousDisposable(Action dispose) 35 | { 36 | this.dispose = dispose; 37 | } 38 | 39 | public void Dispose() 40 | { 41 | if (!isDisposed) 42 | { 43 | isDisposed = true; 44 | dispose(); 45 | } 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Disposables/ICancelable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public interface ICancelable : IDisposable 9 | { 10 | bool IsDisposed { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace UniRx 5 | { 6 | public class MultipleAssignmentDisposable : IDisposable, ICancelable 7 | { 8 | static readonly BooleanDisposable True = new BooleanDisposable(true); 9 | 10 | object gate = new object(); 11 | IDisposable current; 12 | 13 | public bool IsDisposed 14 | { 15 | get 16 | { 17 | lock (gate) 18 | { 19 | return current == True; 20 | } 21 | } 22 | } 23 | 24 | public IDisposable Disposable 25 | { 26 | get 27 | { 28 | lock (gate) 29 | { 30 | return (current == True) 31 | ? UniRx.Disposable.Empty 32 | : current; 33 | } 34 | } 35 | set 36 | { 37 | var shouldDispose = false; 38 | lock (gate) 39 | { 40 | shouldDispose = (current == True); 41 | if (!shouldDispose) 42 | { 43 | current = value; 44 | } 45 | } 46 | if (shouldDispose && value != null) 47 | { 48 | value.Dispose(); 49 | } 50 | } 51 | } 52 | 53 | public void Dispose() 54 | { 55 | IDisposable old = null; 56 | 57 | lock (gate) 58 | { 59 | if (current != True) 60 | { 61 | old = current; 62 | current = True; 63 | } 64 | } 65 | 66 | if (old != null) old.Dispose(); 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Disposables/ScheduledDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | 4 | namespace UniRx 5 | { 6 | public sealed class ScheduledDisposable : ICancelable 7 | { 8 | private readonly IScheduler scheduler; 9 | private volatile IDisposable disposable; 10 | private int isDisposed = 0; 11 | 12 | public ScheduledDisposable(IScheduler scheduler, IDisposable disposable) 13 | { 14 | this.scheduler = scheduler; 15 | this.disposable = disposable; 16 | } 17 | 18 | public IScheduler Scheduler 19 | { 20 | get { return scheduler; } 21 | } 22 | 23 | public IDisposable Disposable 24 | { 25 | get { return disposable; } 26 | } 27 | 28 | public bool IsDisposed 29 | { 30 | get { return isDisposed != 0; } 31 | } 32 | 33 | public void Dispose() 34 | { 35 | Scheduler.Schedule(DisposeInner); 36 | } 37 | 38 | private void DisposeInner() 39 | { 40 | if (Interlocked.Increment(ref isDisposed) == 0) 41 | { 42 | disposable.Dispose(); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Disposables/SerialDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace UniRx 5 | { 6 | public class SerialDisposable : IDisposable, ICancelable 7 | { 8 | readonly object gate = new object(); 9 | IDisposable current; 10 | bool disposed; 11 | 12 | public bool IsDisposed { get { lock (gate) { return disposed; } } } 13 | 14 | public IDisposable Disposable 15 | { 16 | get 17 | { 18 | return current; 19 | } 20 | set 21 | { 22 | var shouldDispose = false; 23 | var old = default(IDisposable); 24 | lock (gate) 25 | { 26 | shouldDispose = disposed; 27 | if (!shouldDispose) 28 | { 29 | old = current; 30 | current = value; 31 | } 32 | } 33 | if (old != null) 34 | { 35 | old.Dispose(); 36 | } 37 | if (shouldDispose && value != null) 38 | { 39 | value.Dispose(); 40 | } 41 | } 42 | } 43 | 44 | public void Dispose() 45 | { 46 | var old = default(IDisposable); 47 | 48 | lock (gate) 49 | { 50 | if (!disposed) 51 | { 52 | disposed = true; 53 | old = current; 54 | current = null; 55 | } 56 | } 57 | 58 | if (old != null) 59 | { 60 | old.Dispose(); 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Notifiers/BooleanNotifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | /// 9 | /// Notify boolean flag. 10 | /// 11 | public class BooleanNotifier : IObservable 12 | { 13 | readonly Subject boolTrigger = new Subject(); 14 | 15 | bool boolValue; 16 | /// Current flag value 17 | public bool Value 18 | { 19 | get { return boolValue; } 20 | set 21 | { 22 | boolValue = value; 23 | boolTrigger.OnNext(value); 24 | } 25 | } 26 | 27 | /// 28 | /// Setup initial flag. 29 | /// 30 | public BooleanNotifier(bool initialValue = false) 31 | { 32 | this.Value = initialValue; 33 | } 34 | 35 | /// 36 | /// Set and raise true if current value isn't true. 37 | /// 38 | public void TurnOn() 39 | { 40 | if (Value != true) 41 | { 42 | Value = true; 43 | } 44 | } 45 | 46 | /// 47 | /// Set and raise false if current value isn't false. 48 | /// 49 | public void TurnOff() 50 | { 51 | if (Value != false) 52 | { 53 | Value = false; 54 | } 55 | } 56 | 57 | /// 58 | /// Set and raise reverse value. 59 | /// 60 | public void SwitchValue() 61 | { 62 | Value = !Value; 63 | } 64 | 65 | 66 | /// 67 | /// Subscribe observer. 68 | /// 69 | public IDisposable Subscribe(IObserver observer) 70 | { 71 | return boolTrigger.Subscribe(observer); 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Observable.Blocking.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public static partial class Observable 9 | { 10 | public static T Wait(this IObservable source) 11 | { 12 | return WaitCore(source, true, InfiniteTimeSpan); 13 | } 14 | 15 | public static T Wait(this IObservable source, TimeSpan timeout) 16 | { 17 | return WaitCore(source, true, timeout); 18 | } 19 | 20 | static T WaitCore(IObservable source, bool throwOnEmpty, TimeSpan timeout) 21 | { 22 | if (source == null) throw new ArgumentNullException("source"); 23 | 24 | var semaphore = new System.Threading.ManualResetEvent(false); 25 | 26 | var seenValue = false; 27 | var value = default(T); 28 | var ex = default(Exception); 29 | 30 | using (source.Subscribe( 31 | onNext: x => { seenValue = true; value = x; }, 32 | onError: x => { ex = x; semaphore.Set(); }, 33 | onCompleted: () => semaphore.Set())) 34 | { 35 | var waitComplete = (timeout == InfiniteTimeSpan) 36 | ? semaphore.WaitOne() 37 | : semaphore.WaitOne(timeout); 38 | 39 | if (!waitComplete) 40 | { 41 | throw new TimeoutException("OnCompleted not fired."); 42 | } 43 | } 44 | 45 | if (ex != null) throw ex; 46 | if (throwOnEmpty && !seenValue) throw new InvalidOperationException("No Elements."); 47 | 48 | return value; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Observable.Events.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public static partial class Observable 9 | { 10 | public static IObservable> FromEventPattern(Func, TDelegate> conversion, Action addHandler, Action removeHandler) 11 | where TEventArgs : EventArgs 12 | { 13 | return Observable.Create>(observer => 14 | { 15 | var handler = conversion((sender, eventArgs) => observer.OnNext(new EventPattern(sender, eventArgs))); 16 | addHandler(handler); 17 | return Disposable.Create(() => removeHandler(handler)); 18 | }); 19 | } 20 | 21 | private static IObservable FromEvent(Func, TDelegate> conversion, Action addHandler, Action removeHandler) 22 | { 23 | return Observable.Create(observer => 24 | { 25 | var handler = conversion(observer.OnNext); 26 | addHandler(handler); 27 | return Disposable.Create(() => removeHandler(handler)); 28 | }); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Observable.Joins.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public static partial class Observable 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Schedulers/ImmediateScheduler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading; 7 | 8 | namespace UniRx 9 | { 10 | public static partial class Scheduler 11 | { 12 | public static readonly IScheduler Immediate = new ImmediateScheduler(); 13 | 14 | class ImmediateScheduler : IScheduler 15 | { 16 | public ImmediateScheduler() 17 | { 18 | } 19 | 20 | public DateTimeOffset Now 21 | { 22 | get { return Scheduler.Now; } 23 | } 24 | 25 | public IDisposable Schedule(TState state, Func action) 26 | { 27 | return action(this, state); 28 | } 29 | 30 | public IDisposable Schedule(TState state, DateTimeOffset dueTime, Func action) 31 | { 32 | return Schedule(state, dueTime - Now, action); 33 | } 34 | 35 | public IDisposable Schedule(TState state, TimeSpan dueTime, Func action) 36 | { 37 | var wait = Scheduler.Normalize(dueTime); 38 | if (wait.Ticks > 0) 39 | { 40 | Thread.Sleep(wait); 41 | } 42 | return action(this, state); 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Subjects/ConnectableObservable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public interface IConnectableObservable : IObservable 9 | { 10 | IDisposable Connect(); 11 | } 12 | 13 | public static partial class Observable 14 | { 15 | class ConnectableObservable : IConnectableObservable 16 | { 17 | readonly IObservable source; 18 | readonly ISubject subject; 19 | 20 | public ConnectableObservable(IObservable source, ISubject subject) 21 | { 22 | this.source = source; 23 | this.subject = subject; 24 | } 25 | 26 | public IDisposable Connect() 27 | { 28 | var subscription = source.Subscribe(subject); 29 | return subscription; 30 | } 31 | 32 | public IDisposable Subscribe(IObserver observer) 33 | { 34 | return subject.Subscribe(observer); 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Subjects/ISubject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public interface ISubject : IObserver, IObservable 9 | { 10 | } 11 | 12 | public interface ISubject : ISubject, IObserver, IObservable 13 | { 14 | } 15 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/Subjects/Subject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | // MEMO:should be threadsafe? 9 | 10 | public sealed class Subject : ISubject 11 | { 12 | bool isStopped; 13 | Exception lastError; 14 | List> observers = new List>(); 15 | 16 | public void OnCompleted() 17 | { 18 | if (isStopped) return; 19 | 20 | isStopped = true; 21 | foreach (var item in observers.ToArray()) 22 | { 23 | item.OnCompleted(); 24 | } 25 | observers.Clear(); 26 | } 27 | 28 | public void OnError(Exception error) 29 | { 30 | if (isStopped) return; 31 | 32 | isStopped = true; 33 | lastError = error; 34 | foreach (var item in observers.ToArray()) 35 | { 36 | item.OnError(error); 37 | } 38 | observers.Clear(); 39 | } 40 | 41 | public void OnNext(T value) 42 | { 43 | if (isStopped) return; 44 | 45 | foreach (var item in observers.ToArray()) 46 | { 47 | item.OnNext(value); 48 | } 49 | } 50 | 51 | public IDisposable Subscribe(IObserver observer) 52 | { 53 | if (!isStopped) 54 | { 55 | observers.Add(observer); 56 | 57 | return Disposable.Create(() => observers.Remove(observer)); 58 | } 59 | else if (lastError != null) 60 | { 61 | observer.OnError(lastError); 62 | return Disposable.Empty; 63 | } 64 | else 65 | { 66 | observer.OnCompleted(); 67 | return Disposable.Empty; 68 | } 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/System/IProgress.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace UniRx 7 | { 8 | public interface IProgress 9 | { 10 | void Report(T value); 11 | } 12 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/System/Unit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UniRx 4 | { 5 | // from Rx Official 6 | 7 | [Serializable] 8 | public struct Unit : IEquatable 9 | { 10 | static readonly Unit @default = new Unit(); 11 | 12 | public static Unit Default { get { return @default; } } 13 | 14 | public static bool operator ==(Unit first, Unit second) 15 | { 16 | return true; 17 | } 18 | 19 | public static bool operator !=(Unit first, Unit second) 20 | { 21 | return false; 22 | } 23 | 24 | public bool Equals(Unit other) 25 | { 26 | return true; 27 | } 28 | public override bool Equals(object obj) 29 | { 30 | return obj is Unit; 31 | } 32 | 33 | public override int GetHashCode() 34 | { 35 | return 0; 36 | } 37 | 38 | public override string ToString() 39 | { 40 | return "()"; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UniRx 4 | { 5 | public class CancellationToken 6 | { 7 | readonly ICancelable source; 8 | 9 | public static CancellationToken Empty = new CancellationToken(new BooleanDisposable()); 10 | 11 | public CancellationToken(ICancelable source) 12 | { 13 | if (source == null) throw new ArgumentNullException("source"); 14 | 15 | this.source = source; 16 | } 17 | 18 | public bool IsCancellationRequested 19 | { 20 | get 21 | { 22 | return source.IsDisposed; 23 | } 24 | } 25 | 26 | public void ThrowIfCancellationRequested() 27 | { 28 | if (IsCancellationRequested) 29 | { 30 | throw new OperationCanceledException(); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/UnityEngine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Client.UniRx.T4/UnityEngine.dll -------------------------------------------------------------------------------- /Source/LightNode.Client.UniRx.T4/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Client.Unity.T4/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Client.Unity.T4")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Client.Unity.T4")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("8d18de0d-5f52-40aa-9cf2-a094ab92e22b")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Source/LightNode.Client.Unity.T4/UnityEngine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Client.Unity.T4/UnityEngine.dll -------------------------------------------------------------------------------- /Source/LightNode.Client.Unity.T4/bin/Debug/UnityEngine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Client.Unity.T4/bin/Debug/UnityEngine.dll -------------------------------------------------------------------------------- /Source/LightNode.Client.Unity.T4/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Core/Formatter/IContentFormatter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | 5 | namespace LightNode.Core 6 | { 7 | public interface IContentFormatter 8 | { 9 | string MediaType { get; } 10 | string ContentEncoding { get; } 11 | string Ext { get; } 12 | Encoding Encoding { get; } 13 | void Serialize(Stream stream, object obj); 14 | object Deserialize(Type type, Stream stream); 15 | } 16 | 17 | public interface IContentFormatterFactory 18 | { 19 | IContentFormatter CreateFormatter(); 20 | } 21 | } -------------------------------------------------------------------------------- /Source/LightNode.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | 7 | [assembly: AssemblyTitle("LightNode.Core")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("LightNode.Core")] 12 | 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | [assembly: NeutralResourcesLanguage("en")] 16 | [assembly: AssemblyVersion("1.6.6.1")] 17 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Diagnostics.EventSource/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Diagnostics.EventSource")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Diagnostics.EventSource")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("a917b7f3-3f69-4187-b2d5-cfc1f258935a")] 16 | 17 | [assembly: AssemblyVersion("1.6.6.1")] 18 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Formatter.Jil.LZ4/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Formatter.Jil.LZ4")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Formatter.Jil.LZ4")] 10 | [assembly: AssemblyCopyright("Copyright © 2015")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("03fb9e75-f3a7-4d7a-b97d-06143f644cee")] 17 | 18 | 19 | [assembly: AssemblyVersion("1.6.6.1")] 20 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Formatter.Jil.LZ4/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Source/LightNode.Formatter.Jil/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Formatter.Jil")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Formatter.Jil")] 10 | [assembly: AssemblyCopyright("Copyright © 2015")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("0d2ec1cc-5820-4f71-8ef3-d57b518caec1")] 17 | 18 | [assembly: AssemblyVersion("1.6.6.1")] 19 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Formatter.Jil/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Source/LightNode.Formatter.JsonNet/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | 7 | [assembly: AssemblyTitle("LightNode.Formatter.JsonNet")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("LightNode.Formatter.JsonNet")] 12 | [assembly: AssemblyCopyright("Copyright (C) 2014")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | [assembly: NeutralResourcesLanguage("en")] 16 | [assembly: AssemblyVersion("1.6.6.1")] 17 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Formatter.JsonNet/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Formatter.MsgPack/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Formatter.MsgPack")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Formatter.MsgPack")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("f97dc144-1e5d-499e-aaf6-7fc352102346")] 16 | 17 | [assembly: AssemblyVersion("1.6.6.1")] 18 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Formatter.MsgPack/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Formatter.ProtoBuf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Formatter.ProtoBuf")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Formatter.ProtoBuf")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("4a7e0d9a-7792-494a-9e07-2486498d4314")] 16 | 17 | [assembly: AssemblyCopyright("Copyright (C) 2014")] 18 | [assembly: AssemblyVersion("1.6.6.1")] 19 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Formatter.ProtoBuf/ProtoBufContentFormatter.cs: -------------------------------------------------------------------------------- 1 | using LightNode.Core; 2 | using ProtoBuf.Meta; 3 | using System; 4 | 5 | namespace LightNode.Formatter 6 | { 7 | public class ProtoBufContentFormatter : ContentFormatterBase 8 | { 9 | readonly RuntimeTypeModel runtimeTypeModel; 10 | 11 | public ProtoBufContentFormatter(string mediaType = "application/x-protobuf", string ext = "proto") 12 | : this(RuntimeTypeModel.Default, mediaType, ext) 13 | { 14 | } 15 | public ProtoBufContentFormatter(RuntimeTypeModel runtimeTypeModel, string mediaType = "application/x-protobuf", string ext = "proto") 16 | : base(mediaType, ext, null) 17 | { 18 | this.runtimeTypeModel = runtimeTypeModel; 19 | } 20 | 21 | public override void Serialize(System.IO.Stream stream, object obj) 22 | { 23 | runtimeTypeModel.Serialize(stream, obj); 24 | } 25 | 26 | public override object Deserialize(Type type, System.IO.Stream stream) 27 | { 28 | return runtimeTypeModel.Deserialize(stream, null, type); 29 | } 30 | } 31 | 32 | public class ProtoBufContentFormatterFactory : IContentFormatterFactory 33 | { 34 | public IContentFormatter CreateFormatter() 35 | { 36 | return new ProtoBufContentFormatter(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Source/LightNode.Formatter.ProtoBuf/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Server/DebugOnlyClientGenerateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 10 | public sealed class DebugOnlyClientGenerateAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode.Server/DefineTypeScriptGenerateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum, AllowMultiple = false)] 10 | public sealed class DefineTypeScriptGenerateAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode.Server/IgnoreClientGenerateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 10 | public sealed class IgnoreClientGenerateAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode.Server/IgnoreOperationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 10 | public sealed class IgnoreOperationAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode.Server/LightNodeContract.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | public abstract class LightNodeContract 10 | { 11 | public IDictionary Environment { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Source/LightNode.Server/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Server")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyTrademark("")] 10 | [assembly: AssemblyCulture("")] 11 | 12 | [assembly: ComVisible(false)] 13 | 14 | [assembly: Guid("a8480342-8d48-46ec-af7b-a220bc5b6b8b")] 15 | [assembly: AssemblyVersion("1.6.6.1")] 16 | [assembly: AssemblyFileVersion("1.6.6.1")] 17 | 18 | [assembly: InternalsVisibleTo("LightNode.Server.Tests")] -------------------------------------------------------------------------------- /Source/LightNode.Server/RequestPath.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LightNode.Server 4 | { 5 | internal class RequestPath : IEquatable 6 | { 7 | readonly string className; 8 | readonly string methodName; 9 | readonly static StringComparer comparer = StringComparer.OrdinalIgnoreCase; 10 | 11 | public RequestPath(string className, string methodName) 12 | { 13 | this.className = className; 14 | this.methodName = methodName; 15 | } 16 | 17 | public override bool Equals(object obj) 18 | { 19 | var _obj = obj as RequestPath; 20 | if (_obj != null) return Equals(_obj); 21 | 22 | return base.Equals(obj); 23 | } 24 | 25 | public bool Equals(RequestPath other) 26 | { 27 | if (other == null) return false; 28 | 29 | return comparer.Equals(this.className, other.className) && comparer.Equals(this.methodName, other.methodName); 30 | } 31 | 32 | public override int GetHashCode() 33 | { 34 | return CombineHashCodes(comparer.GetHashCode(className), comparer.GetHashCode(methodName)); 35 | } 36 | 37 | public override string ToString() 38 | { 39 | return "/" + className + "/" + methodName; 40 | } 41 | 42 | internal static int CombineHashCodes(int h1, int h2) 43 | { 44 | return (h1 << 5) + h1 ^ h2; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Source/LightNode.Server/Utility/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | internal static class Utils 10 | { 11 | public static bool IsNullable(this Type type) 12 | { 13 | return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Source/LightNode.Server/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LightNode.Swagger")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LightNode.Swagger")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("21ec7b4e-17f9-4268-9d16-77b6a0f00ea1")] 16 | 17 | [assembly: AssemblyVersion("1.6.6.1")] 18 | [assembly: AssemblyFileVersion("1.6.6.1")] -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerOptions.cs: -------------------------------------------------------------------------------- 1 | using LightNode.Swagger.Schema; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LightNode.Swagger 9 | { 10 | public class SwaggerOptions 11 | { 12 | public string ApiBasePath { get; private set; } 13 | 14 | public Swagger.Schema.Info Info { get; set; } 15 | 16 | /// 17 | /// (FilePath, LoadedEmbeddedBytes) => CustomBytes) 18 | /// 19 | public Func ResolveCustomResource { get; set; } 20 | public Func, string> CustomHost { get; set; } 21 | public string XmlDocumentPath { get; set; } 22 | 23 | public bool IsEmitEnumAsString { get; set; } 24 | 25 | public SwaggerOptions(string title, string apiBasePath) 26 | { 27 | ApiBasePath = apiBasePath; 28 | Info = new Info { description = "", version = "1.0", title = title }; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ 2 | html, 3 | body, 4 | div, 5 | span, 6 | applet, 7 | object, 8 | iframe, 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6, 15 | p, 16 | blockquote, 17 | pre, 18 | a, 19 | abbr, 20 | acronym, 21 | address, 22 | big, 23 | cite, 24 | code, 25 | del, 26 | dfn, 27 | em, 28 | img, 29 | ins, 30 | kbd, 31 | q, 32 | s, 33 | samp, 34 | small, 35 | strike, 36 | strong, 37 | sub, 38 | sup, 39 | tt, 40 | var, 41 | b, 42 | u, 43 | i, 44 | center, 45 | dl, 46 | dt, 47 | dd, 48 | ol, 49 | ul, 50 | li, 51 | fieldset, 52 | form, 53 | label, 54 | legend, 55 | table, 56 | caption, 57 | tbody, 58 | tfoot, 59 | thead, 60 | tr, 61 | th, 62 | td, 63 | article, 64 | aside, 65 | canvas, 66 | details, 67 | embed, 68 | figure, 69 | figcaption, 70 | footer, 71 | header, 72 | hgroup, 73 | menu, 74 | nav, 75 | output, 76 | ruby, 77 | section, 78 | summary, 79 | time, 80 | mark, 81 | audio, 82 | video { 83 | margin: 0; 84 | padding: 0; 85 | border: 0; 86 | font-size: 100%; 87 | font: inherit; 88 | vertical-align: baseline; 89 | } 90 | /* HTML5 display-role reset for older browsers */ 91 | article, 92 | aside, 93 | details, 94 | figcaption, 95 | figure, 96 | footer, 97 | header, 98 | hgroup, 99 | menu, 100 | nav, 101 | section { 102 | display: block; 103 | } 104 | body { 105 | line-height: 1; 106 | } 107 | ol, 108 | ul { 109 | list-style: none; 110 | } 111 | blockquote, 112 | q { 113 | quotes: none; 114 | } 115 | blockquote:before, 116 | blockquote:after, 117 | q:before, 118 | q:after { 119 | content: ''; 120 | content: none; 121 | } 122 | table { 123 | border-collapse: collapse; 124 | border-spacing: 0; 125 | } 126 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/css/typography.css: -------------------------------------------------------------------------------- 1 | /* droid-sans-regular - latin */ 2 | @font-face { 3 | font-family: 'Droid Sans'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: url('../fonts/droid-sans-v6-latin-regular.eot'); /* IE9 Compat Modes */ 7 | src: local('Droid Sans'), local('DroidSans'), 8 | url('../fonts/droid-sans-v6-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 9 | url('../fonts/droid-sans-v6-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ 10 | url('../fonts/droid-sans-v6-latin-regular.woff') format('woff'), /* Modern Browsers */ 11 | url('../fonts/droid-sans-v6-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ 12 | url('../fonts/droid-sans-v6-latin-regular.svg#DroidSans') format('svg'); /* Legacy iOS */ 13 | } 14 | /* droid-sans-700 - latin */ 15 | @font-face { 16 | font-family: 'Droid Sans'; 17 | font-style: normal; 18 | font-weight: 700; 19 | src: url('../fonts/droid-sans-v6-latin-700.eot'); /* IE9 Compat Modes */ 20 | src: local('Droid Sans Bold'), local('DroidSans-Bold'), 21 | url('../fonts/droid-sans-v6-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 22 | url('../fonts/droid-sans-v6-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ 23 | url('../fonts/droid-sans-v6-latin-700.woff') format('woff'), /* Modern Browsers */ 24 | url('../fonts/droid-sans-v6-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */ 25 | url('../fonts/droid-sans-v6-latin-700.svg#DroidSans') format('svg'); /* Legacy iOS */ 26 | } 27 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.eot -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.ttf -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.woff -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-700.woff2 -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.eot -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.ttf -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.woff -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/fonts/droid-sans-v6-latin-regular.woff2 -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/explorer_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/explorer_icons.png -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/favicon-16x16.png -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/favicon-32x32.png -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/favicon.ico -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/logo_small.png -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/pet_store_api.png -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/throbber.gif -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode.Swagger/SwaggerUI/images/wordnik_api.png -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/lang/translator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Translator for documentation pages. 5 | * 6 | * To enable translation you should include one of language-files in your index.html 7 | * after . 8 | * For example - 9 | * 10 | * If you wish to translate some new texsts you should do two things: 11 | * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. 12 | * 2. Mark that text it templates this way New Phrase or . 13 | * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. 14 | * 15 | */ 16 | window.SwaggerTranslator = { 17 | 18 | _words:[], 19 | 20 | translate: function(sel) { 21 | var $this = this; 22 | sel = sel || '[data-sw-translate]'; 23 | 24 | $(sel).each(function() { 25 | $(this).html($this._tryTranslate($(this).html())); 26 | 27 | $(this).val($this._tryTranslate($(this).val())); 28 | $(this).attr('title', $this._tryTranslate($(this).attr('title'))); 29 | }); 30 | }, 31 | 32 | _tryTranslate: function(word) { 33 | return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; 34 | }, 35 | 36 | learn: function(wordsMap) { 37 | this._words = wordsMap; 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"警告:已过时", 6 | "Implementation Notes":"实现备注", 7 | "Response Class":"响应类", 8 | "Status":"状态", 9 | "Parameters":"参数", 10 | "Parameter":"参数", 11 | "Value":"值", 12 | "Description":"描述", 13 | "Parameter Type":"参数类型", 14 | "Data Type":"数据类型", 15 | "Response Messages":"响应消息", 16 | "HTTP Status Code":"HTTP状态码", 17 | "Reason":"原因", 18 | "Response Model":"响应模型", 19 | "Request URL":"请求URL", 20 | "Response Body":"响应体", 21 | "Response Code":"响应码", 22 | "Response Headers":"响应头", 23 | "Hide Response":"隐藏响应", 24 | "Headers":"头", 25 | "Try it out!":"试一下!", 26 | "Show/Hide":"显示/隐藏", 27 | "List Operations":"显示操作", 28 | "Expand Operations":"展开操作", 29 | "Raw":"原始", 30 | "can't parse JSON. Raw result":"无法解析JSON. 原始结果", 31 | "Model Schema":"模型架构", 32 | "Model":"模型", 33 | "apply":"应用", 34 | "Username":"用户名", 35 | "Password":"密码", 36 | "Terms of service":"服务条款", 37 | "Created by":"创建者", 38 | "See more at":"查看更多:", 39 | "Contact the developer":"联系开发者", 40 | "api version":"api版本", 41 | "Response Content Type":"响应Content Type", 42 | "fetching resource":"正在获取资源", 43 | "fetching resource list":"正在获取资源列表", 44 | "Explore":"浏览", 45 | "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。", 47 | "Please specify the protocol for":"请指定协议:", 48 | "Can't read swagger JSON from":"无法读取swagger JSON于", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI", 50 | "Unable to read api":"无法读取api", 51 | "from path":"从路径", 52 | "server returned":"服务器返回" 53 | }); 54 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/lib/jquery.slideto.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); 2 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery Wiggle 3 | Author: WonderGroup, Jordan Thomas 4 | URL: http://labs.wondergroup.com/demos/mini-ui/index.html 5 | License: MIT (http://en.wikipedia.org/wiki/MIT_License) 6 | */ 7 | jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('
').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} 8 | if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; -------------------------------------------------------------------------------- /Source/LightNode.Swagger/SwaggerUI/o2c.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Source/LightNode.Swagger/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/LightNode2/Formatter/IContentFormatter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | 5 | namespace LightNode.Core 6 | { 7 | public interface IContentFormatter 8 | { 9 | string MediaType { get; } 10 | string ContentEncoding { get; } 11 | string Ext { get; } 12 | Encoding Encoding { get; } 13 | void Serialize(Stream stream, object obj); 14 | object Deserialize(Type type, Stream stream); 15 | } 16 | 17 | public interface IContentFormatterFactory 18 | { 19 | IContentFormatter CreateFormatter(); 20 | } 21 | } -------------------------------------------------------------------------------- /Source/LightNode2/LightNode2.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | aafa9d36-db57-4ca2-9137-05cc4b9ec4d1 10 | LightNode 11 | .\obj 12 | .\bin\ 13 | v4.6.1 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/LightNode2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("LightNode 2")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("aafa9d36-db57-4ca2-9137-05cc4b9ec4d1")] 20 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/DebugOnlyClientGenerateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 10 | public sealed class DebugOnlyClientGenerateAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/DefineTypeScriptGenerateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum, AllowMultiple = false)] 10 | public sealed class DefineTypeScriptGenerateAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/IgnoreClientGenerateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 10 | public sealed class IgnoreClientGenerateAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/IgnoreOperationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 10 | public sealed class IgnoreOperationAttribute : Attribute 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/LightNodeContract.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LightNode.Server 9 | { 10 | public abstract class LightNodeContract 11 | { 12 | public HttpContext Context { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Source/LightNode2/Server/RequestPath.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LightNode.Server 4 | { 5 | internal class RequestPath : IEquatable 6 | { 7 | readonly string className; 8 | readonly string methodName; 9 | readonly static StringComparer comparer = StringComparer.OrdinalIgnoreCase; 10 | 11 | public RequestPath(string className, string methodName) 12 | { 13 | this.className = className; 14 | this.methodName = methodName; 15 | } 16 | 17 | public override bool Equals(object obj) 18 | { 19 | var _obj = obj as RequestPath; 20 | if (_obj != null) return Equals(_obj); 21 | 22 | return base.Equals(obj); 23 | } 24 | 25 | public bool Equals(RequestPath other) 26 | { 27 | if (other == null) return false; 28 | 29 | return comparer.Equals(this.className, other.className) && comparer.Equals(this.methodName, other.methodName); 30 | } 31 | 32 | public override int GetHashCode() 33 | { 34 | return CombineHashCodes(comparer.GetHashCode(className), comparer.GetHashCode(methodName)); 35 | } 36 | 37 | public override string ToString() 38 | { 39 | return "/" + className + "/" + methodName; 40 | } 41 | 42 | internal static int CombineHashCodes(int h1, int h2) 43 | { 44 | return (h1 << 5) + h1 ^ h2; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/Utility/TypeHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace LightNode.Server 8 | { 9 | public static class TypeHelper 10 | { 11 | public static bool IsEnum(this Type type) 12 | { 13 | return type.GetTypeInfo().IsEnum; 14 | } 15 | 16 | public static bool IsAbstract(this Type type) 17 | { 18 | return type.GetTypeInfo().IsAbstract; 19 | } 20 | 21 | public static Type[] GetGenericArguments(this Type type) 22 | { 23 | return type.GetTypeInfo().GetGenericArguments(); 24 | } 25 | 26 | public static ConstructorInfo[] GetConstructors(this Type type) 27 | { 28 | return type.GetTypeInfo().GetConstructors(); 29 | } 30 | 31 | public static MethodInfo[] GetMethods(this Type type, BindingFlags flags) 32 | { 33 | return type.GetTypeInfo().GetMethods(flags); 34 | } 35 | 36 | public static T GetCustomAttribute(this Type type, bool inherit) 37 | where T : Attribute 38 | { 39 | return type.GetTypeInfo().GetCustomAttribute(inherit); 40 | } 41 | 42 | public static IEnumerable GetCustomAttributes(this Type type, bool inherit) 43 | where T : Attribute 44 | { 45 | return type.GetTypeInfo().GetCustomAttributes(inherit); 46 | } 47 | 48 | public static bool IsAssignableFrom(this Type type, Type c) 49 | { 50 | return type.GetTypeInfo().IsAssignableFrom(c); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Source/LightNode2/Server/Utility/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LightNode.Server 9 | { 10 | internal static class Utils 11 | { 12 | public static bool IsNullable(this Type type) 13 | { 14 | return type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerOptions.cs: -------------------------------------------------------------------------------- 1 | using LightNode.Swagger.Schema; 2 | using Microsoft.AspNetCore.Http; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace LightNode.Swagger 7 | { 8 | public class SwaggerOptions 9 | { 10 | public string ApiBasePath { get; private set; } 11 | 12 | public Swagger.Schema.Info Info { get; set; } 13 | 14 | /// 15 | /// (FilePath, LoadedEmbeddedBytes) => CustomBytes) 16 | /// 17 | public Func ResolveCustomResource { get; set; } 18 | public Func CustomHost { get; set; } 19 | public string XmlDocumentPath { get; set; } 20 | 21 | public bool IsEmitEnumAsString { get; set; } 22 | 23 | public SwaggerOptions(string title, string apiBasePath) 24 | { 25 | ApiBasePath = apiBasePath; 26 | Info = new Info { description = "", version = "1.0", title = title }; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ 2 | html, 3 | body, 4 | div, 5 | span, 6 | applet, 7 | object, 8 | iframe, 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6, 15 | p, 16 | blockquote, 17 | pre, 18 | a, 19 | abbr, 20 | acronym, 21 | address, 22 | big, 23 | cite, 24 | code, 25 | del, 26 | dfn, 27 | em, 28 | img, 29 | ins, 30 | kbd, 31 | q, 32 | s, 33 | samp, 34 | small, 35 | strike, 36 | strong, 37 | sub, 38 | sup, 39 | tt, 40 | var, 41 | b, 42 | u, 43 | i, 44 | center, 45 | dl, 46 | dt, 47 | dd, 48 | ol, 49 | ul, 50 | li, 51 | fieldset, 52 | form, 53 | label, 54 | legend, 55 | table, 56 | caption, 57 | tbody, 58 | tfoot, 59 | thead, 60 | tr, 61 | th, 62 | td, 63 | article, 64 | aside, 65 | canvas, 66 | details, 67 | embed, 68 | figure, 69 | figcaption, 70 | footer, 71 | header, 72 | hgroup, 73 | menu, 74 | nav, 75 | output, 76 | ruby, 77 | section, 78 | summary, 79 | time, 80 | mark, 81 | audio, 82 | video { 83 | margin: 0; 84 | padding: 0; 85 | border: 0; 86 | font-size: 100%; 87 | font: inherit; 88 | vertical-align: baseline; 89 | } 90 | /* HTML5 display-role reset for older browsers */ 91 | article, 92 | aside, 93 | details, 94 | figcaption, 95 | figure, 96 | footer, 97 | header, 98 | hgroup, 99 | menu, 100 | nav, 101 | section { 102 | display: block; 103 | } 104 | body { 105 | line-height: 1; 106 | } 107 | ol, 108 | ul { 109 | list-style: none; 110 | } 111 | blockquote, 112 | q { 113 | quotes: none; 114 | } 115 | blockquote:before, 116 | blockquote:after, 117 | q:before, 118 | q:after { 119 | content: ''; 120 | content: none; 121 | } 122 | table { 123 | border-collapse: collapse; 124 | border-spacing: 0; 125 | } 126 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/css/typography.css: -------------------------------------------------------------------------------- 1 | /* Google Font's Droid Sans */ 2 | @font-face { 3 | font-family: 'Droid Sans'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype'); 7 | } 8 | /* Google Font's Droid Sans Bold */ 9 | @font-face { 10 | font-family: 'Droid Sans'; 11 | font-style: normal; 12 | font-weight: 700; 13 | src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype'); 14 | } 15 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/fonts/DroidSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/fonts/DroidSans-Bold.ttf -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/collapse.gif -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/expand.gif -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/explorer_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/explorer_icons.png -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/favicon-16x16.png -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/favicon-32x32.png -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/favicon.ico -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/logo_small.png -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/pet_store_api.png -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/throbber.gif -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neuecc/LightNode/61fa59623904515e37df5c59ca56a806c1506a27/Source/LightNode2/Swagger/SwaggerUI/images/wordnik_api.png -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lang/ko-kr.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"경고:폐기예정됨", 6 | "Implementation Notes":"구현 노트", 7 | "Response Class":"응답 클래스", 8 | "Status":"상태", 9 | "Parameters":"매개변수들", 10 | "Parameter":"매개변수", 11 | "Value":"값", 12 | "Description":"설명", 13 | "Parameter Type":"매개변수 타입", 14 | "Data Type":"데이터 타입", 15 | "Response Messages":"응답 메세지", 16 | "HTTP Status Code":"HTTP 상태 코드", 17 | "Reason":"원인", 18 | "Response Model":"응답 모델", 19 | "Request URL":"요청 URL", 20 | "Response Body":"응답 본문", 21 | "Response Code":"응답 코드", 22 | "Response Headers":"응답 헤더", 23 | "Hide Response":"응답 숨기기", 24 | "Headers":"헤더", 25 | "Try it out!":"써보기!", 26 | "Show/Hide":"보이기/숨기기", 27 | "List Operations":"목록 작업", 28 | "Expand Operations":"전개 작업", 29 | "Raw":"원본", 30 | "can't parse JSON. Raw result":"JSON을 파싱할수 없음. 원본결과:", 31 | "Model Schema":"모델 스키마", 32 | "Model":"모델", 33 | "apply":"적용", 34 | "Username":"사용자 이름", 35 | "Password":"암호", 36 | "Terms of service":"이용약관", 37 | "Created by":"작성자", 38 | "See more at":"추가정보:", 39 | "Contact the developer":"개발자에게 문의", 40 | "api version":"api버전", 41 | "Response Content Type":"응답Content Type", 42 | "fetching resource":"리소스 가져오기", 43 | "fetching resource list":"리소스 목록 가져오기", 44 | "Explore":"탐색", 45 | "Show Swagger Petstore Example Apis":"Swagger Petstore 예제 보기", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"서버로부터 읽어들일수 없습니다. access-control-origin 설정이 올바르지 않을수 있습니다.", 47 | "Please specify the protocol for":"다음을 위한 프로토콜을 정하세요", 48 | "Can't read swagger JSON from":"swagger JSON 을 다음으로 부터 읽을수 없습니다", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"리소스 정보 불러오기 완료. Swagger UI 랜더링", 50 | "Unable to read api":"api를 읽을 수 없습니다.", 51 | "from path":"다음 경로로 부터", 52 | "server returned":"서버 응답함." 53 | }); 54 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lang/translator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Translator for documentation pages. 5 | * 6 | * To enable translation you should include one of language-files in your index.html 7 | * after . 8 | * For example - 9 | * 10 | * If you wish to translate some new texts you should do two things: 11 | * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. 12 | * 2. Mark that text it templates this way New Phrase or . 13 | * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. 14 | * 15 | */ 16 | window.SwaggerTranslator = { 17 | 18 | _words:[], 19 | 20 | translate: function(sel) { 21 | var $this = this; 22 | sel = sel || '[data-sw-translate]'; 23 | 24 | $(sel).each(function() { 25 | $(this).html($this._tryTranslate($(this).html())); 26 | 27 | $(this).val($this._tryTranslate($(this).val())); 28 | $(this).attr('title', $this._tryTranslate($(this).attr('title'))); 29 | }); 30 | }, 31 | 32 | _tryTranslate: function(word) { 33 | return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; 34 | }, 35 | 36 | learn: function(wordsMap) { 37 | this._words = wordsMap; 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"警告:已过时", 6 | "Implementation Notes":"实现备注", 7 | "Response Class":"响应类", 8 | "Status":"状态", 9 | "Parameters":"参数", 10 | "Parameter":"参数", 11 | "Value":"值", 12 | "Description":"描述", 13 | "Parameter Type":"参数类型", 14 | "Data Type":"数据类型", 15 | "Response Messages":"响应消息", 16 | "HTTP Status Code":"HTTP状态码", 17 | "Reason":"原因", 18 | "Response Model":"响应模型", 19 | "Request URL":"请求URL", 20 | "Response Body":"响应体", 21 | "Response Code":"响应码", 22 | "Response Headers":"响应头", 23 | "Hide Response":"隐藏响应", 24 | "Headers":"头", 25 | "Try it out!":"试一下!", 26 | "Show/Hide":"显示/隐藏", 27 | "List Operations":"显示操作", 28 | "Expand Operations":"展开操作", 29 | "Raw":"原始", 30 | "can't parse JSON. Raw result":"无法解析JSON. 原始结果", 31 | "Model Schema":"模型架构", 32 | "Model":"模型", 33 | "apply":"应用", 34 | "Username":"用户名", 35 | "Password":"密码", 36 | "Terms of service":"服务条款", 37 | "Created by":"创建者", 38 | "See more at":"查看更多:", 39 | "Contact the developer":"联系开发者", 40 | "api version":"api版本", 41 | "Response Content Type":"响应Content Type", 42 | "fetching resource":"正在获取资源", 43 | "fetching resource list":"正在获取资源列表", 44 | "Explore":"浏览", 45 | "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。", 47 | "Please specify the protocol for":"请指定协议:", 48 | "Can't read swagger JSON from":"无法读取swagger JSON于", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI", 50 | "Unable to read api":"无法读取api", 51 | "from path":"从路径", 52 | "server returned":"服务器返回" 53 | }); 54 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lib/highlight.9.1.0.pack_extended.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | (function () { 4 | var configure, highlightBlock; 5 | 6 | configure = hljs.configure; 7 | // "extending" hljs.configure method 8 | hljs.configure = function _configure (options) { 9 | var size = options.highlightSizeThreshold; 10 | 11 | // added highlightSizeThreshold option to set maximum size 12 | // of processed string. Set to null if not a number 13 | hljs.highlightSizeThreshold = size === +size ? size : null; 14 | 15 | configure.call(this, options); 16 | }; 17 | 18 | highlightBlock = hljs.highlightBlock; 19 | 20 | // "extending" hljs.highlightBlock method 21 | hljs.highlightBlock = function _highlightBlock (el) { 22 | var innerHTML = el.innerHTML; 23 | var size = hljs.highlightSizeThreshold; 24 | 25 | // check if highlightSizeThreshold is not set or element innerHTML 26 | // is less than set option highlightSizeThreshold 27 | if (size == null || size > innerHTML.length) { 28 | // proceed with hljs.highlightBlock 29 | highlightBlock.call(hljs, el); 30 | } 31 | }; 32 | 33 | })(); 34 | 35 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lib/jquery.slideto.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); 2 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery Wiggle 3 | Author: WonderGroup, Jordan Thomas 4 | URL: http://labs.wondergroup.com/demos/mini-ui/index.html 5 | License: MIT (http://en.wikipedia.org/wiki/MIT_License) 6 | */ 7 | jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('
').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} 8 | if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/lib/object-assign-pollyfill.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.assign != 'function') { 2 | (function () { 3 | Object.assign = function (target) { 4 | 'use strict'; 5 | if (target === undefined || target === null) { 6 | throw new TypeError('Cannot convert undefined or null to object'); 7 | } 8 | 9 | var output = Object(target); 10 | for (var index = 1; index < arguments.length; index++) { 11 | var source = arguments[index]; 12 | if (source !== undefined && source !== null) { 13 | for (var nextKey in source) { 14 | if (Object.prototype.hasOwnProperty.call(source, nextKey)) { 15 | output[nextKey] = source[nextKey]; 16 | } 17 | } 18 | } 19 | } 20 | return output; 21 | }; 22 | })(); 23 | } 24 | -------------------------------------------------------------------------------- /Source/LightNode2/Swagger/SwaggerUI/o2c.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Source/LightNode2/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.4-*", 3 | 4 | "dependencies": { 5 | "Microsoft.AspNetCore.Http.Abstractions": "1.0.0", 6 | "Microsoft.AspNetCore.Http.Features": "1.0.0", 7 | "NETStandard.Library": "1.6.0", 8 | "Newtonsoft.Json": "9.0.1", 9 | "System.Threading.Tasks.Parallel": "4.0.1" 10 | }, 11 | 12 | "buildOptions": { 13 | "embed": [ 14 | "Swagger/SwaggerUI/**" 15 | 16 | ], 17 | "xmlDoc": true 18 | }, 19 | 20 | "frameworks": { 21 | "netstandard1.6": { 22 | "imports": "dnxcore50" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Tests/LightNode.Client.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Client.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Client.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照できなくなります。このアセンブリ内で COM から型にアクセスする必要がある場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("431d2127-cb1f-47bb-a026-43d9bcb8158c")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、以下のように '*' を使用してビルド番号とリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Tests/LightNode.Client.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Tests/LightNode.Server.Tests/DiagnosticsTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Owin; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | using System.Net.Http; 5 | using System.Collections.Generic; 6 | using Microsoft.Owin.Testing; 7 | using System.Diagnostics.Tracing; 8 | 9 | namespace LightNode.Server.Tests 10 | { 11 | [TestClass] 12 | public class DiagnosticsTest 13 | { 14 | [TestMethod, Ignore] 15 | public void LightNodeEventSourceLogging() 16 | { 17 | var listener = new MockEventListener(); 18 | listener.EnableEvents(LightNode.Diagnostics.LightNodeEventSource.Log, EventLevel.LogAlways); 19 | 20 | var testServer = TestServer.Create(app => 21 | { 22 | var option = new LightNodeOptions 23 | { 24 | Logger = LightNode.Diagnostics.LightNodeEventSource.Log 25 | }; 26 | 27 | app.UseLightNode(option, typeof(MockEnv).Assembly); 28 | }); 29 | 30 | (listener.EventList.Count > 0).IsTrue(); 31 | } 32 | } 33 | 34 | class MockEventListener : EventListener 35 | { 36 | public List EventList = new List(); 37 | 38 | protected override void OnEventWritten(EventWrittenEventArgs eventData) 39 | { 40 | EventList.Add(eventData); 41 | } 42 | } 43 | 44 | public class ComplexContract : LightNodeContract 45 | { 46 | public Person CreatePerson(int age, string name) 47 | { 48 | return new Person { Age = age, Name = name }; 49 | } 50 | } 51 | 52 | public class Person 53 | { 54 | public int Age { get; set; } 55 | public string Name { get; set; } 56 | } 57 | } -------------------------------------------------------------------------------- /Tests/LightNode.Server.Tests/IgnoreOperationTest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LightNode.Server.Tests 9 | { 10 | [TestClass] 11 | public class IgnoreOperationTest 12 | { 13 | [TestMethod] 14 | public void Ignore() 15 | { 16 | MockEnv.CreateRequest("/IgnoreContract/Hoge").GetAsync().Result.StatusCode.Is(System.Net.HttpStatusCode.NotFound); 17 | MockEnv.CreateRequest("/IgnoreMethod/Hoge").GetAsync().Result.StatusCode.Is(System.Net.HttpStatusCode.NotFound); 18 | MockEnv.CreateRequest("/IgnoreMethod/Huga").GetString().Is("1"); 19 | } 20 | } 21 | 22 | [IgnoreOperation] 23 | public class IgnoreContract : LightNodeContract 24 | { 25 | public void Hoge() 26 | { 27 | } 28 | } 29 | 30 | public class IgnoreMethod : LightNodeContract 31 | { 32 | [IgnoreOperation] 33 | public void Hoge() 34 | { 35 | } 36 | 37 | public int Huga() 38 | { 39 | return 1; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Tests/LightNode.Server.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("LightNode.Server.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightNode.Server.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照できなくなります。このアセンブリ内で COM から型にアクセスする必要がある場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。 23 | [assembly: Guid("043fe6cd-17e7-473d-977a-a402c43860e7")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、以下のように '*' を使用してビルド番号とリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.6.3.0")] 36 | [assembly: AssemblyFileVersion("1.6.3.0")] 37 | -------------------------------------------------------------------------------- /Tests/LightNode.Server.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "Source" ] 3 | } --------------------------------------------------------------------------------