BUTR/Bannerlord.UIExtenderEx

View on GitHub
docs/articles/interface/ViewModelMixin.svg

Summary

Maintainability
Test Coverage
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="539" height="502" contentStyleType="text/css" preserveAspectRatio="none" style="width:539px;height:502px;background:#fff" version="1.1" viewBox="0 0 539 502" zoomAndPan="magnify"><g><g id="elem_MyVMMixin"><rect id="MyVMMixin" width="118" height="66.621" x="209.5" y="7" fill="#F1F1F1" codeLine="5" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:.5"/><ellipse cx="232.15" cy="23" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1"/><path fill="#000" d="M234.9156,18.875 Q235.0719,18.6563 235.2594,18.5469 Q235.4469,18.4375 235.6656,18.4375 Q236.0406,18.4375 236.275,18.7031 Q236.5094,18.9531 236.5094,19.5625 L236.5094,21.0156 Q236.5094,21.625 236.275,21.8906 Q236.0406,22.1563 235.6656,22.1563 Q235.3219,22.1563 235.1188,21.9531 Q234.9156,21.7656 234.8063,21.25 Q234.7594,20.8906 234.5719,20.7031 Q234.2438,20.3281 233.6344,20.1094 Q233.025,19.8906 232.4,19.8906 Q231.6344,19.8906 230.9938,20.2188 Q230.3688,20.5469 229.8688,21.2969 Q229.3844,22.0469 229.3844,23.0781 L229.3844,24.1719 Q229.3844,25.4063 230.275,26.2344 Q231.1656,27.0469 232.7594,27.0469 Q233.6969,27.0469 234.3531,26.7969 Q234.7438,26.6406 235.1656,26.2031 Q235.4313,25.9375 235.5719,25.8594 Q235.7281,25.7813 235.9313,25.7813 Q236.2594,25.7813 236.5094,26.0469 Q236.775,26.2969 236.775,26.6406 Q236.775,26.9844 236.4313,27.3906 Q235.9313,27.9688 235.1344,28.2969 Q234.0563,28.75 232.7594,28.75 Q231.2438,28.75 230.0406,28.125 Q229.0563,27.625 228.3688,26.5625 Q227.6813,25.4844 227.6813,24.2031 L227.6813,23.0469 Q227.6813,21.7188 228.2906,20.5781 Q228.9156,19.4219 230.0094,18.8125 Q231.1031,18.1875 232.3375,18.1875 Q233.0719,18.1875 233.7125,18.3594 Q234.3688,18.5156 234.9156,18.875 Z"/><text x="247.85" y="28.797" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="69">MyVMMixin</text><line style="stroke:#181818;stroke-width:.5" x1="210.5" x2="326.5" y1="39" y2="39"/><text x="215.5" y="58.107" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="106">[ViewModelMixin]</text><line style="stroke:#181818;stroke-width:.5" x1="210.5" x2="326.5" y1="65.621" y2="65.621"/></g><g id="elem_BaseViewModelMixin"><rect id="BaseViewModelMixin" width="519" height="215.59" x="9" y="134" fill="#F1F1F1" codeLine="8" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:.5"/><ellipse cx="163.25" cy="150" fill="#A9DCDF" rx="11" ry="11" style="stroke:#181818;stroke-width:1"/><path fill="#000" d="M165.4375,151.7656 L161.2969,151.7656 L160.875,152.7969 L161.2969,152.7969 Q161.9063,152.7969 162.1719,153.0313 Q162.4375,153.2656 162.4375,153.6563 Q162.4375,154.0313 162.1719,154.2656 Q161.9063,154.5 161.2969,154.5 L159,154.5 Q158.3906,154.5 158.1406,154.2656 Q157.875,154.0313 157.875,153.6406 Q157.875,153.2656 158.1563,153.0313 Q158.4219,152.7813 159.0469,152.7969 L161.7188,146.1406 L160.6094,146.1406 Q160,146.1406 159.7344,145.9063 Q159.4688,145.6719 159.4688,145.2813 Q159.4688,144.9063 159.7344,144.6719 Q160,144.4375 160.6094,144.4375 L164.2813,144.4375 L167.6719,152.7969 Q168.2656,152.7969 168.4531,152.9375 Q168.8438,153.2031 168.8438,153.6563 Q168.8438,154.0313 168.5781,154.2656 Q168.3281,154.5 167.7188,154.5 L165.4219,154.5 Q164.8125,154.5 164.5469,154.2656 Q164.2813,154.0313 164.2813,153.6406 Q164.2813,153.2656 164.5469,153.0313 Q164.8125,152.7969 165.4219,152.7969 L165.8438,152.7969 L165.4375,151.7656 Z M164.7188,150.0625 L163.3594,146.6875 L161.9844,150.0625 L164.7188,150.0625 Z"/><text x="183.75" y="155.797" fill="#000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="132">BaseViewModelMixin</text><rect width="68" height="17.961" x="463" fill="#FFF" style="stroke:#181818;stroke-width:1;stroke-dasharray:2,2" y="131"/><text x="464" y="144.949" fill="#000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacing" textLength="66">TViewModel</text><line style="stroke:#181818;stroke-width:.5" x1="10" x2="527" y1="166" y2="166"/><polygon fill="none" points="20 175.81 24 179.81 20 183.81 16 179.81" style="stroke:#b38d22;stroke-width:1"/><text x="29" y="185.107" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="155">TViewModel? ViewModel</text><line style="stroke:#181818;stroke-width:.5" x1="10" x2="527" y1="192.621" y2="192.621"/><ellipse cx="20" cy="207.432" fill="#84BE84" rx="3" ry="3" style="stroke:#038048;stroke-width:1"/><text x="29" y="211.728" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="238">BaseViewModelMixin(TViewModel vm)</text><ellipse cx="20" cy="226.053" fill="#84BE84" rx="3" ry="3" style="stroke:#038048;stroke-width:1"/><text x="29" y="230.35" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="109">void OnRefresh()</text><ellipse cx="20" cy="244.674" fill="#84BE84" rx="3" ry="3" style="stroke:#038048;stroke-width:1"/><text x="29" y="248.971" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="107">void OnFinalize()</text><polygon fill="#FF4" points="20 258.295 24 262.295 20 266.295 16 262.295" style="stroke:#b38d22;stroke-width:1"/><text x="29" y="267.592" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="345">void OnPropertyChanged(string? propertyName = null)</text><polygon fill="#FF4" points="20 276.916 24 280.916 20 284.916 16 280.916" style="stroke:#b38d22;stroke-width:1"/><text x="29" y="286.213" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="493">void OnPropertyChangedWithValue(object value, string? propertyName = null)</text><polygon fill="#FF4" points="20 295.537 24 299.537 20 303.537 16 299.537" style="stroke:#b38d22;stroke-width:1"/><text x="29" y="304.834" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="269">TValue? GetPrivate&lt;TValue&gt;(string name)</text><polygon fill="#FF4" points="20 314.158 24 318.158 20 322.158 16 318.158" style="stroke:#b38d22;stroke-width:1"/><text x="29" y="323.455" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="339">void SetPrivate&lt;TValue&gt;(string name, TValue? value)</text><polygon fill="#FF4" points="20 332.779 24 336.779 20 340.779 16 336.779" style="stroke:#b38d22;stroke-width:1"/><text x="29" y="342.076" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="369">bool SetField&lt;T&gt;(ref T field, T value, string propertyName)</text></g><g id="elem_IViewModel"><rect id="IViewModel" width="135" height="85.242" x="201" y="410" fill="#F1F1F1" codeLine="19" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:.5"/><ellipse cx="229.95" cy="426" fill="#B4A7E5" rx="11" ry="11" style="stroke:#181818;stroke-width:1"/><path fill="#000" d="M230.9031,422.6406 L230.9031,429.2969 L232.6219,429.2969 Q233.2313,429.2969 233.4969,429.5313 Q233.7625,429.7656 233.7625,430.1563 Q233.7625,430.5313 233.4969,430.7656 Q233.2313,431 232.6219,431 L227.4813,431 Q226.8719,431 226.6063,430.7656 Q226.3406,430.5313 226.3406,430.1406 Q226.3406,429.7656 226.6063,429.5313 Q226.8719,429.2969 227.4813,429.2969 L229.2,429.2969 L229.2,422.6406 L227.4813,422.6406 Q226.8719,422.6406 226.6063,422.4063 Q226.3406,422.1719 226.3406,421.7813 Q226.3406,421.4063 226.6063,421.1719 Q226.8719,420.9375 227.4813,420.9375 L232.6219,420.9375 Q233.2313,420.9375 233.4969,421.1719 Q233.7625,421.4063 233.7625,421.7813 Q233.7625,422.1719 233.4969,422.4063 Q233.2313,422.6406 232.6219,422.6406 L230.9031,422.6406 Z"/><text x="247.05" y="431.797" fill="#000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="72">IViewModel</text><line style="stroke:#181818;stroke-width:.5" x1="202" x2="335" y1="442" y2="442"/><line style="stroke:#181818;stroke-width:.5" x1="202" x2="335" y1="450" y2="450"/><ellipse cx="212" cy="464.81" fill="#84BE84" rx="3" ry="3" style="stroke:#038048;stroke-width:1"/><text x="221" y="469.107" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="109">void OnRefresh()</text><ellipse cx="212" cy="483.432" fill="#84BE84" rx="3" ry="3" style="stroke:#038048;stroke-width:1"/><text x="221" y="487.728" fill="#000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="107">void OnFinalize()</text></g><g id="link_MyVMMixin_BaseViewModelMixin"><path id="MyVMMixin-to-BaseViewModelMixin" fill="none" d="M268.5,74.44 C268.5,91.04 268.5,100.21 268.5,121.85" codeLine="2" style="stroke:#181818;stroke-width:1"/><polygon fill="#181818" points="268.5 133.85 272.5 127.85 268.5 121.85 264.5 127.85 268.5 133.85" style="stroke:#181818;stroke-width:1"/></g><g id="link_BaseViewModelMixin_IViewModel"><path id="BaseViewModelMixin-to-IViewModel" fill="none" d="M268.5,350.3 C268.5,371.46 268.5,380.44 268.5,397.77" codeLine="3" style="stroke:#181818;stroke-width:1"/><polygon fill="#181818" points="268.5 409.77 272.5 403.77 268.5 397.77 264.5 403.77 268.5 409.77" style="stroke:#181818;stroke-width:1"/></g></g></svg>