Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Verb"/> class with an IRI as an identifier and display information.
        /// </summary>
        /// <param name="id">IRI that corresponds to a Verb definition.</param>
        /// <param name="display">The human readable representation of the Verb in one or more languages. Key is the language code.</param>
        public Verb(Uri id, ILanguageMap display)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            Id = id;

            if (display != null && display.Any())
            {
                Display = display;
            }
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the ActivityDefinition class.
        /// </summary>
        /// <param name="name">The human readable/visual name of the Activity</param>
        /// <param name="type">The type of Activity.</param>
        /// <param name="description">A description of the Activity</param>
        /// <param name="moreInfo">Resolves to a document with human-readable information about the Activity, which could include a way to launch the activity.</param>
        /// <param name="extensions">A map of other properties as needed</param>
        public ActivityDefinition(ILanguageMap name, Uri type, ILanguageMap description = null, Uri moreInfo = null, Extension extensions = null)
        {
            if (name != null && name.Any())
            {
                Name = name;
            }

            if (description != null && description.Any())
            {
                Description = description;
            }

            if (extensions != null && extensions.Any())
            {
                Extensions = extensions;
            }

            Type     = type;
            MoreInfo = moreInfo;
        }