Lucene.Net.Spatial.Queries.SpatialArgsParser.WriteSpatialArgs C# (CSharp) Method

WriteSpatialArgs() public static method

Writes a close approximation to the parsed input format.
public static WriteSpatialArgs ( SpatialArgs args ) : string
args SpatialArgs
return string
        public static string WriteSpatialArgs(SpatialArgs args)
        {
            var str = new StringBuilder();
            str.Append(args.Operation.Name);
            str.Append('(');
            str.Append(args.Shape);
            if (args.DistErrPct != null)
                str.Append(" distErrPct=").Append(string.Format("{0:0.00}%", args.DistErrPct * 100d));
            if (args.DistErr != null)
                str.Append(" distErr=").Append(args.DistErr);
            str.Append(')');
            return str.ToString();
        }

Usage Example

コード例 #1
0
ファイル: SpatialArgs.cs プロジェクト: zhuthree/lucenenet
 public override string ToString()
 {
     return(SpatialArgsParser.WriteSpatialArgs(this));
 }