From 4546dc294a227ead29fba80863210dc2379f7d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20H=C4=B1zl=C4=B1?= Date: Fri, 28 Feb 2020 15:18:49 +0300 Subject: [PATCH 01/10] clear playground --- src/Samples/Playground/Program.cs | 81 +------------------ .../netcoreapp3.0/Twino.Core.AssemblyInfo.cs | 5 +- .../Twino.Extensions.Http.AssemblyInfo.cs | 5 +- .../netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs | 5 +- .../netcoreapp3.0/Twino.MQ.AssemblyInfo.cs | 5 +- .../Twino.Mvc.Auth.Jwt.AssemblyInfo.cs | 5 +- .../Twino.Protocols.Http.AssemblyInfo.cs | 5 +- .../Twino.Protocols.WebSocket.AssemblyInfo.cs | 5 +- .../Twino.SerializableModel.AssemblyInfo.cs | 5 +- 9 files changed, 26 insertions(+), 95 deletions(-) diff --git a/src/Samples/Playground/Program.cs b/src/Samples/Playground/Program.cs index 58f8fbba..633086f7 100644 --- a/src/Samples/Playground/Program.cs +++ b/src/Samples/Playground/Program.cs @@ -1,90 +1,13 @@ -using System; -using System.Reflection; -using System.Threading.Tasks; -using Twino.Ioc; +using System.Threading.Tasks; namespace Playground { - interface IService1 - { - void Test1(); - } - - interface IService2 - { - void Test2(); - } - - class Service1 : IService1 - { - - public void Test1() - { - Console.WriteLine("echo 1"); - } - } - - class Service2 : IService2 - { - public void Test2() - { } - } - - interface IService3 { } - class Service3 : IService3 - { - public Service3(IService1 service1) - { - service1.Test1(); - } - } - - class Service1Proxy : IServiceProxy - { - private IService2 _service2; - public Service1Proxy(IService2 service2) - { - _service2 = service2; - } - - public object Proxy(object decorated) - { - return DenemeDispatchProxy.Create((IService1)decorated, _service2); - } - } - - - class DenemeDispatchProxy : DispatchProxy - { - private T _decorated; - private IService2 _service2; - public static T Create(T decorated, IService2 service2) - { - object proxy = Create>(); - DenemeDispatchProxy instance = (DenemeDispatchProxy)proxy; - instance._decorated = decorated; - instance._service2 = service2; - return (T)proxy; - } - - protected override object Invoke(MethodInfo targetMethod, object[] args) - { - Console.WriteLine("PROXY"); - return targetMethod.Invoke(_decorated, args); - } - } - class Program { static async Task Main(string[] args) { - var container = new ServiceContainer(); - container.AddSingleton(); - container.AddSingleton(); - container.AddSingleton(); - var instance3 = await container.Get(container.CreateScope()); - Console.ReadLine(); + } } } \ No newline at end of file diff --git a/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs b/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs index 7c725436..cd155608 100644 --- a/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs +++ b/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Core library for all twino servers, protocols and services")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Core")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs b/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs index 83422910..dd583ba6 100644 --- a/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs +++ b/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("HttpClient Factory extension for Twino IOC")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Extensions.Http")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Extensions.Http")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs b/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs index 096f8f4b..7ce3e73c 100644 --- a/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs +++ b/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino IOC Service containers and scopes")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Ioc")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Ioc")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs b/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs index 28f942b1..dada5fce 100644 --- a/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs +++ b/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Messaging Queue Server library with TMQ Protocol via Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.MQ")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.MQ")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs b/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs index 09a235a5..d5523f79 100644 --- a/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs +++ b/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("JSON Web Token Authentication and Authorization library for Twino MVC")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Mvc.Auth.Jwt")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Mvc.Auth.Jwt")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs b/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs index 67183627..3e8a2c15 100644 --- a/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs +++ b/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Http Protocol library and server extension for Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Protocols.Http")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Protocols.Http")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs b/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs index cf227917..a3a60571 100644 --- a/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs +++ b/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("WebSocket Protocol library and server extension for Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Protocols.WebSocket")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Protocols.WebSocket")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs b/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs index 0159f167..19323762 100644 --- a/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs +++ b/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -14,11 +15,11 @@ [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Serializable Model library for object based communication with text-based p" + "rotocols")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.SerializableModel")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.SerializableModel")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.10")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] // Generated by the MSBuild WriteCodeFragment class. From cac13cac2f4362559773be6fc681684189213a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Helvac=C4=B1k=C3=B6yl=C3=BC?= Date: Fri, 28 Feb 2020 17:25:25 +0300 Subject: [PATCH 02/10] mvc form class model binding --- src/Samples/Playground/Program.cs | 82 ++++-------- .../Sample.Mvc/Controller/AuthController.cs | 5 +- .../Sample.Mvc/Controller/HomeController.cs | 4 +- src/Twino.Mvc/Controllers/ActionParameter.cs | 12 ++ src/Twino.Mvc/MvcConnectionHandler.cs | 117 ++++++++++-------- src/Twino.Mvc/Routing/RouteBuilder.cs | 14 ++- 6 files changed, 114 insertions(+), 120 deletions(-) diff --git a/src/Samples/Playground/Program.cs b/src/Samples/Playground/Program.cs index 91fb116d..9fbfe6cb 100644 --- a/src/Samples/Playground/Program.cs +++ b/src/Samples/Playground/Program.cs @@ -2,76 +2,36 @@ using System.Linq; using System.Threading.Tasks; using Twino.MQ.Data; +using Twino.Mvc; +using Twino.Mvc.Controllers; +using Twino.Mvc.Filters.Route; using Twino.Protocols.TMQ; +using Twino.Server; namespace Playground { - class Program + [Route("auth")] + public class AuthController : TwinoController { - static async Task Main(string[] args) + [HttpPost("login")] + public async Task Login(string user) { - Database database = new Database(new DatabaseOptions - { - Filename = "/home/mehmet/Desktop/test.tdb", - AutoFlush = true, - AutoShrink = true, - InstantFlush = false, - ShrinkInterval = TimeSpan.FromSeconds(30), - FlushInterval = TimeSpan.FromSeconds(5), - CreateBackupOnShrink = true - }); - - await database.Open(); - var messages = await database.List(); - Console.WriteLine($"There are {messages.Count} messages in database"); - - DefaultUniqueIdGenerator generator = new DefaultUniqueIdGenerator(); - while (true) - { - string command = Console.ReadLine(); - if (string.IsNullOrEmpty(command)) - break; - - switch (command.ToLower()) - { - case "i": - for (int i = 0; i < 300; i++) - { - TmqMessage message = new TmqMessage(MessageType.Channel, "channel"); - message.SetMessageId(generator.Create()); - message.SetStringContent("Hello, World!"); - - bool saved = await database.Insert(message); - Console.WriteLine(saved ? "Saved" : "Failed"); - } - - break; - - case "d": - for (int j = 0; j < 100; j++) - { - var list = await database.List(); - if (list.Count > 2) - { - Random rnd = new Random(); - int i = rnd.Next(1, list.Count - 1); - var first = list.Skip(i).FirstOrDefault(); - bool deleted = await database.Delete(first.Key); - Console.WriteLine($"Delete {first.Value} is {deleted}"); - } - } + return await StringAsync("ok"); + } + } - break; - case "s": - ShrinkInfo shrink = await database.Shrink(); - Console.WriteLine($"Database shrink: {shrink.Successful} in {shrink.TotalDuration.TotalMilliseconds} ms"); - break; - } - } + class Program + { + static async Task Main(string[] args) + { + TwinoMvc mvc = new TwinoMvc(); + mvc.Init(); - await database.Close(); - Console.WriteLine("Database closed"); + TwinoServer server = new TwinoServer(); + server.UseMvc(mvc); + server.Start(441); + await server.BlockWhileRunningAsync(); } } } \ No newline at end of file diff --git a/src/Samples/Sample.Mvc/Controller/AuthController.cs b/src/Samples/Sample.Mvc/Controller/AuthController.cs index b82cb06d..1773bc1d 100644 --- a/src/Samples/Sample.Mvc/Controller/AuthController.cs +++ b/src/Samples/Sample.Mvc/Controller/AuthController.cs @@ -13,9 +13,8 @@ public class AuthController : TwinoController { private IJwtProvider _jwtProvider; - public AuthController(IJwtProvider jwtProvider) + public AuthController() { - _jwtProvider = jwtProvider; } [HttpGet("login")] @@ -40,7 +39,7 @@ public IActionResult IT() } [HttpPost("post")] - public async Task Post([FromBody] LoginModel model) + public async Task Post([FromForm] LoginModel model) { return await JsonAsync(new { diff --git a/src/Samples/Sample.Mvc/Controller/HomeController.cs b/src/Samples/Sample.Mvc/Controller/HomeController.cs index 7af9ecc7..03c56c94 100644 --- a/src/Samples/Sample.Mvc/Controller/HomeController.cs +++ b/src/Samples/Sample.Mvc/Controller/HomeController.cs @@ -6,10 +6,10 @@ namespace Sample.Mvc.Controller { - [Route("")] + [Route("a")] public class HomeController : TwinoController { - [HttpGet("")] + [HttpGet("b")] public async Task Get() { return await StringAsync("Welcome!"); diff --git a/src/Twino.Mvc/Controllers/ActionParameter.cs b/src/Twino.Mvc/Controllers/ActionParameter.cs index 5a6d7945..04f1bf20 100644 --- a/src/Twino.Mvc/Controllers/ActionParameter.cs +++ b/src/Twino.Mvc/Controllers/ActionParameter.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Reflection; namespace Twino.Mvc.Controllers { @@ -84,5 +86,15 @@ public class ActionParameter /// Usually true when the type is int?, short?, etc. /// public bool Nullable { get; set; } + + /// + /// If true, property is a class + /// + public bool IsClass { get; set; } + + /// + /// If parameter is a class, property info list of that class. otherwise, null. + /// + public Dictionary ClassProperties { get; } = new Dictionary(StringComparer.InvariantCultureIgnoreCase); } } diff --git a/src/Twino.Mvc/MvcConnectionHandler.cs b/src/Twino.Mvc/MvcConnectionHandler.cs index 8d43e1b4..546396a6 100644 --- a/src/Twino.Mvc/MvcConnectionHandler.cs +++ b/src/Twino.Mvc/MvcConnectionHandler.cs @@ -1,23 +1,23 @@ -using Twino.Mvc.Controllers; -using Twino.Mvc.Filters; -using Twino.Mvc.Routing; +using System; using System.Collections.Generic; -using System.Linq; -using System; using System.IO; +using System.Linq; using System.Reflection; -using System.Text; -using System.Xml.Serialization; -using Twino.Mvc.Results; -using Twino.Mvc.Errors; using System.Security.Claims; +using System.Text; using System.Threading; using System.Threading.Tasks; +using System.Xml.Serialization; using Twino.Core; -using Twino.Mvc.Auth; using Twino.Core.Protocols; -using Twino.Mvc.Middlewares; using Twino.Ioc; +using Twino.Mvc.Auth; +using Twino.Mvc.Controllers; +using Twino.Mvc.Errors; +using Twino.Mvc.Filters; +using Twino.Mvc.Middlewares; +using Twino.Mvc.Results; +using Twino.Mvc.Routing; using Twino.Protocols.Http; namespace Twino.Mvc @@ -284,86 +284,101 @@ private static List FillParameters(HttpRequest request, RouteMat List values = new List(); foreach (ActionParameter ap in route.Route.Parameters) { - object value = null; + ParameterValue paramValue = new ParameterValue + { + Name = ap.ParameterName, + Type = ap.ParameterType, + Source = ap.Source + }; //by source find the value of the parameter and set it to "value" local variable switch (ap.Source) { case ParameterSource.None: case ParameterSource.Route: - value = route.Values[ap.FromName]; + paramValue.Value = ChangeType(route.Values[ap.FromName], ap); break; case ParameterSource.Body: { string content = Encoding.UTF8.GetString(request.ContentStream.ToArray()); if (ap.FromName == "json") - value = Newtonsoft.Json.JsonConvert.DeserializeObject(content, ap.ParameterType); + paramValue.Value = Newtonsoft.Json.JsonConvert.DeserializeObject(content, ap.ParameterType); else if (ap.FromName == "xml") { using MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(content)); XmlSerializer serializer = new XmlSerializer(ap.ParameterType); - value = serializer.Deserialize(ms); + paramValue.Value = serializer.Deserialize(ms); } break; } case ParameterSource.Form: - if (request.Form.ContainsKey(ap.FromName)) - value = request.Form[ap.FromName]; + if (ap.IsClass) + { + object obj = Activator.CreateInstance(ap.ParameterType); + string start = $"{ap.FromName}."; + var props = request.Form.Where(x => x.Key.StartsWith(start, StringComparison.InvariantCultureIgnoreCase)); + foreach (var kv in props) + { + string propName = kv.Key.Substring(start.Length); + PropertyInfo propInfo; + ap.ClassProperties.TryGetValue(propName, out propInfo); + if (propInfo != null) + propInfo.SetValue(obj, ChangeType(kv.Value, ap)); + } + } + else if (request.Form.ContainsKey(ap.FromName)) + paramValue.Value = ChangeType(request.Form[ap.FromName], ap); + break; case ParameterSource.QueryString: if (request.QueryString.ContainsKey(ap.FromName)) - value = request.QueryString[ap.FromName]; + paramValue.Value = ChangeType(request.QueryString[ap.FromName], ap); break; case ParameterSource.Header: if (request.Headers.ContainsKey(ap.FromName)) - value = request.Headers[ap.FromName]; + paramValue.Value = ChangeType(request.Headers[ap.FromName], ap); break; } - //the value must be cast to the specified parameter type. - //object boxing may be misleading. - //when the parameter type of the method is integer, value could be boxed "3" string. - object casted; + //return value + values.Add(paramValue); + } - //if the value is null, parameter may be missing - if (value == null) - casted = null; + return values; + } - //if the value and parameter types same, do nothing - else if (value.GetType() == ap.ParameterType) - casted = value; + /// + /// Converts string value to action parameter type + /// + private static object ChangeType(object value, ActionParameter parameter) + { + //if the value is null, parameter may be missing + if (value == null) + return null; - //need casting. parameter and value types are different - else - { - //for nullable types, we need extra check (because we need to cast underlying type) - if (ap.Nullable) - { - Type nullable = Nullable.GetUnderlyingType(ap.ParameterType); - casted = Convert.ChangeType(value, nullable); - } + //if the value and parameter types same, do nothing + if (value.GetType() == parameter.ParameterType) + return value; - //directly cast - else - casted = Convert.ChangeType(value, ap.ParameterType); - } + //need casting. parameter and value types are different - //return value - values.Add(new ParameterValue - { - Name = ap.ParameterName, - Type = ap.ParameterType, - Source = ap.Source, - Value = casted - }); + //for nullable types, we need extra check (because we need to cast underlying type) + if (parameter.Nullable) + { + Type nullable = Nullable.GetUnderlyingType(parameter.ParameterType); + return Convert.ChangeType(value, nullable); } - return values; + if (parameter.ParameterType.IsEnum) + return Enum.Parse(parameter.ParameterType, value.ToString()); + + //directly cast + return Convert.ChangeType(value, parameter.ParameterType); } #endregion diff --git a/src/Twino.Mvc/Routing/RouteBuilder.cs b/src/Twino.Mvc/Routing/RouteBuilder.cs index 377bf165..68243bc9 100644 --- a/src/Twino.Mvc/Routing/RouteBuilder.cs +++ b/src/Twino.Mvc/Routing/RouteBuilder.cs @@ -1,11 +1,11 @@ -using Twino.Mvc.Controllers.Parameters; -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; using Twino.Mvc.Auth; using Twino.Mvc.Controllers; +using Twino.Mvc.Controllers.Parameters; using Twino.Mvc.Filters; using Twino.Mvc.Filters.Route; @@ -322,9 +322,17 @@ private ActionParameter[] BuildParameters(MethodInfo method) FromName = from, Index = i, Source = attr != null ? attr.Source : ParameterSource.None, - Nullable = Nullable.GetUnderlyingType(parameter.ParameterType) != null + Nullable = Nullable.GetUnderlyingType(parameter.ParameterType) != null, + IsClass = parameter.ParameterType.IsClass && parameter.ParameterType != typeof(string) }; + if (item.IsClass) + { + PropertyInfo[] properties = parameter.ParameterType.GetProperties(); + foreach (PropertyInfo property in properties) + item.ClassProperties.Add(property.Name, property); + } + result[i] = item; } From b1b733cce1b09ee80d17194142e94697913d5181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Helvac=C4=B1k=C3=B6yl=C3=BC?= Date: Fri, 28 Feb 2020 18:04:47 +0300 Subject: [PATCH 03/10] mvc form class model binding null fix --- src/Samples/Playground/Program.cs | 31 ++++++++++++++++++--------- src/Twino.Mvc/MvcConnectionHandler.cs | 28 +++++++++++++----------- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/Samples/Playground/Program.cs b/src/Samples/Playground/Program.cs index 9fbfe6cb..7205d55e 100644 --- a/src/Samples/Playground/Program.cs +++ b/src/Samples/Playground/Program.cs @@ -4,34 +4,45 @@ using Twino.MQ.Data; using Twino.Mvc; using Twino.Mvc.Controllers; +using Twino.Mvc.Controllers.Parameters; using Twino.Mvc.Filters.Route; using Twino.Protocols.TMQ; using Twino.Server; namespace Playground { - [Route("auth")] - public class AuthController : TwinoController + public class Login { - [HttpPost("login")] - public async Task Login(string user) + public string User { get; set; } + public string Pass { get; set; } + } + + [Route("a")] + public class AController : TwinoController + { + [HttpPost("b")] + public async Task B([FromForm] Login login) { - return await StringAsync("ok"); + return await StringAsync($"hello: {login.User} and {login.Pass}"); } - } + [HttpGet("c")] + public async Task B() + { + return await StringAsync("hello"); + } + } class Program { - static async Task Main(string[] args) + static void Main(string[] args) { TwinoMvc mvc = new TwinoMvc(); mvc.Init(); - TwinoServer server = new TwinoServer(); server.UseMvc(mvc); - server.Start(441); - await server.BlockWhileRunningAsync(); + server.Start(26222); + server.BlockWhileRunning(); } } } \ No newline at end of file diff --git a/src/Twino.Mvc/MvcConnectionHandler.cs b/src/Twino.Mvc/MvcConnectionHandler.cs index 546396a6..66cfb7b4 100644 --- a/src/Twino.Mvc/MvcConnectionHandler.cs +++ b/src/Twino.Mvc/MvcConnectionHandler.cs @@ -296,7 +296,7 @@ private static List FillParameters(HttpRequest request, RouteMat { case ParameterSource.None: case ParameterSource.Route: - paramValue.Value = ChangeType(route.Values[ap.FromName], ap); + paramValue.Value = ChangeType(route.Values[ap.FromName], ap.ParameterType, ap.Nullable); break; case ParameterSource.Body: @@ -326,22 +326,24 @@ private static List FillParameters(HttpRequest request, RouteMat PropertyInfo propInfo; ap.ClassProperties.TryGetValue(propName, out propInfo); if (propInfo != null) - propInfo.SetValue(obj, ChangeType(kv.Value, ap)); + propInfo.SetValue(obj, ChangeType(kv.Value, propInfo.PropertyType, Nullable.GetUnderlyingType(propInfo.PropertyType) != null)); } + + paramValue.Value = obj; } else if (request.Form.ContainsKey(ap.FromName)) - paramValue.Value = ChangeType(request.Form[ap.FromName], ap); + paramValue.Value = ChangeType(request.Form[ap.FromName], ap.ParameterType, ap.Nullable); break; case ParameterSource.QueryString: if (request.QueryString.ContainsKey(ap.FromName)) - paramValue.Value = ChangeType(request.QueryString[ap.FromName], ap); + paramValue.Value = ChangeType(request.QueryString[ap.FromName], ap.ParameterType, ap.Nullable); break; case ParameterSource.Header: if (request.Headers.ContainsKey(ap.FromName)) - paramValue.Value = ChangeType(request.Headers[ap.FromName], ap); + paramValue.Value = ChangeType(request.Headers[ap.FromName], ap.ParameterType, ap.Nullable); break; } @@ -355,30 +357,30 @@ private static List FillParameters(HttpRequest request, RouteMat /// /// Converts string value to action parameter type /// - private static object ChangeType(object value, ActionParameter parameter) + private static object ChangeType(object value, Type type, bool nullable) { //if the value is null, parameter may be missing if (value == null) return null; //if the value and parameter types same, do nothing - if (value.GetType() == parameter.ParameterType) + if (value.GetType() == type) return value; //need casting. parameter and value types are different //for nullable types, we need extra check (because we need to cast underlying type) - if (parameter.Nullable) + if (nullable) { - Type nullable = Nullable.GetUnderlyingType(parameter.ParameterType); - return Convert.ChangeType(value, nullable); + Type utype = Nullable.GetUnderlyingType(type); + return Convert.ChangeType(value, utype); } - if (parameter.ParameterType.IsEnum) - return Enum.Parse(parameter.ParameterType, value.ToString()); + if (type.IsEnum) + return Enum.Parse(type, value.ToString()); //directly cast - return Convert.ChangeType(value, parameter.ParameterType); + return Convert.ChangeType(value, type); } #endregion From 75913d19bb654e5553edc3362cad813dfe3b4012 Mon Sep 17 00:00:00 2001 From: "hizliemre@gmail.com" Date: Fri, 28 Feb 2020 20:41:45 +0300 Subject: [PATCH 04/10] fix url encoding --- src/Samples/Playground/Program.cs | 10 ++++++++-- .../Forms/EncodedFormDataReader.cs | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Samples/Playground/Program.cs b/src/Samples/Playground/Program.cs index 7205d55e..203edad1 100644 --- a/src/Samples/Playground/Program.cs +++ b/src/Samples/Playground/Program.cs @@ -17,13 +17,19 @@ public class Login public string Pass { get; set; } } + public class User + { + public string Name { get; set; } + public string Lastname { get; set; } + } + [Route("a")] public class AController : TwinoController { [HttpPost("b")] - public async Task B([FromForm] Login login) + public async Task B([FromForm("logi.n")] Login login1, [FromForm("use.r")] User user1, [FromForm("ya.s")]int yas) { - return await StringAsync($"hello: {login.User} and {login.Pass}"); + return await StringAsync($"hello: {login1.User} and {login1.Pass} {user1.Name} - {user1.Lastname}"); } [HttpGet("c")] diff --git a/src/Twino.Protocols.Http/Forms/EncodedFormDataReader.cs b/src/Twino.Protocols.Http/Forms/EncodedFormDataReader.cs index 01e06f2e..6cdd42ef 100644 --- a/src/Twino.Protocols.Http/Forms/EncodedFormDataReader.cs +++ b/src/Twino.Protocols.Http/Forms/EncodedFormDataReader.cs @@ -40,7 +40,7 @@ public static class EncodedFormDataReader continue; string key = key_value[0]; - string value = System.Net.WebUtility.HtmlDecode(key_value[1]); + string value = System.Net.WebUtility.UrlDecode(key_value[1]); if (items.ContainsKey(key)) items[key] = "," + value; From a61e85e0ef8633eb48323695ea48c224163ab2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Helvac=C4=B1k=C3=B6yl=C3=BC?= Date: Fri, 28 Feb 2020 22:51:21 +0300 Subject: [PATCH 05/10] mvc routing bug fix --- src/Samples/Playground/Program.cs | 45 ++++++++++++++++--- .../Sample.Mvc/Controller/AuthController.cs | 3 +- src/Twino.Mvc/Routing/RouteBuilder.cs | 23 ++++++++++ src/Twino.Mvc/Routing/RouteFinder.cs | 27 ++++++++--- src/Twino.Mvc/Routing/RouteLeaf.cs | 2 +- src/Twino.Mvc/TwinoMvc.cs | 12 +++-- 6 files changed, 96 insertions(+), 16 deletions(-) diff --git a/src/Samples/Playground/Program.cs b/src/Samples/Playground/Program.cs index 203edad1..1522b113 100644 --- a/src/Samples/Playground/Program.cs +++ b/src/Samples/Playground/Program.cs @@ -23,20 +23,55 @@ public class User public string Lastname { get; set; } } - [Route("a")] + [Route("x")] + public class BController : TwinoController + { + [HttpGet("c/{?x}")] + public async Task C(string x) + { + return await StringAsync("Xhello: " + x); + } + + [HttpGet("")] + public async Task B() + { + return await StringAsync("Xhello"); + } + + [HttpGet("d")] + public async Task D() + { + return await StringAsync("Xhello D"); + } + } + + + [Route("")] public class AController : TwinoController { - [HttpPost("b")] - public async Task B([FromForm("logi.n")] Login login1, [FromForm("use.r")] User user1, [FromForm("ya.s")]int yas) + [HttpGet("c/{?x}")] + public async Task C(string x) { - return await StringAsync($"hello: {login1.User} and {login1.Pass} {user1.Name} - {user1.Lastname}"); + return await StringAsync("hello: " + x); } - [HttpGet("c")] + [HttpGet("")] public async Task B() { return await StringAsync("hello"); } + + [HttpGet("d")] + public async Task D() + { + return await StringAsync("hello D"); + } + + [HttpGet("e/{x}")] + public async Task E(string x) + { + return await StringAsync("hello E: " + x); + } } class Program diff --git a/src/Samples/Sample.Mvc/Controller/AuthController.cs b/src/Samples/Sample.Mvc/Controller/AuthController.cs index 95447b93..f8bc263e 100644 --- a/src/Samples/Sample.Mvc/Controller/AuthController.cs +++ b/src/Samples/Sample.Mvc/Controller/AuthController.cs @@ -13,8 +13,9 @@ public class AuthController : TwinoController { private IJwtProvider _jwtProvider; - public AuthController() + public AuthController(IJwtProvider jwtProvider) { + _jwtProvider = jwtProvider; } [HttpGet("login")] diff --git a/src/Twino.Mvc/Routing/RouteBuilder.cs b/src/Twino.Mvc/Routing/RouteBuilder.cs index 68243bc9..925eeb03 100644 --- a/src/Twino.Mvc/Routing/RouteBuilder.cs +++ b/src/Twino.Mvc/Routing/RouteBuilder.cs @@ -93,6 +93,29 @@ public IEnumerable BuildRoutes(Type controllerType) return routes; } + /// + /// Sorts all route leaves recursively + /// + internal void SortRoutes(RouteLeaf leaf) + { + if (leaf.Children.Count == 0) + return; + + leaf.Children.Sort((a, b) => + { + if (string.IsNullOrEmpty(a.Path.Value)) + return 1; + + if (string.IsNullOrEmpty(b.Path.Value)) + return -1; + + return 0; + }); + + foreach (RouteLeaf child in leaf.Children) + SortRoutes(child); + } + /// /// Searches method attributes and applies existing attributes to route /// diff --git a/src/Twino.Mvc/Routing/RouteFinder.cs b/src/Twino.Mvc/Routing/RouteFinder.cs index cf574f77..2bf888ca 100644 --- a/src/Twino.Mvc/Routing/RouteFinder.cs +++ b/src/Twino.Mvc/Routing/RouteFinder.cs @@ -58,7 +58,24 @@ private RouteLeaf FindRouteInLeaf(RouteLeaf leaf, string method, string[] parts, //for text parts, it should match if (leaf.Path.Type == RouteType.Text) { - bool matched = leaf.Path.Value.Equals(parts[index], StringComparison.InvariantCultureIgnoreCase); + if (string.IsNullOrEmpty(leaf.Path.Value)) + { + if (leaf.Route != null && leaf.Route.Method.Equals(method, StringComparison.InvariantCultureIgnoreCase)) + return leaf; + + foreach (RouteLeaf child in leaf.Children) + { + RouteLeaf rl = FindRouteInLeaf(child, method, parts, index); + if (rl != null) + return rl; + } + } + + bool matched = false; + + if (index < parts.Length) + matched = leaf.Path.Value.Equals(parts[index], StringComparison.InvariantCultureIgnoreCase); + if (!matched) return null; } @@ -106,9 +123,6 @@ private RouteLeaf FindRouteInLeaf(RouteLeaf leaf, string method, string[] parts, } } - if (parts.Length < index + 2) - return null; - int next = index + 1; foreach (RouteLeaf child in leaf.Children) { @@ -128,7 +142,7 @@ public RouteMatch Find(IEnumerable routes, HttpRequest request) //split path to route parts string[] parts = request.Path.Split('/', StringSplitOptions.RemoveEmptyEntries); if (parts.Length == 0) - parts = new[] { "" }; + parts = new[] {""}; RouteLeaf route = null; foreach (RouteLeaf leaf in routes) @@ -167,7 +181,8 @@ public RouteMatch Find(IEnumerable routes, HttpRequest request) match.Values.Add(path.Value, parts[route.Index]); route = route.Parent; - } while (route != null); + } + while (route != null); return match; } diff --git a/src/Twino.Mvc/Routing/RouteLeaf.cs b/src/Twino.Mvc/Routing/RouteLeaf.cs index 17cad8fe..e419763f 100644 --- a/src/Twino.Mvc/Routing/RouteLeaf.cs +++ b/src/Twino.Mvc/Routing/RouteLeaf.cs @@ -48,7 +48,7 @@ public RouteLeaf(RoutePath path, RouteLeaf parent) Path = path; Parent = parent; - if (parent != null) + if (parent != null && !string.IsNullOrEmpty(parent.Path.Value)) Index = parent.Index + 1; } diff --git a/src/Twino.Mvc/TwinoMvc.cs b/src/Twino.Mvc/TwinoMvc.cs index 0aefd558..91b939a1 100644 --- a/src/Twino.Mvc/TwinoMvc.cs +++ b/src/Twino.Mvc/TwinoMvc.cs @@ -169,6 +169,8 @@ public void CreateRoutes(Assembly assembly = null) .Where(type => interfaceType.IsAssignableFrom(type)) .ToList(); + List leaves = new List(); + foreach (Type type in types) { if (type.IsInterface) @@ -177,10 +179,14 @@ public void CreateRoutes(Assembly assembly = null) if (type.IsAssignableFrom(typeof(TwinoController)) && typeof(TwinoController).IsAssignableFrom(type)) continue; - IEnumerable routes = builder.BuildRoutes(type); - foreach (RouteLeaf route in routes) - Routes.Add(route); + leaves.AddRange(builder.BuildRoutes(type)); } + + foreach (RouteLeaf root in leaves) + builder.SortRoutes(root); + + foreach (RouteLeaf route in leaves) + Routes.Add(route); } /// From 430c5c3d96a0d2faaaadbbba0e7cc29d6fa7d9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Helvac=C4=B1k=C3=B6yl=C3=BC?= Date: Fri, 28 Feb 2020 23:19:37 +0300 Subject: [PATCH 06/10] routing tests --- .../Test.Mvc/Controllers/BlankController.cs | 17 +++++++++ src/Tests/Test.Mvc/RoutingTest.cs | 38 +++++++++++++++++++ src/Twino.Mvc/MvcConnectionHandler.cs | 2 +- src/Twino.Mvc/TwinoMvc.cs | 3 ++ src/Twino.Protocols.Http/HttpRequest.cs | 1 + 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/Tests/Test.Mvc/Controllers/BlankController.cs diff --git a/src/Tests/Test.Mvc/Controllers/BlankController.cs b/src/Tests/Test.Mvc/Controllers/BlankController.cs new file mode 100644 index 00000000..0edefdc9 --- /dev/null +++ b/src/Tests/Test.Mvc/Controllers/BlankController.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Twino.Mvc; +using Twino.Mvc.Controllers; +using Twino.Mvc.Filters.Route; + +namespace Test.Mvc.Controllers +{ + [Route("")] + public class BlankController : TwinoController + { + [HttpGet("")] + public async Task Index() + { + return await StringAsync("/"); + } + } +} \ No newline at end of file diff --git a/src/Tests/Test.Mvc/RoutingTest.cs b/src/Tests/Test.Mvc/RoutingTest.cs index 269875bc..72799ef4 100644 --- a/src/Tests/Test.Mvc/RoutingTest.cs +++ b/src/Tests/Test.Mvc/RoutingTest.cs @@ -1,3 +1,14 @@ +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using Twino.Mvc; +using Twino.Mvc.Controllers; +using Twino.Mvc.Routing; +using Twino.Protocols.Http; +using Xunit; + namespace Test.Mvc { public class RoutingTest @@ -6,5 +17,32 @@ public class RoutingTest * controller: plain, [ name ], { parameter }, multiple bindings, nested / * */ + + [Theory] + [InlineData("GET", "/")] + public async Task Test(string method, string path) + { + TwinoMvc mvc = new TwinoMvc(); + mvc.Init(); + mvc.CreateRoutes(Assembly.GetExecutingAssembly()); + + HttpRequest request = new HttpRequest(); + request.Method = method; + request.Path = path; + + HttpResponse response = new HttpResponse(); + + RouteMatch match = mvc.RouteFinder.Find(mvc.Routes, request); + Assert.NotNull(match); + + TwinoController controller = await mvc.ControllerFactory.CreateInstance(mvc, match.Route.ControllerType, request, response, mvc.Services.CreateScope()); + + var parameters = MvcConnectionHandler.FillParameters(request, match).Select(x => x.Value).ToArray(); + Task task = (Task) match.Route.ActionType.Invoke(controller, parameters); + + IActionResult result = task.Result; + string url = Encoding.UTF8.GetString(((MemoryStream) result.Stream).ToArray()); + Assert.Equal(url, path); + } } } \ No newline at end of file diff --git a/src/Twino.Mvc/MvcConnectionHandler.cs b/src/Twino.Mvc/MvcConnectionHandler.cs index 66cfb7b4..9b97a343 100644 --- a/src/Twino.Mvc/MvcConnectionHandler.cs +++ b/src/Twino.Mvc/MvcConnectionHandler.cs @@ -279,7 +279,7 @@ public void WriteResponse(HttpResponse response, IActionResult result) /// /// Creates parameter list and sets values for the specified request to the specified route. /// - private static List FillParameters(HttpRequest request, RouteMatch route) + internal static List FillParameters(HttpRequest request, RouteMatch route) { List values = new List(); foreach (ActionParameter ap in route.Route.Parameters) diff --git a/src/Twino.Mvc/TwinoMvc.cs b/src/Twino.Mvc/TwinoMvc.cs index 91b939a1..02ff3f31 100644 --- a/src/Twino.Mvc/TwinoMvc.cs +++ b/src/Twino.Mvc/TwinoMvc.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Net; using System.Reflection; +using System.Runtime.CompilerServices; using Twino.Core; using Twino.Ioc; using Twino.Mvc.Auth; @@ -12,6 +13,8 @@ using Twino.Mvc.Results; using Twino.Mvc.Routing; +[assembly:InternalsVisibleTo("Test.Mvc")] + namespace Twino.Mvc { /// diff --git a/src/Twino.Protocols.Http/HttpRequest.cs b/src/Twino.Protocols.Http/HttpRequest.cs index 98c347ff..4d37d832 100644 --- a/src/Twino.Protocols.Http/HttpRequest.cs +++ b/src/Twino.Protocols.Http/HttpRequest.cs @@ -4,6 +4,7 @@ using System.Runtime.CompilerServices; using Twino.Protocols.Http.Forms; +[assembly: InternalsVisibleTo("Test.Mvc")] [assembly: InternalsVisibleTo("Twino.Server")] [assembly: InternalsVisibleTo("Twino.Client.WebSocket")] From a72958f4401851b00298c9eee6de3c91f7543d79 Mon Sep 17 00:00:00 2001 From: "hizliemre@gmail.com" Date: Fri, 28 Feb 2020 23:55:59 +0300 Subject: [PATCH 07/10] route finder tests --- .../Test.Mvc/Controllers/BlankController.cs | 17 -- .../Test.Mvc/Controllers/TestControllers.cs | 146 ++++++++++++++++++ src/Tests/Test.Mvc/RoutingTest.cs | 93 +++++++++-- src/Tests/Test.Mvc/Test.Mvc.csproj | 1 + 4 files changed, 230 insertions(+), 27 deletions(-) delete mode 100644 src/Tests/Test.Mvc/Controllers/BlankController.cs create mode 100644 src/Tests/Test.Mvc/Controllers/TestControllers.cs diff --git a/src/Tests/Test.Mvc/Controllers/BlankController.cs b/src/Tests/Test.Mvc/Controllers/BlankController.cs deleted file mode 100644 index 0edefdc9..00000000 --- a/src/Tests/Test.Mvc/Controllers/BlankController.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Threading.Tasks; -using Twino.Mvc; -using Twino.Mvc.Controllers; -using Twino.Mvc.Filters.Route; - -namespace Test.Mvc.Controllers -{ - [Route("")] - public class BlankController : TwinoController - { - [HttpGet("")] - public async Task Index() - { - return await StringAsync("/"); - } - } -} \ No newline at end of file diff --git a/src/Tests/Test.Mvc/Controllers/TestControllers.cs b/src/Tests/Test.Mvc/Controllers/TestControllers.cs new file mode 100644 index 00000000..e9585cbc --- /dev/null +++ b/src/Tests/Test.Mvc/Controllers/TestControllers.cs @@ -0,0 +1,146 @@ +using System.Threading.Tasks; +using Twino.Mvc; +using Twino.Mvc.Controllers; +using Twino.Mvc.Filters.Route; + +namespace Test.Mvc.Controllers +{ + [Route("")] + [Route("test")] + [Route("[controller]")] + public class Test1Controller : TwinoController + { + [HttpGet("")] + public async Task IndexGet() + { + return await StringAsync("get/"); + } + + [HttpPost("")] + public async Task IndexPost() + { + return await StringAsync("post/"); + } + + [HttpGet("a")] + public async Task GetA() + { + return await StringAsync("geta/"); + } + + [HttpPost("a")] + public async Task PostA() + { + return await StringAsync("posta/"); + } + + [HttpGet("b/{?x}")] + public async Task GetB(string x) + { + return await StringAsync($"getb/{x}"); + } + + [HttpPost("b/{?x}")] + public async Task PostB(string x) + { + return await StringAsync($"postb/{x}"); + } + + [HttpGet("c/{x}")] + public async Task GetC(string x) + { + return await StringAsync($"getc/{x}"); + } + + [HttpPost("c/{x}")] + public async Task PostC(string x) + { + return await StringAsync($"postc/{x}"); + } + + [HttpGet("d/{x}/{?y}")] + public async Task GetD(string x, string y) + { + return await StringAsync($"getd/{x}/{y}"); + } + + [HttpPost("d/{x}/{?y}")] + public async Task PostD(string x, string y) + { + return await StringAsync($"postd/{x}/{y}"); + } + + [HttpGet("e/{x}/{y}")] + public async Task GetE(string x, string y) + { + return await StringAsync($"gete/{x}/{y}"); + } + + [HttpPost("e/{x}/{y}")] + public async Task PostE(string x, string y) + { + return await StringAsync($"poste/{x}/{y}"); + } + + + [HttpGet("[action]")] + public async Task GetAA() + { + return await StringAsync("geta/"); + } + + [HttpPost("[action]")] + public async Task PostAA() + { + return await StringAsync("posta/"); + } + + [HttpGet("[action]/{?x}")] + public async Task GetBB(string x) + { + return await StringAsync($"getb/{x}"); + } + + [HttpPost("[action]/{?x}")] + public async Task PostBB(string x) + { + return await StringAsync($"postb/{x}"); + } + + [HttpGet("[action]/{x}")] + public async Task GetCC(string x) + { + return await StringAsync($"getc/{x}"); + } + + [HttpPost("[action]/{x}")] + public async Task PostCC(string x) + { + return await StringAsync($"postc/{x}"); + } + + [HttpGet("[action]/{x}/{?y}")] + public async Task GetDD(string x, string y) + { + return await StringAsync($"getd/{x}/{y}"); + } + + [HttpPost("[action]/{x}/{?y}")] + public async Task PostDD(string x, string y) + { + return await StringAsync($"postd/{x}/{y}"); + } + + [HttpGet("[action]/{x}/{y}")] + public async Task GetEE(string x, string y) + { + return await StringAsync($"gete/{x}/{y}"); + } + + [HttpPost("[action]/{x}/{y}")] + public async Task PostEE(string x, string y) + { + return await StringAsync($"poste/{x}/{y}"); + } + } +} \ No newline at end of file diff --git a/src/Tests/Test.Mvc/RoutingTest.cs b/src/Tests/Test.Mvc/RoutingTest.cs index 72799ef4..364ccd4d 100644 --- a/src/Tests/Test.Mvc/RoutingTest.cs +++ b/src/Tests/Test.Mvc/RoutingTest.cs @@ -1,3 +1,4 @@ +using FluentAssertions; using System.IO; using System.Linq; using System.Reflection; @@ -13,14 +14,86 @@ namespace Test.Mvc { public class RoutingTest { - /* - * controller: plain, [ name ], { parameter }, multiple bindings, nested / - * - */ - [Theory] - [InlineData("GET", "/")] - public async Task Test(string method, string path) + [InlineData("GET", "/", "get/")] + [InlineData("POST", "/", "post/")] + [InlineData("GET", "/a", "geta/")] + [InlineData("POST", "/a", "posta/")] + [InlineData("GET", "/b/3", "getb/3")] + [InlineData("POST", "/b/3", "postb/3")] + [InlineData("GET", "/b", "getb/")] + [InlineData("POST", "/b", "postb/")] + [InlineData("GET", "/c/4", "getc/4")] + [InlineData("POST", "/c/4", "postc/4")] + [InlineData("GET", "/d/5", "getd/5/")] + [InlineData("POST", "/d/5", "postd/5/")] + [InlineData("GET", "/e/6/7", "gete/6/7")] + [InlineData("POST", "/e/6/7", "poste/6/7")] + [InlineData("GET", "/getaa", "geta/")] + [InlineData("POST", "/postaa", "posta/")] + [InlineData("GET", "/getbb/3", "getb/3")] + [InlineData("POST", "/postbb/3", "postb/3")] + [InlineData("GET", "/getbb", "getb/")] + [InlineData("POST", "/postbb", "postb/")] + [InlineData("GET", "/getcc/4", "getc/4")] + [InlineData("POST", "/postcc/4", "postc/4")] + [InlineData("GET", "/getdd/5", "getd/5/")] + [InlineData("POST", "/postdd/5", "postd/5/")] + [InlineData("GET", "/getee/6/7", "gete/6/7")] + [InlineData("POST", "/postee/6/7", "poste/6/7")] + [InlineData("GET", "/test", "get/")] + [InlineData("POST", "/test", "post/")] + [InlineData("GET", "/test/a", "geta/")] + [InlineData("POST", "/test/a", "posta/")] + [InlineData("GET", "/test/b/3", "getb/3")] + [InlineData("POST", "/test/b/3", "postb/3")] + [InlineData("GET", "/test/b", "getb/")] + [InlineData("POST", "/test/b", "postb/")] + [InlineData("GET", "/test/c/4", "getc/4")] + [InlineData("POST", "/test/c/4", "postc/4")] + [InlineData("GET", "/test/d/5", "getd/5/")] + [InlineData("POST", "/test/d/5", "postd/5/")] + [InlineData("GET", "/test/e/6/7", "gete/6/7")] + [InlineData("POST", "/test/e/6/7", "poste/6/7")] + [InlineData("GET", "/test/getaa", "geta/")] + [InlineData("POST", "/test/postaa", "posta/")] + [InlineData("GET", "/test/getbb/3", "getb/3")] + [InlineData("POST", "/test/postbb/3", "postb/3")] + [InlineData("GET", "/test/getbb", "getb/")] + [InlineData("POST", "/test/postbb", "postb/")] + [InlineData("GET", "/test/getcc/4", "getc/4")] + [InlineData("POST", "/test/postcc/4", "postc/4")] + [InlineData("GET", "/test/getdd/5", "getd/5/")] + [InlineData("POST", "/test/postdd/5", "postd/5/")] + [InlineData("GET", "/test/getee/6/7", "gete/6/7")] + [InlineData("POST", "/test/postee/6/7", "poste/6/7")] + [InlineData("GET", "/test1", "get/")] + [InlineData("POST", "/test1", "post/")] + [InlineData("GET", "/test1/a", "geta/")] + [InlineData("POST", "/test1/a", "posta/")] + [InlineData("GET", "/test1/b/3", "getb/3")] + [InlineData("POST", "/test1/b/3", "postb/3")] + [InlineData("GET", "/test1/b", "getb/")] + [InlineData("POST", "/test1/b", "postb/")] + [InlineData("GET", "/test1/c/4", "getc/4")] + [InlineData("POST", "/test1/c/4", "postc/4")] + [InlineData("GET", "/test1/d/5", "getd/5/")] + [InlineData("POST", "/test1/d/5", "postd/5/")] + [InlineData("GET", "/test1/e/6/7", "gete/6/7")] + [InlineData("POST", "/test1/e/6/7", "poste/6/7")] + [InlineData("GET", "/test1/getaa", "geta/")] + [InlineData("POST", "/test1/postaa", "posta/")] + [InlineData("GET", "/test1/getbb/3", "getb/3")] + [InlineData("POST", "/test1/postbb/3", "postb/3")] + [InlineData("GET", "/test1/getbb", "getb/")] + [InlineData("POST", "/test1/postbb", "postb/")] + [InlineData("GET", "/test1/getcc/4", "getc/4")] + [InlineData("POST", "/test1/postcc/4", "postc/4")] + [InlineData("GET", "/test1/getdd/5", "getd/5/")] + [InlineData("POST", "/test1/postdd/5", "postd/5/")] + [InlineData("GET", "/test1/getee/6/7", "gete/6/7")] + [InlineData("POST", "/test1/postee/6/7", "poste/6/7")] + public async Task FindRoutes(string method, string path, string aResult) { TwinoMvc mvc = new TwinoMvc(); mvc.Init(); @@ -38,11 +111,11 @@ public async Task Test(string method, string path) TwinoController controller = await mvc.ControllerFactory.CreateInstance(mvc, match.Route.ControllerType, request, response, mvc.Services.CreateScope()); var parameters = MvcConnectionHandler.FillParameters(request, match).Select(x => x.Value).ToArray(); - Task task = (Task) match.Route.ActionType.Invoke(controller, parameters); + Task task = (Task)match.Route.ActionType.Invoke(controller, parameters); IActionResult result = task.Result; - string url = Encoding.UTF8.GetString(((MemoryStream) result.Stream).ToArray()); - Assert.Equal(url, path); + string url = Encoding.UTF8.GetString(((MemoryStream)result.Stream).ToArray()); + url.Should().Be(aResult); } } } \ No newline at end of file diff --git a/src/Tests/Test.Mvc/Test.Mvc.csproj b/src/Tests/Test.Mvc/Test.Mvc.csproj index fdc35d75..5ebb2e45 100644 --- a/src/Tests/Test.Mvc/Test.Mvc.csproj +++ b/src/Tests/Test.Mvc/Test.Mvc.csproj @@ -9,6 +9,7 @@ + From fd921aa977cffebcd287777e8bf26530ed17cb89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Helvac=C4=B1k=C3=B6yl=C3=BC?= Date: Sat, 29 Feb 2020 00:03:20 +0300 Subject: [PATCH 08/10] route sort fix --- src/Twino.Mvc/Routing/RouteBuilder.cs | 18 +++++++++++++----- src/Twino.Mvc/TwinoMvc.cs | 3 ++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/Twino.Mvc/Routing/RouteBuilder.cs b/src/Twino.Mvc/Routing/RouteBuilder.cs index 925eeb03..6ceb3e19 100644 --- a/src/Twino.Mvc/Routing/RouteBuilder.cs +++ b/src/Twino.Mvc/Routing/RouteBuilder.cs @@ -96,12 +96,23 @@ public IEnumerable BuildRoutes(Type controllerType) /// /// Sorts all route leaves recursively /// - internal void SortRoutes(RouteLeaf leaf) + internal void SortChildren(RouteLeaf leaf) { if (leaf.Children.Count == 0) return; + + SortRoutes(leaf.Children); + + foreach (RouteLeaf child in leaf.Children) + SortChildren(child); + } + + internal void SortRoutes(List leaves) + { + if (leaves.Count < 2) + return; - leaf.Children.Sort((a, b) => + leaves.Sort((a, b) => { if (string.IsNullOrEmpty(a.Path.Value)) return 1; @@ -111,9 +122,6 @@ internal void SortRoutes(RouteLeaf leaf) return 0; }); - - foreach (RouteLeaf child in leaf.Children) - SortRoutes(child); } /// diff --git a/src/Twino.Mvc/TwinoMvc.cs b/src/Twino.Mvc/TwinoMvc.cs index 02ff3f31..c08bfe48 100644 --- a/src/Twino.Mvc/TwinoMvc.cs +++ b/src/Twino.Mvc/TwinoMvc.cs @@ -186,8 +186,9 @@ public void CreateRoutes(Assembly assembly = null) } foreach (RouteLeaf root in leaves) - builder.SortRoutes(root); + builder.SortChildren(root); + builder.SortRoutes(leaves); foreach (RouteLeaf route in leaves) Routes.Add(route); } From 05ac5ce35d16ba894999c5e072b68344d1d5bcda Mon Sep 17 00:00:00 2001 From: "hizliemre@gmail.com" Date: Sat, 29 Feb 2020 00:06:09 +0300 Subject: [PATCH 09/10] update version --- src/Twino.Client.Connectors/Twino.Client.Connectors.csproj | 6 +++--- src/Twino.Client.TMQ/Twino.Client.TMQ.csproj | 6 +++--- src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj | 6 +++--- src/Twino.Core/Twino.Core.csproj | 6 +++--- .../obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs | 4 ++-- src/Twino.Extensions.Data/Twino.Extensions.Data.csproj | 6 +++--- src/Twino.Extensions.Http/Twino.Extensions.Http.csproj | 6 +++--- .../netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs | 4 ++-- src/Twino.Ioc/Twino.Ioc.csproj | 6 +++--- .../obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs | 4 ++-- src/Twino.MQ.Data/Twino.MQ.Data.csproj | 6 +++--- src/Twino.MQ/Twino.MQ.csproj | 6 +++--- .../obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs | 4 ++-- src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj | 6 +++--- .../netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs | 4 ++-- src/Twino.Mvc/Twino.Mvc.csproj | 6 +++--- src/Twino.Protocols.Http/Twino.Protocols.Http.csproj | 6 +++--- .../netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs | 4 ++-- src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj | 6 +++--- .../Twino.Protocols.WebSocket.csproj | 6 +++--- .../netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs | 4 ++-- src/Twino.SerializableModel/Twino.SerializableModel.csproj | 6 +++--- .../netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs | 4 ++-- src/Twino.Server/Twino.Server.csproj | 6 +++--- 24 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj b/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj index 04801e4b..bd800495 100644 --- a/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj +++ b/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj @@ -6,9 +6,9 @@ Twino.Client.Connectors Connectors for twino WebSocket and TMQ protocols twino,server,client,connector,websocket,tmq - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj b/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj index 8eafcbd5..ef0584b5 100644 --- a/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj +++ b/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj @@ -6,9 +6,9 @@ Twino.Client.TMQ Twino Messaging Queue Client to connect all TMQ Servers twino,tmq,client,mq,messaging,queue - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj b/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj index ee933c91..f7b00526 100644 --- a/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj +++ b/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj @@ -6,9 +6,9 @@ Twino.Client.WebSocket Twino WebSocket Client to connect all WebSocket servers twino,websocket,client - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Core/Twino.Core.csproj b/src/Twino.Core/Twino.Core.csproj index e15bdf2c..34e814c0 100644 --- a/src/Twino.Core/Twino.Core.csproj +++ b/src/Twino.Core/Twino.Core.csproj @@ -6,9 +6,9 @@ Twino.Core Twino Core library for all twino servers, protocols and services twino,server,core - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs b/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs index cd155608..55356f04 100644 --- a/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs +++ b/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Core library for all twino servers, protocols and services")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Core")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj b/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj index ce360212..ee07285e 100644 --- a/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj +++ b/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj @@ -6,9 +6,9 @@ Twino.Extensions.Data Entity Framework Core Data Context extension for Twino IOC twino,entity,framework,data,context,factory,ioc,service - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj b/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj index 6a9d1dac..469ea31d 100644 --- a/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj +++ b/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj @@ -6,9 +6,9 @@ Twino.Extensions.Http HttpClient Factory extension for Twino IOC twino,http,client,factory,ioc,dependency,injection,service - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs b/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs index dd583ba6..8b9f67d3 100644 --- a/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs +++ b/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("HttpClient Factory extension for Twino IOC")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Extensions.Http")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Extensions.Http")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Ioc/Twino.Ioc.csproj b/src/Twino.Ioc/Twino.Ioc.csproj index 97c1b98e..9c197703 100644 --- a/src/Twino.Ioc/Twino.Ioc.csproj +++ b/src/Twino.Ioc/Twino.Ioc.csproj @@ -6,9 +6,9 @@ Twino.Ioc Twino IOC Service containers and scopes twino,ioc,dependency,injection,service,container,scope - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs b/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs index 7ce3e73c..ab2d4a1d 100644 --- a/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs +++ b/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino IOC Service containers and scopes")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Ioc")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Ioc")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.MQ.Data/Twino.MQ.Data.csproj b/src/Twino.MQ.Data/Twino.MQ.Data.csproj index 574d4e5a..46199851 100644 --- a/src/Twino.MQ.Data/Twino.MQ.Data.csproj +++ b/src/Twino.MQ.Data/Twino.MQ.Data.csproj @@ -6,9 +6,9 @@ Twino.MQ.Data Persistant queue message data library for Twino MQ twino,server,messaging,queue,mq,persistent,database,db - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.MQ/Twino.MQ.csproj b/src/Twino.MQ/Twino.MQ.csproj index a1d06a7b..cfb1f12a 100644 --- a/src/Twino.MQ/Twino.MQ.csproj +++ b/src/Twino.MQ/Twino.MQ.csproj @@ -6,9 +6,9 @@ Twino.MQ Messaging Queue Server library with TMQ Protocol via Twino Server twino,server,tmq,messaging,queue,mq - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs b/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs index dada5fce..59fabae2 100644 --- a/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs +++ b/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Messaging Queue Server library with TMQ Protocol via Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.MQ")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.MQ")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj b/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj index 4f1dbc14..be66eb91 100644 --- a/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj +++ b/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj @@ -6,9 +6,9 @@ Twino.Mvc.Auth.Jwt JSON Web Token Authentication and Authorization library for Twino MVC twino,http,mvc,jwt,token,authentication,authorization - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs b/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs index d5523f79..a497d1bf 100644 --- a/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs +++ b/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("JSON Web Token Authentication and Authorization library for Twino MVC")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Mvc.Auth.Jwt")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Mvc.Auth.Jwt")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Mvc/Twino.Mvc.csproj b/src/Twino.Mvc/Twino.Mvc.csproj index 7cabaa61..9dae06e6 100644 --- a/src/Twino.Mvc/Twino.Mvc.csproj +++ b/src/Twino.Mvc/Twino.Mvc.csproj @@ -6,9 +6,9 @@ Twino.Mvc MVC Library for Twino Http Server twino,http,server,mvc - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj b/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj index 7fc410a9..5f853926 100644 --- a/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj +++ b/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj @@ -6,9 +6,9 @@ Twino.Protocols.Http Twino Http Protocol library and server extension for Twino Server twino,tcp,server,http,protocol - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs b/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs index 3e8a2c15..cefcad11 100644 --- a/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs +++ b/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Http Protocol library and server extension for Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Protocols.Http")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Protocols.Http")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj b/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj index 86440a28..0686c7ce 100644 --- a/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj +++ b/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj @@ -6,9 +6,9 @@ Twino.Protocols.TMQ Twino Messaging Queue (TMQ) Protocol library and server extension for Twino Server twino,tcp,server,http,messaging,queue,tmq,mq,protocol - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj b/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj index 3d2b1fb5..bc51f479 100644 --- a/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj +++ b/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj @@ -6,9 +6,9 @@ Twino.Protocols.WebSocket WebSocket Protocol library and server extension for Twino Server twino,tcp,server,http,websocket,protocol,ws - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs b/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs index a3a60571..c767ffb6 100644 --- a/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs +++ b/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("WebSocket Protocol library and server extension for Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Protocols.WebSocket")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Protocols.WebSocket")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.SerializableModel/Twino.SerializableModel.csproj b/src/Twino.SerializableModel/Twino.SerializableModel.csproj index 3325037e..02a60fdc 100644 --- a/src/Twino.SerializableModel/Twino.SerializableModel.csproj +++ b/src/Twino.SerializableModel/Twino.SerializableModel.csproj @@ -6,9 +6,9 @@ Twino.SerializableModel Twino Serializable Model library for object based communication with text-based protocols twino,tcp,server,http,websocket,serilizable,model - 2.7.12 - 2.7.12 - 2.7.12 + 27.14 + 27.14 + 27.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs b/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs index 19323762..47f7afa1 100644 --- a/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs +++ b/src/Twino.SerializableModel/obj/Release/netcoreapp3.0/Twino.SerializableModel.AssemblyInfo.cs @@ -15,11 +15,11 @@ [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Serializable Model library for object based communication with text-based p" + "rotocols")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.SerializableModel")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.SerializableModel")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.7.12")] +[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Server/Twino.Server.csproj b/src/Twino.Server/Twino.Server.csproj index fda7c063..352482ed 100644 --- a/src/Twino.Server/Twino.Server.csproj +++ b/src/Twino.Server/Twino.Server.csproj @@ -6,9 +6,9 @@ Twino.Server Twino TCP Socket Server twino,tcp,socket,server,http,websocket,tmq,mq - 2.7.12 - 2.7.12 - 2.7.12 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino From a10dd907860a21f53ea1b4d63cd1553642107cb6 Mon Sep 17 00:00:00 2001 From: "hizliemre@gmail.com" Date: Sat, 29 Feb 2020 00:10:51 +0300 Subject: [PATCH 10/10] fixed versions --- src/Twino.Client.Connectors/Twino.Client.Connectors.csproj | 6 +++--- src/Twino.Client.TMQ/Twino.Client.TMQ.csproj | 6 +++--- src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj | 6 +++--- src/Twino.Core/Twino.Core.csproj | 6 +++--- .../obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs | 4 ++-- src/Twino.Extensions.Data/Twino.Extensions.Data.csproj | 6 +++--- src/Twino.Extensions.Http/Twino.Extensions.Http.csproj | 6 +++--- .../netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs | 4 ++-- src/Twino.Ioc/Twino.Ioc.csproj | 6 +++--- .../obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs | 4 ++-- src/Twino.MQ.Data/Twino.MQ.Data.csproj | 6 +++--- src/Twino.MQ/Twino.MQ.csproj | 6 +++--- .../obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs | 4 ++-- src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj | 6 +++--- .../netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs | 4 ++-- src/Twino.Mvc/Twino.Mvc.csproj | 6 +++--- src/Twino.Protocols.Http/Twino.Protocols.Http.csproj | 6 +++--- .../netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs | 4 ++-- src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj | 6 +++--- .../Twino.Protocols.WebSocket.csproj | 6 +++--- .../netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs | 4 ++-- src/Twino.SerializableModel/Twino.SerializableModel.csproj | 6 +++--- 22 files changed, 59 insertions(+), 59 deletions(-) diff --git a/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj b/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj index bd800495..e28a606d 100644 --- a/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj +++ b/src/Twino.Client.Connectors/Twino.Client.Connectors.csproj @@ -6,9 +6,9 @@ Twino.Client.Connectors Connectors for twino WebSocket and TMQ protocols twino,server,client,connector,websocket,tmq - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj b/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj index ef0584b5..6adecc99 100644 --- a/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj +++ b/src/Twino.Client.TMQ/Twino.Client.TMQ.csproj @@ -6,9 +6,9 @@ Twino.Client.TMQ Twino Messaging Queue Client to connect all TMQ Servers twino,tmq,client,mq,messaging,queue - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj b/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj index f7b00526..c13d3dfc 100644 --- a/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj +++ b/src/Twino.Client.WebSocket/Twino.Client.WebSocket.csproj @@ -6,9 +6,9 @@ Twino.Client.WebSocket Twino WebSocket Client to connect all WebSocket servers twino,websocket,client - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Core/Twino.Core.csproj b/src/Twino.Core/Twino.Core.csproj index 34e814c0..bdeb2782 100644 --- a/src/Twino.Core/Twino.Core.csproj +++ b/src/Twino.Core/Twino.Core.csproj @@ -6,9 +6,9 @@ Twino.Core Twino Core library for all twino servers, protocols and services twino,server,core - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs b/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs index 55356f04..2007dd4f 100644 --- a/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs +++ b/src/Twino.Core/obj/Release/netcoreapp3.0/Twino.Core.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Core library for all twino servers, protocols and services")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Core")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj b/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj index ee07285e..e266471e 100644 --- a/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj +++ b/src/Twino.Extensions.Data/Twino.Extensions.Data.csproj @@ -6,9 +6,9 @@ Twino.Extensions.Data Entity Framework Core Data Context extension for Twino IOC twino,entity,framework,data,context,factory,ioc,service - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj b/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj index 469ea31d..0761b539 100644 --- a/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj +++ b/src/Twino.Extensions.Http/Twino.Extensions.Http.csproj @@ -6,9 +6,9 @@ Twino.Extensions.Http HttpClient Factory extension for Twino IOC twino,http,client,factory,ioc,dependency,injection,service - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs b/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs index 8b9f67d3..798b01c8 100644 --- a/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs +++ b/src/Twino.Extensions.Http/obj/Release/netcoreapp3.0/Twino.Extensions.Http.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("HttpClient Factory extension for Twino IOC")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Extensions.Http")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Extensions.Http")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Ioc/Twino.Ioc.csproj b/src/Twino.Ioc/Twino.Ioc.csproj index 9c197703..ca72c0e0 100644 --- a/src/Twino.Ioc/Twino.Ioc.csproj +++ b/src/Twino.Ioc/Twino.Ioc.csproj @@ -6,9 +6,9 @@ Twino.Ioc Twino IOC Service containers and scopes twino,ioc,dependency,injection,service,container,scope - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs b/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs index ab2d4a1d..dbb03152 100644 --- a/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs +++ b/src/Twino.Ioc/obj/Release/netcoreapp3.0/Twino.Ioc.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino IOC Service containers and scopes")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Ioc")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Ioc")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.MQ.Data/Twino.MQ.Data.csproj b/src/Twino.MQ.Data/Twino.MQ.Data.csproj index 46199851..118503db 100644 --- a/src/Twino.MQ.Data/Twino.MQ.Data.csproj +++ b/src/Twino.MQ.Data/Twino.MQ.Data.csproj @@ -6,9 +6,9 @@ Twino.MQ.Data Persistant queue message data library for Twino MQ twino,server,messaging,queue,mq,persistent,database,db - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.MQ/Twino.MQ.csproj b/src/Twino.MQ/Twino.MQ.csproj index cfb1f12a..7e0e587a 100644 --- a/src/Twino.MQ/Twino.MQ.csproj +++ b/src/Twino.MQ/Twino.MQ.csproj @@ -6,9 +6,9 @@ Twino.MQ Messaging Queue Server library with TMQ Protocol via Twino Server twino,server,tmq,messaging,queue,mq - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs b/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs index 59fabae2..94764120 100644 --- a/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs +++ b/src/Twino.MQ/obj/Release/netcoreapp3.0/Twino.MQ.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Messaging Queue Server library with TMQ Protocol via Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.MQ")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.MQ")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj b/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj index be66eb91..7bb84559 100644 --- a/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj +++ b/src/Twino.Mvc.Auth.Jwt/Twino.Mvc.Auth.Jwt.csproj @@ -6,9 +6,9 @@ Twino.Mvc.Auth.Jwt JSON Web Token Authentication and Authorization library for Twino MVC twino,http,mvc,jwt,token,authentication,authorization - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs b/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs index a497d1bf..4b8658eb 100644 --- a/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs +++ b/src/Twino.Mvc.Auth.Jwt/obj/Release/netcoreapp3.0/Twino.Mvc.Auth.Jwt.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("JSON Web Token Authentication and Authorization library for Twino MVC")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Mvc.Auth.Jwt")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Mvc.Auth.Jwt")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Mvc/Twino.Mvc.csproj b/src/Twino.Mvc/Twino.Mvc.csproj index 9dae06e6..15fe3396 100644 --- a/src/Twino.Mvc/Twino.Mvc.csproj +++ b/src/Twino.Mvc/Twino.Mvc.csproj @@ -6,9 +6,9 @@ Twino.Mvc MVC Library for Twino Http Server twino,http,server,mvc - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj b/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj index 5f853926..cf6b4f31 100644 --- a/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj +++ b/src/Twino.Protocols.Http/Twino.Protocols.Http.csproj @@ -6,9 +6,9 @@ Twino.Protocols.Http Twino Http Protocol library and server extension for Twino Server twino,tcp,server,http,protocol - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs b/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs index cefcad11..647857c0 100644 --- a/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs +++ b/src/Twino.Protocols.Http/obj/Release/netcoreapp3.0/Twino.Protocols.Http.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Twino Http Protocol library and server extension for Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Protocols.Http")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Protocols.Http")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj b/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj index 0686c7ce..281a4881 100644 --- a/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj +++ b/src/Twino.Protocols.TMQ/Twino.Protocols.TMQ.csproj @@ -6,9 +6,9 @@ Twino.Protocols.TMQ Twino Messaging Queue (TMQ) Protocol library and server extension for Twino Server twino,tcp,server,http,messaging,queue,tmq,mq,protocol - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj b/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj index bc51f479..92991df0 100644 --- a/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj +++ b/src/Twino.Protocols.WebSocket/Twino.Protocols.WebSocket.csproj @@ -6,9 +6,9 @@ Twino.Protocols.WebSocket WebSocket Protocol library and server extension for Twino Server twino,tcp,server,http,websocket,protocol,ws - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino diff --git a/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs b/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs index c767ffb6..77191714 100644 --- a/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs +++ b/src/Twino.Protocols.WebSocket/obj/Release/netcoreapp3.0/Twino.Protocols.WebSocket.AssemblyInfo.cs @@ -14,11 +14,11 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Mehmet Helvacıköylü")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyDescriptionAttribute("WebSocket Protocol library and server extension for Twino Server")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.14")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Twino.Protocols.WebSocket")] [assembly: System.Reflection.AssemblyTitleAttribute("Twino.Protocols.WebSocket")] -[assembly: System.Reflection.AssemblyVersionAttribute("27.14")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.7.14")] // Generated by the MSBuild WriteCodeFragment class. diff --git a/src/Twino.SerializableModel/Twino.SerializableModel.csproj b/src/Twino.SerializableModel/Twino.SerializableModel.csproj index 02a60fdc..294f79c9 100644 --- a/src/Twino.SerializableModel/Twino.SerializableModel.csproj +++ b/src/Twino.SerializableModel/Twino.SerializableModel.csproj @@ -6,9 +6,9 @@ Twino.SerializableModel Twino Serializable Model library for object based communication with text-based protocols twino,tcp,server,http,websocket,serilizable,model - 27.14 - 27.14 - 27.14 + 2.7.14 + 2.7.14 + 2.7.14 true Mehmet Helvacıköylü https://github.com/mhelvacikoylu/twino