2

I have the following code:

using System;
using System.Collections;
using System.Security;
using System.Security.Principal;

public class SystemPrincipal : IPrincipal {

    private IIdentity       _identity;
    private StringTable     _roles;

    public SystemPrincipal(IIdentity id, StringTable roles) {

        _identity = id;
        _roles = roles;;
    }

    public IIdentity Identity {

        get { return _identity; }
    }

    public bool IsInRole(String role) {

        bool result = false;

        if (null != _roles) {
            result = _roles.Contains(role);
        }
        return result;              
    }
}

I want to see the definition of IIdentity or StringTable so I right click and choose goto definition but I get "cannot naviate to" IIdentity or StiringTable.

Based on a google soultion I rebuilt the project but that did not solve the issue.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
S Nash
  • 2,363
  • 3
  • 34
  • 64
  • Where are these types defined? Same Project or reference? – Romano Zumbé Aug 07 '13 at 13:55
  • 1
    Try restarting visual studio, and or your PC as well – Khan Aug 07 '13 at 13:56
  • 1
    That's strange. I'm able to F12 `IIdentity` no problem. VS2010 Ultimate – tnw Aug 07 '13 at 13:57
  • That is the question. They are not in same project for sure because if I do a search I cannot find them defined anywhere. – S Nash Aug 07 '13 at 13:57
  • @tnw And what do you get as the definiton of IIdentity? Also how about StringTable? – S Nash Aug 07 '13 at 13:59
  • @SNash Just hit up the MSDN defintion. [IIdentity](http://msdn.microsoft.com/en-us/library/system.security.principal.iidentity.aspx) – tnw Aug 07 '13 at 14:01
  • I'm guessing maybe because my project is a mixture of Vb.NET and C# files VS2003 gets confused, which in this case this is bug. – S Nash Aug 07 '13 at 14:01
  • Do you have the correct DLL references in your project? If the code is from Visual Studio 2003/.NET 1.1, you might have to update some DLL references for it to compile. – Cameron Tinker Aug 07 '13 at 14:10
  • 2
    are you able to compile this code? May be some references are missed. – Anton Aug 07 '13 at 14:13
  • @Cameron Tinker Obviously I do. Otherwise I would get compile error. – S Nash Aug 07 '13 at 15:07
  • @Anton, Compile is successful. – S Nash Aug 07 '13 at 15:08
  • So I do have a soultion with different projects. Those projects with files all VB.NET or All C# do not have this issue. This issue only shows on a project with a mixture of VB.NEt and C# files. – S Nash Aug 07 '13 at 15:10
  • I have a hard time to understand why they made a project with mixutre of VB and C# files. All of these files are tiny so this could be made by one developer. – S Nash Aug 07 '13 at 15:11
  • They don't let me use VS2005 or plus. Also I'm stucked with dinasaur old Framework 1.1. – S Nash Aug 07 '13 at 15:13
  • Those classes are from Microsoft: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381050(v=vs.85).aspx and http://msdn.microsoft.com/en-us/library/system.security.principal.iidentity.aspx – Mike Cheel Aug 07 '13 at 15:20

0 Answers0