Skip to content

Commit

Permalink
nuget stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryImMouse committed Jun 14, 2024
1 parent 39347c6 commit 1794e84
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,7 @@ AppPackages/

#####
# End of core ignore list, below put you custom 'per project' settings (patterns or path)
#####
#####

# Nuget
nuget.config
12 changes: 10 additions & 2 deletions Jerry.Utilities/Jerry.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PackageId>JerryImMouse.Project.Utilities</PackageId>
<Version>0.0.6</Version>
<Version>0.0.7</Version>
<Authors>JerryImMouse</Authors>
<Company>JerryImMouse</Company>
<RepositoryUrl>https://github.com/JerryImMouse/jerry-utils</RepositoryUrl>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>JerryImMouse</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Serilog" Version="4.0.0-dev-02167" />
<PackageReference Include="TerraFX.Interop.Windows" Version="10.0.22621.6" />
</ItemGroup>


<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="" />
<None Include="LICENSE.txt" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Currently it contains:
- **TypeHelpers, CollectionExtensions**
- **MathHelper, LockUtilities**
- **[Http Utility](#http-utility)**
> ### Important Note<br/>
> ### Important Note
> All this utilities depends on each other, so make sure you copied all parts of this pack into your project.
## Inversion of Control realization
IoC manager built with three simple DependencyContainers which inherits IDependencyCollection interface, so you can
choose what realization you need to use in your case. Also provided simple IoCManager to retrieve or inject dependencies into DependencyCollection.
You can find its realization [here](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/IoC/General/IoCManager.cs)
> ### Important Note<br>
> ### Important Note
> IoCManager is being built using IoCManagerBuilder class, in coupe with InitializeDependencies method
> So you need to build settings with builder and pass them into InitializeDependencies method
Expand All @@ -28,24 +28,23 @@ Currently there are three realizations of IDependencyCollection interface:
### FrozenDependencyCollection
Uses FrozenDictionary to store dependency types and instances.
Created for fast searching values in it.
FrozenDictionary is immutable, so if I wanted to inject something I had to convert it back to Dictionary and then again to FrozenDictioanary, this operations takes a lot of runtime time(~500 microseconds).<br/>
So I created another implementation with usual Dictionary for periodical registering.<br>
FrozenDictionary is immutable, so if I wanted to inject something I had to convert it back to Dictionary and then again to FrozenDictioanary, this operations takes a lot of runtime time(~500 microseconds).
So I created another implementation with usual Dictionary for periodical registering.
[Realization](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/IoC/Frozen/FrozenDependencyCollection.cs)

### DependencyCollection
Uses simple Dicionary type to store dependency types and their instances.<br/>
Created to replace FrozenDictionary because of high speed of adding items.<br>
Uses simple Dicionary type to store dependency types and their instances.
Created to replace FrozenDictionary because of high speed of adding items.
[Realization](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/IoC/Default/DependencyCollection.cs)

### ReferencedDependencyCollection
Uses FrozenDictionary to store dependency types and instances, BUT it index its values, so if you need to get value by type it can be easily indexed.
If you want to know more you can checkout its realization [here](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/IoC/Referenced/DepIdx.cs)

## Logging
This pack includes "advanced" logging system with ANSI colors for windows consoles and colorless if linux. Also supports logging straight to files, you can specify which handler to use by HandlerFlags enum.<br> If you want to know how to use it look [here](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/Examples/LoggingExample/ExampleProgram.cs)<br>
This pack includes "advanced" logging system with ANSI colors for windows consoles and colorless if linux. Also supports logging straight to files, you can specify which handler to use by HandlerFlags enum. If you want to know how to use it look [here](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/Examples/LoggingExample/ExampleProgram.cs)
[Logger Realization](https://github.com/JerryImMouse/jerry-utils/blob/master/Project.Utilities/Logging/Logger.cs)

## Http Utility
This one implements simple MainListener class that wraps HttpListener for ease of use, this also implements handlers group interface that can be inherited and used to create a class of handlers for http requests. HttpContext is a wrapper class that wraps around HttpListenerContext and provides a lot of tools to respond on http requests easily.
Created for my personal use as I needed it.
<br>

0 comments on commit 1794e84

Please sign in to comment.