예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RecipeVersion" /> class.
        /// </summary>
        /// <param name="name">Recipe name. Make it descriptive and helpful ;) (required).</param>
        /// <param name="tag">The tag of the recipe (required).</param>
        /// <param name="keywords">A list of keywords to search the recipe by.</param>
        /// <param name="maintainers">A list of maintainers for the recipe.</param>
        /// <param name="home">The URL of this recipe&#39;s home page.</param>
        /// <param name="sources">A list of URLs to source code for this project.</param>
        /// <param name="icon">A URL to an SVG or PNG image to be used as an icon.</param>
        /// <param name="deprecated">Whether this recipe is deprecated.</param>
        /// <param name="description">A description of what this recipe does.</param>
        /// <param name="license">The license information..</param>
        /// <param name="url">url (required).</param>
        /// <param name="created">created (required).</param>
        /// <param name="digest">digest (required).</param>
        public RecipeVersion
        (
            string name, string tag, string url, DateTime created, string digest,                                                                                                                                                                                              // Required parameters
            List <string> keywords = default, List <QueenbeeRecipeMetadataMaintainer> maintainers = default, string home = default, List <string> sources = default, string icon = default, bool deprecated = default, string description = default, License license = default // Optional parameters
        )                                                                                                                                                                                                                                                                      // BaseClass
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for RecipeVersion and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "tag" is required (not null)
            if (tag == null)
            {
                throw new InvalidDataException("tag is a required property for RecipeVersion and cannot be null");
            }
            else
            {
                this.Tag = tag;
            }

            // to ensure "url" is required (not null)
            if (url == null)
            {
                throw new InvalidDataException("url is a required property for RecipeVersion and cannot be null");
            }
            else
            {
                this.Url = url;
            }

            // to ensure "created" is required (not null)
            if (created == null)
            {
                throw new InvalidDataException("created is a required property for RecipeVersion and cannot be null");
            }
            else
            {
                this.Created = created;
            }

            // to ensure "digest" is required (not null)
            if (digest == null)
            {
                throw new InvalidDataException("digest is a required property for RecipeVersion and cannot be null");
            }
            else
            {
                this.Digest = digest;
            }

            this.Keywords    = keywords;
            this.Maintainers = maintainers;
            this.Home        = home;
            this.Sources     = sources;
            this.Icon        = icon;
            this.Deprecated  = deprecated;
            this.Description = description;
            this.License     = license;

            // Set non-required readonly properties with defaultValue
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueenbeeRecipeMetadataMetaData" /> class.
        /// </summary>
        /// <param name="name">Recipe name. Make it descriptive and helpful ;) (required).</param>
        /// <param name="tag">The tag of the recipe (required).</param>
        /// <param name="keywords">A list of keywords to search the recipe by.</param>
        /// <param name="maintainers">A list of maintainers for the recipe.</param>
        /// <param name="home">The URL of this recipe&#39;s home page.</param>
        /// <param name="sources">A list of URLs to source code for this project.</param>
        /// <param name="icon">A URL to an SVG or PNG image to be used as an icon.</param>
        /// <param name="deprecated">Whether this recipe is deprecated.</param>
        /// <param name="description">A description of what this recipe does.</param>
        /// <param name="license">The license information..</param>
        public QueenbeeRecipeMetadataMetaData
        (
            string name, string tag,                                                                                                                                                                                                                                           // Required parameters
            List <string> keywords = default, List <QueenbeeRecipeMetadataMaintainer> maintainers = default, string home = default, List <string> sources = default, string icon = default, bool deprecated = default, string description = default, License license = default // Optional parameters
        )                                                                                                                                                                                                                                                                      // BaseClass
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for QueenbeeRecipeMetadataMetaData and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "tag" is required (not null)
            if (tag == null)
            {
                throw new InvalidDataException("tag is a required property for QueenbeeRecipeMetadataMetaData and cannot be null");
            }
            else
            {
                this.Tag = tag;
            }

            this.Keywords    = keywords;
            this.Maintainers = maintainers;
            this.Home        = home;
            this.Sources     = sources;
            this.Icon        = icon;
            this.Deprecated  = deprecated;
            this.Description = description;
            this.License     = license;

            // Set non-required readonly properties with defaultValue
        }