problem with implementation

G

Guest

Hi

I'm writing a class for my program that implements the iprinciple interface.

my code is as follows:

public class BranchBuilderPrincipal : System.Security.Principal.IPrincipal
{
private IIdentity m_Identity;
private Int16 m_Userid;
private string m_FirstName = string.Empty ;
private string m_LastName = string.Empty;
private string m_Email = string.Empty;
private ArrayList m_ArrayListRoles;

//constructor
public BranchBuilderPrincipal(IIdentity Identity, string UserInfo)
{
//constructor code here
}

//constructor for property
public boolean IsInRole(string role) : System.Security.Principal.IPrincipal
{
get
{
return m_ArrayListRoles
}
}

I have a few problems:
1. System.Security.Principal.IPrincipal in the property constructor does not
bring up
intellisense for the IIdentity.

2. in the property constructor for IsInRole my m_arraylistroles does not
have access to any intellisense and I hoping to get it access to the methods,
properties of an arraylist.

3. none of my properties are allowing only readonly.

thanks

Chris
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,



I have a few problems:
1. System.Security.Principal.IPrincipal in the property constructor does
not
bring up
intellisense for the IIdentity.

Does the code compile?
Maybe you are missing the reference to the namespace, usually when the
intellisense does not work that is an indication that there is something
wrong.
2. in the property constructor for IsInRole my m_arraylistroles does not
have access to any intellisense and I hoping to get it access to the
methods,
properties of an arraylist.

3. none of my properties are allowing only readonly.

The only property IPrincipal expose Identity is read only, IsInRole is a
method, not a property.


cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top