示例#1
0
        private CustomBuildOptions ParseCustomBuildOptions(XElement element)
        {
            var output = new CustomBuildOptions();

            output.Command   = ParseMaybeString(element, "command");
            output.Message   = ParseMaybeString(element, "message");
            output.Outputs   = ParseMaybeString(element, "outputs");
            output.Inputs    = ParseMaybeString(element, "inputs");
            output.Link      = ParseMaybeBool(element, "link");
            output.IsContent = ParseMaybeBool(element, "content");

            return(output);
        }
        public CustomBuildOptions Merge(CustomBuildOptions shared)
        {
            if (shared == null)
            {
                return(this);
            }

            var output = new CustomBuildOptions();

            output.Command   = Command == null ? shared.Command : Command;
            output.Message   = Message == null ? shared.Message : Message;
            output.Outputs   = Outputs == null ? shared.Outputs : Outputs;
            output.Inputs    = Inputs == null ? shared.Inputs : Inputs;
            output.Link      = Link == OptionalBool.None ? shared.Link : Link;
            output.IsContent = IsContent == OptionalBool.None ? shared.IsContent : IsContent;

            return(output);
        }