aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/IMessage.cs
diff options
context:
space:
mode:
authorJan Tattermusch <jtattermusch@google.com>2015-07-29 16:05:57 -0700
committerJan Tattermusch <jtattermusch@google.com>2015-07-29 20:26:20 -0700
commit3783d9a8add33b240e326438fa0b16869dbcfb44 (patch)
treeda62a6324d13214803065ec47c36867aeae755f5 /csharp/src/Google.Protobuf/IMessage.cs
parent74810c6ae3219498dd3e856f9cd251588c92a899 (diff)
downloadprotobuf-3783d9a8add33b240e326438fa0b16869dbcfb44.tar.gz
protobuf-3783d9a8add33b240e326438fa0b16869dbcfb44.tar.bz2
protobuf-3783d9a8add33b240e326438fa0b16869dbcfb44.zip
remove the freeze API
Diffstat (limited to 'csharp/src/Google.Protobuf/IMessage.cs')
-rw-r--r--csharp/src/Google.Protobuf/IMessage.cs34
1 files changed, 1 insertions, 33 deletions
diff --git a/csharp/src/Google.Protobuf/IMessage.cs b/csharp/src/Google.Protobuf/IMessage.cs
index d179c386..60c6f8c3 100644
--- a/csharp/src/Google.Protobuf/IMessage.cs
+++ b/csharp/src/Google.Protobuf/IMessage.cs
@@ -79,7 +79,7 @@ namespace Google.Protobuf
/// the implementation class.
/// </summary>
/// <typeparam name="T">The message type.</typeparam>
- public interface IMessage<T> : IMessage, IEquatable<T>, IDeepCloneable<T>, IFreezable where T : IMessage<T>
+ public interface IMessage<T> : IMessage, IEquatable<T>, IDeepCloneable<T> where T : IMessage<T>
{
/// <summary>
/// Merges the given message into this one.
@@ -97,10 +97,6 @@ namespace Google.Protobuf
/// Additionally, due to the type constraint on <c>T</c> in <see cref="IMessage{T}"/>,
/// it is simpler to keep this as a separate interface.
/// </para>
- /// <para>
- /// Freezable types which implement this interface should always return a mutable clone,
- /// even if the original object is frozen.
- /// </para>
/// </remarks>
/// <typeparam name="T">The type itself, returned by the <see cref="Clone"/> method.</typeparam>
public interface IDeepCloneable<T>
@@ -111,32 +107,4 @@ namespace Google.Protobuf
/// <returns>A deep clone of this object.</returns>
T Clone();
}
-
- /// <summary>
- /// Provides a mechanism for freezing a message (or repeated field collection)
- /// to make it immutable.
- /// </summary>
- /// <remarks>
- /// Implementations are under no obligation to make this thread-safe: if a freezable
- /// type instance is shared between threads before being frozen, and one thread then
- /// freezes it, it is possible for other threads to make changes during the freezing
- /// operation and also to observe stale values for mutated fields. Objects should be
- /// frozen before being made available to other threads.
- /// </remarks>
- public interface IFreezable
- {
- /// <summary>
- /// Freezes this object.
- /// </summary>
- /// <remarks>
- /// If the object is already frozen, this method has no effect.
- /// </remarks>
- void Freeze();
-
- /// <summary>
- /// Returns whether or not this object is frozen (and therefore immutable).
- /// </summary>
- /// <value><c>true</c> if this object is frozen; <c>false</c> otherwise.</value>
- bool IsFrozen { get; }
- }
}