Shiny.Reflector 1.6.0-beta-0006

Shiny Reflector

Reflection without the actual... reflection. AOT compliant!

Usage

Using the following attribute and marking your class as partial

[Shiny.Reflector.ReflectorAttribute]
public partial class MyClass
{
    public int MyProperty { get; set; }
    public string Message { get; set;}
}

[!NOTE] Works on records as well, but you must use the partial keyword and attribute just like a class.

Just that attribute allows you to do this:

var myClass = new MySampleClass
{
    Name = "Hello World",
    Age = null
};

// NOTE: the use of GetReflector - a reflector class is generated for each class marked with the ReflectorAttribute
var reflector = myClass.GetReflector();
foreach (var prop in reflector.Properties) 
{
    var objValue = reflector[prop.Name];
    Console.WriteLine($"Property: {prop.Name} ({prop.Type}) - Current Value: {objValue}");
}

// generics for type casting
var name = reflector.GetValue<string>("Name");
Console.WriteLine("Reflector Name: " + name);

// indexers for loose typing
Console.WriteLine("Reflector Value: " + reflector["age"]);

// set with generics
reflector.SetValue("Age", 99);

// or just an object on the indexer
reflector["name"] = "Something Else";
Console.WriteLine("Reflector Name Value: " + reflector["NaMe"]);
Console.WriteLine("Reflector Age Value: " + reflector["NaMe"]);

Showing the top 20 packages that depend on Shiny.Reflector.

Packages Downloads
Shiny.Extensions.Stores
Store anything in a key/value store - Abstractions for iOS, Android and Windows preferences/secure storage
1

.NET 9.0

  • No dependencies.

Version Downloads Last updated
1.7.2 1 06/13/2026
1.7.2-beta-0001 1 06/13/2026
1.7.1 1 06/13/2026
1.7.0 1 06/13/2026
1.7.0-beta-0004 1 06/13/2026
1.7.0-beta-0003 1 06/13/2026
1.7.0-beta-0002 1 06/13/2026
1.7.0-beta-0001 1 06/13/2026
1.6.1 1 06/13/2026
1.6.0 1 06/13/2026
1.6.0-beta-0015 1 06/13/2026
1.6.0-beta-0014 1 06/13/2026
1.6.0-beta-0013 1 06/13/2026
1.6.0-beta-0012 1 06/13/2026
1.6.0-beta-0011 1 06/13/2026
1.6.0-beta-0010 1 06/13/2026
1.6.0-beta-0009 1 06/13/2026
1.6.0-beta-0006 1 06/13/2026
1.6.0-beta-0005 1 06/13/2026
1.6.0-beta-0004 1 06/13/2026
1.6.0-beta-0003 1 06/13/2026
1.5.1 1 06/13/2026
1.5.0 1 06/13/2026
1.4.0 1 06/13/2026
1.4.0-beta-0002 1 06/13/2026
1.4.0-beta-0001 1 06/13/2026
1.4.0-alpha-0002 1 06/13/2026
1.3.0 1 06/13/2026
1.2.0 1 06/13/2026
1.1.0 1 06/13/2026
1.1.0-alpha-0004 1 06/13/2026
1.1.0-alpha-0001 1 06/13/2026
1.0.0 1 06/13/2026
1.0.0-g0d103c2df8 1 06/13/2026
1.0.0-alpha-0013 1 06/13/2026
1.0.0-alpha-0012 1 06/13/2026
1.0.0-alpha-0007 1 06/13/2026
1.0.0-alpha-0006 1 06/13/2026
1.0.0-alpha-0005 1 06/13/2026
1.0.0-alpha-0004 1 06/13/2026