public static void Error(OperatorPart.Function func, String format, params object[] args) { var idAndName = TryGettingIdAndName(func); var messageString = FormatMessageWithArguments(format, args); Log(new LogEntry(LogEntry.EntryLevel.ERR, idAndName.Item1, idAndName.Item2 + "ยป " + messageString)); }
private static Tuple <Guid, string> TryGettingIdAndName(OperatorPart.Function func) { var result = new Tuple <Guid, string>(Guid.Empty, String.Empty); try { var parent = func.OperatorPart.Parent; result = new Tuple <Guid, string>(parent.ID, parent.ToString()); } catch (Exception) { result = new Tuple <Guid, string>(Guid.Empty, "NOTFOUND"); } return(result); }
public MetaInput(Guid id, string name, MetaOperatorPart opPart, IValue defaultValue, bool isMultiInput) { ID = id; Name = name; OpPart = opPart; _defaultFunc = Utilities.CreateDefaultValueFunction(defaultValue); IsMultiInput = isMultiInput; Relevance = RelevanceType.Optional; Description = string.Empty; // float stuff Min = -100000; Max = 100000; Scale = 0.1f; ScaleType = Scaling.Linear; EnumValues = new List <EnumEntry>(); }