Ejemplo n.º 1
0
        public static bool IsAuthorizationDeniedException(Common.MSGraph.Version1_0.DirectoryObjects.Models.OdataErrorException oe)
        {
            if (oe.Response != null && oe.Response.StatusCode == HttpStatusCode.Forbidden &&
                oe.Body.Error != null && oe.Body.Error.Code != null && string.Equals(oe.Body.Error.Code, AuthorizationDeniedException, StringComparison.OrdinalIgnoreCase))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public static bool IsNotFoundException(this Common.MSGraph.Version1_0.DirectoryObjects.Models.OdataErrorException oe)
        {
            if (oe.Response != null && oe.Response.StatusCode == HttpStatusCode.NotFound &&
                oe.Body.Error != null && oe.Body.Error.Code != null && string.Equals(oe.Body.Error.Code, RequestResourceNotFound, StringComparison.OrdinalIgnoreCase))
            {
                return(true);
            }

            return(false);
        }