Пример #1
0
        /// <summary>
        /// Determines how code referring to this data model should be refer to it; this takes
        /// into account whether it's a placeholder, an array etc.
        /// </summary>
        internal Typ GetTypForReference()
        {
            var ret = IsPlaceholder ? Typ.Of <object>() : Typ;

            if (IsArray)
            {
                ret = Typ.Generic(typeof(IList <>), ret);
            }
            if (_schema.AdditionalProperties is object)
            {
                ret = SchemaTypes.GetTypFromAdditionalProperties(Package, _schema.AdditionalProperties, Name, ret, inParameter: false);
            }
            return(ret);
        }