Describes a formula source code (as used by the "formula" field of EmberPlus-Glow.Parameter).
        /// <summary>
        /// Sets the value of the "formula" field of the "contents" SET.
        /// </summary>
        /// <param name="formula">The formula source tuple to set.</param>
        public void SetFormula(GlowFormulaSource formula)
        {
            if (formula == null)
            {
                throw new ArgumentNullException("formula");
            }

            var strings = new[]
            {
                String.Empty,
                String.Empty,
            };

            if (formula.ProviderToConsumer != null)
            {
                strings[0] = formula.ProviderToConsumer;
            }

            if (formula.ConsumerToProvider != null)
            {
                strings[1] = formula.ConsumerToProvider;
            }

            Formula = String.Join("\n", strings);
        }
Exemple #2
0
        /// <summary>
        /// Sets the value of the "formula" field of the "contents" SET.
        /// </summary>
        /// <param name="formula">The formula source tuple to set.</param>
        public void SetFormula(GlowFormulaSource formula)
        {
            if(formula == null)
            throw new ArgumentNullException("formula");

             var strings = new[]
             {
            String.Empty,
            String.Empty,
             };

             if(formula.ProviderToConsumer != null)
            strings[0] = formula.ProviderToConsumer;

             if(formula.ConsumerToProvider != null)
            strings[1] = formula.ConsumerToProvider;

             Formula = String.Join("\n", strings);
        }