using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpDX;


namespace Framefield.Core.ID7f89bf98_7b97_4347_b1af_7280f0e784e7
{
    public class Class_ValueToString : OperatorPart.Function
    {
        //>>> _inputids
        private enum InputId
        {
            Value = 0,
            Format = 1
        }
        //<<< _inputids



        public override OperatorPartContext Eval(OperatorPartContext context, List<OperatorPart> inputs, int outputIdx) {
            //>>> _params
            var Value = inputs[(int)InputId.Value].Eval(context).Value;
            var Format = inputs[(int)InputId.Format].Eval(context).Text;
            //<<< _params            
            
            string s="?";
            try {
                s= String.Format(Format, Value);
            }
            catch {
                //Logger.Info(this,"Can't convert value to string.");
            }
            context.Text= s;
            
            return context;
        }
    }
}

