internal CallSiteData(DynamicOperationFactory factory, string fldname = null) { _factory = factory; _target = new SubstitutedFieldSymbol(factory.CallSite_T, factory.CallSite_T_Target); // AsMember // we'll change containing type later once we know, important to have Substitued symbol before calling it _fld = factory.CreateCallSiteField(fldname ?? string.Empty); }
SynthesizedFieldSymbol IWithSynthesized.GetOrCreateSynthesizedField(TypeSymbol type, string name, Accessibility accessibility, bool isstatic, bool @readonly) { var field = _lazyMembers.OfType <SynthesizedFieldSymbol>().FirstOrDefault(f => f.Name == name && f.IsStatic == isstatic && f.Type == type && f.IsReadOnly == @readonly); if (field == null) { field = new SynthesizedFieldSymbol(this, type, name, accessibility, isstatic, @readonly); _lazyMembers.Add(field); } return(field); }