Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<!-- Framework-Agnostic Packages -->
<ItemGroup>
<PackageVersion Include="Inxton.Operon" Version="0.3.0-alpha.107" />
<PackageVersion Include="Inxton.Operon" Version="0.3.0-alpha.108" />
<PackageVersion Include="Cake.DocFx" Version="1.0.0" />
<PackageVersion Include="Octokit" Version="13.0.1" />
<PackageVersion Include="Octokit.Extensions" Version="1.0.7" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ private void CreateITwinObjectImplementation()
"public string Symbol { get; protected set; }" +
"private string _attributeName;" +
"public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }" +
"public System.String GetAttributeName(System.Globalization.CultureInfo culture) { return this.Translate(_attributeName, culture).Interpolate(this); }" +
"public System.String GetAttributeName(System.Globalization.CultureInfo culture) { if (string.IsNullOrEmpty(_attributeName)) { return SymbolTail; } return this.Translate(_attributeName, culture).Interpolate(this); }" +
"private string _humanReadable;" +
"public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }" +
"public System.String GetHumanReadable(System.Globalization.CultureInfo culture) { return this.Translate(_humanReadable, culture); }" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ private void CompareOutputs(string memberName)

var actualFileContentLines = actualFileContent.Split("\n").Select(a => a.Trim()).ToArray();
var expectedFileContentLines = expectedFileContent.Split("\n").Select(a => a.Trim()).ToArray();

output.WriteLine($"Actual output file: {actualSourceFile}");
output.WriteLine($"Expected output file: {expectedSourceFile}");
for (int i = 0; i < expectedFileContentLines.Length; i++)
{
Assert.Equal(expectedFileContentLines[i], actualFileContentLines[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ public void should_match_expected_and_generated_whole_project()
}
catch (Exception)
{

output.WriteLine("--------------------------------------------------");
output.WriteLine($"Actual file: {actualList[currentIndex]}");
output.WriteLine($"Expected file: {exp}");
output.WriteLine("--------------------------------------------------");

output.WriteLine($"-- Case: {new FileInfo(exp).Name} vs {new FileInfo(actualList[currentIndex]).Name}");
output.WriteLine($"-- expected\n{expectedFileContent}");
output.WriteLine($"-- actual\n{actualFileContent}");
Expand Down Expand Up @@ -216,10 +222,15 @@ public void should_generate_all_even_when_fails_somewhere()
var actualFileContent = File.ReadAllText(actualList[currentIndex]);
try
{

Assert.Equal(expectedFileContent, actualFileContent);
}
catch (Exception)
{
output.WriteLine("--------------------------------------------------");
output.WriteLine($"Actual file: {actualList[currentIndex]}");
output.WriteLine($"Expected file: {exp}");
output.WriteLine("--------------------------------------------------");
output.WriteLine($"-- Case: {new FileInfo(exp).Name} vs {new FileInfo(actualList[currentIndex]).Name}");
output.WriteLine($"-- expected\n{expectedFileContent}");
output.WriteLine($"-- actual\n{actualFileContent}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down Expand Up @@ -434,6 +439,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down Expand Up @@ -705,6 +710,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down Expand Up @@ -402,6 +407,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down Expand Up @@ -402,6 +407,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down Expand Up @@ -404,6 +409,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ public AXSharp.Connector.ITwinObject GetParent()

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
if (string.IsNullOrEmpty(_attributeName))
{
return SymbolTail;
}

return this.Translate(_attributeName, culture).Interpolate(this);
}

Expand Down
Loading