protected ResultBase(EngineBase engine, int seed) { Engine = engine; _seed = seed; Engine.Changed += EngineChanged; Engine.SubscribeToChange(() => Engine.Name, NameChanged); }
public ResultEmpty(EngineBase engine) : base(engine, new Random().Next()) { }
public ResultEmpty(EngineBase engine, int seed) : base(engine, seed) { }
/// <summary> /// Adds the supplied engine to the DyCEBag's DyCEList. /// </summary> /// <param name="newEngine">The engine to add to the DyCEBag.</param> public void Add(EngineBase newEngine) { DyCEList.Add(newEngine); }
private void NameChanged(EngineBase sender) { RaisePropertyChanged(() => DisplayName); }
/// <summary> /// Gets a new sub-engine reference object using the supplied sub-engine. /// </summary> /// <param name="subEngine">The sub-engine to create the reference from.</param> /// <returns>The referenced sub-engine or, if it's an anonymous reference, the original engine.</returns> public static EngineBase GetSubEngineRef(EngineBase subEngine) { if ((subEngine is EngineRef) || string.IsNullOrWhiteSpace(subEngine.ID)) return subEngine; return new EngineRef(subEngine.ID); }
public static string GetEngineURL(EngineBase engine) { return (from bag in DB.Instance.DyCEBags where bag.DyCEList.Contains(engine) select bag.URL + "&engine=" + engine.ID).FirstOrDefault(); }
public EngineSelectionWindow(EngineBase engine) : this() { _baseEngine = engine; Loaded += EngineSelectionWindow_Loaded; }
/// <summary> /// Creates a new Object Engine property using the name and sub-engine. /// </summary> /// <param name="name">The name of the Object Engine's property.</param> /// <param name="subEngine">The sub-engine to reference from the Object Engine property.</param> public EngineProperty(string name, EngineBase subEngine) : base(name) { SubEngine = DyCEBag.GetSubEngineRef(subEngine); }
public bool Has(EngineBase subEngine) { // If this is the same engine, then yes, we have that subEngine (and it would be self-referential) if (this == subEngine) return true; // If SubEngines are null, then we do not have this subEngine. if (SubEngines == null) return false; // If there are any SubEngines that have this engine as a subEngine, then we have this engine. return SubEngines.Any(e => e.Has(subEngine)); }