TrueVault.Net.Models.Schema.Schema.Schema C# (CSharp) Method

Schema() private method

Create a new Schema with the given Name and Fields
A schema must have a valid, non-empty name A Schema must include one or more fields
private Schema ( System.Guid id, string name ) : System
id System.Guid The Id of this Schema (only set from a response)
name string Required, the name of this Schema
return System
        internal Schema(Guid id, string name, params SchemaField[] fields)
        {
            if (string.IsNullOrWhiteSpace(name))
                throw new InvalidOperationException("A Schema must have a valid, non-empty name");
            if (fields == null || !fields.Any())
                throw new InvalidOperationException("A Schema must include one or more fields");
            if(id == default(Guid))
                throw new InvalidOperationException("A Schema Id must be a valid (non-default) Guid");
            Id = id;
            Name = name;
            Fields = fields.ToList();
        }

Same methods

Schema::Schema ( ) : System
Schema::Schema ( string name ) : System
Schema