1 #region Copyright notice and license 2 // Protocol Buffers - Google's data interchange format 3 // Copyright 2015 Google Inc. All rights reserved. 4 // 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file or at 7 // https://developers.google.com/open-source/licenses/bsd 8 #endregion 9 10 namespace Google.Protobuf 11 { 12 /// <summary> 13 /// Generic interface for a deeply cloneable type. 14 /// </summary> 15 /// <remarks> 16 /// <para> 17 /// All generated messages implement this interface, but so do some non-message types. 18 /// Additionally, due to the type constraint on <c>T</c> in <see cref="IMessage{T}"/>, 19 /// it is simpler to keep this as a separate interface. 20 /// </para> 21 /// </remarks> 22 /// <typeparam name="T">The type itself, returned by the <see cref="Clone"/> method.</typeparam> 23 public interface IDeepCloneable<T> 24 { 25 /// <summary> 26 /// Creates a deep clone of this object. 27 /// </summary> 28 /// <returns>A deep clone of this object.</returns> Clone()29 T Clone(); 30 } 31 } 32