IEnumerable <IMethodReference> IPropertyDefinition.GetAccessors(EmitContext context) { CheckDefinitionInvariant(); MethodSymbol getMethod = this.GetMethod; if (getMethod != null && getMethod.ShouldInclude(context)) { yield return(getMethod); } MethodSymbol setMethod = this.SetMethod; if (setMethod != null && setMethod.ShouldInclude(context)) { yield return(setMethod); } SourcePropertySymbol sourceProperty = this as SourcePropertySymbol; if ((object)sourceProperty != null && sourceProperty.ShouldInclude(context)) { SynthesizedSealedPropertyAccessor synthesizedAccessor = sourceProperty.SynthesizedSealedAccessorOpt; if ((object)synthesizedAccessor != null) { yield return(synthesizedAccessor); } } }
private IMethodReference GetSynthesizedSealedAccessor(MethodKind targetMethodKind) { SourcePropertySymbol sourceProperty = this as SourcePropertySymbol; if ((object)sourceProperty != null) { SynthesizedSealedPropertyAccessor synthesized = sourceProperty.SynthesizedSealedAccessorOpt; return((object)synthesized != null && synthesized.MethodKind == targetMethodKind ? synthesized : null); } return(null); }