コード例 #1
0
        /// <summary>
        /// merges the current instance of the ResizeProperty with the specific instance given by resize.
        /// </summary>
        /// <param name="resize">a specific instance of the ResizeProperty wich should be merged with the current instance</param>
        /// <returns>merged result</returns>
        public ResizeProperty Merge(ResizeProperty resize)
        {
            if (resize == null) return this;

            ResizeProperty merged = new ResizeProperty();
            merged.width = (resize.width.HasValue)? resize.width : this.width;
            merged.height = (resize.height.HasValue) ? resize.height : this.height;
            merged.quality = (resize.quality.HasValue) ? resize.quality : this.quality;
            merged.AspectRatio = (resize.AspectRatio.HasValue) ? resize.AspectRatio : this.AspectRatio;
            return merged;
        }
コード例 #2
0
        /// <summary>
        /// merges the current instance of the ResizeProperty with the specific instance given by resize.
        /// </summary>
        /// <param name="resize">a specific instance of the ResizeProperty wich should be merged with the current instance</param>
        /// <returns>merged result</returns>
        public ResizeProperty Merge(ResizeProperty resize)
        {
            if (resize == null)
            {
                return(this);
            }

            ResizeProperty merged = new ResizeProperty();

            merged.width       = (resize.width.HasValue)? resize.width : this.width;
            merged.height      = (resize.height.HasValue) ? resize.height : this.height;
            merged.quality     = (resize.quality.HasValue) ? resize.quality : this.quality;
            merged.AspectRatio = (resize.AspectRatio.HasValue) ? resize.AspectRatio : this.AspectRatio;
            return(merged);
        }