private PropertyElement ParseProperty(
CodeAccess access,
MemberModifiers memberAttributes,
bool isDefault,
string modifyAccess,
bool inInterface)
{
PropertyElement property = new PropertyElement();
property.Name = CaptureWord();
property.Access = access;
property.MemberModifiers = memberAttributes;
property[VBExtendedProperties.Default] = isDefault;
property[VBExtendedProperties.AccessModifier] = modifyAccess;
EatLineContinuation();
if (NextChar == VBSymbol.BeginParameterList)
{
string indexParam = this.ParseParams();
if (indexParam.Length > 0)
{
property.IndexParameter = indexParam;
}
}
EatWord(VBKeyword.As, "Expected As");
string type = CaptureTypeName();
if (string.IsNullOrEmpty(type))
{
this.OnParseError("Expected return type");
}
property.Type = type;
string[] implements;
string blockTemp = TryParseImplements(out implements);
foreach (string implementation in implements)
{
InterfaceReference interfaceReference =
new InterfaceReference(implementation, InterfaceReferenceType.Interface);
property.AddImplementation(interfaceReference);
}
if ((memberAttributes & MemberModifiers.Abstract) != MemberModifiers.Abstract &&
!inInterface)
{
property.BodyText = (blockTemp + this.ParseBlock(VBKeyword.Property)).Trim();
}
return property;
}