473,471 Members | 4,095 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Generate web references" has problems with accessors - solution?

Say an ASP.NET service has a class with accessors with corresponding
private data, for instance:

class Foo
{
private int bar;
public int Bar
{
get { return bar; }
set { value = bar; }
}
}

One of the WebMethods in the service class takes an instance of Foo as
a parameter.

The client adds a web reference to the service; the reference file has
a definition of class Foo, but it has been modified:

class Foo
{
public int Bar;
}

Not only are there no accessors, but an accessor has been converted
into a variable name!

If the private bar variable in the original Foo declaration is made
public, then the Web Reference-generated Foo class will have:

class Foo
{
public int bar;
public int Bar;
}

Of course, an easy solution is to just overwrite the declaration of Foo
in the generated reference file with the original. But is there a
better way?

Thanks.

Nov 16 '05 #1
0 1124

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: WalterM | last post by:
I'm setting up a script to build a C# solution, with several assemblies ( dlll's ). The script language would probably be VBScript, within a Windows Script ( .wsf ) file. The main build step is...
0
by: Will | last post by:
Hi all, The documentation for NGEN states "If Ngen.exe encounters any methods in an assembly that it cannot generate, it excludes them from the native image. When the runtime executes this...
2
by: Robin S. | last post by:
I don't have the "references" selection in my "tools" menu. Obviously this is kind of important. I have "Always show full menus" checked. Program has been updated to SP3. Any ideas as to why...
0
by: hansiman | last post by:
I sometimes see references to controls that has been removed from the aspx page in the code behind. The references linger in the region "Web Form Designer Generated Code" and look like Protected...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: Jason | last post by:
Hi I'm working on some code verification tools, and I'd like to implement pretty much the same functionality as the VS 2005 "Find All References" menu option, in c#. I want my code to run...
0
by: jpan | last post by:
I'm using Visual Web Developer 2005 Express edition. Trying to generate resources for a page, but the "Generate Local Resource" menu item is always grayed out (disabled). I have the desired page...
0
by: Beorne | last post by:
Up to a short time ago using "find all references" in the find symbol results appeared all the referencies of a specific string present in every source file of the solution. Now when i select...
4
by: SpaceMarine | last post by:
hello, i am trying to figure something out. the facts: - i have an Access 2000 app that ive converted to Access 2007 (windows Vista) - it uses several external references, DLLs and an EXE....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.