aboutsummaryrefslogtreecommitdiff
path: root/csharp/ProtocolBuffers/ExtendableMessage.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2008-08-14 20:37:11 +0100
committerJon Skeet <skeet@pobox.com>2008-08-14 20:37:11 +0100
commit3b3150881a677e3c8e1ceda5be25bb1ac9a725ea (patch)
tree396bea118f605ef8cc30d67533a4231e8b4d558d /csharp/ProtocolBuffers/ExtendableMessage.cs
parent0677933d9efbd322c0b310068b03d871eea3a49d (diff)
downloadprotobuf-3b3150881a677e3c8e1ceda5be25bb1ac9a725ea.tar.gz
protobuf-3b3150881a677e3c8e1ceda5be25bb1ac9a725ea.tar.bz2
protobuf-3b3150881a677e3c8e1ceda5be25bb1ac9a725ea.zip
Optimisations of IsInitialized and removal of unnecessary references.
Diffstat (limited to 'csharp/ProtocolBuffers/ExtendableMessage.cs')
-rw-r--r--csharp/ProtocolBuffers/ExtendableMessage.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/csharp/ProtocolBuffers/ExtendableMessage.cs b/csharp/ProtocolBuffers/ExtendableMessage.cs
index c3b37dd5..a4a6e17e 100644
--- a/csharp/ProtocolBuffers/ExtendableMessage.cs
+++ b/csharp/ProtocolBuffers/ExtendableMessage.cs
@@ -67,12 +67,18 @@ namespace Google.ProtocolBuffers {
}
/// <summary>
- /// Called by subclasses to check if all extensions are initialized.
+ /// Called to check if all extensions are initialized.
/// </summary>
protected bool ExtensionsAreInitialized {
get { return extensions.IsInitialized; }
}
+ public override bool IsInitialized {
+ get {
+ return base.IsInitialized && ExtensionsAreInitialized;
+ }
+ }
+
#region Reflection
public override IDictionary<FieldDescriptor, object> AllFields {
get {