コード例 #1
0
 public serverNode(dbNode n)
 {
     Id                 = n.Id;
     name               = n.name;
     identifier         = n.identifier;
     internalIndex      = n.internalIndex;
     classType          = n.classType;
     systemType         = n.systemType;
     references         = n.references;
     currentServerIndex = -1;
     serverIdentifier   = "none";
 }
コード例 #2
0
        /// <summary>
        /// Initialization of the variable value in DB, this is used if the variable does not exist yet,
        /// then one looks into the nodelist.
        /// </summary>
        /// <param name="name">name of the variable value to initialize</param>
        /// <returns></returns>
        private dbVariableValue _initVarValue(string name)
        {
            dbNode var_idx = nodes.FindOne(Query.EQ("name", name));

            if (var_idx == null)
            {
                throw new Exception("variable does not exist: " + name);
            }
            else
            {
                dbVariableValue new_var = new dbVariableValue {
                    Id         = var_idx.Id,
                    name       = var_idx.name,
                    systemType = var_idx.systemType,
                };
                return(new_var);
            }
        }