开发者

#if SILVERLIGHT and #else blocks color change in WCF

I am facing a problem with WCF connectavity with silverlight. In my interface I wrote the DoWork method for asynchronous and normal calls.

#if SILVERLIGHT
    [OperationContract(AsyncPattern=true)]
    IAsyncResult BeginDoWork(bool opt, AsyncCallback callback, object state);

    string EndDoWork(IAsyncResult result);
#else
    [OperationContract]
    string DoWork(bool opt);
#endif

When I start coding the interface "#if SILVERLIGHT" content is gray color and "#else" content is colored(blue, black).

After some code changes when I seen interface code the colors are swaped. "#if SILVERLIGHT" content is colored(blue, black) and "#else" content is gray color. I don't know what I did wrong.

Please any one can help me to solve this issue

http://satyendrakumarp.spaces.live.com/blog/cns!1571EB24C5E78234!167.entry

Tha开发者_Python百科nk You, Satyendra


The code coloring reflects the code that will actually be included during compilation. If the color has changed it would suggest the code is now part of a project that has the "SILVERLIGHT" conditional compilation symbol defined in the Build tab of the project properties. This is what you would expect in a Silverlight project and is part of the Silverlight project templates.


I understand what you mean. But I was unable to call the DoWork method from silverlight as earlier. Earlier it is working fine.

Satyendra

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜