Ejemplo n.º 1
0
 public static bool Compare(AWSAuthConnection connect, String bucket, String key, String compareTo) {
     bool compare = connect.get(bucket, key).Object.Data == compareTo;
     if (compare) {
         return true;
     } else {
         Debug.Assert(compare);
         return false;
     }         
 }
Ejemplo n.º 2
0
        public static string DebugCompare(AWSAuthConnection connect, String bucket, String key, String compareTo) {
            StringBuilder builder = new StringBuilder();
            String objectValue = connect.get(bucket, key).Object.Data;
            builder.AppendLine("bucket: " + bucket);
            builder.AppendLine("key: " + bucket);
            builder.AppendLine("object value: " + objectValue);
            builder.AppendLine("compare: " + compareTo);

            if (objectValue == compareTo) {
                builder.AppendLine("True: The objects are the same");
            } else {
                builder.AppendLine("False: The objects are not the same");
            }
            return builder.ToString();
        }