Exemplo n.º 1
0
        protected override bool Retrieve(IPersistence persistence, ref ePersistence phase)
        {
            base.Retrieve(persistence, ref phase);
            switch (phase)
            {
            case ePersistence.Initial:
                _ShortName = persistence.GetFieldValue(Constants.Domain_Short_Name, "");

                string relativePath = persistence.GetFieldValue(Constants.Domain_Sub_Model, "");
                _Model = persistence.GetFullPath(relativePath);

                if (_Model != "")
                {
                    Tree.AddSubModel(this);
                }

                _Methods.Clear();
                _Methods.AddRange(persistence.GetFieldValues(Constants.Domain_Methods, ""));

                DataPersistence.Retrieve(persistence);

                break;
            }

            return(true);
        }
Exemplo n.º 2
0
        protected override bool Retrieve(IPersistence persistence, ref ePersistence phase)
        {
            base.Retrieve(persistence, ref phase);
            switch (phase)
            {
            case ePersistence.Initial:
                _Value = persistence.GetFieldValue(Constants.EnumVariable_Value, "");
                _Elements.Clear();
                _Elements.AddRange(persistence.GetFieldValues(Constants.EnumVariable_Choices, ""));
                break;
            }

            return(true);
        }
Exemplo n.º 3
0
        bool IDataPersistence.Retrieve(IPersistence persistence)
        {
            InitializeMode = (eInitializeMode)Enum.Parse(
                typeof(eInitializeMode),
                persistence.GetFieldValue(Constants.IDataPesistence_InitializeMode,
                                          eInitializeMode.None.ToString()));

            PersistMode = (ePersistMode)Enum.Parse(
                typeof(ePersistMode),
                persistence.GetFieldValue(Constants.IDataPesistence_PersistMode,
                                          ePersistMode.Never.ToString()));

            string[] connections = persistence.GetFieldValues(Constants.IDataPesistence_DataConnections, "");
            DataConnections.Clear();
            DataConnections.AddRange(connections);

            return(true);
        }
Exemplo n.º 4
0
        protected override bool Retrieve(IPersistence persistence, ref ePersistence phase)
        {
            base.Retrieve(persistence, ref phase);
            switch (phase)
            {
            case ePersistence.Initial:
                List <string> data = new List <string>();
                data.AddRange(persistence.GetFieldValues(Constants.DataDefinitionExport, ""));
                foreach (string json in data)
                {
                    if (json != "")
                    {
                        IDataDefinitionExportImpl export = JsonConvert.DeserializeObject <IDataDefinitionExportImpl>(json);
                        Exports.Add(export);
                    }
                }

                break;
            }

            return(true);
        }