extensions 0.3.17 copy "extensions: ^0.3.17" to clipboard
extensions: ^0.3.17 copied to clipboard

A set of APIs for commonly used programming patterns and utilities, such as dependency injection, logging, and configuration.

pub package package publisher

.NET Extensions for Dart #

A set of APIs for commonly used programming patterns and utilities, such as dependency injection, logging, and configuration.

Example #

import 'package:extensions/hosting.dart';

Future<void> main(List<String> args) async =>
    await Host.createDefaultBuilder(args)
        .useConsoleLifetime()
        .build()
        .run();

Code Adaptations #

The majority of code in this library is taken directly from the dotnet/runtime extension's namespace and aims to be as close a port as possible. However dart and c# dont always mix well. Below are some examples of how this library will handle scenarios that required some code modification.

Out Parameters #

Parameters in dart are passed by value whereas with c# they can be passed by reference using the out keyword. In this example, we that the method TryGetValue returns a boolean

Dictionary<int, long> myDic;

if(myDic.TryGetValue(100, out var lValue))
{
    return lValue;
}
1
likes
150
points
467
downloads

Publisher

verified publisherjamiewest.dev

Weekly Downloads

A set of APIs for commonly used programming patterns and utilities, such as dependency injection, logging, and configuration.

Repository
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

async, characters, collection, cross_file, file, glob, http, path, uuid, watcher, xml

More

Packages that depend on extensions