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

Side by Side Diff: third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/TimeExtensions.cs

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 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
OLDNEW
1 #region Copyright notice and license 1 #region Copyright notice and license
2 // Protocol Buffers - Google's data interchange format 2 // Protocol Buffers - Google's data interchange format
3 // Copyright 2015 Google Inc. All rights reserved. 3 // Copyright 2015 Google Inc. All rights reserved.
4 // https://developers.google.com/protocol-buffers/ 4 // https://developers.google.com/protocol-buffers/
5 // 5 //
6 // Redistribution and use in source and binary forms, with or without 6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are 7 // modification, are permitted provided that the following conditions are
8 // met: 8 // met:
9 // 9 //
10 // * Redistributions of source code must retain the above copyright 10 // * Redistributions of source code must retain the above copyright
(...skipping 13 matching lines...) Expand all
24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #endregion 31 #endregion
32 32
33 using System; 33 using System;
34 using System.Collections.Generic;
35 using System.Linq;
36 using System.Text;
37 using System.Threading.Tasks;
34 38
35 namespace Google.Protobuf.WellKnownTypes 39 namespace Google.Protobuf.WellKnownTypes
36 { 40 {
37 /// <summary> 41 /// <summary>
38 /// Extension methods on BCL time-related types, converting to protobuf type s. 42 /// Extension methods on BCL time-related types, converting to protobuf type s.
39 /// </summary> 43 /// </summary>
40 public static class TimeExtensions 44 public static class TimeExtensions
41 { 45 {
42 /// <summary> 46 /// <summary>
43 /// Converts the given <see cref="DateTime"/> to a <see cref="Timestamp" />. 47 /// Converts the given <see cref="DateTime"/> to a <see cref="Timestamp" />.
(...skipping 23 matching lines...) Expand all
67 /// Converts the given <see cref="TimeSpan"/> to a <see cref="Duration"/ >. 71 /// Converts the given <see cref="TimeSpan"/> to a <see cref="Duration"/ >.
68 /// </summary> 72 /// </summary>
69 /// <param name="timeSpan">The time span to convert.</param> 73 /// <param name="timeSpan">The time span to convert.</param>
70 /// <returns>The converted duration.</returns> 74 /// <returns>The converted duration.</returns>
71 public static Duration ToDuration(this TimeSpan timeSpan) 75 public static Duration ToDuration(this TimeSpan timeSpan)
72 { 76 {
73 return Duration.FromTimeSpan(timeSpan); 77 return Duration.FromTimeSpan(timeSpan);
74 } 78 }
75 } 79 }
76 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698