Info
Version: | 1.0.9 |
Author(s): | YoYo |
Last Update: | Monday, December 7, 2020 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/YoYo.Mono.Ceil.Extensions |
Install
Install-Package YoYo.Mono.Ceil.Extensions
dotnet add package YoYo.Mono.Ceil.Extensions
paket add YoYo.Mono.Ceil.Extensions
YoYo.Mono.Ceil.Extensions Download (Unzip the "nupkg" after downloading)
Dependencies
.NETStandard 2.0
- Mono.Cecil(>= 0.11.3)
- YoYo(>= 1.0.3)
- YoYo.Serialization(>= 1.0.5)
- Mono.Cecil(>= 0.11.3)
- YoYo(>= 1.0.3)
- YoYo.Serialization(>= 1.0.5)
- Mono.Cecil(>= 0.11.3)
- YoYo(>= 1.0.3)
- YoYo.Serialization(>= 1.0.5)
It can be easily used in IL without additional type conversion.Extending and encapsulating the ILProcessor makes it easier to write IL
For examples:
TypeReferenceEx type = TypeReferenceEx.Convert(Module.ImportReference(List<T>);
TypeReferenceEx newType = type.MakeGenericType(typeof(int));
MethodReferenceEx method = type.GetMethod("Add");
PropertyReferenceEx property = method.GetProperty("Count);
MethodReferenceEx getMethod = property.GetMethod;
TypeReferenceEx propertyType= property.PropertyType;
MethodILProcessor processor = new MethodILProcessor(method);
//foreach(var item in list)
Action loadValue = ()=> processor.Ldarg(1);
using (var scope = new ForeachScope(processor, newType, loadValue))
{
}
//for(int i = 0; i < 10; i++)
using (ForIntIterScope.NumbericForward(processor, 0, 10))
{
}.