public IUnitOption ToOption() { using (ProfilingUtility.SampleBlock("Row to option")) { var optionType = Codebase.DeserializeType(this.optionType); IUnitOption option; option = (IUnitOption)Activator.CreateInstance(optionType); option.Deserialize(this); return(option); } }
public virtual void Deserialize(UnitOptionRow row) { source = row; if (row.sourceScriptGuids != null) { sourceScriptGuids = row.sourceScriptGuids.Split(',').ToHashSet(); } unitType = Codebase.DeserializeType(row.unitType); category = row.category == null ? null : new UnitCategory(row.category); labelHuman = row.labelHuman; labelProgrammer = row.labelProgrammer; order = row.order; haystackHuman = row.haystackHuman; haystackProgrammer = row.haystackProgrammer; favoriteKey = row.favoriteKey; controlInputCount = row.controlInputCount; controlOutputCount = row.controlOutputCount; }
public override void Deserialize(UnitOptionRow row) { base.Deserialize(row); literalType = Codebase.DeserializeType(row.tag1); }