Click here to Skip to main content
15,887,083 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Advice on Architecture for customized application Pin
Mycroft Holmes23-May-08 1:13
professionalMycroft Holmes23-May-08 1:13 
GeneralRe: Advice on Architecture for customized application Pin
ruben ruvalcaba23-May-08 4:47
ruben ruvalcaba23-May-08 4:47 
AnswerRe: Advice on Architecture for customized application Pin
Scott Dorman25-May-08 2:19
professionalScott Dorman25-May-08 2:19 
GeneralRe: Advice on Architecture for customized application Pin
ruben ruvalcaba26-May-08 4:46
ruben ruvalcaba26-May-08 4:46 
GeneralRe: Advice on Architecture for customized application Pin
Scott Dorman26-May-08 5:09
professionalScott Dorman26-May-08 5:09 
Question'Dynamic' String Formatting Pin
HoltDan18-May-08 15:07
HoltDan18-May-08 15:07 
AnswerRe: 'Dynamic' String Formatting Pin
led mike19-May-08 4:58
led mike19-May-08 4:58 
GeneralRe: 'Dynamic' String Formatting Pin
HoltDan19-May-08 5:50
HoltDan19-May-08 5:50 
I guess I could take their input string ("%A% something %M% - %B% @ %T%" - or whatever) and transform it into a format string "{0} something {1} - {2} @ {3}" and load up a list of delegates to return the corresponding args. Kind of like what I'd do preparing to generate the dynamic method in my original example. However, I'd still have to do it per-instance or per-invocation of the method that calls string.Format.

I just don't have a good feel for how efficient something like that is. Plus I'll probably never get the chance to measure in any meaningful context.

Or maybe I'm being dense and there's a design pattern or technique for doing this sort of thing. I looked into IFormatProvider(?) which might be helpful once the code gets down to the nuts 'n bolts of formatting each piece of text, but not in assembling the parameters at run time.

The error handling isn't much of a concern. I simplified the example: in reality, this product gets installed at various customer sites and configuring the display strings to their specifications is something that will be part of the setup. There will be error checking and it will be done infrequently and then by 'qualified' professionals (that's a good one!).

Dan
GeneralRe: 'Dynamic' String Formatting Pin
led mike19-May-08 6:08
led mike19-May-08 6:08 
GeneralRe: 'Dynamic' String Formatting Pin
Roger Alsing20-May-08 4:06
Roger Alsing20-May-08 4:06 
GeneralRe: 'Dynamic' String Formatting Pin
Scott Dorman25-May-08 2:31
professionalScott Dorman25-May-08 2:31 
QuestionHelp with a inheritance best practices question Pin
turnergg18-May-08 8:20
turnergg18-May-08 8:20 
AnswerRe: Help with a inheritance best practices question Pin
led mike19-May-08 4:51
led mike19-May-08 4:51 
AnswerRe: Help with a inheritance best practices question Pin
Tim Yen24-May-08 19:40
Tim Yen24-May-08 19:40 
QuestionDecalring global variable in VBA editor. Pin
raja baireddy17-May-08 2:31
raja baireddy17-May-08 2:31 
AnswerRe: Decalring global variable in VBA editor. Pin
Pete O'Hanlon17-May-08 8:46
mvePete O'Hanlon17-May-08 8:46 
GeneralRe: Decalring global variable in VBA editor. Pin
led mike19-May-08 4:43
led mike19-May-08 4:43 
Questiontracking sales of electronic pump machines Pin
mickeyen17-May-08 2:16
mickeyen17-May-08 2:16 
AnswerRe: tracking sales of electronic pump machines Pin
led mike19-May-08 5:05
led mike19-May-08 5:05 
GeneralRe: tracking sales of electronic pump machines Pin
mickeyen25-May-08 15:33
mickeyen25-May-08 15:33 
GeneralRe: tracking sales of electronic pump machines Pin
Mark Churchill10-Jun-08 21:07
Mark Churchill10-Jun-08 21:07 
GeneralRe: tracking sales of electronic pump machines Pin
mickeyen15-Jun-08 14:36
mickeyen15-Jun-08 14:36 
QuestionCommand Pattern Implementation [modified] Pin
Tristan Rhodes16-May-08 5:29
Tristan Rhodes16-May-08 5:29 
AnswerRe: Command Pattern Implementation Pin
led mike19-May-08 4:41
led mike19-May-08 4:41 
GeneralRe: Command Pattern Implementation Pin
Tristan Rhodes20-May-08 1:47
Tristan Rhodes20-May-08 1:47 

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.