private IDecorationConditionMetadata BuildCustomCondition(CustomConditionXml custom) { var parameters = new Dictionary <string, object>(); custom.Parameters.ForEach(p => parameters.Add(p.Name, p.StringValue)); return(new CustomConditionMetadata(custom.AssemblyPath, custom.TypeName, parameters)); }
private IDecorationConditionArgs BuildCustomCondition(CustomConditionXml custom) { var helper = new ScalarHelper(serviceLocator, new Context(variables)); return(new CustomConditionArgs( helper.InstantiateResolver <string>(custom.AssemblyPath), helper.InstantiateResolver <string>(custom.TypeName), custom.Parameters.ToDictionary(x => x.Name, y => helper.InstantiateResolver <object>(y.StringValue) as IScalarResolver) )); }