Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
QuestionClose Button for Tabs in Tab Control Pin
Jason Rodan15-Aug-08 4:30
Jason Rodan15-Aug-08 4:30 
AnswerRe: Close Button for Tabs in Tab Control Pin
User 665815-Aug-08 5:07
User 665815-Aug-08 5:07 
AnswerRe: Close Button for Tabs in Tab Control [modified] Pin
PIEBALDconsult15-Aug-08 5:10
mvePIEBALDconsult15-Aug-08 5:10 
QuestionUsing another program's DLL Pin
OsoreWatashi15-Aug-08 4:28
OsoreWatashi15-Aug-08 4:28 
AnswerRe: Using another program's DLL Pin
User 665815-Aug-08 4:56
User 665815-Aug-08 4:56 
AnswerRe: Using another program's DLL Pin
dan!sh 15-Aug-08 6:42
professional dan!sh 15-Aug-08 6:42 
AnswerRe: Using another program's DLL Pin
OsoreWatashi16-Aug-08 3:56
OsoreWatashi16-Aug-08 3:56 
QuestionCustom data types in web services and web references Pin
Yellowseed15-Aug-08 3:56
Yellowseed15-Aug-08 3:56 
I've found a way to keep custom types working smoothly through web services, and I'd like to know what others think. Maybe this is already obvious common practise... if so, please let me know -- it'd be reassuring. Also: please criticize Wink | ;)

1. An assembly "Domain" containing:
class DomainObject { /* complexity abounds */ }
interface IDomainProvider
{
    void Post(DomainObject do);
    DomainObject[] Query(string query);
}
abstract class DomainProvider : ProviderBase, IDomainProvider { ... }
class StubDomainProvider { ... }

2. An assembly "Domain.WebServices" with app.config specifying StubDomainProvider as the default provider:
class DomainWebService : WebService, IDomainProvider { ... }

3. Back in the "Domain" assembly, a web reference to DomainWebService. Since DomainObject uses xml serialization attributes, its schema is nicely preserved: the web reference automatically generates its own DomainWebService.DomainObject class.
4. In the original DomainObject class,
public static explicit operator DomainWebService.DomainObject (DomainObject obj)
{
}
public static explicit operator DomainWebService.DomainObject(DomainObject obj)
{
}

5. Finally, still in the "Domain" assembly,
public WSDomainProvider : DomainProvider { ... }

Pros:
* WSDomainProvider is easy to implement.
Cons:
* DomainObject has to use xml serialization attributes, not IXmlSerializable.
Does any part of this get your spidey-sense tingling? Does it seem like a bad idea in any way? Maybe it makes schema updates more painful than necessary, or maybe putting web references in the Domain assembly is bad practise...
AnswerRe: Custom data types in web services and web references Pin
Wendelius15-Aug-08 5:28
mentorWendelius15-Aug-08 5:28 
GeneralRe: Custom data types in web services and web references Pin
Yellowseed15-Aug-08 12:52
Yellowseed15-Aug-08 12:52 
GeneralRe: Custom data types in web services and web references Pin
Wendelius17-Aug-08 2:50
mentorWendelius17-Aug-08 2:50 
QuestionCan't find even one Bluetooth device when scanning Pin
Klive815-Aug-08 3:53
Klive815-Aug-08 3:53 
QuestionExporting Datatable to Excel Pin
maliary15-Aug-08 3:52
maliary15-Aug-08 3:52 
AnswerRe: Exporting Datatable to Excel [Ignore repost] Pin
Manas Bhardwaj15-Aug-08 3:58
professionalManas Bhardwaj15-Aug-08 3:58 
GeneralRe: Exporting Datatable to Excel [Ignore repost] Pin
PIEBALDconsult15-Aug-08 4:10
mvePIEBALDconsult15-Aug-08 4:10 
GeneralRe: Exporting Datatable to Excel [Ignore repost] Pin
Manas Bhardwaj15-Aug-08 4:20
professionalManas Bhardwaj15-Aug-08 4:20 
AnswerRe: Exporting Datatable to Excel Pin
PIEBALDconsult15-Aug-08 4:12
mvePIEBALDconsult15-Aug-08 4:12 
QuestionPassing Interface as a parameter Pin
sreerani15-Aug-08 3:16
sreerani15-Aug-08 3:16 
AnswerRe: Passing Interface as a parameter Pin
0x3c015-Aug-08 3:43
0x3c015-Aug-08 3:43 
AnswerRe: Passing Interface as a parameter Pin
Pete O'Hanlon15-Aug-08 8:33
mvePete O'Hanlon15-Aug-08 8:33 
QuestionCan a file be opened? Pin
__DanC__15-Aug-08 2:43
__DanC__15-Aug-08 2:43 
AnswerRe: Can a file be opened? Pin
Anthony Mushrow15-Aug-08 2:57
professionalAnthony Mushrow15-Aug-08 2:57 
GeneralRe: Can a file be opened? Pin
__DanC__15-Aug-08 2:58
__DanC__15-Aug-08 2:58 
GeneralRe: Can a file be opened? Pin
PIEBALDconsult15-Aug-08 3:15
mvePIEBALDconsult15-Aug-08 3:15 
GeneralRe: Can a file be opened? Pin
__DanC__15-Aug-08 3:37
__DanC__15-Aug-08 3:37 

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.