diff --git a/Build/Program.cs b/Build/Program.cs index 6ef3be5..65328d2 100644 --- a/Build/Program.cs +++ b/Build/Program.cs @@ -23,7 +23,7 @@ } var outputDir = Path.Combine("Immutype", "Bin", configuration); -var defaultVersion = NuGetVersion.Parse(Property.Get("version", "1.0.0-dev", Tools.UnderTeamCity)); +var defaultVersion = NuGetVersion.Parse(Props.Get("version", "1.0.0-dev")); var nuGetVersion = Version.GetNext(new NuGetRestoreSettings(packageId).WithPackageType(NuGetPackageType.Tool), defaultVersion); var packages = new List(); foreach (var settings in buildSettings) @@ -62,7 +62,7 @@ var teamCityWriter = GetService(); teamCityWriter.PublishArtifact($"{mergedPackage} => ."); -var apiKey = Property.Get("apiKey", ""); +var apiKey = Props.Get("apiKey", ""); if (!string.IsNullOrWhiteSpace(apiKey) && nuGetVersion.Release != "dev") { new DotNetNuGetPush() diff --git a/Build/Tools.cs b/Build/Tools.cs index 614baab..2f58ced 100644 --- a/Build/Tools.cs +++ b/Build/Tools.cs @@ -74,28 +74,4 @@ public static NuGetVersion GetNext(NuGetRestoreSettings settings, NuGetVersion d : new NuGetVersion(i.Major, i.Minor, i.Patch + 1)) .Max() ?? defaultVersion; } -} - -static class Property -{ - public static string Get(string name, string defaultProp, bool showWarning = false) - { - if (Props.TryGetValue(name, out var prop) && !string.IsNullOrWhiteSpace(prop)) - { - WriteLine($"{name}: {prop}", Color.Highlighted); - return prop; - } - - var message = $"The property \"{name}\" was not defined, the default value \"{defaultProp}\" was used."; - if (showWarning) - { - Warning(message); - } - else - { - Info(message); - } - - return defaultProp; - } } \ No newline at end of file diff --git a/Immutype/Core/MethodWithFactory.cs b/Immutype/Core/MethodWithFactory.cs index 7aae6a2..c2b6f0a 100644 --- a/Immutype/Core/MethodWithFactory.cs +++ b/Immutype/Core/MethodWithFactory.cs @@ -84,7 +84,7 @@ public IEnumerable Create(GenerationContext{_nameService.ConvertToName(currentParameter.Identifier.Text)}.", currentParameter, - $"{_nameService.ConvertToName(currentParameter.Identifier.Text)} to be changed in the copy of the instance.", + "", _syntaxNodeFactory.CreateExtensionMethod(targetType, $"Clear{name}" + targetDeclaration.TypeParameterList) .AddParameterListParameters(thisParameter) .WithConstraintClauses(targetDeclaration.ConstraintClauses) diff --git a/Immutype/Immutype.csproj b/Immutype/Immutype.csproj index 0617432..8e82210 100644 --- a/Immutype/Immutype.csproj +++ b/Immutype/Immutype.csproj @@ -32,7 +32,7 @@ - + all analyzers