Changeset 4068 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedMessage.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedMessage.cs
r3857 r4068 34 34 35 35 using System; 36 using System.Collections; 36 37 using System.Collections.Generic; 37 38 using Google.ProtocolBuffers.Collections; 38 39 using Google.ProtocolBuffers.Descriptors; 39 40 using Google.ProtocolBuffers.FieldAccess; 40 using System.Collections;41 41 42 42 namespace Google.ProtocolBuffers { 43 43 44 44 /// <summary> 45 45 /// All generated protocol message classes extend this class. It implements … … 48 48 /// </summary> 49 49 public abstract class GeneratedMessage<TMessage, TBuilder> : AbstractMessage<TMessage, TBuilder> 50 where TMessage : GeneratedMessage<TMessage, TBuilder>51 50 where TMessage : GeneratedMessage<TMessage, TBuilder> 51 where TBuilder : GeneratedBuilder<TMessage, TBuilder> { 52 52 53 53 private UnknownFieldSet unknownFields = UnknownFieldSet.DefaultInstance; … … 100 100 // We know it's an IList<T>, but not the exact type - so 101 101 // IEnumerable is the best we can do. (C# generics aren't covariant yet.) 102 foreach (IMessage element in (IEnumerable) 102 foreach (IMessage element in (IEnumerable)this[field]) { 103 103 if (!element.IsInitialized) { 104 104 return false; … … 106 106 } 107 107 } else { 108 if (HasField(field) && !((IMessage) 108 if (HasField(field) && !((IMessage)this[field]).IsInitialized) { 109 109 return false; 110 110 } … … 148 148 internal void SetUnknownFields(UnknownFieldSet fieldSet) { 149 149 unknownFields = fieldSet; 150 } 150 } 151 151 } 152 152 }
Note: See TracChangeset
for help on using the changeset viewer.