FastMemberMT 7.0.0
See the version list below for details.
dotnet add package FastMemberMT --version 7.0.0
NuGet\Install-Package FastMemberMT -Version 7.0.0
<PackageReference Include="FastMemberMT" Version="7.0.0" />
paket add FastMemberMT --version 7.0.0
#r "nuget: FastMemberMT, 7.0.0"
// Install FastMemberMT as a Cake Addin #addin nuget:?package=FastMemberMT&version=7.0.0 // Install FastMemberMT as a Cake Tool #tool nuget:?package=FastMemberMT&version=7.0.0
FastMemberMT - Fast Memeber Multi Targeted
Fast access to .net fields/properties
It looks like this project has not been updated in a few years, so I cloned it and added netstandard2.1, netcore3.1 and net5.0.
In .NET reflection is slow... well, kinda slow. If you need access to the members of an arbitrary type, with the type and member-names known only at runtime - then it is frankly hard (especially for DLR types). This library makes such access easy and fast.
An introduction to the reasons behind fast-member can be found <a href="http://marcgravell.blogspot.com/2012/01/playing-with-your-member.html" target="_blank">on my blog</a>; example usage is simply:
var accessor = TypeAccessor.Create(type);
string propName = // something known only at runtime
while( /* some loop of data */ )
{
accessor[obj, propName] = rowValue;
}
or
// obj could be static or DLR
var wrapped = ObjectAccessor.Create(obj);
string propName = // something known only at runtime
Console.WriteLine(wrapped[propName]);
Ever needed an IDataReader
?
This is pretty common if you are doing object-mapping between an object model and ADO.NET concepts such as DataTable
or SqlBulkCopy
; loading a DataTable
(yes, some people still use it) from a sequence of typed objects can now be as easy as:
IEnumerable<SomeType> data = ...
var table = new DataTable();
using(var reader = ObjectReader.Create(data))
{
table.Load(reader);
}
(the Create
method offers parameters to control the specific members, if needed)
Or if you want to throw the data into a database as fast as humanly possible:
using(var bcp = new SqlBulkCopy(connection))
using(var reader = ObjectReader.Create(data, "Id", "Name", "Description"))
{
bcp.DestinationTableName = "SomeTable";
bcp.WriteToServer(reader);
}
Ahead of Time
Library emits IL code during runtime. Will not work in constrained Ahead of Time environments. Xamarin iOS and Unity IL2CPP are such.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. 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. |
-
.NETCoreApp 3.1
- System.Security.Permissions (>= 6.0.0)
-
.NETFramework 4.6.1
- System.Security.Permissions (>= 6.0.0)
-
.NETFramework 4.8
- System.Security.Permissions (>= 6.0.0)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- System.Data.Common (>= 4.3.0)
- System.Reflection (>= 4.3.0)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Security.Permissions (>= 6.0.0)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- System.Data.Common (>= 4.3.0)
- System.Reflection (>= 4.3.0)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Security.Permissions (>= 5.0.0)
-
net5.0
- System.Security.Permissions (>= 6.0.0)
-
net6.0
- System.Security.Permissions (>= 6.0.0)
-
net7.0
- System.Security.Permissions (>= 6.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on FastMemberMT:
Package | Downloads |
---|---|
EzSqlBulkTools
Package Description |
|
EzDbCodeGen.Core
This will install a local cli tool. From this path, you can run a powershell script that will generate code based on the connection string. Each template is a handlebars template that has tags that specify where you would like to output the generated code and if there is a vs project that you wish to update with the file list (old VS project formats only). |
GitHub repositories
This package is not used by any popular GitHub repositories.
net7.0, net6.0, .net 5.0, netstandard 2.1, netcore3.1