473,657 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ 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 1138

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

Similar topics

0
332
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 done by running the command-line program "devenv.com", for Visual Studio .NET 2003. An earlier step I need to is to add a folder ( "X:\" ) to the "References Path" for each project in the solution. Can anyone say a way to do that in a script ? ...
0
907
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 assembly, it will revert to JIT compilation for the methods that were not included in the native image." I am in a position where I need to determine if this exclusion occurs, but it's not clear to me how to determine this-- can I get NGEN to create...
2
2426
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 this would be completely missing? Perhaps a security setting? Is there another way to turn on DAO 3.6? Thanks for any thoughts. Regards,
0
1353
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 WithEvents lblLabel1 As System.Web.UI.WebControls.Label Why do they persist and is there a was to remove them easily? /M
0
2252
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 assistance. I say additional because I've already had help which is greatly appreciated. I do try to take the time and understand the provided script in hopes on not having to trouble others on those. But here it goes...
2
3174
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 through some other code (or possibly the compiled modules) that my colleagues and I have written, and find calls to specific functions (also in our code), in such a way that I can get hold of the parameters of the calls. I don't really want to write...
0
3304
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 open in design view and from what I understand, it's all that's required to use that tool. Thanks in advance!
0
1319
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 "find all references" only appears references contained in the currently active file. Have I modified something? How to to search in all the solution? I haven't found any clue in the msdn documentation. Thanks
4
3724
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. - these are managed in the VB IDE's Tools-->References... dialog.
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8512
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8612
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7347
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
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 we have to send another system

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.