You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Config/ConfigRecordParseAttribute.cs

17 lines
440 B

using System;
namespace ZeroLevel.Services.Config
{
public class ConfigRecordParseAttribute
: Attribute
{
public IConfigRecordParser Parser { get; set; }
public ConfigRecordParseAttribute(Type parserType)
{
5 months ago
if (parserType == null!) throw new ArgumentNullException(nameof(parserType));
Parser = (IConfigRecordParser)Activator.CreateInstance(parserType);
}
}
}

Powered by TurnKey Linux.