21 lines
482 B
C#
21 lines
482 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Markup;
|
|
|
|
namespace Trade.Framework.Extensions;
|
|
|
|
public class DISource : MarkupExtension
|
|
{
|
|
internal static Func<Type, string, object> Resolver { get; set; }
|
|
|
|
public Type Type { get; set; }
|
|
public string Name { get; set; }
|
|
|
|
public override object ProvideValue(IServiceProvider serviceProvider)
|
|
{
|
|
return Resolver?.Invoke(Type, Name);
|
|
}
|
|
} |