Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public override void Bind(BindContext context)
 {
     Type             = context.GetTypeSymbol(RoslynSymbol.Type);
     ContainingSymbol = (MethodSymbol)context.GetSymbol(RoslynSymbol.ContainingSymbol);
 }