private FieldSymbol GetAutoField(BindContext context) { PropertySymbol containingProperty = (PropertySymbol)context.GetSymbol(RoslynSymbol.AssociatedSymbol); foreach (var field in ContainingType.GetMembers <FieldSymbol>(context)) { if (field.RoslynSymbol.AssociatedSymbol != null && field.RoslynSymbol.AssociatedSymbol.Equals(containingProperty.RoslynSymbol)) { return(field); } } return(null); }
public override void Bind(BindContext context) { Type = context.GetTypeSymbol(RoslynSymbol.Type); ContainingSymbol = (MethodSymbol)context.GetSymbol(RoslynSymbol.ContainingSymbol); }