FindRule() public method

Provides the rule which corresponds to the name provided
public FindRule ( string name ) : DataDictionary.Rules.Rule
name string
return DataDictionary.Rules.Rule
Exemplo n.º 1
0
        /// <summary>
        ///     Sets the update information for this procedure
        /// </summary>
        /// <param name="source">The source procedure this procedure updates</param>
        public override void SetUpdateInformation(ModelElement source)
        {
            base.SetUpdateInformation(source);
            Procedure sourceProcedure = (Procedure)source;

            // In addition to indicating the function's update information, we need to create links for each parameter
            foreach (Parameter parameter in FormalParameters)
            {
                Parameter baseParameter = sourceProcedure.GetFormalParameter(parameter.Name);
                if (baseParameter != null)
                {
                    parameter.SetUpdateInformation(baseParameter);
                }
            }

            foreach (Rule rule in Rules)
            {
                Rule baseRule = sourceProcedure.FindRule(rule.Name);
                if (baseRule != null)
                {
                    rule.SetUpdateInformation(baseRule);
                }
            }
        }