コード例 #1
0
 public override Operator Process(Framework.Data.Geocache gc)
 {
     Operator result = 0;
     try
     {
         string gcvote = gc.GetCustomAttribute("GCVote") as string;
         if (!string.IsNullOrEmpty(gcvote))
         {
             //x/y (z)
             int pos1 = gcvote.IndexOf('/');
             int pos2 = gcvote.IndexOf(' ');
             string sd;
             if (pos2 < 0)
             {
                 sd = gcvote.Substring(pos1 + 1);
             }
             else
             {
                 sd = gcvote.Substring(pos1 + 1, pos2 - pos1-1);
             }
             double v = Utils.Conversion.StringToDouble(sd);
             result = GetOperators(v.CompareTo(_value));
         }
     }
     catch
     {
     }
     return result;
 }
コード例 #2
0
 public override object GetValue(Framework.Data.Geocache gc)
 {
     string gcvote = gc.GetCustomAttribute("GCVote") as string;
     return gcvote ?? "";
 }