├── .docfx
├── api
│ ├── index.md
│ └── .gitignore
├── toc.yml
├── index.md
├── .gitignore
└── docfx.json
├── Runtime
├── Eunomia.asmdef
├── Eunomia.csproj.meta
├── StateMachine.md.meta
├── Eunomia.asmdef.meta
├── Random.meta
├── FileUtility.meta
├── Filters.meta
├── IEnumerableExtensions.meta
├── Arrays.cs.meta
├── Math.cs.meta
├── WordList.cs.meta
├── Dispatcher.cs.meta
├── IntExtensions.cs.meta
├── StateMachine.cs.meta
├── URLUtility.cs.meta
├── ArrayExtensions.cs.meta
├── FileUtility
│ ├── Read.cs.meta
│ ├── Write.cs.meta
│ ├── ReadOrCreate.cs.meta
│ ├── Write.cs
│ ├── ReadOrCreate.cs
│ └── Read.cs
├── FloatExtensions.cs.meta
├── ListExtensions.cs.meta
├── Random
│ ├── IRandom.cs.meta
│ ├── SystemRandomWrapper.cs.meta
│ ├── IRandom.cs
│ └── SystemRandomWrapper.cs
├── StringExtensions.cs.meta
├── Filters
│ ├── KalmanFilterFloat.cs.meta
│ └── KalmanFilterFloat.cs
├── IEnumerableExtensions
│ ├── Random.cs.meta
│ ├── Comparing.cs.meta
│ ├── Duplicating.cs.meta
│ ├── Filtering.cs.meta
│ ├── ForEach.cs.meta
│ ├── LinqNaming.cs.meta
│ ├── OfStrings.cs.meta
│ ├── Reducing.cs.meta
│ ├── Searching.cs.meta
│ ├── Filtering.cs
│ ├── OfStrings.cs
│ ├── Duplicating.cs
│ ├── Reducing.cs
│ ├── Comparing.cs
│ ├── LinqNaming.cs
│ ├── ForEach.cs
│ ├── Searching.cs
│ └── Random.cs
├── Eunomia.csproj
├── ArrayExtensions.cs
├── URLUtility.cs
├── Arrays.cs
├── StringExtensions.cs
├── Math.cs
├── ListExtensions.cs
├── Dispatcher.cs
├── WordList.cs
├── StateMachine.md
├── IntExtensions.cs
├── FloatExtensions.cs
└── StateMachine.cs
├── .vscode
├── settings.json
├── launch.json
└── tasks.json
├── Eunomia.sln.meta
├── README.md.meta
├── package.json.meta
├── Eunomia.sln.DotSettings.meta
├── Tests
├── EunomiaTests.csproj.meta
├── Eunomia.Tests.asmdef.meta
├── DispatcherTests.cs.meta
├── FloatExtensionsTests.cs.meta
├── IntExtensionsTests.cs.meta
├── StringExtensionsTests.cs.meta
├── Eunomia.Tests.asmdef
├── StringExtensionsTests.cs
├── EunomiaTests.csproj
├── IntExtensionsTests.cs
├── FloatExtensionsTests.cs
└── DispatcherTests.cs
├── Runtime.meta
├── Tests.meta
├── .netconfig
├── README.md
├── .github
└── workflows
│ ├── build.yml
│ ├── build_and_push_documentation.yml
│ └── test_and_report_to_coveralls.yml
├── Eunomia.sln.DotSettings
├── package.json
├── Eunomia.sln
├── .gitignore
└── LICENSE
/.docfx/api/index.md:
--------------------------------------------------------------------------------
1 | # API Documentation
2 |
--------------------------------------------------------------------------------
/Runtime/Eunomia.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Eunomia"
3 | }
4 |
--------------------------------------------------------------------------------
/.docfx/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Api Documentation
2 | href: api/
3 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.exclude": {
3 | "**/._*.*": true
4 | }
5 | }
--------------------------------------------------------------------------------
/.docfx/api/.gitignore:
--------------------------------------------------------------------------------
1 | ###############
2 | # temp file #
3 | ###############
4 | *.yml
5 | .manifest
6 |
--------------------------------------------------------------------------------
/.docfx/index.md:
--------------------------------------------------------------------------------
1 | # Eunomia C#
2 |
3 | Adorkable's go-to utilities for C#, named for the Greek goddess of green pastures, law and legislation
4 |
--------------------------------------------------------------------------------
/.docfx/.gitignore:
--------------------------------------------------------------------------------
1 | ###############
2 | # folder #
3 | ###############
4 | /**/DROP/
5 | /**/TEMP/
6 | /**/packages/
7 | /**/bin/
8 | /**/obj/
9 | _site
10 |
--------------------------------------------------------------------------------
/Eunomia.sln.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8d0ac6fe709844955b98cdb83671fef6
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06cfa38570d3d4e709ecc11a02b93ee8
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 119edd0ffe7ca4ab9b4fee36c347b6d2
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Eunomia.sln.DotSettings.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d47ba2e35442945e7bcc8a19102ad402
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/Eunomia.csproj.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 813319b6ab9e745c9acfffb7435d4f80
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Tests/EunomiaTests.csproj.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c720db6fffe2942db85644da63f9b038
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 78925ecfe16454a6b875b2053c9bc5d6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/StateMachine.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb6604d99897e4fef85177d207977a04
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 79d1d2a35bc5a492086fff1e31dce1c3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Eunomia.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad797131972064e7d9064b2ac6ba9b47
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/Random.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 27d00af05bc7e4d48aa6d04866978c97
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/FileUtility.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 314403f6df29b4e5e9840e20daf5baf0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Filters.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 221975af4df2d4ec7bd8f7d676198052
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Tests/Eunomia.Tests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f15d68a8eb11340078d95a70ab065d91
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbc788d16cdec485c99eb127aba37e49
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Arrays.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b869bc352c09a48fca13fcb9a20af3af
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Math.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6adb1ed1570f0408bac0db3aedfa825f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/WordList.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7f9cbaafa49ce47da952cdde55469ee9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Dispatcher.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e0786005169714297aba72ab1410c05e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IntExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c29679587b22f45b1ae267a92acdae79
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/StateMachine.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f04d1f1d3512486da7e9e6502274a08
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/URLUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a21f5bca6002e4c1d911db4c8dc56621
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/DispatcherTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed016dae410bc470f97ba5cdf1118ccd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/ArrayExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7f38d913a5eab494eaea0df804ff7161
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/FileUtility/Read.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6b1fdf05535fa472188438d6c7b776e5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/FileUtility/Write.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 27d6fb408074f4e80ba47e1453c986d0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/FloatExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 423aa5ae8371d4ac8b1000fa89d5f9cd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/ListExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d25f73e5311e043efb30737e4d125e1e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Random/IRandom.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4cae3db865c6f4ff68c8f9dda5c009d4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/StringExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a7cea70eb6134ced90c8ca29ff54216
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/FloatExtensionsTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: de15627001a2e4478bba0a1d30bb5512
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/IntExtensionsTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c5ce5531969bf475fb81bc2e0e41296f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/StringExtensionsTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a0d6b460c609a43a7b046eae3f620541
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/FileUtility/ReadOrCreate.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc38fb7bdf46f4b70a9d4e5302f4b159
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Filters/KalmanFilterFloat.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a25ec96a9d944708ad9408d96e87f9e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Random.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9d1db649a8a114da9b61347769a17408
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Random/SystemRandomWrapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48300f0a1ee4441c88d4927dfa713211
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Comparing.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 331194630bb044a2fb0d9f4f52b15861
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Duplicating.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b2ba89679bb76424a8118b96a0738787
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Filtering.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed96702c06350457db453382ec203b19
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/ForEach.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed96702c06350457db453382ec203b18
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/LinqNaming.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01e74a18d70d14ce0b94b32c78de5bba
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/OfStrings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8a4b1ced1d934464a74c40c7f1b92f8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Reducing.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed96702c06350457db453382ec203b20
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Searching.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e2419bec430da45d781403ff1ac35bff
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/.netconfig:
--------------------------------------------------------------------------------
1 | [ReportGenerator]
2 | reports = "./TestResults/coverage.json"
3 | targetdir = "./TestResults/Coverage"
4 | reporttype = Html
5 | reporttype = HtmlChart
6 | reporttype = HtmlInline
7 | reporttype = HtmlSummary
8 | reporttype = MarkdownSummary
9 | reporttype = Badges
10 | reporttype = lcov
11 | reporttype = Xml
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Eunomia C#
2 | The team's go-to utilities for C#, named for the Greek goddess of green pastures, law and legislation
3 |
4 | [](https://coveralls.io/github/Adorkable/EunomiaCSharp?branch=master)
5 |
6 | [Documentation](https://adorkable.github.io/EunomiaCSharp/)
7 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: Setup .NET
13 | uses: actions/setup-dotnet@v1
14 | with:
15 | dotnet-version: 3.1.x
16 | - name: Restore dependencies
17 | run: dotnet restore
18 | - name: Build
19 | run: dotnet build --no-restore
20 |
--------------------------------------------------------------------------------
/Eunomia.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
3 | True
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.adorkable.eunomia-csharp",
3 | "displayName": "Eunomia C#",
4 | "version": "1.7.3",
5 | "unity": "2019.2",
6 | "category": "Library/Utility",
7 | "keywords": [
8 | "package",
9 | "unity"
10 | ],
11 | "description": "The team's go-to utilities for C#, named for the Greek goddess of green pastures, law and legislation",
12 | "main": "index.js",
13 | "scripts": {
14 | "test": "echo \"Error: no test specified\" && exit 1"
15 | },
16 | "author": "Ian G ",
17 | "license": "ISC"
18 | }
--------------------------------------------------------------------------------
/.github/workflows/build_and_push_documentation.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: Build and Push Documentation to Github Pages
4 |
5 | on:
6 | release:
7 | types:
8 | - published
9 |
10 | workflow_dispatch:
11 |
12 | jobs:
13 | build_and_push:
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v2
17 |
18 | - name: Build
19 | uses: nikeee/docfx-action@v1.0.0
20 | with:
21 | args: ./.docfx/docfx.json
22 |
23 | - name: Push
24 | uses: peaceiris/actions-gh-pages@v3
25 | with:
26 | github_token: ${{ secrets.GITHUB_TOKEN }}
27 | publish_dir: ./.docfx/_site
28 |
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Filtering.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | // ReSharper disable once CheckNamespace - In folder for organization reasons
5 | namespace Eunomia
6 | {
7 | // ReSharper disable once InconsistentNaming - extensions for IEnumerable :P
8 | public static partial class IEnumerableExtensions
9 | {
10 | // TODO: do for nullables
11 | public static bool NotNullTest(T test) where T : class
12 | {
13 | return test != null;
14 | }
15 |
16 | public static IEnumerable OnlyNonNull(this IEnumerable objects) where T : class
17 | {
18 | return objects.Filter(NotNullTest);
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/OfStrings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | // ReSharper disable once CheckNamespace
5 | namespace Eunomia
6 | {
7 | // ReSharper disable once InconsistentNaming - extensions for IEnumerable :P
8 | public static partial class IEnumerableExtensions
9 | {
10 | public static IEnumerable FilterNullOrEmpty(this IEnumerable enumerableToFilter)
11 | {
12 | return enumerableToFilter.FilterNot(String.IsNullOrEmpty);
13 | }
14 |
15 | public static IEnumerable FilterIsNullOrWhiteSpace(this IEnumerable enumerableToFilter)
16 | {
17 | return enumerableToFilter.FilterNot(String.IsNullOrWhiteSpace);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Tests/Eunomia.Tests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Eunomia.Tests",
3 | "references": [],
4 | "includePlatforms": [
5 | ],
6 | "excludePlatforms": [
7 | "Android",
8 | "CloudRendering",
9 | "Editor",
10 | "iOS",
11 | "LinuxStandalone64",
12 | "Lumin",
13 | "macOSStandalone",
14 | "PS4",
15 | "Stadia",
16 | "Switch",
17 | "tvOS",
18 | "WSA",
19 | "WebGL",
20 | "WindowsStandalone32",
21 | "WindowsStandalone64",
22 | "XboxOne"],
23 | "allowUnsafeCode": false,
24 | "overrideReferences": false,
25 | "precompiledReferences": [],
26 | "autoReferenced": true,
27 | "defineConstraints": [],
28 | "versionDefines": [],
29 | "noEngineReferences": false
30 | }
--------------------------------------------------------------------------------
/Tests/StringExtensionsTests.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.TestTools.UnitTesting;
2 |
3 | // ReSharper disable once CheckNamespace
4 | namespace Eunomia.Tests
5 | {
6 | [TestClass()]
7 | public class StringExtensionsTests
8 | {
9 | [TestMethod()]
10 | public void RemoveXmlTagsTest()
11 | {
12 | const string inside = "lalalal";
13 | var testWith = $"{inside}";
14 | Assert.AreEqual(inside, testWith.RemoveXmlTags());
15 |
16 | Assert.AreEqual(inside, inside.RemoveXmlTags());
17 |
18 | string testNull = null;
19 | Assert.AreEqual(null, StringExtensions.RemoveXmlTags(testNull));
20 |
21 | var spaces = " ";
22 | Assert.AreEqual(spaces, spaces.RemoveXmlTags());
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Runtime/FileUtility/Write.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Text;
3 | using System.Threading.Tasks;
4 |
5 | // ReSharper disable once CheckNamespace - In folder for organization reasons
6 | namespace Eunomia
7 | {
8 | public static partial class FileUtility
9 | {
10 | public static async Task WriteFile(string fileName, string contents)
11 | {
12 | // ReSharper disable once UseAwaitUsing - Not supported by Unity 2019
13 | using (var stream = File.Open(fileName, FileMode.Create))
14 | {
15 | var buffer = Encoding.UTF8.GetBytes(contents);
16 | #pragma warning disable CA1835 // Not supported by Unity 2019
17 | await stream.WriteAsync(buffer, 0, buffer.Length);
18 | #pragma warning restore CA1835
19 | stream.Close();
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Runtime/Eunomia.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | 1.4.2
6 | Ian G <yo.ian.g@gmail.com>
7 | Adorkable LLC
8 | Eunomia CSharp
9 | The team's go-to utilities for C#, named for the Greek goddess of green pastures, law and legislation
10 |
11 | https://github.com/Adorkable/eunomiacsharp
12 | https://github.com/Adorkable/eunomiacsharp
13 | Git
14 | csharp, utility, library, eunomia
15 | true
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Runtime/ArrayExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Eunomia
4 | {
5 | public static class ArrayExtensions
6 | {
7 | public static bool EqualContents(this T[] array, T[] compareTo) where T : IEquatable
8 | {
9 | if (array == null && compareTo == null)
10 | {
11 | return true;
12 | }
13 |
14 | if (array == null || compareTo == null)
15 | {
16 | return false;
17 | }
18 |
19 | if (array.Length != compareTo.Length)
20 | {
21 | return false;
22 | }
23 |
24 | for (var index = 0; index < array.Length; index++)
25 | {
26 | if (array[index].Equals(compareTo[index]) == false)
27 | {
28 | return false;
29 | }
30 | }
31 |
32 | return true;
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Duplicating.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | // ReSharper disable once CheckNamespace - In folder for organization reasons
6 | namespace Eunomia
7 | {
8 | // ReSharper disable once InconsistentNaming - extensions for IEnumerable :P
9 | public static partial class IEnumerableExtensions
10 | {
11 | // TODO: do we have to do ToList to actually create a copy? What is the fastest method
12 | public static IList Clone(this IEnumerable listToClone) where T : ICloneable
13 | {
14 | return listToClone.Select(item => (T) item.Clone()).ToList();
15 | }
16 |
17 | // TODO: do we have to do ToList to actually create a copy? What is the fastest method
18 | public static IList Copy(this IEnumerable listToCopy)
19 | {
20 | return listToCopy.Select(item => item).ToList();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/.github/workflows/test_and_report_to_coveralls.yml:
--------------------------------------------------------------------------------
1 | name: Test and Report to Coveralls
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: Setup .NET
13 | uses: actions/setup-dotnet@v1
14 | with:
15 | dotnet-version: 3.1.x
16 | - name: Restore dependencies
17 | run: dotnet restore
18 | - name: Run Tests
19 | run: dotnet test --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=../TestResults/lcov.info
20 |
21 | - name: Coveralls GitHub Action
22 | # You may pin to the exact commit or the version.
23 | # uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057
24 | uses: coverallsapp/github-action@1.1.3
25 | with:
26 | #
27 | github-token: ${{ secrets.GITHUB_TOKEN }}
28 | # Path to lcov file
29 | path-to-lcov: ./TestResults/lcov.info
30 |
--------------------------------------------------------------------------------
/Tests/EunomiaTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 | false
7 |
8 |
9 |
10 |
11 | runtime; build; native; contentfiles; analyzers; buildtransitive
12 | all
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Runtime/URLUtility.cs:
--------------------------------------------------------------------------------
1 | namespace Eunomia
2 | {
3 | public class UrlUtility
4 | {
5 | public enum Protocol
6 | {
7 | Http,
8 | WebSocket
9 | }
10 |
11 | public static string ProtocolPrefix(Protocol protocol, bool secure)
12 | {
13 | switch (protocol)
14 | {
15 | case Protocol.Http:
16 | return secure
17 | ? "https"
18 | : "http";
19 |
20 | case Protocol.WebSocket:
21 | return secure
22 | ? "wss"
23 | : "ws";
24 | }
25 |
26 | return "";
27 | }
28 |
29 | public static string ComposeUrl(Protocol protocol, bool secure, string host, int port)
30 | {
31 | var result = ProtocolPrefix(protocol, secure) + "://" + host;
32 |
33 | // Make this removal optional
34 | if (port != 80)
35 | {
36 | result += ":" + port;
37 | }
38 |
39 | return result;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Runtime/Arrays.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Eunomia
4 | {
5 | public class Arrays
6 | {
7 | ///
8 | /// Create a new array with an element added to the end
9 | ///
10 | /// Element to add
11 | /// Array which will be copied and whose copy will be added to
12 | /// New array with `add` param added to the end
13 | public static T[] AddToBack(T add, T[] to)
14 | {
15 | var result = to;
16 |
17 | AddToBack(add, ref result);
18 |
19 | return result;
20 | }
21 |
22 | ///
23 | /// Resizes array `to` and adds element to the end
24 | ///
25 | /// Element to add
26 | /// Array that will be resized and added to
27 | public static void AddToBack(T add, ref T[] to)
28 | {
29 | var index = to.Length;
30 |
31 | Array.Resize(ref to, to.Length + 1);
32 |
33 | to[index] = add;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Runtime/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Text.RegularExpressions;
4 |
5 | namespace Eunomia
6 | {
7 | public static class StringExtensions
8 | {
9 | // TODO: add support for > and other characters within "..."
10 | public static readonly Lazy XmlTag = new Lazy(
11 | () => new Regex(@"([<][/]?[a-zA-Z="" ]*[>])", RegexOptions.Compiled | RegexOptions.IgnoreCase)
12 | );
13 |
14 | public static string RemoveXmlTags(this string clean)
15 | {
16 | if (clean == null)
17 | {
18 | return null;
19 | }
20 |
21 | var matches = XmlTag.Value.Matches(clean);
22 |
23 | var result = clean;
24 | for (var index = matches.Count - 1; index >= 0; index--)
25 | {
26 | var match = matches[index];
27 | var start = match.Groups[0].Index;
28 | var matchedString = match.Groups[0].Value;
29 | result = result.Remove(start, matchedString.Count());
30 | }
31 |
32 | return result;
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | // Use IntelliSense to find out which attributes exist for C# debugging
6 | // Use hover for the description of the existing attributes
7 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | // If you have changed target frameworks, make sure to update the program path.
13 | "program": "${workspaceFolder}/Tests/bin/Debug/netcoreapp3.1/EunomiaTests.dll",
14 | "args": [],
15 | "cwd": "${workspaceFolder}/Tests",
16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17 | "console": "internalConsole",
18 | "stopAtEntry": false
19 | },
20 | {
21 | "name": ".NET Core Attach",
22 | "type": "coreclr",
23 | "request": "attach"
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/Runtime/FileUtility/ReadOrCreate.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Threading.Tasks;
3 |
4 | // ReSharper disable once CheckNamespace - In folder for organization reasons
5 | namespace Eunomia
6 | {
7 | public static partial class FileUtility
8 | {
9 | ///
10 | /// Attempts to read a file which if not found is then created with `defaultContents`
11 | ///
12 | /// Name of file to read
13 | /// String contents to use to create file if it does not exist
14 | /// Contents of file, whether read or used to create file from `defaultContents`
15 | public static async Task ReadFileOrCreateDefault(string fileName, string defaultContents)
16 | {
17 | try
18 | {
19 | var contents = await ReadFile(fileName);
20 | return contents;
21 | }
22 | catch (FileNotFoundException)
23 | {
24 | await WriteFile(fileName, defaultContents);
25 | return defaultContents;
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Runtime/IEnumerableExtensions/Reducing.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | // ReSharper disable once CheckNamespace - In folder for organization reasons
5 | namespace Eunomia
6 | {
7 | // ReSharper disable once InconsistentNaming - extensions for IEnumerable :P
8 | public static partial class IEnumerableExtensions
9 | {
10 | // TODO: do for nullables
11 | public static readonly Func NullCountReducer = (previous, test) =>
12 | {
13 | var testedCount = test == null ? 1 : 0;
14 | return previous + testedCount;
15 | };
16 |
17 | public static int NullCount(this IEnumerable