예제 #1
0
        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);
            }
        }
예제 #2
0
        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;
        }
예제 #3
0
        public override void Deserialize(UnitOptionRow row)
        {
            base.Deserialize(row);

            structType = Codebase.DeserializeType(row.tag1);
        }