private static void ProcessResult(HttpCapabilitiesDefaultProvider capabilitiesEvaluator, XmlNode node) { bool val = true; System.Web.Configuration.HandlerBase.GetAndRemoveBooleanAttribute(node, "inherit", ref val); if (!val) { capabilitiesEvaluator.ClearParent(); } Type type = null; XmlNode node2 = System.Web.Configuration.HandlerBase.GetAndRemoveTypeAttribute(node, "type", ref type); if ((node2 != null) && !type.Equals(capabilitiesEvaluator._resultType)) { System.Web.Configuration.HandlerBase.CheckAssignableType(node2, capabilitiesEvaluator._resultType, type); capabilitiesEvaluator._resultType = type; } int num = 0; if (System.Web.Configuration.HandlerBase.GetAndRemovePositiveIntegerAttribute(node, "cacheTime", ref num) != null) { capabilitiesEvaluator.CacheTime = TimeSpan.FromSeconds((double)num); } System.Web.Configuration.HandlerBase.CheckForUnrecognizedAttributes(node); System.Web.Configuration.HandlerBase.CheckForNonCommentChildNodes(node); }
// // Handle the <result> tag // static void ProcessResult(HttpCapabilitiesDefaultProvider capabilitiesEvaluator, XmlNode node) { bool inherit = true; HandlerBase.GetAndRemoveBooleanAttribute(node, "inherit", ref inherit); if (inherit == false) { capabilitiesEvaluator.ClearParent(); } Type resultType = null; XmlNode attribute = HandlerBase.GetAndRemoveTypeAttribute(node, "type", ref resultType); if (attribute != null) { if (resultType.Equals(capabilitiesEvaluator._resultType) == false) { // be sure the new type is assignable to the parent type HandlerBase.CheckAssignableType(attribute, capabilitiesEvaluator._resultType, resultType); capabilitiesEvaluator._resultType = resultType; } } int cacheTime = 0; attribute = HandlerBase.GetAndRemovePositiveIntegerAttribute(node, "cacheTime", ref cacheTime); //NOTE: we continue to parse the cacheTime for backwards compat // it has never been used. Customer scenarios don't require this support. if (attribute != null) { capabilitiesEvaluator.CacheTime = TimeSpan.FromSeconds(cacheTime); } HandlerBase.CheckForUnrecognizedAttributes(node); HandlerBase.CheckForNonCommentChildNodes(node); }
// // Handle the <result> tag // static void ProcessResult(HttpCapabilitiesDefaultProvider capabilitiesEvaluator, XmlNode node) { bool inherit = true; HandlerBase.GetAndRemoveBooleanAttribute(node, "inherit", ref inherit); if (inherit == false) { capabilitiesEvaluator.ClearParent(); } Type resultType = null; XmlNode attribute = HandlerBase.GetAndRemoveTypeAttribute(node, "type", ref resultType); if (attribute != null) { if (resultType.Equals(capabilitiesEvaluator._resultType) == false) { // be sure the new type is assignable to the parent type HandlerBase.CheckAssignableType(attribute, capabilitiesEvaluator._resultType, resultType); capabilitiesEvaluator._resultType = resultType; } } int cacheTime = 0; attribute = HandlerBase.GetAndRemovePositiveIntegerAttribute(node, "cacheTime", ref cacheTime); //NOTE: we continue to parse the cacheTime for backwards compat // it has never been used. Customer scenarios don't require this support. if (attribute != null) { capabilitiesEvaluator.CacheTime = TimeSpan.FromSeconds(cacheTime); } HandlerBase.CheckForUnrecognizedAttributes(node); HandlerBase.CheckForNonCommentChildNodes(node); }