/// <summary> /// Creates a new <see cref="Literal"/> that is a deep copy of the current instance. /// </summary> /// <returns>A new <see cref="Literal"/> that is a deep copy of the current instance</returns> public object Clone() { var clone = new Literal(Identifier); clone.DefaultValue = DefaultValue; clone.Function = Function; clone.ToolTip = ToolTip; clone.TypeName = TypeName; clone.IsEditable = IsEditable; return clone; }
private static void LoadLiterals(LiteralElement[] elements, Snippet snippet) { foreach (LiteralElement element in elements) { var literal = new Literal(element.ID ?? string.Empty); literal.DefaultValue = element.Default; literal.IsEditable = element.Editable; literal.Function = element.Function; literal.ToolTip = element.ToolTip; snippet.Literals.Add(literal); } }