├── Backup ├── global.json ├── Tests │ ├── Tests.xproj.user │ ├── project.json │ └── Tests.xproj ├── AspNetCore │ ├── YOYO.Extensions.DI │ │ ├── YOYO.Extensions.DI.xproj.user │ │ ├── project.json │ │ └── YOYO.Extensions.DI.xproj │ ├── YOYO.AspNetCore.Mvc │ │ ├── YOYO.AspNetCore.Mvc.xproj.user │ │ ├── project.json │ │ └── YOYO.AspNetCore.Mvc.xproj │ ├── YOYO.AspNetCore.Owin │ │ ├── YOYO.AspNetCore.Owin.xproj.user │ │ ├── project.json │ │ └── YOYO.AspNetCore.Owin.xproj │ ├── YOYO.AspNetCore.Builder │ │ ├── YOYO.AspNetCore.Builder.xproj.user │ │ ├── project.json │ │ └── YOYO.AspNetCore.Builder.xproj │ └── YOYO.AspNetCore.ViewEngine.Razor │ │ ├── YOYO.AspNetCore.ViewEngine.Razor.xproj.user │ │ ├── project.json │ │ └── YOYO.AspNetCore.ViewEngine.Razor.xproj ├── Native │ └── LibCaptchaImageWarp │ │ ├── LibCaptchaImageWarp.xproj.user │ │ ├── project.json │ │ └── LibCaptchaImageWarp.xproj └── Hosts │ ├── NET451OwinHost │ ├── NET451_Core_OwinHost.xproj.user │ ├── project.json │ └── NET451_Core_OwinHost.xproj │ └── CoreHost │ ├── CoreAppHost.xproj.user │ ├── project.json │ └── CoreAppHost.xproj ├── XUnitTestProject1 ├── obj │ ├── Debug │ │ └── netcoreapp2.0 │ │ │ ├── XUnitTestProject1.csproj.CopyComplete │ │ │ ├── XUnitTestProject1.AssemblyInfoInputs.cache │ │ │ ├── XUnitTestProject1.csproj.CoreCompileInputs.cache │ │ │ ├── XUnitTestProject1.dll │ │ │ ├── XUnitTestProject1.pdb │ │ │ ├── XUnitTestProject1.Program.cs │ │ │ ├── XUnitTestProject1.csprojResolveAssemblyReference.cache │ │ │ ├── XUnitTestProject1.AssemblyInfo.cs │ │ │ └── XUnitTestProject1.csproj.FileListAbsolute.txt │ ├── XUnitTestProject1.csproj.nuget.cache │ ├── XUnitTestProject1.csproj.nuget.g.targets │ └── XUnitTestProject1.csproj.nuget.g.props ├── bin │ └── Debug │ │ └── netcoreapp2.0 │ │ ├── XUnitTestProject1.dll │ │ ├── XUnitTestProject1.pdb │ │ ├── xunit.runner.utility.netstandard15.dll │ │ ├── YOYOFx.Extensions.DependencyInjection.dll │ │ ├── YOYOFx.Extensions.DependencyInjection.pdb │ │ ├── xunit.runner.reporters.netstandard15.dll │ │ ├── xunit.runner.visualstudio.dotnetcore.testadapter.dll │ │ ├── XUnitTestProject1.runtimeconfig.json │ │ └── XUnitTestProject1.runtimeconfig.dev.json ├── UnitTest1.cs └── XUnitTestProject1.csproj ├── AspNetCore ├── YOYOFx.Extensions.DependencyInjection │ ├── obj │ │ ├── Debug │ │ │ ├── net451 │ │ │ │ ├── YOYO.Extensions.DI.csproj.CopyComplete │ │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ │ ├── YOYO.Extensions.DI.AssemblyInfoInputs.cache │ │ │ │ ├── YOYO.Extensions.DI.csproj.CoreCompileInputs.cache │ │ │ │ ├── YOYO.Extensions.DI.dll │ │ │ │ ├── YOYO.Extensions.DI.pdb │ │ │ │ ├── YOYO.Extensions.DI.csprojResolveAssemblyReference.cache │ │ │ │ ├── YOYO.Extensions.DI.AssemblyInfo.cs │ │ │ │ └── YOYO.Extensions.DI.csproj.FileListAbsolute.txt │ │ │ ├── netstandard2.0 │ │ │ │ ├── YOYOFx.Extensions.DependencyInjection.csproj.CopyComplete │ │ │ │ ├── YOYO.Extensions.DI.AssemblyInfoInputs.cache │ │ │ │ ├── YOYO.Extensions.DI.csproj.CoreCompileInputs.cache │ │ │ │ ├── YOYOFx.Extensions.DI.AssemblyInfoInputs.cache │ │ │ │ ├── YOYOFx.Extensions.DI.csproj.CoreCompileInputs.cache │ │ │ │ ├── YOYOFx.Extensions.DependencyInjection.AssemblyInfoInputs.cache │ │ │ │ ├── YOYOFx.Extensions.DependencyInjection.csproj.CoreCompileInputs.cache │ │ │ │ ├── YOYOFx.Extensions.DependencyInjection.dll │ │ │ │ ├── YOYOFx.Extensions.DependencyInjection.pdb │ │ │ │ ├── YOYO.Extensions.DI.csproj.FileListAbsolute.txt │ │ │ │ ├── YOYO.Extensions.DI.AssemblyInfo.cs │ │ │ │ ├── YOYOFx.Extensions.DI.AssemblyInfo.cs │ │ │ │ └── YOYOFx.Extensions.DependencyInjection.AssemblyInfo.cs │ │ │ └── netstandard1.6 │ │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ │ ├── YOYO.Extensions.DI.AssemblyInfoInputs.cache │ │ │ │ ├── YOYO.Extensions.DI.csproj.CoreCompileInputs.cache │ │ │ │ ├── YOYO.Extensions.DI.dll │ │ │ │ ├── YOYO.Extensions.DI.pdb │ │ │ │ ├── YOYO.Extensions.DI.csprojResolveAssemblyReference.cache │ │ │ │ ├── YOYO.Extensions.DI.AssemblyInfo.cs │ │ │ │ └── YOYO.Extensions.DI.csproj.FileListAbsolute.txt │ │ ├── YOYO.Extensions.DI.csproj.nuget.cache │ │ ├── YOYOFx.Extensions.DI.csproj.nuget.cache │ │ ├── YOYOFx.Extensions.DependencyInjection.csproj.nuget.cache │ │ ├── YOYOFx.Extensions.DependencyInjection.csproj.nuget.g.targets │ │ ├── YOYO.Extensions.DI.csproj.nuget.g.targets │ │ ├── YOYOFx.Extensions.DI.csproj.nuget.g.targets │ │ ├── YOYO.Extensions.DI.csproj.nuget.g.props │ │ ├── YOYOFx.Extensions.DI.csproj.nuget.g.props │ │ └── YOYOFx.Extensions.DependencyInjection.csproj.nuget.g.props │ ├── Registration │ │ ├── ISelector.cs │ │ ├── IAssemblySelector.cs │ │ ├── IImplementationTypeSelector.cs │ │ ├── TypeMap.cs │ │ ├── IFluentInterface.cs │ │ └── ILifetimeSelector.cs │ ├── bin │ │ └── Debug │ │ │ ├── net451 │ │ │ ├── YOYO.Extensions.DI.dll │ │ │ ├── YOYO.Extensions.DI.pdb │ │ │ ├── Microsoft.Extensions.DependencyInjection.dll │ │ │ ├── System.Runtime.InteropServices.RuntimeInformation.dll │ │ │ └── Microsoft.Extensions.DependencyInjection.Abstractions.dll │ │ │ ├── netstandard1.6 │ │ │ ├── YOYO.Extensions.DI.dll │ │ │ └── YOYO.Extensions.DI.pdb │ │ │ └── netstandard2.0 │ │ │ ├── YOYOFx.Extensions.DependencyInjection.dll │ │ │ └── YOYOFx.Extensions.DependencyInjection.pdb │ ├── Attributes │ │ ├── InjectAttribute.cs │ │ └── ServiceDescriptorAttribute.cs │ ├── YOYOFx.Extensions.DependencyInjection.csproj │ ├── ServiceTypeMetadata.cs │ ├── AOP │ │ ├── IMethodInterceptor.cs │ │ ├── MethodInterceptorAttribute.cs │ │ ├── IInvocation.cs │ │ ├── InvocationProxyFactory.cs │ │ └── DynamicProxy.cs │ ├── Internal │ │ └── StructTuple.cs │ ├── ServiceProviderExtensions.cs │ └── ServiceTypesContext.cs ├── YOYOFx.Extensions.Utils │ ├── obj │ │ ├── Debug │ │ │ └── netstandard2.0 │ │ │ │ ├── YOYOFx.Extensions.Utils.AssemblyInfoInputs.cache │ │ │ │ ├── YOYOFx.Extensions.Utils.csproj.CoreCompileInputs.cache │ │ │ │ ├── YOYOFx.Extensions.Utils.dll │ │ │ │ ├── YOYOFx.Extensions.Utils.pdb │ │ │ │ ├── YOYOFx.Extensions.Utils.csprojResolveAssemblyReference.cache │ │ │ │ ├── YOYOFx.Extensions.Utils.AssemblyInfo.cs │ │ │ │ └── YOYOFx.Extensions.Utils.csproj.FileListAbsolute.txt │ │ ├── YOYOFx.Extensions.Utils.csproj.nuget.cache │ │ ├── YOYOFx.Extensions.Utils.csproj.nuget.g.targets │ │ └── YOYOFx.Extensions.Utils.csproj.nuget.g.props │ ├── YOYOFx.Extensions.Utils.csproj │ ├── bin │ │ └── Debug │ │ │ └── netstandard2.0 │ │ │ ├── YOYOFx.Extensions.Utils.dll │ │ │ ├── YOYOFx.Extensions.Utils.pdb │ │ │ └── YOYOFx.Extensions.Utils.deps.json │ └── FastReflection │ │ └── StructTuple.cs ├── YOYO.AspNetCore.Mvc │ ├── Route │ │ ├── HttpMethod.cs │ │ ├── SegmentType.cs │ │ ├── IRouteHandler.cs │ │ ├── IRouteBuilder.cs │ │ ├── HttpGet.cs │ │ ├── HttpPost.cs │ │ ├── HttpRoute.cs │ │ ├── RouteHandler.cs │ │ ├── RouteResolveResult.cs │ │ ├── RouteHandlerFactory.cs │ │ └── RouteSegment.cs │ ├── YOYOFxOptions.cs │ ├── Reflection │ │ └── ReflectionUtils .cs │ ├── ControllerLoader.cs │ ├── IActionResult.cs │ ├── Session │ │ ├── ISession.cs │ │ ├── ISessionProvider.cs │ │ ├── CookieSession.cs │ │ └── SessionsStore.cs │ ├── ActionRuntime │ │ ├── IControllerFacotry.cs │ │ ├── IActionRuntimeProvider.cs │ │ ├── DefaultControllerFactory.cs │ │ ├── ActionRuntimeManager.cs │ │ └── ActionRuntimeParameter.cs │ ├── ResponseProcessor │ │ ├── IResponseProcessor.cs │ │ ├── ResponseProcessor.cs │ │ ├── TextResponseProcessor.cs │ │ ├── ResponseProcessorFactory.cs │ │ ├── JsonResponseProcessor.cs │ │ └── XmlResponseProcessor.cs │ ├── IYOYOBootstrapper.cs │ ├── ActionFilterAttribute.cs │ ├── Extensions │ │ ├── TypeExtensions.cs │ │ ├── ParameterInfoExtensions.cs │ │ └── StringExtensions.cs │ ├── IViewEngine.cs │ ├── Filters │ │ ├── NoCacheAttribute.cs │ │ └── TimeStampEncryptAttribute.cs │ ├── View.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── DynamicDictionary.cs │ ├── ActionExecuteContext.cs │ ├── ViewEngineFactory.cs │ ├── Application.cs │ ├── DefaultBootstrapper.cs │ ├── Controller.cs │ ├── Owin │ │ └── OwinMiddleware.cs │ ├── YOYO.AspNetCore.Mvc.csproj │ └── FileResult.cs ├── YOYO.AspNetCore.ViewEngine.Razor │ ├── CodeGenerateResult.cs │ ├── IRazorCompileService.cs │ ├── ITemplateService.cs │ ├── CompileResult.cs │ ├── IRazorView.cs │ ├── RazorViewTemplate'1.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── TemplateLocator.cs │ ├── RenderTemplateContext.cs │ ├── YOYO.AspNetCore.ViewEngine.Razor.csproj │ ├── RazorViewEngine.cs │ ├── CodeGenerateService.cs │ └── RazorView.cs ├── YOYO.AspNetCore.Owin │ ├── IFormData.cs │ ├── IHttpHeaders.cs │ ├── IOwinContext.cs │ ├── Helper │ │ └── UrlHelper.cs │ ├── Pipeline │ │ ├── IPipelineComponent.cs │ │ ├── IPipeline.cs │ │ ├── MiddleWareDelegateComponent.cs │ │ ├── PipelineComponent.cs │ │ └── Pipeline.cs │ ├── OwinFunc.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── YOYO.AspNetCore.Owin.csproj │ ├── IResponseHeaders.cs │ ├── IOwinResponse.cs │ ├── IRequestHeaders.cs │ ├── IOwinRequest.cs │ ├── IPostedFile.cs │ ├── RequestCookieCollection.cs │ ├── CookieOptions.cs │ └── QueryString.cs └── YOYO.AspNetCore.Builder │ ├── Properties │ └── AssemblyInfo.cs │ └── YOYO.AspNetCore.Builder.csproj ├── Boot └── YOYOFx.Boot │ ├── obj │ ├── Debug │ │ └── netstandard2.0 │ │ │ ├── YOYOFx.Boot.AssemblyInfoInputs.cache │ │ │ ├── YOYOFx.Boot.csproj.CoreCompileInputs.cache │ │ │ ├── YOYOFx.Boot.dll │ │ │ ├── YOYOFx.Boot.pdb │ │ │ ├── YOYOFx.Boot.csproj.FileListAbsolute.txt │ │ │ └── YOYOFx.Boot.AssemblyInfo.cs │ ├── YOYOFx.Boot.csproj.nuget.cache │ ├── YOYOFx.Boot.csproj.nuget.g.targets │ └── YOYOFx.Boot.csproj.nuget.g.props │ ├── bin │ └── Debug │ │ └── netstandard2.0 │ │ ├── YOYOFx.Boot.dll │ │ ├── YOYOFx.Boot.pdb │ │ └── YOYOFx.Boot.deps.json │ ├── YOYOFx.Boot.csproj │ ├── IApplication.cs │ └── Application.cs ├── Native ├── LibCaptchaImageWarp │ ├── libcaptchaimage.so │ ├── libcaptchaimage.dll │ ├── Properties │ │ └── AssemblyInfo.cs │ └── LibCaptchaImageWarp.csproj └── LibCaptchaImage │ ├── LibCaptchaImage.vcxproj.user │ ├── stdafx.cpp │ ├── targetver.h │ ├── ReadMe.txt │ ├── dllmain.cpp │ ├── stdafx.h │ ├── CaptchaImage.h │ └── LibCaptchaImage.vcxproj.filters ├── YOYOFx.ConsoleSample ├── Program.cs └── YOYOFx.ConsoleSample.csproj ├── .vscode ├── tasks.json └── launch.json ├── Tests ├── ServiceCollectionExtensions.cs └── Tests.csproj ├── Notepad └── ASP.NET Core 总结1.md ├── README.md └── .gitignore /Backup/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "AspNetCore" ] 3 | } -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 668a5c0d0b018331b0d7e8b3f8ba52d9c356925c 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 7065cecde0f7036415f956a3bdb4fe533162d34f 2 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 8b5bd1f6fc5fd804dd0bd3a027675b541cca84d1 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | e15d34b5596b89d3f724166abb959bfcbcfd5b36 2 | -------------------------------------------------------------------------------- /Native/LibCaptchaImageWarp/libcaptchaimage.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/Native/LibCaptchaImageWarp/libcaptchaimage.so -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 55c5235dbbd1391dcd257773471b114a0f3b29d2 2 | -------------------------------------------------------------------------------- /Native/LibCaptchaImageWarp/libcaptchaimage.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/Native/LibCaptchaImageWarp/libcaptchaimage.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 873c302a81d47c436a3de93c4106ba9e18a9e7cb 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/HttpMethod.cs: -------------------------------------------------------------------------------- 1 | namespace YOYO.Mvc.Route 2 | { 3 | public enum HttpMethod 4 | { 5 | Get,Post,Both 6 | } 7 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 23e053be2d270745dada98045600decc3950cdcf 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 873c302a81d47c436a3de93c4106ba9e18a9e7cb 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYO.Extensions.DI.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | ffc20d046f68ecbdbc46b30152661eb89dbf2aa1 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | e613b1b6dec97d66562008b0fd6cab15e2f28d4b 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 988ff73c6ee0f5572b9782fe2363c0bfff9b5526 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYO.Extensions.DI.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | f98de16572cbaa0eb7965d2df1f1fd800fdbd862 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DI.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 0698a714bc3e3b0a8434b7022d1d5000f8826329 2 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DI.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | f98de16572cbaa0eb7965d2df1f1fd800fdbd862 2 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/bin/Debug/netstandard2.0/YOYOFx.Boot.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/Boot/YOYOFx.Boot/bin/Debug/netstandard2.0/YOYOFx.Boot.dll -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/bin/Debug/netstandard2.0/YOYOFx.Boot.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/Boot/YOYOFx.Boot/bin/Debug/netstandard2.0/YOYOFx.Boot.pdb -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.dll -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | c1d51d1f16428ba7970aa38c142c3325ca763211 2 | -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/XUnitTestProject1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/XUnitTestProject1.dll -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/XUnitTestProject1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/XUnitTestProject1.pdb -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.dll -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 580e7a72b4ccea1df13894896d2bc5ad5d175276 2 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.Program.cs -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/YOYOFx.Boot.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/ISelector.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/ISelector.cs -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/YOYOFx.Boot.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "VUIKpmI83LfiXbO7AM5rn9mmEiyLWUppXnqqyqpc6lC8lylI3YIw8y6qBhiECz0hYGUJnonijhRfThJmxMrM0g==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/SegmentType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace YOYO.Mvc 4 | { 5 | public enum SegmentType 6 | { 7 | Role, 8 | Directory, 9 | Parameter 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/xunit.runner.utility.netstandard15.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/xunit.runner.utility.netstandard15.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/IAssemblySelector.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/IAssemblySelector.cs -------------------------------------------------------------------------------- /Native/LibCaptchaImage/LibCaptchaImage.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/YOYOFx.Extensions.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/YOYOFx.Extensions.DependencyInjection.dll -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/YOYOFx.Extensions.DependencyInjection.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/YOYOFx.Extensions.DependencyInjection.pdb -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/xunit.runner.reporters.netstandard15.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/xunit.runner.reporters.netstandard15.dll -------------------------------------------------------------------------------- /XUnitTestProject1/obj/XUnitTestProject1.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "GBgi6WFKPaFBoB7PKfcrnKvRJGye4DMESYaKeP81UafMPzxPBgVQkP4BvcQ+QM7NLFCpJtIYz+gbEDlHY43iWA==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/YOYO.Extensions.DI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/YOYO.Extensions.DI.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/YOYO.Extensions.DI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/YOYO.Extensions.DI.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/YOYOFx.Extensions.Utils.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/bin/Debug/netstandard2.0/YOYOFx.Extensions.Utils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.Utils/bin/Debug/netstandard2.0/YOYOFx.Extensions.Utils.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/bin/Debug/netstandard2.0/YOYOFx.Extensions.Utils.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.Utils/bin/Debug/netstandard2.0/YOYOFx.Extensions.Utils.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/IImplementationTypeSelector.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/IImplementationTypeSelector.cs -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/YOYOFx.Extensions.Utils.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "uVHY6AwVp3DzZCJcJ9olYLDX3bRVg1QnUZ0a7WEbhAvcxraI/k/vxof7nOCNu6S3FsLzJYllcjTI5VISzFeGPw==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/xunit.runner.visualstudio.dotnetcore.testadapter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/bin/Debug/netcoreapp2.0/xunit.runner.visualstudio.dotnetcore.testadapter.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard1.6/YOYO.Extensions.DI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard1.6/YOYO.Extensions.DI.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard1.6/YOYO.Extensions.DI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard1.6/YOYO.Extensions.DI.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYO.Extensions.DI.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "wnHX16BKkQNu0zD8nvPzrFESh/qqG0Nlq1KHYaE+KZch2V+sF5x9foJOwavO9972DBdRwr9/AIonjm+ayPujSA==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYOFx.Extensions.DI.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "92qdN6BMMzyBB7KyxVPZ5WeMfzHnr6yQOMcbOV2CAlbWBbhAbsLTlj2pmbX1rkcC47o5OqwDnpuXYehLFWRgyw==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/XUnitTestProject1.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYOFx.Extensions.DependencyInjection.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "HseVIvWqe6KHLFChBUXTwOTI4QjdvwG+FocBB8qscTY0fMxGGwOJThrBna+Tykzcg72FFcvXE0/Ix71h4rpBdQ==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/IApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace YOYOFx.Boot 4 | { 5 | public interface IApplication 6 | { 7 | IApplication Configure(string[] args); 8 | void Start(string[] args); 9 | void Stop(); 10 | } 11 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/Microsoft.Extensions.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/Microsoft.Extensions.DependencyInjection.dll -------------------------------------------------------------------------------- /Backup/Tests/Tests.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.pdb -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/YOYOFxOptions.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 YOYO.Mvc 8 | { 9 | public class YOYOFxOptions 10 | { 11 | 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/Microsoft.Extensions.DependencyInjection.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/bin/Debug/net451/Microsoft.Extensions.DependencyInjection.Abstractions.dll -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.Extensions.DI/YOYO.Extensions.DI.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /Backup/Native/LibCaptchaImageWarp/LibCaptchaImageWarp.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yoyofx/NetCore_YOYOFx/HEAD/AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Mvc/YOYO.AspNetCore.Mvc.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Owin/YOYO.AspNetCore.Owin.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /Backup/Hosts/NET451OwinHost/NET451_Core_OwinHost.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NET451OwinHost 5 | 6 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Builder/YOYO.AspNetCore.Builder.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Reflection/ReflectionUtils .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 YOYO.Mvc.Reflection 8 | { 9 | public class ReflectionUtils 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/CodeGenerateResult.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace YOYO.AspNetCore.ViewEngine.Razor 4 | { 5 | public class CodeGenerateResult 6 | { 7 | public bool Success { set; get; } 8 | 9 | public List Errors { set; get; } 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/YOYO.AspNetCore.ViewEngine.Razor.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start 5 | 6 | -------------------------------------------------------------------------------- /XUnitTestProject1/bin/Debug/netcoreapp2.0/XUnitTestProject1.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\zlhxd\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\zlhxd\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ControllerLoader.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 YOYO.Mvc 8 | { 9 | public class ControllerLoader 10 | { 11 | //static IDictionary 12 | 13 | 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Native/LibCaptchaImage/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Win32Project1.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /YOYOFx.ConsoleSample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace YOYOFx.ConsoleSample 4 | { 5 | public class Application 6 | { 7 | static void Main(string[] args) 8 | { 9 | YOYOFx.Boot.Application.Run(typeof(Application),args); 10 | 11 | Console.ReadKey(); 12 | 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Native/LibCaptchaImage/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/IRouteHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using YOYO.Mvc.Route; 5 | using YOYO.Owin; 6 | 7 | namespace YOYO.Mvc 8 | { 9 | public interface IRouteHandler 10 | { 11 | Task ProcessAsync(IOwinContext context,CancellationToken cancellationToken); 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/IActionResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public interface IActionResult 11 | { 12 | 13 | Task ProcessAsync(IOwinContext context); 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/IRazorCompileService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace YOYO.AspNetCore.ViewEngine.Razor 7 | { 8 | public interface IRazorCompileService 9 | { 10 | 11 | Type Compile(string code); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /YOYOFx.ConsoleSample/YOYOFx.ConsoleSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IFormData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace YOYO.Owin 4 | { 5 | public interface IFormData 6 | { 7 | IList Files { get; } 8 | 9 | bool IsValid { get; } 10 | 11 | string this[string name] { get; } 12 | 13 | IDictionary Values { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /Native/LibCaptchaImage/ReadMe.txt: -------------------------------------------------------------------------------- 1 | http://www.4byte.cn/question/411/compiling-cimg-with-c-0x-and-mingw.html 2 | 3 | 4 | https://github.com/DoubleSpout/ccap 5 | 6 | 7 | http://www.picb.ac.cn/~xiaohang/vimwiki/tools/librarys/cimg/CImg_reference_chinese.pdf 8 | 9 | 10 | 11 | g++ CaptchaImage.cpp -fPIC -shared -o libcaptchaimage.so 12 | 13 | sudo apt-get install libx11-dev 14 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Session/ISession.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 YOYO.Mvc.Session 8 | { 9 | public interface ISession 10 | { 11 | object this[string key] { set; get; } 12 | string ID { set; get; } 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/ITemplateService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace YOYO.AspNetCore.ViewEngine.Razor 7 | { 8 | public interface ITemplateService 9 | { 10 | 11 | IRazorView GetTemplate(RenderTemplateContext context); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Attributes/InjectAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace YOYOFx.Extensions.DependencyInjection.Attributes 6 | { 7 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] 8 | 9 | public class InjectAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Session/ISessionProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc.Session 9 | { 10 | public interface ISessionProvider 11 | { 12 | Task AccessAsync(IOwinContext context); 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/CompileResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace YOYO.AspNetCore.ViewEngine.Razor 7 | { 8 | public class CompileResult 9 | { 10 | public bool Success { set; get; } 11 | 12 | public List Errors { set; get; } 13 | 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionRuntime/IControllerFacotry.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 YOYO.Mvc.ActionRuntime 8 | { 9 | public interface IControllerFacotry 10 | { 11 | Controller CreateController(Type controllerType, IServiceProvider serverProvider); 12 | 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.Extensions.DI/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "debugType": "portable" 5 | }, 6 | "dependencies": { 7 | "NETStandard.Library": "1.6.0", 8 | "Microsoft.Extensions.DependencyInjection": "1.0.0" 9 | }, 10 | 11 | "frameworks": { 12 | "netstandard1.6": { 13 | "imports": "dnxcore50" 14 | }, 15 | "net451": {} 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/IRazorView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace YOYO.AspNetCore.ViewEngine.Razor 7 | { 8 | public interface IRazorView 9 | { 10 | RazorViewTemplate Template { get; } 11 | 12 | void SetContext(RenderTemplateContext context); 13 | 14 | void Render(); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ResponseProcessor/IResponseProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc.ResponseProcessor 9 | { 10 | internal interface IResponseProcessor 11 | { 12 | bool CanProcess(); 13 | 14 | Task ProcessAsync(object model); 15 | 16 | 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IHttpHeaders.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace YOYO.Owin 4 | { 5 | public interface IHttpHeaders 6 | { 7 | IDictionary Raw { get; } 8 | 9 | void Add(string key, string value); 10 | 11 | void Add(string key, IEnumerable values); 12 | 13 | IEnumerable Enumerate(string key); 14 | 15 | string GetValue(string key); 16 | } 17 | } -------------------------------------------------------------------------------- /Native/LibCaptchaImage/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/IYOYOBootstrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc.ActionRuntime; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public interface IYOYOBootstrapper 11 | { 12 | ActionRuntimeManager RuntimeManager { get; } 13 | void Initialise(); 14 | 15 | Task InitialiseAsync(); 16 | 17 | IEnumerable ViewEngines { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Backup/Hosts/CoreHost/CoreAppHost.xproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hosts 5 | 11 6 | 7 | 8 | ProjectDebugger 9 | 10 | -------------------------------------------------------------------------------- /XUnitTestProject1/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | 4 | namespace XUnitTestProject1 5 | { 6 | public class UnitTest1 7 | { 8 | [Fact] 9 | public void Test1() 10 | { 11 | 12 | var t1= typeof(UserService).GetHashCode(); 13 | var t2= typeof(MyService1).GetHashCode(); 14 | var t3= typeof(MyService).GetHashCode(); 15 | 16 | 17 | var t4 = typeof(UserService).GetHashCode(); 18 | 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/IRouteBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc.Route 9 | { 10 | public interface IRouteBuilder 11 | { 12 | IRouteBuilder Map(string role,string defaultControllerName = null, string defaultActionName = null); 13 | IRouteBuilder Map(RouteRole role); 14 | RouteResolveResult Resolve(IOwinRequest request); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Backup/Native/LibCaptchaImageWarp/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | 4 | "dependencies": { 5 | "NETStandard.Library": "1.6.0", 6 | "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*" 7 | }, 8 | 9 | "buildOptions": { 10 | "copyToOutput": [ 11 | "libcaptchaimage.so", 12 | "libcaptchaimage.dll" 13 | ] }, 14 | 15 | "frameworks": { 16 | "netstandard1.6": { 17 | "imports": "dnxcore50" 18 | }, 19 | "net451": { 20 | 21 | } 22 | 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionFilterAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public class ActionFilterAttribute : System.Attribute 11 | { 12 | public virtual bool OnActionExecuting(ActionExecuteContext context) { return true; } 13 | 14 | public virtual void OnActionExecuted(ActionExecuteContext context) { } 15 | 16 | 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/HttpGet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using YOYO.Owin; 5 | using System.Reflection; 6 | using YOYO.Mvc.ResponseProcessor; 7 | using YOYO.Mvc.Session; 8 | using YOYO.Extensions.DI; 9 | 10 | namespace YOYO.Mvc.Route 11 | { 12 | [AttributeUsage(AttributeTargets.Method)] 13 | public class HttpGetAttribute : HttpRouteAttribute 14 | { 15 | public HttpGetAttribute(string urlRole) : base(urlRole) { } 16 | 17 | 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/HttpPost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using YOYO.Owin; 5 | using System.Reflection; 6 | using YOYO.Mvc.ResponseProcessor; 7 | using YOYO.Mvc.Session; 8 | using YOYO.Extensions.DI; 9 | 10 | namespace YOYO.Mvc.Route 11 | { 12 | [AttributeUsage(AttributeTargets.Method)] 13 | public class HttpPostAttribute : HttpRouteAttribute 14 | { 15 | public HttpPostAttribute(string urlRole): base(urlRole){} 16 | 17 | 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IOwinContext.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading; 3 | 4 | namespace YOYO.Owin 5 | { 6 | public interface IOwinContext 7 | { 8 | CancellationToken CancellationToken { get; } 9 | 10 | IDictionary Environment { get; } 11 | 12 | string OwinVersion { get; } 13 | 14 | IOwinRequest Request { get; } 15 | 16 | IOwinResponse Response { get; } 17 | 18 | IDictionary Items { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Native/LibCaptchaImage/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | #ifdef _MSC_VER //I'm in VS 8 | 9 | #include "targetver.h" 10 | 11 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 12 | // Windows Header Files: 13 | #include 14 | 15 | #endif 16 | 17 | // TODO: reference additional headers your program requires here 18 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Extensions/TypeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Threading.Tasks; 6 | 7 | namespace YOYO.Mvc.Extensions 8 | { 9 | public static class TypeExtensions 10 | { 11 | public static object GetTypeDefaultValue(this Type type) 12 | { 13 | if (type.GetTypeInfo().IsValueType) 14 | return Activator.CreateInstance(type); 15 | 16 | return null; 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionRuntime/IActionRuntimeProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc.ActionRuntime 9 | { 10 | public interface IActionRuntimeProvider 11 | { 12 | string Name{ get; } 13 | 14 | string[] GetControllerNames (); 15 | 16 | void LoadRuntime(string path); 17 | 18 | object ExecuteAsync (string controllerName, string actionName, IOwinContext context); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/IViewEngine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public interface IViewEngine 11 | { 12 | string ExtensionName { get; } 13 | string RenderView(IOwinContext context, string viewName, object model , DynamicDictionary viewbag); 14 | 15 | Task RenderViewAsync(IOwinContext context, string viewName, object model, DynamicDictionary viewbag); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "0.1.0", 5 | "command": "dotnet", 6 | "isShellCommand": true, 7 | "args": [], 8 | "options": { 9 | "cwd": "${workspaceRoot}/Hosts/CoreHost/" 10 | }, 11 | "tasks": [ 12 | { 13 | "taskName": "build", 14 | "args": [ ], 15 | "isBuildCommand": true, 16 | "showOutput": "silent", 17 | "problemMatcher": "$msCompile" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/TypeMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace YOYOFx.Extensions.DependencyInjection.Registration 5 | { 6 | internal class TypeMap 7 | { 8 | public TypeMap(Type implementationType, IEnumerable serviceTypes) 9 | { 10 | ImplementationType = implementationType; 11 | ServiceTypes = serviceTypes; 12 | } 13 | 14 | public Type ImplementationType { get; } 15 | 16 | public IEnumerable ServiceTypes { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/YOYOFx.Extensions.DependencyInjection.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 2.0.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/Helper/UrlHelper.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 YOYO.Owin.Helper 8 | { 9 | internal static class UrlHelper 10 | { 11 | public static string Decode(string value) 12 | { 13 | value = value.Replace("+", " "); 14 | return Uri.UnescapeDataString(value); 15 | } 16 | 17 | public static string Encode(string value) 18 | { 19 | return Uri.EscapeDataString(value); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/HttpRoute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using YOYO.Owin; 5 | using System.Reflection; 6 | using YOYO.Mvc.ResponseProcessor; 7 | using YOYO.Mvc.Session; 8 | using YOYO.Extensions.DI; 9 | 10 | namespace YOYO.Mvc.Route 11 | { 12 | [AttributeUsage(AttributeTargets.Method)] 13 | public class HttpRouteAttribute : System.Attribute 14 | { 15 | public HttpRouteAttribute(string urlRole) 16 | { 17 | this.UrlRole = urlRole; 18 | } 19 | 20 | public string UrlRole{ set; get; } 21 | } 22 | 23 | 24 | } -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/YOYOFx.Boot.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/ServiceTypeMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace YOYOFx.Extensions.DependencyInjection 6 | { 7 | public class ServiceTypeMetadata 8 | { 9 | public string Name { set; get; } 10 | 11 | public string NameSpace { set; get; } 12 | 13 | public Type ServiceType { set; get; } 14 | 15 | public string Description { set; get; } 16 | 17 | public object Configuration { set; get; } 18 | 19 | public TConfig GetConfig() 20 | { 21 | return (TConfig)Configuration; 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/Pipeline/IPipelineComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | namespace YOYO.Owin.Pipeline 8 | { 9 | using Env = IDictionary; 10 | //using AppFunc = Func< // 11 | // IDictionary, // owin request environment 12 | // Task // completion signal 13 | // >; 14 | 15 | public interface IPipelineComponent 16 | { 17 | void Connect(AppFunc next); 18 | 19 | Task Execute(Env requestEnvironment); 20 | 21 | void Setup(Env hostEnvironment); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/RazorViewTemplate'1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using YOYO.AspNetCore.ViewEngine.Razor; 6 | using YOYO.Mvc; 7 | 8 | namespace YOYO.AspNetCore.ViewEngine.Razor 9 | { 10 | 11 | public abstract class RazorViewTemplate : RazorViewTemplate 12 | { 13 | public T Model { private set; get; } 14 | 15 | 16 | 17 | 18 | public override void SetModel(object model, DynamicDictionary viewbag = null) 19 | { 20 | this.Model = (T)model; 21 | base.SetModel(model, viewbag); 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/IFluentInterface.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | 4 | namespace YOYOFx.Extensions.DependencyInjection.Registration 5 | { 6 | [EditorBrowsable(EditorBrowsableState.Never)] 7 | public interface IFluentInterface 8 | { 9 | [EditorBrowsable(EditorBrowsableState.Never)] 10 | Type GetType(); 11 | 12 | [EditorBrowsable(EditorBrowsableState.Never)] 13 | int GetHashCode(); 14 | 15 | [EditorBrowsable(EditorBrowsableState.Never)] 16 | string ToString(); 17 | 18 | [EditorBrowsable(EditorBrowsableState.Never)] 19 | bool Equals(object obj); 20 | } 21 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/YOYOFx.Extensions.Utils.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /XUnitTestProject1/XUnitTestProject1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/RouteHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using YOYO.Owin; 8 | using YOYO.Owin.Helper; 9 | 10 | namespace YOYO.Mvc.Route 11 | { 12 | internal abstract class RouteHandler : IRouteHandler 13 | { 14 | protected RouteResolveResult _resolveResult = null; 15 | public RouteHandler(RouteResolveResult resolveResult) 16 | { 17 | _resolveResult = resolveResult; 18 | } 19 | 20 | 21 | public abstract Task ProcessAsync(IOwinContext context, CancellationToken cancellationToken); 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Owin/project.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "description": "", 4 | 5 | "version": "0.1.3-*", 6 | 7 | "dependencies": { 8 | 9 | }, 10 | 11 | "buildOptions": { 12 | 13 | "compile": [ 14 | "**.cs" 15 | ], 16 | "defines": [ ], 17 | "debugType": "portable" 18 | }, 19 | "frameworks": { 20 | "net451": { 21 | "dependencies": { 22 | "System.Xml.XmlSerializer": "4.0.0" 23 | } 24 | }, 25 | 26 | "netstandard1.6": { 27 | "dependencies": { 28 | "NETStandard.Library": "1.6.0", 29 | "System.Security.Principal": "4.0.1-*" 30 | 31 | }, 32 | 33 | "imports": "dnxcore50" 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Tests/ServiceCollectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Tests 8 | { 9 | internal static class ServiceCollectionExtensions 10 | { 11 | public static ServiceDescriptor GetDescriptor(this IServiceCollection services) 12 | { 13 | return services.GetDescriptors().Single(); 14 | } 15 | 16 | public static ServiceDescriptor[] GetDescriptors(this IServiceCollection services) 17 | { 18 | return services.Where(x => x.ServiceType == typeof(T)).ToArray(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYOFx.Extensions.DependencyInjection.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Filters/NoCacheAttribute.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 YOYO.Mvc.Filters 8 | { 9 | public class NoCacheAttribute: ActionFilterAttribute 10 | { 11 | public override bool OnActionExecuting(ActionExecuteContext context) 12 | { 13 | context.HttpContext.Response.Headers.CacheControl = "no-cache, no-store, max-age=0"; 14 | context.HttpContext.Response.Headers.Pragma = "no-cache"; 15 | context.HttpContext.Response.Headers.Expires = "-1"; 16 | 17 | 18 | return base.OnActionExecuting(context); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/AOP/IMethodInterceptor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Text; 5 | 6 | namespace YOYOFx.Extensions.DependencyInjection.AOP 7 | { 8 | public interface IMethodInterceptor 9 | { 10 | void OnBefore(Type targetType,object target, MethodInfo targetMethod, object[] args); 11 | 12 | object OnAfter(Type targetType, object target, object returnValue ,MethodInfo targetMethod, object[] args); 13 | 14 | void OnException(Type targetType, object target, MethodInfo targetMethod, object[] args ,Exception ex); 15 | 16 | } 17 | 18 | public interface IMethodInterceptor: IMethodInterceptor { } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Backup/Hosts/NET451OwinHost/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true, 5 | "copyToOutput": [ 6 | "Views/*.*" 7 | ] 8 | }, 9 | 10 | 11 | 12 | "frameworks": { 13 | "net451": { 14 | "dependencies": { 15 | "Owin": "1.0.0", 16 | "Microsoft.Owin": "3.0.1", 17 | "Microsoft.Owin.Hosting": "3.0.1", 18 | "Microsoft.Owin.Host.HttpListener": "3.0.1", 19 | "Microsoft.Owin.StaticFiles": "3.0.1", 20 | "YOYO.AspNetCore.Mvc": "0.1.3-*", 21 | "YOYO.AspNetCore.Owin": "0.1.3-*", 22 | "YOYO.AspNetCore.ViewEngine.Razor": "0.1.3-*", 23 | "YOYO.AspNetCore.Builder": "0.1.3-*" 24 | } 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/OwinFunc.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 YOYO.Owin 8 | { 9 | /// 10 | /// owin app func 应用入口函数 11 | /// 12 | /// 环境字典 13 | /// 异步任务 14 | public delegate Task AppFunc(IDictionary env); 15 | 16 | /// 17 | /// Owin 中间件函数 18 | /// 19 | /// 环境字典 20 | /// 上一个应用或中间件函数 21 | /// 异步任务 22 | public delegate Task MiddlewareFunc(IDictionary env, AppFunc appfunc); 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/RouteResolveResult.cs: -------------------------------------------------------------------------------- 1 | namespace YOYO.Mvc.Route 2 | { 3 | using System.Collections; 4 | using System.Collections.Concurrent; 5 | using System.Collections.Generic; 6 | 7 | public class RouteResolveResult 8 | { 9 | public RouteResolveResult() 10 | { 11 | RouteValues = new ConcurrentDictionary(); 12 | } 13 | 14 | public string Url { set; get; } 15 | 16 | public string ControllerName 17 | { 18 | set; get; 19 | } 20 | 21 | 22 | public string ActionName { set; get; } 23 | 24 | 25 | public IDictionary RouteValues 26 | { 27 | set; get; 28 | } 29 | 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/Pipeline/IPipeline.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 YOYO.Owin.Pipeline 8 | { 9 | using Env = IDictionary; 10 | 11 | using SetupAction = Action< // 12 | IDictionary // owin host environment 13 | >; 14 | 15 | public interface IPipeline 16 | { 17 | AppFunc Build(); 18 | 19 | void Setup(Env hostEnvironment); 20 | 21 | void Use(AppFunc app, SetupAction setup = null); 22 | 23 | IPipeline Use(MiddlewareFunc middleware, SetupAction setup = null); 24 | 25 | IPipeline Use(IPipelineComponent component); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYO.Extensions.DI.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYOFx.Extensions.DI.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionRuntime/DefaultControllerFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Reflection; 7 | using Microsoft.Extensions.DependencyInjection; 8 | 9 | namespace YOYO.Mvc.ActionRuntime 10 | { 11 | public class DefaultControllerFactory : IControllerFacotry 12 | { 13 | 14 | public Controller CreateController(Type controllerType , IServiceProvider serverProvider) 15 | { 16 | Controller activeController = null; 17 | 18 | activeController = (Controller)ActivatorUtilities.CreateInstance(serverProvider, controllerType); 19 | 20 | return activeController; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Backup/Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "debugType": "portable" 5 | }, 6 | "dependencies": { 7 | "System.Runtime.Serialization.Primitives": "4.1.1", 8 | "xunit": "2.1.0", 9 | "dotnet-test-xunit": "1.0.0-rc2-build10025", 10 | "YOYO.AspNetCore.Mvc": "0.1.3-*", 11 | "YOYO.AspNetCore.Owin": "0.1.3-*", 12 | "YOYO.Extensions.DI": "1.0.0-*" 13 | }, 14 | "testRunner": "xunit", 15 | "frameworks": { 16 | "netcoreapp1.0": { 17 | "dependencies": { 18 | "Microsoft.NETCore.App": { 19 | "type": "platform", 20 | "version": "1.0.0" 21 | } 22 | }, 23 | "imports": [ 24 | "dotnet5.4", 25 | "portable-net451+win8" 26 | ] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/View.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc.ResponseProcessor; 7 | using YOYO.Owin; 8 | 9 | namespace YOYO.Mvc 10 | { 11 | public class View : IActionResult 12 | { 13 | public View(string path) { Path = path; } 14 | 15 | public string Path { set; get; } 16 | 17 | public string ControllerName { set; get; } 18 | 19 | public string ActionName { set; get; } 20 | 21 | public dynamic Model { set; get; } 22 | 23 | public DynamicDictionary ViewBag { set; get; } 24 | 25 | public Task ProcessAsync(IOwinContext context) 26 | { 27 | return new ViewResponseProcessor(context).ProcessAsync(this); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Native/LibCaptchaImage/CaptchaImage.h: -------------------------------------------------------------------------------- 1 | // The following ifdef block is the standard way of creating macros which make exporting 2 | // from a DLL simpler. All files within this DLL are compiled with the WIN32PROJECT1_EXPORTS 3 | // symbol defined on the command line. This symbol should not be defined on any project 4 | // that uses this DLL. This way any other project whose source files include this file see 5 | // WIN32PROJECT1_API functions as being imported from a DLL, whereas this DLL sees symbols 6 | // defined with this macro as being exported. 7 | #ifdef PROJECT_EXPORTS 8 | #define Export_API extern "C" __declspec(dllexport) 9 | #else 10 | #define Export_API extern "C" 11 | #endif 12 | 13 | 14 | 15 | Export_API void GCaptcha(char* file_o, char *captcha_text, int count, int width, int height, int offset, int quality, int isjpeg, int fontSize); 16 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Builder/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.3-*", 3 | "buildOptions": { 4 | "debugType": "portable" 5 | }, 6 | "dependencies": { 7 | "Microsoft.AspNetCore.Http.Abstractions": "1.0.0", 8 | "Microsoft.AspNetCore.Owin": "1.0.0", 9 | "NETStandard.Library": "1.6.0", 10 | "YOYO.AspNetCore.Mvc": { 11 | "version": "0.1.3-*", 12 | "target": "project", 13 | "type": "build" 14 | }, 15 | "YOYO.AspNetCore.Owin": { 16 | "version": "0.1.3-*", 17 | "target": "project", 18 | "type": "build" 19 | }, 20 | "YOYO.Extensions.DI": "1.0.0-*" 21 | }, 22 | 23 | "frameworks": { 24 | "netstandard1.6": { 25 | "imports": "dnxcore50" 26 | }, 27 | "net451": { 28 | "dependencies": { 29 | "Owin": "1.0.0" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/AOP/MethodInterceptorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Text; 5 | 6 | namespace YOYOFx.Extensions.DependencyInjection.AOP 7 | { 8 | public class MethodInterceptorAttribute : Attribute, IMethodInterceptor 9 | { 10 | public virtual object OnAfter(Type targetType, object target, object returnValue, MethodInfo targetMethod, object[] args) 11 | { 12 | throw new NotSupportedException(); 13 | } 14 | 15 | public virtual void OnBefore(Type targetType, object target, MethodInfo targetMethod, object[] args) 16 | { 17 | } 18 | public virtual void OnException(Type targetType, object target, MethodInfo targetMethod, object[] args, Exception ex) 19 | { 20 | 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Extensions/ParameterInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using YOYO.Mvc.ActionRuntime; 8 | 9 | namespace YOYO.Mvc.Extensions 10 | { 11 | public static class ParameterInfoExtensions 12 | { 13 | public static List ToActionParameters(this ParameterInfo[] pinfos) 14 | { 15 | return pinfos.Select(p => new ActionRuntimeParameter() { Name = p.Name , ParameterType = p.ParameterType }).ToList(); 16 | } 17 | 18 | 19 | public static List ToActionParameters(this string[] pinfos) 20 | { 21 | return pinfos.Select(p => new ActionRuntimeParameter() { Name = p, ParameterType = null }).ToList(); 22 | } 23 | 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/RouteHandlerFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using YOYO.Mvc.Route; 3 | using YOYO.Owin; 4 | 5 | namespace YOYO.Mvc 6 | { 7 | public class RouteHandlerFactory 8 | { 9 | private static readonly object lockObject = new object(); 10 | private static RouteHandlerFactory _factory; 11 | public static RouteHandlerFactory Default 12 | { 13 | get 14 | { 15 | lock (lockObject) 16 | { 17 | if (_factory == null) 18 | { 19 | _factory = new RouteHandlerFactory(); 20 | } 21 | 22 | return _factory; 23 | 24 | } 25 | } 26 | } 27 | 28 | public IRouteHandler CreateRouteHandler(IOwinContext context,RouteResolveResult resolveResult) 29 | { 30 | context.Request.RouteValues = resolveResult.RouteValues; 31 | IRouteHandler handler = new MvcRouteHandler (resolveResult); 32 | return handler; 33 | } 34 | 35 | 36 | 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYO.Extensions.DI")] 18 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 19 | 20 | // 由 MSBuild WriteCodeFragment 类生成。 21 | 22 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYO.Extensions.DI")] 18 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 19 | 20 | // 由 MSBuild WriteCodeFragment 类生成。 21 | 22 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\bin\Debug\netstandard2.0\YOYOFx.Boot.deps.json 2 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\bin\Debug\netstandard2.0\YOYOFx.Boot.dll 3 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\bin\Debug\netstandard2.0\YOYOFx.Boot.pdb 4 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\Debug\netstandard2.0\YOYOFx.Boot.csproj.CoreCompileInputs.cache 5 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\Debug\netstandard2.0\YOYOFx.Boot.AssemblyInfoInputs.cache 6 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\Debug\netstandard2.0\YOYOFx.Boot.AssemblyInfo.cs 7 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\Debug\netstandard2.0\YOYOFx.Boot.dll 8 | d:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\Debug\netstandard2.0\YOYOFx.Boot.pdb 9 | D:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\Debug\netstandard2.0\YOYOFx.Boot.csprojResolveAssemblyReference.cache 10 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "", 3 | 4 | "version": "0.1.3-*", 5 | "buildOptions": { 6 | "debugType": "portable" 7 | }, 8 | "dependencies": { 9 | "Microsoft.AspNetCore.Razor": "1.0.0", 10 | "NETStandard.Library": "1.6.0", 11 | "Microsoft.CodeAnalysis.CSharp": { 12 | "version": "1.3.0", 13 | "include": "all" 14 | }, 15 | "Microsoft.Extensions.DependencyModel":"1.0.0", 16 | "System.Reflection.Metadata": "1.3.0", 17 | "YOYO.AspNetCore.Mvc": "0.1.3-*", 18 | "YOYO.AspNetCore.Owin": "0.1.3-*" 19 | 20 | }, 21 | 22 | "frameworks": { 23 | "netstandard1.6": { 24 | "imports": "portable-net451+win8", 25 | "dependencies": { 26 | "System.Text.Encoding": "4.0.11", 27 | "System.Runtime.Loader": "4.0.0", 28 | "System.Runtime": "4.1.0" 29 | } 30 | 31 | }, 32 | 33 | "net451": { } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Native/LibCaptchaImageWarp/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("Microsoft")] 10 | [assembly: AssemblyProduct("CaptchaImageCore")] 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("12987f35-1810-48b4-afaa-d9990bc5b982")] 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/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("Microsoft")] 10 | [assembly: AssemblyProduct("YOYO.AspNetCore.Mvc")] 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("217921f0-0dfc-42b1-90be-d29bc85998c9")] 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/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("Microsoft")] 10 | [assembly: AssemblyProduct("YOYO.AspNetCore.Owin")] 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("68bce77c-b1b7-4c13-bdf6-30694d622572")] 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Builder/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("Microsoft")] 10 | [assembly: AssemblyProduct("YOYO.AspNetCore.Builder")] 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("8c84e088-328b-484c-b558-b67ff612ef17")] 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Extensions/StringExtensions.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 YOYO.Mvc.Extensions 8 | { 9 | public static class StringExtensions 10 | { 11 | public static List GetUrlSegments(this string roleUri) 12 | { 13 | string[] nullorqueryString = roleUri.Split('?'); 14 | string roleStr = nullorqueryString.Length > 1 ? nullorqueryString[0] : roleUri; //split querystring , such as "?name=1" 15 | string[] segmentArray = roleStr.Split('/'); 16 | 17 | List segments = new List(); 18 | 19 | for (int i = 0; i < segmentArray.Length; i++) 20 | if (!String.IsNullOrEmpty(segmentArray[i])) 21 | segments.Add(segmentArray[i]); 22 | 23 | return segments; 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/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("Microsoft")] 10 | [assembly: AssemblyProduct("YOYO.AspNetCore.ViewEngine.Razor")] 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("286ac8a2-db3b-48b1-8bf3-b0066527520a")] 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/TemplateLocator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using YOYO.Mvc; 8 | 9 | namespace YOYO.AspNetCore.ViewEngine.Razor 10 | { 11 | public class TemplateLocator 12 | { 13 | 14 | public static string LoadTemplateContent(string viewName) 15 | { 16 | string templatePath = HostingEnvronment.GetMapPath(viewName); 17 | 18 | if (!File.Exists(templatePath)) throw new FileNotFoundException("view template file can't find."); 19 | 20 | string viewTemplate = null; 21 | using (StreamReader reader = new StreamReader(new FileStream(templatePath, FileMode.Open, FileAccess.Read), Encoding.UTF8)) 22 | { 23 | viewTemplate = reader.ReadToEnd(); 24 | } 25 | 26 | return viewTemplate; 27 | } 28 | 29 | 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Session/CookieSession.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 YOYO.Mvc.Session 8 | { 9 | public class CookieSession : ISession 10 | { 11 | public object this[string key] 12 | { 13 | get 14 | { 15 | object obj = null; 16 | this._userData.TryGetValue(key, out obj); 17 | return obj; 18 | } 19 | set 20 | { 21 | this._userData[key] = value; 22 | } 23 | } 24 | 25 | private IDictionary _userData = new Dictionary(); 26 | 27 | internal DateTime DeathTime { get; set; } 28 | 29 | public string ID { set; get; } 30 | 31 | public void RefreshSessionAccessTime() 32 | { 33 | DeathTime = DateTime.Now.AddMinutes(30); 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/YOYO.AspNetCore.Owin.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0.1.3 5 | net451;netstandard1.6 6 | portable 7 | YOYO.AspNetCore.Owin 8 | YOYO.AspNetCore.Owin 9 | false 10 | false 11 | false 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IResponseHeaders.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace YOYO.Owin 5 | { 6 | public interface IResponseHeaders : IHttpHeaders 7 | { 8 | string AcceptRanges { get; set; } 9 | 10 | string Age { get; set; } 11 | 12 | string CacheControl { get; set; } 13 | 14 | string Connection { get; set; } 15 | 16 | long ContentLength { get; set; } 17 | 18 | string ContentType { get; set; } 19 | 20 | string ETag { get; set; } 21 | 22 | string Expires { get; set; } 23 | 24 | string LastModified { get; set; } 25 | 26 | string Location { get; set; } 27 | 28 | string Pragma { get; set; } 29 | 30 | string ProxyAuthenticate { get; set; } 31 | 32 | string RetryAfter { get; set; } 33 | 34 | string Server { get; set; } 35 | 36 | string Vary { get; set; } 37 | 38 | string WwwAuthenticate { get; set; } 39 | 40 | IDictionary ToDictionary(); 41 | } 42 | } -------------------------------------------------------------------------------- /Notepad/ASP.NET Core 总结1.md: -------------------------------------------------------------------------------- 1 | ### buildOptions: 2 | #### 编译设置 3 | 1. compile : 文件编译,是一个数组,确定一组要编译的文件进行定义, **.cs (默认) 表示 包含子目录下的所有.cs文件,如果要链接共用的代码进行编译的话 4 | 可以在这个地方设置。 5 | 6 | 2. defines : 编译变量的定义,用于条件编译,如多平台判断。 7 | 8 | 3. frameworks :用于定义平台(要编译平台集体)和定义某个平台的特定依赖。 9 | Dotnet Core与DNX在R2这个版本上进行了合并,合并之后以前的众多平台版本得到了统一; 10 | (1) netcoreapp1.0 平台,作为dotnet core平台上创建应用程序的基础库,统一了服务端应用程序的开发平台。 11 | 合并了DNX Core(ASP.NET 5)平台,新版本中Dotnet也对程序入口(Program.cs)进行了统一,,对所有应用程序提供统一的工具链进行支持; 12 | 如ASP.NET Core Web程序和Console(.NET Core)程序都可以使用 dotnet run 进行运行。 13 | (2) netstandard1.5平台,作为基础组件库,统一了库的开发平台。netcoreapp和netstandard都属于dotnet core的一部分。 14 | (3) NET4xy (NET451、NET452、NET461等),统一了Full Dotnet Framework的开发平台。 15 | (4) MONO? ,在之前的版本中Mono可以作为DNX的CLR版本之一,进行平台开发,目前MS好像没有提到过它了。可能在新的 DNVM(Dotnet的版本管理器) 16 | 开发完成后,可以对所有的CLR进行管理吧,那时候可能有MONO吧。。。 17 | 18 | 19 | #### 总结: 20 | >新的项目文件 project.json 主要用于统一管理dotnet的发布、编译、平台、程序集依赖等。 21 | 22 | 23 | 24 | MySQL CORE :https://coding.net/u/zlzforever/p/share/git/tree/master 25 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": ".NET Core Launch (web)", 6 | "type": "coreclr", 7 | "request": "launch", 8 | "preLaunchTask": "build", 9 | "program": "${workspaceRoot}/Hosts/CoreHost/bin/Debug/netcoreapp1.0/CoreHost.dll", 10 | "args": [], 11 | "cwd": "${workspaceRoot}", 12 | "stopAtEntry": false, 13 | "launchBrowser": { 14 | "enabled": true, 15 | "args": "${auto-detect-url}", 16 | "windows": { 17 | "command": "cmd.exe", 18 | "args": "/C start ${auto-detect-url}" 19 | }, 20 | "osx": { 21 | "command": "open" 22 | }, 23 | "linux": { 24 | "command": "xdg-open" 25 | } 26 | }, 27 | "env": { 28 | "ASPNETCORE_ENVIRONMENT": "Development" 29 | } 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IOwinResponse.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | 4 | namespace YOYO.Owin 5 | { 6 | /// 7 | /// Abstraction for an HTTP response, to be implemented by hosting. 8 | /// 9 | public interface IOwinResponse 10 | { 11 | Stream Body { get; } 12 | 13 | /// 14 | /// The response headers. 15 | /// 16 | IResponseHeaders Headers { get; } 17 | 18 | ResponseCookieCollection Cookies { get; } 19 | 20 | /// 21 | /// Gets or sets the status code and description. 22 | /// 23 | /// 24 | /// The status code. 25 | /// 26 | Status Status { get; set; } 27 | 28 | 29 | void Write(byte[] bytes); 30 | 31 | void Write(string text); 32 | 33 | Task WriteAsync(byte[] bytes); 34 | 35 | Task WriteAsync(byte[] bytes,int length); 36 | 37 | Task WriteAsync(string text); 38 | 39 | void Redirect(string location); 40 | } 41 | } -------------------------------------------------------------------------------- /Tests/Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | portable 6 | Tests 7 | Tests 8 | true 9 | $(PackageTargetFallback);dotnet5.4;portable-net451+win8 10 | 1.0.4 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/DynamicDictionary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Dynamic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public class DynamicDictionary : DynamicObject 11 | { 12 | private IDictionary _dictionary = new Dictionary(); 13 | 14 | public override bool TrySetMember(SetMemberBinder binder, object value) 15 | { 16 | 17 | if (_dictionary.ContainsKey(binder.Name)) 18 | _dictionary[binder.Name] = value; 19 | else 20 | _dictionary.Add(binder.Name,value); 21 | return true; 22 | } 23 | 24 | 25 | 26 | public override bool TryGetMember(GetMemberBinder binder, out object result) 27 | { 28 | return _dictionary.TryGetValue(binder.Name, out result); 29 | } 30 | 31 | public IDictionary ToDictionary() 32 | { 33 | return _dictionary; 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/Debug/netstandard2.0/YOYOFx.Boot.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("YOYOFx.Boot")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("YOYOFx.Boot")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYOFx.Boot")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionExecuteContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc.Reflection; 7 | using YOYO.Owin; 8 | 9 | namespace YOYO.Mvc 10 | { 11 | public class ActionExecuteContext 12 | { 13 | public IOwinContext HttpContext { private set; get; } 14 | 15 | public string ControllerName { private set; get; } 16 | 17 | public string ActionName { private set; get; } 18 | 19 | public IDynamicMethodInvoker ActionInvoker { private set; get; } 20 | 21 | public IList ParameterList { private set; get; } 22 | 23 | public object Result { set; get; } 24 | 25 | public ActionExecuteContext(IOwinContext context,string controllername, 26 | string actionname, IDynamicMethodInvoker actioninvoker, IList paramterlist) 27 | { 28 | this.HttpContext = context; 29 | this.ControllerName = controllername; 30 | this.ActionName = actionname; 31 | 32 | } 33 | 34 | 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IRequestHeaders.cs: -------------------------------------------------------------------------------- 1 | namespace YOYO.Owin 2 | { 3 | public interface IRequestHeaders : IHttpHeaders 4 | { 5 | string Accept { get; set; } 6 | 7 | string AcceptCharset { get; set; } 8 | 9 | string AcceptEncoding { get; set; } 10 | 11 | string AcceptLanguage { get; set; } 12 | 13 | string Authorization { get; set; } 14 | 15 | string ContentType { get; set; } 16 | 17 | string Expect { get; set; } 18 | 19 | string From { get; set; } 20 | 21 | string Host { get; set; } 22 | 23 | string IfMatch { get; set; } 24 | 25 | string IfModifiedSince { get; set; } 26 | 27 | string IfNoneMatch { get; set; } 28 | 29 | string IfRange { get; set; } 30 | 31 | string IfUnmodifiedSince { get; set; } 32 | 33 | string MaxForwards { get; set; } 34 | 35 | string ProxyAuthorization { get; set; } 36 | 37 | string Range { get; set; } 38 | 39 | string Referer { get; set; } 40 | 41 | string TE { get; set; } 42 | 43 | string UserAgent { get; set; } 44 | } 45 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard1.6/YOYO.Extensions.DI.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\netstandard1.6\YOYO.Extensions.DI.deps.json 2 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\netstandard1.6\YOYO.Extensions.DI.dll 3 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\netstandard1.6\YOYO.Extensions.DI.pdb 4 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard1.6\YOYO.Extensions.DI.csproj.CoreCompileInputs.cache 5 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard1.6\YOYO.Extensions.DI.AssemblyInfo.cs 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard1.6\YOYO.Extensions.DI.dll 7 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard1.6\YOYO.Extensions.DI.pdb 8 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard1.6\YOYO.Extensions.DI.csprojResolveAssemblyReference.cache 9 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard1.6\YOYO.Extensions.DI.AssemblyInfoInputs.cache 10 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYO.Extensions.DI.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard2.0\YOYO.Extensions.DI.csproj.CoreCompileInputs.cache 2 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard2.0\YOYO.Extensions.DI.AssemblyInfoInputs.cache 3 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard2.0\YOYO.Extensions.DI.AssemblyInfo.cs 4 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\netstandard2.0\YOYO.Extensions.DI.deps.json 5 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\netstandard2.0\YOYO.Extensions.DI.dll 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\netstandard2.0\YOYO.Extensions.DI.pdb 7 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard2.0\YOYO.Extensions.DI.dll 8 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard2.0\YOYO.Extensions.DI.pdb 9 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\netstandard2.0\YOYO.Extensions.DI.csprojResolveAssemblyReference.cache 10 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("XUnitTestProject1")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("XUnitTestProject1")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("XUnitTestProject1")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Mvc/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.3-*", 3 | 4 | "dependencies": { 5 | "NETStandard.Library": "1.6.0", 6 | "Microsoft.Extensions.DependencyInjection": "1.0.0", 7 | "Newtonsoft.Json": "8.0.3", 8 | "YOYO.AspNetCore.Owin": { 9 | "target": "project", 10 | "type": "build" 11 | }, 12 | "YOYO.Extensions.DI": "1.0.0-*" 13 | }, 14 | 15 | "buildOptions": { 16 | "compile": [ 17 | "**.cs" 18 | ] 19 | ,"debugType": "portable" 20 | }, 21 | 22 | "frameworks": { 23 | "net451": { 24 | "dependencies": { 25 | 26 | }, 27 | "frameworkAssemblies": { 28 | "System.Xml": "4.0.0.0", 29 | "System.Xml.Serialization": "4.0.0.0" 30 | } 31 | }, 32 | 33 | "netstandard1.6": { 34 | "dependencies": { 35 | "Microsoft.CSharp": "4.0.1-*", 36 | "Microsoft.Extensions.PlatformAbstractions": "1.0.0", 37 | "System.Runtime":"4.1.0", 38 | "System.Runtime.Loader": "4.0.0", 39 | "System.Xml.XmlSerializer": "4.0.11" 40 | 41 | }, 42 | 43 | "imports": "dnxcore50" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ViewEngineFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.Concurrent; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public class ViewEngineFactory 11 | { 12 | private static IDictionary viewEngineCache = new ConcurrentDictionary(); 13 | public static void LoadViewEngine() 14 | { 15 | var viewEngineTypes = ApplicationAssemblyLoader.TypesOf(typeof(IViewEngine)); 16 | 17 | foreach (var viewEngineType in viewEngineTypes) 18 | { 19 | var viewEngine = (IViewEngine)Activator.CreateInstance(viewEngineType); 20 | viewEngineCache.Add(viewEngine.ExtensionName, viewEngine); 21 | 22 | } 23 | } 24 | 25 | public static IViewEngine GetViewEngine(string extension) 26 | { 27 | IViewEngine engine = null; 28 | viewEngineCache.TryGetValue(extension, out engine); 29 | 30 | return engine; 31 | 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Route/RouteSegment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace YOYO.Mvc.Route 6 | { 7 | public class RouteSegment 8 | { 9 | public RouteSegment() 10 | { 11 | this.RouteNames = new List (); 12 | this.SegmentType = SegmentType.Directory; 13 | } 14 | 15 | public int Index{ set; get;} 16 | public string Segment{ set; get;} 17 | public IList RouteNames{ private set;get;} 18 | public string Role{ set; get;} 19 | 20 | public SegmentType SegmentType {set;get;} 21 | 22 | 23 | public string GetSegmentValue(string urlSegment) 24 | { 25 | if (this.SegmentType != SegmentType.Role && this.SegmentType != SegmentType.Parameter) 26 | throw new NotSupportedException("not role or parameter!"); 27 | 28 | string value =null; 29 | var m = Regex.Match(urlSegment, this.Role); 30 | if(m!=null && m.Success) 31 | { 32 | value =m.Groups["name"].Value; 33 | } 34 | 35 | return value; 36 | 37 | } 38 | 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYO.Extensions.DI.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("YOYO.Extensions.DI")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("YOYO.Extensions.DI")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYO.Extensions.DI")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // 由 MSBuild WriteCodeFragment 类生成。 24 | 25 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DI.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("YOYOFx.Extensions.DI")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("YOYOFx.Extensions.DI")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYOFx.Extensions.DI")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // 由 MSBuild WriteCodeFragment 类生成。 24 | 25 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Attributes/ServiceDescriptorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Extensions.DependencyInjection; 3 | 4 | namespace YOYOFx.Extensions.DependencyInjection.Attributes 5 | { 6 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] 7 | public class ServiceDescriptorAttribute : Attribute 8 | { 9 | public ServiceDescriptorAttribute() : this(null) { } 10 | 11 | public ServiceDescriptorAttribute(Type serviceType) : this(serviceType, ServiceLifetime.Transient) { } 12 | 13 | public ServiceDescriptorAttribute(Type serviceType, ServiceLifetime lifetime) 14 | { 15 | ServiceType = serviceType; 16 | Lifetime = lifetime; 17 | } 18 | 19 | public ServiceDescriptorAttribute(string name, Type serviceType , 20 | ServiceLifetime lifetime = ServiceLifetime.Transient) : this(serviceType, ServiceLifetime.Transient) 21 | { 22 | this.Name = name; 23 | } 24 | 25 | 26 | public Type ServiceType { get; } 27 | 28 | public string Name { set; get; } 29 | 30 | public ServiceLifetime Lifetime { get; } 31 | } 32 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("YOYOFx.Extensions.Utils")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("YOYOFx.Extensions.Utils")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYOFx.Extensions.Utils")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Application.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.Concurrent; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using YOYO.Mvc.ResponseProcessor; 8 | 9 | 10 | namespace YOYO.Mvc 11 | { 12 | public class Application 13 | { 14 | private static object lockobject = new object(); 15 | private static Application _app; 16 | 17 | public Application() 18 | { 19 | 20 | } 21 | 22 | 23 | public static Application CurrentApplication 24 | { 25 | get 26 | { 27 | lock(lockobject) 28 | { 29 | if (_app == null) 30 | _app = new Application(); 31 | } 32 | return _app; 33 | 34 | } 35 | } 36 | 37 | public void SetOptions(YOYOFxOptions options) 38 | { 39 | this.Options = options; 40 | } 41 | 42 | 43 | public IServiceProvider ServiceProvider { set; get; } 44 | 45 | 46 | 47 | public YOYOFxOptions Options {private set; get; } 48 | 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## YOYOFx框架 2 | YOYOFx是支持Owin协议的MVC框架,基于Dotnet Core 1.0构建。 3 | 4 | YOYOFx基于NETStandard1.6和NET451编译,完美支持在Core和full framework(如.net framework 4.5x或mono 4.x)上的运行。 5 | 6 | YOYOFx集成了dotnet core上第一款验证码组件。 7 | 8 | 特性: 9 | YOYOFx的Mvc是基于Owin跑在Core的Web框架 , YOYOFx并没有基于Asp.Net Core MVC进行开发,而选择了使用Owin协议自己来封装Http协议的方式。 10 | 11 | ### 跨平台特性: 12 | * .NET framework 4.5x和Mono4.x上直接SelfHost或使用Tinyfox跨平台运行; 13 | * .NET Core 1.0 RTM 实现跨平台运行; 14 | * 使用Tinyfox独立版,可支持绿色部署,不需要安装Mono和Framework。 15 | * 通过dotnet publish将Core版本进行打包后,可支持绿色部署,不需要运行时。 16 | 17 | ### Owin与Core 18 | YOYOFx的Http实现都是基于Owin协议的,并提供两个独立版本NETSTANDRD1.x和NET45x版本。 19 | 20 | ###目前完成: 21 | 1. 封装Owin协议的HttpContext(IOwinContext),包括Request、Response、Http Headers、Cookie等; 22 | 2. 路由机制,通过添加自定义路由表为框架添加处理事件; 23 | 3. 基于IOwinContext的MVC框架,支持多语言扩展;支持Session和自定义的Action拦截器; 24 | 4. 可替换的视图引擎,目前实现Razor视图引擎,加入了缓存机制; 25 | 5. 已移植到dotnet core 1.0 RTM版本 26 | 27 | 28 | ###接下来的工作: 29 | 1. 将项目的目录结构整合到dotnet core的项目文件中。 (已完成) 30 | 2. 完成框架整体的DI,将框架级依赖对象全部通过依赖注入的方式构建和对象创建工厂;首先完成Controller的创建工厂。 (已完成) 31 | 3. 完善路由系统 (进行中) 32 | * 支持方法特性[HttpGet] [HttpPost] 等定义路由。 33 | * 支持自定义路由路径。 34 | * 支持为路由规则指定特定的Handler处理函数。 35 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Registration/ILifetimeSelector.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | 3 | namespace YOYOFx.Extensions.DependencyInjection.Registration 4 | { 5 | public interface ILifetimeSelector : IServiceTypeSelector 6 | { 7 | /// 8 | /// Registers each matching concrete type with lifetime. 9 | /// 10 | IImplementationTypeSelector WithSingletonLifetime(); 11 | 12 | /// 13 | /// Registers each matching concrete type with lifetime. 14 | /// 15 | IImplementationTypeSelector WithScopedLifetime(); 16 | 17 | /// 18 | /// Registers each matching concrete type with lifetime. 19 | /// 20 | IImplementationTypeSelector WithTransientLifetime(); 21 | 22 | /// 23 | /// Registers each matching concrete type with the specified . 24 | /// 25 | IImplementationTypeSelector WithLifetime(ServiceLifetime lifetime); 26 | } 27 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/Debug/netstandard2.0/YOYOFx.Extensions.Utils.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\Debug\netstandard2.0\YOYOFx.Extensions.Utils.csproj.CoreCompileInputs.cache 2 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\Debug\netstandard2.0\YOYOFx.Extensions.Utils.AssemblyInfoInputs.cache 3 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\Debug\netstandard2.0\YOYOFx.Extensions.Utils.AssemblyInfo.cs 4 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\bin\Debug\netstandard2.0\YOYOFx.Extensions.Utils.deps.json 5 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\bin\Debug\netstandard2.0\YOYOFx.Extensions.Utils.dll 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\bin\Debug\netstandard2.0\YOYOFx.Extensions.Utils.pdb 7 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\Debug\netstandard2.0\YOYOFx.Extensions.Utils.dll 8 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\Debug\netstandard2.0\YOYOFx.Extensions.Utils.pdb 9 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\Debug\netstandard2.0\YOYOFx.Extensions.Utils.csprojResolveAssemblyReference.cache 10 | -------------------------------------------------------------------------------- /Native/LibCaptchaImageWarp/LibCaptchaImageWarp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard1.6;net451 5 | LibCaptchaImageWarp 6 | LibCaptchaImageWarp 7 | $(PackageTargetFallback);dnxcore50 8 | false 9 | false 10 | false 11 | 12 | 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/AOP/IInvocation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace YOYOFx.Extensions.DependencyInjection.AOP 6 | { 7 | //MethodInterceptor 8 | 9 | public interface IInvocation 10 | { 11 | T Proxy { set; get; } 12 | } 13 | 14 | public interface IInvocation 15 | { 16 | T Proxy { set; get; } 17 | P Interceptor { set; get; } 18 | } 19 | 20 | 21 | public class InvocationProxy : IInvocation 22 | { 23 | public InvocationProxy(TProxy instance) 24 | { 25 | this.Proxy = instance; 26 | } 27 | 28 | public TProxy Proxy { set; get; } 29 | } 30 | 31 | 32 | public class InvocationProxy : IInvocation where TInterceptor : IMethodInterceptor 33 | { 34 | public InvocationProxy(TProxy instance, TInterceptor interceptor) 35 | { 36 | this.Proxy = instance; 37 | this.Interceptor = interceptor; 38 | } 39 | 40 | public TProxy Proxy { set; get; } 41 | public TInterceptor Interceptor { set; get; } 42 | } 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/obj/YOYOFx.Boot.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | D:\Sources\YOYOFx\YOYOFx\Boot\YOYOFx.Boot\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\zlhxd\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.5.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | -------------------------------------------------------------------------------- /Backup/Hosts/NET451OwinHost/NET451_Core_OwinHost.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 2a95d887-145d-4a7a-845a-92d1f82b1241 11 | NET451OwinHost 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Backup/Tests/Tests.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0.25420 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 1a09cddb-976a-400d-b07f-bcf8edd87ef1 10 | Tests 11 | .\obj 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/netstandard2.0/YOYOFx.Extensions.DependencyInjection.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("YOYOFx.Extensions.DependencyInjection")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("YOYOFx.Extensions.DependencyInjection")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("YOYOFx.Extensions.DependencyInjection")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("2.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.Extensions.DI/YOYO.Extensions.DI.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 25b798c2-92d0-4e17-8b8d-a1052591d96c 11 | YOYO.Extensions.DI 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Backup/Native/LibCaptchaImageWarp/LibCaptchaImageWarp.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 12987f35-1810-48b4-afaa-d9990bc5b982 11 | CaptchaImageCore 12 | .\obj 13 | .\bin\ 14 | v4.5.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Mvc/YOYO.AspNetCore.Mvc.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 217921f0-0dfc-42b1-90be-d29bc85998c9 11 | YOYO.AspNetCore.Mvc 12 | .\obj 13 | .\bin\ 14 | v4.6.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/XUnitTestProject1.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Owin/YOYO.AspNetCore.Owin.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 68bce77c-b1b7-4c13-bdf6-30694d622572 11 | YOYO.AspNetCore.Owin 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/AOP/InvocationProxyFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace YOYOFx.Extensions.DependencyInjection.AOP 6 | { 7 | public class InvocationProxyFactory 8 | { 9 | public static object CreateInvocation(Type serviceType,object target) 10 | { 11 | Type invocationType = typeof(InvocationProxy<>); 12 | Type[] GenericTypeArgs = { serviceType }; 13 | var invocationGenericType = invocationType.MakeGenericType(GenericTypeArgs); 14 | object result = Activator.CreateInstance(invocationGenericType,target); 15 | return result; 16 | } 17 | 18 | 19 | public static object CreateInvocationWithInterceptor(Type serviceType, object target, IMethodInterceptor interceptor) 20 | { 21 | Type invocationType = typeof(InvocationProxy<,>); 22 | Type[] GenericTypeArgs = { serviceType , interceptor.GetType() }; 23 | var invocationGenericType = invocationType.MakeGenericType(GenericTypeArgs); 24 | object result = Activator.CreateInstance(invocationGenericType, target, interceptor); 25 | return result; 26 | } 27 | 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.Builder/YOYO.AspNetCore.Builder.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 8c84e088-328b-484c-b558-b67ff612ef17 11 | YOYO.AspNetCore.Builder 12 | .\obj 13 | .\bin\ 14 | v4.5.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/obj/YOYOFx.Extensions.Utils.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.Utils\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\zlhxd\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.5.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYO.Extensions.DI.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\zlhxd\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.4.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYOFx.Extensions.DI.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\zlhxd\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.4.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | -------------------------------------------------------------------------------- /Backup/AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/YOYO.AspNetCore.ViewEngine.Razor.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 286ac8a2-db3b-48b1-8bf3-b0066527520a 11 | YOYO.AspNetCore.ViewEngine.Razor 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/Pipeline/MiddleWareDelegateComponent.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 YOYO.Owin.Pipeline 8 | { 9 | using Env = IDictionary; 10 | 11 | 12 | using SetupAction = Action< // 13 | IDictionary // owin host environment 14 | >; 15 | 16 | 17 | internal class MiddleWareDelegateComponent : IPipelineComponent 18 | { 19 | private readonly MiddlewareFunc _middleware; 20 | private readonly SetupAction _setup; 21 | private AppFunc _next; 22 | 23 | public MiddleWareDelegateComponent(MiddlewareFunc middleware, SetupAction setup = null) 24 | { 25 | _middleware = middleware; 26 | _setup = setup; 27 | } 28 | 29 | public void Connect(AppFunc next) 30 | { 31 | _next = next; 32 | } 33 | 34 | public Task Execute(Env requestEnvironment) 35 | { 36 | return _middleware(requestEnvironment,_next); 37 | } 38 | 39 | public void Setup(Env hostEnvironment) 40 | { 41 | if (_setup != null) 42 | _setup(hostEnvironment); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ResponseProcessor/ResponseProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | 9 | namespace YOYO.Mvc.ResponseProcessor 10 | { 11 | internal abstract class ResponseProcessor : IResponseProcessor 12 | { 13 | protected string ContentType { set; get; } 14 | 15 | protected IOwinContext _context; 16 | internal ResponseProcessor(IOwinContext context) 17 | { 18 | _context = context; 19 | } 20 | 21 | public abstract bool CanProcess(); 22 | 23 | 24 | public async Task ProcessAsync(object model) 25 | { 26 | string rawData = GetRawDataString(model); 27 | 28 | if (!string.IsNullOrEmpty(rawData)) 29 | { 30 | _context.Response.Status = Status.Is.OK; 31 | } 32 | else 33 | { 34 | _context.Response.Status = Status.Is.NotFound; 35 | } 36 | _context.Response.Headers.ContentType = this.ContentType; 37 | await _context.Response.WriteAsync(rawData); 38 | } 39 | 40 | public abstract string GetRawDataString(object model); 41 | 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/YOYOFx.Extensions.DependencyInjection.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYOFx.Extensions.DependencyInjection\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\zlhxd\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.5.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | -------------------------------------------------------------------------------- /Backup/Hosts/CoreHost/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.App": { 4 | "version": "1.0.0-*", 5 | "type": "platform" 6 | }, 7 | "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", 8 | "Microsoft.AspNetCore.StaticFiles": "1.0.0-*", 9 | "Microsoft.AspNetCore.Owin": "1.0.0-*", 10 | "YOYO.AspNetCore.Builder": "0.1.3-*", 11 | "YOYO.AspNetCore.ViewEngine.Razor": "0.1.3-*", 12 | "YOYO.AspNetCore.Mvc": "0.1.3-*", 13 | "YOYO.AspNetCore.Owin": "0.1.3-*", 14 | "LibCaptchaImageWarp": "1.0.0-*", 15 | "YOYO.Extensions.DI": "1.0.0-*" 16 | }, 17 | "frameworks": { 18 | "netcoreapp1.0": { 19 | "imports": [ "dnxcore50" ] 20 | } 21 | }, 22 | 23 | "buildOptions": { 24 | "emitEntryPoint": true, 25 | "preserveCompilationContext": true, 26 | "copyToOutput": [ 27 | "Views/*.*", 28 | "web.config" 29 | ] 30 | ,"debugType": "portable" 31 | }, 32 | 33 | "runtimeOptions": { 34 | "gcServer": true 35 | }, 36 | 37 | "publishOptions": { 38 | "include": [ 39 | "wwwroot", 40 | "Views", 41 | "web.config" 42 | ] 43 | }, 44 | 45 | "runtimes": { 46 | "win7-x64": { }, 47 | "win7-x86": { }, 48 | "osx.10.10-x64": { }, 49 | "osx.10.11-x64": { }, 50 | "ubuntu.14.04-x64": { } 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj/Debug/net451/YOYO.Extensions.DI.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\net451\YOYO.Extensions.DI.dll 2 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\net451\YOYO.Extensions.DI.pdb 3 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\net451\Microsoft.Extensions.DependencyInjection.dll 4 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\net451\Microsoft.Extensions.DependencyInjection.Abstractions.dll 5 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\bin\Debug\net451\System.Runtime.InteropServices.RuntimeInformation.dll 6 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\net451\YOYO.Extensions.DI.csproj.CoreCompileInputs.cache 7 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\net451\YOYO.Extensions.DI.AssemblyInfo.cs 8 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\net451\YOYO.Extensions.DI.dll 9 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\net451\YOYO.Extensions.DI.pdb 10 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\net451\YOYO.Extensions.DI.csprojResolveAssemblyReference.cache 11 | D:\Sources\YOYOFx\YOYOFx\AspNetCore\YOYO.Extensions.DI\obj\Debug\net451\YOYO.Extensions.DI.AssemblyInfoInputs.cache 12 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ResponseProcessor/TextResponseProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc.ResponseProcessor 9 | { 10 | internal class TextResponseProcessor : ResponseProcessor, IResponseProcessor 11 | { 12 | internal TextResponseProcessor(IOwinContext context) : base(context) { 13 | ContentType = "text/plain"; 14 | } 15 | 16 | public override bool CanProcess() 17 | { 18 | string contentType = _context.Request.Headers.ContentType; 19 | char splitChar = ';'; 20 | if (string.IsNullOrEmpty(contentType)) 21 | { 22 | contentType = _context.Request.Headers.Accept; 23 | splitChar = ','; 24 | } 25 | 26 | if (string.IsNullOrEmpty(contentType)) 27 | return false; 28 | 29 | var contentMimeType = contentType.Split(splitChar)[0]; 30 | 31 | return contentMimeType.Equals("text/plain", StringComparison.OrdinalIgnoreCase); 32 | } 33 | 34 | public override string GetRawDataString(object model) 35 | { 36 | return model != null ? model.ToString() : string.Empty; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/DefaultBootstrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc.ActionRuntime; 7 | 8 | namespace YOYO.Mvc 9 | { 10 | public class DefaultBootstrapper : IYOYOBootstrapper 11 | { 12 | public DefaultBootstrapper() 13 | { 14 | RuntimeManager = new ActionRuntimeManager(); 15 | } 16 | 17 | 18 | public ActionRuntimeManager RuntimeManager { private set; get; } 19 | public virtual void Initialise() 20 | { 21 | ApplicationAssemblyLoader.ResolveAssembly(this.GetRootPath()); 22 | RuntimeManager.LoadRuntimeFileSystem(this.GetRootPath()); 23 | ViewEngineFactory.LoadViewEngine(); 24 | } 25 | 26 | public virtual Task InitialiseAsync() 27 | { 28 | return Task.Factory.StartNew(() => Initialise()); 29 | } 30 | 31 | 32 | public virtual string GetRootPath() 33 | { 34 | return HostingEnvronment.GetRootPath(); 35 | } 36 | 37 | public IEnumerable ViewEngines 38 | { 39 | get 40 | { 41 | return ApplicationAssemblyLoader.TypesOf(typeof(IViewEngine)); 42 | } 43 | 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Builder/YOYO.AspNetCore.Builder.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0.1.3 5 | netstandard1.6;net451 6 | portable 7 | YOYO.AspNetCore.Builder 8 | YOYO.AspNetCore.Builder 9 | false 10 | false 11 | false 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Session/SessionsStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections.Concurrent; 7 | 8 | namespace YOYO.Mvc.Session 9 | { 10 | internal class SessionsStore 11 | { 12 | private IDictionary sessionStore = new ConcurrentDictionary(); 13 | 14 | internal CookieSession GetSession(string sessionid) 15 | { 16 | CookieSession session = null; 17 | 18 | sessionStore.TryGetValue(sessionid,out session); 19 | 20 | return session; 21 | } 22 | 23 | internal void SetSession(string id, CookieSession session) 24 | { 25 | if (sessionStore.ContainsKey(id)) 26 | sessionStore[id] = session; 27 | else 28 | sessionStore.Add(id, session); 29 | } 30 | 31 | internal void RecoverSession(Func recoverFunc) 32 | { 33 | var sessionIds = sessionStore.Keys.ToArray(); 34 | 35 | foreach(var sessionid in sessionIds) 36 | { 37 | if(recoverFunc(sessionid, GetSession(sessionid) )) 38 | { 39 | sessionStore.Remove(sessionid); 40 | } 41 | } 42 | } 43 | 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Backup/Hosts/CoreHost/CoreAppHost.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 254af020-1d6e-4ede-927f-58720f6fe9b7 11 | CoreHost 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Controller.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc.Session; 7 | using YOYO.Owin; 8 | 9 | namespace YOYO.Mvc 10 | { 11 | public class Controller 12 | { 13 | protected IOwinContext Context { set; get; } 14 | internal void SetHttpContext(IOwinContext context) 15 | { 16 | this.Context = context; 17 | } 18 | private DynamicDictionary _viewBag = new DynamicDictionary(); 19 | protected dynamic ViewBag { 20 | get 21 | { 22 | return _viewBag; 23 | } 24 | } 25 | 26 | 27 | protected View View(string mapPath , dynamic model) 28 | { 29 | return new View(mapPath) { 30 | ControllerName = this.GetType().Name , Model = model , ViewBag = this._viewBag 31 | }; 32 | } 33 | 34 | 35 | protected View View(string mapPath) 36 | { 37 | 38 | return new View(mapPath) { ControllerName = this.GetType().Name, Model = null , ViewBag = _viewBag }; 39 | 40 | } 41 | 42 | 43 | protected dynamic Redirect(string location) 44 | { 45 | this.Context.Response.Redirect(location); 46 | return null; 47 | } 48 | 49 | protected ISession Session { 50 | get { 51 | return Context.Items["session"] as ISession; 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IOwinRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Security.Principal; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace YOYO.Owin 10 | { 11 | public interface IOwinRequest 12 | { 13 | 14 | /// 15 | /// Gets the input body stream. 16 | /// 17 | Stream Body { get; } 18 | 19 | IFormData Form{ get; set; } 20 | 21 | /// 22 | /// Gets the URL. 23 | /// 24 | Uri FullUri { get; } 25 | 26 | /// 27 | /// Gets the request headers. 28 | /// 29 | IRequestHeaders Headers { get; } 30 | 31 | /// 32 | /// Gets the HTTP method. 33 | /// 34 | string Method { get; } 35 | 36 | string Path { get; } 37 | 38 | string PathBase { get; } 39 | 40 | string Protocol { get; } 41 | 42 | /// 43 | /// Gets the query string. 44 | /// 45 | QueryString QueryString { get; } 46 | 47 | string Scheme { get; } 48 | 49 | IPrincipal User { get; set; } 50 | 51 | string this[string key] { get; } 52 | IDictionary RouteValues{set; get; } 53 | 54 | void SetEnvironmentValue(string key, T value); 55 | T GetEnvironmentValue(string key); 56 | 57 | RequestCookieCollection Cookie { get; } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Owin/OwinMiddleware.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc.Route; 7 | using YOYO.Owin; 8 | using YOYO.Owin.Pipeline; 9 | 10 | namespace YOYO.Mvc.Owin 11 | { 12 | public class YOYOFxOwinMiddleware : PipelineComponent 13 | { 14 | 15 | public override async Task Invoke(IOwinContext context, AppFunc next) 16 | { 17 | IRouteBuilder builder = RouteBuilder.Builder; 18 | var route = builder.Resolve(context.Request); 19 | if (route != null) 20 | { 21 | IRouteHandler handler = RouteHandlerFactory.Default.CreateRouteHandler(context, route); 22 | 23 | try 24 | { 25 | await handler.ProcessAsync(context, context.CancellationToken).ConfigureAwait(false); 26 | } 27 | catch (Exception ex) 28 | { 29 | context.Response.Status = Status.Is.InternalServerError; 30 | string message = string.Format("Error Message: {0} {1} StackTrace: {2}", 31 | ex.Message, Environment.NewLine, ex.StackTrace); 32 | 33 | context.Response.Headers.ContentType = "text/html; charset=UTF-8"; 34 | await context.Response.WriteAsync(message); 35 | } 36 | } 37 | if(next!=null) 38 | await next(context.Environment); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /AspNetCore/YOYO.AspNetCore.Builder/bin/ 6 | /AspNetCore/YOYO.AspNetCore.Builder/obj/ 7 | /AspNetCore/YOYO.AspNetCore.Mvc/bin/ 8 | /AspNetCore/YOYO.AspNetCore.Mvc/obj/ 9 | /AspNetCore/YOYO.AspNetCore.Owin/bin/ 10 | /AspNetCore/YOYO.AspNetCore.Owin/obj/ 11 | /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/bin/ 12 | /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/obj/ 13 | /AspNetCore/YOYO.Extensions.DI/bin/ 14 | /AspNetCore/YOYO.Extensions.DI/obj/ 15 | /AspNetCore/YOYOFx.Extensions.DependencyInjection/bin 16 | /AspNetCore/YOYOFx.Extensions.DependencyInjection/obj 17 | /Boot/YOYOFx.Boot/bin 18 | /Boot/YOYOFx.Boot/obj 19 | 20 | /Hosts/CoreHost/bin/ 21 | /Hosts/CoreHost/obj/ 22 | /Hosts/NET451OwinHost/bin/ 23 | /Hosts/NET451OwinHost/obj/ 24 | /Native/LibCaptchaImage/Debug/ 25 | /Native/LibCaptchaImage/x64/ 26 | /Native/LibCaptchaImageWarp/bin/ 27 | /Native/LibCaptchaImageWarp/obj/ 28 | /OldProjects/YOYO.ActionRuntime.Python/obj/ 29 | /OldProjects/YOYO.NUnitTest/obj/ 30 | /ORM/ExtendPropertyLib/bin/ 31 | /ORM/ExtendPropertyLib/obj/ 32 | /ORM/MaxZhang.EasyEntities.Persistence/bin/ 33 | /ORM/MaxZhang.EasyEntities.Persistence/obj/ 34 | /ORM/YGC/bin/ 35 | /ORM/YGC/obj/ 36 | /Tests/bin/ 37 | /Tests/obj/ 38 | /x64/ 39 | /YOYOFx.VC.db 40 | /.vs/ 41 | /.vscode/ 42 | /packages 43 | /YOYOFx.VC.VC.opendb 44 | /YOYOFx.ConsoleSample/bin/ 45 | /YOYOFx.ConsoleSample/obj 46 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/Pipeline/PipelineComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | using YOYO.Owin.Helper; 8 | 9 | namespace YOYO.Owin.Pipeline 10 | { 11 | using Env = IDictionary; 12 | //using AppFunc = Func< // 13 | // IDictionary, // owin request environment 14 | // Task // completion signal 15 | // >; 16 | 17 | using SetupAction = Action< // 18 | IDictionary // owin host environment 19 | >; 20 | 21 | 22 | public abstract class PipelineComponent : IPipelineComponent 23 | { 24 | private readonly SetupAction _setup; 25 | private AppFunc _next; 26 | 27 | public void Connect(AppFunc next) 28 | { 29 | _next = next; 30 | } 31 | 32 | public async Task Execute(Env requestEnvironment) 33 | { 34 | IOwinContext context = await OwinContext.GetContextAsync(requestEnvironment); 35 | try 36 | { 37 | await Invoke(context, _next); 38 | } 39 | catch 40 | { 41 | await _next(requestEnvironment); 42 | } 43 | 44 | } 45 | 46 | public void Setup(Env hostEnvironment) 47 | { 48 | if (_setup != null) 49 | _setup(hostEnvironment); 50 | } 51 | 52 | 53 | public abstract Task Invoke(IOwinContext context, AppFunc next); 54 | 55 | 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/bin/Debug/netstandard2.0/YOYOFx.Boot.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETStandard,Version=v2.0/", 4 | "signature": "2468f8819b4e290b1a8667020137de51bd83af19" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETStandard,Version=v2.0": {}, 9 | ".NETStandard,Version=v2.0/": { 10 | "YOYOFx.Boot/1.0.0": { 11 | "dependencies": { 12 | "NETStandard.Library": "2.0.1" 13 | }, 14 | "runtime": { 15 | "YOYOFx.Boot.dll": {} 16 | } 17 | }, 18 | "Microsoft.NETCore.Platforms/1.1.0": {}, 19 | "NETStandard.Library/2.0.1": { 20 | "dependencies": { 21 | "Microsoft.NETCore.Platforms": "1.1.0" 22 | } 23 | } 24 | } 25 | }, 26 | "libraries": { 27 | "YOYOFx.Boot/1.0.0": { 28 | "type": "project", 29 | "serviceable": false, 30 | "sha512": "" 31 | }, 32 | "Microsoft.NETCore.Platforms/1.1.0": { 33 | "type": "package", 34 | "serviceable": true, 35 | "sha512": "sha512-PpxMCnvd89UIVD5ybHqwTJ+8/K+DrLSdUCM8d49gaUx/qppZkA9O7HMDkvfi8nq24NtBXuj90ZN8VMFk9ZpKnQ==", 36 | "path": "microsoft.netcore.platforms/1.1.0", 37 | "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" 38 | }, 39 | "NETStandard.Library/2.0.1": { 40 | "type": "package", 41 | "serviceable": true, 42 | "sha512": "sha512-oA6nwv9MhEKYvLpjZ0ggSpb1g4CQViDVQjLUcDWg598jtvJbpfeP2reqwI1GLW2TbxC/Ml7xL6BBR1HmKPXlTg==", 43 | "path": "netstandard.library/2.0.1", 44 | "hashPath": "netstandard.library.2.0.1.nupkg.sha512" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/Filters/TimeStampEncryptAttribute.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 YOYO.Mvc.Filters 8 | { 9 | public class TimeStampEncryptAttribute : YOYO.Mvc.ActionFilterAttribute 10 | { 11 | public override bool OnActionExecuting(ActionExecuteContext context) 12 | { 13 | string timestampString = context.HttpContext.Request["timestamp"]; 14 | if (!string.IsNullOrEmpty(timestampString)) 15 | { 16 | double timestamp; 17 | if (!double.TryParse(timestampString, out timestamp)) 18 | return false; 19 | 20 | 21 | var requestDateTime = UnixTimeStampToDateTime(timestamp); 22 | 23 | var time = DateTime.Now.Subtract(requestDateTime); 24 | 25 | if (time.TotalMinutes > 0 && time.TotalMinutes < 2) 26 | return true; 27 | else 28 | return false; 29 | } 30 | else 31 | { 32 | return false; 33 | } 34 | } 35 | 36 | 37 | private static DateTime UnixTimeStampToDateTime(double unixTimeStamp) 38 | { 39 | // Unix timestamp is seconds past epoch 40 | System.DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); 41 | dtDateTime = dtDateTime.AddMilliseconds(unixTimeStamp).ToLocalTime(); 42 | return dtDateTime; 43 | } 44 | 45 | 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/IPostedFile.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace YOYO.Owin 4 | { 5 | /// 6 | /// Represents a file uploaded over HTTP. 7 | /// 8 | public interface IPostedFile 9 | { 10 | /// 11 | /// Gets the size of an uploaded file, in bytes. 12 | /// 13 | /// 14 | /// The file length, in bytes. 15 | /// 16 | int ContentLength { get; } 17 | 18 | /// 19 | /// Gets the MIME content type of a file sent by a client. 20 | /// 21 | /// 22 | /// The MIME content type of the uploaded file. 23 | /// 24 | string ContentType { get; } 25 | 26 | /// 27 | /// Gets the field name this file is associated with within the form. 28 | /// 29 | string FieldName { get; } 30 | 31 | /// 32 | /// Gets the fully qualified name of the file on the client. 33 | /// 34 | /// 35 | /// The name of the client's file, including the directory path. 36 | /// 37 | string FileName { get; } 38 | 39 | /// 40 | /// Gets a object that points to an uploaded file to prepare for reading the contents of the file. 41 | /// 42 | /// 43 | /// A pointing to a file. 44 | /// 45 | Stream InputStream { get; } 46 | 47 | //todo: Support ContentRange 48 | } 49 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ResponseProcessor/ResponseProcessorFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | 8 | namespace YOYO.Mvc.ResponseProcessor 9 | { 10 | internal class ResponseProcessorFactory 11 | { 12 | internal static IResponseProcessor GetResponseProcessor(IOwinContext context) 13 | { 14 | IResponseProcessor responseProcessor = null; 15 | 16 | //get formater 17 | var createProcessors = CreateProcessorsFunc(); 18 | var processorList = createProcessors(context); 19 | foreach(var processor in processorList) 20 | { 21 | if(processor.CanProcess()) 22 | { 23 | responseProcessor = processor; 24 | break; 25 | } 26 | 27 | } 28 | return responseProcessor; 29 | 30 | } 31 | 32 | /// 33 | /// get formater,一般只处理 34 | /// 35 | /// 36 | private static Func> CreateProcessorsFunc() 37 | { 38 | return _ => 39 | { 40 | return new List() 41 | { 42 | new JsonResponseProcessor( _ ), 43 | new XmlResponseProcessor( _ ), 44 | new TextResponseProcessor( _ ), 45 | new ViewResponseProcessor( _ ) 46 | }; 47 | }; 48 | } 49 | 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/RenderTemplateContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using YOYO.Mvc; 7 | 8 | namespace YOYO.AspNetCore.ViewEngine.Razor 9 | { 10 | public class RenderTemplateContext : IDisposable 11 | { 12 | public RenderTemplateContext() 13 | { 14 | IsRenderLayout = false; 15 | Writer = new StringWriter(); 16 | } 17 | 18 | public Type ModelType { set; get; } 19 | public object Model { set; get; } 20 | 21 | public DynamicDictionary ViewBag { set; get; } 22 | 23 | 24 | public bool IsRenderLayout { set; get; } 25 | 26 | 27 | public string Result { 28 | set;get; 29 | } 30 | 31 | 32 | public override string ToString() 33 | { 34 | return Result; 35 | } 36 | 37 | 38 | 39 | public TextWriter Writer { set; get; } 40 | 41 | 42 | public string TemplateName { set; get; } 43 | 44 | public string Path { set; get; } 45 | 46 | public CodeGenerateResult GenerateResult { set; get; } 47 | 48 | public CompileResult BuildResult { set; get; } 49 | 50 | 51 | public void Dispose() 52 | { 53 | 54 | this.Writer.Flush(); 55 | this.Writer.Dispose(); 56 | this.Writer = null; 57 | this.Model = null; 58 | this.ViewBag = null; 59 | this.Result = null; 60 | this.IsRenderLayout = false; 61 | this.ModelType = null; 62 | 63 | } 64 | 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/bin/Debug/netstandard2.0/YOYOFx.Extensions.Utils.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETStandard,Version=v2.0/", 4 | "signature": "2468f8819b4e290b1a8667020137de51bd83af19" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETStandard,Version=v2.0": {}, 9 | ".NETStandard,Version=v2.0/": { 10 | "YOYOFx.Extensions.Utils/1.0.0": { 11 | "dependencies": { 12 | "NETStandard.Library": "2.0.1" 13 | }, 14 | "runtime": { 15 | "YOYOFx.Extensions.Utils.dll": {} 16 | } 17 | }, 18 | "Microsoft.NETCore.Platforms/1.1.0": {}, 19 | "NETStandard.Library/2.0.1": { 20 | "dependencies": { 21 | "Microsoft.NETCore.Platforms": "1.1.0" 22 | } 23 | } 24 | } 25 | }, 26 | "libraries": { 27 | "YOYOFx.Extensions.Utils/1.0.0": { 28 | "type": "project", 29 | "serviceable": false, 30 | "sha512": "" 31 | }, 32 | "Microsoft.NETCore.Platforms/1.1.0": { 33 | "type": "package", 34 | "serviceable": true, 35 | "sha512": "sha512-PpxMCnvd89UIVD5ybHqwTJ+8/K+DrLSdUCM8d49gaUx/qppZkA9O7HMDkvfi8nq24NtBXuj90ZN8VMFk9ZpKnQ==", 36 | "path": "microsoft.netcore.platforms/1.1.0", 37 | "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" 38 | }, 39 | "NETStandard.Library/2.0.1": { 40 | "type": "package", 41 | "serviceable": true, 42 | "sha512": "sha512-oA6nwv9MhEKYvLpjZ0ggSpb1g4CQViDVQjLUcDWg598jtvJbpfeP2reqwI1GLW2TbxC/Ml7xL6BBR1HmKPXlTg==", 43 | "path": "netstandard.library/2.0.1", 44 | "hashPath": "netstandard.library.2.0.1.nupkg.sha512" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.Utils/FastReflection/StructTuple.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 System.FastReflection 8 | { 9 | /// 10 | /// Struct type tuple 11 | /// 12 | internal struct StructTuple : IEquatable> 13 | { 14 | public TFirst First { get; private set; } 15 | public TSecond Second { get; private set; } 16 | 17 | public StructTuple(TFirst first, TSecond second) 18 | { 19 | First = first; 20 | Second = second; 21 | } 22 | 23 | public bool Equals(StructTuple obj) 24 | { 25 | return ((First == null) == (obj.First == null)) && 26 | (First == null ? true : 27 | (object.ReferenceEquals(First, obj.First) || First.Equals(obj.First))) && 28 | ((Second == null) == (obj.Second == null)) && 29 | (Second == null ? true : 30 | (object.ReferenceEquals(Second, obj.Second) || Second.Equals(obj.Second))); 31 | } 32 | 33 | public override bool Equals(object obj) 34 | { 35 | return (obj is StructTuple) && Equals((StructTuple)obj); 36 | } 37 | 38 | public override int GetHashCode() 39 | { 40 | // same with Tuple.CombineHashCodess 41 | var hash_1 = First?.GetHashCode() ?? 0; 42 | var hash_2 = Second?.GetHashCode() ?? 0; 43 | return (hash_1 << 5) + hash_1 ^ hash_2; 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/Internal/StructTuple.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 System.FastReflection 8 | { 9 | /// 10 | /// Struct type tuple 11 | /// 12 | internal struct StructTuple : IEquatable> 13 | { 14 | public TFirst First { get; private set; } 15 | public TSecond Second { get; private set; } 16 | 17 | public StructTuple(TFirst first, TSecond second) 18 | { 19 | First = first; 20 | Second = second; 21 | } 22 | 23 | public bool Equals(StructTuple obj) 24 | { 25 | return ((First == null) == (obj.First == null)) && 26 | (First == null ? true : 27 | (object.ReferenceEquals(First, obj.First) || First.Equals(obj.First))) && 28 | ((Second == null) == (obj.Second == null)) && 29 | (Second == null ? true : 30 | (object.ReferenceEquals(Second, obj.Second) || Second.Equals(obj.Second))); 31 | } 32 | 33 | public override bool Equals(object obj) 34 | { 35 | return (obj is StructTuple) && Equals((StructTuple)obj); 36 | } 37 | 38 | public override int GetHashCode() 39 | { 40 | // same with Tuple.CombineHashCodess 41 | var hash_1 = First?.GetHashCode() ?? 0; 42 | var hash_2 = Second?.GetHashCode() ?? 0; 43 | return (hash_1 << 5) + hash_1 ^ hash_2; 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionRuntime/ActionRuntimeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections; 7 | using System.Collections.Concurrent; 8 | 9 | namespace YOYO.Mvc.ActionRuntime 10 | { 11 | public class ActionRuntimeManager: IDisposable 12 | { 13 | IDictionary ca = new ConcurrentDictionary(); 14 | 15 | 16 | public ActionRuntimeManager() 17 | { 18 | RuntimeProviders = new List(); 19 | //RuntimeProviders.Add(new DotnetActionRuntimeProvider()); 20 | } 21 | 22 | public List RuntimeProviders { private set; get; } 23 | 24 | public IActionRuntimeProvider FindRuntimeByName(string name) 25 | { 26 | IActionRuntimeProvider provider = null; 27 | ca.TryGetValue (name, out provider); 28 | return provider; 29 | } 30 | 31 | 32 | public void LoadRuntimeFileSystem(string path) 33 | { 34 | var providerTypes = ApplicationAssemblyLoader.TypesOf(typeof(IActionRuntimeProvider)); 35 | 36 | foreach (var ptype in providerTypes) 37 | RuntimeProviders.Add( (IActionRuntimeProvider)Activator.CreateInstance(ptype) ); 38 | 39 | foreach (var runtime in RuntimeProviders) 40 | { 41 | runtime.LoadRuntime(path); 42 | foreach (string controllerName in runtime.GetControllerNames()) { 43 | ca.Add (controllerName, runtime); 44 | } 45 | 46 | } 47 | 48 | } 49 | 50 | 51 | public void Dispose () 52 | { 53 | ca.Clear (); 54 | } 55 | 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/Debug/netcoreapp2.0/XUnitTestProject1.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll 2 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\xunit.runner.utility.netstandard15.dll 3 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\xunit.runner.reporters.netstandard15.dll 4 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\XUnitTestProject1.deps.json 5 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\XUnitTestProject1.runtimeconfig.json 6 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\XUnitTestProject1.runtimeconfig.dev.json 7 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\XUnitTestProject1.dll 8 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\XUnitTestProject1.pdb 9 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\Debug\netcoreapp2.0\XUnitTestProject1.csprojResolveAssemblyReference.cache 10 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\Debug\netcoreapp2.0\XUnitTestProject1.csproj.CoreCompileInputs.cache 11 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\Debug\netcoreapp2.0\XUnitTestProject1.AssemblyInfoInputs.cache 12 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\Debug\netcoreapp2.0\XUnitTestProject1.AssemblyInfo.cs 13 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\Debug\netcoreapp2.0\XUnitTestProject1.dll 14 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\Debug\netcoreapp2.0\XUnitTestProject1.pdb 15 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\YOYOFx.Extensions.DependencyInjection.dll 16 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\bin\Debug\netcoreapp2.0\YOYOFx.Extensions.DependencyInjection.pdb 17 | -------------------------------------------------------------------------------- /Native/LibCaptchaImage/LibCaptchaImage.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ResponseProcessor/JsonResponseProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using YOYO.Owin; 7 | using Newtonsoft.Json; 8 | 9 | namespace YOYO.Mvc.ResponseProcessor 10 | { 11 | internal class JsonResponseProcessor : ResponseProcessor , IResponseProcessor 12 | { 13 | internal JsonResponseProcessor(IOwinContext context):base(context) 14 | { 15 | ContentType = @"application/json"; 16 | } 17 | 18 | 19 | 20 | 21 | public override bool CanProcess() 22 | { 23 | 24 | string contentType = _context.Request.Headers.ContentType; 25 | char splitChar = ';'; 26 | if (string.IsNullOrEmpty(contentType)) 27 | { 28 | contentType = _context.Request.Headers.Accept; 29 | splitChar = ','; 30 | } 31 | 32 | if (string.IsNullOrEmpty(contentType)) 33 | return false; 34 | 35 | var contentMimeType = contentType.Split(splitChar)[0]; 36 | 37 | return contentMimeType.Equals("application/json", StringComparison.OrdinalIgnoreCase) || 38 | contentMimeType.StartsWith("application/json-", StringComparison.OrdinalIgnoreCase) || 39 | contentMimeType.Equals("text/json", StringComparison.OrdinalIgnoreCase) || 40 | (contentMimeType.StartsWith("application/vnd", StringComparison.OrdinalIgnoreCase) && 41 | contentMimeType.EndsWith("+json", StringComparison.OrdinalIgnoreCase)); 42 | } 43 | 44 | public override string GetRawDataString(object model) 45 | { 46 | return JsonConvert.SerializeObject(model); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/RequestCookieCollection.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 YOYO.Owin 8 | { 9 | public class RequestCookieCollection : IEnumerable> 10 | { 11 | /// 12 | /// Create a new wrapper 13 | /// 14 | /// 15 | public RequestCookieCollection(IDictionary store) 16 | { 17 | if (store == null) 18 | { 19 | throw new ArgumentNullException("store"); 20 | } 21 | 22 | Store = store; 23 | } 24 | 25 | private IDictionary Store { get; set; } 26 | 27 | /// 28 | /// Returns null rather than throwing KeyNotFoundException 29 | /// 30 | /// 31 | /// 32 | public string this[string key] 33 | { 34 | get 35 | { 36 | string value; 37 | Store.TryGetValue(key, out value); 38 | return value; 39 | } 40 | } 41 | 42 | /// 43 | /// 44 | /// 45 | /// 46 | public IEnumerator> GetEnumerator() 47 | { 48 | return Store.GetEnumerator(); 49 | } 50 | 51 | /// 52 | /// 53 | /// 54 | /// 55 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() 56 | { 57 | return GetEnumerator(); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ActionRuntime/ActionRuntimeParameter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using YOYO.Owin; 8 | using YOYO.Mvc.Extensions; 9 | 10 | namespace YOYO.Mvc.ActionRuntime 11 | { 12 | public class ActionRuntimeParameter 13 | { 14 | public string Name { set; get; } 15 | public Type ParameterType { set; get; } 16 | 17 | 18 | public static List GetValuesByRequest(List parameters , IOwinRequest request) 19 | { 20 | int pindex = 0; 21 | //返回值 22 | List pv = new List(); 23 | var routeValues = request.RouteValues.Values.ToList(); 24 | 25 | foreach(var p in parameters) 26 | { 27 | //get type default value 28 | object pvItem = p.ParameterType.GetTypeDefaultValue(); 29 | 30 | var requestValue = request[p.Name]; 31 | if(!string.IsNullOrEmpty(requestValue)) 32 | pvItem = Convert.ChangeType(requestValue, p.ParameterType); 33 | else 34 | { 35 | if (routeValues.Count > pindex){ 36 | string routeValue = request.RouteValues.Values.ToList()[pindex]; 37 | pvItem = Convert.ChangeType(routeValue, p.ParameterType); 38 | pindex++; 39 | } 40 | } 41 | 42 | pv.Add(pvItem); 43 | 44 | } 45 | 46 | if (parameters.Count != pv.Count) 47 | throw new NotSupportedException("请求地址与Action参数不匹配!"); 48 | 49 | if (pv.Count == 0) 50 | pv.Add(null); 51 | 52 | return pv; 53 | } 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/CookieOptions.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 YOYO.Owin 8 | { 9 | /// 10 | /// Options used to create a new cookie. 11 | /// 12 | public class CookieOptions 13 | { 14 | /// 15 | /// Creates a default cookie with a path of '/'. 16 | /// 17 | public CookieOptions() 18 | { 19 | Path = "/"; 20 | } 21 | 22 | /// 23 | /// Gets or sets the domain to associate the cookie with. 24 | /// 25 | /// The domain to associate the cookie with. 26 | public string Domain { get; set; } 27 | 28 | /// 29 | /// Gets or sets the cookie path. 30 | /// 31 | /// The cookie path. 32 | public string Path { get; set; } 33 | 34 | /// 35 | /// Gets or sets the expiration date and time for the cookie. 36 | /// 37 | /// The expiration date and time for the cookie. 38 | public DateTime? Expires { get; set; } 39 | 40 | /// 41 | /// Gets or sets a value that indicates whether to transmit the cookie using Secure Sockets Layer (SSL)�that is, over HTTPS only. 42 | /// 43 | /// true to transmit the cookie only over an SSL connection (HTTPS); otherwise, false. 44 | public bool Secure { get; set; } 45 | 46 | /// 47 | /// Gets or sets a value that indicates whether a cookie is accessible by client-side script. 48 | /// 49 | /// true if a cookie is accessible by client-side script; otherwise, false. 50 | public bool HttpOnly { get; set; } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/YOYO.AspNetCore.ViewEngine.Razor.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0.1.3 5 | netstandard1.6;net451 6 | portable 7 | YOYO.AspNetCore.ViewEngine.Razor 8 | YOYO.AspNetCore.ViewEngine.Razor 9 | $(PackageTargetFallback);portable-net451+win8 10 | false 11 | false 12 | false 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/ResponseProcessor/XmlResponseProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Xml.Serialization; 8 | using YOYO.Owin; 9 | 10 | namespace YOYO.Mvc.ResponseProcessor 11 | { 12 | internal class XmlResponseProcessor : ResponseProcessor , IResponseProcessor 13 | { 14 | internal XmlResponseProcessor(IOwinContext context):base(context) 15 | { 16 | ContentType = "application/xml"; 17 | } 18 | 19 | public override bool CanProcess() 20 | { 21 | 22 | string contentType = _context.Request.Headers.ContentType; 23 | char splitChar = ';'; 24 | if (string.IsNullOrEmpty(contentType)) 25 | { 26 | contentType = _context.Request.Headers.Accept; 27 | splitChar = ','; 28 | } 29 | 30 | if (string.IsNullOrEmpty(contentType)) 31 | return false; 32 | 33 | var contentMimeType = contentType.Split(splitChar)[0]; 34 | 35 | return contentMimeType.Equals("application/xml", StringComparison.OrdinalIgnoreCase) || 36 | contentMimeType.Equals("text/xml", StringComparison.OrdinalIgnoreCase) || 37 | (contentMimeType.StartsWith("application/vnd", StringComparison.OrdinalIgnoreCase) && 38 | contentMimeType.EndsWith("+xml", StringComparison.OrdinalIgnoreCase)); 39 | } 40 | 41 | public override string GetRawDataString(object model) 42 | { 43 | if (model == null) return string.Empty; 44 | 45 | using (StringWriter stringwriter = new System.IO.StringWriter()) 46 | { 47 | var serializer = new XmlSerializer(model.GetType()); 48 | serializer.Serialize(stringwriter, model); 49 | return stringwriter.ToString(); 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/YOYO.AspNetCore.Mvc.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0.1.3 5 | net451;netstandard1.6 6 | portable 7 | YOYO.AspNetCore.Mvc 8 | YOYO.AspNetCore.Mvc 9 | $(PackageTargetFallback);dnxcore50 10 | false 11 | false 12 | false 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/RazorViewEngine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using YOYO.Mvc; 8 | using YOYO.Owin; 9 | 10 | namespace YOYO.AspNetCore.ViewEngine.Razor 11 | { 12 | // This project can output the Class library as a NuGet Package. 13 | // To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". 14 | public class RazorViewEngine : IViewEngine 15 | { 16 | 17 | private ITemplateService templateService = new DefaultTemplateService(); 18 | 19 | public RenderTemplateContext RenderContext { private set; get; } 20 | 21 | public string ExtensionName { get { return ".cshtml"; } } 22 | 23 | public string RenderView(YOYO.Owin.IOwinContext httpContext, string viewName, object model, DynamicDictionary viewbag) 24 | { 25 | using (var context = new RenderTemplateContext() { 26 | TemplateName = viewName, 27 | Path = httpContext.Request.Path, 28 | Model = model, 29 | ModelType = model?.GetType(), 30 | ViewBag = viewbag } ) 31 | { 32 | 33 | IRazorView view = templateService.GetTemplate(context); 34 | view.Render(); 35 | this.RenderContext = context; 36 | return context.ToString(); 37 | } 38 | } 39 | 40 | 41 | public Task RenderViewAsync(IOwinContext context, string viewName, object model, DynamicDictionary viewbag) 42 | { 43 | return Task.Factory.StartNew(() => RenderView(context, viewName, model, viewbag) ); 44 | } 45 | 46 | 47 | 48 | 49 | 50 | } 51 | 52 | 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/CodeGenerateService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Razor; 2 | using Microsoft.AspNetCore.Razor.CodeGenerators; 3 | using Microsoft.AspNetCore.Razor.Parser.Internal; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Reflection; 9 | using System.Threading.Tasks; 10 | 11 | namespace YOYO.AspNetCore.ViewEngine.Razor 12 | { 13 | public class CodeGenerateService 14 | { 15 | public GeneratorResults Generate(Type modelType,string template) 16 | { 17 | //准备临时类名,读取模板文件和Razor代码生成器 18 | string templateType = "YOYO.AspNetCore.ViewEngine.Razor.RazorViewTemplate"; 19 | 20 | string templateTypeName = modelType != null ? string.Format(templateType + @"<{0}>", modelType.FullName) : templateType; 21 | 22 | var class_name = "c" + Guid.NewGuid().ToString("N"); 23 | var host = new RazorEngineHost(new CSharpRazorCodeLanguage(), () => new HtmlMarkupParser()) 24 | { 25 | DefaultBaseClass = templateTypeName, 26 | DefaultClassName = class_name, 27 | DefaultNamespace = "YOYO.AspNetCore.ViewEngine.Razor", 28 | GeneratedClassContext = 29 | new GeneratedClassContext("Execute", "Write", "WriteLiteral", "WriteTo", 30 | "WriteLiteralTo", 31 | "RazorViewTemplate.Dynamic", new GeneratedTagHelperContext()) 32 | 33 | }; 34 | host.NamespaceImports.Add("System"); 35 | host.NamespaceImports.Add("System.Dynamic"); 36 | host.NamespaceImports.Add("System.Linq"); 37 | host.NamespaceImports.Add("System.Collections.Generic"); 38 | 39 | var engine = new RazorTemplateEngine(host); 40 | return engine.GenerateCode(new StringReader(template)); ; 41 | } 42 | 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/ServiceProviderExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | using Microsoft.Extensions.DependencyInjection; 6 | 7 | namespace YOYOFx.Extensions.DependencyInjection 8 | { 9 | public static class ServiceProviderExtensions 10 | { 11 | public static IServiceProvider BuildInjectServiceProvider(this IServiceCollection services) 12 | { 13 | return new InjectServiceProvider(services.BuildServiceProvider(),services); 14 | } 15 | 16 | 17 | 18 | public static TService GetServiceByMetadata(this IServiceProvider serviceProvider, 19 | Predicate predicate) 20 | { 21 | var serviceQuery = QueryServiceByMeatdata(serviceProvider); 22 | 23 | var service = serviceQuery.FirstOrDefault(s => predicate.Invoke(s.Metadata)); 24 | 25 | return service != null? service.Value : default(TService); 26 | } 27 | 28 | public static IEnumerable GetServicesByMetadata(this IServiceProvider serviceProvider, 29 | Predicate predicate = null) 30 | { 31 | var serviceQuery = QueryServiceByMeatdata(serviceProvider); 32 | 33 | if (predicate != null) 34 | serviceQuery = serviceQuery.Where(s => predicate.Invoke(s.Metadata)); 35 | 36 | var services = serviceQuery.Select(s=>s.Value); 37 | 38 | return services; 39 | } 40 | 41 | 42 | 43 | private static IEnumerable> QueryServiceByMeatdata(IServiceProvider serviceProvider) 44 | { 45 | var serviceQuery = (IEnumerable>) 46 | serviceProvider.GetService(typeof(IEnumerable>)); 47 | 48 | return serviceQuery; 49 | } 50 | 51 | 52 | 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/AOP/DynamicProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Text; 5 | using System.FastReflection; 6 | 7 | namespace YOYOFx.Extensions.DependencyInjection.AOP 8 | { 9 | public class DynamicProxy 10 | { 11 | public static T CreateWithInstance(T model) 12 | { 13 | var proxy = DispatchProxy.Create(); 14 | ((InvokeProxy)(object)proxy).Initialize(typeof(T), model); 15 | return proxy; 16 | } 17 | 18 | 19 | public static T Create(IServiceProvider sp) 20 | { 21 | var serviceInstance = sp.GetService(typeof(T)); 22 | var proxy = DispatchProxy.Create(); 23 | ((InvokeProxy)(object)proxy).Initialize(typeof(T), serviceInstance); 24 | return proxy; 25 | } 26 | 27 | 28 | public static T Create() 29 | { 30 | var proxy = DispatchProxy.Create(); 31 | return proxy; 32 | } 33 | 34 | public static object CreateWithInterceptor(Type serviceType, IMethodInterceptor methodInterceptor) 35 | { 36 | var proxy = Create(serviceType); 37 | ((InvokeProxy)(object)proxy).Initialize(serviceType, methodInterceptor); 38 | return proxy; 39 | } 40 | 41 | 42 | public static object Create(Type serviceType) 43 | { 44 | var genericMethodInfo = getCreateMethodByDispatchProxy(serviceType); 45 | object proxy = genericMethodInfo.FastInvoke(null, null); 46 | return proxy; 47 | } 48 | 49 | private static MethodInfo getCreateMethodByDispatchProxy(Type serviceType) 50 | { 51 | var factoryType = typeof(DispatchProxy); 52 | var methodInfo = factoryType.GetMethod("Create"); 53 | MethodInfo genericMethodInfo = methodInfo.MakeGenericMethod(serviceType, typeof(InvokeProxy)); 54 | return genericMethodInfo; 55 | } 56 | 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Mvc/FileResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using YOYO.Owin; 8 | 9 | namespace YOYO.Mvc 10 | { 11 | public class FileResult : IActionResult 12 | { 13 | private MemoryStream _fileStream; 14 | private string _fileName; 15 | private string _contentType; 16 | public FileResult(string fileName,string contentType) 17 | { 18 | this._fileName = fileName; 19 | this._contentType = contentType; 20 | } 21 | 22 | public FileResult(string fileName, string contentType,MemoryStream stream) : this(fileName,contentType) 23 | { 24 | this._fileStream = stream; 25 | } 26 | 27 | public async Task ProcessAsync(IOwinContext context) 28 | { 29 | context.Response.Headers.ContentType = _contentType; 30 | string fileName = System.IO.Path.GetFileName(this._fileName); 31 | context.Response.Headers.Add("Content-Disposition", "attachment; filename=" + fileName); 32 | 33 | if (this._fileStream == null) 34 | { 35 | using (Stream input = File.OpenRead(this._fileName)) 36 | { 37 | context.Response.Headers.ContentLength = input.Length; 38 | byte[] buffer = new byte[8192]; 39 | int bytesRead; 40 | while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0) 41 | { 42 | await context.Response.WriteAsync(buffer, buffer.Length); 43 | } 44 | 45 | } 46 | } 47 | else 48 | { 49 | long length = this._fileStream.Length; 50 | context.Response.Headers.ContentLength = length; 51 | await context.Response.WriteAsync(this._fileStream.ToArray(),(int)length); 52 | this._fileStream.Dispose(); 53 | } 54 | 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /XUnitTestProject1/obj/XUnitTestProject1.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | D:\Sources\YOYOFx\YOYOFx\XUnitTestProject1\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\zlhxd\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.5.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/QueryString.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.Concurrent; 3 | using System.Linq; 4 | using System.Text; 5 | using YOYO.Owin.Helper; 6 | 7 | namespace YOYO.Owin 8 | { 9 | public class QueryString 10 | { 11 | private readonly IDictionary _parts; 12 | 13 | public QueryString(string value) { 14 | _parts = Parse(value); 15 | } 16 | 17 | public QueryString(IDictionary parts) { 18 | _parts = parts; 19 | } 20 | 21 | 22 | public string this[string key] 23 | { 24 | get 25 | { 26 | string v = null; 27 | _parts.TryGetValue(key, out v); 28 | return v; 29 | } 30 | } 31 | 32 | 33 | public IDictionary Parts { 34 | get { return _parts; } 35 | } 36 | 37 | public override string ToString() { 38 | var query = new StringBuilder(); 39 | foreach (var part in Parts) 40 | query.AppendFormat("{0}{1}{2}&", part.Key, part.Value == string.Empty ? string.Empty : "=", UrlHelper.Encode(part.Value)); 41 | 42 | if (query.Length > 0) { 43 | query.Remove(query.Length - 1, 1); 44 | } 45 | return query.ToString(); 46 | } 47 | 48 | private static IDictionary Parse(string queryString) { 49 | if (queryString == string.Empty) { 50 | return new ConcurrentDictionary(); 51 | } 52 | var workingDictionary = new ConcurrentDictionary(); 53 | var chunks = queryString.Split('&'); 54 | foreach (var chunk in chunks) { 55 | var parts = chunk.Split('='); 56 | if (!workingDictionary.ContainsKey(parts[0])) { 57 | workingDictionary.TryAdd(parts[0], UrlHelper.Decode(parts[1])); 58 | } 59 | } 60 | return workingDictionary; 61 | } 62 | 63 | public static implicit operator QueryString(string raw) { 64 | return new QueryString(raw); 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /Boot/YOYOFx.Boot/Application.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace YOYOFx.Boot 4 | { 5 | public class Application : IApplication 6 | { 7 | private static readonly IApplication application = new Application(); 8 | 9 | public IApplication Current { get; } = application; 10 | 11 | 12 | 13 | 14 | public IApplication Configure(string[] args) 15 | { 16 | 17 | 18 | return this; 19 | } 20 | 21 | private void PrintLogo() 22 | { 23 | var sb = new System.Text.StringBuilder(698); 24 | sb.AppendLine(@" "); 25 | sb.AppendLine(@" ___ ___ ________ ___ ___ ________ ________ ___ ___ "); 26 | sb.AppendLine(@" |\ \ / /|\ __ \ |\ \ / /|\ __ \|\ _____\\ \ / /|"); 27 | sb.AppendLine(@" \ \ \/ / | \ \|\ \ \ \ \/ / | \ \|\ \ \ \__/\ \ \/ / /"); 28 | sb.AppendLine(@" \ \ / / \ \ \\\ \ \ \ / / \ \ \\\ \ \ __\\ \ / / "); 29 | sb.AppendLine(@" \/ / / \ \ \\\ \ \/ / / \ \ \\\ \ \ \_| / \/ "); 30 | sb.AppendLine(@" __/ / / \ \_______\__/ / / \ \_______\ \__\ / /\ \ "); 31 | sb.AppendLine(@" |\___/ / \|_______|\___/ / \|_______|\|__|/__/ /\ __\ "); 32 | sb.AppendLine(@" \|___|/ \|___|/ |__|/ \|__| "); 33 | sb.AppendLine(@" "); 34 | sb.AppendLine(@" :: YOYOFx Boot :: "); 35 | 36 | Console.Write(sb.ToString()); 37 | 38 | 39 | } 40 | 41 | 42 | 43 | public static void Run(Type applicationType,string[] args) 44 | { 45 | application.Configure(args); 46 | application.Start(args); 47 | 48 | //throw new NotImplementedException(); 49 | } 50 | 51 | public void Stop() 52 | { 53 | throw new NotImplementedException(); 54 | } 55 | 56 | public void Start(string[] args) 57 | { 58 | this.PrintLogo(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /AspNetCore/YOYOFx.Extensions.DependencyInjection/ServiceTypesContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using YOYOFx.Extensions.DependencyInjection.AOP; 5 | 6 | namespace YOYOFx.Extensions.DependencyInjection 7 | { 8 | internal class ServiceTypesContext 9 | { 10 | internal ServiceTypesContext(Type serviceType) 11 | { 12 | this.TypeDef = TypeDef.Object; 13 | this.RequestServiceType = serviceType; 14 | this.Build(); 15 | } 16 | 17 | /// 18 | /// 请求类型 19 | /// 20 | public Type RequestServiceType { set; get; } 21 | /// 22 | /// 请求类型的泛型 23 | /// 24 | public Type RequestGenericTypeDefinition { set; get; } 25 | /// 26 | /// 请求泛型类型的参数类型 27 | /// 28 | public Type GenericArgType { set; get; } 29 | /// 30 | /// 请求类型是否是泛型 31 | /// 32 | public bool IsGenericType { set; get; } 33 | 34 | /// 35 | /// 类型类别 36 | /// 37 | public TypeDef TypeDef { set; get; } 38 | 39 | private void Build() 40 | { 41 | if (this.RequestServiceType.IsGenericType) { 42 | this.IsGenericType = true; 43 | this.RequestGenericTypeDefinition = this.RequestServiceType.GetGenericTypeDefinition(); 44 | } 45 | 46 | if (!this.RequestServiceType.IsGenericType) { } 47 | else if (RequestGenericTypeDefinition == typeof(List<>)) 48 | { 49 | this.GenericArgType = this.RequestServiceType.GetGenericArguments()[0]; 50 | this.TypeDef = TypeDef.List; 51 | } 52 | else if (RequestGenericTypeDefinition == typeof(IEnumerable<>)) 53 | { 54 | this.GenericArgType = this.RequestServiceType.GetGenericArguments()[0]; 55 | this.TypeDef = TypeDef.IEnumerable; 56 | } 57 | else if (RequestGenericTypeDefinition == typeof(IInvocation<>) || 58 | RequestGenericTypeDefinition == typeof(IInvocation<,>)) 59 | { 60 | this.TypeDef = TypeDef.Proxy; 61 | } 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.Owin/Pipeline/Pipeline.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 YOYO.Owin.Pipeline 8 | { 9 | 10 | using Env = IDictionary; 11 | 12 | using SetupAction = Action< // 13 | IDictionary // owin host environment 14 | >; 15 | 16 | 17 | public class Pipeline : IPipeline 18 | { 19 | private readonly List _components = new List(); 20 | 21 | 22 | public static AppFunc ReturnDone 23 | { 24 | get { return environment => OwinConstants.TaskHelper.Completed(); } 25 | } 26 | 27 | public AppFunc Build() 28 | { 29 | if (_components.Count == 0) 30 | { 31 | throw new Exception("No Pipeline Components"); 32 | } 33 | var app = ReturnDone; 34 | for (int i = _components.Count - 1; i >= 0; i--) 35 | { 36 | var component = _components[i]; 37 | component.Connect(app); 38 | app = component.Execute; 39 | } 40 | return app; 41 | } 42 | 43 | 44 | 45 | public void Setup(Env hostEnvironment) 46 | { 47 | if (_components.Count == 0) 48 | { 49 | throw new Exception("No Pipeline Components"); 50 | } 51 | for (int i = 0; i < _components.Count; i++) 52 | { 53 | _components[i].Setup(hostEnvironment); 54 | } 55 | } 56 | 57 | public IPipeline Use(IPipelineComponent component) 58 | { 59 | _components.Add(component); 60 | return this; 61 | } 62 | 63 | public IPipeline Use(MiddlewareFunc middleware, SetupAction setup = null) 64 | { 65 | _components.Add(new MiddleWareDelegateComponent(middleware, setup)); 66 | return this; 67 | } 68 | 69 | public void Use(AppFunc app, SetupAction setup = null) 70 | { 71 | _components.Add(new MiddleWareDelegateComponent((env, next) => app(env), setup)); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /AspNetCore/YOYO.AspNetCore.ViewEngine.Razor/RazorView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace YOYO.AspNetCore.ViewEngine.Razor 7 | { 8 | public class RazorView : IRazorView 9 | { 10 | public RazorViewTemplate Template { private set; get; } 11 | 12 | protected ITemplateService TemplateService { set; get; } 13 | 14 | 15 | public RazorView(RazorViewTemplate template, ITemplateService templateService , RenderTemplateContext context) 16 | { 17 | this.Template = template; 18 | this.TemplateService = templateService; 19 | this.Context = context; 20 | } 21 | 22 | protected RenderTemplateContext Context { set; get; } 23 | 24 | public void Render() 25 | { 26 | //not set writer by context , i have result of the template. 27 | this.Template.SetModel(Context.Model, Context.ViewBag); 28 | this.Template.Execute().Wait(); 29 | 30 | 31 | if (!string.IsNullOrEmpty(this.Template.Layout)) 32 | { 33 | 34 | using (var layoutContext = new RenderTemplateContext() { 35 | TemplateName = this.Template.Layout, 36 | ModelType = null, ViewBag = Context.ViewBag }) 37 | { 38 | 39 | var layoutTemplateView = this.TemplateService.GetTemplate(layoutContext); 40 | 41 | Context.IsRenderLayout = true; 42 | 43 | 44 | //RenderBody is this template result ; 45 | layoutTemplateView.Template.RenderBody = () => this.Template.Result; 46 | 47 | layoutTemplateView.Template.SetModel(null, Context.ViewBag); 48 | 49 | layoutTemplateView.Render(); 50 | 51 | Context.Result = layoutTemplateView.Template.Result; 52 | 53 | } 54 | 55 | } 56 | else 57 | { 58 | Context.Result = this.Template.Result; 59 | } 60 | 61 | } 62 | 63 | public void SetContext(RenderTemplateContext context) 64 | { 65 | this.Context = null; 66 | this.Context = context; 67 | this.Template.Writer = context.Writer; 68 | 69 | } 70 | } 71 | } 72 | --------------------------------------------------------------------------------