示例#1
0
 public TypeMemberDesc(QualifiedIdentifier value, IEnumerable <KeyValuePair <QualifiedIdentifier, object> > extensions = null)
 {
     Value      = value;
     Extensions = extensions is IImmutableDictionary <QualifiedIdentifier, object> id
         ? id
         : (extensions?.ToImmutableDictionary() ?? ImmutableDictionary <QualifiedIdentifier, object> .Empty);
 }
示例#2
0
 public ComplexTypeDesc([NotNull] QualifiedIdentifier name, IEnumerable <KeyValuePair <NameAndIndex, TypeMemberDesc> > members,
                        IEnumerable <KeyValuePair <QualifiedIdentifier, object> > extensions = null) : base(name)
 {
     Members = members is IImmutableDictionary <NameAndIndex, TypeMemberDesc> mid
         ? mid
         : (members?.ToImmutableDictionary() ?? ImmutableDictionary <NameAndIndex, TypeMemberDesc> .Empty);
     Extensions = extensions is IImmutableDictionary <QualifiedIdentifier, object> eid
         ? eid
         : (extensions?.ToImmutableDictionary() ?? ImmutableDictionary <QualifiedIdentifier, object> .Empty);
 }
示例#3
0
 public EnumDesc([NotNull] QualifiedIdentifier name,
                 IEnumerable <KeyValuePair <Identifier, EnumFieldValue> > fields,
                 IEnumerable <KeyValuePair <QualifiedIdentifier, object> > extensions = null) : base(name)
 {
     Fields =
         fields is IImmutableDictionary <Identifier, EnumFieldValue> fid
             ? fid
             : (fields?.ToImmutableDictionary() ?? ImmutableDictionary <Identifier, EnumFieldValue> .Empty);
     Extensions =
         extensions is IImmutableDictionary <QualifiedIdentifier, object> id
             ? id
             : (extensions?.ToImmutableDictionary() ?? ImmutableDictionary <QualifiedIdentifier, object> .Empty);
 }
示例#4
0
 public UnionDesc([NotNull] QualifiedIdentifier name, IEnumerable <KeyValuePair <NameAndIndex, TypeMemberDesc> > members,
                  IEnumerable <KeyValuePair <QualifiedIdentifier, object> > extensions = null) : base(name, members, extensions)
 {
 }
示例#5
0
 protected TypeDesc([NotNull] QualifiedIdentifier name)
 {
     Name = name ?? throw new ArgumentNullException(nameof(name));
 }
示例#6
0
 public RecordDesc([NotNull] QualifiedIdentifier name, [CanBeNull] QualifiedIdentifier baseRecord, IEnumerable <KeyValuePair <NameAndIndex, TypeMemberDesc> > members) : base(name, members)
 {
     BaseRecord = baseRecord;
 }