예제 #1
0
파일: Query.cs 프로젝트: onpaj/FlexiBeeSDK
        public override string ToString()
        {
            var q = $"({QueryString}).{FormatString}";

            var args = new List <string>();

            if (LevelOfDetail != LevelOfDetail.Undefined)
            {
                args.Add($"detail={LevelOfDetailString}");
            }

            if (Relations.Any())
            {
                args.Add($"relations={string.Join(',', Relations)}");
            }

            for (int i = 0; i < args.Count; i++)
            {
                q += i == 0 ? "?" : "&";
                q += args[i];
            }

            return(q);
        }
예제 #2
0
 public QueryBuilder WithRelation(Relations relation)
 {
     _query.Relations.Add(relation);
     return(this);
 }