Bond_009
b366dc2e6e
Use ArgumentException.ThrowIfNullOrEmpty
2 years ago
Bond_009
52194f56b5
Replace != null with is not null
2 years ago
Bond_009
c7d50d640e
Replace == null with is null
2 years ago
Bond_009
a9a5fcde81
Use ArgumentNullException.ThrowIfNull helper method
...
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)
```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```
```
ArgumentNullException.ThrowIfNull($1);
```
2 years ago
Bond_009
f50a250cd9
Optimize Guid comparisons
...
* Use Guid.Equals(Guid) instead of the == override
* Ban the usage of Guid.Equals(Object) to prevent accidental boxing
* Compare to default(Guid) instead of Guid.Empty
3 years ago
Bond_009
5732e6188c
Fix some warnings
3 years ago
Bond_009
2dcb2f8a9f
Ban the usage of Task.Result
...
If the calling function can't be made async easily you can still use
.GetAwaiter().GetResult(), which is way easier to find in the future
3 years ago
Cody Robibero
a60cb280a3
Properly populate QueryResult
3 years ago
Cody Robibero
7bfc6b5679
Remove more warnings
3 years ago
cvium
b880dc8a4a
Use our own Contains extension
3 years ago
Cody Robibero
32629cd7da
Use BaseItemKind where possible
3 years ago
Bond_009
257e1be95f
Fix some warnings
3 years ago
Bond_009
1b6eb2ff2d
Enable nullable for more files
3 years ago
Patrick Barron
25b68bc3b2
Fix warnings in ChannelManager
3 years ago
Claus Vium
74fef6c05b
Merge pull request #6177 from Bond-009/async
...
Use async FileStreams where it makes sense
3 years ago
Bond_009
e3dac4fda2
Use async FileStreams where it makes sense
3 years ago
Cody Robibero
cba07b1ca6
Remove more and more warnings
3 years ago
Bond_009
19824bff94
Minor improvements
3 years ago
Bond_009
6f8ccab788
Move non-jellyfin extensions to separate project
3 years ago
Bond_009
7e8428e588
Enable nullable reference types for Emby.Server.Implementations
4 years ago
BaronGreenback
bc1cc2d04a
Remove unused using directives
4 years ago
Bond_009
a8ed753f6c
FxCop -> Net Analyzers (part 2)
4 years ago
Bond_009
1ea2b200c0
JsonSerializer deserialize from bytes where possible
...
This is faster and uses way less memory
```
BenchmarkDotNet=v0.12.1, OS=fedora 32
Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.100
[Host] : .NET Core 5.0.0 (CoreCLR 5.0.20.51904, CoreFX 5.0.20.51904), X64 RyuJIT
DefaultJob : .NET Core 5.0.0 (CoreCLR 5.0.20.51904, CoreFX 5.0.20.51904), X64 RyuJIT
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |---------:|--------:|--------:|--------:|------:|------:|----------:|
| Bytes | 158.4 us | 2.56 us | 2.14 us | 16.8457 | - | - | 52.08 KB |
| String | 172.8 us | 0.78 us | 0.70 us | 41.5039 | - | - | 127.82 KB |
| Custom | 155.5 us | 2.95 us | 2.76 us | 10.0098 | - | - | 31.27 KB |
```
4 years ago
David
3dec1fd6b2
Use UTF8 encoding and async correctly
4 years ago
David
043d045448
Put json serializer options in private field
4 years ago
David
e835dfb27d
Use sync string instead of file
4 years ago
David
a714008b59
Add missing FileStreams
4 years ago
David
2a574914ea
Use streams instead of strings
4 years ago
David
f38970cbd3
Remove xml docs
4 years ago
David
196388d607
Remove custom Json serializer from Emby.Server.Implementations
4 years ago
crobibero
821ad79992
fix spacing
4 years ago
crobibero
c083b29e29
Use Guid as API parameter type where possible
4 years ago
crobibero
3cc0dd7e12
Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids usage.
4 years ago
Bond_009
b21919c7f4
Minor perf improvements
4 years ago
Bond_009
49569ca0a0
Use nameof where possible
4 years ago
Bond_009
e653eef44f
Fix some warnings
4 years ago
Bond_009
119f64f5e7
Make some methods async
4 years ago
Patrick Barron
bea519de5b
Fix MemoryCache Usage.
4 years ago
Bond-009
b7421db5fe
Merge pull request #3578 from barronpm/displaypreferences-efcore
...
Migrate Display Preferences to EF Core
4 years ago
Patrick Barron
c77abca31a
Use MemoryCache in ChannelManager
4 years ago
Patrick Barron
ab396225ea
Migrate Display Preferences to EF Core
4 years ago
telans
acd4389653
fix SA1005
4 years ago
Patrick Barron
42b4f0aa2e
Merge branch 'master' into userdb-efcore
...
# Conflicts:
# Emby.Server.Implementations/Library/UserManager.cs
# Jellyfin.Data/Jellyfin.Data.csproj
4 years ago
crobibero
44957c5a9a
Use typed logger where possible
5 years ago
Patrick Barron
06f9cde22f
Merge branch 'master' into userdb-efcore
...
# Conflicts:
# Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs
# Emby.Server.Implementations/Library/UserManager.cs
# Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs
# Emby.Server.Implementations/Sorting/IsPlayedComparer.cs
# Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs
# Emby.Server.Implementations/TV/TVSeriesManager.cs
# Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs
5 years ago
Bond_009
4748105dce
Enable TreatWarningsAsErrors for Jellyfin.Server.Implementations in Release mode
5 years ago
Patrick Barron
c464f700db
Remove redundant qualifiers
5 years ago
Patrick Barron
9ad839c776
Initial migration code
5 years ago
Patrick Barron
7586c60224
Merge branch 'master' into warnings-cleanup1
5 years ago
Patrick Barron
f26f44acaf
Apply code review suggestions
5 years ago