protected Operator(IElementCreationContext context, IVplType type) : base(context) { if (type == null) { throw new ArgumentNullException(nameof(type)); } _type = type; }
public ArgumentVariable(IElementOwner owner, IVplType type, IArgument argument) : base(owner, type, argument.Id) { if (argument == null) throw new ArgumentNullException(nameof(argument)); _argument = argument; argument.PropertyChanged += Argument_PropertyChanged; }
public Parameter(IElementCreationContext context, string id, IVplType type) : base(context) { if (type == null) throw new ArgumentNullException(nameof(type)); _id = id; _type = type; Value = type.DefaultValue; _editor = new Lazy<Visual>(type.CreateVisual); }
public ArgumentVariable(IElementOwner owner, IVplType type, IArgument argument) : base(owner, type, argument.Id) { if (argument == null) { throw new ArgumentNullException(nameof(argument)); } _argument = argument; argument.PropertyChanged += Argument_PropertyChanged; }
public Parameter(IElementCreationContext context, string id, IVplType type) : base(context) { if (type == null) { throw new ArgumentNullException(nameof(type)); } _id = id; _type = type; Value = type.DefaultValue; _editor = new Lazy <Visual>(type.CreateVisual); }
public Variable(IElementOwner owner, IVplType type, Guid id) { if (owner == null) throw new ArgumentNullException(nameof(owner)); if (type == null) throw new ArgumentNullException(nameof(type)); _owner = owner; _type = type; _id = id; RenameCommand = new RelayCommand(Rename, CanRename); DeleteCommand = new RelayCommand(() => Delete(), CanDelete); _editor = new Lazy<Visual>(type.CreateVisual); _value = type.DefaultValue; }
private void TypeSelected(Guid?typeId) { if (typeId == null) { _vplType = Owner.GetAnyType(); } else { _vplType = Owner.GetVplTypeOrAny(typeId.Value); } Parameters.Clear(); SourceParameter = Owner.CreateParameter("Source", _vplType); SourceParameter.Prefix = $"[{_vplType.Name}]"; Parameters.Add(SourceParameter); }
public Variable(IElementOwner owner, IVplType type, Guid id) { if (owner == null) { throw new ArgumentNullException(nameof(owner)); } if (type == null) { throw new ArgumentNullException(nameof(type)); } _owner = owner; _type = type; _id = id; RenameCommand = new RelayCommand(Rename, CanRename); DeleteCommand = new RelayCommand(() => Delete(), CanDelete); _editor = new Lazy <Visual>(type.CreateVisual); _value = type.DefaultValue; }
protected Operator(IElementCreationContext context, IVplType type) : base(context) { if (type == null) throw new ArgumentNullException(nameof(type)); _type = type; }
public ReturnValueVariable(IElementOwner owner, IVplType type) : base(owner, type, ReturnVariableId) { }
/// <summary> /// Creates a parameter. /// </summary> /// <param name="owner">Owner.</param> /// <param name="id">The id of the parameter.</param> /// <param name="type">The type of parameter.</param> /// <param name="prefix">Optional prefix</param> /// <param name="postfix">Optionl postfix</param> /// <returns></returns> public static IParameter CreateParameter(this IElementOwner owner, string id, IVplType type, string prefix = null, string postfix = null) { var context = CreateElementCreationContext(owner, SystemElementIds.Parameter); var parameter = new Parameter(context, id, type) { Prefix = prefix, Postfix = postfix }; return(parameter); }
private void TypeSelected(Guid? typeId) { if (typeId == null) { _vplType = Owner.GetAnyType(); } else { _vplType = Owner.GetVplTypeOrAny(typeId.Value); } Parameters.Clear(); SourceParameter = Owner.CreateParameter("Source", _vplType); SourceParameter.Prefix = $"[{_vplType.Name}]"; Parameters.Add(SourceParameter); }