Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Proxy Classes - Copy/Paste Pre-compiler

Proxy Classes - Copy/Paste Pre-compiler

Scheduled Pinned Locked Moved C#
wcfcollaborationhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Iain Wiseman
    wrote on last edited by
    #1

    Hi, Firstly I am currently a Project Manager so I don't have the detail I would probably have if this was an Open Source issue which I am more familar with. Anyway enough of the caveats. My understanding is the team create Proxy Classes using WSDL.exe. These classes and then cut and paste into other code which uses them. Please please please don't ask why, accept it does and if you are still reading read on. What I want to know is, Does anyone know of any code which could be used to automate this. I was thinking, project managers can, that a pre-compiler of some sort could solve this. E.g. in the source which need to have the pasted code you could have. // #AUTO_GENERATED_SOURCE_FILE:Auto_GeProxy_Class.cs #FUNCTION_TO_COPY:My_Foo() Then make a tool which pre-processing this appropriately. People are using VS2008 Thanks for listening.

    D 1 Reply Last reply
    0
    • I Iain Wiseman

      Hi, Firstly I am currently a Project Manager so I don't have the detail I would probably have if this was an Open Source issue which I am more familar with. Anyway enough of the caveats. My understanding is the team create Proxy Classes using WSDL.exe. These classes and then cut and paste into other code which uses them. Please please please don't ask why, accept it does and if you are still reading read on. What I want to know is, Does anyone know of any code which could be used to automate this. I was thinking, project managers can, that a pre-compiler of some sort could solve this. E.g. in the source which need to have the pasted code you could have. // #AUTO_GENERATED_SOURCE_FILE:Auto_GeProxy_Class.cs #FUNCTION_TO_COPY:My_Foo() Then make a tool which pre-processing this appropriately. People are using VS2008 Thanks for listening.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      They need to generate the new proxy class only when there is some change made in the service. Now, since they will be having existing old proxy class, they can use /out or /o switch to directly write the new class to the mentioned location. Like this:

      wsdl [service url] /o [file where to write the proxy class]

      Is this what you are looking for?

      50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

      I 1 Reply Last reply
      0
      • D dan sh

        They need to generate the new proxy class only when there is some change made in the service. Now, since they will be having existing old proxy class, they can use /out or /o switch to directly write the new class to the mentioned location. Like this:

        wsdl [service url] /o [file where to write the proxy class]

        Is this what you are looking for?

        50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

        I Offline
        I Offline
        Iain Wiseman
        wrote on last edited by
        #3

        Hi, Firstly thanks for replying. I think the original is a code management one. As I said I don't have the detail behind why they are where they are. I think but don't know, that they have some common functions which are split across various projects. They generate the proxy classes and need to ensure all services have these new generated types. I believe they new some of the code a function level to be copied into the other projects. I have googled for cut and paste from proxies and it does seem that there are few people fallen into this trap in one way or another. Regards, Iain

        D D 2 Replies Last reply
        0
        • I Iain Wiseman

          Hi, Firstly thanks for replying. I think the original is a code management one. As I said I don't have the detail behind why they are where they are. I think but don't know, that they have some common functions which are split across various projects. They generate the proxy classes and need to ensure all services have these new generated types. I believe they new some of the code a function level to be copied into the other projects. I have googled for cut and paste from proxies and it does seem that there are few people fallen into this trap in one way or another. Regards, Iain

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          1. If they are merely adding the new parts of the proxy class to the old one, I would say please don't do it. You might miss out something and it will spoil entire application. Replace the entire proxy class. 2. Say the service had a method Sum which took in "int x" and "int y" as parameters. Later, they changed it to give the sum of three numbers and hence added "int z" as a parameter. Now, they need to change all the calls for the method in the client. Here, there is not much of chance, IMHO, of automation. I am saying so since in your application, the might or might not be as simple as my example. Also, you never know what will be the next change. You also don't know how the clients have consumed the method. If all the consumption ways are different, it will not be an easy task to automate. If you can clarify what exactly is copied and pasted, maybe someone could give a better response. For now and from my understanding, I don't see much of an automation here.

          50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

          1 Reply Last reply
          0
          • I Iain Wiseman

            Hi, Firstly thanks for replying. I think the original is a code management one. As I said I don't have the detail behind why they are where they are. I think but don't know, that they have some common functions which are split across various projects. They generate the proxy classes and need to ensure all services have these new generated types. I believe they new some of the code a function level to be copied into the other projects. I have googled for cut and paste from proxies and it does seem that there are few people fallen into this trap in one way or another. Regards, Iain

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Iain Wiseman wrote:

            I think but don't know

            We have a saying where I work: "There is no thinking allowed. You either know, or you need to go find out. Thinking only results in misunderstandings and huge bugs." But, I agree with the other poster. This sounds like a very kludgy way of updating the web service interfaces. Nothing personal, just my two cents...

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups