Files
Hasebe/Library/PackageCache/com.gustavopsantos.reflex@7857b9937c99/Injectors/PropertyInjector.cs
T
2026-09-21 12:15:57 +03:00

22 lines
543 B
C#

using System;
using System.Reflection;
using Reflex.Core;
using Reflex.Exceptions;
namespace Reflex.Injectors
{
internal static class PropertyInjector
{
internal static void Inject(PropertyInfo property, object instance, Container container)
{
try
{
property.SetValue(instance, container.Resolve(property.PropertyType));
}
catch (Exception e)
{
throw new PropertyInjectorException(property, e);
}
}
}
}