Пример #1
0
        internal Contracts.Claim ToContract(bool identifierOnly)
        {
            var obj = new Contracts.Claim {
                Id = Id, Type = Type, Rank = Rank
            };

            if (identifierOnly)
            {
                return(obj);
            }
            obj.MainSnak   = MainSnak.ToContract();
            obj.Qualifiers = Qualifiers.Select(q => q.ToContract())
                             .GroupBy(q => q.Property).ToDictionary(g => g.Key, g => (ICollection <Contracts.Snak>)g.ToList());
            obj.References = References.Select(r => r.ToContract()).ToList();
            return(obj);
        }
Пример #2
0
 /// <inheritdoc />
 public override string ToString()
 {
     return(MainSnak.ToString());
 }