Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.visual-basic > #18865
| X-Received | by 10.36.29.7 with SMTP id 7mr10690590itj.2.1475842630367; Fri, 07 Oct 2016 05:17:10 -0700 (PDT) |
|---|---|
| X-Received | by 10.36.137.67 with SMTP id s64mr2291211itd.1.1475842630336; Fri, 07 Oct 2016 05:17:10 -0700 (PDT) |
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!o19no879409ito.0!news-out.google.com!203ni2587itk.0!nntp.google.com!l13no874539itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | it.comp.lang.visual-basic |
| Date | Fri, 7 Oct 2016 05:17:08 -0700 (PDT) |
| In-Reply-To | <6df688b1-a619-48d9-ae14-75771252eeec@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=80.116.116.246; posting-account=eitZdgoAAAC6C9CXmyhLNaQM3MgI3eZM |
| NNTP-Posting-Host | 80.116.116.246 |
| References | <6df688b1-a619-48d9-ae14-75771252eeec@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <b6ee2fc6-7c4c-43fd-a314-b55e5a718161@googlegroups.com> (permalink) |
| Subject | Re: Architettura interna di ADO.Net |
| From | Luca D <antaniserse@yahoo.it> |
| Injection-Date | Fri, 07 Oct 2016 12:17:10 +0000 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Xref | csiph.com it.comp.lang.visual-basic:18865 |
Show key headers only | View raw
Il giorno venerdì 7 ottobre 2016 02:55:44 UTC+2, Antologiko ha scritto:
> Con quale tecnica secondo voi si ottiene questo risultato? Shadowing?
Un sistema è questo:
Nella classe base, dividere il singolo metodo in due, uno public e uno protected
Protected Overridable Function OnCreateXX() As BaseXX
Return New BaseXX()
End Function
Public Function CreateXX() As BaseXX
Return OnCreateXX()
End Function
Nella derivata, fare override del primo, e overloads del secondo
Protected Overrides Function OnCreateXX() As BaseXX
Return New DerivataXX()
End Function
Public Overloads Function CreateXX() As DerivataXX 'nota il cambio di tipo
Return DirectCast(OnCreateXX(), DerivataXX)
End Function
Considerato che Common.DBConnection espone i metodi
Protected MustOverride Function CreateDbCommand() As DbCommand
e
Public Function CreateCommand() As DbCommand
non escluderei sia stato usato proprio questo tipo di approccio
Back to it.comp.lang.visual-basic | Previous | Next — Previous in thread | Next in thread | Find similar
Architettura interna di ADO.Net Antologiko <antologiko@gmail.com> - 2016-10-06 17:55 -0700
Re: Architettura interna di ADO.Net Luca D <antaniserse@yahoo.it> - 2016-10-07 05:17 -0700
Re: Architettura interna di ADO.Net Antologiko <antologiko@gmail.com> - 2016-10-07 14:29 -0700
Re: Architettura interna di ADO.Net Luca D <antaniserse@yahoo.it> - 2016-10-07 15:11 -0700
Re: Architettura interna di ADO.Net Antologiko <antologiko@gmail.com> - 2016-10-08 02:30 -0700
Re: Architettura interna di ADO.Net Luca D <antaniserse@yahoo.it> - 2016-10-09 01:18 -0700
Re: Architettura interna di ADO.Net Antologiko <antologiko@gmail.com> - 2016-10-09 15:44 -0700
csiph-web