示例#1
0
        /// <summary>
        /// Extendses the specified result map.
        /// </summary>
        /// <param name="extend">The extend id.</param>
        /// <returns></returns>
        public ResultExpression Extends(string extend)
        {
            Contract.Require.That(extend, Is.Not.Null & Is.Not.Empty).When("retrieving extend argument in Extends method");

            if (parentConfiguration == null)
            {
                resultExpression    = new ResultExpression(builder);
                parentConfiguration = builder.RegisterConfiguration();
                resultExpression.parentConfiguration = parentConfiguration;
            }
            if (resultExpression == null)
            {
                resultExpression = new ResultExpression(builder);
                resultExpression.parentConfiguration = parentConfiguration;
            }
            parentConfiguration.CreateAttribute(ConfigConstants.ATTRIBUTE_EXTENDS, builder.ApplyNamespace(extend));

            return(resultExpression);
        }
示例#2
0
        /// <summary>
        /// Mappings to the specified member.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns></returns>
        public ResultExpression MappingMember(string name)
        {
            Contract.Require.That(name, Is.Not.Null & Is.Not.Empty).When("retrieving name argument in MappingMember method");

            if (parentConfiguration == null)
            {
                resultExpression    = new ResultExpression(builder);
                parentConfiguration = builder.RegisterConfiguration();
                resultExpression.parentConfiguration = parentConfiguration;
            }
            if (resultExpression == null)
            {
                resultExpression = new ResultExpression(builder);
                resultExpression.parentConfiguration = parentConfiguration;
            }
            builder.CurrentConfiguration = new MutableConfiguration(ConfigConstants.ELEMENT_RESULT, name);
            builder.CurrentConfiguration.CreateAttribute(ConfigConstants.ATTRIBUTE_PROPERTY, name);

            parentConfiguration.Children.Add(builder.CurrentConfiguration);

            return(resultExpression);
        }