Esempio n. 1
0
        public void TryGetBool(out bool out_BValue, string sName,
                               MemoryApplication memoryApplication,
                               Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Expr.Name_Library, this, "TryGetBool", log_Reports);
            //

            if (!this.Dictionary_Field.ContainsKey(sName))
            {
                //該当なし。
                out_BValue = false;
                goto gt_Error_NotFound;
            }

            FieldUserformtable fo_Field = this.Dictionary_Field[sName];

            if (EnumTypedb.Bool != fo_Field.EnumTypedb)
            {
                //型が異なる。
                out_BValue = false;
                goto gt_Error_Type;
            }
            out_BValue = (bool)fo_Field.Data;

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotFound:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sName, log_Reports);//フィールド名

                memoryApplication.CreateErrorReport("Er:6005;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_Type:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sName, log_Reports);                          //フィールド名
                tmpl.SetParameter(2, fo_Field.EnumTypedb.ToString(), log_Reports); //フィールドの型名

                memoryApplication.CreateErrorReport("Er:6006;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 2
0
        public void TryGetInt(
            out int out_NValue, string sName, bool bRequired, int nAlt,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Expr.Name_Library, this, "TryGetInt", log_Reports);
            //

            if (!this.Dictionary_Field.ContainsKey(sName))
            {
                //該当なし。

                if (bRequired)
                {
                    out_NValue = -1;
                    goto gt_Error_NotFound;
                }
                else
                {
                    out_NValue = nAlt;
                    goto gt_EndMethod;
                }
            }

            FieldUserformtable fo_Field = this.Dictionary_Field[sName];

            if (EnumTypedb.Int != fo_Field.EnumTypedb)
            {
                //型が異なる。

                if (bRequired)
                {
                    out_NValue = -1;
                    goto gt_Error_Type;
                }
                else
                {
                    out_NValue = nAlt;
                    goto gt_EndMethod;
                }
            }
            out_NValue = (int)fo_Field.Data;

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotFound:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sName, log_Reports);//フィールド名

                memoryApplication.CreateErrorReport("Er:6001;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_Type:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sName, log_Reports);                          //フィールド名
                tmpl.SetParameter(2, fo_Field.EnumTypedb.ToString(), log_Reports); //フィールドの型名

                memoryApplication.CreateErrorReport("Er:6002;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 3
0
        public void TryGetFilepath_Configurationtree(out Configurationtree_NodeFilepath out_Value, string sName, bool bRequired,
                                                     MemoryApplication memoryApplication,
                                                     Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Expr.Name_Library, this, "TryGetFilepath_Configurationtree", log_Reports);
            //

            if (!this.Dictionary_Field.ContainsKey(sName))
            {
                //該当なし。

                if (bRequired)
                {
                    out_Value = new Configurationtree_NodeFilepathImpl(log_Method.Fullname, null);//ヌル・オブジェクト。
                    goto gt_Error_NotFound;
                }
                else
                {
                    out_Value = new Configurationtree_NodeFilepathImpl(log_Method.Fullname, null);//ヌル・オブジェクト。
                    goto gt_EndMethod;
                }
            }

            FieldUserformtable fo_Field = this.Dictionary_Field[sName];

            if (EnumTypedb.ConfFilepath != fo_Field.EnumTypedb)
            {
                //型が異なる。

                if (bRequired)
                {
                    out_Value = new Configurationtree_NodeFilepathImpl(log_Method.Fullname, null);//ヌル・オブジェクト。
                    goto gt_Error_Type;
                }
                else
                {
                    out_Value = new Configurationtree_NodeFilepathImpl(log_Method.Fullname, null);//ヌル・オブジェクト。
                    goto gt_EndMethod;
                }
            }
            out_Value = (Configurationtree_NodeFilepath)fo_Field.Data;

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotFound:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sName, log_Reports);//フィールド名

                memoryApplication.CreateErrorReport("Er:6007;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_Type:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sName, log_Reports);                          //フィールド名
                tmpl.SetParameter(2, fo_Field.EnumTypedb.ToString(), log_Reports); //フィールドの型名

                memoryApplication.CreateErrorReport("Er:6008;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }