示例#1
0
        /// <summary>
        /// Helper to check if the 2 MetaTable have the same definition
        /// </summary>
        public bool IsIdentical(MetaTable table)
        {
            bool result =
                TemplateName == table.TemplateName &&
                Helper.CompareTrim(DefinitionScript, table.DefinitionScript) &&
                Helper.CompareTrim(LoadScript, table.LoadScript)
             ;

            if (result)
            {
                foreach (var parameter in Parameters)
                {
                    if (parameter.Value != table.GetValue(parameter.Name))
                    {
                        result = false;
                        break;
                    }
                }
            }

            return result;
        }
示例#2
0
        /// <summary>
        /// Helper to check if the 2 MetaTable have the same definition
        /// </summary>
        public bool IsIdentical(MetaTable table)
        {
            bool result =
                TemplateName == table.TemplateName &&
                DefinitionScript.Trim() == table.DefinitionScript.Trim() &&
                (LoadScript == null && table.LoadScript == null) || (LoadScript.Trim() == table.LoadScript.Trim())
            ;

            if (result)
            {
                foreach (var parameter in Parameters)
                {
                    if (parameter.Value != table.GetValue(parameter.Value))
                    {
                        result = false;
                        break;
                    }
                }
            }

            return(result);
        }