BO4E/BO/BusinessObject.cs
/// <summary>
///     returns a JSON scheme for the given type <paramref name="boType" />
/// </summary>
/// <param name="boType">a type derived from <see cref="BusinessObject" /></param>
/// <returns>a JSON scheme</returns>
/// <exception cref="System.ArgumentException" />
returns a JSON scheme for the given type
returns a JSON scheme for the given type
public static JSchema GetJsonSchema(Type boType)
        {
            if (!boType.IsSubclassOf(typeof(BusinessObject)))
                throw new ArgumentException(
                    $"You must only request JSON schemes for Business Objects. {boType} is not a valid Business Object type.");
            var generator = new JSchemaGenerator();
            generator.GenerationProviders.Add(new StringEnumGenerationProvider());
            var schema = generator.Generate(boType);
            return schema;
        }
public static JSchema GetJsonSchema ( Type boType ) { if ( ! boType . IsSubclassOf ( typeof ( BusinessObject ) ) ) throw new ArgumentException ( $" You must only request JSON schemes for Business Objects.  { boType }  is not a valid Business Object type. " ) ; var generator = new JSchemaGenerator ( ) ; generator . GenerationProviders . Add ( new StringEnumGenerationProvider ( ) ) ; var schema = generator . Generate ( boType ) ; return schema ; }
returns a JSON scheme for the given type
returns a JSON scheme for the given type
a JSON scheme
a JSON scheme
None
boType
Type
a type derived from
a type derived from