开发者

Silverlight wcf and ClientCredentials

开发者 https://www.devze.com 2023-03-03 16:50 出处:网络
I don\'t want to set the same username and password 100 times for ClientCredentials.I want a pattern where I can set this once in code then have it automatically se开发者_StackOverflowt.

I don't want to set the same username and password 100 times for ClientCredentials. I want a pattern where I can set this once in code then have it automatically se开发者_StackOverflowt.

How do people typically do this? Do they inherit from the wcf class? Do they use partial classes?


Delegate the responsibility of creating the proxy instance to a separate class. This class can have method to create proxy, assign credentials and return the proxy instance back.This is something similar to creating factory classes for construction of an object.

0

精彩评论

暂无评论...
验证码 换一张
取 消