Click here to Skip to main content
15,908,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: Near-static class Pin
PIEBALDconsult14-Jun-08 5:12
mvePIEBALDconsult14-Jun-08 5:12 
GeneralRe: Near-static class Pin
Ed.Poore14-Jun-08 8:12
Ed.Poore14-Jun-08 8:12 
GeneralRe: Near-static class Pin
PIEBALDconsult14-Jun-08 18:45
mvePIEBALDconsult14-Jun-08 18:45 
GeneralRe: Near-static class Pin
Ed.Poore14-Jun-08 21:18
Ed.Poore14-Jun-08 21:18 
GeneralRe: Near-static class Pin
PIEBALDconsult15-Jun-08 7:45
mvePIEBALDconsult15-Jun-08 7:45 
GeneralRe: Near-static class Pin
Ed.Poore15-Jun-08 9:08
Ed.Poore15-Jun-08 9:08 
GeneralRe: Near-static class Pin
PIEBALDconsult16-Jun-08 11:05
mvePIEBALDconsult16-Jun-08 11:05 
GeneralRe: Near-static class Pin
Ed.Poore16-Jun-08 11:15
Ed.Poore16-Jun-08 11:15 
PIEBALDconsult wrote:
always remembering that probably no one else will use this anyway. Blush | :O

In that instance I think you're probably overcomplicating things Roll eyes | :rolleyes:

How about moving the Reserve method to the GenericPoolItem, or rather provide the common stuff inside the container class and then provide the option to perform additional operations.  For example if you do something like the following:
public static IGenericPoolItem<T> Reserve<T>()
{
  // Perform initial reserve stuff
  if (T is ICustomReserve)
  {
    ((ICustomReserve)default(T)).Reserve();
  }
  // Perform final reserve stuff.
}
Thus if you want to provide additional reserving you create a "wrapper" item and provide the implementation from there.  Note the code would probably need rethinking but perhaps it provides some food for thought?


I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder

GeneralRe: Near-static class Pin
PIEBALDconsult16-Jun-08 12:41
mvePIEBALDconsult16-Jun-08 12:41 
GeneralRe: Near-static class Pin
Ed.Poore16-Jun-08 13:21
Ed.Poore16-Jun-08 13:21 
GeneralRe: Near-static class Pin
PIEBALDconsult16-Jun-08 14:01
mvePIEBALDconsult16-Jun-08 14:01 
GeneralRe: Near-static class Pin
Ed.Poore16-Jun-08 14:15
Ed.Poore16-Jun-08 14:15 
GeneralRe: Near-static class Pin
Ed.Poore16-Jun-08 14:17
Ed.Poore16-Jun-08 14:17 
GeneralRe: Near-static class Pin
PIEBALDconsult17-Jun-08 6:24
mvePIEBALDconsult17-Jun-08 6:24 
GeneralRe: Near-static class Pin
Ed.Poore17-Jun-08 6:26
Ed.Poore17-Jun-08 6:26 
AnswerRe: Near-static class Pin
leppie13-Jun-08 21:49
leppie13-Jun-08 21:49 
GeneralRe: Near-static class Pin
PIEBALDconsult14-Jun-08 4:39
mvePIEBALDconsult14-Jun-08 4:39 
AnswerRe: Near-static class Pin
Lutosław14-Jun-08 22:00
Lutosław14-Jun-08 22:00 
GeneralRe: Near-static class Pin
PIEBALDconsult15-Jun-08 7:31
mvePIEBALDconsult15-Jun-08 7:31 
AnswerRe: Near-static class Pin
#realJSOP15-Jun-08 3:49
professional#realJSOP15-Jun-08 3:49 
GeneralRe: Near-static class [modified] Pin
PIEBALDconsult15-Jun-08 7:31
mvePIEBALDconsult15-Jun-08 7:31 
QuestionList of arbitrary objects Pin
Jammer13-Jun-08 11:20
Jammer13-Jun-08 11:20 
AnswerRe: List of arbitrary objects Pin
PIEBALDconsult13-Jun-08 13:01
mvePIEBALDconsult13-Jun-08 13:01 
GeneralRe: List of arbitrary objects Pin
Jammer13-Jun-08 13:24
Jammer13-Jun-08 13:24 
GeneralRe: List of arbitrary objects Pin
PIEBALDconsult13-Jun-08 14:10
mvePIEBALDconsult13-Jun-08 14:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.