<commit_before># CSharp-Reference
## Purpose
I created this project to demonstrate how **I personally choose** to utilize C# to create project structures that I have been successful with.  The purpose is to find implemenations in other languages that mimic the function, but not necessary the form.

## Noteworthy Items
### Spring Framework
Spring Framework for .Net has been used to provide basic IoC services as well as AOP services.  Basic retry and logging aspects are used to demonstrate how I choose to accomplish some of these tasks.

#### Spring Files
Having spent many years utilizing the Spring Framework, there is absolutely a "right" place for spring files.  For all projects that contribute objects, the spring configuration files are in a \SpringGFiles folder.  Since there is usually good reason to break them up into logical areas, when more than just a single file exists in a project, I have been using the following:  SpringConfig.cs, SpringAopConfig.cs, SpringServicesConfig, etc...

#### Init and Destroy
Since I do a lot of work with application-level and distributed systems messaging (eventing if you will), there are classes that subscribe to events.  I have found that the best place to keep the event subscriptions are in a void Init method for the handler.  This way, that event subscriptions are kept out of the constructor and the injected dependencies are always obvious and clean.  Furthermore, I hate when an object fails at construction time, so I'd rather have it fail at Init time.  The stack trace is much easier to see and is much more obvious.  Likewise, the Destroy method provides a good place to drop subscriptions and perform other cleanup way before the instnace is garbage collected.  Other containers, such as AutoFac, also support this type of functionality call it IStartable and the OnRelease event.

## Projects
The project stucture is pretty close wo the [http://jeffreypalermo.com/blog/the-onion-architecture-part-1/](Onion Architecture) but is a little ligher.

### Cli
This is simply intended to provide the entry point to the application domain.  I can be a desktop app, a web app or a command line interface (cli) designed to run in the background or a windows service.  You can also easily convert the CLI to a WindowsService using [TopShelf](http://topshelf-project.com/).<commit_msg>Committing for Tyler, cause he's my friend a great programmer.  Plus I feel badly for his Rangers!<commit_after># CSharp-Reference
## Purpose
I created this project to demonstrate how **I personally choose** to utilize C# to create project structures that I have been successful with.  The purpose is to find implemenations in other languages that mimic the function, but not necessary the form.

## Noteworthy Items
### Spring Framework
Spring Framework for .Net has been used to provide basic IoC services as well as AOP services.  Basic retry and logging aspects are used to demonstrate how I choose to accomplish some of these tasks.

#### Configuration Files
Having spent many years utilizing the Spring Framework, there is absolutely a "right" place for spring files.  For all projects that contribute objects, the spring configuration files are in a \SpringGFiles folder.  Since there is usually good reason to break them up into logical areas, when more than just a single file exists in a project, I have been using the following:  SpringConfig.cs, SpringAopConfig.cs, SpringServicesConfig, etc...

#### Init and Destroy
Since I do a lot of work with application-level and distributed systems messaging (eventing if you will), there are classes that subscribe to events.  I have found that the best place to keep the event subscriptions are in a void Init method for the handler.  This way, that event subscriptions are kept out of the constructor and the injected dependencies are always obvious and clean.  Furthermore, I hate when an object fails at construction time, so I'd rather have it fail at Init time.  The stack trace is much easier to see and is much more obvious.  Likewise, the Destroy method provides a good place to drop subscriptions and perform other cleanup way before the instnace is garbage collected.  Other containers, such as AutoFac, also support this type of functionality call it IStartable and the OnRelease event.

## Projects
The project stucture is pretty close to the [Onion Architecture](http://jeffreypalermo.com/blog/the-onion-architecture-part-1/) but is a little ligher.

### Cli
This is simply intended to provide the entry point to the application domain.  I can be a desktop app, a web app or a command line interface (cli) designed to run in the background or a windows service.  You can also easily convert the CLI to a WindowsService using [TopShelf](http://topshelf-project.com/).

For this solution the Cli simply presents the user with a menu and allows them to trigger different examples of behavior.
### Interfaces
Following the Inteface Segregation principle all intefaces that are shared by the member  projects are placed into this project.  Eventhough tools like resharper offer a very convenient to find code in a solution I prefer to have folders inside this project that mimic the solution layout making things easier to find on the file system.  The interface project directly references the domain project as some interfaces will likely accept or return a class from the domain.
{'fraction_non_alphanumeric': 0.04065342491182476, 'fraction_numerical': 0.00037126415444588826, 'mean_word_length': 4.54320987654321, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6450552', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1204, 'n_words': 829}