Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: pkg/serialization/lib/serialization.dart

Issue 14688020: fix for return type issue in 22524 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This provides a general-purpose serialization facility for Dart objects. A 6 * This provides a general-purpose serialization facility for Dart objects. A
7 * [Serialization] is defined in terms of [SerializationRule]s and supports 7 * [Serialization] is defined in terms of [SerializationRule]s and supports
8 * reading and writing to different formats. 8 * reading and writing to different formats.
9 * 9 *
10 * ## Installing ## 10 * ## Installing ##
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (_selfDescribing != null) return _selfDescribing; 260 if (_selfDescribing != null) return _selfDescribing;
261 return !rules.any((x) => x is CustomRule); 261 return !rules.any((x) => x is CustomRule);
262 } 262 }
263 263
264 /** 264 /**
265 * When we write out data using this serialization, should we also write 265 * When we write out data using this serialization, should we also write
266 * out a description of the rules. This is on by default unless using 266 * out a description of the rules. This is on by default unless using
267 * CustomRule subclasses, in which case it requires additional setup and 267 * CustomRule subclasses, in which case it requires additional setup and
268 * is off by default. 268 * is off by default.
269 */ 269 */
270 void set selfDescribing(bool value) => _selfDescribing = value; 270 void set selfDescribing(bool value) {
271 _selfDescribing = value;
272 }
271 273
272 /** 274 /**
273 * Creates a new serialization with a default set of rules for primitives 275 * Creates a new serialization with a default set of rules for primitives
274 * and lists. 276 * and lists.
275 */ 277 */
276 Serialization() { 278 Serialization() {
277 addDefaultRules(); 279 addDefaultRules();
278 } 280 }
279 281
280 /** 282 /**
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 488 }
487 489
488 /** 490 /**
489 * An exception class for errors during serialization. 491 * An exception class for errors during serialization.
490 */ 492 */
491 class SerializationException implements Exception { 493 class SerializationException implements Exception {
492 final String message; 494 final String message;
493 const SerializationException([this.message]); 495 const SerializationException([this.message]);
494 toString() => "SerializationException($message)"; 496 toString() => "SerializationException($message)";
495 } 497 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698