CommonHelpers 1.0.5

A small library to help build demos. This saves time by preventing the need to rewrite the same code several times a day.

There is a newer version of this package available.
See the version list below for details.
Install-Package CommonHelpers -Version 1.0.5
dotnet add package CommonHelpers --version 1.0.5
<PackageReference Include="CommonHelpers" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CommonHelpers --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

CommonHelpers

This is a small NET Standard 2.0 helper library to reuse code that I write several times a day in demo projects.

Nuget: CommonHelpers on NuGet

Highlights

Collections

Special collection types that help in special scenarios (e.g. ObservableQueue and ObservableRangeCollection).

Common

This folder has some of the most frequently used classes (i.e. BindableBase, ViewModelBase, JsonHelper).

Models

Common sample data model classes used to populate UI elements (Charts, ListViews, DataGrid, etc).

Extensions

Extensions for commonly used objects like string, DateTime, enum. There are also some special extensions for File, Exception and Color. Finally, there's a unqiue helper, HttpClientExtensions which provides download progress and helper method to POST image data.

MVVM

Platform agnostic MVVM classes like DelegateCommand and RelayCommand

Services

To make testing UI controls easier by quickly providing well formatted data from offline sample data and online API endpoints. This is really useful for quickly testing Load On Demand scenarios.

  • BingImageService
  • ComiceVineApiService**
  • SampleDataService
  • XkcdApiService

** Note: Most services do not require an API key, just new up the class and go. To prevent any confusion, any services that need an API key will require it in the constructor.*

Example 1 - Sample Data Services

SampleDataService:

var sampleDataService = new SampleDataService();

listView.ItemsSource = sampleDataService.GeneratePeopleData();
scatterLineSeries.ItemsSource = sampleDataService.GenerateScatterPointData();
barSeries.ItemsSource = sampleDataService.GenerateCategoricalData();
Example 2 - Online API Services

BingImageService:

using (var bingImageService = new BingImageService())
{
    var result = await bingImageService.GetBingImageOfTheDayAsync();
    image.Source = new UriImageSource{Uri = result};
}

image

Tip: If you're looking for more public APIs to use for data sources, check out Todd Motto's Public Apis on GitHub. If you see any in there that you'd like me to create a C# service class for? Open an Issue and I'll add it.

CommonHelpers

This is a small NET Standard 2.0 helper library to reuse code that I write several times a day in demo projects.

Nuget: CommonHelpers on NuGet

Highlights

Collections

Special collection types that help in special scenarios (e.g. ObservableQueue and ObservableRangeCollection).

Common

This folder has some of the most frequently used classes (i.e. BindableBase, ViewModelBase, JsonHelper).

Models

Common sample data model classes used to populate UI elements (Charts, ListViews, DataGrid, etc).

Extensions

Extensions for commonly used objects like string, DateTime, enum. There are also some special extensions for File, Exception and Color. Finally, there's a unqiue helper, HttpClientExtensions which provides download progress and helper method to POST image data.

MVVM

Platform agnostic MVVM classes like DelegateCommand and RelayCommand

Services

To make testing UI controls easier by quickly providing well formatted data from offline sample data and online API endpoints. This is really useful for quickly testing Load On Demand scenarios.

  • BingImageService
  • ComiceVineApiService**
  • SampleDataService
  • XkcdApiService

** Note: Most services do not require an API key, just new up the class and go. To prevent any confusion, any services that need an API key will require it in the constructor.*

Example 1 - Sample Data Services

SampleDataService:

var sampleDataService = new SampleDataService();

listView.ItemsSource = sampleDataService.GeneratePeopleData();
scatterLineSeries.ItemsSource = sampleDataService.GenerateScatterPointData();
barSeries.ItemsSource = sampleDataService.GenerateCategoricalData();
Example 2 - Online API Services

BingImageService:

using (var bingImageService = new BingImageService())
{
    var result = await bingImageService.GetBingImageOfTheDayAsync();
    image.Source = new UriImageSource{Uri = result};
}

image

Tip: If you're looking for more public APIs to use for data sources, check out Todd Motto's Public Apis on GitHub. If you see any in there that you'd like me to create a C# service class for? Open an Issue and I'll add it.

Release Notes

Added SampleDataService to services.

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.12 471 4/29/2019
1.0.11 218 4/21/2019
1.0.9 164 4/12/2019
1.0.8 351 11/17/2018
1.0.7 354 6/27/2018
1.0.6 261 6/21/2018
1.0.5 249 6/19/2018
1.0.4 259 6/19/2018
1.0.0 257 6/18/2018
Show less