Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I have a pretty big web app which consists of a few different projects. I have to add some extra functionality (account validations, searching products etc). I was provided with two .dll files let's say Services.dll and Interfaces.dll, which look like that:
 
//SERVICES.DLL
using Interfaces;
 
namespace Services
{
  internal class Users : IUser
  {
    public Users GetUserByName (string Name)
    {
      //Implementation
    }
  }
}
 
//INTERFACES.DLL
namespace Interfaces
{
  public interface IUser
  {
    Users GetUserByName(string Name);
  }
 
  public class Users
  {
    public string FirstName {get; set;}
    public string LastName {get; set;}
  }
}
 
I have two choices for using them. Either create a web service and pass it as service reference in my app or add the actual dlls as references. I don't have decided which would be better yet but I have a question on how will I use the methods of services.dll in my app. I mean that the class is declared as internal so I can't get nor use its methods. Any ideas on how to solve it are welcome.
Posted 9-Apr-13 23:06pm
vitusT141
Edited 10-Apr-13 0:33am
v3
Comments
tumbledDown2earth at 10-Apr-13 4:39am
   
Having an internal class with a public constructor?
vitusT at 10-Apr-13 5:58am
   
yes..that's what they gave me.
AnotherKen at 17-Apr-13 1:44am
   
Do you have the option of re-writing the services.dll to make it expose methods that you need? I am sort of thinking along the lines of public "accesor" methods which could be designed to give you the functionality you need without exposing private data or methods.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100