Exemplo n.º 1
0
        public static ProcessModelIdentityType ToProcessModelIdentityType(this ProcessModelIdentity identity)
        {
            switch (identity)
            {
            case ProcessModelIdentity.LocalService:
                return(ProcessModelIdentityType.LocalService);

            case ProcessModelIdentity.LocalSystem:
                return(ProcessModelIdentityType.LocalSystem);

            case ProcessModelIdentity.NetworkService:
                return(ProcessModelIdentityType.NetworkService);

            case ProcessModelIdentity.SpecificUser:
                return(ProcessModelIdentityType.SpecificUser);

            case ProcessModelIdentity.ApplicationPoolIdentity:
                // New for IIS 7.5
                return((ProcessModelIdentityType)4);

            default:
                throw new NotImplementedException(String.Format("ProcessModelIdentity [{0}] has not been implemented.", identity));
            }
        }
 public override void Context()
 {
     expectedIdentity = ProcessModelIdentity.LocalSystem;
     sut = new IisProtoTask("test", new DotNetPath());
 }
Exemplo n.º 3
0
 public void SetProcessModelIdentity(ProcessModelIdentity identity)
 {
     ProcessModelIdentityTypeSpecified = true;
     ProcessModelIdentityType          = identity;
 }
Exemplo n.º 4
0
 public void SetProcessModelIdentity(ProcessModelIdentity identity)
 {
     ProcessModelIdentityTypeSpecified = true;
     ProcessModelIdentityType = identity;
 }