Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:

C#
//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
Updated 9-Apr-13 23:33pm
v3
Comments
tumbledDown2earth 10-Apr-13 4:39am    
Having an internal class with a public constructor?
vitusT 10-Apr-13 5:58am    
yes..that's what they gave me.
AnotherKen 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900