private void Write(FetcherUpcastMethod method) { WriteSignature(method); using (_builder.IndentBraced) { _("var derivedFetcher = new {0}();", NamesService.GetFetcherTypeName(method.DerivedType)); _("derivedFetcher.Initialize(this.Context, this.GetPath((string) null));"); _("return ({0}) derivedFetcher;", NamesService.GetFetcherInterfaceName(method.DerivedType)); } }