using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Google.Protobuf;
namespace Google.Protobuf.FieldAccess
{
///
/// Accessor for repeated fields.
///
/// The type of message containing the field.
internal sealed class RepeatedFieldAccessor : FieldAccessorBase where T : IMessage
{
internal RepeatedFieldAccessor(string name) : base(name)
{
}
public override void Clear(T message)
{
IList list = (IList) GetValue(message);
list.Clear();
}
public override bool HasValue(T message)
{
throw new NotImplementedException("HasValue is not implemented for repeated fields");
}
public override void SetValue(T message, object value)
{
throw new NotImplementedException("SetValue is not implemented for repeated fields");
}
}
}