Click here to Skip to main content
15,907,328 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Code for a calculation Pin
User 665815-Aug-08 4:48
User 665815-Aug-08 4:48 
GeneralRe: C# Code for a calculation Pin
Paul Conrad15-Aug-08 5:47
professionalPaul Conrad15-Aug-08 5:47 
GeneralRe: C# Code for a calculation Pin
Dan Neely15-Aug-08 5:49
Dan Neely15-Aug-08 5:49 
GeneralRe: C# Code for a calculation Pin
Paul Conrad15-Aug-08 5:52
professionalPaul Conrad15-Aug-08 5:52 
AnswerRe: C# Code for a calculation Pin
Guffa15-Aug-08 4:49
Guffa15-Aug-08 4:49 
JokeRe: C# Code for a calculation Pin
User 665815-Aug-08 4:58
User 665815-Aug-08 4:58 
GeneralRe: C# Code for a calculation Pin
Paul Conrad15-Aug-08 5:50
professionalPaul Conrad15-Aug-08 5:50 
AnswerRe: C# Code for a calculation Pin
Cali199915-Aug-08 5:08
Cali199915-Aug-08 5:08 
GeneralRe: C# Code for a calculation Pin
carbon_golem15-Aug-08 6:22
carbon_golem15-Aug-08 6:22 
AnswerRe: C# Code for a calculation Pin
shabonaa17-Aug-08 9:26
shabonaa17-Aug-08 9:26 
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 

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.