Exemplo n.º 1
0
        public override void Save(ModelSaveContext ctx)
        {
            Host.CheckValue(ctx, nameof(ctx));
            ctx.CheckAtModel();
            ctx.SetVersionInfo(GetVersionInfo());

            // <prefix handled in static Create method>
            // <base>
            // Exes

            SaveBase(ctx);
            Host.Assert(_exes.Length == Infos.Length);
            for (int iinfo = 0; iinfo < Infos.Length; iinfo++)
            {
                _exes[iinfo].Save(ctx);
            }

            TextModelHelper.SaveAll(Host, ctx, Infos.Length, _keyValues);
        }
Exemplo n.º 2
0
        public override void Save(ModelSaveContext ctx)
        {
            Host.CheckValue(ctx, nameof(ctx));
            ctx.CheckAtModel();
            ctx.SetVersionInfo(GetVersionInfo());

            // *** Binary format ***
            // int: sizeof(Float)
            // bindings
            // for each added column
            //   ColInfoEx

            ctx.Writer.Write(sizeof(Float));
            _bindings.Save(ctx);
            for (int iinfo = 0; iinfo < _exes.Length; iinfo++)
            {
                _exes[iinfo].Save(ctx);
            }
            TextModelHelper.SaveAll(Host, ctx, _exes.Length, _slotNames);
        }