diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/Child.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/Child.cs new file mode 100644 index 00000000..a9d6f57a --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/Child.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace DataAnnotationsValidator.Tests +{ + public class Child : IValidatableObject + { + [Required(ErrorMessage = "Child Parent is required")] + public Parent Parent { get; set; } + + [Required(ErrorMessage = "Child PropertyA is required")] + [Range(0, 10, ErrorMessage = "Child PropertyA not within range")] + public int? PropertyA { get; set; } + + [Required(ErrorMessage = "Child PropertyB is required")] + [Range(0, 10, ErrorMessage = "Child PropertyB not within range")] + public int? PropertyB { get; set; } + + public IEnumerable GrandChildren { get; set; } + + [SaveValidationContext] + public bool HasNoRealValidation { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (PropertyA.HasValue && PropertyB.HasValue && (PropertyA + PropertyB > 10)) + yield return new ValidationResult("Child PropertyA and PropertyB cannot add up to more than 10"); + } + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/ClassWithDictionary.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/ClassWithDictionary.cs new file mode 100644 index 00000000..7519b043 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/ClassWithDictionary.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace DataAnnotationsValidator.Tests +{ + public class ClassWithDictionary + { + public List> Objects { get; set; } + } +} \ No newline at end of file diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/ClassWithNullableEnumeration.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/ClassWithNullableEnumeration.cs new file mode 100644 index 00000000..3a43721c --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/ClassWithNullableEnumeration.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace DataAnnotationsValidator.Tests +{ + public class ClassWithNullableEnumeration + { + public List Objects { get; set; } + } +} \ No newline at end of file diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/DataAnnotationsValidator.Tests.csproj b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/DataAnnotationsValidator.Tests.csproj new file mode 100644 index 00000000..3ab28e6c --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/DataAnnotationsValidator.Tests.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp2.0 + + + + + + + + + + + + + diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/DataAnnotationsValidatorTests.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/DataAnnotationsValidatorTests.cs new file mode 100644 index 00000000..eb68cb97 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/DataAnnotationsValidatorTests.cs @@ -0,0 +1,247 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using NUnit.Framework; + +namespace DataAnnotationsValidator.Tests +{ + [TestFixture] + public class DataAnnotationsValidatorTests + { + private IDataAnnotationsValidator _validator; + + [SetUp] + public void Setup() + { + SaveValidationContextAttribute.SavedContexts.Clear(); + _validator = new DataAnnotationsValidator(); + } + + [Test] + public void TryValidateObject_on_valid_parent_returns_no_errors() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + var validationResults = new List(); + + var result = _validator.TryValidateObject(parent, validationResults); + + Assert.IsTrue(result); + Assert.AreEqual(0, validationResults.Count); + } + + [Test] + public void TryValidateObject_when_missing_required_properties_returns_errors() + { + var parent = new Parent { PropertyA = null, PropertyB = null }; + var validationResults = new List(); + + var result = _validator.TryValidateObject(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(2, validationResults.Count); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "Parent PropertyA is required")); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "Parent PropertyB is required")); + } + + [Test] + public void TryValidateObject_calls_IValidatableObject_method() + { + var parent = new Parent { PropertyA = 5, PropertyB = 6 }; + var validationResults = new List(); + + var result = _validator.TryValidateObject(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(1, validationResults.Count); + Assert.AreEqual("Parent PropertyA and PropertyB cannot add up to more than 10", validationResults[0].ErrorMessage); + } + + [Test] + public void TryValidateObjectRecursive_returns_errors_when_child_class_has_invalid_properties() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + parent.Child = new Child { Parent = parent, PropertyA = null, PropertyB = 5 }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(1, validationResults.Count); + Assert.AreEqual("Child PropertyA is required", validationResults[0].ErrorMessage); + } + + [Test] + public void TryValidateObjectRecursive_ignored_errors_when_child_class_has_SkipRecursiveValidationProperty() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + parent.Child = new Child { Parent = parent, PropertyA = 1, PropertyB = 1 }; + parent.SkippedChild = new Child { PropertyA = null, PropertyB = 1 }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsTrue(result); + } + + [Test] + public void TryValidateObjectRecursive_calls_IValidatableObject_method_on_child_class() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + parent.Child = new Child { Parent = parent, PropertyA = 5, PropertyB = 6 }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(1, validationResults.Count); + Assert.AreEqual("Child PropertyA and PropertyB cannot add up to more than 10", validationResults[0].ErrorMessage); + } + + [Test] + public void TryValidateObjectRecursive_returns_errors_when_grandchild_class_has_invalid_properties() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + parent.Child = new Child + { + Parent = parent, + PropertyA = 1, + PropertyB = 1, + GrandChildren = new[] {new GrandChild {PropertyA = 11, PropertyB = 11}} + }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(2, validationResults.Count); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "GrandChild PropertyA not within range")); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "GrandChild PropertyB not within range")); + } + + [Test] + public void TryValidateObjectRecursive_passes_validation_context_items_to_all_validation_calls() + { + var parent = new Parent {Child = new Child {GrandChildren = new[] {new GrandChild()}}}; + var validationResults = new List(); + + var contextItems = new Dictionary { { "key", 12345 } }; + + _validator.TryValidateObjectRecursive(parent, validationResults, contextItems); + + Assert.AreEqual(3, SaveValidationContextAttribute.SavedContexts.Count, "Test expects 3 validated properties in the object graph to have a SaveValidationContextAttribute"); + Assert.That(SaveValidationContextAttribute.SavedContexts.Select(c => c.Items).All(items => items["key"] == contextItems["key"])); + } + + [Test] + public void TryValidateObject_calls_grandchild_IValidatableObject_method() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + parent.Child = new Child + { + Parent = parent, + PropertyA = 1, + PropertyB = 1, + GrandChildren = new[] {new GrandChild {PropertyA = 5, PropertyB = 6}} + }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(1, validationResults.Count); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "GrandChild PropertyA and PropertyB cannot add up to more than 10")); + } + + [Test] + public void TryValidateObject_includes_errors_from_all_objects() + { + var parent = new Parent { PropertyA = 5, PropertyB = 6 }; + parent.Child = new Child + { + Parent = parent, + PropertyA = 5, + PropertyB = 6, + GrandChildren = new[] {new GrandChild {PropertyA = 5, PropertyB = 6}} + }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(3, validationResults.Count); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "Parent PropertyA and PropertyB cannot add up to more than 10")); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "Child PropertyA and PropertyB cannot add up to more than 10")); + Assert.AreEqual(1, validationResults.Count(x => x.ErrorMessage == "GrandChild PropertyA and PropertyB cannot add up to more than 10")); + } + + [Test] + public void TryValidateObject_modifies_membernames_for_nested_properties() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + parent.Child = new Child { Parent = parent, PropertyA = null, PropertyB = 5 }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(parent, validationResults); + + Assert.IsFalse(result); + Assert.AreEqual(1, validationResults.Count); + Assert.AreEqual("Child PropertyA is required", validationResults[0].ErrorMessage); + Assert.AreEqual("Child.PropertyA", validationResults[0].MemberNames.First()); + } + + [Test] + public void TryValidateObject_object_with_dictionary_does_not_fail() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + var classWithDictionary = new ClassWithDictionary + { + Objects = new List> + { + new Dictionary + { + { "key", + new Child + { + Parent = parent, + PropertyA = 1, + PropertyB = 2 + } + } + } + } + }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(classWithDictionary, validationResults); + + Assert.IsTrue(result); + Assert.IsEmpty(validationResults); + } + + [Test] + public void TryValidateObject_object_with_null_enumeration_values_does_not_fail() + { + var parent = new Parent { PropertyA = 1, PropertyB = 1 }; + var classWithNullableEnumeration = new ClassWithNullableEnumeration + { + Objects = new List + { + null, + new Child + { + Parent = parent, + PropertyA = 1, + PropertyB = 2 + } + } + }; + var validationResults = new List(); + + var result = _validator.TryValidateObjectRecursive(classWithNullableEnumeration, validationResults); + + Assert.IsTrue(result); + Assert.IsEmpty(validationResults); + } + + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/GrandChild.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/GrandChild.cs new file mode 100644 index 00000000..f7cc1950 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/GrandChild.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace DataAnnotationsValidator.Tests +{ + public class GrandChild : IValidatableObject + { + [Required] + [Range(0, 10, ErrorMessage = "GrandChild PropertyA not within range")] + public int? PropertyA { get; set; } + + [Required] + [Range(0, 10, ErrorMessage = "GrandChild PropertyB not within range")] + public int? PropertyB { get; set; } + + [SaveValidationContext] + public bool HasNoRealValidation { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (PropertyA.HasValue && PropertyB.HasValue && (PropertyA + PropertyB > 10)) + yield return new ValidationResult("GrandChild PropertyA and PropertyB cannot add up to more than 10"); + } + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/Parent.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/Parent.cs new file mode 100644 index 00000000..f6163e8e --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/Parent.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace DataAnnotationsValidator.Tests +{ + public class Parent : IValidatableObject + { + [Required(ErrorMessage = "Parent PropertyA is required")] + [Range(0, 10, ErrorMessage = "Parent PropertyA not within range")] + public int? PropertyA { get; set; } + + [Required(ErrorMessage = "Parent PropertyB is required")] + [Range(0, 10, ErrorMessage = "Parent PropertyB not within range")] + public int? PropertyB { get; set; } + + public Child Child { get; set; } + + [SkipRecursiveValidation] + public Child SkippedChild { get; set; } + + [SaveValidationContext] + public bool HasNoRealValidation { get; set; } + + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + if (PropertyA.HasValue && PropertyB.HasValue && (PropertyA + PropertyB > 10)) + yield return new ValidationResult("Parent PropertyA and PropertyB cannot add up to more than 10"); + } + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/SaveValidationContextAttribute.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/SaveValidationContextAttribute.cs new file mode 100644 index 00000000..12c51be9 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator.Tests/SaveValidationContextAttribute.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace DataAnnotationsValidator.Tests +{ + public class SaveValidationContextAttribute: ValidationAttribute + { + public static IList SavedContexts = new List(); + + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + SavedContexts.Add(validationContext); + return ValidationResult.Success; + } + } +} \ No newline at end of file diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/DataAnnotationsValidator.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/DataAnnotationsValidator.cs new file mode 100644 index 00000000..33f19d3a --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/DataAnnotationsValidator.cs @@ -0,0 +1,81 @@ +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; + +namespace DataAnnotationsValidator +{ + public class DataAnnotationsValidator : IDataAnnotationsValidator + { + public bool TryValidateObject(object obj, ICollection results, IDictionary validationContextItems = null) + { + return Validator.TryValidateObject(obj, new ValidationContext(obj, null, validationContextItems), results, true); + } + + public bool TryValidateObjectRecursive(T obj, List results, IDictionary validationContextItems = null) + { + return TryValidateObjectRecursive(obj, results, new HashSet(), validationContextItems); + } + + private bool TryValidateObjectRecursive(T obj, ICollection results, ISet validatedObjects, IDictionary validationContextItems = null) + { + //short-circuit to avoid infinit loops on cyclical object graphs + if (validatedObjects.Contains(obj)) + { + return true; + } + + validatedObjects.Add(obj); + bool result = TryValidateObject(obj, results, validationContextItems); + + var properties = obj.GetType().GetProperties().Where(prop => prop.CanRead + && !prop.GetCustomAttributes(typeof(SkipRecursiveValidation), false).Any() + && prop.GetIndexParameters().Length == 0).ToList(); + + foreach (var property in properties) + { + if (property.PropertyType == typeof(string) || property.PropertyType.IsValueType) continue; + + var value = obj.GetPropertyValue(property.Name); + + List nestedResults; + switch (value) + { + case null: + continue; + case IEnumerable asEnumerable: + foreach (var enumObj in asEnumerable) + { + if (enumObj == null) continue; + nestedResults = new List(); + if (!TryValidateObjectRecursive(enumObj, nestedResults, validatedObjects, validationContextItems)) + { + result = false; + foreach (var validationResult in nestedResults) + { + var property1 = property; + results.Add(new ValidationResult(validationResult.ErrorMessage, validationResult.MemberNames.Select(x => property1.Name + '.' + x))); + } + } + } + + break; + default: + nestedResults = new List(); + if (!TryValidateObjectRecursive(value, nestedResults, validatedObjects, validationContextItems)) + { + result = false; + foreach (var validationResult in nestedResults) + { + var property1 = property; + results.Add(new ValidationResult(validationResult.ErrorMessage, validationResult.MemberNames.Select(x => property1.Name + '.' + x))); + } + } + break; + } + } + + return result; + } + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/DataAnnotationsValidator.csproj b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/DataAnnotationsValidator.csproj new file mode 100644 index 00000000..4c4eebb7 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/DataAnnotationsValidator.csproj @@ -0,0 +1,14 @@ + + + + netstandard2.0 + false + 7.0.27-beta + true + + + + + + + diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/IDataAnnotationsValidator.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/IDataAnnotationsValidator.cs new file mode 100644 index 00000000..1fa0f79c --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/IDataAnnotationsValidator.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace DataAnnotationsValidator +{ + public interface IDataAnnotationsValidator + { + bool TryValidateObject(object obj, ICollection results, IDictionary validationContextItems = null); + bool TryValidateObjectRecursive(T obj, List results, IDictionary validationContextItems = null); + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/ObjectExtensions.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/ObjectExtensions.cs new file mode 100644 index 00000000..542ab24d --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/ObjectExtensions.cs @@ -0,0 +1,16 @@ +namespace DataAnnotationsValidator +{ + public static class ObjectExtensions + { + public static object GetPropertyValue(this object o, string propertyName) + { + object objValue = string.Empty; + + var propertyInfo = o.GetType().GetProperty(propertyName); + if (propertyInfo != null) + objValue = propertyInfo.GetValue(o, null); + + return objValue; + } + } +} diff --git a/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/SkipRecursiveValidation.cs b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/SkipRecursiveValidation.cs new file mode 100644 index 00000000..ccb8b773 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/DataAnnotationsValidator/SkipRecursiveValidation.cs @@ -0,0 +1,8 @@ +using System; + +namespace DataAnnotationsValidator +{ + public class SkipRecursiveValidation : Attribute + { + } +} diff --git a/DataAnnotationsValidatorRecursive/License.md b/DataAnnotationsValidatorRecursive/License.md new file mode 100644 index 00000000..cad030c6 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/License.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Mike Reust + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/DataAnnotationsValidatorRecursive/README.md b/DataAnnotationsValidatorRecursive/README.md new file mode 100644 index 00000000..172ce8a3 --- /dev/null +++ b/DataAnnotationsValidatorRecursive/README.md @@ -0,0 +1,21 @@ +# DataAnnotationsValidatorRecursive + +The helper will recursively traverse your object graph and invoke validation against DataAnnotations. +This originated from following Stackoverflow answer: http://stackoverflow.com/a/8090614/605586 + +## Installation + +Available as NuGet-Package `dataannotationsvalidator`: + + Install-Package dataannotationsvalidator + +## Usage + +See file `DataAnnotationsValidator/DataAnnotationsValidator.Tests/DataAnnotationsValidatorTests.cs` + +Short example: + + var validator = new DataAnnotationsValidator.DataAnnotationsValidator(); + var validationResults = new List(); + + validator.TryValidateObjectRecursive(modelToValidate, validationResults); diff --git a/Gigya.Microdot.Common.Tests/Gigya.Microdot.Common.Tests.csproj b/Gigya.Microdot.Common.Tests/Gigya.Microdot.Common.Tests.csproj index 1fdf46a7..9baa9c88 100644 --- a/Gigya.Microdot.Common.Tests/Gigya.Microdot.Common.Tests.csproj +++ b/Gigya.Microdot.Common.Tests/Gigya.Microdot.Common.Tests.csproj @@ -1,145 +1,20 @@ - - - + + - Debug - AnyCPU - {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE} - Library - Properties - Gigya.Microdot.Common.Tests - Gigya.Microdot.Common.Tests - v4.7.2 - 512 - true - 1591 + netstandard2.0 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - + - + + - - {2865f69b-d847-4901-8945-4941e463f94e} - Gigya.Microdot.Fakes - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {a90d7c71-ec7c-4328-9db1-d2c3a30727db} - Gigya.Microdot.Interfaces - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {c88db2a8-a1d2-46f8-8b65-06b9ee3f1662} - Gigya.Microdot.SharedLogic - + + + + + - - - - - - True - - - ..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\NSubstitute\lib\net46\NSubstitute.dll - True - True - - - - - - - - - ..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Configuration/ConfigurationFilesWatcher.cs b/Gigya.Microdot.Configuration/ConfigurationFilesWatcher.cs index 228135a1..b01bc103 100644 --- a/Gigya.Microdot.Configuration/ConfigurationFilesWatcher.cs +++ b/Gigya.Microdot.Configuration/ConfigurationFilesWatcher.cs @@ -65,7 +65,28 @@ public ConfigurationFilesWatcher(IConfigurationLocationsParser configurationLoca private void CreateRootWatcher() { - + var usePolling = Environment.GetEnvironmentVariable("GIGYA_CONFIG_USE_POLLING"); + if (usePolling == "true") + { + CreateSchedualWatcher(); + } + else + { + CreateFileSystemWatcher(); + } + } + + private void CreateSchedualWatcher() + { + var pollingIntervalEnvVar = Environment.GetEnvironmentVariable("GIGYA_CONFIG_POLLING_INTERVAL"); + bool ok = int.TryParse(pollingIntervalEnvVar, out int pollingInterval); + if (!ok) pollingInterval = 30; // Default + + refreshTimer.Change(TimeSpan.FromSeconds(pollingInterval), TimeSpan.FromSeconds(pollingInterval)); + } + + private void CreateFileSystemWatcher() + { _rootWatcher = new FileSystemWatcher { Path = Path.GetDirectoryName(ConfigurationLocationsParser.ConfigRoot), @@ -81,7 +102,6 @@ private void CreateRootWatcher() _rootWatcher.Deleted += OnRootChanged; } - private void OnRootChanged(object sender, FileSystemEventArgs e) { if (!e.FullPath.Contains(".git")) @@ -101,7 +121,7 @@ private void OnRootChanged(object sender, FileSystemEventArgs e) public void Dispose() { - _rootWatcher.Dispose(); + _rootWatcher?.Dispose(); refreshTimer.Dispose(); } } diff --git a/Gigya.Microdot.Configuration/ConfigurationLocationsParser.cs b/Gigya.Microdot.Configuration/ConfigurationLocationsParser.cs index 41f43706..6e900535 100644 --- a/Gigya.Microdot.Configuration/ConfigurationLocationsParser.cs +++ b/Gigya.Microdot.Configuration/ConfigurationLocationsParser.cs @@ -39,8 +39,8 @@ namespace Gigya.Microdot.Configuration /// ///If the environment variable "GIGYA_CONFIG_PATHS_FILE" is present, the path contained in it will be used. ///If GIGYA_CONFIG_PATHS_FILE is not presented we will try to take folder from GIGYA_CONFIG_ROOT + loadPaths.json - ///If it not present as well it will be assumed that the list can be read from c:/gigya/config/loadPaths.json (by default). - ///In Linux, the path will be /etc/gigya/config/loadPaths. + ///If it not present as well it will be assumed that the list can be read from d:/gigya/config/loadpaths.json (by default). + ///In Linux, the path will be /etc/gigya/config/loadpaths.json /// ///Beware! This class is used during the logger initialization and shouldn't log anything at this stage. /// @@ -49,7 +49,7 @@ public class ConfigurationLocationsParser: IConfigurationLocationsParser internal const string GIGYA_CONFIG_PATHS_FILE = "GIGYA_CONFIG_PATHS_FILE"; internal const string GIGYA_CONFIG_ROOT = "GIGYA_CONFIG_ROOT"; internal const string GIGYA_CONFIG_ROOT_DEFAULT = "/gigya/config/"; - internal const string LOADPATHS_JSON = "loadPaths.json"; + internal const string LOADPATHS_JSON = "loadpaths.json"; private string AppName { get; } @@ -81,7 +81,7 @@ public ConfigurationLocationsParser(IFileSystem fileSystemInstance, IEnvironment Trace.WriteLine("Started parsing configurations from location " + LoadPathsFilePath +"\n"); - var configPathDeclarations = ParseAndValidateConfigLines(LoadPathsFilePath, fileSystemInstance); + var configPathDeclarations = ParseAndValidateConfigLines(fileSystemInstance); ConfigFileDeclarations = ExpandConfigPathDeclarations(environmentVariableProvider, configPathDeclarations, environmentVariableProvider.PlatformSpecificPathPrefix).ToArray(); } @@ -160,7 +160,7 @@ private static string PrepareErrorMessage(List notExistingEnvVa } - private ConfigFileDeclaration[] ParseAndValidateConfigLines(string configPathFiles, IFileSystem fileSystemInstance) + private ConfigFileDeclaration[] ParseAndValidateConfigLines(IFileSystem fileSystemInstance) { ConfigFileDeclaration[] configs; @@ -171,7 +171,7 @@ private ConfigFileDeclaration[] ParseAndValidateConfigLines(string configPathFil } catch (Exception ex) { - throw new ConfigurationException($"Problem reading {configPathFiles} file, {ex.InnerException}.", ex); + throw new ConfigurationException($"Problem reading {LoadPathsFilePath} file, {ex.InnerException}.", ex); } if (configs == null) @@ -182,7 +182,7 @@ private ConfigFileDeclaration[] ParseAndValidateConfigLines(string configPathFil if(configLocationWithDuplicatePriority.Any()) { var message = new StringBuilder(); - message.AppendLine($"In {configPathFiles} some configurations lines have duplicate priorities."); + message.AppendLine($"In {LoadPathsFilePath} some configurations lines have duplicate priorities."); foreach(var distinctPriority in configLocationWithDuplicatePriority) { message.AppendLine($"Following locations share priority {distinctPriority.Key}:"); diff --git a/Gigya.Microdot.Configuration/FileBasedConfigItemsSource.cs b/Gigya.Microdot.Configuration/FileBasedConfigItemsSource.cs index 6d786ca1..14906ef1 100644 --- a/Gigya.Microdot.Configuration/FileBasedConfigItemsSource.cs +++ b/Gigya.Microdot.Configuration/FileBasedConfigItemsSource.cs @@ -71,7 +71,7 @@ public async Task GetConfiguration() .Select(match => new { Placehodler = "%" + match.Groups[1].Value + "%", - Value = _environmentVariableProvider.GetEnvironmentVariable(match.Groups[1].Value) + Value = _environmentVariableProvider.GetEnvironmentVariable(match.Groups[1].Value.ToUpper()) }).ToList(); if (list.Any()) diff --git a/Gigya.Microdot.Configuration/Gigya.Microdot.Configuration.csproj b/Gigya.Microdot.Configuration/Gigya.Microdot.Configuration.csproj index 2f1f97e0..59c04c86 100644 --- a/Gigya.Microdot.Configuration/Gigya.Microdot.Configuration.csproj +++ b/Gigya.Microdot.Configuration/Gigya.Microdot.Configuration.csproj @@ -1,178 +1,25 @@ - - - + + - Debug - AnyCPU - {0E3A2422-DD99-4D75-A18C-96329A842742} - Library - Properties - Gigya.Microdot.Configuration - Gigya.Microdot.Configuration - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - false - bin\Debug\Gigya.Microdot.Configuration.xml - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - - - - - - - - - - + - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - + + - - Designer - - + + - - {c88db2a8-a1d2-46f8-8b65-06b9ee3f1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - + + + + - - - - - - - True - - - True - - - ..\packages\DataAnnotationsValidator\lib\net40\DataAnnotationsValidator.dll - True - True - - - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - True - - - ..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Fakes/Gigya.Microdot.Fakes.csproj b/Gigya.Microdot.Fakes/Gigya.Microdot.Fakes.csproj index cf80e31a..3efed145 100644 --- a/Gigya.Microdot.Fakes/Gigya.Microdot.Fakes.csproj +++ b/Gigya.Microdot.Fakes/Gigya.Microdot.Fakes.csproj @@ -1,137 +1,21 @@ - - - + + - Debug - AnyCPU - {2865F69B-D847-4901-8945-4941E463F94E} - Library - Properties - Gigya.Microdot.Fakes - Gigya.Microdot.Fakes - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Fakes.xml - - - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Gigya.Microdot.Fakes.xml - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - + - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {c88db2a8-a1d2-46f8-8b65-06b9ee3f1662} - Gigya.Microdot.SharedLogic - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - + + - - Designer - - + + + + - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - + \ No newline at end of file diff --git a/Gigya.Microdot.Hosting/Gigya.Microdot.Hosting.csproj b/Gigya.Microdot.Hosting/Gigya.Microdot.Hosting.csproj index 577a821f..24dc9800 100644 --- a/Gigya.Microdot.Hosting/Gigya.Microdot.Hosting.csproj +++ b/Gigya.Microdot.Hosting/Gigya.Microdot.Hosting.csproj @@ -1,229 +1,22 @@ - - - + + - Debug - AnyCPU - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Library - Properties - Gigya.Microdot.Hosting - Gigya.Microdot.Hosting - v4.7.2 - 512 - ..\ - - true - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - bin\Debug\ - CODE_ANALYSIS;DEBUG;TRACE - bin\Debug\Gigya.Microdot.Hosting.xml - full - AnyCPU - true - prompt - MinimumRecommendedRules.ruleset - 1587 - 3 - - - bin\Release\ - TRACE - bin\Release\Gigya.Microdot.Hosting.xml - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - - - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - Designer - - - + - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {c88db2a8-a1d2-46f8-8b65-06b9ee3f1662} - Gigya.Microdot.SharedLogic - - - {0e3a2422-dd99-4d75-a18c-96329a842742} - Gigya.Microdot.Configuration - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - + + - + + + + + - - - - - - - True - - - True - - - True - - - True - - - True - - - ..\packages\DataAnnotationsValidator\lib\net40\DataAnnotationsValidator.dll - True - True - - - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - True - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Hosting/HttpService/HttpServiceListener.cs b/Gigya.Microdot.Hosting/HttpService/HttpServiceListener.cs index 5369dc3f..b9ab327b 100644 --- a/Gigya.Microdot.Hosting/HttpService/HttpServiceListener.cs +++ b/Gigya.Microdot.Hosting/HttpService/HttpServiceListener.cs @@ -49,6 +49,7 @@ using Gigya.ServiceContract.Exceptions; using Metrics; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; // ReSharper disable ConsiderUsingConfigureAwait @@ -209,7 +210,7 @@ private async void StartListening() private async Task HandleRequest(HttpListenerContext context) { RequestTimings.ClearCurrentTimings(); - using (context.Response) + try { var sw = Stopwatch.StartNew(); @@ -282,7 +283,7 @@ private async Task HandleRequest(HttpListenerContext context) Exception ex = GetRelevantException(e); string json = _serializationTime.Time(() => ExceptionSerializer.Serialize(ex)); await TryWriteResponse(context, json, GetExceptionStatusCode(ex), serviceCallEvent: callEvent); - } + } finally { sw.Stop(); @@ -296,6 +297,10 @@ private async Task HandleRequest(HttpListenerContext context) } } } + finally + { + context.Response.Close(); + } } @@ -515,6 +520,8 @@ private async Task TryWriteResponse(HttpListenerContext context, string da { context.Response.Headers.Add(GigyaHttpHeaders.ProtocolVersion, HttpServiceRequest.ProtocolVersion); + if (DotNetCoreCompatibility.ShouldAdjustJsonToDotNetFramwork()) + data = DotNetCoreCompatibility.AdjustJsonToDotNetFramework(data); var body = Encoding.UTF8.GetBytes(data ?? ""); context.Response.StatusCode = (int)httpStatus; diff --git a/Gigya.Microdot.Hosting/Service/ServiceHostBase.cs b/Gigya.Microdot.Hosting/Service/ServiceHostBase.cs index fa267367..4f6677d6 100644 --- a/Gigya.Microdot.Hosting/Service/ServiceHostBase.cs +++ b/Gigya.Microdot.Hosting/Service/ServiceHostBase.cs @@ -23,7 +23,6 @@ using System; using System.Diagnostics; using System.Linq; -using System.ServiceProcess; using System.Threading; using System.Threading.Tasks; using Gigya.Microdot.Configuration; @@ -37,7 +36,6 @@ public abstract class ServiceHostBase : IDisposable public ServiceArguments Arguments { get; private set; } - private DelegatingServiceBase WindowsService { get; set; } private ManualResetEvent StopEvent { get; } protected TaskCompletionSource ServiceStartedEvent { get; set; } private TaskCompletionSource ServiceGracefullyStopped { get; set; } @@ -84,13 +82,7 @@ public void Run(ServiceArguments argumentsOverride = null) if (Arguments.ServiceStartupMode == ServiceStartupMode.WindowsService) { - Trace.WriteLine("Service starting as a Windows service..."); - WindowsService = new DelegatingServiceBase(ServiceName, OnWindowsServiceStart, OnWindowsServiceStop); - - if (argumentsOverride == null) - Arguments = null; // Ensures OnWindowsServiceStart reloads parameters passed from Windows Service Manager. - - ServiceBase.Run(WindowsService); // This calls OnWindowsServiceStart() on a different thread and blocks until the service stops. + throw new Exception("Running as a Windows Service is not supported"); } else if (Arguments.ServiceStartupMode == ServiceStartupMode.VerifyConfigurations) { @@ -288,57 +280,6 @@ protected virtual void OnCrash() WaitForServiceGracefullyStoppedAsync().Wait(5000); Dispose(); } - - - private void OnWindowsServiceStart(string[] args) - { - if (Arguments == null) - { - Arguments = new ServiceArguments(args); - } - - try - { - if (Arguments.ServiceStartupMode != ServiceStartupMode.WindowsService) - throw new InvalidOperationException($"Cannot start in {Arguments.ServiceStartupMode} mode when starting as a Windows service."); - - if (Environment.UserInteractive == false) - { - throw new InvalidOperationException( - "This Windows service requires to be run with 'user interactive' enabled to correctly read certificates. " + - "Either the service wasn't configure with the 'Allow service to interact with desktop' option enabled " + - "or the OS is ignoring the checkbox due to a registry settings. " + - "Make sure both the checkbox is checked and following registry key is set to DWORD '0':\n" + - @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\NoInteractiveServices"); - } - - WindowsService.RequestAdditionalTime(60000); - - OnStart(); - } - catch - { - WindowsService.ExitCode = 1064; // "An exception occurred in the service when handling the control request." (net helpmsg 1064) - throw; - } - } - - - private void OnWindowsServiceStop() - { - WindowsService.RequestAdditionalTime(60000); - - try - { - OnStop(); - } - catch - { - WindowsService.ExitCode = 1064; // "An exception occurred in the service when handling the control request." (net helpmsg 1064) - throw; - } - - } protected abstract void OnStart(); @@ -353,7 +294,6 @@ protected virtual void Dispose(bool disposing) disposed = true; SafeDispose(StopEvent); - SafeDispose(WindowsService); SafeDispose(MonitoredShutdownProcess); } @@ -371,33 +311,6 @@ protected void SafeDispose(IDisposable disposable) Trace.TraceError(e.ToString()); } } - - - private class DelegatingServiceBase : ServiceBase - { - private readonly Action _onStart; - private readonly Action _onStop; - - - public DelegatingServiceBase(string serviceName, Action onStart, Action onStop) - { - ServiceName = serviceName; // Required for auto-logging to event viewer of start/stop event and exceptions. - _onStart = onStart; - _onStop = onStop; - } - - - protected override void OnStart(string[] args) - { - _onStart(args); - } - - - protected override void OnStop() - { - _onStop(); - } - } } public enum StopResult { None, Graceful, Force} diff --git a/Gigya.Microdot.Interfaces/Gigya.Microdot.Interfaces.csproj b/Gigya.Microdot.Interfaces/Gigya.Microdot.Interfaces.csproj index c47fce48..e3f038b6 100644 --- a/Gigya.Microdot.Interfaces/Gigya.Microdot.Interfaces.csproj +++ b/Gigya.Microdot.Interfaces/Gigya.Microdot.Interfaces.csproj @@ -1,97 +1,18 @@ - - - + + - Debug - AnyCPU - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Library - Properties - Gigya.Microdot.Interfaces - Gigya.Microdot.Interfaces - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Interfaces.xml - 1591 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - + - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - Designer - - + - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Logging.NLog/Gigya.Microdot.Logging.NLog.csproj b/Gigya.Microdot.Logging.NLog/Gigya.Microdot.Logging.NLog.csproj index d05ee11c..3c9a5379 100644 --- a/Gigya.Microdot.Logging.NLog/Gigya.Microdot.Logging.NLog.csproj +++ b/Gigya.Microdot.Logging.NLog/Gigya.Microdot.Logging.NLog.csproj @@ -1,110 +1,24 @@ - - - + + - Debug - AnyCPU - {06E45085-5A54-4BFE-BD24-E9C3983A2689} - Library - Properties - Gigya.Microdot.Logging.NLog - Gigya.Microdot.Logging.NLog - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Logging.NLog.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - + - - Properties\SolutionVersion.cs - - - - - + + - - + + - - {63e40f38-df99-4df5-9b45-addb0c2fc9ff} - Gigya.Microdot.Ninject - - - {c88db2a8-a1d2-46f8-8b65-06b9ee3f1662} - Gigya.Microdot.SharedLogic - - - {a90d7c71-ec7c-4328-9db1-d2c3a30727db} - Gigya.Microdot.Interfaces - + + + - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - True - - - True - - - True - - - True - - - True - - - True - - - ..\packages\NLog\lib\net45\NLog.dll - True - True - - - - + \ No newline at end of file diff --git a/Gigya.Microdot.Ninject.Host/Gigya.Microdot.Ninject.Host.csproj b/Gigya.Microdot.Ninject.Host/Gigya.Microdot.Ninject.Host.csproj index bcd9c1ec..302aa391 100644 --- a/Gigya.Microdot.Ninject.Host/Gigya.Microdot.Ninject.Host.csproj +++ b/Gigya.Microdot.Ninject.Host/Gigya.Microdot.Ninject.Host.csproj @@ -1,144 +1,22 @@ - - - + + - Debug - AnyCPU - {4E6A024F-DDC9-4A27-A859-77EBC3241009} - Library - Gigya.Microdot.Ninject.Host - Gigya.Microdot.Ninject.Host - v4.7.2 - 512 - true - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Ninject.Host.xml - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - Properties\SolutionVersion.cs - - - - + - - Designer - - - + + - - {0e3a2422-dd99-4d75-a18c-96329a842742} - Gigya.Microdot.Configuration - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {63e40f38-df99-4df5-9b45-addb0c2fc9ff} - Gigya.Microdot.Ninject - + + + + + - - - - - - True - - - ..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\Ninject.Extensions.Conventions\lib\net45\Ninject.Extensions.Conventions.dll - True - True - - - - - - - - - ..\packages\Ninject.Extensions.Factory\lib\net45\Ninject.Extensions.Factory.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Ninject.Host/MicrodotServiceHost.cs b/Gigya.Microdot.Ninject.Host/MicrodotServiceHost.cs index d6ead59f..d7b9c0cc 100644 --- a/Gigya.Microdot.Ninject.Host/MicrodotServiceHost.cs +++ b/Gigya.Microdot.Ninject.Host/MicrodotServiceHost.cs @@ -100,8 +100,11 @@ protected virtual void PreInitialize(IKernel kernel) CrashHandler = kernel.Get(); CrashHandler.Init(OnCrash); - IWorkloadMetrics workloadMetrics = kernel.Get(); - workloadMetrics.Init(); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + { + IWorkloadMetrics workloadMetrics = kernel.Get(); + workloadMetrics.Init(); + } var metricsInitializer = kernel.Get(); metricsInitializer.Init(); @@ -176,7 +179,8 @@ protected override void OnStop() Thread.Sleep(Arguments.ServiceDrainTimeSec.Value * 1000); } Kernel.Get().Dispose(); - Kernel.Get().Dispose(); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + Kernel.Get().Dispose(); Dispose(); } diff --git a/Gigya.Microdot.Ninject/Gigya.Microdot.Ninject.csproj b/Gigya.Microdot.Ninject/Gigya.Microdot.Ninject.csproj index ba760c5f..76041911 100644 --- a/Gigya.Microdot.Ninject/Gigya.Microdot.Ninject.csproj +++ b/Gigya.Microdot.Ninject/Gigya.Microdot.Ninject.csproj @@ -1,183 +1,31 @@ - - - + + - Debug - AnyCPU - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Library - Properties - Gigya.Microdot.Ninject - Gigya.Microdot.Ninject - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Ninject.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - + - - Properties\SolutionVersion.cs - - - - - - - - - - - - - + + - - + + + + + - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - + + + + + + + - - - - - - True - - - ..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\Ninject.Extensions.Conventions\lib\net45\Ninject.Extensions.Conventions.dll - True - True - - - - - - - - - ..\packages\Ninject.Extensions.Factory\lib\net45\Ninject.Extensions.Factory.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Orleans.Hosting/Gigya.Microdot.Orleans.Hosting.csproj b/Gigya.Microdot.Orleans.Hosting/Gigya.Microdot.Orleans.Hosting.csproj index 51588434..308e9f66 100644 --- a/Gigya.Microdot.Orleans.Hosting/Gigya.Microdot.Orleans.Hosting.csproj +++ b/Gigya.Microdot.Orleans.Hosting/Gigya.Microdot.Orleans.Hosting.csproj @@ -1,1301 +1,34 @@ - - - - + + - Debug - AnyCPU - {DD807780-01B0-4EF6-9E42-5D15CA26F353} - Library - Properties - Gigya.Microdot.Orleans.Hosting - Gigya.Microdot.Orleans.Hosting - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Orleans.Hosting.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - + - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - + + - - Designer - - + + + + + + + + + + - - - - - <__paket__NETStandard_Library_targets>netstandard2.0\NETStandard.Library - - - - - - - <__paket__Microsoft_Orleans_Reminders_AdoNet_targets>netstandard2.0\Microsoft.Orleans.Reminders.AdoNet - - - - - - - <__paket__Microsoft_Orleans_Persistence_AdoNet_targets>netstandard2.0\Microsoft.Orleans.Persistence.AdoNet - - - - - - - <__paket__Microsoft_Orleans_Clustering_AdoNet_targets>netstandard2.0\Microsoft.Orleans.Clustering.AdoNet - - - - - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Connections.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Hosting\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Hosting.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Http\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Http.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Http.Extensions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Http.Features\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Server.Kestrel\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Server.Kestrel.Core\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Core.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Server.Kestrel.Https\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Https.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll - True - True - - - - - - - - - ..\packages\Microsoft.AspNetCore.WebUtilities\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll - True - True - - - - - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - + + + + + + - - - - - ..\packages\Microsoft.CodeAnalysis.Common\lib\netstandard2.0\Microsoft.CodeAnalysis.dll - True - True - - - - - - - - - ..\packages\Microsoft.CodeAnalysis.CSharp\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll - True - True - - - - - - - - - ..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.FileExtensions\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.FileProviders.Physical\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.FileSystemGlobbing\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging.Configuration\lib\netstandard2.0\Microsoft.Extensions.Logging.Configuration.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging.Console\lib\netstandard2.0\Microsoft.Extensions.Logging.Console.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.ObjectPool\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\packages\Microsoft.Net.Http.Headers\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Clustering.AdoNet\lib\netstandard2.0\Orleans.Clustering.AdoNet.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansCodeGenerator\lib\netstandard2.0\Orleans.CodeGeneration.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansProviders\lib\netstandard2.0\OrleansProviders.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansRuntime\lib\netstandard2.0\Orleans.Runtime.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansTelemetryConsumers.Counters\lib\netstandard2.0\Orleans.TelemetryConsumers.Counters.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansZooKeeperUtils\lib\netstandard2.0\Orleans.Clustering.ZooKeeper.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Persistence.AdoNet\lib\netstandard2.0\Orleans.Persistence.AdoNet.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Reminders.AdoNet\lib\netstandard2.0\Orleans.Reminders.AdoNet.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Runtime.Abstractions\lib\netstandard2.0\Orleans.Runtime.Abstractions.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\OrleansDashboard\lib\netstandard2.0\OrleansDashboard.dll - True - True - - - - - - - - - ..\packages\OrleansDashboard.Client\lib\netstandard2.0\OrleansDashboard.Client.dll - True - True - - - - - - - - - ..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - True - - - ..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\packages\System.Data.Common\lib\net451\System.Data.Common.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.DiagnosticSource\lib\net46\System.Diagnostics.DiagnosticSource.dll - True - True - - - - - - - - - ..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.PerformanceCounter\lib\net461\System.Diagnostics.PerformanceCounter.dll - True - True - - - - - - - - - ..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\packages\System.IO.Pipelines\lib\netstandard2.0\System.IO.Pipelines.dll - True - True - - - - - - - - - ..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - True - - - - - - - - - ..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\packages\System.Reflection\lib\net462\System.Reflection.dll - False - True - - - - - - - - - ..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Cng\lib\net47\System.Security.Cryptography.Cng.dll - True - True - - - - - - - - - ..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\packages\System.Text.Encoding.CodePages\lib\net461\System.Text.Encoding.CodePages.dll - True - True - - - - - - - - - ..\packages\System.Text.Encodings.Web\lib\netstandard2.0\System.Text.Encodings.Web.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - - - - - ..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - ..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - - - - - ..\packages\ZooKeeperNetEx\lib\netstandard1.3\ZooKeeperNetEx.dll - True - True - - - - - - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Orleans.Ninject.Host/Gigya.Microdot.Orleans.Ninject.Host.csproj b/Gigya.Microdot.Orleans.Ninject.Host/Gigya.Microdot.Orleans.Ninject.Host.csproj index 1c7676f1..f5839ede 100644 --- a/Gigya.Microdot.Orleans.Ninject.Host/Gigya.Microdot.Orleans.Ninject.Host.csproj +++ b/Gigya.Microdot.Orleans.Ninject.Host/Gigya.Microdot.Orleans.Ninject.Host.csproj @@ -1,745 +1,23 @@ - - - + + - Debug - AnyCPU - {AE847E21-F7D8-47FB-84C3-C7144A9B7A1D} - Library - Gigya.Microdot.Orleans.Ninject.Host - Gigya.Microdot.Orleans.Ninject.Host - v4.7.2 - 512 - true - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Orleans.Ninject.Host.xml - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - Designer - - - - + - - {0e3a2422-dd99-4d75-a18c-96329a842742} - Gigya.Microdot.Configuration - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {63e40f38-df99-4df5-9b45-addb0c2fc9ff} - Gigya.Microdot.Ninject - - - {DD807780-01B0-4EF6-9E42-5D15CA26F353} - Gigya.Microdot.Orleans.Hosting - + + - + + + + + + - - - - - - True - - - ..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansProviders\lib\netstandard2.0\OrleansProviders.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansRuntime\lib\netstandard2.0\Orleans.Runtime.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Runtime.Abstractions\lib\netstandard2.0\Orleans.Runtime.Abstractions.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\Ninject.Extensions.Conventions\lib\net45\Ninject.Extensions.Conventions.dll - True - True - - - - - - - - - ..\packages\Ninject.Extensions.Factory\lib\net45\Ninject.Extensions.Factory.dll - True - True - - - - - - - - - ..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - True - - - ..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - ..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - - - - - ..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - ..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Orleans.Ninject.Host/MicrodotOrleansServiceHost.cs b/Gigya.Microdot.Orleans.Ninject.Host/MicrodotOrleansServiceHost.cs index 0a8b6026..52549241 100644 --- a/Gigya.Microdot.Orleans.Ninject.Host/MicrodotOrleansServiceHost.cs +++ b/Gigya.Microdot.Orleans.Ninject.Host/MicrodotOrleansServiceHost.cs @@ -95,8 +95,11 @@ protected virtual void PreInitialize(IKernel kernel) CrashHandler = kernel.Get(); CrashHandler.Init(OnCrash); - IWorkloadMetrics workloadMetrics = kernel.Get(); - workloadMetrics.Init(); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + { + IWorkloadMetrics workloadMetrics = kernel.Get(); + workloadMetrics.Init(); + } var metricsInitializer = kernel.Get(); metricsInitializer.Init(); @@ -192,7 +195,8 @@ protected override void OnStop() } Kernel.Get().Dispose(); - Kernel.Get().Dispose(); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + Kernel.Get().Dispose(); SiloHost.Stop(); // This calls BeforeOrleansShutdown() try diff --git a/Gigya.Microdot.ServiceDiscovery/Gigya.Microdot.ServiceDiscovery.csproj b/Gigya.Microdot.ServiceDiscovery/Gigya.Microdot.ServiceDiscovery.csproj index 795f34cf..37dd2b94 100644 --- a/Gigya.Microdot.ServiceDiscovery/Gigya.Microdot.ServiceDiscovery.csproj +++ b/Gigya.Microdot.ServiceDiscovery/Gigya.Microdot.ServiceDiscovery.csproj @@ -1,248 +1,24 @@ - - - + + - Debug - AnyCPU - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Library - Properties - Gigya.Microdot.ServiceDiscovery - Gigya.Microdot.ServiceDiscovery - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.ServiceDiscovery.xml - MinimumRecommendedRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - Designer - - + + - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - + + + - - + + - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - True - - - ..\packages\Microsoft.Bcl.Async\lib\net40\Microsoft.Threading.Tasks.dll - True - True - - - ..\packages\Microsoft.Bcl.Async\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - True - True - - - ..\packages\Microsoft.Bcl.Async\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\Nito.AsyncEx\lib\net45\Nito.AsyncEx.dll - True - True - - - ..\packages\Nito.AsyncEx\lib\net45\Nito.AsyncEx.Concurrent.dll - True - True - - - ..\packages\Nito.AsyncEx\lib\net45\Nito.AsyncEx.Enlightenment.dll - True - True - - - - - - - - - ..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - True - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.ServiceDiscovery/Rewrite/ConsulNodeSourceFactory.cs b/Gigya.Microdot.ServiceDiscovery/Rewrite/ConsulNodeSourceFactory.cs index 45c6ad69..e5f164d6 100644 --- a/Gigya.Microdot.ServiceDiscovery/Rewrite/ConsulNodeSourceFactory.cs +++ b/Gigya.Microdot.ServiceDiscovery/Rewrite/ConsulNodeSourceFactory.cs @@ -168,7 +168,7 @@ public void Dispose() return; _shutdownToken.Cancel(); - _shutdownToken.Dispose(); + //_shutdownToken.Dispose(); - this causes ObjectDisposedException so for now it's commented out _serviceListHealthMonitor.Dispose(); } diff --git a/Gigya.Microdot.ServiceDiscovery/Rewrite/IConsulServiceListMonitor.cs b/Gigya.Microdot.ServiceDiscovery/Rewrite/IConsulServiceListMonitor.cs index 33f2334f..bc9318fa 100644 --- a/Gigya.Microdot.ServiceDiscovery/Rewrite/IConsulServiceListMonitor.cs +++ b/Gigya.Microdot.ServiceDiscovery/Rewrite/IConsulServiceListMonitor.cs @@ -5,10 +5,10 @@ namespace Gigya.Microdot.ServiceDiscovery.Rewrite { - public interface INodeSourceFactory - { - string Type {get;} + //public interface INodeSourceFactory + //{ + // string Type {get;} - Task TryCreateNodeSource(DeploymentIdentifier di); - } + // Task TryCreateNodeSource(DeploymentIdentifier di); + //} } \ No newline at end of file diff --git a/Gigya.Microdot.ServiceProxy/Gigya.Microdot.ServiceProxy.csproj b/Gigya.Microdot.ServiceProxy/Gigya.Microdot.ServiceProxy.csproj index ac9e7fcc..4345243b 100644 --- a/Gigya.Microdot.ServiceProxy/Gigya.Microdot.ServiceProxy.csproj +++ b/Gigya.Microdot.ServiceProxy/Gigya.Microdot.ServiceProxy.csproj @@ -1,223 +1,31 @@ - - - + + - Debug - AnyCPU - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Library - Properties - Gigya.Microdot.ServiceProxy - Gigya.Microdot.ServiceProxy - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.ServiceProxy.xml - 1591;1573 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Gigya.Microdot.ServiceProxy.xml - - - - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - Designer - - + + - + + + + + + + + - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {c88db2a8-a1d2-46f8-8b65-06b9ee3f1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - + + + + - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - True - - - ..\packages\Microsoft.Bcl.Async\lib\net40\Microsoft.Threading.Tasks.dll - True - True - - - ..\packages\Microsoft.Bcl.Async\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - True - True - - - ..\packages\Microsoft.Bcl.Async\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\Nito.AsyncEx\lib\net45\Nito.AsyncEx.dll - True - True - - - ..\packages\Nito.AsyncEx\lib\net45\Nito.AsyncEx.Concurrent.dll - True - True - - - ..\packages\Nito.AsyncEx\lib\net45\Nito.AsyncEx.Enlightenment.dll - True - True - - - - - - - - - ..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - True - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.ServiceProxy/ServiceProxyProvider.cs b/Gigya.Microdot.ServiceProxy/ServiceProxyProvider.cs index effd48ad..3ad6ab11 100644 --- a/Gigya.Microdot.ServiceProxy/ServiceProxyProvider.cs +++ b/Gigya.Microdot.ServiceProxy/ServiceProxyProvider.cs @@ -372,7 +372,13 @@ private async Task InvokeCore(HttpServiceRequest request, Type resultRet request.Overrides = TracingContext.TryGetOverrides()?.ShallowCloneWithDifferentPreferredEnvironment(nodeAndLoadBalancer.PreferredEnvironment) ?? new RequestOverrides { PreferredEnvironment = nodeAndLoadBalancer.PreferredEnvironment }; - string requestContent = _serializationTime.Time(() => JsonConvert.SerializeObject(request, jsonSettings)); + string requestContent = _serializationTime.Time(() => + { + var reqAsJson = JsonConvert.SerializeObject(request, jsonSettings); + if (DotNetCoreCompatibility.ShouldAdjustJsonToDotNetFramwork()) + reqAsJson = DotNetCoreCompatibility.AdjustJsonToDotNetFramework(reqAsJson); + return reqAsJson; + }); var httpContent = new StringContent(requestContent, Encoding.UTF8, "application/json"); httpContent.Headers.Add(GigyaHttpHeaders.ProtocolVersion, HttpServiceRequest.ProtocolVersion); diff --git a/Gigya.Microdot.SharedLogic/CurrentApplicationInfo.cs b/Gigya.Microdot.SharedLogic/CurrentApplicationInfo.cs index 01cf19ac..b202fd13 100644 --- a/Gigya.Microdot.SharedLogic/CurrentApplicationInfo.cs +++ b/Gigya.Microdot.SharedLogic/CurrentApplicationInfo.cs @@ -69,13 +69,11 @@ public CurrentApplicationInfo(string name, string instanceName = null, Version i if (name == null) throw new ArgumentNullException(nameof(name)); - OsUser = WindowsIdentity.GetCurrent().Name; + OsUser = "N/A"; Version = (Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()).GetName().Version; - // ReSharper disable once PossibleNullReferenceException - IsRunningAsWindowsService = Environment.OSVersion.Platform == PlatformID.Win32NT && - WindowsIdentity.GetCurrent().Name == @"NT AUTHORITY\SYSTEM"; + IsRunningAsWindowsService = false; HasConsoleWindow = !IsRunningAsWindowsService && !Console.IsInputRedirected; diff --git a/Gigya.Microdot.SharedLogic/DotNetCoreCompatibility.cs b/Gigya.Microdot.SharedLogic/DotNetCoreCompatibility.cs new file mode 100644 index 00000000..ac3fadc5 --- /dev/null +++ b/Gigya.Microdot.SharedLogic/DotNetCoreCompatibility.cs @@ -0,0 +1,63 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Gigya.Microdot.SharedLogic +{ + public static class DotNetCoreCompatibility + { + public static bool ShouldAdjustJsonToDotNetFramwork() + { + var envVar = Environment.GetEnvironmentVariable("GIGYA_ENABLE_JSON_COMPATIBILITY_SHIM"); + if (envVar == "true") + return true; + return false; + } + + public static string AdjustJsonToDotNetFramework(string data) + { + if (string.IsNullOrEmpty(data)) return data; + try + { + var json = JToken.Parse(data); + var allTypeTokens = new List(); + PoplulateTokens(json, "$type", allTypeTokens); + foreach (var item in allTypeTokens) + { + if (item.Value.Type == JTokenType.String) + item.Value.Replace(item.Value.ToString().Replace("System.Private.CoreLib", "mscorlib")); + } + var ret = json.ToString(Formatting.Indented); + return ret; + } + catch + { + return data; + } + } + + private static void PoplulateTokens(JToken json, string tokenName, List allTokens) + { + if (json.Type == JTokenType.Object) + { + foreach (var prop in (json as JObject).Properties()) + { + if (prop.Name == tokenName) + allTokens.Add(prop); + else if (prop.Value.Type == JTokenType.Object || prop.Value.Type == JTokenType.Array) + PoplulateTokens(prop.Value, tokenName, allTokens); + } + } + else if (json.Type == JTokenType.Array) + { + foreach (var item in (json as JArray)) + { + if (item.Type == JTokenType.Object || item.Type == JTokenType.Array) + PoplulateTokens(item, tokenName, allTokens); + } + } + } + } +} diff --git a/Gigya.Microdot.SharedLogic/Gigya.Microdot.SharedLogic.csproj b/Gigya.Microdot.SharedLogic/Gigya.Microdot.SharedLogic.csproj index b0a8bdba..ace65d8d 100644 --- a/Gigya.Microdot.SharedLogic/Gigya.Microdot.SharedLogic.csproj +++ b/Gigya.Microdot.SharedLogic/Gigya.Microdot.SharedLogic.csproj @@ -1,191 +1,25 @@ - - - + + - Debug - AnyCPU - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Library - Properties - Gigya.Microdot.SharedLogic - Gigya.Microdot.SharedLogic - v4.7.2 - 512 - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.SharedLogic.xml - 1591;1573 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Gigya.Microdot.SharedLogic.xml - - - - - - - - + - - Properties\SolutionVersion.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - Designer - - + + + + - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - + + - - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - True - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.SharedLogic/Measurement/RequestTimings.cs b/Gigya.Microdot.SharedLogic/Measurement/RequestTimings.cs index 9cc71218..9c0bcf40 100644 --- a/Gigya.Microdot.SharedLogic/Measurement/RequestTimings.cs +++ b/Gigya.Microdot.SharedLogic/Measurement/RequestTimings.cs @@ -22,7 +22,7 @@ using System; using System.Collections.Concurrent; -using System.Runtime.Remoting.Messaging; +using Gigya.Microdot.SharedLogic.Events; namespace Gigya.Microdot.SharedLogic.Measurement { @@ -32,6 +32,7 @@ namespace Gigya.Microdot.SharedLogic.Measurement [Serializable] public class RequestTimings { + private static TracingContextNoneOrleans CallContext = new TracingContextNoneOrleans(); internal readonly ConcurrentDictionary UserStats = new ConcurrentDictionary(); /// Time of the ongoing request. @@ -47,11 +48,11 @@ public class RequestTimings public static RequestTimings GetOrCreate() { - RequestTimings timings = (RequestTimings)CallContext.LogicalGetData("request timings"); + RequestTimings timings = (RequestTimings)CallContext.Get("request timings"); if (timings==null) { timings = new RequestTimings(); - CallContext.LogicalSetData("request timings", timings); + CallContext.Set("request timings", timings); } return timings; @@ -60,7 +61,7 @@ public static RequestTimings GetOrCreate() /// Clears all timings for the request currently being processed. BEWARE! public static void ClearCurrentTimings() { - CallContext.FreeNamedDataSlot("request timings"); + CallContext.Set("request timings", null); } diff --git a/Gigya.Microdot.SharedLogic/Utils/System.Diagnostics.cs b/Gigya.Microdot.SharedLogic/Utils/System.Diagnostics.cs index 67107a11..94907ed2 100644 --- a/Gigya.Microdot.SharedLogic/Utils/System.Diagnostics.cs +++ b/Gigya.Microdot.SharedLogic/Utils/System.Diagnostics.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Runtime.InteropServices; // ReSharper disable CheckNamespace namespace System.Diagnostics @@ -11,6 +12,15 @@ public static class ProcessExtensions /// public static IEnumerable ProcessorAffinityList(this Process p) { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + // Processor affinity for processes or threads is not supported on this platform. + // So just return all processors + { + for (int i = 0; i < Environment.ProcessorCount; i++) + yield return i; + yield break; + } + var mask = (ulong)p.ProcessorAffinity.ToInt64(); for (var i = 0; i < 64; i++) if ((mask & 1ul << i) > 0) diff --git a/Gigya.Microdot.Testing.Shared/Gigya.Microdot.Testing.Shared.csproj b/Gigya.Microdot.Testing.Shared/Gigya.Microdot.Testing.Shared.csproj index 56c6b8b2..c03dc1eb 100644 --- a/Gigya.Microdot.Testing.Shared/Gigya.Microdot.Testing.Shared.csproj +++ b/Gigya.Microdot.Testing.Shared/Gigya.Microdot.Testing.Shared.csproj @@ -1,147 +1,25 @@ - - - + + - Debug - AnyCPU - {6D6A62A1-15B5-44C2-AD37-698AB31863E4} - Library - Gigya.Microdot.Testing.Shared - Gigya.Microdot.Testing.Shared - v4.7.2 - 512 - true - true - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Testing.Shared.xml - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - - - - - + - - {2865f69b-d847-4901-8945-4941e463f94e} - Gigya.Microdot.Fakes - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {63e40f38-df99-4df5-9b45-addb0c2fc9ff} - Gigya.Microdot.Ninject - + + - + + + + + + + + - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Testing.Shared/Service/DisposablePort.cs b/Gigya.Microdot.Testing.Shared/Service/DisposablePort.cs index 94cbd0d7..de8c8961 100644 --- a/Gigya.Microdot.Testing.Shared/Service/DisposablePort.cs +++ b/Gigya.Microdot.Testing.Shared/Service/DisposablePort.cs @@ -45,7 +45,7 @@ public static HashSet Occupied() occupied.AddRange(ipGlobal.GetActiveTcpConnections().Select(x => x.LocalEndPoint.Port)); occupied.AddRange(ipGlobal.GetActiveTcpListeners().Select(x => x.Port)); occupied.AddRange(ipGlobal.GetActiveUdpListeners().Select(x => x.Port)); - return occupied.Distinct().ToHashSet(); + return new HashSet(occupied.Distinct()); } public static DisposablePort GetPort() diff --git a/Gigya.Microdot.Testing.Shared/Service/ServiceTesterBase.cs b/Gigya.Microdot.Testing.Shared/Service/ServiceTesterBase.cs index df6589fc..269fe4f4 100644 --- a/Gigya.Microdot.Testing.Shared/Service/ServiceTesterBase.cs +++ b/Gigya.Microdot.Testing.Shared/Service/ServiceTesterBase.cs @@ -42,11 +42,6 @@ public abstract class ServiceTesterBase : IDisposable protected DisposablePort _port; - protected ServiceTesterBase() - { - _port = DisposablePort.GetPort(); - } - /// /// GetObject a ServiceProxy with caching that is configured to call the service under test. Both the port and the hostname of /// the provided ServiceProxy is changed to match those of the service which was started by the ServiceTester. diff --git a/Gigya.Microdot.Testing/Gigya.Microdot.Testing.csproj b/Gigya.Microdot.Testing/Gigya.Microdot.Testing.csproj index 0422b96c..fdec7655 100644 --- a/Gigya.Microdot.Testing/Gigya.Microdot.Testing.csproj +++ b/Gigya.Microdot.Testing/Gigya.Microdot.Testing.csproj @@ -1,698 +1,28 @@ - - - + + - Debug - AnyCPU - {D37E359C-170E-4D67-AD49-45002B48987E} - Library - Gigya.Microdot.Testing - Gigya.Microdot.Testing - v4.7.2 - 512 - true - true - - 1591 + netstandard2.0 + false + 7.0.27-beta + true - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - bin\Debug\Gigya.Microdot.Testing.xml - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - Properties\SolutionVersion.cs - - - - - - - - + - - {2865f69b-d847-4901-8945-4941e463f94e} - Gigya.Microdot.Fakes - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {63e40f38-df99-4df5-9b45-addb0c2fc9ff} - Gigya.Microdot.Ninject - - - {DD807780-01B0-4EF6-9E42-5D15CA26F353} - Gigya.Microdot.Orleans.Hosting - - - {AE847E21-F7D8-47FB-84C3-C7144A9B7A1D} - Gigya.Microdot.Orleans.Ninject.Host - - - {6d6a62a1-15b5-44c2-ad37-698ab31863e4} - Gigya.Microdot.Testing.Shared - + + - + + + + + + + + + + + - - - - - - ..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.OrleansProviders\lib\netstandard2.0\OrleansProviders.dll - True - True - - - - - - - - - ..\packages\Microsoft.Orleans.Runtime.Abstractions\lib\netstandard2.0\Orleans.Runtime.Abstractions.dll - True - True - - - - - - - - - ..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - True - - - ..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - ..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - ..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Gigya.Microdot.Testing/Service/ServiceTester.cs b/Gigya.Microdot.Testing/Service/ServiceTester.cs index 6d9e6197..14565fae 100644 --- a/Gigya.Microdot.Testing/Service/ServiceTester.cs +++ b/Gigya.Microdot.Testing/Service/ServiceTester.cs @@ -55,12 +55,36 @@ public ServiceTester(ServiceArguments serviceArguments = null, Type customSerial { _customSerializer = customSerializer; - ServiceArguments = serviceArguments ?? new ServiceArguments(ServiceStartupMode.CommandLineNonInteractive, - ConsoleOutputMode.Disabled, - SiloClusterMode.PrimaryNode, - _port.Port, - initTimeOutSec: 15); - + if (serviceArguments == null) // Create default args with disposable port + { + _port = DisposablePort.GetPort(); + ServiceArguments = new ServiceArguments( + serviceStartupMode: ServiceStartupMode.CommandLineNonInteractive, + consoleOutputMode: ConsoleOutputMode.Disabled, + siloClusterMode: SiloClusterMode.PrimaryNode, + basePortOverride: _port.Port, + initTimeOutSec: 15); + } + else if (serviceArguments.BasePortOverride == null) // Copy passed args and add disposable port + { + _port = DisposablePort.GetPort(); + ServiceArguments = new ServiceArguments( + serviceStartupMode: serviceArguments.ServiceStartupMode, + consoleOutputMode: serviceArguments.ConsoleOutputMode, + siloClusterMode: serviceArguments.SiloClusterMode, + basePortOverride: _port.Port, + instanceName: serviceArguments.InstanceName, + shutdownWhenPidExits: serviceArguments.ShutdownWhenPidExits, + slotNumber: serviceArguments.SlotNumber, + onStopWaitTimeSec: serviceArguments.OnStopWaitTimeSec, + serviceDrainTimeSec: serviceArguments.ServiceDrainTimeSec, + initTimeOutSec: serviceArguments.InitTimeOutSec); + } + else + { + ServiceArguments = serviceArguments; + } + Initialize(); } @@ -68,7 +92,7 @@ private void Initialize() { Host = new TServiceHost(); - BasePort = ServiceArguments.BasePortOverride ?? GetBasePortFromHttpServiceAttribute(); + BasePort = ServiceArguments.BasePortOverride ?? GetBasePortFromHttpServiceAttribute(); SiloStopped = Task.Run(() => Host.Run(ServiceArguments)); diff --git a/Gigya.ServiceContract/Gigya.ServiceContract.csproj b/Gigya.ServiceContract/Gigya.ServiceContract.csproj index 9f0b6c74..dc742505 100644 --- a/Gigya.ServiceContract/Gigya.ServiceContract.csproj +++ b/Gigya.ServiceContract/Gigya.ServiceContract.csproj @@ -1,84 +1,15 @@ - - - + + - Debug - AnyCPU - {DB6D3561-835E-40D5-B9D4-83951CF426DF} - Library - Properties - Gigya.ServiceContract - Gigya.ServiceContract - v4.5.1 - 512 - + netstandard2.0 + false + true + 7.0.27-beta + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Gigya.ServiceContract.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - + - - Designer - - - - - - - - - - packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - \ No newline at end of file + + + + diff --git a/Microdot.sln b/Microdot.sln index b76838aa..3f324d84 100644 --- a/Microdot.sln +++ b/Microdot.sln @@ -13,7 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{0F8FE3 .paket\update.bat = .paket\update.bat EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Hosting", "Gigya.Microdot.Hosting\Gigya.Microdot.Hosting.csproj", "{33C1B76E-47B2-40BC-A434-81EE22996BEF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Hosting", "Gigya.Microdot.Hosting\Gigya.Microdot.Hosting.csproj", "{33C1B76E-47B2-40BC-A434-81EE22996BEF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solution Items", "{2E2E6FD0-E228-44D7-9794-FEA76E00FD34}" ProjectSection(SolutionItems) = preProject @@ -22,53 +22,65 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio SolutionVersion.cs = SolutionVersion.cs EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Fakes", "Gigya.Microdot.Fakes\Gigya.Microdot.Fakes.csproj", "{2865F69B-D847-4901-8945-4941E463F94E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Fakes", "Gigya.Microdot.Fakes\Gigya.Microdot.Fakes.csproj", "{2865F69B-D847-4901-8945-4941E463F94E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.ServiceProxy", "Gigya.Microdot.ServiceProxy\Gigya.Microdot.ServiceProxy.csproj", "{1FCB2569-A640-4292-9CDC-821AEEF14813}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.ServiceProxy", "Gigya.Microdot.ServiceProxy\Gigya.Microdot.ServiceProxy.csproj", "{1FCB2569-A640-4292-9CDC-821AEEF14813}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.SharedLogic", "Gigya.Microdot.SharedLogic\Gigya.Microdot.SharedLogic.csproj", "{C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.SharedLogic", "Gigya.Microdot.SharedLogic\Gigya.Microdot.SharedLogic.csproj", "{C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Orleans.Hosting", "Gigya.Microdot.Orleans.Hosting\Gigya.Microdot.Orleans.Hosting.csproj", "{DD807780-01B0-4EF6-9E42-5D15CA26F353}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Orleans.Hosting", "Gigya.Microdot.Orleans.Hosting\Gigya.Microdot.Orleans.Hosting.csproj", "{DD807780-01B0-4EF6-9E42-5D15CA26F353}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Configuration", "Gigya.Microdot.Configuration\Gigya.Microdot.Configuration.csproj", "{0E3A2422-DD99-4D75-A18C-96329A842742}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Configuration", "Gigya.Microdot.Configuration\Gigya.Microdot.Configuration.csproj", "{0E3A2422-DD99-4D75-A18C-96329A842742}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Interfaces", "Gigya.Microdot.Interfaces\Gigya.Microdot.Interfaces.csproj", "{A90D7C71-EC7C-4328-9DB1-D2C3A30727DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Interfaces", "Gigya.Microdot.Interfaces\Gigya.Microdot.Interfaces.csproj", "{A90D7C71-EC7C-4328-9DB1-D2C3A30727DB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Ninject", "Gigya.Microdot.Ninject\Gigya.Microdot.Ninject.csproj", "{63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Ninject", "Gigya.Microdot.Ninject\Gigya.Microdot.Ninject.csproj", "{63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Orleans.Ninject.Host", "Gigya.Microdot.Orleans.Ninject.Host\Gigya.Microdot.Orleans.Ninject.Host.csproj", "{AE847E21-F7D8-47FB-84C3-C7144A9B7A1D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Orleans.Ninject.Host", "Gigya.Microdot.Orleans.Ninject.Host\Gigya.Microdot.Orleans.Ninject.Host.csproj", "{AE847E21-F7D8-47FB-84C3-C7144A9B7A1D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Ninject.Host", "Gigya.Microdot.Ninject.Host\Gigya.Microdot.Ninject.Host.csproj", "{4E6A024F-DDC9-4A27-A859-77EBC3241009}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Ninject.Host", "Gigya.Microdot.Ninject.Host\Gigya.Microdot.Ninject.Host.csproj", "{4E6A024F-DDC9-4A27-A859-77EBC3241009}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{F8A1B754-3C63-4051-A1A5-C51E916F90EB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Testing.Shared", "Gigya.Microdot.Testing.Shared\Gigya.Microdot.Testing.Shared.csproj", "{6D6A62A1-15B5-44C2-AD37-698AB31863E4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Testing.Shared", "Gigya.Microdot.Testing.Shared\Gigya.Microdot.Testing.Shared.csproj", "{6D6A62A1-15B5-44C2-AD37-698AB31863E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.ServiceDiscovery", "Gigya.Microdot.ServiceDiscovery\Gigya.Microdot.ServiceDiscovery.csproj", "{37E6909E-51E2-4BBA-8EFC-DBDF086D860E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.ServiceDiscovery", "Gigya.Microdot.ServiceDiscovery\Gigya.Microdot.ServiceDiscovery.csproj", "{37E6909E-51E2-4BBA-8EFC-DBDF086D860E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.ServiceContract.UnitTests", "tests\Gigya.Microdot.ServiceContract.UnitTests\Gigya.Microdot.ServiceContract.UnitTests.csproj", "{C224F79A-EAB5-48B8-B587-65772B0966EF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.ServiceContract.UnitTests", "tests\Gigya.Microdot.ServiceContract.UnitTests\Gigya.Microdot.ServiceContract.UnitTests.csproj", "{C224F79A-EAB5-48B8-B587-65772B0966EF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Logging.NLog", "Gigya.Microdot.Logging.NLog\Gigya.Microdot.Logging.NLog.csproj", "{06E45085-5A54-4BFE-BD24-E9C3983A2689}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Logging.NLog", "Gigya.Microdot.Logging.NLog\Gigya.Microdot.Logging.NLog.csproj", "{06E45085-5A54-4BFE-BD24-E9C3983A2689}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Orleans.Hosting.UnitTests", "tests\Gigya.Microdot.Orleans.Hosting.UnitTests\Gigya.Microdot.Orleans.Hosting.UnitTests.csproj", "{8E548D57-5880-4283-BDF5-7386886D481D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Orleans.Hosting.UnitTests", "tests\Gigya.Microdot.Orleans.Hosting.UnitTests\Gigya.Microdot.Orleans.Hosting.UnitTests.csproj", "{8E548D57-5880-4283-BDF5-7386886D481D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.UnitTests", "tests\Gigya.Microdot.UnitTests\Gigya.Microdot.UnitTests.csproj", "{0A24AE97-EE88-4E8B-8B92-092884D41399}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.UnitTests", "tests\Gigya.Microdot.UnitTests\Gigya.Microdot.UnitTests.csproj", "{0A24AE97-EE88-4E8B-8B92-092884D41399}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Testing", "Gigya.Microdot.Testing\Gigya.Microdot.Testing.csproj", "{D37E359C-170E-4D67-AD49-45002B48987E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Testing", "Gigya.Microdot.Testing\Gigya.Microdot.Testing.csproj", "{D37E359C-170E-4D67-AD49-45002B48987E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Hosting.UnitTests", "tests\Gigya.Microdot.Hosting.UnitTests\Gigya.Microdot.Hosting.UnitTests.csproj", "{A17C9A6D-317D-441C-B33A-3807B67B4FA2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Hosting.UnitTests", "tests\Gigya.Microdot.Hosting.UnitTests\Gigya.Microdot.Hosting.UnitTests.csproj", "{A17C9A6D-317D-441C-B33A-3807B67B4FA2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{79538186-DFAD-463C-B4D1-CD0917CF5954}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalculatorService.Interface", "Sample\CalculatorService.Interface\CalculatorService.Interface.csproj", "{1FB8E464-6A36-44A2-A343-8E95B51B4542}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CalculatorService.Interface", "Sample\CalculatorService.Interface\CalculatorService.Interface.csproj", "{1FB8E464-6A36-44A2-A343-8E95B51B4542}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalculatorService", "Sample\CalculatorService\CalculatorService.csproj", "{5B1BA713-F5BA-466B-B79E-95261DB27FA9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CalculatorService", "Sample\CalculatorService\CalculatorService.csproj", "{5B1BA713-F5BA-466B-B79E-95261DB27FA9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalculatorService.Client", "Sample\CalculatorService.Client\CalculatorService.Client.csproj", "{BCD894C2-29B3-4C76-8E5D-5781A5A10C67}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CalculatorService.Client", "Sample\CalculatorService.Client\CalculatorService.Client.csproj", "{BCD894C2-29B3-4C76-8E5D-5781A5A10C67}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalculatorService.Orleans", "Sample\CalculatorService.Orleans\CalculatorService.Orleans.csproj", "{10E10FDE-8A2C-4D5D-8FC1-15FACF844E80}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CalculatorService.Orleans", "Sample\CalculatorService.Orleans\CalculatorService.Orleans.csproj", "{10E10FDE-8A2C-4D5D-8FC1-15FACF844E80}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gigya.Microdot.Common.Tests", "Gigya.Microdot.Common.Tests\Gigya.Microdot.Common.Tests.csproj", "{47CBF637-AB8F-4568-86D6-EAB6EF08B9CE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.Microdot.Common.Tests", "Gigya.Microdot.Common.Tests\Gigya.Microdot.Common.Tests.csproj", "{47CBF637-AB8F-4568-86D6-EAB6EF08B9CE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gigya.ServiceContract", "Gigya.ServiceContract\Gigya.ServiceContract.csproj", "{DB6D3561-835E-40D5-B9D4-83951CF426DF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataAnnotationsValidator", "DataAnnotationsValidatorRecursive\DataAnnotationsValidator\DataAnnotationsValidator.csproj", "{42184675-21ED-4102-946B-8839F5E4B5F8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataAnnotationsValidator.Tests", "DataAnnotationsValidatorRecursive\DataAnnotationsValidator.Tests\DataAnnotationsValidator.Tests.csproj", "{237D3DC5-E6D2-4030-9ECA-8CA8D749A2B4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataAnnotationsValidator", "DataAnnotationsValidator", "{F569FD0D-42BC-47F4-A351-5D2EA6B66585}" + ProjectSection(SolutionItems) = preProject + DataAnnotationsValidatorRecursive\License.md = DataAnnotationsValidatorRecursive\License.md + DataAnnotationsValidatorRecursive\README.md = DataAnnotationsValidatorRecursive\README.md + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -168,6 +180,18 @@ Global {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE}.Release|Any CPU.ActiveCfg = Release|Any CPU {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE}.Release|Any CPU.Build.0 = Release|Any CPU + {DB6D3561-835E-40D5-B9D4-83951CF426DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB6D3561-835E-40D5-B9D4-83951CF426DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB6D3561-835E-40D5-B9D4-83951CF426DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB6D3561-835E-40D5-B9D4-83951CF426DF}.Release|Any CPU.Build.0 = Release|Any CPU + {42184675-21ED-4102-946B-8839F5E4B5F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42184675-21ED-4102-946B-8839F5E4B5F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42184675-21ED-4102-946B-8839F5E4B5F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42184675-21ED-4102-946B-8839F5E4B5F8}.Release|Any CPU.Build.0 = Release|Any CPU + {237D3DC5-E6D2-4030-9ECA-8CA8D749A2B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {237D3DC5-E6D2-4030-9ECA-8CA8D749A2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {237D3DC5-E6D2-4030-9ECA-8CA8D749A2B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {237D3DC5-E6D2-4030-9ECA-8CA8D749A2B4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -182,6 +206,8 @@ Global {BCD894C2-29B3-4C76-8E5D-5781A5A10C67} = {79538186-DFAD-463C-B4D1-CD0917CF5954} {10E10FDE-8A2C-4D5D-8FC1-15FACF844E80} = {79538186-DFAD-463C-B4D1-CD0917CF5954} {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE} = {F8A1B754-3C63-4051-A1A5-C51E916F90EB} + {42184675-21ED-4102-946B-8839F5E4B5F8} = {F569FD0D-42BC-47F4-A351-5D2EA6B66585} + {237D3DC5-E6D2-4030-9ECA-8CA8D749A2B4} = {F569FD0D-42BC-47F4-A351-5D2EA6B66585} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EnterpriseLibraryConfigurationToolBinariesPathV6 = packages\EnterpriseLibrary.TransientFaultHandling.6.0.1304.0\lib\portable-net45+win+wp8 diff --git a/Sample/CalculatorService.Client/CalculatorService.Client.csproj b/Sample/CalculatorService.Client/CalculatorService.Client.csproj index 8c498a80..aedea202 100644 --- a/Sample/CalculatorService.Client/CalculatorService.Client.csproj +++ b/Sample/CalculatorService.Client/CalculatorService.Client.csproj @@ -1,125 +1,26 @@ - - - + + - Debug - AnyCPU - {BCD894C2-29B3-4C76-8E5D-5781A5A10C67} + netcoreapp2.0 + false + Exe - CalculatorService.Client - CalculatorService.Client - v4.7.2 - 512 - true - true - - 1591 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + - - + + + + - - Designer - - + PreserveNewest - + PreserveNewest - - - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {06E45085-5A54-4BFE-BD24-E9C3983A2689} - Gigya.Microdot.Logging.NLog - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {1FB8E464-6A36-44A2-A343-8E95B51B4542} - CalculatorService.Interface - - - {5B1BA713-F5BA-466B-B79E-95261DB27FA9} - CalculatorService - - - - - - - False - ..\..\packages\System.Threading.Tasks.Dataflow\lib\netstandard1.1\System.Threading.Tasks.Dataflow.dll - - - - - - - True - - - ..\..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\..\packages\Ninject.Extensions.Factory\lib\net45\Ninject.Extensions.Factory.dll - True - True - - - - - \ No newline at end of file + + diff --git a/Sample/CalculatorService.Client/Discovery.config b/Sample/CalculatorService.Client/Discovery.config index 61fa40b8..0b2a6bba 100644 --- a/Sample/CalculatorService.Client/Discovery.config +++ b/Sample/CalculatorService.Client/Discovery.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/Sample/CalculatorService.Interface/CalculatorService.Interface.csproj b/Sample/CalculatorService.Interface/CalculatorService.Interface.csproj index d29310db..07dd2487 100644 --- a/Sample/CalculatorService.Interface/CalculatorService.Interface.csproj +++ b/Sample/CalculatorService.Interface/CalculatorService.Interface.csproj @@ -1,66 +1,12 @@ - - - + + - Debug - AnyCPU - {1FB8E464-6A36-44A2-A343-8E95B51B4542} - Library - Properties - CalculatorService.Interface - CalculatorService.Interface - v4.7.2 - 512 - - 1591 + netstandard2.0 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - + - - Designer - + - - - - - - ..\..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - + \ No newline at end of file diff --git a/Sample/CalculatorService.Orleans/CalculatorService.Orleans.csproj b/Sample/CalculatorService.Orleans/CalculatorService.Orleans.csproj index df569cfe..ea52b9d5 100644 --- a/Sample/CalculatorService.Orleans/CalculatorService.Orleans.csproj +++ b/Sample/CalculatorService.Orleans/CalculatorService.Orleans.csproj @@ -1,917 +1,35 @@ - - - + + - Debug - AnyCPU - {10E10FDE-8A2C-4D5D-8FC1-15FACF844E80} + netcoreapp2.0 + false + Exe - CalculatorService.Orleans - CalculatorService.Orleans - v4.7.2 - 512 - true - - 1591 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - + + + + + + + - - Designer - - + PreserveNewest - - - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {06E45085-5A54-4BFE-BD24-E9C3983A2689} - Gigya.Microdot.Logging.NLog - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {AE847E21-F7D8-47FB-84C3-C7144A9B7A1D} - Gigya.Microdot.Orleans.Ninject.Host - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {1FB8E464-6A36-44A2-A343-8E95B51B4542} - CalculatorService.Interface - - - - - - - ..\..\packages\Microsoft.AspNetCore.Connections.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Extensions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Features\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Core\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Core.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Https\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Https.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.WebUtilities\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll - True - True - - - - - - - - - True - - - ..\..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.FileExtensions\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Physical\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileSystemGlobbing\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.ObjectPool\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Net.Http.Headers\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.DiagnosticSource\lib\net46\System.Diagnostics.DiagnosticSource.dll - True - True - - - - - - - - - ..\..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\..\packages\System.IO.Pipelines\lib\netstandard2.0\System.IO.Pipelines.dll - True - True - - - - - - - - - ..\..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - ..\..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Cng\lib\net47\System.Security.Cryptography.Cng.dll - True - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Text.Encodings.Web\lib\netstandard2.0\System.Text.Encodings.Web.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - + \ No newline at end of file diff --git a/Sample/CalculatorService.Orleans/Dockerfile b/Sample/CalculatorService.Orleans/Dockerfile new file mode 100644 index 00000000..f9c5bfa2 --- /dev/null +++ b/Sample/CalculatorService.Orleans/Dockerfile @@ -0,0 +1,4 @@ +FROM mcr.microsoft.com/dotnet/core/runtime:2.2 +COPY ./bin/Release/netcoreapp2.0/publish/ app/ +WORKDIR /app +ENTRYPOINT ["dotnet", "CalculatorService.Orleans.dll"] \ No newline at end of file diff --git a/Sample/CalculatorService.Orleans/run_docker.bat b/Sample/CalculatorService.Orleans/run_docker.bat new file mode 100644 index 00000000..505af0ae --- /dev/null +++ b/Sample/CalculatorService.Orleans/run_docker.bat @@ -0,0 +1,6 @@ +SET repo=calculatorservice_orleans +SET tag=1.0.0.1 + +dotnet publish -c Release +docker build -t %repo%:%tag% -f Dockerfile . +docker run -it --name CalculatorServiceOrleans --rm -p 12323:12323 %repo%:%tag% \ No newline at end of file diff --git a/Sample/CalculatorService/CalculatorService.csproj b/Sample/CalculatorService/CalculatorService.csproj index 62a15b0a..55127152 100644 --- a/Sample/CalculatorService/CalculatorService.csproj +++ b/Sample/CalculatorService/CalculatorService.csproj @@ -1,134 +1,30 @@ - - - + + - Debug - AnyCPU - {5B1BA713-F5BA-466B-B79E-95261DB27FA9} + netcoreapp2.0 + false + Exe - CalculatorService - CalculatorService - v4.7.2 - 512 - true - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - 1591 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + - - - False - ..\..\packages\System.Threading.Tasks.Dataflow\lib\netstandard1.1\System.Threading.Tasks.Dataflow.dll - + + + + + + + + + + + - - - - - - - Designer - - + PreserveNewest - - - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {06E45085-5A54-4BFE-BD24-E9C3983A2689} - Gigya.Microdot.Logging.NLog - - - {4E6A024F-DDC9-4A27-A859-77EBC3241009} - Gigya.Microdot.Ninject.Host - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {1FB8E464-6A36-44A2-A343-8E95B51B4542} - CalculatorService.Interface - - - - - False - .NET Framework 3.5 SP1 - false - - - - - - - ..\..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - + \ No newline at end of file diff --git a/Sample/CalculatorService/Dockerfile b/Sample/CalculatorService/Dockerfile new file mode 100644 index 00000000..85b3c607 --- /dev/null +++ b/Sample/CalculatorService/Dockerfile @@ -0,0 +1,4 @@ +FROM mcr.microsoft.com/dotnet/core/runtime:2.2 +COPY ./bin/Release/netcoreapp2.0/publish/ app/ +WORKDIR /app +ENTRYPOINT ["dotnet", "CalculatorService.dll"] \ No newline at end of file diff --git a/Sample/CalculatorService/run_docker.bat b/Sample/CalculatorService/run_docker.bat new file mode 100644 index 00000000..212bb8a6 --- /dev/null +++ b/Sample/CalculatorService/run_docker.bat @@ -0,0 +1,6 @@ +SET repo=calculatorservice +SET tag=1.0.0.1 + +dotnet publish -c Release +docker build -t %repo%:%tag% -f Dockerfile . +docker run -it --name CalculatorService --rm -p 12323:12323 %repo%:%tag% \ No newline at end of file diff --git a/tests/Gigya.Microdot.Hosting.UnitTests/Gigya.Microdot.Hosting.UnitTests.csproj b/tests/Gigya.Microdot.Hosting.UnitTests/Gigya.Microdot.Hosting.UnitTests.csproj index ecb58695..01b91010 100644 --- a/tests/Gigya.Microdot.Hosting.UnitTests/Gigya.Microdot.Hosting.UnitTests.csproj +++ b/tests/Gigya.Microdot.Hosting.UnitTests/Gigya.Microdot.Hosting.UnitTests.csproj @@ -1,1098 +1,31 @@ - - - - - + + - Debug - AnyCPU - {A17C9A6D-317D-441C-B33A-3807B67B4FA2} - Library - Properties - Gigya.Microdot.Hosting.UnitTests - Gigya.Microdot.Hosting.UnitTests - v4.7.2 - 512 - - true - true - 1591 + netcoreapp2.0 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - CS1998 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - - - <__paket__NETStandard_Library_targets>netstandard2.0\NETStandard.Library - - - - - - - {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE} - Gigya.Microdot.Common.Tests - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {2865F69B-D847-4901-8945-4941E463F94E} - Gigya.Microdot.Fakes - - - {4E6A024F-DDC9-4A27-A859-77EBC3241009} - Gigya.Microdot.Ninject.Host - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {AE847E21-F7D8-47FB-84C3-C7144A9B7A1D} - Gigya.Microdot.Orleans.Ninject.Host - - - {37e6909e-51e2-4bba-8efc-dbdf086d860e} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {DD807780-01B0-4EF6-9E42-5D15CA26F353} - Gigya.Microdot.Orleans.Hosting - - - {d37e359c-170e-4d67-ad49-45002b48987e} - Gigya.Microdot.Testing - - - {6D6A62A1-15B5-44C2-AD37-698AB31863E4} - Gigya.Microdot.Testing.Shared - - + - + + + + - - - - - True - - - ..\..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Extensions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Features\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.WebUtilities\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll - True - True - - - - + - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - + + + + + + + + + + + + + - - - - - ..\..\packages\Microsoft.CodeAnalysis.Common\lib\netstandard2.0\Microsoft.CodeAnalysis.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.FileExtensions\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Physical\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileSystemGlobbing\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.ObjectPool\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Net.Http.Headers\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.OrleansCodeGenerator\lib\netstandard2.0\Orleans.CodeGeneration.dll - True - True - - - - - - - - - ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\..\packages\NSubstitute\lib\net46\NSubstitute.dll - True - True - - - - - - - - - ..\..\packages\NUnit\lib\net45\nunit.framework.dll - True - True - - - - - - - - - ..\..\packages\Shouldly\lib\net451\Shouldly.dll - True - True - - - - - - - - - ..\..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.DiagnosticSource\lib\net46\System.Diagnostics.DiagnosticSource.dll - True - True - - - - - - - - - ..\..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - ..\..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection\lib\net462\System.Reflection.dll - False - True - - - - - - - - - ..\..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Text.Encoding.CodePages\lib\net461\System.Text.Encoding.CodePages.dll - True - True - - - - - - - - - ..\..\packages\System.Text.Encodings.Web\lib\netstandard2.0\System.Text.Encodings.Web.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - - - - - ..\..\packages\ZooKeeperNetEx\lib\netstandard1.3\ZooKeeperNetEx.dll - True - True - - - - - - - \ No newline at end of file + + diff --git a/tests/Gigya.Microdot.Orleans.Hosting.UnitTests/Gigya.Microdot.Orleans.Hosting.UnitTests.csproj b/tests/Gigya.Microdot.Orleans.Hosting.UnitTests/Gigya.Microdot.Orleans.Hosting.UnitTests.csproj index f515ed47..295cbefe 100644 --- a/tests/Gigya.Microdot.Orleans.Hosting.UnitTests/Gigya.Microdot.Orleans.Hosting.UnitTests.csproj +++ b/tests/Gigya.Microdot.Orleans.Hosting.UnitTests/Gigya.Microdot.Orleans.Hosting.UnitTests.csproj @@ -1,1234 +1,35 @@ - - - - - + + - Debug - AnyCPU - {8E548D57-5880-4283-BDF5-7386886D481D} - Library - Properties - Gigya.Microdot.Orleans.Hosting.UnitTests - Gigya.Microdot.Orleans.Hosting.UnitTests - v4.7.2 - 512 - - true - true - 1591 + netcoreapp2.0 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - CS1998 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - PreserveNewest - - - - - - - - <__paket__NETStandard_Library_targets>netstandard2.0\NETStandard.Library - - - - - - - {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE} - Gigya.Microdot.Common.Tests - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {2865F69B-D847-4901-8945-4941E463F94E} - Gigya.Microdot.Fakes - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {AE847E21-F7D8-47FB-84C3-C7144A9B7A1D} - Gigya.Microdot.Orleans.Ninject.Host - - - {37e6909e-51e2-4bba-8efc-dbdf086d860e} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {A90D7C71-EC7C-4328-9DB1-D2C3A30727DB} - Gigya.Microdot.Interfaces - - - {DD807780-01B0-4EF6-9E42-5D15CA26F353} - Gigya.Microdot.Orleans.Hosting - - - {d37e359c-170e-4d67-ad49-45002b48987e} - Gigya.Microdot.Testing - - - {6D6A62A1-15B5-44C2-AD37-698AB31863E4} - Gigya.Microdot.Testing.Shared - - + - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - - - True - - - ..\..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - ..\..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Connections.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Extensions\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Http.Features\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Core\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Core.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Https\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Https.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.AspNetCore.WebUtilities\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll - True - True - - - - + - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - + + + + + + + + + + + + + - - - - - ..\..\packages\Microsoft.CodeAnalysis.Common\lib\netstandard2.0\Microsoft.CodeAnalysis.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.FileExtensions\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Physical\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileSystemGlobbing\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.ObjectPool\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Net.Http.Headers\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.OrleansCodeGenerator\lib\netstandard2.0\Orleans.CodeGeneration.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.OrleansProviders\lib\netstandard2.0\OrleansProviders.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Runtime.Abstractions\lib\netstandard2.0\Orleans.Runtime.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\..\packages\NSubstitute\lib\net46\NSubstitute.dll - True - True - - - - - - - - - ..\..\packages\NUnit\lib\net45\nunit.framework.dll - True - True - - - - - - - - - ..\..\packages\Shouldly\lib\net451\Shouldly.dll - True - True - - - - - - - - - ..\..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.DiagnosticSource\lib\net46\System.Diagnostics.DiagnosticSource.dll - True - True - - - - - - - - - ..\..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\..\packages\System.IO.Pipelines\lib\netstandard2.0\System.IO.Pipelines.dll - True - True - - - - - - - - - ..\..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - ..\..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection\lib\net462\System.Reflection.dll - False - True - - - - - - - - - ..\..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Cng\lib\net47\System.Security.Cryptography.Cng.dll - True - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Text.Encoding.CodePages\lib\net461\System.Text.Encoding.CodePages.dll - True - True - - - - - - - - - ..\..\packages\System.Text.Encodings.Web\lib\netstandard2.0\System.Text.Encodings.Web.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - - - - - ..\..\packages\ZooKeeperNetEx\lib\netstandard1.3\ZooKeeperNetEx.dll - True - True - - - - - - - \ No newline at end of file + + diff --git a/tests/Gigya.Microdot.ServiceContract.UnitTests/Gigya.Microdot.ServiceContract.UnitTests.csproj b/tests/Gigya.Microdot.ServiceContract.UnitTests/Gigya.Microdot.ServiceContract.UnitTests.csproj index 75caeb3d..032da5ef 100644 --- a/tests/Gigya.Microdot.ServiceContract.UnitTests/Gigya.Microdot.ServiceContract.UnitTests.csproj +++ b/tests/Gigya.Microdot.ServiceContract.UnitTests/Gigya.Microdot.ServiceContract.UnitTests.csproj @@ -1,120 +1,19 @@ - - - - + + - Debug - AnyCPU - {C224F79A-EAB5-48B8-B587-65772B0966EF} - Library - Properties - Gigya.Common.Contracts.UnitTests - Gigya.Common.Contracts.UnitTests - v4.7.2 - 512 - ..\ - - true - true - 1591 + netcoreapp2.0 + false - - true - bin\Debug\ - TRACE;DEBUG - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - CS1998 - 3 - - - bin\Release\ - TRACE - true - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - true - - - - - - - - - - - - - - - + - - Designer - - + + + + + - + - - - - - - - ..\..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\..\packages\NUnit\lib\net45\nunit.framework.dll - True - True - - - - - - - - - True - - - ..\..\packages\Shouldly\lib\net451\Shouldly.dll - True - True - - - - - \ No newline at end of file + + diff --git a/tests/Gigya.Microdot.UnitTests/Discovery/ConsulSimulator.cs b/tests/Gigya.Microdot.UnitTests/Discovery/ConsulSimulator.cs index 4fcddd8a..747e5973 100644 --- a/tests/Gigya.Microdot.UnitTests/Discovery/ConsulSimulator.cs +++ b/tests/Gigya.Microdot.UnitTests/Discovery/ConsulSimulator.cs @@ -321,8 +321,8 @@ private async Task SetResponse(HttpListenerContext context, string serviceName, public void Dispose() { - _consulListener.Close(); - ((IDisposable)_consulListener)?.Dispose(); + //_consulListener.Close(); + //((IDisposable)_consulListener)?.Dispose(); _waitForKeyValueIndexModification.TrySetResult(false); _waitForHealthIndexModification.TrySetResult(false); } diff --git a/tests/Gigya.Microdot.UnitTests/Events/EventSerializationTests.cs b/tests/Gigya.Microdot.UnitTests/Events/EventSerializationTests.cs index 850d75f7..c512c3fa 100644 --- a/tests/Gigya.Microdot.UnitTests/Events/EventSerializationTests.cs +++ b/tests/Gigya.Microdot.UnitTests/Events/EventSerializationTests.cs @@ -191,7 +191,7 @@ public async Task PublishClientCallEvent() serializedEvent[EventConsts.srvVersion].ShouldBe(AppInfo.Version.ToString(4)); serializedEvent.ShouldContainKey(EventConsts.infrVersion); - serializedEvent[EventConsts.infrVersion].ShouldBe(AppInfo.Version.ToString(4)); + serializedEvent[EventConsts.infrVersion].ShouldBe(AppInfo.InfraVersion.ToString(4)); serializedEvent.ShouldContainKey(EventConsts.srvSystemInstance); diff --git a/tests/Gigya.Microdot.UnitTests/Gigya.Microdot.UnitTests.csproj b/tests/Gigya.Microdot.UnitTests/Gigya.Microdot.UnitTests.csproj index fe40409e..9ea5a6d5 100644 --- a/tests/Gigya.Microdot.UnitTests/Gigya.Microdot.UnitTests.csproj +++ b/tests/Gigya.Microdot.UnitTests/Gigya.Microdot.UnitTests.csproj @@ -1,896 +1,34 @@ - - - - + + - Debug - AnyCPU - {0A24AE97-EE88-4E8B-8B92-092884D41399} - Library - Properties - Gigya.Microdot.UnitTests - Gigya.Microdot.UnitTests - v4.7.2 - 512 - true - true - - 1591 + netcoreapp2.0 + false - - true - full - false - bin\Debug\ - TRACE;DEBUG - prompt - 3 - CS4014;CS1998; - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - + - - {47CBF637-AB8F-4568-86D6-EAB6EF08B9CE} - Gigya.Microdot.Common.Tests - - - {0E3A2422-DD99-4D75-A18C-96329A842742} - Gigya.Microdot.Configuration - - - {2865F69B-D847-4901-8945-4941E463F94E} - Gigya.Microdot.Fakes - - - {33C1B76E-47B2-40BC-A434-81EE22996BEF} - Gigya.Microdot.Hosting - - - {a90d7c71-ec7c-4328-9db1-d2c3a30727db} - Gigya.Microdot.Interfaces - - - {06E45085-5A54-4BFE-BD24-E9C3983A2689} - Gigya.Microdot.Logging.NLog - - - {4E6A024F-DDC9-4A27-A859-77EBC3241009} - Gigya.Microdot.Ninject.Host - - - {63E40F38-DF99-4DF5-9B45-ADDB0C2FC9FF} - Gigya.Microdot.Ninject - - - {dd807780-01b0-4ef6-9e42-5d15ca26f353} - Gigya.Microdot.Orleans.Hosting - - - {37E6909E-51E2-4BBA-8EFC-DBDF086D860E} - Gigya.Microdot.ServiceDiscovery - - - {1FCB2569-A640-4292-9CDC-821AEEF14813} - Gigya.Microdot.ServiceProxy - - - {C88DB2A8-A1D2-46F8-8B65-06B9EE3F1662} - Gigya.Microdot.SharedLogic - - - {6D6A62A1-15B5-44C2-AD37-698AB31863E4} - Gigya.Microdot.Testing.Shared - + + + + + + + + - + + + + + + + + + + + + + - - - - - True - - - ..\..\packages\Castle.Core\lib\net45\Castle.Core.dll - True - True - - - - - - - - - True - - - ..\..\packages\DataAnnotationsValidator\lib\net40\DataAnnotationsValidator.dll - True - True - - - - - - - - - ..\..\packages\FluentAssertions\lib\net47\FluentAssertions.dll - True - True - - - - - - - - - ..\..\packages\Gigya.ServiceContract\lib\net451\Gigya.ServiceContract.dll - True - True - - - - - - - - - ..\..\packages\Metrics.NET\lib\net45\Metrics.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.DotNet.PlatformAbstractions\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Configuration.Binder\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection\lib\net461\Microsoft.Extensions.DependencyInjection.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.DependencyModel\lib\net451\Microsoft.Extensions.DependencyModel.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Hosting.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options\lib\netstandard2.0\Microsoft.Extensions.Options.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Extensions.Primitives\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core\lib\netstandard2.0\Orleans.Core.dll - True - True - - - - - - - - - ..\..\packages\Microsoft.Orleans.Core.Abstractions\lib\netstandard2.0\Orleans.Core.Abstractions.dll - True - True - - - - - - - - - ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll - True - True - - - - - - - - - ..\..\packages\Ninject\lib\net45\Ninject.dll - True - True - - - - - - - - - ..\..\packages\NSubstitute\lib\net46\NSubstitute.dll - True - True - - - - - - - - - ..\..\packages\NUnit\lib\net45\nunit.framework.dll - True - True - - - - - - - - - ..\..\packages\RichardSzalay.MockHttp\lib\net45\RichardSzalay.MockHttp.dll - True - True - - - - - - - - - ..\..\packages\Shouldly\lib\net451\Shouldly.dll - True - True - - - - - - - - - ..\..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll - True - True - - - - - - - - - ..\..\packages\System.Collections.Immutable\lib\netstandard2.0\System.Collections.Immutable.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Collections.NonGeneric\lib\net46\System.Collections.NonGeneric.dll - False - True - - - - - - - - - ..\..\packages\System.ComponentModel.Annotations\lib\net461\System.ComponentModel.Annotations.dll - True - True - - - - - - - - - ..\..\packages\System.ComponentModel.Primitives\lib\net45\System.ComponentModel.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.ComponentModel.TypeConverter\lib\net462\System.ComponentModel.TypeConverter.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.FileVersionInfo\lib\net46\System.Diagnostics.FileVersionInfo.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.Process\lib\net461\System.Diagnostics.Process.dll - False - True - - - - - - - - - ..\..\packages\System.Diagnostics.TraceSource\lib\net46\System.Diagnostics.TraceSource.dll - False - True - - - - - - - - - ..\..\packages\System.IO\lib\net462\System.IO.dll - False - True - - - - - - - - - ..\..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll - False - True - - - - - - - - - ..\..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll - True - True - - - - - - - - - ..\..\packages\System.Net.NameResolution\lib\net46\System.Net.NameResolution.dll - False - True - - - - - - - - - ..\..\packages\System.Net.NetworkInformation\lib\net46\System.Net.NetworkInformation.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection.Metadata\lib\netstandard2.0\System.Reflection.Metadata.dll - True - True - - - - - - - - - ..\..\packages\System.Reflection.TypeExtensions\lib\net461\System.Reflection.TypeExtensions.dll - True - True - - - - - - - - - True - - - ..\..\packages\System.Runtime\lib\net462\System.Runtime.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - True - True - - - - - - - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - False - True - - - - - - - - - ..\..\packages\System.Runtime.Serialization.Formatters\lib\net46\System.Runtime.Serialization.Formatters.dll - False - True - - - - - - - - - True - - - ..\..\packages\System.Runtime.Serialization.Primitives\lib\net46\System.Runtime.Serialization.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Encoding\lib\net46\System.Security.Cryptography.Encoding.dll - False - True - - - - - - - - - ..\..\packages\System.Security.Cryptography.Primitives\lib\net46\System.Security.Cryptography.Primitives.dll - False - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Dataflow\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Tasks.Extensions\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - True - True - - - - - - - - - ..\..\packages\System.Threading.Thread\lib\net46\System.Threading.Thread.dll - False - True - - - - - - - - - ..\..\packages\System.Threading.ThreadPool\lib\net46\System.Threading.ThreadPool.dll - False - True - - - - - - - - - ..\..\packages\System.ValueTuple\lib\net47\System.ValueTuple.dll - True - True - - - - - - - - - ..\..\packages\System.Xml.XmlDocument\lib\net46\System.Xml.XmlDocument.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath\lib\net46\System.Xml.XPath.dll - False - True - - - - - - - - - ..\..\packages\System.Xml.XPath.XmlDocument\lib\net46\System.Xml.XPath.XmlDocument.dll - True - True - - - - - \ No newline at end of file + + diff --git a/tests/Gigya.Microdot.UnitTests/NinjectExtensionsTests.cs b/tests/Gigya.Microdot.UnitTests/NinjectExtensionsTests.cs index 6d24325f..e3e6674b 100644 --- a/tests/Gigya.Microdot.UnitTests/NinjectExtensionsTests.cs +++ b/tests/Gigya.Microdot.UnitTests/NinjectExtensionsTests.cs @@ -4,7 +4,7 @@ using Gigya.Microdot.Ninject; using Ninject; - +using Ninject.Extensions.Factory; using NUnit.Framework; using Shouldly; @@ -71,7 +71,7 @@ public void BindPerMultiKey_ServiceToService_ShouldFail() [Test] public void BindPerKey_WithAndWithoutParam_DifferentInstances() { - var k = new StandardKernel(); + var k = new StandardKernel(new FuncModule()); k.BindPerKey(); k.BindPerKey(); @@ -85,7 +85,7 @@ public void BindPerKey_WithAndWithoutParam_DifferentInstances() private void Test_BindPerKey() where TImplementation : TService { - var k = new StandardKernel(); + var k = new StandardKernel(new FuncModule()); k.BindPerKey(); @@ -102,7 +102,7 @@ private void Test_BindPerKey() where TImplementation private void Test_BindPerKeyWithParam() where TImplementation : TService { - var k = new StandardKernel(); + var k = new StandardKernel(new FuncModule()); k.BindPerKey(); @@ -126,7 +126,7 @@ private void Test_BindPerKeyWithParam() where TImplem private void Test_BindPerMultiKey() where TImplementation : TService { - var k = new StandardKernel(); + var k = new StandardKernel(new FuncModule()); k.BindPerMultiKey(); diff --git a/tests/Gigya.Microdot.UnitTests/Serialization/ExceptionSerializationTests.cs b/tests/Gigya.Microdot.UnitTests/Serialization/ExceptionSerializationTests.cs index 43384495..a2f6f276 100644 --- a/tests/Gigya.Microdot.UnitTests/Serialization/ExceptionSerializationTests.cs +++ b/tests/Gigya.Microdot.UnitTests/Serialization/ExceptionSerializationTests.cs @@ -97,7 +97,7 @@ public void OrleansSerialization_CustomerFacingException_IsEquivalent() /// [DONE] #ORLEANS20 - I don't now why, but round/trip for HttpRequestException is loosing stack trace... /// https://github.com/dotnet/orleans/issues/5876 /// - [Test] + [Test, Ignore("Waiting for issue to be fixed by Orleans")] public void OrleansSerialization_HttpRequestException_IsEquivalent() { var expected = new HttpRequestException("HTTP request exception").ThrowAndCatch(); diff --git a/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/AbstractServiceProxyTest.cs b/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/AbstractServiceProxyTest.cs index a9409ec8..d4d94b4b 100644 --- a/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/AbstractServiceProxyTest.cs +++ b/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/AbstractServiceProxyTest.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Net.Http; -using System.Runtime.Remoting.Messaging; using Gigya.Microdot.Fakes; using Gigya.Microdot.ServiceProxy; using Gigya.Microdot.SharedLogic.Events; diff --git a/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/BehaviorTests.cs b/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/BehaviorTests.cs index ead1e893..3e00d1cf 100644 --- a/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/BehaviorTests.cs +++ b/tests/Gigya.Microdot.UnitTests/ServiceProxyTests/BehaviorTests.cs @@ -2,10 +2,8 @@ using System.Collections.Generic; using System.Net; using System.Net.Http; -using System.Runtime.Remoting.Messaging; using System.Threading.Tasks; using FluentAssertions; - using Gigya.Common.Application.HttpService.Client; using Gigya.Common.Contracts.Exceptions; using Gigya.Microdot.Fakes; @@ -292,28 +290,26 @@ public async Task OneHostHasNetworkErrorShouldMoveToNextHost() {"Discovery.Services.DemoService.DefaultPort", port.ToString()} }; - using (var kernel = - new TestingKernel( - k => - { - k.Rebind().To().InSingletonScope(); - }, dict) - ) + using (var kernel = new TestingKernel(k => { + k.Rebind().To().InSingletonScope(); + }, dict)) { var providerFactory = kernel.Get>(); var serviceProxy = providerFactory("DemoService"); serviceProxy.DefaultPort = port; TracingContext.SetRequestID("1"); - int counter = 0; + int counterHost1 = 0; + int counterHost2 = 0; var messageHandler = new MockHttpMessageHandler(); messageHandler .When("*") - .Respond(req => - { - - counter++; + .Respond(req => { + if (req.RequestUri.Host == "host1") + counterHost1++; + if (req.RequestUri.Host == "host2") + counterHost2++; if (req.RequestUri.Host == "host1") throw new HttpRequestException(); return HttpResponseFactory.GetResponse(content: $"'{req.RequestUri.Host}'"); @@ -329,7 +325,7 @@ public async Task OneHostHasNetworkErrorShouldMoveToNextHost() server.ShouldBe("host2"); } - counter.ShouldBe(3); + counterHost2.ShouldBe(3); } } @@ -356,7 +352,7 @@ public async Task RequestContextOverrideShouldFailOnFirstAttempt() //Disable TracingContext.SetRequestID("1"); - CallContext.FreeNamedDataSlot("#ORL_RC"); + TracingContext.ClearContext();// CallContext.FreeNamedDataSlot("#ORL_RC"); int counter = 0; var messageHandler = new MockHttpMessageHandler(); @@ -410,7 +406,7 @@ public async Task FailedHostShouldBeRemovedFromHostList() //Disable TracingContext.SetRequestID("1"); - CallContext.FreeNamedDataSlot("#ORL_RC"); + TracingContext.ClearContext();// CallContext.FreeNamedDataSlot("#ORL_RC"); int counter = 0; var messageHandler = new MockHttpMessageHandler();