예제 #1
0
        private void ValidateTask(SecurityTask recommendation)
        {
            Assert.NotNull(recommendation);

            Assert.True(recommendation.CreationTimeUtc.HasValue);
            Assert.True(recommendation.CreationTimeUtc.Value.ToUniversalTime() < DateTime.UtcNow);
        }
예제 #2
0
 public static PSSecurityTask ConvertToPSType(this SecurityTask value)
 {
     return(new PSSecurityTask()
     {
         Id = value.Id,
         Name = value.Name,
         ResourceId = value.SecurityTaskParameters.AdditionalProperties["resourceId"].ToString(),
         RecommendationType = value.SecurityTaskParameters.Name != "GenericSecuirtyTask" ? value.SecurityTaskParameters.Name : value.SecurityTaskParameters.AdditionalProperties["policyName"].ToString()
     });
 }