Comentsys.Toolkit 1.2.1

dotnet add package Comentsys.Toolkit --version 1.2.1
                    
NuGet\Install-Package Comentsys.Toolkit -Version 1.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Comentsys.Toolkit" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Comentsys.Toolkit" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Comentsys.Toolkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Comentsys.Toolkit --version 1.2.1
                    
#r "nuget: Comentsys.Toolkit, 1.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Comentsys.Toolkit&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Comentsys.Toolkit&version=1.2.1
                    
Install as a Cake Tool

Comentsys.Toolkit

Comentsys.Toolkit is a Toolkit for Binding and Asset Support for .NET Standard.

Change Log

Version 1.2.1

  • Update AssetResource ToBase64EncodedSvgString Method

Version 1.2.0

  • Update AssetResource with ToSvgString and ToBase64EncodedSvgString Methods, AssetBase with GetBase64EncodedString, FromStream, FromString and AsString Methods

Version 1.1.0

  • Add ActionCommand and Update AssetBase with AsString Methods

Version 1.0.0

  • Initial Release

AssetBase

AssetBase can be used as the basis of an Asset Library using SVG format that can be used in any .NET Standard Compatible Application.

AsStream(root, path, sources, targets, extension)

As Stream

Name Description
root System.String<br>Root
path System.String<br>Path
sources System.Drawing.Color[]<br>Sources
targets System.Drawing.Color[]<br>Targets
extension System.String<br>Extension
Returns

Resource Stream

AsStream(root, path, source, target, extension)

As Stream

Name Description
root System.String<br>Root
path System.String<br>Path
source System.Nullable{System.Drawing.Color}<br>Source
target System.Nullable{System.Drawing.Color}<br>Target
extension System.String<br>Extension
Returns

Resource Stream

AsStream(root, path, extension)

As Stream

Name Description
root System.String<br>Root
path System.String<br>Path
extension System.String<br>Extension
Returns

Resource Stream

AsString(content, sources, targets)

As String

Name Description
content System.String<br>Content
sources System.Drawing.Color[]<br>Sources
targets System.Drawing.Color[]<br>Targets
Returns

Resource String

AsString(content, source, target)

As String

Name Description
content System.String<br>Content
source System.Nullable{System.Drawing.Color}<br>Source
target System.Nullable{System.Drawing.Color}<br>Target
Returns

Resource String

AsString(root, path, sources, targets, extension)

As String

Name Description
root System.String<br>Root
path System.String<br>Path
sources System.Drawing.Color[]<br>Sources
targets System.Drawing.Color[]<br>Targets
extension System.String<br>Extension
Returns

Resource String

AsString(root, path, source, target, extension)

As String

Name Description
root System.String<br>Root
path System.String<br>Path
source System.Nullable{System.Drawing.Color}<br>Source
target System.Nullable{System.Drawing.Color}<br>Target
extension System.String<br>Extension
Returns

Resource String

AsString(root, path, extension)

As String

Name Description
root System.String<br>Root
path System.String<br>Path
extension System.String<br>Extension
Returns

Resource Stream

FromStream(stream, sources, targets)

From Stream

Name Description
stream System.IO.Stream<br>Stream
sources System.Drawing.Color[]<br>Sources
targets System.Drawing.Color[]<br>Targets
Returns

Resource Stream

FromStream(stream, source, target)

From Stream

Name Description
stream System.IO.Stream<br>Stream
source System.Nullable{System.Drawing.Color}<br>Source
target System.Nullable{System.Drawing.Color}<br>Target
Returns

Resource Stream

FromString(content, sources, targets)

From String

Name Description
content System.String<br>Content
sources System.Drawing.Color[]<br>Sources
targets System.Drawing.Color[]<br>Targets
Returns

Resource Stream

FromString(content, source, target)

From String

Name Description
content System.String<br>Content
source System.Nullable{System.Drawing.Color}<br>Source
target System.Nullable{System.Drawing.Color}<br>Target
Returns

Resource Stream

FromString(content)

From String

Name Description
content System.String<br>Content
Returns

Resource Stream

GetBase64EncodedString(value)

Get Base-64 Encoded String

Name Description
value System.String<br>Value
Returns

Base-64 Encoded String

AssetResource

AssetResource is used by an Asset Library as an Abstraction to represent the contents of an Asset in SVG format and exposes a Height and Width for correct representation by clients if needed.

Constructor

Constructor

Constructor(stream, height, width)

Constructor

Name Description
stream System.IO.Stream<br>Stream
height System.Int32<br>Height
width System.Int32<br>Width

Empty

Empty Asset Resource

Height

Asset Resource Height

Stream

Asset Resource Stream

Width

Asset Resource Width

ToBase64EncodedSvgString

Asset Resource Base-64 Encoded SVG String

Returns

Base-64 Encoded SVG String

ToSvgString

Asset Resource SVG String

Returns

SVG String

ActionCommand

ActionCommand can be used with Data Binding and implements Class for ActionCommandObservableBase to support Commanding and supports Nullable.

Constructor(action)

Action Command

Name Description
action System.Action{System.Object}<br>Action

ActionCommandHandler

ActionCommandHandler can be used with Data Binding and implements Interface for ICommand to support Commanding and supports Nullable.

Constructor(action, canExecute)

Constructor

Name Description
action System.Action{System.Object?}?<br>Action
canExecute System.Func{System.Object,System.Boolean?}?<br>Can Execute

Constructor(action)

Constructor

Name Description
action *ystem.Action{System.Object?}?<br>Action

CanExecute(parameter)

Can Execute

Name Description
parameter System.Object?<br>Parameter
Returns

True

CanExecuteChanged

Can Execute Changed

Execute(parameter)

Execute

Name Description
parameter System.Object?<br>Parameter

UpdateCanExecute

Update Can Execute

ActionCommandObservableBase

ActionCommandObservableBase is used in combination with the ActionCommandHandler to expose an Observable that supports Commanding.

Constructor(handler, isEnabled)

Constructor

Name Description
handler Comentsys.Toolkit.Binding.ActionCommandHandler<br>Action Command Handler
isEnabled System.Boolean<br>Is Enabled?

Command

Command

IsEnabled

Enabled

ObservableBase

ObservableBase provides the basis of an Observable by implementing the Interface for INotifyPropertyChanged

OnPropertyChanged(propertyName)

On Property Changed

Name Description
propertyName System.String<br>Property Name

PropertyChanged

Property Changed Event Handler

Licence

MIT License

Copyright (c) Comentsys

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Comentsys.Toolkit:

Package Downloads
Comentsys.Toolkit.WindowsAppSdk

Windows App SDK Toolkit for Controls, Converters and Extensions

Comentsys.Assets.FluentEmoji

Asset Resource for Flat Fluent Emoji

Comentsys.Assets.Flags

Asset Resource for Rectangular and Square Country Flags

Comentsys.Assets.Games

Asset Resource for Games including Chess and Mahjong

Comentsys.Assets.FluentIcons

Asset Resource for Regular Fluent UI System Icons

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.1 231 10/1/2024
1.2.0 109 10/1/2024
1.1.0 456 8/16/2024
1.0.0 716 9/25/2022

1.0.0 - Initial Release
1.1.0 - Add ActionCommand and Update AssetBase with AsString Methods
1.2.0 - Update AssetResource with ToSvgString and ToBase64EncodedSvgString Methods, AssetBase with GetBase64EncodedString, FromStream, FromString and AsString Methods
1.2.1 - Update AssetResource ToBase64EncodedSvgString Method