I am creating a class library that uses a web link at its data access level, but, unfortunately, it does not seem to be an acceptable way to set access for automatically generated proxy classes. By default they are public , but I do not want to open proxy classes outside the library.
I found this on MSDN , but all answers point to manually changing proxy classes to set access modifiers.
No wonder all proxy classes have this at the top:
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------
So, I want to play by the rules and not worry about remembering to check access modifiers every time I compile a project - something that can be easily missed.
Is there a more βofficialβ way to set the default access modifier on proxy classes created for a web link?
EDIT:
I found this article which is related to setting access for service links , but I'm talking about an old style web link (if you click the "Advanced" button when adding a link to the service, click the "Add Web Link ..." button). The article does not address my problem.
For anyone interested, the reason I use web services instead of WCF is because I work with SQL Server Reporting Services (SSRS), which seems to have tied all of my documentation to web service calls, not to WCF service links (which appear to exist, but are very poorly documented).
rory.ap
source share