Skip to content

Commit

Permalink
Lint: md
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed Dec 15, 2023
1 parent 68b27df commit 2806d8f
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 13 deletions.
10 changes: 7 additions & 3 deletions ClassLibraries/Macross.CommandLine/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Macross Software Command-Line

Macross.CommandLine is a simple and light-weight .NET Standard 2.0+ library for parsing the `string[]` command-line arguments passed into a process into a command with optional parameters, options, and switches.
Macross.CommandLine is a simple and light-weight .NET Standard 2.0+ library for
parsing the `string[]` command-line arguments passed into a process into a
command with optional parameters, options, and switches.

## Format

The parser supports the general format used by the `dotnet` command-line interface:
The parser supports the general format used by the `dotnet` command-line
interface:

`C:\application.exe command parameter1 parameter2 -option1 option1value -option2=option2value --option3 option3value -switch1`
`C:\application.exe command parameter1 parameter2 -option1 option1value
-option2=option2value --option3 option3value -switch1`
3 changes: 2 additions & 1 deletion ClassLibraries/Macross.Extensions/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Macross Software Extensons

Macross.Extensions is .NET Standard 2.0+ library for augmenting what is provided out of the box by the framework.
Macross.Extensions is .NET Standard 2.0+ library for augmenting what is provided
out of the box by the framework.
3 changes: 2 additions & 1 deletion ClassLibraries/Macross.Performance.Extensions/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Macross Software Performance Extensions

Macross.Performance.Extensions is a .NET Standard 2.0+ library for augmenting what is provided out of the box for developing high peformance applications.
Macross.Performance.Extensions is a .NET Standard 2.0+ library for augmenting
what is provided out of the box for developing high peformance applications.
32 changes: 27 additions & 5 deletions ClassLibraries/Macross.ServiceModel.Extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@

[![nuget](https://img.shields.io/nuget/v/Macross.ServiceModel.Extensions.svg)](https://www.nuget.org/packages/Macross.ServiceModel.Extensions/)

[Macross.ServiceModel.Extensions](https://www.nuget.org/packages/Macross.ServiceModel.Extensions/) is a .NET Standard 2.0+ library which provides a factory implementation pattern for [WCF](https://github.com/dotnet/wcf) clients (`SoapClient`), closely mirroring what [HttpClientFactory](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests) provides for `HttpClient`s. This is done to help with dependency injection and performance (`ChannelFactory` reuse) when using the WCF API on top of .NET Core.
[Macross.ServiceModel.Extensions](https://www.nuget.org/packages/Macross.ServiceModel.Extensions/)
is a .NET Standard 2.0+ library which provides a factory implementation pattern
for [WCF](https://github.com/dotnet/wcf) clients (`SoapClient`), closely
mirroring what
[HttpClientFactory](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests)
provides for `HttpClient`s. This is done to help with dependency injection and
performance (`ChannelFactory` reuse) when using the WCF API on top of .NET Core.

## SoapClient

The traditional client used by `System.ServiceModel` is `ClientBase<T>` but `ISoapClientFactory` will issue instances of `SoapClient<T>`. What's the difference? `SoapClient` can be disposed regardless of the state of the connection. `ClientBase` will throw an exception if you dispose a connection in anything other than its happy state. That leads to extra boilerplate being needed, or bugs, so I went a different direction here given there was an opportunity to break with the past.
The traditional client used by `System.ServiceModel` is `ClientBase<T>` but
`ISoapClientFactory` will issue instances of `SoapClient<T>`. What's the
difference? `SoapClient` can be disposed regardless of the state of the
connection. `ClientBase` will throw an exception if you dispose a connection in
anything other than its happy state. That leads to extra boilerplate being
needed, or bugs, so I went a different direction here given there was an
opportunity to break with the past.

## Basic Usage

Expand Down Expand Up @@ -43,16 +55,26 @@ public void ConfigureServices(IServiceCollection services)
}
```

In this case `ProductService` is injected with its very own instance of `SoapClient` implementing the `ILegacyProductProxy` WCF contract each and every time someone asks for it. Under the hood the `ISoapClientFactory` will reuse a `ChannelFactory` so we only pay the penalty of parsing the contract information once. `ProductService` doesn't have to worry about the underlying `ChannelFactory`, correctly using the resources, or even cleaning things up when its done.
In this case `ProductService` is injected with its very own instance of
`SoapClient` implementing the `ILegacyProductProxy` WCF contract each and every
time someone asks for it. Under the hood the `ISoapClientFactory` will reuse a
`ChannelFactory` so we only pay the penalty of parsing the contract information
once. `ProductService` doesn't have to worry about the underlying
`ChannelFactory`, correctly using the resources, or even cleaning things up when
its done.

## Advanced Usage

Here's a more advanced example which shows off more of the feature set:

* Reloading of the `ChannelFactory` when options change. Admittedly, it's not the most elegant mechanism. Open to suggestions!
* Reloading of the `ChannelFactory` when options change. Admittedly, it's not
the most elegant mechanism. Open to suggestions!
* Configuring the `ChannelFactory` using a delegate.
* Registering an `IEndpointBehavior` into the `ChannelFactory`.
* Separating the `TChannel` interface from the `TClient` interface. In the example `IProductService` is registered for `ProductService` but `SoapClient<ILegacyProductProxy>` is actually injected. I added that because I wanted to put a new API in front of an old legacy WCF service.
* Separating the `TChannel` interface from the `TClient` interface. In the
example `IProductService` is registered for `ProductService` but
`SoapClient<ILegacyProductProxy>` is actually injected. I added that because I
wanted to put a new API in front of an old legacy WCF service.

```csharp
public void ConfigureServices(IServiceCollection services)
Expand Down
3 changes: 2 additions & 1 deletion ClassLibraries/Macross.Windows.Impersonation/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Macross Software Impersonation

Macross.Windows.Impersonation is a .NET Standard 2.0+ library for augmenting what is provided by the framework for impersonation on Windows.
Macross.Windows.Impersonation is a .NET Standard 2.0+ library for augmenting
what is provided by the framework for impersonation on Windows.
3 changes: 2 additions & 1 deletion ClassLibraries/Macross.Windows.Permissions/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Macross Software Permissions

Macross.Windows.Permissions is a .NET Standard 2.0+ library for augmenting what is provided by the framework for permissions on Windows.
Macross.Windows.Permissions is a .NET Standard 2.0+ library for augmenting what
is provided by the framework for permissions on Windows.
3 changes: 2 additions & 1 deletion ClassLibraries/Macross.Windows.ServiceManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Macross Software Service Management

Macross.Windows.ServiceManagement is a .NET Standard 2.0+ library for augmenting what is provided by the framework for management of services on Windows.
Macross.Windows.ServiceManagement is a .NET Standard 2.0+ library for augmenting
what is provided by the framework for management of services on Windows.

0 comments on commit 2806d8f

Please sign in to comment.